Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

LEX- How to handle EOF

Posted on 1997-11-10
2
558 Views
Last Modified: 2013-12-26
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
Comment
Question by:bodirsky
2 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 1295537
. if(yytext[0] == EOF) { .. }

BTW,
flex has a  <<EOF>> pattern  ;-)
0
 

Author Comment

by:bodirsky
ID: 1295538
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
cat dog challenge 18 127
repeateFront java challenge 31 94
abstract class with all non abstract mentods 6 80
canBalance challenge 34 98
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question