You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I've stumbled across a little bug in your target code though. I believe that the CommonTreeNodeStream should expose the @last_marker instance variable via an attr_reader. This is needed when tree grammars generate DFAs. The initialize_dfas method calls @input.rewind(@input.last_marker, false) which can only work if last_marker is accessible for CommonTreeNodeStream.
example, taken from generated tree parser ruby code:
Another possibility is to fix the the generated parser code to call @input.rewind without arguments, since last_marker is the default argument of this method.
Thanks,
omar
PS. here is a patch, I don't know how to attach a file (or what is the proper github way)
--- a/orig/tree.rb
+++ b/fixed/tree.rb
@@ -1107,6 +1107,8 @@ class CommonTreeNodeStream
return @last_marker
end
+ attr_reader :last_marker
+
def release( marker = nil )
# do nothing?
end
The text was updated successfully, but these errors were encountered:
Dear Kyle,
First of all, thanks for writing this great code!
I think I've stumbled across a little bug in your target code though. I believe that the CommonTreeNodeStream should expose the @last_marker instance variable via an attr_reader. This is needed when tree grammars generate DFAs. The initialize_dfas method calls @input.rewind(@input.last_marker, false) which can only work if last_marker is accessible for CommonTreeNodeStream.
example, taken from generated tree parser ruby code:
Another possibility is to fix the the generated parser code to call @input.rewind without arguments, since last_marker is the default argument of this method.
Thanks,
omar
PS. here is a patch, I don't know how to attach a file (or what is the proper github way)
The text was updated successfully, but these errors were encountered: