Created
August 17, 2013 17:01
-
-
Save rajsahae/6257806 to your computer and use it in GitHub Desktop.
Errors I get using Treetop to parse
This file contains hidden or 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
irb(main):002:0> Parser.parse "123" | |
RuntimeError: Parse error at offset: 0 | |
from /Users/rsahae/dev/badaal/lib/badaal/parser.rb:27:in `parse' | |
from (irb):2 | |
from /Users/rsahae/.rvm/rubies/ruby-1.9.3-p327/bin/irb:18:in `<main>' | |
irb(main):003:0> Parser.parse "123.123" | |
=> FloatLiteral+Float2 offset=0, "123.123": | |
SyntaxNode offset=0, "" | |
SyntaxNode offset=0, "123": | |
SyntaxNode offset=0, "1" | |
SyntaxNode offset=1, "2" | |
SyntaxNode offset=2, "3" | |
SyntaxNode+Float0 offset=3, ".123": | |
SyntaxNode offset=3, "." | |
SyntaxNode offset=4, "123": | |
SyntaxNode offset=4, "1" | |
SyntaxNode offset=5, "2" | |
SyntaxNode offset=6, "3" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment