morganstanley / hobbes

A language and an embedded JIT compiler

Home Page:http://hobbes.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hexpr.parse.H appears twice in the codebase, and the wrong one is used

adam-antonik opened this issue · comments

lib/hobbes/read/pgen/pgen.sh generates lib/hobbes/read/pgen/hexpr.parse.H, but hexpr.y includes include/hobbes/read/pgen/hexpr.parse.H instead (which lags behind the lib/ version in terms of git commit). Should pgen.sh not move the header to the include directory and the copy version in lib/ be deleted?

Stupid oversight, made the fix here: #327

I think that the parser could use some renovation -- it started off as this flex/bison parser, but eventually syntax was added to hobbes to natively support definition of LALR parsers. If we just "crossed the streams" then we could reuse the same parser generator code we already use there, and also support a kind of modular syntax. This is somewhat controversial, not everyone believes that modular syntax is a good idea.

Several years back, I made a prototype in this project (https://github.com/kthielen/ww -- ignore the Walt Whitman stuff, it's an inside joke). I think that it could be useful to reboot the parser this way, but it's probably best to develop consensus first.

I'll close this issue once the fix PR is merged.

Fix merged