summaryrefslogtreecommitdiff
path: root/grammar.rb
diff options
context:
space:
mode:
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