Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Help with tweaking Parse::RecDescent grammar

by Abigail-II (Bishop)
on Feb 11, 2003 at 13:48 UTC ( [id://234396]=note: print w/replies, xml ) Need Help??


in reply to Re: Help with tweaking Parse::RecDescent grammar
in thread Help with tweaking Parse::RecDescent grammar

That doesn't solve his problem though. The problem isn't that IF matches a label, the problem is that the parser is trying to match IF to be a label. That means the parser has already rejected the line to be of the form opcode operand(s).

Hence, the parsing of the IF statement failed. Where does it fail? Easy, var_value returns the value from a code block. It's looking up the value of rmove, but that variable wasn't set. Instead, the variable RMOVE was set.

The problem here is that the parser is already doing the calculations, and causing the parse the language differently on the outcome of those calculations. Icky.

Anything more complicated that a calculater should probably have separate compile and runtime phases.

Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://234396]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-23 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found