parser & scanner

Ulf Wiger ulf.wiger@REDACTED
Thu Jan 29 13:58:40 CET 2004


It needs some work, but the recursive-descent parser I wrote about
in:

http://www.erlang.org/ml-archive/erlang-questions/200305/msg00165.html

is still somehow progressing. I started modifying it in order to make
it possible to parse the entire XML 1.0 grammar, but am not through
it yet. It ended up in an endless loop, and I have yet to figure out
why (i.e. the specific reason why, not the fact that this is a general
problem with RD parsers.)


/Uffe

On Wed, 28 Jan 2004 16:06:59 +0100, Vlad Dumitrescu 
<vlad_dumitrescu@REDACTED> wrote:

> Hi,
>
> I need to write a (simple) parser, and I thought I'd use leex and yecc. 
> All
> fine, except for one thing: one of the tokens is a string that looks 
> like this
>     3:abc
> (the length is before it).
>
> I couldn't find a way to do it with leex, so I preprocess the input, 
> removing
> the length and enclosing the text with markers. Works fine - if the 
> marker is
> guaranteed not to be found in the string, which isn't.
>
> Before I set on to writing a lexer by hand, I wonder if there is another 
> way?
>
> best regards,
> Vlad



-- 
Ulf Wiger




More information about the erlang-questions mailing list