More context-free grammars
10/11/19
More context-free grammars 10/11/19 Administrivia HW 4 (proving - - PowerPoint PPT Presentation
More context-free grammars 10/11/19 Administrivia HW 4 (proving languages are non-regular) due tonight at 4:30 Midterm out tonight No class on Monday Multi-day take home Open book, notes, and course webpage; closed everything
10/11/19
when the program is run
language
the central data structures of almost every compiler
parse tree
<exp> ::= <exp> - <exp> | <exp> * <exp> | <exp> = <exp> | <exp> < <exp> | (<exp>) | a | b | c
whether a–b*c means (a-b)×c or a-(b×c)
unambiguous
each program, one that agrees with the intended semantics
complicated
<exp> ::= <ltexp> = <exp> | <ltexp> <ltexp> ::= <ltexp> < <subexp> | <subexp> <subexp> ::= <subexp> - <mulexp> | <mulexp> <mulexp> ::= <mulexp> * <rootexp> | <rootexp> <rootexp> ::= (<exp>) | a | b | c
computer programs
from the grammar by a parser-generator