AST : abstract syntax tree
(1a) an opening parenthesis, followed by
(1b) zero or more list elements, followed by
(1c) a closing parenthesis
where a list element is either
(2) a nanoL list (expression), or
(3) an alphanumeric "atom" (i.e., an identifier starting with a
letter)
nanoL ignores whitespace around its tokens (parentheses and
atoms).
1. Using the algebraic data type defined above
(NanoElement, NanoList, and NanoAtom), construct a specific AST
instance for the nanoL expression
( ( hello world ) ( what up ) )
AST : abstract syntax tree (1a) an opening parenthesis, followed by (1b) zero or more list elements, followed by (1c) a
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am