A topic of study in most courses on compilers and compiler design and compiler theory. Operator-precedence parsing involves reading the source file, extracting the tokens from the file, and storing them in memory while reducing various token patterns to match up with the rules for the grammar productions for the language you are compiling. Operator-precedence parsing is best used with reducing expressions in Pascal. One such example of Pascal grammar has thirteen different productions for an expression. The tokens in this example are stored on a stack, and as the tokens match up with the grammar productions, the tokens are popped off the stack, and a symbol representing an expression is pushed onto the stack. The goal in this example is to reduce a string of symbols to a single expression.

Log in or register to write something here or to contact authors.