TameParse

LALR parser with context-sensitive extensions (by Logicalshift)

TameParse Alternatives

Similar projects and alternatives to TameParse

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better TameParse alternative or higher similarity.

TameParse reviews and mentions

Posts with mentions or reviews of TameParse. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-17.
  • We Need to Know LR and Recursive Descent Parsing Techniques
    7 projects | news.ycombinator.com | 17 Jan 2023
    I wrote a parser generator quite a long time ago that I think improves the syntax quite a lot, and which has an interesting approach to generalisation: you can write conditions on the lookahead (which are just grammars that need to be matched in order to pick a given rule when a conflict needs to be resolved). This construct makes it much easier to write a grammar that matches how a language is designed.

    Here's an ANSI-C parser, for example: https://github.com/Logicalshift/TameParse/blob/master/Exampl... - this is an interesting example because `(foo)(bar)` is fully ambiguous in ANSI C: it can be a cast or a function call depending on if `foo` is a type or a variable.

    The new construct makes it possible to extend grammars and disambiguate them - here's a C99 grammar that extends the ANSI-C grammar: https://github.com/Logicalshift/TameParse/blob/master/Exampl....

    It also allows matching at least some context-sensitive languages - see https://github.com/Logicalshift/TameParse/blob/master/Exampl...

    An advantage over GLR or backtracking approaches is that this still detects ambiguities in the language so it's much easier to write a grammar that doesn't end up running in exponential time or space, plus when an ambiguity is resolved by the generalisation, which version is specified by the grammar and is not arbitrary (backtracking) or left until later (GLR).

    I was working on improving error handling when I stopped work on this, but my approach here was not working out.

    (This is a long-abandoned project of mine but the approach to ambiguities and the syntax seem like they're novel to me and were definitely an improvement over anything else I found at the time. The lexer language has a few neat features in it too)

Stats

Basic TameParse repo stats
1
21
0.0
about 1 year ago

Logicalshift/TameParse is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of TameParse is C++.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com