Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 135,924 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,608 people online right now. Registration is fast and FREE... Join Now!




Flex

 
Reply to this topicStart new topic

Flex, How to get a filename in Flex using C lang

swapi25
10 May, 2008 - 11:51 AM
Post #1

New D.I.C Head
*

Joined: 19 Mar, 2008
Posts: 3

smile.gif Hello everyone!!
I am working on linguistics using Flex & C.i have written all rules.now i have to insert a rule name for each nd every rule.i have rules from multiple files....soo now i am not understanding how to get the file name nd how to insert the rule name in each nd every rule at the beginning.
for eg: if there r some files like age file,refuse file etc...
nd in turn each file contains set of independant rules.
now if i take age file as input i have to get in output
(defrule age1
---------- //here we have some printf statements
--------
=>(assert(-------)))
LHS rule shuld be asserted to RHS .now how to get the rule name?here defrule age1 is rule name.for another rule of age file it will defrule age2 like that...if file is changed name of the file changes..
soo now how to get this file name nd to insert rule name for each nd every rule?



User is offlineProfile CardPM
+Quote Post

swapi25
RE: Flex
11 May, 2008 - 09:33 AM
Post #2

New D.I.C Head
*

Joined: 19 Mar, 2008
Posts: 3

QUOTE(swapi25 @ 10 May, 2008 - 12:51 PM) *

smile.gif Hello everyone!!
I am working on linguistics using Flex & C.i have written all rules.now i have to insert a rule name for each nd every rule.i have rules from multiple files....soo now i am not understanding how to get the file name nd how to insert the rule name in each nd every rule at the beginning.
for eg: if there r some files like age file,refuse file etc...
nd in turn each file contains set of independant rules.
now if i take age file as input i have to get in output
(defrule age1
---------- //here we have some printf statements
--------
=>(assert(-------)))
LHS rule shuld be asserted to RHS .now how to get the rule name?here defrule age1 is rule name.for another rule of age file it will defrule age2 like that...if file is changed name of the file changes..
soo now how to get this file name nd to insert rule name for each nd every rule?



hello frnds!!
pls anyone help me with this flex prob...r atleast give me some rough idea soo that i can try ..its very urgent frnds...
User is offlineProfile CardPM
+Quote Post

Cerolobo
RE: Flex
11 May, 2008 - 11:00 AM
Post #3

D.I.C Regular
Group Icon

Joined: 5 Apr, 2008
Posts: 440



Thanked: 31 times
My Contributions
Flex is not part of the C or C++ standard, so there is a chance that no one on these forums have actually used Flex.

The only thing I can do, is to point you to the documentation...

http://www.gnu.org/software/flex/manual/html_mono/flex.html
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 08:15AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month