Sha256: c4e165b6e6a65173795da673ee94aaaf93c4e1d72df4da6e9dc50492b0d37a16
Contents?: true
Size: 608 Bytes
Versions: 1
Compression:
Stored size: 608 Bytes
Contents
require_relative 'grammar/options' require_relative 'grammar/matching' require_relative 'grammar/parsing' require_relative 'grammar/tagging' module Sexpr module Grammar include Options include Matching include Parsing include Tagging def self.new(options = {}) unless options.is_a?(Hash) raise ArgumentError, "Invalid grammar definition: #{options.inspect}" end Module.new.tap{|g| g.instance_eval{ include(Grammar) extend(self) install_options(options) } } end end # module Grammar end # module Sexpr
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sexpr-0.3.0 | lib/sexpr/grammar.rb |