You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Tom 0e1165f9ee Added Productions to README.md 6 years ago
lab added grammar class ; added first set 6 years ago
src fixed typo 6 years ago
.gitignore init 6 years ago
README.md Added Productions to README.md 6 years ago

README.md

Grammar Syntax

Example

$FOO -> /foo  
$FOO -> /foo$FOO  
$FOO -> $BAR  
$BAR -> /bar  
$BAR -> $BAR  

Nonterminals

A Nonterminal starts with a leading $. The nonterminal FOO would be written as:

$FOO

Terminals

A Terminal starts with a leading /. The terminal bar would be written as:

/bar

Note that /ab differs from /a/b. The string /ab resolves to the terminal ab, whereas /a/b resolves to the terminals a and b

Empty String

/~ resolves to the Empty String

Productions

The -> indicates a production, the Nonterminal on it's left side gets replaced by the string of Nonterminals and Terminals on it's right side.

$FOO -> /foo$FOO