summaryrefslogtreecommitdiff
path: root/grammar.rb
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-06-10 15:04:19 +0200
committerPatrick Simianer <p@simianer.de>2014-06-10 15:04:19 +0200
commit719a996f9acfefa5ff3dc49d36e0ef6e57e74fe3 (patch)
treee57bc8823ece525df4ded8fba508b035b93e14ec /grammar.rb
parent501de3c0b47ad219cc1372466c98d3fd534c5556 (diff)
fix
Diffstat (limited to 'grammar.rb')
-rw-r--r--grammar.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/grammar.rb b/grammar.rb
index ea16425..0b2bc61 100644
--- a/grammar.rb
+++ b/grammar.rb
@@ -33,7 +33,8 @@ class NT
end
def to_s
- "NT<#{@symbol},#{@index}>"
+ return "NT<#{@symbol},#{@index}>" if @index>=0
+ return "NT<#{@symbol}>"
end
end