Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Parse

by tshabet (Beadle)
on Aug 08, 2001 at 23:53 UTC ( #103198=note: print w/ replies, xml ) Need Help??


in reply to What does the word "parse" mean?

These guys are absolutely right. To take the example further, lets say you have this math expression:

Z=(A-(C*K))
when you parse this, it becomes
                              =
                           /      \
                         -         Z
                       /   \
                     A      *
                           / \
                          C   K   
So parsing something really is about breaking it down into its individual chunks and pieces. For instance, a parser might break your c++ program into functions, or your word into letters. If you have a whole made of parts, the parser looks at those parts. Make sense? Check out the definitions linked above, they're probably better at explaining it than I am. Hope that helped a little. PS The above is a "parse tree", certainly not the only way to parse or represent a parse. Just so you know.


Comment on Re: Parse
Download Code
Re^2: Parse
by Anonymous Monk on Dec 07, 2012 at 06:43 UTC
    analysing or separating the text in to processed components known as parsing in computer science field and in general it means that elaborating the given text in to understandable format.
Re^2: Parse
by Anonymous Monk on Mar 18, 2014 at 09:25 UTC
    Alternate parse representation of  $Z=($A-($C*$K)) care of ppi_dumper :) notice how it labels each part :)
    PPI::Document PPI::Statement PPI::Token::Symbol '$Z' PPI::Token::Operator '=' PPI::Structure::List ( ... ) PPI::Statement::Expression PPI::Token::Symbol '$A' PPI::Token::Operator '-' PPI::Structure::List ( ... ) PPI::Statement::Expression PPI::Token::Symbol '$C' PPI::Token::Operator '*' PPI::Token::Symbol '$K'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2014-09-15 02:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls