7b3c94c469
Move things into more modules
...
It will help with testing and profiling
It breaks pyright (it's probably time to abandon pyright)
2024-06-10 05:50:09 -07:00
3c8ab86a90
Type things in the table so we can do exhaustive action matches
2024-06-08 17:30:39 -07:00
bd70315935
Improve performance by not de-duping before closing
...
You close *after* you've determined that a successor is new, not
before.
2024-06-06 05:31:15 -07:00
8c3b1b784c
Performance
2024-06-05 09:55:12 -07:00
e57a827e5c
Better formatting, dump full graph, disallow conflicts
2024-06-02 08:09:47 -07:00
03937e62e6
Allow the generator to be a little more declarative
2024-06-01 05:57:16 -07:00
e203e27407
Allow the grammar to specify a preference for a generator
...
Overridable, like start production
2024-06-01 05:42:40 -07:00
275d8afe26
Raise special errors on ambiguities
...
Maybe people want to see them
2024-05-31 08:31:30 -07:00
a7b4a3ce8b
Grammars have implicit start symbols
2024-05-31 06:29:57 -07:00
561dcd87ff
Allow nonterminals to be renamed
2024-05-30 19:15:20 -07:00
56d24c5fb9
Chaos: split tables, interactions, Terminal
...
- Tables are split into `actions` and `goto` now to make formatting
nicer
- Token is renamed Terminal
- Likes are now Florps
- Lexer now loaded dynamically (badly)
2024-05-30 08:02:47 -07:00
45a9303a27
Transparent rules
...
Better parsing/action types
Good grief
2024-05-29 09:07:19 -07:00
7c4705714e
Faster still.
...
Also somehow I was not merging things correctly for LALR; this merges
more completely and winds up with 215 states for the fine grammar,
which is like half of what it used to be?
2024-05-28 08:07:11 -07:00
28634677bf
A little more faster.
2024-05-28 05:56:44 -07:00
bde22a5c99
A little faster but I think I might be doing this wrong.
2024-05-28 04:58:23 -07:00
8d58c64040
Fix LALR. Small, but very very slow.
2024-05-27 22:31:33 -07:00
0fc04cf11e
Fix grammar bugs, work on debugging harness.
2024-05-27 19:02:10 -07:00
797ec8cd76
Correct type annotations for pyright
...
Work around microsoft/pyright#8008 .
2024-05-27 06:50:15 -07:00
7c1d9b5f2b
A cleaner API
...
I've been hacking on this in a different repository, so I thought I'd
bring it over here.
2024-05-05 08:45:45 -07:00
3218367c65
Fix some lints
2018-03-21 20:13:45 -07:00
1ee06dde59
LALR parsers
...
I'm starting to get worried about quadratic behavior though.
2016-12-13 16:14:14 -08:00
9fe44d30e0
Canonical LR1.
...
Also:
- Reorganize the file into sections so I can keep track of where I am,
and so it reads more cleanly from top to bottom.
- A little more work on documentation and comments and the like.
2016-12-13 16:14:14 -08:00
c4be7bcd9f
Handle mutual recursion in gen_follow
...
Also an example of a case where SLR1 fails, to lead into LR1
generation.
2016-12-13 16:14:14 -08:00
a2e8a784c2
Fiddle with message.
2016-12-13 16:14:14 -08:00
86bd8fffc8
SLR1 parsing.
2016-12-13 16:14:14 -08:00
8d0726b3a4
Ok, one more bit of documentation.
2016-12-13 16:14:14 -08:00
95b01a627d
Docs
...
(And a small bug fix.)
2016-12-13 16:14:14 -08:00
cf10891c19
Make it so Configuration() is constructed fewer places
...
This will make it so that I can add fields to Configuration to support
additional parser generators without breaking any individual
generator.
2016-12-13 16:14:14 -08:00
169ec4ff08
First and follow.
2016-12-13 16:14:14 -08:00
5a0b1654a9
Conflicting examples.
2016-12-13 16:14:14 -08:00
9781765043
More docs, more stuff.
2016-12-13 16:14:14 -08:00
c1ecf8e260
Detect conflicts in the table generation.
2016-12-13 16:14:14 -08:00
edd5ee3d55
Comments and clean-up.
2016-12-13 16:14:14 -08:00
34560342ff
Initial commit; enough code now I want a record.
2016-12-13 16:14:14 -08:00