- Use functional F# style for writing your
programs. - Make sure that you do not use mutable variables &
loops. - Any imperative style programming is prohibited unless
specified in the problem description.
In this project you write a recursive descent parser for a
specific grammar.
- Find your grammar definition in grammars.md file which
corresponds to your ID. - Make appropriate changes to your grammar to convert it to the
LL(1) form if necessary- No left recursion
- Pairwise disjoint productions
- Write a recursive descent parser for your grammar. Your parser
should output for every test sentence:- A test sentence itself
- A list the grammar rules required to parse a correct
sentence. - See a parsing example in rd-parser.ipynb script.
- Use provided sentences from grammars.md file to test
correctness of your parser.
You recursive-descent parser must output list of grammar rules
required to parse a valid sentence of produced by your grammar.
Several sentences are provided to you. If case of the error in
parser input, i.e. invalid sentence, your parser need to output
error and terminate execution.
Solution
Place your LL grammar in the following
cell:
place your LL grammar here
Place your recursive descent parser in the
following cell:
In [ ]:
In [ ]:
0 comments