









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Syntax Analyzer
Parsers
Context-Free Grammars (^) Context-free grammar is a quadruple (T, NT, P, S) (^) T - a finite set of terminals (in our case, this will be the set of tokens) (^) NT - a finite set of non-terminals (syntactic-variables) (^) P - a finite set of productions rules (specifies the manner in which the terminals and non-terminals are combined to form strings) in the following form (^) A -> α where A is a non-terminal and α is a string of terminals and non-terminals (including the empty string) (^) S - a start symbol (one of the non-terminal symbol)
Derivation Example
Parse Tree