lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Peter Hill.
> Ok, I've now written a lex-in-lua module (though not yet exhaustively
> debugged it). Would you care to look at it and offer some commentary?

Björn De Meyer:
> Yes, certainly. If it's less than 10 to 20 Kb, I think it won't harm for
> you to post it here for all to see. The more eyballs, the merrier. If it's
> larger, then just mail it to my home address, or maybe put it on the wiki.

Ok, I guess the list is fairly lightly loaded at the moment, so here it is.
I don't really think there is much variation available in writing the
lexical analyser, except for the naming of the functions and the decision as
to how to handle the look-ahead character (global var, passed parameter as I
chose, or 'unget').

Have a look and tell me what you think.

I'll probably have a tinker with a parser next.

Peter Hill.

Attachment: TEST.LUA
Description: Binary data

Attachment: lex.lua
Description: Binary data