Hi,
I'm creating a parser for a LaTeX-ish language that features verbatim blocks.
To handle them I want to switch lexers on-the-fly, depending on the parsing
context. Therefore, I need the state from the (Menhir generated) parser
to influence the lexing process (I believe this is called the "lexe
> I'm creating a parser for a LaTeX-ish language that features verbatim blocks.
Out of interest, how LaTeX-ish do you mean? I would hazard a guess that it's
impossible to parse an unrestricted TeX file using an LR grammar (or at least
no more clear than a hand-coded automaton) because you have t
Hi,
> Out of interest, how LaTeX-ish do you mean? I would hazard
> a guess that it's impossible to parse an unrestricted TeX
> file using an LR grammar (or at least no more clear than a
> hand-coded automaton) because you have to execute the macro
> expander in order to parse the file *completely*
On Tuesday, 10. November 2009 15:42:52 Dario Teixeira wrote:
> Hi,
>
> I'm creating a parser for a LaTeX-ish language that features verbatim
> blocks. To handle them I want to switch lexers on-the-fly, depending on the
> parsing context. Therefore, I need the state from the (Menhir generated)
> pa
Hi,
> if the lexer cannot decide it on the tokens seen, a packrat
> parser (like Aurochs) may be a better choice, since in a PEG
> there is no seperate lexer, it's all one grammar, so you don't
> have this problem.
But does Aurochs also handle UTF8 streams?
In the meantime I've implemented the p
Micha writes:
> On Tuesday, 10. November 2009 15:42:52 Dario Teixeira wrote:
>> Hi,
>>
>> I'm creating a parser for a LaTeX-ish language that features verbatim
>> blocks. To handle them I want to switch lexers on-the-fly, depending on the
>> parsing context. Therefore, I need the state from the