. Consider
relop
< | <= | = | <> | >= | >
id
letter(letter|digit)*
num
digit + ('.' digit + )? (E('+'|'-')? digit + )?
delim
blank | tab | newline
ws
delim +
. Construct an analyzer that will return <token, attribute> pairs
We now consider the following grammar and try to construct an analyzer that will return <token, attribute> pairs.
relop
< | = | = | <> | = | >
id
letter (letter | digit)*
num
digit+ ('.' digit+)? (E ('+' | '-')? digit+)?
delim
blank | tab | newline
ws
delim+