Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timothygu/ll1_solver
LL(1) parser solver
https://github.com/timothygu/ll1_solver
Last synced: 4 days ago
JSON representation
LL(1) parser solver
- Host: GitHub
- URL: https://github.com/timothygu/ll1_solver
- Owner: TimothyGu
- Created: 2019-10-22T21:29:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T21:38:02.000Z (about 5 years ago)
- Last Synced: 2024-12-12T06:05:16.317Z (13 days ago)
- Language: OCaml
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
LL(1) solver
============This program creates an LL(1) parse table given a context-free grammar. Given
the following BNF grammar in standard input:```
A :== yCz
B :== ε | zyA
C :== yBCC | ε | wz
```It prints out
```
nullable map:
A -> false
B -> true
C -> true
first set map:
A -> [y]
B -> [z]
C -> [wy]
follow set map:
A -> [$wyz]
B -> [wyz]
C -> [wyz]
table:
(A,y) -> [yCz]
(B,w) -> [ε]
(B,y) -> [ε]
(B,z) -> [ε, zyA]
(C,w) -> [ε, wz]
(C,y) -> [ε, yBCC]
(C,z) -> [ε]
```The input format specifically follows that given by
http://ll1academy.cs.ucla.edu/.License
-------`main.ml` and `solver.ml` are licensed under the MIT license. However,
`nsplit.ml` was taken from [Batteries
Included](http://batteries.forge.ocamlcore.org/) and thus licensed under GNU
LGPL 2.1 or above.