operator_precedence_parsing

C89 expressions parsed with the shunting yard algorithm in Python (by bourguet)

Operator_precedence_parsing Alternatives

Similar projects and alternatives to operator_precedence_parsing

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

operator_precedence_parsing reviews and mentions

Posts with mentions or reviews of operator_precedence_parsing. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-07.
  • What are the advantages of pratt parsing over recursive descent parsing?
    2 projects | /r/ProgrammingLanguages | 7 Dec 2022
    Pratt parsing can be considered as a refactoring of the expression part of a recursive descent parser where you have extracted the precedence and associativity into tables (that's not how it has been designed, but I've made the refactoring excercise in https://github.com/bourguet/operator_precedence_parsing where you can find a bunch of other expression parsers parsing the same language and written in a similar style for easier comparison)
  • What's the easiest way to add features to an existing programming language?
    1 project | /r/ProgrammingLanguages | 10 Nov 2022
    If you want a selection of expression parsing algorithms, I've a collection here showing how to parse C-like expressions with them.
  • Calculations with brackets
    1 project | /r/AskProgramming | 12 Aug 2022
    I've a GitHub repository with Python implementations of those showing how to parse C expressions (included the ?: operator) at https://github.com/bourguet/operator_precedence_parsing (it was started when I was wondering how Pratt related to the algorithms more often presented in the literature, my opinion is that you can consider it as a refactoring of a more classical RD parser, loosing some power but table driven and with a probable performance advantage).
  • Crafting Interpreter : parsePrecedence
    1 project | /r/Compilers | 22 Feb 2022
    You may be interested in https://github.com/bourguet/operator_precedence_parsing there is a series of files were I refactor a recursive descent parser into a Pratt one. The crucial step is IIRC between rd_to_pratt 3 and 4. The only difference in that step is in a single function.
  • How does Pratt Parsing work?
    3 projects | /r/ProgrammingLanguages | 10 Feb 2022
    I have some time ago written a comparison between several expression parsers: https://github.com/bourguet/operator_precedence_parsing my implementation of Pratt is pratt.py in that repository.
  • Better operator precedence
    1 project | /r/programming | 10 Oct 2021
    Sometimes ago, I've collected a set of expression parsing algorithms (shunting yard, Pratt, ...) to compare them and I included a small discussion of the way to implement the precedence function. I tend to like having two tables -- that's allow to represent distfix structures and to get left/right associativity without needing the full matrix -- see https://github.com/bourguet/operator_precedence_parsing.
  • Turing Award to Aho and Ullman for work on compilers
    1 project | /r/programming | 3 Apr 2021
  • Modifying the Shunting-yard algorithm for logical, string-based & mathematical operations all-in-one?
    1 project | /r/ProgrammingLanguages | 17 Feb 2021
    A few years ago, I wrote several expression parsers in Python (shunting yard, expression precedence, Pratt) aiming to compare them and to provide implementations of algorithms as described in historical papers. It's on GitHub https://github.com/bourguet/operator_precedence_parsing. That may be interesting for you.
  • A note from our sponsor - SaaSHub
    www.saashub.com | 2 May 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic operator_precedence_parsing repo stats
8
54
0.0
about 2 years ago

bourguet/operator_precedence_parsing is an open source project licensed under BSD 2-clause "Simplified" License which is an OSI approved license.

The primary programming language of operator_precedence_parsing is Python.


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