| Path: | lib/ooparser/grammar.rb (CVS) |
| Last Update: | Thu Sep 08 01:36:49 MDT 2005 |
OOParser::Grammar - A grammar class for representing the structure of an OOParser
OOParser::Grammar::new {
def_rule :value, "<number> - <number>" do |match|
match[1].to_i - match[3].to_i
end
def_rule :value, "<number>" do |match| match[:number].to_i end
def_rule :number, /\d+/
}
Copyright © 2004, 2005 The FaerieMUD Consortium. All rights reserved.
This module is free software. You may use, modify, and/or redistribute this software under the terms of the Perl Artistic License. (See language.perl.com/misc/Artistic.html)
$Id: grammar.rb 4 2005-09-08 07:36:41Z ged $