diff options
author | Patrick Simianer <p@simianer.de> | 2014-05-02 19:05:29 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-05-02 19:05:29 +0200 |
commit | f714aa1be20cc92d77cc3cffd203a848868d98e2 (patch) | |
tree | 4d8b4d63f9d618b8cf734b2ff18c653ea38b908e /grammar.rb | |
parent | 2f65a33d9e55bd53de73389330a8c36665a98b03 (diff) |
arity-0 rules with rhs.size > 1
Diffstat (limited to 'grammar.rb')
-rw-r--r-- | grammar.rb | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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 - - - - - |