Flashcards
Grammars - Grammars in Compilers
Cards in this deck (10)
- 1What is used to process context free grammars?Parsers
- 2What do parsers do?Describe how the lexemes fit together into sentences which defines the syntax of the language.
- 3What is used to process regular grammars?Scanners
- 4What does the scanner do?Performs lexical analysis to decide what the tokens are, and then passes them to the parser.
- 5How are lexemes in a language described?Using regular expressions
- 6Describe aspects of the regular expression syntax-Ranges [0-9]
- 0 or more *
- 1 or more +
- 0 or 1 ?
-Repetition {number} - 7What was BNF developed to describe?ALGOL 60
- 8What is BNF?Series of recursive rules.
- 9What does a BNF rule consist of?- Non terminal on left in <>
- := meaning replace with
- or terminals on the rigt
-Choices using | - 10What new syntax does EBNF add to BNF?- Commas for concatenation
- Square brackets for optional
-Curly brackets for 0 or more
- * for particular number of repitions
- ; to terminate rule
Information
- Description
- University Languages and Compilers Flashcards on Grammars - Grammars in Compilers, created by lucy copp on 04/01/2018.
- Created by
- lucy copp
- Views
- 1
- Rating