Erez Sh
601f050645
Added docs for ParserPuppet
4 years ago
Erez Sh
cc1092bd53
Refactored puppet + small fixes
4 years ago
Erez Sh
66a073d0aa
Added support for error handling, using a puppet parser.
TODO: Add docs
4 years ago
Erez Sh
4463524b3a
Puppet initial
4 years ago
Erez Sh
e12e1ccbf9
Minor refactor
4 years ago
Erez Sh
3bee21051e
Reverted changes regarding EOF
4 years ago
Erez Sh
c56112eea3
Added debug prints for parser error (in debug mode)
5 years ago
Erez Sh
dcc98241c1
Improved handling and performance of large grammars
5 years ago
Erez Sh
3a04f49860
Fixed 'end_pos' for xearley, 2nd try (issue #534 )
5 years ago
Erez Sh
a84788087b
Fixed 'end_pos' for xearley (issue #534 )
5 years ago
Erez Sh
3995ad913a
Tiny tiny cleanup
5 years ago
Erez Sh
cf7479f186
Post-merge fixed for end_symbol, + two more tests (Issue #237 )
5 years ago
Erez Sh
fcdba441b4
Better error message for reduce/reduce conflict (Issue #135 )
5 years ago
Erez Sh
b2f1b3bf7c
Small fixes
5 years ago
Erez Sh
b9c81a5450
Refactor: Simplify code by assuming rule.options is never None
5 years ago
Erez Sh
99a27663f6
Better error message
5 years ago
Erez Sh
0a4530b942
Improved Earley error on EOF (Issue #457 )
5 years ago
Erez Sh
94da6c52b8
Refactored the Earley code to make it thread-safe (Issue #454 )
5 years ago
Erez Shinan
deb325acb4
Pydot now not necessary for earley debug, shows warning instead (Issue #443 )
5 years ago
night199uk
dc3c009dca
Tweak the Earley ambiguity algorithm to correctly prefer earlier branches
5 years ago
night199uk
d845aa3bf1
Add debug flag to Early and XEarley to allow dumping the SPPF
5 years ago
Erez Shinan
8466981c08
Cleanup
5 years ago
Raekye
0c59cba3f5
implement DeRemer and Pennello's lookahead algorithm for LALR(1)
5 years ago
Raekye
6f412c25b7
LALR optimizations and profiling
5 years ago
Raekye
21c41e54a9
lalr parser
5 years ago
Erez Shinan
8e9da6a6d6
Minor optimization in LALR (and fix for last commit)
5 years ago
Erez Shinan
39b0d76914
Minor optimization in LALR (thanks to @Raekye )
5 years ago
Erez Shinan
c87cbc6322
Removed some dead code
5 years ago
Erez Shinan
aa75d50bd5
End symbol working for lalr + fixed validation for undefined %ignore
5 years ago
Erez Shinan
bcc4e67bce
CYK also working
5 years ago
Erez Shinan
71fe87964a
Small refactor in grammar analysis
5 years ago
Erez Shinan
f1e844accd
Mid work. Not promising
5 years ago
Paul Vinciguerra
28e571f1c6
Fix DeprecationWarning in lalr_analysis.py
Under python 3.3+, logging.warn is deprecated.
Use logging.warning instead.
Fixes: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lark/parsers/lalr_analysis.py:87: DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead
6 years ago
Erez Shinan
a798dec779
Fix to new serializer code (Discussed in issue #349 )
6 years ago
Erez Shinan
3c64c56bcd
All tests passing
6 years ago
Erez Shinan
94e15fb6f7
Mid work. Almost stable
6 years ago
Erez Shinan
e52cc46fc5
Minor cleanup
6 years ago
Erez Shinan
d13ebb9c15
Using a mostly-generic serialization method
6 years ago
Erez Shinan
066303fdab
Serialized lark is now json compatible
6 years ago
Erez Shinan
335206911d
Basic serialize/deserialize working!
6 years ago
Erez Shinan
4b915a9f78
Style improvements to errors
6 years ago
Erez Shinan
120d5b9ffa
Mid work
6 years ago
Erez Shinan
bd75bf2dff
Refactor - callbacks are now {rule: callback}, instead of a Callback object referenced by Rule.alias
6 years ago
Erez Shinan
934a997f83
Clean up
6 years ago
Erez Shinan
862a853340
More cleanup of Earley duplication
6 years ago
Erez Sh
4de71293e5
More cleanup
6 years ago
Erez Sh
57a602758d
Merged part of Earley & XEarley implementation. Major reduction
6 years ago
Erez Shinan
65d3212bed
Temporarily disable leo transitives
6 years ago
Erez Shinan
00510edee6
Added a nicer error for duplicate rules
6 years ago
night199uk
80a09697fe
Rebuild the way Earley prioritizes ambiguities
- Makes rule ordering the default ambiguity tie breaker.
E.g.
start: a | b
a: "A"
b: "A"
will return:
start
a
start: b | a
a: "A"
b: "A"
will return
start
b
- Replaces the ambiguity='resolve__antiscore_sum' with a separate option: 'priority'.
The priority option has 4 values: 'auto', 'none', 'normal', 'invert'.
'Auto' maps to 'Normal' for CYK and Earley and 'None' for LALR.
'None' filters your priorities and ignores them. This saves some extra tree walking on Earley.
'Normal' uses your priorities untouched, mimicing the old behaviour.
'Invert' negates your priorities, emulating the old 'resolve__antiscore_sum' behaviour.
This allows you to use priority logic even when ambiguity=='explicit', to get a better idea
of the shape of your tree; and to easily disable priorities without removing them from the
grammar for testing (or performance).
- ambiguity='explicit' now correctly returns an ambiguous tree again, as 0.6 did.
6 years ago