summaryrefslogtreecommitdiff
path: root/prototype/grammar.rb
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-09-20 16:24:39 +0100
committerPatrick Simianer <p@simianer.de>2014-09-20 16:24:39 +0100
commit8949948243cb709e65ec172b3014c9e6a3181ed3 (patch)
tree6342152d91054601b107a1f75c1271f06a6c732e /prototype/grammar.rb
parent129a22cfcc7651daa4b11ed52e7870249f6373a5 (diff)
prototype: fixed grammar handling
Diffstat (limited to 'prototype/grammar.rb')
-rw-r--r--prototype/grammar.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/prototype/grammar.rb b/prototype/grammar.rb
index 42ffbc0..05224f4 100644
--- a/prototype/grammar.rb
+++ b/prototype/grammar.rb
@@ -126,6 +126,7 @@ class Grammar
end
def add_pass_through a
+ return if !a
a.each { |word|
@rules << Rule.new(NT.new('X'), [T.new(word)], [T.new(word)])
@flat << @rules.last