polyglot.rb 241 B

123456789
  1. module Treetop
  2. module Polyglot
  3. VALID_GRAMMAR_EXT = ['treetop', 'tt']
  4. VALID_GRAMMAR_EXT_REGEXP = /\.(#{VALID_GRAMMAR_EXT.join('|')})\Z/o
  5. end
  6. end
  7. require 'polyglot'
  8. Polyglot.register(Treetop::Polyglot::VALID_GRAMMAR_EXT, Treetop)