Precedence Functions
An operator precedence parser usually does not store the precedence table with the relations, which can get rather large. Instead, precedence functions f and g are defined. They map terminal symbols to integers, and so the precedence relations between the symbols are implemented by numerical comparison: f(a) < g(b) must hold if a <• b holds, etc.
Not every table of precedence relations has precedence functions, but in practice for most grammars such functions can be designed.
Read more about this topic: Operator-precedence Grammar
Famous quotes containing the words precedence and/or functions:
“It is difficult to separate the tapestry
From the room or loom which takes precedence over it.”
—John Ashbery (b. 1927)
“Those things which now most engage the attention of men, as politics and the daily routine, are, it is true, vital functions of human society, but should be unconsciously performed, like the corresponding functions of the physical body.”
—Henry David Thoreau (18171862)