Recursive ascent parser: Difference between revisions

Content deleted Content added
OAbot (talk | contribs)
m Open access bot: doi added to citation with #oabot.
Summary: Copyedit: The source of a parser's input is a stream, not a "stack"
Line 7:
== Summary ==
 
Intuitively, recursive ascent is a literal implementation of the [[LR parser|LR parsing]] concept. Each function in the parser represents a single LR [[Finite state machine|automaton]] state. Within each function, a multi-branch statement is used to select the appropriate action based on the current token poppedread offfrom the input stackstream. Once the token has been identified, action is taken based on the state being encoded. There are two different fundamental actions which may be taken based on the token in question:
 
* '''Shift''' - Encoded as a function call, effectively jumping to a new automaton state.