yacc, same token

C

cmk128

Hi All

Here is my .l file, when the input is '1', the token will match mame,
but sometime i want it matches "values". how to?

chars [A-za-z0-9\_\'\.\"]
int [0-9]+
string \"{chars}+\"
words {chars}+
values {int}|{string}|{bool}
name [a-zA-Z0-9]+

thanks
from Peter ([email protected])
 
R

Robert Harris

Hi All

Here is my .l file, when the input is '1', the token will match mame,
but sometime i want it matches "values". how to?

chars [A-za-z0-9\_\'\.\"]
int [0-9]+
string \"{chars}+\"
words {chars}+
values {int}|{string}|{bool}
name [a-zA-Z0-9]+

thanks
from Peter ([email protected])
Well, how do you distinguish between a name and a value? (Perhaps you
shouldn't allow a number to be a name)

Robert
 
F

Flash Gordon

Hi All

Here is my .l file, when the input is '1', the token will match mame,
but sometime i want it matches "values". how to?

<snip>

Yacc is not C, please ask somewhere yacc is topical, not here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Collect Excel Data from Website 5
yacc trouble 2
Can't solve problems! please Help 0
a yacc problem, help! 1
Help in hangman game 1
TF-IDF 1
How to submit form after calling curl post 4
lex and yacc 3

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top