logo       

parser & scanner: msg#00298

lang.erlang.general

Subject: parser & scanner

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



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise