Showing posts with label parser. Show all posts
Showing posts with label parser. Show all posts

2009-07-14

Parsing numbers in LL(1) grammar.

Grammar for numbers:
NUMS --> NUM NUMS NUMS --> NUM --> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
This grammar is belongs in LL(1) grammar type.

Parser for this grammar done in parse.py: