HNNewShowAskJobs
Built with Tanstack Start
Antlr-Ng Parser Generator(antlr-ng.org)
28 points by djoldman 4 days ago | 8 comments
  • ____tom____2 hours ago

    What is this project's relationship with antlr? I see a different name on the copyright and the github page suggests this is not a part of the antler project, while claiming to be the next generation.

    If that's the case, I think it's misleading. It's fine to fork a project, but you don't get to call yourself the next generation of someone else's project.

  • Eridrus3 hours ago

    Has performance of ANTLR generated code gotten better? I'm sure some of this was bad grammars, but I wasn't thrilled with what I got out of ANTLR ~15 years ago

  • Philpax4 hours ago

    Is antlr particularly popular these days? I was under the impression that most production parsers are some kind of handwritten recursive descent parsers, primarily because they're better at providing diagnostics and can sometimes be easier to maintain.

    • vbezhenar3 hours ago |parent

      I've used antlr to generate parser for small language used in one project. It's like 100 declarative lines of code. Writing parser by hand would be a much more complicated task.

      I didn't really care about diagnostics. It has some, that's enough.

      And of course it's easier to maintain declarative grammar description.

      My guess is, that it's often used for those kinds of simple grammars without high requirements to impementation. When you need to get things done. Like regex. You might write code to parse a string in a more efficient way, but with regex it's almost always easier. So ANTLR is like regex engine for more complicated inputs.

    • another_twist4 hours ago |parent

      Quite right. But antlr is better for query parsing. They also have error listeners so error handling can be added.

  • macote4 hours ago

    I used ANTLR to create a grammar file for MK (Manufacturing Knowledge). I plugged the JavaScript parser and lexer into Ace editor. Good memories.

  • another_twist4 hours ago

    Why -ng ? I thought it had something to do with angular.

    • almostgotcaught4 hours ago |parent

      It just means next gen