simpleparse.examples.lisp | index /home/mcfletch/pylive/simpleparse/examples/lisp.py |
Basic LISP parser
We use library items, so we get " strings, float, int, and hex
atoms, as well as lists. Note: Lisp doesn't seem to
use "," for seperating atoms in lists? I don't really
remember it well enough to recall, but seems to match the
samples I see.
Note: Original grammar was from a sample in the YAPPS
documentation. Though it's kinda hard to recognise here.
Modules | ||||||
|
Data | ||
definition = '\n### A simple LISP parser\n\n<ts> := [ \\t\\n...q?, ")"!\n>seq< := ts, atom, (ts,atom)*, ts\n' parser = <simpleparse.parser.Parser instance> |