summaryrefslogtreecommitdiff
path: root/grammar.rb
diff options
context:
space:
mode:
Diffstat (limited to 'grammar.rb')
-rw-r--r--grammar.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/grammar.rb b/grammar.rb
index 02f4270..ac97fbd 100644
--- a/grammar.rb
+++ b/grammar.rb
@@ -1,5 +1,6 @@
require 'nlp_ruby'
+
class Terminal
attr_accessor :w
@@ -44,7 +45,7 @@ class Rule
end
def to_s
- "#{lhs} -> #{rhs.map{|i|i.to_s}.join ' '} (#{arity}) (#{@span.left}, #{@span.right})"
+ "#{lhs} -> #{rhs.map{|i|i.to_s}.join ' '} a:#{arity} (#{@span.left}, #{@span.right})"
end
def arity
@@ -89,8 +90,3 @@ class Grammar
end
end
-
-
-
-
-