To parse a list of items of indefinite length, you write a
recursive rule, one that is defined in terms of
itself. For example, this parses a possibly empty list of numbers:
numberlist: /* empty */
| numberlist NUMBER
;
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.