Module: Sexpr::Grammar
- Defined in:
- lib/sexpr/grammar.rb,
lib/sexpr/grammar/options.rb,
lib/sexpr/grammar/parsing.rb,
lib/sexpr/grammar/tagging.rb,
lib/sexpr/grammar/matching.rb
Defined Under Namespace
Modules: Matching, Options, Parsing, Tagging
Instance Attribute Summary
Attributes included from Options
#options, #parser, #path, #root, #rules
Class Method Summary collapse
Methods included from Tagging
#mod2rulename, #rule2modname, #sexpr
Methods included from Parsing
Methods included from Matching
Methods included from Options
#compile_rules, #install_options, #install_parser, #install_path, #install_root, #install_rules, #option
Class Method Details
.new(options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/sexpr/grammar.rb', line 12 def self.new( = {}) unless .is_a?(Hash) raise ArgumentError, "Invalid grammar definition: #{.inspect}" end Module.new.tap{|g| g.instance_eval{ include(Grammar) extend(self) () } } end |