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.

38 lines
737 B

6 years ago
6 years ago
  1. ## Grammar Syntax
  2. ### Example
  3. $FOO -> /foo
  4. $FOO -> /foo$FOO
  5. $FOO -> $BAR
  6. $BAR -> /bar
  7. $BAR -> $BAR
  8. ### Nonterminals
  9. A Nonterminal starts with a leading `$`. The nonterminal `FOO` would be written as:
  10. $FOO
  11. ### Terminals
  12. A Terminal starts with a leading `/`. The terminal `bar` would be written as:
  13. /bar
  14. Note that `/ab` differs from `/a/b`. The string `/ab` resolves to the terminal `ab`,
  15. whereas `/a/b` resolves to the terminals `a` and `b`
  16. #### Empty String
  17. `/~` resolves to the *Empty String*
  18. ### Productions
  19. The `->` indicates a production, the *Nonterminal* on it's left side gets replaced
  20. by the string of *Nonterminals* and *Terminals* on it's right side.
  21. $FOO -> /foo$FOO