Guest User

Untitled

a guest
Oct 27th, 2012
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
BNF 0.99 KB | None | 0 0
  1. program = empty list | proper list.
  2. empty list = {white space}.
  3. proper list = datum, [";", proper list].
  4. datum = form | expression.
  5. form = operator, (form | expressions)
  6.      | (form | expressions), operator, [(form | expressions)].
  7. operator = identifier.
  8. identifier = <any unicode non-digit, non-separator character>
  9.              {<any unicode non-separator character>}.
  10. expressions = (expression | block), [expressions].
  11. block = "(", proper list ")".
  12. expression = variable | literal | compound expression.
  13. variable = identifier.
  14. literal = atom | number | string.
  15. atom = "#" (identifier | string).
  16. number = [sign] digits ["." digits].
  17. digits = digit {digit}.
  18. digit = "0" | ... | "9".
  19. compound expression = list | vector | function call | method call.
  20. list = "{", (empty list | (proper list, [".", datum])), "}".
  21. vector = "#{", (empty list | proper list), "}".
  22. function call = expression, "[", (empty list | proper list), "]".
  23. method call = expression, atom, "[", (empty list | proper list), "]".
Advertisement
Add Comment
Please, Sign In to add comment