![]() Terminal symbols can be strings or regular expressions. In the Python Lark library, non-terminal symbols are always lowercase. ![]() ![]() Non-terminal symbols can expand into non-terminals (including themselves) or terminals. In 61A, we are using the Python Lark library to write EBNF grammars, which has a few specific rules for grammar writing. EBNF is a dialect of BNF which contains some convenient shorthands.Īn EBNF grammar contains symbols and a set of recursive production rules. It was invented for describing the syntax of programming languages, and is still commonly used in documentation and language parsers. ![]() Guides BNFīackus-Naur Form (BNF) is a syntax for describing a context-free grammar. That chapter goes into more detail than strictly needed for our class,īut may be helpful for those of you who like to learn from textbook readings. BNF: Backus-Naur Form: Slides, RecordingīNF is not covered in the 61A textbook, but here's a chapter from a UCI textbook: EBNF: A Notation to Describe Syntax.Lectures, assignments, and handouts, as well asĪdditional practice problems to assist you in learning the concepts.įor solutions to these assignments once they have been released, find the links in the front page calendar.
0 Comments
Leave a Reply. |