[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Flex recognition of "split" keywords
From: |
John R Levine |
Subject: |
Re: Flex recognition of "split" keywords |
Date: |
19 Jul 2003 14:03:18 -0400 |
> >significant, the rest aren't. It gets worse.
>
> Clearly, one needs some context switches.
Actually, you need to make a prepass over each statement to decide whether
it's an assignment or something else before you can determine token
boundaries.
do 10 i = 1.10
do 10 i = 1,10
In the first statement, do 10 i is one token, in the second statement it's
three. The prescan needs to see whether the statement contains an equal
sign followed by a comma not contained in parentheses nor in a quoted or
hollerith string. Lex isn't very good at that kind of thing.
> Perhaps it is implementable in Flex (if now Flex would want to support that
> language :-)):
I have no doubt that by adding enough C code you can do some of the
scanning in lex, but the total amount of code would be larger than an
ad-hoc scanner.
Regards,
John Levine, address@hidden, Primary Perpetrator of "The Internet for Dummies",
Information Superhighwayman wanna-be, http://iecc.com/johnl, Sewer Commissioner
"A book is a sneeze." - E.B. White, on the writing of Charlotte's Web
- Flex recognition of "split" keywords, Leor V, 2003/07/18
- Re: Flex recognition of "split" keywords, John R. Levine, 2003/07/18
- Message not available
- Re: Flex recognition of "split" keywords, Hans Aberg, 2003/07/19
- Re: Flex recognition of "split" keywords,
John R Levine <=
- Re: Flex recognition of "split" keywords, Hans Aberg, 2003/07/20
- Re: Flex recognition of "split" keywords, John R Levine, 2003/07/20
- Re: Flex recognition of "split" keywords, Hans Aberg, 2003/07/20
- Message not available
- Re: Flex recognition of "split" keywords, Hans Aberg, 2003/07/21
- Re: Flex recognition of "split" keywords, John R Levine, 2003/07/21