|
|
1.1 root 1: Changes between 2.1 beta-test release of June '89 and previous release:
2:
3: User-visible:
4:
5: - -p flag generates a performance report to stderr. The report
6: consists of comments regarding features of the scanner rules
7: which result in slower scanners.
8:
9: - -b flag generates backtracking information to lex.backtrack.
10: This is a list of scanner states which require backtracking
11: and the characters on which they do so. By adding rules
12: one can remove backtracking states. If all backtracking states
13: are eliminated, the generated scanner will run faster.
14: Backtracking is not yet documented in the manual entry.
15:
16: - Variable trailing context now works, i.e., one can have
17: rules like "(foo)*/[ \t]*bletch". Some trailing context
18: patterns still cannot be properly matched and generate
19: error messages. These are patterns where the ending of the
20: first part of the rule matches the beginning of the second
21: part, such as "zx*/xy*", where the 'x*' matches the 'x' at
22: the beginning of the trailing context. Lex won't get these
23: patterns right either.
24:
25: - Faster scanners.
26:
27: - End-of-file rules. The special rule "<<EOF>>" indicates
28: actions which are to be taken when an end-of-file is
29: encountered and yywrap() returns non-zero (i.e., indicates
30: no further files to process). See manual entry for example.
31:
32: - The -r (reject used) flag is gone. flex now scans the input
33: for occurrences of the string "REJECT" to determine if the
34: action is needed. It tries to be intelligent about this but
35: can be fooled. One can force the presence or absence of
36: REJECT by adding a line in the first section of the form
37: "%used REJECT" or "%unused REJECT".
38:
39: - yymore() has been implemented. Similarly to REJECT, flex
40: detects the use of yymore(), which can be overridden using
41: "%used" or "%unused".
42:
43: - Patterns like "x{0,3}" now work (i.e., with lower-limit == 0).
44:
45: - Removed '\^x' for ctrl-x misfeature.
46:
47: - Added '\a' and '\v' escape sequences.
48:
49: - \<digits> now works for octal escape sequences; previously
50: \0<digits> was required.
51:
52: - Better error reporting; line numbers are associated with rules.
53:
54: - yyleng is a macro; it cannot be accessed outside of the
55: scanner source file.
56:
57: - yytext and yyleng should not be modified within a flex action.
58:
59: - Generated scanners #define the name FLEX_SCANNER.
60:
61: - Rules are internally separated by YY_BREAK in lex.yy.c rather
62: than break, to allow redefinition.
63:
64: - The macro YY_USER_ACTION can be redefined to provide an action
65: which is always executed prior to the matched rule's action.
66:
67: - yyrestart() is a new action which can be used to restart
68: the scanner after it has seen an end-of-file (a "real" one,
69: that is, one for which yywrap() returned non-zero). It takes
70: a FILE* argument indicating a new file to scan and sets
71: things up so that a subsequent call to yylex() will start
72: scanning that file.
73:
74: - Internal scanner names all preceded by "yy_"
75:
76: - lex.yy.c is deleted if errors are encountered during processing.
77:
78: - Comments may be put in the first section of the input by preceding
79: them with '#'.
80:
81:
82:
83: Other changes:
84:
85: - Some portability-related bugs fixed, in particular for machines
86: with unsigned characters or sizeof( int* ) != sizeof( int ).
87: Also, tweaks for VMS and Microsoft C (MS-DOS), and identifiers all
88: trimmed to be 31 or fewer characters. Shortened file names
89: for dinosaur OS's. Checks for allocating > 64K memory
90: on 16 bit'ers. Amiga tweaks. Compiles using gcc on a Sun-3.
91:
92: - Compressed and fast scanner skeletons merged.
93:
94: - Skeleton header files done away with.
95:
96: - Generated scanner uses prototypes and "const" for __STDC__.
97:
98: - -DSV flag is now -DSYS_V for System V compilation.
99:
100: - Removed all references to FTL language.
101:
102: - Software now covered by BSD Copyright.
103:
104: - flex will replace lex in subsequent BSD releases.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.