public
Fork of nathansobo/treetop
Description: A Ruby-based parsing DSL based on parsing expression grammars.
Homepage: http://treetop.rubyforge.org
Clone URL: git://github.com/juretta/treetop.git
When processing a .tt file, the source file may be overwritten.
cjheath (author)
Tue Dec 11 19:25:01 -0800 2007
commit  e911740ca6f2face3da040ae56fd958d2b33c855
tree    b5dce0f5dda29daa058a648e802b7ec911603b31
parent  bf7adab61b300e7288ef1fbaf1f99bad74f489b1
...
1
2
3
4
 
5
6
7
...
1
2
3
 
4
5
6
7
0
@@ -1,7 +1,7 @@
0
 module Treetop
0
   module Compiler
0
     class GrammarCompiler
0
- def compile(source_path, target_path = source_path.gsub(/treetop\Z/, 'rb'))
0
+ def compile(source_path, target_path = source_path.gsub(/\.(treetop|tt)\Z/, '.rb'))
0
         File.open(target_path, 'w') do |target_file|
0
           target_file.write(ruby_source(source_path))
0
         end

Comments

    No one has commented yet.