Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Reversible parsing (with Parse::RecDescent?)

by Joost (Canon)
on Mar 15, 2008 at 01:35 UTC ( #674329=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Reversible parsing (with Parse::RecDescent?)
in thread Reversible parsing (with Parse::RecDescent?)

There may be multiple parse trees for that input, but the parser will find one. That parse tree is unambiguous and refers to just one string, so you will be able to go back.
But if the grammar is ambiguous you may not get the result you expect by parsing the result of "reverse parse" again.


Comment on Re^3: Reversible parsing (with Parse::RecDescent?)
Replies are listed 'Best First'.
Re^4: Reversible parsing (with Parse::RecDescent?)
by blokhead (Monsignor) on Mar 15, 2008 at 03:00 UTC
    The OP asks to go from string to parse tree back to the original string, not parse tree to string to original parse tree.

    blokhead

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2015-08-31 18:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (361 votes), past polls