C
Christopher Rose
Hello All,
please forgive a very novice question on what may be an arcane topic. I
have a Treetop grammar defined, the 'tt' compiler seems to digest it
without complaint, I get no errors when I create a new parser instance.
I parse a smallish, syntactically correct example input and get a nil
result, like this;
irb(main):178:0> pA = VHDLParser.new
=> #<VHDLParser:0x8b5bc6c @consume_all_input=true>
irb(main):188:0> resA = pA.parse(exA)
=> nil
irb(main):189:0> resA.failure_reason
NoMethodError: undefined method `failure_reason' for nil:NilClass
from (irb):189
from :0
The description at treetop.rubyforge.org seems to suggest that if the
parse fails, the methods failure_reason, failure_line, and
failure_column would exist in such a way as to point to and describe the
reason for failure.
Can someone please suggest some other avenues for debugging this?
Thanks -
please forgive a very novice question on what may be an arcane topic. I
have a Treetop grammar defined, the 'tt' compiler seems to digest it
without complaint, I get no errors when I create a new parser instance.
I parse a smallish, syntactically correct example input and get a nil
result, like this;
irb(main):178:0> pA = VHDLParser.new
=> #<VHDLParser:0x8b5bc6c @consume_all_input=true>
irb(main):188:0> resA = pA.parse(exA)
=> nil
irb(main):189:0> resA.failure_reason
NoMethodError: undefined method `failure_reason' for nil:NilClass
from (irb):189
from :0
The description at treetop.rubyforge.org seems to suggest that if the
parse fails, the methods failure_reason, failure_line, and
failure_column would exist in such a way as to point to and describe the
reason for failure.
Can someone please suggest some other avenues for debugging this?
Thanks -