What functions a lexer needs to provide?

Posted by M28 on Stack Overflow See other posts from Stack Overflow or by M28
Published on 2010-05-30T21:05:16Z Indexed on 2010/05/30 21:12 UTC
Read the original article Hit count: 259

Filed under:

I am making a lexer, don't tell me to not do because I already did most of it.
Currently it makes an array of tokens and that's it.

I would like to know, what functions the lexer needs to provide and a brief explanation of what each function needs to do.

I'll accept the most complete list.

An example function would be:

next: Consume the current token and return it

© Stack Overflow or respective owner

Related posts about lexical-analyser