Created
January 10, 2011 04:45
-
-
Save xxx/772368 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby treedumper.rb | |
/usr/home/pope/.rvm/gems/ruby-1.8.7-p248/gems/antlr3-1.8.5/lib/antlr3/dot.rb:122:in `define_nodes': undefined method `node_number' for #<ANTLR3::DOT::TreeGenerator:0x2d1ab058> (NoMethodError) | |
from /usr/home/pope/.rvm/gems/ruby-1.8.7-p248/gems/antlr3-1.8.5/lib/antlr3/dot.rb:110:in `to_dot' | |
from /usr/home/pope/.rvm/gems/ruby-1.8.7-p248/gems/antlr3-1.8.5/lib/antlr3/dot.rb:93:in `generate' | |
from treedumper.rb:9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './SearchExpressionParser' | |
parser = SearchExpression::Parser.new("a and b or c and not d") | |
return_val = parser.search_expression | |
tree = return_val.tree | |
dot = ANTLR3::DOT::TreeGenerator.generate(tree) # boom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment