summaryrefslogtreecommitdiff
path: root/grammar.rb
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-05-07 22:05:31 +0200
committerPatrick Simianer <p@simianer.de>2014-05-07 22:05:31 +0200
commit4400add706c01ebf1460701c651d66bbf592cfa5 (patch)
tree99ff57cc48fbff7720b5a0c1507cf389122963c6 /grammar.rb
parent92638dbe20317d2cccf8258c5859af91617f53bb (diff)
added self-filling, fixing stuff
Diffstat (limited to 'grammar.rb')
-rw-r--r--grammar.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/grammar.rb b/grammar.rb
index cf321f8..3ee8105 100644
--- a/grammar.rb
+++ b/grammar.rb
@@ -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