[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 591
  • Last Modified:

LEX- How to handle EOF

i want to pipe files to stdin of my lex-programm. Lex should give back a special token for the eof-charakter to the main-programm.
Is it possible, and how?
0
bodirsky
Asked:
bodirsky
1 Solution
 
ahoffmannCommented:
. if(yytext[0] == EOF) { .. }

BTW,
flex has a  <<EOF>> pattern  ;-)
0
 
bodirskyAuthor Commented:
When you pipe the output of 'tar' or 'more' etc. to the compiled lex-file, the programm will not detect the End of the Input this way.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now