This series of commits adds LAC support for Java.  I still need to
write some documentation about it, but it should be a good starting
point for Adela to port this into D.

Of course much of the credit should go to Adrian Vogelsgesang, since I
copied his implementation in C++.  And, well, to Joel E. Denny, for
inventing LAC in the first place.

There's one thing I don't understand well in the Java parser, opiniond
would be most welcome!

I used Vector because I don't like having to deal with low-level
components.  Yet YYStack implements the stacks by hand, on top of
arrays.  Why?  Should we never use Vector?  Or always?

Cheers!

Akim Demaille (4):
  style: comment changes in the skeletons
  style: java: more style fixes
  java: add support for lookahead correction
  java: lac: check it

 README-hacking.md               |   8 +-
 data/skeletons/lalr1.cc         |  12 +-
 data/skeletons/lalr1.java       | 372 ++++++++++++++++++++++++--------
 examples/c/bistromathic/parse.y |   6 +-
 examples/java/calc/Calc.y       |   8 +-
 tests/calc.at                   |  28 ++-
 tests/java.at                   |  40 ++--
 tests/local.at                  |  15 +-
 8 files changed, 347 insertions(+), 142 deletions(-)

-- 
2.28.0


  • [PATCH 0... Akim Demaille
    • [PA... Akim Demaille
    • [PA... Akim Demaille
    • [PA... Akim Demaille
    • [PA... Akim Demaille
      • ... Adrian Vogelsgesang via Bug fixes and other improvements to Bison
        • ... Akim Demaille
          • ... Akim Demaille
            • ... Adrian Vogelsgesang via Bug fixes and other improvements to Bison
      • ... Akim Demaille

Reply via email to