December 2009
Intermediate to advanced
380 pages
9h 2m
English
In elementary school, we all learned (and probably forgot) how to identify the parts of speech in a sentence like verb and noun. We can do the same thing with computer languages (we call it syntax analysis). Vocabulary symbols (tokens) play different roles like variable and operator. We can even identify the role of token subsequences like expression.
Take return x+1;, for example. Sequence x+1 plays the role of an expression and the entire phrase is a return statement, which is also a kind of statement. If we represent that visually, we get a sentence diagram of sorts:

Flip that over, and you get what we call a parse ...
Read now
Unlock full access