User loginNavigation |
An "adaptive" LALR(1) parser I've been toying withHello LtUers, I've been toying with this little project during my daily commute (only today learning that it's an area that's been explored off and on since the 60s under the name "adaptive parsers" -- I'll have to update the readme): https://github.com/kthielen/ww Some things that I think are interesting about this experiment are: * lexing/parsing are handled by the same underlying LALR(1) parser-generator algorithm The basic idea here is that you feed this thing some basic axioms (your primitive functions, which can be used in subsequent lexer/parser reductions), then you can feed it input to parse and/or extend the syntax of what can be parsed. I have been thinking about using this to allow syntax extension in modules supported by a compiler I've been working on. A simple (working) example from the project page:
FWIW, I'm not working in an academic setting, just your average compiler project in a large non-technology company. I'm curious to know if others have thoughts/warnings about this approach, or maybe interesting recent research/discussions I should read (I did turn up this old thread from several years back). By Kalani at 2013-10-09 19:35 | LtU Forum | previous forum topic | next forum topic | other blogs | 3965 reads
|
Browse archives
Active forum topics |
Recent comments
4 weeks 4 days ago
44 weeks 5 days ago
44 weeks 5 days ago
44 weeks 5 days ago
1 year 14 weeks ago
1 year 19 weeks ago
1 year 20 weeks ago
1 year 20 weeks ago
1 year 23 weeks ago
1 year 28 weeks ago