Re: lex/flex incompatabilities

cadreor!neil@uunet.uu.net (Neil Van Dyke)
Sat, 5 Oct 1991 19:05:32 GMT

          From comp.compilers

Related articles
lex/flex incompatabilities jk@cs.man.ac.uk (1991-10-04)
Re: lex/flex incompatabilities cadreor!neil@uunet.uu.net (1991-10-05)
Re: lex/flex incompatabilities bart@cs.uoregon.edu (1991-10-06)
Re: lex/flex incompatabilities Tony_Mason@transarc.com (1991-10-07)
Re: lex/flex incompatabilities vern@daffy.ee.lbl.gov (1991-10-07)
| List of all articles for this month |
Newsgroups: comp.compilers
From: cadreor!neil@uunet.uu.net (Neil Van Dyke)
Keywords: lex
Organization: Cadre Technologies Incorporated, Beaverton, Oregon.
References: 91-10-014
Date: Sat, 5 Oct 1991 19:05:32 GMT

jk@cs.man.ac.uk (John Kewley ICL) writes:
>Apart from yywrap (needs undefing if defined) what other problems might I
>have with flex/lex compatibility.


Appendix D of "lex & yacc", O'Reilly & Associates, includes:


    - No "%r" RATFOR scanners. Doubt this will be a problem.
    - No "%t"/"%T" translation tables.
    - Flex groups expansions by placing parenthesis, so
            NAME [A-Z][A-Z0-9]*
            %%
            foo{NAME}? printf("Matched.\n");
        will match "foo" in Flex, but not in Lex.
    - No "yymore".
    - No "yylineno".
    - Must use "-r" command-line option if using "REJECT".
    - No "input" or "output" functions. Uses different method.
    - Trailing contexts restricted to patterns with fixed leading or trailing
        portion. Whatever that means... :-)
    - Only reads one input file.


Book is highly recommended. Even for a compiler neophyte like me. :-)


P.S., I have the first edition. Make sure you get the new one -- supposed to
be much better.
--
Neil W. Van Dyke, ogicse!cadreor!neil, (503) 690-1586
[Is the new version out yet? I haven't seen it. -John]
--


Post a followup to this message

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