diff options
Diffstat (limited to 'tests/examplefiles/bnf_example1.bnf')
-rw-r--r-- | tests/examplefiles/bnf_example1.bnf | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/examplefiles/bnf_example1.bnf b/tests/examplefiles/bnf_example1.bnf new file mode 100644 index 00000000..fe041a6e --- /dev/null +++ b/tests/examplefiles/bnf_example1.bnf @@ -0,0 +1,15 @@ +; This examples from WikiPedia <https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form>. + + <postal-address> ::= <name-part> <street-address> <zip-part> + + <name-part> ::= <personal-part> <last-name> <opt-suffix-part> <EOL> + | <personal-part> <name-part> + + <personal-part> ::= <initial> "." | <first-name> + + <street-address> ::= <house-num> <street-name> <opt-apt-num> <EOL> + + <zip-part> ::= <town-name> "," <state-code> <ZIP-code> <EOL> + + <opt-suffix-part> ::= "Sr." | "Jr." | <roman-numeral> | "" + <opt-apt-num> ::= <apt-num> | "" |