Skip to main content
Version: 2021_2

Gramática de compilisp

A lo largo de las siguientes secciones se utilizará la siguiente gramática de lisp, expresada como EBNF

input→{line}input \rightarrow \{ line \}
line→[sExp] \nline \rightarrow [sExp] \text{ \n}
sExp→atom∣listsExp \rightarrow atom | list
atom→number∣symbol∣stringatom \rightarrow \text{number} | \text{symbol} | \text{string}
list→( )∣ ( {sExp} ) ∣ ( {sExp} . sExp ) ∣ ’ sExplist \rightarrow \text{( )} | \text{ ( } \{sExp\} \text{ ) } | \text{ ( } \{sExp\} \text{ . } sExp \text{ ) } | \text{ ' } sExp