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:
“What is line? It is life. A line must live at each point along its course in such a way that the artist’s presence makes itself felt above that of the model.... With the writer, line takes precedence over form and content. It runs through the words he assembles. It strikes a continuous note unperceived by ear or eye. It is, in a way, the soul’s style, and if the line ceases to have a life of its own, if it only describes an arabesque, the soul is missing and the writing dies.”
—Jean Cocteau (1889–1963)