Operator-precedence Grammar - Precedence Functions

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:

    Let not England forget her precedence of teaching nations how to live.
    John Milton (1608–1674)

    The mind is a finer body, and resumes its functions of feeding, digesting, absorbing, excluding, and generating, in a new and ethereal element. Here, in the brain, is all the process of alimentation repeated, in the acquiring, comparing, digesting, and assimilating of experience. Here again is the mystery of generation repeated.
    Ralph Waldo Emerson (1803–1882)