Token: Token is a sequence of characters that can be
treated as a single logical entity. Typical tokens are,
1) Identifiers 2)
keywords 3) operators 4) special symbols 5)constants
Pattern:
A set of strings in the input for which the same token is produced as output. This
set of strings is described by a rule called a pattern associated with the
token.
Lexeme:
A lexeme is a sequence of characters in the source program that is matched by
the pattern for a token.
Example:
Description of token
Token | lexeme | pattern |
const | const | const |
if | if | if |
relation | <,<=,= ,< >,>=,> |
< or <= or = or < > or >= or letter
followed by letters & digit |
i | pi | any numeric constant |
nun | 3.14 | any character b/w “and “except" |
literal | "core" | pattern |
A patter is a
rule describing the set of lexemes that can represent a particular token in
source program.
good but need more explanation......
ReplyDeleteNicely explained (Y)
ReplyDeleteNic but need more explanation
ReplyDeletePATTERN = REGULAR EXPRESSION OR AUTOMATA
ReplyDeleteLEXEME = A WORD
TOKEN = TYPE OF WORD
LEXEME = TOKEN
DOES IT MEANS ?
DeleteLEXEME = A WORD = TOKEN
good work
ReplyDeleteThis is nice blog. Contents over here are so informative. Want to grab more on Lexeme (Lexicon) and word forms | Cognitive Science
ReplyDeleteShort notes. Explanation more idea
DeleteNic but need more explanation
ReplyDeletedefine the terms of lexeme,token and pattern.
ReplyDeleteTokens are the terminal symbols in the grammar.
DeletePatterns are description of a class of tokens.
Lexemes are words in the source program
Tokens are the terminal symbols in the grammar.
ReplyDeletePatterns are description of a class of tokens.
Lexemes are words in the source program
Good explanation.
ReplyDeletethats a nice one ...but you need to improve your subject nasty fellow
ReplyDeleteLexeme is smallest logical unit of program, token is the unique element of program, pattern is the formal and informal description of token
ReplyDeleteRegister organization 80386
ReplyDeleteasymptotic notations
introduction to microprocessor
features of 80486
page replacement strategies
block-diagram-8259a
white-box-testing
Public-Key Infrastructure
Pipeline Conflict
ReplyDeleteMultiport Memory Interconnection Structures
Difference Between Classification & Prediction
8255A I/O Operating Modes
Advanced Assembler Directives
Subroutine
Device Independent I/O Software
Color CRT Monitors
This comment has been removed by the author.
ReplyDeleteA token is a pair consisting of a token name and an optional attribute value. The token name is an abstract symbol representing a kind of lexical unit, e.g., a particular keyword, or a sequence of input characters denoting an identifier. The token names are the input symbols that the parser processes. In what follows, we shall generally write the name of a token in boldface. We will often refer to a token by its token name.
ReplyDelete• A pattern is a description of the form that the lexemes of a token may take. In the case of a keyword as a token, the pattern is just the sequence of characters that form the keyword. For identifiers and some other tokens, the pattern is a more complex structure that is matched by many strings.
• A lexeme is a sequence of characters in the source program that matches the pattern for a token and is identified by the lexical analyzer as an instance of that token.
That's a nice point.
ReplyDeleteDifference between ram and rom
Types of registers
ReplyDeleteTypes of flip-flops
This comment has been removed by the author.
ReplyDeleteShort description is not good.
ReplyDeleteSram and Dram
ReplyDeleteGood job
ReplyDelete