Re: a token scanner DFA for indirection operator * ?

Alex Colvin <alexc@std.com>
3 Apr 2004 09:02:19 -0500

          From comp.compilers

Related articles
a token scanner DFA for indirection operator * ? rgesell@mb.sympatico.ca (RonG) (2004-03-26)
Re: a token scanner DFA for indirection operator * ? alexc@std.com (Alex Colvin) (2004-04-03)
Re: a token scanner DFA for indirection operator * ? vbdis@aol.com (2004-04-03)
Re: a token scanner DFA for indirection operator * ? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2004-04-03)
Re: a token scanner DFA for indirection operator * ? casse@netcourrier.fr (=?ISO-8859-1?Q?Cass=E9_Hugues?=) (2004-04-15)
| List of all articles for this month |

From: Alex Colvin <alexc@std.com>
Newsgroups: comp.compilers
Date: 3 Apr 2004 09:02:19 -0500
Organization: The World : www.TheWorld.com : Since 1989
References: 04-03-102
Keywords: C, lex
Posted-Date: 03 Apr 2004 09:02:19 EST

>I'm trying to write a token scanner for C, and I'm wondering if there is a
>detrministic finite automata (DFA) or state machine for the '*'
>indirection operator(IOP), or if differentiation between the multiply
>operator and the IOP is better left to the parser. Right now my scanner


This is usually left to the parser.
you have to distinguish
(int)*ptr
(width)*height
which requires knowing that "int" is a type (or typedef) in the current
scope.




--
mac the naïf



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.