alpha
22a126dd0b
8.1
...
FossilOrigin-Name: 5d014cbe85c713fbe1fccf2a053db4b4474c0eee5e909d7cfd7de58fcbb03f77
2 years ago
alpha
cf72deef8b
make a Visitable module
...
FossilOrigin-Name: 3ffc71c707c994c44a9f33025ed50ab91d2a7e60be6c639b6ed28798d82728a2
2 years ago
alpha
b651c84d9b
7
...
FossilOrigin-Name: ae1ca40694300eff97d7ee3961f0e8e0b1f61f275c8226872ac1b502c5343b07
2 years ago
alpha
dd97e96aca
run lox tests from the book's repo, inspired by @hparker
...
FossilOrigin-Name: f477507f650934b9117cce181e4cdc50dda31c1126651319132feb7c768a1a93
2 years ago
alpha
18be1863dd
6
...
FossilOrigin-Name: 53d2e006949bbca6adb34110c64c3288c1077e2cb8ba71ef24803b81aedccb12
2 years ago
alpha
a2a685bc47
split out lox.rb into multiple files
...
FossilOrigin-Name: 9f8294ceb7aa3c4ad7ea96bafc90afceb8211dc8fabae66a4ace9560aa99eba4
2 years ago
alpha
3cd5ba6587
organize files into bin, lib, and test dirs
...
FossilOrigin-Name: a207bd9de54f2c13c832a51c766d663b04e2904e72c178756ebba72a0c15a289
2 years ago
alpha
2e4377b600
implement AstPrinter
...
FossilOrigin-Name: ed84fb6a6150359d3756c8636af19f487cb4da6fc2f21a6147b335751416a06f
2 years ago
alpha
3330fe5d62
fail tokenizing if there are errors
...
FossilOrigin-Name: 070ae9c41a27c56f13509c7a7ceffb7e0b16fe61b21248b8271c363e3c5b9abe
2 years ago
alpha
ccf9e0e19c
nicer formatting
...
FossilOrigin-Name: b01735adaf1a9640b7a1ade14effce83de8c90305df1c0f6077b71a6022d90d4
2 years ago
alpha
6b083fd884
use transform_values for `TOKENS`
...
FossilOrigin-Name: ecc9a6364a3e9096050cb7ada97436c9a03514ca50e2ca3d50e19f5ff70a8fd3
2 years ago
alpha
7559cd2b8e
simplify token scanning
...
Stole this idea from @tenderlove
FossilOrigin-Name: 3d144d88cb447e1f5d4c79c0a3185cd80fe879b3ab8d039d20bec255db7bbbb5
2 years ago
alpha
b4e4edfe8c
allow for single character identifiers
...
FossilOrigin-Name: 6f663cda900d2517ff10ddcf74b1e294e3f07cb415bf7d00157b36fe7c780b72
2 years ago
alpha
5033f48af8
include the Lox namespace in the tests
...
FossilOrigin-Name: b0ce55428125806e15bcb0299cdedd7436726ee392495c6fe85c2ca181cb0b67
2 years ago
alpha
bdba0d03ff
forgot to implement EOF
...
FossilOrigin-Name: 50d7151680c89f48391b656b1a7d91d5beb885126e9aff05c68a78f15ddf405d
2 years ago
alpha
a4163b0e49
support nested block comments
...
FossilOrigin-Name: 5ec3ea233b52addff0cdd9b20b001c919a32cbf21e5b468e67fdc31cc4480051
2 years ago
alpha
dcdd0981f5
block comments
...
FossilOrigin-Name: 458eec710cd910f7a578fe4d0e7b767dad921be34f796f3034ce730c6829e3db
2 years ago
alpha
f98866b04e
4.7
...
> The lexical grammars of Python and Haskell are not regular. What does that
> mean, and why aren’t they?
Regular languages can be parsed with an FSM, but Python and Haskell's grammars
more context than that to be determined.
> Aside from separating tokens—distinguishing `print foo` from
> `printfoo`—spaces aren’t used for much in most languages. However, in a
> couple of dark corners, a space does affect how code is parsed in
> CoffeeScript, Ruby, and the C preprocessor. Where and what effect does it
> have in each of those languages?
Spaces do matter for the closing of heredocs in Ruby...
> Our scanner here, like most, discards comments and whitespace since those
> aren’t needed by the parser. Why might you want to write a scanner that does
> not discard those? What would it be useful for?
Formatting or documentation generation?
FossilOrigin-Name: 5738a38b8f15d1aca61212966ff990de59a03502f183a7400bf4f2ea14ae5af6
2 years ago
alpha
6e484507d0
extract some classes, write some tests
...
FossilOrigin-Name: a0174386a70769c2c274f725ccb1a52a11ec925acdd6c63a1d13ceb8fd4fd9a8
2 years ago
alpha
506d3a444c
4.1
...
FossilOrigin-Name: 2de2242e574fa385cfc1867ee6daef0782e7b598adfb92af274f38d738a670ab
2 years ago