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 03-08-2006, 05:36 AM   #1
sam_cit
LQ Newbie
 
Registered: Feb 2006
Posts: 5

Rep: Reputation: 0
customize the input for lex


Hi,
I cam across a piece of code to customize the input from where the characters are read by lex, the input() in many commonly used lex is a macro which is defined as

# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)

in order to override this and customize, the following code has been used...

#undef input
#define input() buffer[index++];

Now my doubt is, does #undef input same as #undef input(), as we have already defined the macro input()...Hope you understood my question.

Thanks And Regards,
Vairavan.S
 
  


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
LEX and YACC with C gr33ndata Programming 4 11-18-2007 06:12 PM
Flex or Lex Mandrivia maurovezz Linux - Distributions 2 07-04-2005 04:09 AM
lex input src question sibtay Linux - Software 1 12-13-2004 09:07 AM
Lex & YACC coolfrog Programming 3 09-25-2004 08:00 AM
flex your lex chens_83 Linux - General 2 06-02-2002 04:18 AM

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

All times are GMT -5. The time now is 12:27 AM.

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