Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 12-13-2004, 07:09 AM   #1
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



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 can i do that?

thank you
Old 12-13-2004, 09:07 AM   #2
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");



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 11:21 AM
How to unzip all the src files in linux src folder? raj_ice Linux - Newbie 1 10-15-2004 10:46 AM
src.rpm question CarlosSunden Linux - Newbie 2 05-28-2004 01:43 PM
src.rpm question nulldev Linux - Newbie 5 06-19-2003 01:10 PM
Creating /usr/src/linux-<xx> from kernel.<xx>.src.rpm jmourik Linux - Newbie 2 02-19-2003 04:24 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:33 AM.

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