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