Operator Precedence Parsing Algorithm
Initialize: Set ip to point to the first symbol of w$ Repeat: If $ is on the top of the stack and ip points to $ then return else Let a be the top terminal on the stack, and b the symbol pointed to by ip if a <• b or a =• b then push b onto the stack advance ip to the next input symbol else if a •> b then repeat pop the stack until the top stack terminal is related by <• to the terminal most recently popped else error endRead more about this topic: Operator-precedence Grammar
Famous quotes containing the word precedence:
“It is difficult to separate the tapestry
From the room or loom which takes precedence over it.”
—John Ashbery (b. 1927)