d7a6891519
Finish annotating test grammar, forced breaks, fixes
...
Forced breaks force a newline in a spot, which is sometimes what we
want. (Like, this syntax should *never* be on a single line.)
2024-09-13 11:57:16 -07:00
938f0e5c69
Support newline replacements
...
This allows us to do maybe more complicated spacing.
Still unclear about identifier/punctuation spacing.
2024-09-12 11:09:14 -07:00
b3b2102864
Record trivia in tokens
...
This will make our formatting better I think.
2024-09-12 06:22:49 -07:00
8a80bcad64
Fix broken test
...
(Update snapshot to be correct.)
2024-09-11 11:28:53 -07:00
276449287d
Allow for text to follow tokens in pretty-printing
...
It's weird that it counts against the line length though, like if you
were going to break you could ignore it right? At least, for the
grammar I'm working here....
2024-09-11 11:22:41 -07:00
d6dd54f4df
Actual pretty-printing!
...
Now we're cooking with gas ALTHOUGH now we have to deal with the fact
that we're gluing everything together where there *should* be spaces.
Many more improvements to come.
2024-09-11 11:08:02 -07:00
5d88b459b9
Spiffy up the json parser with pretty-printing marks
2024-09-10 12:06:29 -07:00
667273369e
A test for the printer, to get started
2024-09-10 11:57:10 -07:00
4941cd049c
Helper routines for generating source code
...
This includes "signing" source to detect modifications, and
maintaining user-modified sections. Hooray!
2024-09-06 11:50:17 -07:00
f8b62bf4a4
Terminal 'value' is 'name', compile_lexer is method
2024-08-29 08:22:23 -07:00
dc03bf7373
Grammars can be named
2024-08-29 08:00:40 -07:00
2473ae713d
Trivia tests
2024-08-24 15:09:08 -07:00
f29ec5072f
Augment number pattern, tests
...
More robust testing. Error messages would be nice but.
2024-08-24 09:38:21 -07:00
0c952e4905
Correct NFA construction
...
There was a bug in the way that I was converting regular expressions
to NFAs. I'm still not entirely sure what was going on, but I
re-visited the construction and made it follow the literature more
closely and it fixed the problem.
2024-08-24 09:24:29 -07:00
c0b623bd6d
Remove unused imports
2024-08-24 08:36:20 -07:00
72052645d6
Generated lexers actually kinda work
...
But regular expressions are underpowered and verbose
2024-08-23 15:32:35 -07:00
58c3004702
Move terminals into grammar definition
...
Starting to work on machine-generated lexers too
2024-08-23 07:24:30 -07:00
f6bc2ccea8
Move the examples into tests
2024-06-15 12:23:36 -07:00
e04aa1966e
Start moving the examples into tests
2024-06-15 07:52:16 -07:00
c82f53c346
Document the decision
2024-06-15 06:18:04 -07:00
fb2dff51df
Tests. Well, test.
2024-06-15 06:14:37 -07:00