Python Earley Parser /

Filename Size Date modified Message
0 B
179 B
33.7 KB
1.5 KB
149 B

How does the parser the parser run

  1. goto python-earley_parser

2) run with make flat for a flat output 2bis) run with make dot for a graphical output


Q: How to change the grammar ? A: Currently there is no easy way to change the grammar, check out file to see current grammar.

Q: How does it works ? A: the parser works in two step :

1) build earley super set, after the sentence given in input, see parser@earley_parser

  1. complete, scan or do prediction on any generated item from ess.items list

b) when you finished a) a.k.a you can't add any items, clean up the mess, some items are usefull for the first step but won't be of any interrest for the second step.

2) build parse trees based on cool item from ess.items, this step occurs, by now, in and 3) add semantic rules based on the parsed trees, be carful earley parser don't solve ambiguity, so you might end up with several trees !

Q: How complex is the earley parser ? A: Based on Earley's paper it's a $n^3$ algorithm...

Q: Which grammar can earley parser process ? A: Every grammar ever ! At least that's what I understood.

Q: Where can I find out more about the earley algorithm ? A: check out mendley's output @

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.