CS 342 Lecture -*- Outline -*-
* Other notations for context free grammars
emphaisze design advantages/disadvantages over BNF
** Two-dimensional extensions to BNF
::= { R1 } (2 dimensional curly brackets)
{ R2 }
same as ::= R1 | R2
::= [ R1 ] (2 dimensional square brackets)
[ R2 ]
same as ::= R1 | R2 | \epsilon
Example:
::= ' { } '
{ }
::= a|b|c|d|...|z
::= \ { ' }
{ <7 digit binary> }
<7 digit binary> ::=
::= [ 0 ]
[ 1 ]
** Syntax graphs
rectangular boxes for nonterminals
ovals (or circles) for terminals
*show example
> advantages over BNF?