Re: Columns in flex.

flisakow@cs.wisc.edu (Shaun Flisakowski)
Sat, 28 Jan 1995 02:49:08 GMT

          From comp.compilers

Related articles
Columns in flex. Regan.Russell@jcu.edu.au (Regan Russell) (1995-01-23)
Re: Columns in flex. C.A.Elliott@dcs.warwick.ac.uk (1995-01-27)
Re: Columns in flex. c1veeru@watson.ibm.com (Virendra K. Mehta) (1995-01-27)
Re: Columns in flex. robertsw@agcs.com (1995-01-27)
Re: Columns in flex. schrod@iti.informatik.th-darmstadt.de (1995-01-31)
Re: Columns in flex. flisakow@cs.wisc.edu (1995-01-28)
| List of all articles for this month |

Newsgroups: comp.compilers
From: flisakow@cs.wisc.edu (Shaun Flisakowski)
Keywords: flex, Cobol
Organization: U of Wisconsin CS Dept
References: 95-01-051 95-01-087
Date: Sat, 28 Jan 1995 02:49:08 GMT

Charles Elliott <C.A.Elliott@dcs.warwick.ac.uk> wrote:
>Regan Russell <Regan.Russell@jcu.edu.au> writes:
>
>>Q: How do I do column sensitive scanning in flex ?
>>Q: Or should I write my own scanner ?
>
  -- snip --
    (Description of Charles' flex column counter deleted)


>
>If there is a better way, please let me know!


        For the original user, I would suggest checking column 7 in your
        YY_INPUT() routine, and simply dropping the comments out (read
        the next line instead)


        To keep track of the column info in my flex scanner, I define the
        flex macro YY_USER_ACTION to add the yyleng to my counter. This
        gives the same effect as what you do above, but it does not have
        to explictly appear in every code section.


        Shaun
--


Post a followup to this message

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