lexy
parser-demo
Our great sponsors
lexy | parser-demo | |
---|---|---|
19 | 13 | |
949 | 18 | |
- | - | |
7.5 | 0.0 | |
3 days ago | almost 3 years ago | |
C++ | Lex | |
Boost Software License 1.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lexy
-
Why are strings and IO so complicated?
lexy (https://lexy.foonathan.net/)
- Show HN: Matcheroni, a tiny C++20 header library for building lexers/parsers
-
Koji projekat na Githubu vas je odusevio u zadnje vreme?
https://github.com/foonathan/lexy nakon sto sam se propatio sa errorima od boost spirita, a pegtl mi se nije svidao, ovaj library je dosao kao odusevljenje, a i dokumentacija je iznenadujuce ok
- The Future of Boost by Vinnie Falco
-
Simple question on compilers and syntax rules
In general, LALR parser generators are more difficult to work with than RD parser combinators. Instead of flex and bison, I'd recommend checking out Boost.Spirit or lexy.
-
A simple library for compile-time string matching.
This might be closer: https://github.com/foonathan/lexy
-
Any good parser combinator libraries for C++?
Lexy: https://lexy.foonathan.net/
- Show HN: Lexy – C++ parser combinator library with custom DSL
-
How often do you use these keywords ?
lexy has something like std::bind with a way to specify fallback values for the placeholders if the arguments aren't provided: lexy::_1.or_default(fallback)
- Lexy: C++ Parsing DSL Library
parser-demo
-
Flex scanner memory leak help
I have a demo project that fixes a lot of the default insanities.
-
Advice for a first-time designer of my own original programming language? Presently writing the interpreter!
I have an old demo project that demonstrates most of that for flex/bison, but this is C/C++ oriented so might not be super applicable for you.
-
Should there be many hardcoded enums for terminals, non terminals, DFA, productions or a txt/csv file processing for compiler initialization? Is it bad to use global variables in the C code for compiler?
It's just unfortunate that flex and bison have bad defaults due to historical compatibility with lex and yacc. If you're using them I have a demo project that tweaks the defaults toward sanity, though I haven't updated it for recent warnings.
-
Doubt on building a tree using LEX and YACC
I made a demo project that ties them together. I'm pretty sure at least one of the fixes was due to header cycle problems, but I haven't touched it for a while. (note also that the demo was fully warning-clean at the time, but there may be new warnings since)
-
Simple question on compiler and syntax rules
I made a demo project that avoids several historical annoyances with Flex and Bison - in particular, I made it warnings-clean (though I haven't updated it recently), and I avoid global state.
-
Getting Lex + Yacc to recognize keywords
I have a demo project that enables all of the non-default options that you really should be using in all new projects. Note that the demo doesn't demonstrate meaningful grammars, just shows how to arrange the surrounding code and makefile.
-
Declaring yylex() and yyerror() in 2022
I have a demo project that twiddles most of the important knobs.
-
How to create an AST from bash in c?
Bash is a really complicated language. Redirections and such are simple; they are just tokenization, and any lexer/parser tutorial should get you there (I have a demo project using flex/bison).
-
what would you use to write a parser in 2021?
Bison can be configured to avoid every single one of those problems. I use reentrant versions (both with and without push parsing) in my demo project. I admit I didn't bother with named references or cleaning up after errors.
-
Practical parsing with Flex and Bison
a lot of the things that people hate about flex/bison is actually just their defaults for compatibility with lex/yacc, which can be changed. I have a demo project that does some of the things: https://github.com/o11c/parser-demo
What are some alternatives?
PEGTL - Parsing Expression Grammar Template Library
re2c - Lexer generator for C, C++, Go and Rust.
gadgetron - Gadgetron - Medical Image Reconstruction Framework
arcsecond - ✨Zero Dependency Parser Combinator Library for JS Based on Haskell's Parsec
masala-parser - Javascript Generalized Parser Combinators
json_struct - json_struct is a single header only C++ library for parsing JSON directly to C++ structs and vice versa
oil - Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
daw_json_link - Fast, convenient JSON serialization and parsing in C++
pcomb - parser combinators in PostScript and C
eventpp - Event Dispatcher and callback list for C++
mal - mal - Make a Lisp