Definitions

from Wiktionary, Creative Commons Attribution/Share-Alike License

  • n. A computer program that performs lexical analysis.

Etymologies

from Wiktionary, Creative Commons Attribution/Share-Alike License

lex +‎ -er, ultimately from lexical.

Examples

  • Where is the sustainability … see no solar pannels for eg. is the water recycled? or is it dumped into the lake or river down there? lexer

    Casa Gutierrez in El Salvador by P&P Architects

  • Yes, my previous lexer could only lex one line at a time.

    Archive 2009-05-01

  • When I ask the lexer for its tokens, it gives me back exactly what I'd expect, Token(Identifier(x),0), and EOF(1).

    A Scala Lexer

  • NumberFinder with CharFinders with WhiteSpaceFinder lexer lexing " x , y ;"

    A Scala Lexer

  • But what happens if I pass in something that the lexer shouldn't understand?

    A Scala Lexer

  • Notice that like any good lexer, this lexer simply skips over the white space, handing you the next actual token at its right location.

    A Scala Lexer

  • String = x scala val lexer = new SimpleLexercode with Identifinder lexer: com.joshcough.compiler.lex.

    A Scala Lexer

  • In fact, the lexer here isn't yet capable of handling white space.

    A Scala Lexer

  • There really isn't much a lexer can do with errors.

    Archive 2009-05-01

  • Identifinder with NumberFinder scala lexer lexing "123"

    A Scala Lexer

Comments

Log in or sign up to get involved in the conversation. It's quick and easy.