diff options
author | Patrick Simianer <p@simianer.de> | 2014-05-07 22:05:31 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-05-07 22:05:31 +0200 |
commit | 4400add706c01ebf1460701c651d66bbf592cfa5 (patch) | |
tree | 99ff57cc48fbff7720b5a0c1507cf389122963c6 /grammar.rb | |
parent | 92638dbe20317d2cccf8258c5859af91617f53bb (diff) |
added self-filling, fixing stuff
Diffstat (limited to 'grammar.rb')
-rw-r--r-- | grammar.rb | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -70,8 +70,8 @@ class Grammar def initialize fn @rules = [] ReadFile.readlines_strip(fn).each_with_index { |s,j| - STDERR.write '.' - STDERR.write "\n" if j%100==0&&j>0 + #STDERR.write '.' + #puts "\n" if j%100==0&&j>0 @rules << Rule.from_s(s) } end @@ -90,8 +90,8 @@ class Grammar end def add_pass_through_rules input - input.each { |w| - @rules << Rule.new(NT.new('X'), [T.new(w)]) + input.each { |terminal| + @rules << Rule.new(NT.new('X'), [T.new(terminal.word)]) } end end |