LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-13-2004, 06:09 AM   #1
sibtay
Member
 
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145

Rep: Reputation: 15
lex input src question


hi i am woking on lex
i want to define a class as KEY which will include some other words

i.e

KEY [HELLO]

but when i do this lex recognizes KEY even when only 'H' is typed, but i want it to be recognized only when the whole word 'HELLO' appears

i would also like to add few more words in the KEY class...how can i do that?

thank you
 
Old 12-13-2004, 08:07 AM   #2
sibtay
Member
 
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145

Original Poster
Rep: Reputation: 15
heres the answer

KEY Hello foo

now Hello and foo both fall in the KEY class and in the rules section of lex source file you 'll do

{KEY} printf("KEY found");

thankz
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
updatign nv drivers states need precompiles kernel src i have src and headers no joy gonus Debian 6 10-31-2004 10:21 AM
How to unzip all the src files in linux src folder? raj_ice Linux - Newbie 1 10-15-2004 09:46 AM
src.rpm question CarlosSunden Linux - Newbie 2 05-28-2004 12:43 PM
src.rpm question nulldev Linux - Newbie 5 06-19-2003 12:10 PM
Creating /usr/src/linux-<xx> from kernel.<xx>.src.rpm jmourik Linux - Newbie 2 02-19-2003 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration