open encyclopedia * Article Search: * *
*
*

Token (parser)

From open-encyclopedia.com - the free encyclopedia.

de:Token (Compilerbau) A token, in computing, is a segment of text, regardess whether it be readable or comprised of symbols. Tokens are generally defined abstractly in a context free grammar, which is fed into a program such as yacc which checks the stream of tokens for conformity to this grammar. The tokens themselves are detected, from a larger block of text, by a lexical analyzer which attempts to match regular expressions against the text.

Older interpreters and older computers with BASIC in ROM, for example, would tokenize the program, turning the instructions from the programmer into byte-codes that were more easily processed by a virtual machine or processor. By doing so they would gain a bit more speed and faster execution. Some examples of this are the, O-code, P-code, Z-machine, and byte-codes used in different VM systems.

See also

  • Token decoration
Contribute Found an omission? You can freely contribute to this Wikipedia article. Edit Article
Copyright © 2003-2004 Zeeshan Muhammad. All rights reserved. Legal notices. Part of the New Frontier Information Network.