[erlang-questions] Leex - a lexical anaylzer generator, released

Ben Hood <>
Tue May 27 22:25:48 CEST 2008


Robert,

On 24 May 2008, at 16:39, Robert Virding wrote:

> Apart from this there are no other noticeable changes. The Erlang  
> and LFE token syntaxes are included as examples.

This may sound like a stupid question, but how do you use it?

In the documentation, it says that you can tokenize a stream by calling

io:request(InFile, {get_until,Prompt,Module,tokens,[Line]})

and in the old example tutorial which uses leex:gen/2 to create the  
lexer, its uses the following:

io:requests(Stream, [{get_until,foo,Module, tokens,[LineNo]}])

to pass of the stream to the parser.

This doesn't seem to work with the new version of leex and I can't  
seem to find any documentation about io:request/1,2 or io:requests/1,2

Do you have a example that demonstrates glue code to create the lexer  
and parser and then interpret a stream using the current code base?

Thanks,

Ben



More information about the erlang-questions mailing list