Questions tagged [parser-combinator]
The parser-combinator tag has no usage guidance.
6 questions
8
votes
2
answers
2k
views
How does the GLL parsing algorithm work?
I'm very interested in the topic of parsers, especially in the topic of parser combinators like Superpower. The problem with them is that the grammars that they can work with are a bit limited. For ...
-1
votes
1
answer
129
views
Semantic action in parser combinators
I have a parser that can be defined as
int = a:/[0-9]+/ {parseInt(a)}.
It is supposed to match an int and convert it into a number. There can also be a parser like
sum = a:int b:int {a+b}
As ...
126
votes
4
answers
25k
views
When to use a Parser Combinator? When to use a Parser Generator?
I've taken a deep dive into the world of parsers recently, wanting to create my own programming language.
However, I found out that there exist two somewhat different approaches of writing parsers: ...
4
votes
3
answers
895
views
How are line/column position data dealt with in parser combinator libraries?
I'm building a parser using a parser combinator library. I need to keep track of where AST nodes started and ended in the textual input -- line and column numbers.
How is this problem approached and/...
7
votes
2
answers
1k
views
Parser combinator that looks like BNF
Is it possible to construct a parser combinator library that reads like a BNF grammar? I don't know of any, so I started wondering if there are reasons it's impossible or undesirable to do so. It ...
24
votes
5
answers
9k
views
Are separate parsing and lexing passes good practice with parser combinators?
When I began to use parser combinators my first reaction was a sense of liberation from what felt like an artificial distinction between parsing and lexing. All of a sudden everything was just ...