summaryrefslogtreecommitdiff
path: root/to.do/flex.rmail
blob: 6c7f44597901e0a653141eb5191d245100e8da78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
BABYL OPTIONS: -*- rmail -*-
Version: 5
Labels:
Note:   This is the header of an rmail file.
Note:   If you are seeing it in rmail,
Note:    it means the file has no messages in it.

1,,
X-Coding-System: nil
Mail-from: From vern@daffy.ee.lbl.gov  Wed Mar 14 04:01:40 2001
Return-Path: <vern@daffy.ee.lbl.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA09959
	for <wlestes@localhost>; Wed, 14 Mar 2001 04:01:40 -0500
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 14 Mar 2001 04:01:40 -0500 (EST)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2E8pme19617
	for <wlestes@hermes.email.uncg.edu>; Wed, 14 Mar 2001 03:51:48 -0500 (EST)
Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA20394
	for <wlestes@uncg.edu>; Wed, 14 Mar 2001 03:51:47 -0500 (EST)
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2E8pkM07870;
	Wed, 14 Mar 2001 00:51:46 -0800 (PST)
Message-Id: <200103140851.f2E8pkM07870@daffy.ee.lbl.gov>
To: "W. L. Estes" <wlestes@uncg.edu>
Subject: Re: possibly taking over maintenance of flex 
In-reply-to: Your message of Tue, 13 Mar 2001 09:00:58 EST.
Date: Wed, 14 Mar 2001 00:51:46 PST
From: Vern Paxson <vern@ee.lbl.gov>

*** EOOH ***
To: "W. L. Estes" <wlestes@uncg.edu>
Subject: Re: possibly taking over maintenance of flex 
In-reply-to: Your message of Tue, 13 Mar 2001 09:00:58 EST.
Date: Wed, 14 Mar 2001 00:51:46 PST
From: Vern Paxson <vern@ee.lbl.gov>

> probably best to have a trial period up front as you suggest.

Okay, you can get a copy of the master sources from

        ftp://ftp.ee.lbl.gov/.vp-flex-sources.tar.gz

The TODO/ subdirectory has the general wish list plus a number of contributed
patches.  The faqs/ subdirectory has a bunch of email messages (in MH
folder format, i.e., one message per file, files numbered sequentially)
for commonly asked questions - worth taking a look through to see what
sorts of things people frequently ask about.

Next messages are various stuff I sent to Dick King.

Thanks for giving it a try - naturally, by all means let me know when you
have questions ...

		Vern


1,,
X-Coding-System: nil
Mail-from: From vern@daffy.ee.lbl.gov  Wed Mar 14 04:01:40 2001
Return-Path: <vern@daffy.ee.lbl.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA09961
	for <wlestes@localhost>; Wed, 14 Mar 2001 04:01:40 -0500
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 14 Mar 2001 04:01:40 -0500 (EST)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2E8ppe19633
	for <wlestes@hermes.email.uncg.edu>; Wed, 14 Mar 2001 03:51:51 -0500 (EST)
Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA20402
	for <wlestes@uncg.edu>; Wed, 14 Mar 2001 03:51:50 -0500 (EST)
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2E8poV07877;
	Wed, 14 Mar 2001 00:51:50 -0800 (PST)
Message-Id: <200103140851.f2E8poV07877@daffy.ee.lbl.gov>
To: wlestes@uncg.edu
Subject: messages sent to Dick King (1 of 2)
Date: Wed, 14 Mar 2001 00:51:49 PST
From: Vern Paxson <vern@ee.lbl.gov>

*** EOOH ***
To: wlestes@uncg.edu
Subject: messages sent to Dick King (1 of 2)
Date: Wed, 14 Mar 2001 00:51:49 PST
From: Vern Paxson <vern@ee.lbl.gov>


------- Forwarded Messages

Date:  Mon, 21 Aug 2000 23:03:54 PDT
From:  Vern Paxson <vern>
Subject:  Re: Some new Flex maintainer volunteers
To:  Dick King <king@reasoning.com>
Cc:  bkuhn@ebb.org
In-reply-to:  Your message of Tue, 15 Aug 2000 14:03:58 PDT.

> Vern, i'm ready when you are.

Okay, I've put the master sources in

	ftp://ftp.ee.lbl.gov/.vp-flex-sources.tar.gz

The TODO/ subdirectory has a the general wish list plus a number of
contributed patches (per the mail I'll be cc'ing you on regarding reentrant
scanners).  The faqs/ subdirectory has a bunch of email messages (in MH
folder format, i.e., one message per file, files numbered sequentially) for
commonly asked questions - worth taking a look through to see what sorts of
things people frequently ask about.

I very much appreciate your taking over maintaining/developing flex, and
apologize for how long it's taken me to bundle stuff up to give to you (all
too symptomatic of why I'm no longer able to work on flex :-( ).  By all
means, let me know when you have questions ...

		Vern

------- Message 2

Date:  Mon, 21 Aug 2000 23:38:00 PDT
From:  Vern Paxson <vern>
Subject:  Re: I volunteer to modify flex to generate reentrant C code.
To:  "John W. Millaway" <jmillawa@nimbus.ocis.temple.edu>
Cc:  help-flex@gnu.org, king@reasoning.com
In-reply-to:  Your message of Mon, 21 Aug 2000 16:23:18 PDT.

> I'm requesting this feature and at the same time volunteering to implement
> it:	

John Bossom contributed patches a while ago for adding reentrant scanners.
I never managed to try them out or integrate them (note that I'm no longer
the flex maintainer/developer, having just transferred the honors to Dick
King, whom I've cc'd), but I've made them available from:

	ftp://ftp.ee.lbl.gov/.vp-flex-reentrant.tar.gz

I imagine Dick will be interested in hearing of problems/improvements/etc.

		Vern

------- Message 3

Date:  Wed, 30 Aug 2000 07:23:07 PDT
From:  Vern Paxson <vern>
Subject:  Re: bug in flex 2.5.4? 
To:  Keith McGuigan <keith.mcguigan@ecora.com>
Cc:  king@reasoning.com
In-reply-to:  Your message of Tue, 29 Aug 2000 12:21:02 EDT.

This does indeed sound like a bug.  Dick King (cc'd) recently took over
development & maintenance for flex; I've sent him a copy of your message.

		Vern

------- Message 4

Date:  Thu, 31 Aug 2000 15:41:00 PDT
From:  Vern Paxson <vern>
Subject:  Re: Flex 
To:  "Skifstrom, Eric" <SKIFSTRE@Mattel.com>
Cc:  king@reasoning.com
In-reply-to:  Your message of Wed, 30 Aug 2000 09:35:58 PDT.

> Thanks for all the work on Flex.  It is appreciated.  How do I get a copy of
> flex for Windows 98 platform.

I've only directly support flex for Unix, and have always distributed it
in source-code form only.  So I don't know where you get a copy, though
I bet with some web surfing you can find one.

Also, please note, Dick King (cc'd) has taken over flex development
and maintenance.

		Vern

------- Message 5

Date:  Thu, 31 Aug 2000 15:43:40 -0700 (PDT)
From:  Dick King <king@reasoning.com>
Subject:  Re: Flex 
To:  vern@ee.lbl.gov
MIME-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
In-Reply-To:  <200008312241.e7VMf0G14335@daffy.ee.lbl.gov>
References:  <200008312241.e7VMf0G14335@daffy.ee.lbl.gov>
X-Mailer:  VM 6.61 under 19.14 XEmacs Lucid

Vern Paxson writes:
 >> Thanks for all the work on Flex.  It is appreciated.  How do I get a copy of
 >> flex for Windows 98 platform.
 >
 >I've only directly support flex for Unix, and have always distributed it
 >in source-code form only.  So I don't know where you get a copy, though
 >I bet with some web surfing you can find one.
 >
 >Also, please note, Dick King (cc'd) has taken over flex development
 >and maintenance.
 >
 >		Vern
 >

I have a couple of how-to-be-a-gnu-product-maintainer questions.

First, how do i get to the wish list?  I assume people mail the stuff and it
accumulates somewhere.

Second, if i decide i have a fix for a group of problems what do i do to get it
distributed?

- -dk

------- Message 6

Date:  Sun, 03 Sep 2000 12:22:48 PDT
From:  Vern Paxson <vern>
Subject:  Re: Flex 
To:  Dick King <king@reasoning.com>
In-reply-to:  Your message of Thu, 31 Aug 2000 15:43:40 PDT.

> First, how do i get to the wish list?  I assume people mail the stuff and it
> accumulates somewhere.

There's a honed-down copy in the distribution I put together.  I also have
several hundred email messages, which will be rather tedious to wade through,
but I can put together for you if you wish (this is non-trivial, though,
since there's some personal mail intermixed in it which I'll have to locate
and remove).

> Second, if i decide i have a fix for a group of problems what do i do to get it
> distributed?

Put together a new release distribution (either a minor version change or
a major one, depennding on the scope of the changes).  Make sure it works
with "make bigcheck", and make sure you can copy the distribution to a
virgin machine, unpack it & successfully build it (including "make bigcheck").

Next, make it available somewhere for anonymous ftp and/or Web access.
(If this is a problem, I can still host the distribution at ftp.ee.lbl.gov.)

Finally, send mail like the appended example.  For your first message,
you should explain that you've taken over development of flex from me.
It would probably be good to cc me, in case a thread develops from the
note that it would be helpful to have me contribute to.  No need to cc
me on later notes (though I don't mind, either).

I used to send the note to compilers@iecc.com (the USENET comp.compilers
group) and info-gnu@prep.ai.mit.edu.  I don't know if the former is still
the correct address - you could find out from the USENET group's archives,
presumably.  The latter has likely changed to info-gnu@gnu.org.

		Vern


Date:  Tue, 28 Mar 95 11:58:04 PST
From:  Vern Paxson <vern>
Subject:  flex release 2.5.1 now available
To:  compilers@iecc.com, info-gnu@prep.ai.mit.edu

Release 2.5.1 of flex, a POSIX-compliant "lex" scanner generator, is now
available for anonymous ftp to ftp.ee.lbl.gov.  Retrieve flex-2.5.1.tar.Z
or flex-2.5.1.tar.gz.  flex-2.5.1.tar.gz should be showing up shortly at
the usual GNU mirror sites.

The main changes between 2.5 and 2.4 are:

	- A new concept of "start condition" scope lets you group together
	  rules sharing the same start conditions into a syntactic unit.
	- Flex now includes a general mechanism for specifying scanner options.
	- Routines have been added for scanning strings instead of files.
	- Routines have been added for manipulating stacks of start conditions.
	- Fledgling support for POSIX character class expressions.
	- Enhanced portability to MS-DOS, VMS, NT, Macintosh, Amiga.
	- A number of bugs have been fixed.
	- input() no longer trashes yytext.
	- Interactive scanners now run significantly faster.
	- C++ scanner objects now work with the -P option.
	- The promised rewrite of the C++ FlexLexer class has not been done,
	  but is still planned.

See the "NEWS" file for more details.

Please report bugs to: vern@ee.lbl.gov or bug-gnu-utils@prep.ai.mit.edu

		Vern

Vern Paxson
Lawrence Berkeley Laboratory
vern@ee.lbl.gov

------- Message 7

Date:  Wed, 13 Sep 2000 00:59:33 PDT
From:  Vern Paxson <vern>
Subject:  Re: Does the FSF maintain Flex?
To:  "Leanard Lin" <leanard@syntest.com.tw>
Cc:  king@reasoning.com
In-reply-to:  Your message of Wed, 13 Sep 2000 00:55:38 PDT.

> Dear Vern,
> 
> I have a problem about flex of linux version.
> If comment is very long, flex will not re-malloc
> for it.
> It will display a error message and exit program.
> 
> Thanks,
> 
> Leanard

Well, clearly if a comment is larger than the available memory, then flex
can't realloc to accommodate it.  But presumably that's not what's going on
or you wouldn't have bothered writing; so I don't know what the problem
might be.

Flex is now developed & maintained by Dick King, king@reasoning.com, whom
I've cc'd.

		Vern

------- Message 8

Date:  Wed, 04 Oct 2000 23:36:59 PDT
From:  Vern Paxson <vern>
Subject:  Re: Flex 2.5.4.1 Bugs
To:  Hans Aberg <haberg@matematik.su.se>
Cc:  king@reasoning.com
In-reply-to:  Your message of Sun, 01 Oct 2000 20:32:48 PDT.

> I made a Metrowerks MacOS CW Pro 5 plugin out of the Flex 2.5.4.1. Here are
> some bugs:
> 
> -- flexerror() calls flexend() which becomes an infinite loop in the case
> of an error in flexend(). So, flexerror(), replace flexend() by exit().
> 
> -- If there is no output file error, flexend() fails to close the output
> file. This causes a problem as a plugin, because the file remains locked
> the next time the compiler runs, and the file cannot be reopened.
> 
> This bug also occurs if, one first has created the .c file, then runs it
> with a -S option for a skeleton filet Flex cannot find, in which case
> flexend() fails to close the output file.

Please note, Dick King (king@reasoning.com) has taken over flex maintenance
and development.  I've cc'd him.

		Vern

------- Message 9

Date:  Wed, 04 Oct 2000 23:38:07 PDT
From:  Vern Paxson <vern>
Subject:  Re: flex -+ option and ISO C++ IOStreams
To:  Harri Pasanen <harri.pasanen@trema.com>
Cc:  king@reasoning.com
In-reply-to:  Your message of Mon, 02 Oct 2000 10:15:59 PDT.

> You probably already know this: 
> 
> flex version 2.5.4 generates with -+ flag a forward declaration of class
> istream.
> Problem is that it is incompatible with the new ANSI IOStreams.  This
> becomes apparent if I try to use KAI C++ (http://www.kai.com/) to
> compile the generated scanner.
> 
> Lexing Scanner.l...
> Compiling Scanner.o...
> "/usr/local/KAI/KCC.pu-4.0b-1/KCC_BASE/include/istream.h", line 12:
> error #101: 
>           "istream" has already been declared in the current scope
>   using std::istream;
> 
> I wonder if an updated version of flex is in the works?  In the time
> being I can compile my own...

Dick King (king@reasoning.com) has recently taken over flex maintenance and
development (I've cc'd him).  Since there will be a fair amount of getting
up to speed for him, I think building your own version for now is the
best course.

		Vern

------- Message 10

Date:  Thu, 05 Oct 2000 00:27:15 PDT
From:  Vern Paxson <vern>
Subject:  Re: Flex Feature Idea 
To:  Davy Durham <david.durham@wcom.com>
Cc:  king@reasoning.com
In-reply-to:  Your message of Thu, 28 Sep 2000 11:28:52 EDT.

>     First I just want to say how much flex has been helpful to me in
> writing my parser, and that I really appreciate the free use of the
> program...

You're welcome!

Please note, though, that Dick King (cc'd) has taken over flex maintenance
and development.

>     I can't re-write YY_INPUT which could  detect and remove the '\' and
> \n  and go ahead and return the _next_ char, because I'm  keeping up
> with the line-number and column-number in YY_USER_ACTION for each
> token... Since flex buffer's the data retrieved from YY_INPUT, _my_
> YY_INPUT would need to increment the line-number, but it would happen
> possibly too soon...  Plus I'm using yy_switch_buffer to do macro
> replacements quite a bit which I think would complicate things even
> more....

Well, that's how you have to do it, I'm afraid.  I can't see any practical
way to add this as a feature to flex at a later stage in the input analysis,
since the semantics really are "pretend this slash and this newline don't
exist (mod line numbers)".  What you can probably do for line numbers is
the following: create a data structure that maps byte offsets in the current
input stream to line numbers.  YY_INPUT would fill this in as it returns
new (possibly munged) lines, and your actions would consult it in order to
generate correct location information for error messages.  (To deal with
multiple input buffers, you maintain one data structure per buffer.)

		Vern

------- Message 11

Date:  Thu, 05 Oct 2000 01:03:01 PDT
From:  Vern Paxson <vern>
Subject:  Re: [minor] obscure error messages if YY_DECL ends in semicolon 
To:  "Eric R. Buddington" <ebuddington@mail.wesleyan.edu>
Cc:  king@reasoning.com
In-reply-to:  Your message of Thu, 14 Sep 2000 13:39:52 EDT.

> Your address was listed in the flex info pages, so I send this to you; if
> you aren't the currnet maintainer, please let me know.

I'm not longer the maintainer - Dick King (cc'd) has taken over.

> First, I would like to add an '%option reentrant", such that the flex code
> would have the lexer function as its only global symbol. Would you
> consider such a patch for inclusion in the official flex?

Someone has already contributed patches for this - you can get them
from ftp://ftp.ee.lbl.gov/.vp-flex-reentrant.tar.gz .

> Secondly, an erroneous input that might give better error messages:
> 
> If YY_DECL ends with a semicolon, the generated error messages refer to
> wrong (nonexistant in this case) line numbers in the source file. The
> user error is only clear after turning off #line directives and looking at
> the generated .c file.
> 
> It would be good to have this error (a fairly easy one to make) reported
> clearly, if that can be done elegantly. This I what I get now:
> 
> flex -t -Pcap_string_ cap_string.flex > cap_string.c
> cc -Wall   -c -o cap_string.o cap_string.c
> cap_string.flex:163: parse error before `{'
> cap_string.flex:165: register name not specified for `yy_cp'
> cap_string.flex:165: register name not specified for `yy_bp'
> cap_string.flex:166: register name not specified for `yy_act'
> cap_string.flex:39: parse error before `if'
> ...

I don't offhand see an easy way to fix this, other than scanning the source
for a YY_DECL definition and looking for a semi-colon (urgh, what a hack).
Dick will have to toss it onto the to-do list.

		Vern

------- Message 12

Date:  Thu, 5 Oct 2000 10:51:53 +0200
From:  Hans Aberg <haberg@matematik.su.se>
Subject:  Re: Flex 2.5.4.1 Bugs
To:  Vern Paxson <vern@ee.lbl.gov>
Cc:  king@reasoning.com
X-Sender:  haberg@pop.matematik.su.se (Unverified)
In-Reply-To:  <200010050636.e956axT12828@daffy.ee.lbl.gov>
References:  Your message of Sun, 01 Oct 2000 20:32:48 PDT.
Mime-Version:  1.0
Content-Type:  text/plain; charset="us-ascii"
Status:  U

At 23.36 -0700 0-10-04, Vern Paxson wrote:
>Please note, Dick King (king@reasoning.com) has taken over flex maintenance
>and development.  I've cc'd him.

OK.

To: Dick King
Bison seems to under revision right now (I'm working hard with the Bison
development team just these days on pinpointing some bugs). -- Perhaps Flex
& Bison development should somehow be synchronized.

I have labelled Flex as BSD. Is that correct?

  Hans Aberg



------- Message 13

Date:  Fri, 06 Oct 2000 02:04:11 PDT
From:  Vern Paxson <vern>
Subject:  Re: C++, flex under cygwin and Visual C++
To:  "Simon J. Julier" <sjulier@erols.com>
Cc:  king@reasoning.com
In-reply-to:  Your message of Thu, 05 Oct 2000 07:15:17 PDT.

> Many apologies if either (a) it's a stupid question or (b) if I'm emailing 
> the wrong person.

It's (b) :-).  Dick King (king@reasoning.com) has taken over flex
maintenance and development.  I've cc'd him.

> I have been using flex (v. impressive) to write a parser 
> for a C++ program. The program is being compiled using a Windows 
> 2000/Windows NT machine using the cygwin tool set and the Microsoft Visual 
> C++ compiler. Because the cygwin distribution does not include FlexLexer.h, 
> I took the advice from the man page and simply renamed lex.yy.c as 
> lex.yy.cxx and compiled this as a C++ program. This almost works except for 
> the fact that, in C++ compile mode, there is a dependency on unistd.h due 
> to the following code snippet:
> 
> #ifdef __cplusplus
> 
> #include <stdlib.h>
> #include <unistd.h>
> 
> ... (other stuff) ...
> 
> Since the Visual C++ compiler does not come with the header file unistd.h, 
> I manually modified the code to:
> 
> #ifdef __cplusplus
> 
> #include <stdlib.h>
> #ifndef _WIN32
> #include <unistd.h>
> #endif /* ! _WIN32 */
> 
> Is this the "right way" to solve the problem?

I imagine it is.  This problem has come up a bunch of times, and,
much as I hate adding #ifdef's to the skeleton, I haven't thought of
any other way to do it.

> If so, would it be possible 
> to consider making the appropriate changes to flex.skl?

Sounds okay to me, but this is now Dick's call.

		Vern

------- Message 14

Date:  Fri, 6 Oct 2000 09:31:08 -0700 (PDT)
From:  Dick King <king@reasoning.com>
Subject:  Re: C++, flex under cygwin and Visual C++
To:  vern@ee.lbl.gov
Cc:  sjulier@erols.com
MIME-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
In-Reply-To:  <200010060904.e9694BU17584@daffy.ee.lbl.gov>
References:  <200010060904.e9694BU17584@daffy.ee.lbl.gov>
X-Mailer:  VM 6.61 under 19.14 XEmacs Lucid



I'm getting my flex support operations organized, finally.

I've established a new eddress, flex@2xtreme.net .

I'll start looking at the small bug fixes flex has been asked for in a week or
so.  Then i will get to meaty changes.

One meaty change i've been asked for which i would like to do [i did it for my
current company's lexer product so i think i understand the issues] is a
character level prefilter infrastructure, that would allow you to integrate a
cpp-style preprocessor [rather than making it a separate pass as is the norm]
or to write a flex lexer for a language like FORTRAN or COBOL or that language
i've heard about whose name escapes me where indentation is syntactically
significant.

Vern Paxson writes:
 >> Many apologies if either (a) it's a stupid question or (b) if I'm emailing 
 >> the wrong person.
 >
 >It's (b) :-).  Dick King (king@reasoning.com) has taken over flex
 >maintenance and development.  I've cc'd him.
 >
 >> I have been using flex (v. impressive) to write a parser 
 >> for a C++ program. The program is being compiled using a Windows 
 >> 2000/Windows NT machine using the cygwin tool set and the Microsoft Visual 
 >> C++ compiler. Because the cygwin distribution does not include FlexLexer.h, 
 >> I took the advice from the man page and simply renamed lex.yy.c as 
 >> lex.yy.cxx and compiled this as a C++ program. This almost works except for 
 >> the fact that, in C++ compile mode, there is a dependency on unistd.h due 
 >> to the following code snippet:
 >> 
 >> #ifdef __cplusplus
 >> 
 >> #include <stdlib.h>
 >> #include <unistd.h>
 >> 
 >> ... (other stuff) ...
 >> 
 >> Since the Visual C++ compiler does not come with the header file unistd.h, 
 >> I manually modified the code to:
 >> 
 >> #ifdef __cplusplus
 >> 
 >> #include <stdlib.h>
 >> #ifndef _WIN32
 >> #include <unistd.h>
 >> #endif /* ! _WIN32 */
 >> 
 >> Is this the "right way" to solve the problem?
 >
 >I imagine it is.  This problem has come up a bunch of times, and,
 >much as I hate adding #ifdef's to the skeleton, I haven't thought of
 >any other way to do it.
 >
 >> If so, would it be possible 
 >> to consider making the appropriate changes to flex.skl?
 >
 >Sounds okay to me, but this is now Dick's call.
 >
 >		Vern
 >

------- Message 15

Date:  Sun, 08 Oct 2000 01:19:08 PDT
From:  Vern Paxson <vern>
Subject:  Re: C++, flex under cygwin and Visual C++
To:  Dick King <king@reasoning.com>
In-reply-to:  Your message of Fri, 06 Oct 2000 09:31:08 PDT.

> One meaty change i've been asked for which i would like to do [i did it for my
> current company's lexer product so i think i understand the issues] is a
> character level prefilter infrastructure, that would allow you to integrate a
> cpp-style preprocessor [rather than making it a separate pass as is the norm]
> or to write a flex lexer for a language like FORTRAN or COBOL or that language
> i've heard about whose name escapes me where indentation is syntactically
> significant.

That would be really nice to have!

		Vern

------- Message 16

Date:  Mon, 9 Oct 2000 12:27:13 -0400 (EDT)
From:  Andrew Droffner <adroffne@versus.dmz.advance.net>
Subject:  Re: Flex & Multiple Threads 
To:  Vern Paxson <vern@ee.lbl.gov>
Cc:  help-flex@gnu.org, king@reasoning.com
In-Reply-To:  <200010050752.e957qGq13639@daffy.ee.lbl.gov>
MIME-Version:  1.0
Content-Type:  TEXT/PLAIN; charset=US-ASCII

I'm unable to compile the scan.l LEX specification using the bootstrap
scanner, initscan.c. I have tried it on the latest flex source from GNU,
and the tarball from your page at ee.lbl.gov.

If I drop the "%option reentrant" from scan.l, then it all compiles. I
doubt it works right then. What else do I need here, a new initscan.c?

Thanks for the help. 

On Thu, 5 Oct 2000, Vern Paxson wrote:

> > I'm interested in building a multi-threaded server using YACC & Lex.
> > The server & client parse the data they pass to each other.
> > 
> > The Bison dialect of YACC uses a "%pure_parser" option to force re-entrant
> > code. I would like a Flex equivalent; is there one already?
> 
> There are patches to flex to support reentrant scanners, which I've
> put in ftp://ftp.ee.lbl.gov/.vp-flex-reentrant.tar.gz .
> 
> Also, please note, flex maintenance has been taken over by Dick King
> <king@reasoning.com>.
> 
> 		Vern
> 

- -- 
[ Andrew Droffner
[ Advance Publications Internet
[
[ adroffne@advance.net


------- Message 17

Date:  Tue, 10 Oct 2000 22:40:12 PDT
From:  Vern Paxson <vern>
Subject:  Re: Flex & Multiple Threads 
To:  Andrew Droffner <adroffne@versus.dmz.advance.net>
Cc:  help-flex@gnu.org, king@reasoning.com
In-reply-to:  Your message of Mon, 09 Oct 2000 12:27:13 PDT.

> I'm unable to compile the scan.l LEX specification using the bootstrap
> scanner, initscan.c. I have tried it on the latest flex source from GNU,
> and the tarball from your page at ee.lbl.gov.
> 
> If I drop the "%option reentrant" from scan.l, then it all compiles. I
> doubt it works right then. What else do I need here, a new initscan.c?

I don't have any firsthand experience with those patches, unfortunately,
so all I can offer is to try building without the %option reentrant;
then run flex on scan.l to build a new scan.c; recompile using that;
run "make check" to make sure it's working okay; then try putting the
%option reentrant back in.  Because I believe the modified scan.l doesn't
actually need %option reentrant, it's just there to exercise the scanning
during "make check".

		Vern

------- Message 18

Date:  Wed, 11 Oct 2000 11:42:35 PDT
From:  Vern Paxson <vern>
Subject:  Re: Flex & Multiple Threads 
To:  Dick King <king@reasoning.com>
In-reply-to:  Your message of Wed, 11 Oct 2000 11:29:49 PDT.

> How do i read help-flex@gnu.org?

Try sending mail to help-flex-request@gnu.org with a message body of
"subscribe".  Let me know if that doesn't work.

		Ven

------- End of Forwarded Messages


1,,
X-Coding-System: nil
Mail-from: From vern@daffy.ee.lbl.gov  Wed Mar 14 04:01:40 2001
Return-Path: <vern@daffy.ee.lbl.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA09964
	for <wlestes@localhost>; Wed, 14 Mar 2001 04:01:40 -0500
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 14 Mar 2001 04:01:40 -0500 (EST)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2E8pse19643
	for <wlestes@hermes.email.uncg.edu>; Wed, 14 Mar 2001 03:51:54 -0500 (EST)
Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA20408
	for <wlestes@uncg.edu>; Wed, 14 Mar 2001 03:51:53 -0500 (EST)
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2E8pqR07884;
	Wed, 14 Mar 2001 00:51:52 -0800 (PST)
Message-Id: <200103140851.f2E8pqR07884@daffy.ee.lbl.gov>
To: wlestes@uncg.edu
Subject: messages sent to Dick King (2 of 2)
Date: Wed, 14 Mar 2001 00:51:52 PST
From: Vern Paxson <vern@ee.lbl.gov>

*** EOOH ***
To: wlestes@uncg.edu
Subject: messages sent to Dick King (2 of 2)
Date: Wed, 14 Mar 2001 00:51:52 PST
From: Vern Paxson <vern@ee.lbl.gov>


------- Forwarded Messages

Date:  Sat, 07 Oct 2000 10:31:22 -0700
From:  "Dick King, flex maintainer" <flex@2xtreme.net>
Subject:  Re: the source tree
To:  vern@ee.lbl.gov
Cc:  flex@2xtreme.net
In-reply-to:  <14814.15467.441052.399457@fiddle.mtview.reasoning.com>
Reply-to:  flex@2xtreme.net
MIME-version:  1.0
X-Mailer:  Forte Agent 1.8/32.548
Content-type:  text/plain; charset=us-ascii
Content-transfer-encoding:  7bit
References:  <14814.15467.441052.399457@fiddle.mtview.reasoning.com>

On Fri, 6 Oct 2000 13:56:11 -0700 (PDT), you wrote:

> > I think i'm prepared to give this a try.
> 
> Cool!, thanks.  Here's a snapshot of the current source tree.  I'm about
> to leave for two week's vacation, not reading email, but upon my return
> I'll put together the stuff-to-do email archive, etc.
> 
> 		Vern
> 

What is the current release?

You sent me 2.5.4a to my office computer on June 20, but i found 2.5.5a on
June 20 and downloaded it to my home computer.

- -dk

PS: when anyone writes to you, tell them about my new eddress
[flex@2xtreme.net]?  Thanks.

- -dk


------- Message 2

Date:  Sun, 08 Oct 2000 01:26:26 PDT
From:  Vern Paxson <vern>
Subject:  Re: a sort of flex-related question :-)
To:  Alan Donovan <alan.donovan@arm.com>
Cc:  flex@2xtreme.net
In-reply-to:  Your message of Thu, 05 Oct 2000 18:49:51 PDT.

> Vern, sorry to write out of the blue like this but I figure that as the
> maintainer of flex, you could probably answer my question in a second.

I'm actually no longer the maintainer.  Dick King has taken over.  He's set
up the address flex@2xtreme.net for flex correspondence.  I've cc'd him.

> I'm writing a tool somewhere between flex and yacc, in which you specify
> a set of rules and actions (as in yacc) but the language is that of
> regular expressions not context-free grammars.
> 
> Each rule may include literals, operators, and simpler (i.e. previously
> declared) rules as components, and have an action.  e.g.
> 
> foo    :[0-9]+   { func1(); }
> 
> bar    :"x"foo   { func2(); }
>        |"y"foo   { func3(); }
> 
> So the NDFA for "bar" actually contains two copies of the NDFA for
> "foo".  My problem arises when trying to determine where in the DFA
> (generated by subset construction) to invoke the actions associated with
> each rule.  All my DFA states are annotated as to which rules (if any)
> they start and which rules (if any) they accept. However this is not
> enough to correctly invoke the actions.
> 
> Consider:
> 
>    foo: ab
>    bar: a
> 
> in the context of some larger expression zip:(foo|bar)"c".
> 
> The DFA for "zip" looks like:
> 
>     a      b      c
>  P ---> Q ---> R ---> T
>         |
>         +----> S
>            c
> 
> P starts rules "foo",  "bar" and "zip". Q accepts "bar" and R accepts
> rule "foo". S and T accept zip.
> 
> On input "abc", how do you know _not_ to invoke the action for rule
> "bar" when you reach state Q (or more correctly, when you receive the
> "b" and move to state R)?
> 
> So the question is: do you think what I am trying to do is possible?

What you are doing looks like a parse, and you can only parse LR(0)
languages with DFAs (if I recall correctly), i.e., those without
lookahead.  The above example requires lookahead to differentiate
matching foo from bar.  So I think you're out of luck here, if
I understand the example correctly.

		Vern

------- Message 3

Date:  Sun, 08 Oct 2000 07:47:01 -0700
From:  "Dick King, flex maintainer" <flex@2xtreme.net>
Subject:  Re: a sort of flex-related question :-)
To:  Vern Paxson <vern@ee.lbl.gov>
Cc:  Alan Donovan <alan.donovan@arm.com>
In-reply-to:  <200010080826.e988QQC23650@daffy.ee.lbl.gov>
Reply-to:  flex@2xtreme.net
MIME-version:  1.0
X-Mailer:  Forte Agent 1.8/32.548
Content-type:  text/plain; charset=us-ascii
Content-transfer-encoding:  7bit
References:  <200010080826.e988QQC23650@daffy.ee.lbl.gov>
Status:  U

On Sun, 08 Oct 2000 01:26:26 PDT, you wrote:

> > Vern, sorry to write out of the blue like this but I figure that as the
> > maintainer of flex, you could probably answer my question in a second.
> 
> I'm actually no longer the maintainer.  Dick King has taken over.  He's set
> up the address flex@2xtreme.net for flex correspondence.  I've cc'd him.
> 
> > I'm writing a tool somewhere between flex and yacc, in which you specify
> > a set of rules and actions (as in yacc) but the language is that of
> > regular expressions not context-free grammars.
> > 
> > Each rule may include literals, operators, and simpler (i.e. previously
> > declared) rules as components, and have an action.  e.g.
> > 
> > foo    :[0-9]+   { func1(); }
> > 
> > bar    :"x"foo   { func2(); }
> >        |"y"foo   { func3(); }
> > 
> > So the NDFA for "bar" actually contains two copies of the NDFA for
> > "foo".  My problem arises when trying to determine where in the DFA
> > (generated by subset construction) to invoke the actions associated with
> > each rule.  All my DFA states are annotated as to which rules (if any)
> > they start and which rules (if any) they accept. However this is not
> > enough to correctly invoke the actions.
> > 
> > Consider:
> > 
> >    foo: ab
> >    bar: a
> > 
> > in the context of some larger expression zip:(foo|bar)"c".
> > 
> > The DFA for "zip" looks like:
> > 
> >     a      b      c
> >  P ---> Q ---> R ---> T
> >         |
> >         +----> S
> >            c
> > 
> > P starts rules "foo",  "bar" and "zip". Q accepts "bar" and R accepts
> > rule "foo". S and T accept zip.
> > 
> > On input "abc", how do you know _not_ to invoke the action for rule
> > "bar" when you reach state Q (or more correctly, when you receive the
> > "b" and move to state R)?
> > 
> > So the question is: do you think what I am trying to do is possible?
> 
> What you are doing looks like a parse, and you can only parse LR(0)
> languages with DFAs (if I recall correctly), i.e., those without
> lookahead.  The above example requires lookahead to differentiate
> matching foo from bar.  So I think you're out of luck here, if
> I understand the example correctly.
> 
> 		Vern

Vern is mostly correct.  Small extensions can give you a single token
[character, here] lookahead but that is not enough to deliver the
functionality you want.  Consider

foo: a    { foo_fn(); }
bar: ab   { bar_fn(); }

mumble:    foo bcde.....yZ   { any }
         | bar  cde.....yW   { any }

- -dk


------- Message 4

Date:  Tue, 10 Oct 2000 02:36:57 PDT
From:  Vern Paxson <vern>
Subject:  Re: Bison's semantic parsers
To:  Akim Demaille <akim@epita.fr>
Cc:  Hans Aberg <haberg@matematik.su.se>,
        Davy Durham <david.durham@wcom.com>, Bison Help <help-bison@gnu.org>,
        flex@2xtreme.net
In-reply-to:  Your message of 10 Oct 2000 11:43:07 PDT.

> Nope, indeed Vern seems also to say he won't work on Flex again.

Unfortunately, yes.

> Vern, could we imagine that Flex be put on the CVS server of the FSF,
> subversions.gnu.org?

Thank you very much for the offer, I certainly appreciate it.  However,
Dick King has already volunteered to take over maitenance and development.
I've cc'd the address he's using for flex-related mail, flex@2xtreme.net.

		Vern

------- Message 5

Date:  Tue, 10 Oct 2000 13:30:02 +0200
From:  Hans Aberg <haberg@matematik.su.se>
Subject:  Re: Bison's semantic parsers
To:  Vern Paxson <vern@ee.lbl.gov>
Cc:  Akim Demaille <akim@epita.fr>, Davy Durham <david.durham@wcom.com>,
       Bison Help <help-bison@gnu.org>, flex@2xtreme.net
X-Sender:  haberg@pop.matematik.su.se
In-Reply-To:  <200010100936.e9A9avg01250@daffy.ee.lbl.gov>
References:  Your message of 10 Oct 2000 11:43:07 PDT.
Mime-Version:  1.0
Content-Type:  text/plain; charset="us-ascii"
Status:  U

At 02.36 -0700 0-10-10, Vern Paxson wrote:
>> Vern, could we imagine that Flex be put on the CVS server of the FSF,
>> subversions.gnu.org?
>
>Thank you very much for the offer, I certainly appreciate it.  However,
>Dick King has already volunteered to take over maitenance and development.
>I've cc'd the address he's using for flex-related mail, flex@2xtreme.net.

At 11.43 +0200 0-10-10, Akim Demaille wrote:
>Hans> Perhaps Bison and Flex should be bundled, or tuned up together.
>
>It's a good but bad idea.  For instance you could also argue that
>Autoconf, Automake and Libtool be merged, but if you just observe that
>they have totally different evolutions, it becomes infeasible.  While
>definitely a seducing idea, it wouldn't work IMHO.

My experimenting with C++ though suggests that Bison and Flex needs some
synchronizing if one should take full advantage of that language:

- -- One thing that come to my mind is that instead of letting the Bison
output .cc file include the Flex .cc file, they communicate the information
via header files.

- -- When experimenting C++ manipulator style I mentioned before
    Parser parser;
    parser_value val;
    ifstream ifs("...", ios_base::in | ios_base::binary);
    ofstream ofs("...");
    if (ifs) try { for (;;) {
        ifs >> parser >> val;
        cout << val << endl;
    }
I experience problems with how Flex resets its state, and how streams and
such are initialized.

For example, if I try to gobble up UNIX, MacOS & DOS line separators in Flex by
    \n|\r|\r\n		 { return '\n'; }
then, when Flex sees a \r it must first look ahead to verify the next
character isn't a \n. However, if a successful value "val" is produced,
then the next time  one ends up at the line ifs >> parser >> val, Flex is
reset, and as a consequence, the extra character needed to the \n check is
gobbled up.

One can get around this by not allowing this ifs >> parser >> val
construct, then the advantage of freer, and therefore easier user syntaxes
are lost.

- -- I think that there might be some other issues, such as how to properly
localize all data that Bison and Flex uses, and how they should communicate
that. These are more questions of hand-shaking than bundling them together
as a single program.

As for the comparisons of Bison and Flex versus other types of
compiler-compilers, I think the main disadvantage with them (the former) is
that they are extremely difficult to debug. It's rather hopeless trying to
debug the C/C++ files they produce as output. If one could hook up an
debugger though, so that one could step throw the .l/.y source files, just
as in the case of visual debugging of a C/C++ file, then this would change,
and it would not make any difference of what method is used, as long as it
is efficient and does the job.

  Hans Aberg



------- Message 6

Date:  10 Oct 2000 13:51:33 +0200
From:  Akim Demaille <akim@epita.fr>
Subject:  Re: Bison's semantic parsers
To:  Vern Paxson <vern@ee.lbl.gov>
Cc:  Hans Aberg <haberg@matematik.su.se>, Davy Durham <david.durham@wcom.com>,
       Bison Help <help-bison@gnu.org>, flex@2xtreme.net,
       Didier Verna <didier@epita.fr>
References:  <200010100936.e9A9avg01250@daffy.ee.lbl.gov>
In-Reply-To:  Vern Paxson's message of "Tue, 10 Oct 2000 02:36:57 PDT"
Lines:  27
User-Agent:  Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)
MIME-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Status:  U

>>>>> "Vern" == Vern Paxson <vern@ee.lbl.gov> writes:

>> Nope, indeed Vern seems also to say he won't work on Flex again.

Vern> Unfortunately, yes.

Just by curiosity: you're no longer interested, or you don't have time
enough?

>> Vern, could we imagine that Flex be put on the CVS server of the
>> FSF, subversions.gnu.org?

Vern> Thank you very much for the offer, I certainly appreciate it.

I'm also quite pleased to see my offer pleased you so much :)

Vern> However, Dick King has already volunteered to take over
Vern> maitenance and development.  I've cc'd the address he's using
Vern> for flex-related mail, flex@2xtreme.net.

Thanks!

Then, I shall restate my question for flex@2xtreme: is there a CVS
server or something which would make it possible to participate the
development of Flex?

        Akim

------- Message 7

Date:  Tue, 10 Oct 2000 14:15:53 PDT
From:  Vern Paxson <vern>
Subject:  Re: Bison's semantic parsers
To:  Akim Demaille <akim@epita.fr>
Cc:  Hans Aberg <haberg@matematik.su.se>,
        Davy Durham <david.durham@wcom.com>, Bison Help <help-bison@gnu.org>,
        flex@2xtreme.net, Didier Verna <didier@epita.fr>
In-reply-to:  Your message of 10 Oct 2000 13:51:33 PDT.

> Just by curiosity: you're no longer interested, or you don't have time
> enough?

No time ...

		Vern

------- Message 8

Date:  Thu, 12 Oct 2000 20:07:57 PDT
From:  Vern Paxson <vern>
Subject:  Re: Flex 2.5.4 Bug 
To:  Cliff Sarginson <csarginson@descartes.com>
Cc:  flex@2xtreme.net
In-reply-to:  Your message of Thu, 12 Oct 2000 13:52:06 +0200.

> I dont know if you still receive bug reports about flex ..

I'm not, Dick King (cc'd) has taken over maintenance & development.

> but here is one.. !
> 
> In a scanner we have ..
> 
> %start this that msg another
> 
> The field "msg" gets turned into a
> 
> #define msg 3
> 
> We do not define a  xxx_YY_FATAL_ERROR
> 
> So flex supplies one, as a macro, with a definition:
> 
> xxx_yy_fatal_error (const msg [])
> 
> The "C" pre-processor merrily turns this into
> 
> xx_yy_fatal_error ( const 3  [] )
> 
> Are we really the first to come across this ? Flex should maybe
> be a bit more creative with it's paramater naming for macro's
> or do some other name space checking maybe ?

Yep, this is a known problem.  The difficulty is that when lex was
originally designed, it allowed you to switch start states using
"BEGIN msg" rather than "BEGIN(msg)".  This means that either you
do a major analysis of the source to only patch up true BEGIN's
(rather than, say, one that occurs inside a string literal); or you
use a gross hack in defining BEGIN, like flex does:

	#define BEGIN yy_start = 1 + 2 *

With this sort of definition, there's no way to modify the namespace
consumed by start states.  If instead you could require the ()'s, then
you could use

	#define BEGIN(state) yy_start = 1 + 2 * (YY_STATE_ ## state)

and all would be happy ...

		Vern

------- Message 9

Date:  Thu, 12 Oct 2000 20:08:03 PDT
From:  Vern Paxson <vern>
Subject:  Re: a sort of flex-related question :-) 
To:  Alan.Donovan@arm.com
Cc:  flex@2xtreme.net
In-reply-to:  Your message of Thu, 12 Oct 2000 15:36:38 BST.

> Thank you both for your help.  I can probably rearrange my grammars to be
> LR(0). Can you give me a reference for the algorithm for LR(0) parsing with
> a DFA?

Dunno off hand, but I imagine it must be in the Dragon Book.

		Vern

------- Message 10

Date:  Thu, 02 Nov 2000 11:56:35 PST
From:  Vern Paxson <vern>
Subject:  Re: flex documentation enhancement request
To:  Tracy Camp <campt@thalvors.miralink.com>
Cc:  flex@2xtreme.net
In-reply-to:  Your message of Thu, 02 Nov 2000 10:17:17 PST.

Yes, a lot of people get bitten by this, unfortunately.

Note, Dick King has taken over flex maintenance and development, and has
set up the address flex@2xtreme.net for flex correspondence.  I've cc'd him.

		Vern


> As a new user to flex I found the following situation quite confusing and
> think a breif caviate note in the manual would have helped out (or at
> least an emphisis if there was one) :)
> 
> when using external variables when patching a pattern such as:
> 
> %x buffer_dev
> %{
> extern struct mystruct astruct; /* struct containing member buffer_dev */
> %}
> %%
> buffer_dev=	BEGIN(buffer_dev);
> 
> <buffer_dev>.*$ {
> 	strncpy(astruct.buffer_dev,yytext,255);
> 	}
> %%
> 
> this causes all sorts of problems because 'buffer_dev' is defined by flex
> at some point and I used buffer_dev as a member of an external structure
> that I'm trying to fill in with flex.  This causes all sorts of compile
> problems.  Renaming my 'buffer_dev' condition to something else works
> around this, but it was not immediately obvious what the problem was from
> the compile error.  For all else I found your manual to be of GREAT help -
> thanks!
> 
> t.
> 
> Tracy Camp
> Product Development
> Miralink Corp.PDX
> Portland OR
> 503-223-3140
> 

------- Message 11

Date:  Thu, 09 Nov 2000 23:03:38 PST
From:  Vern Paxson <vern>
Subject:  Re: Standard C++ compatibility for flex++ 
To:  Volker Simonis <simonis@informatik.uni-tuebingen.de>
Cc:  help-flex@gnu.org, flex@2xtreme.net
In-reply-to:  Your message of Wed, 08 Nov 2000 15:50:36 +0100.

> Is there any chance for a new release of flex? Is there a maintainer right now?
> Is it possible to submit some bug-fixes or to contribute in some way?

Dick King has taken over flex development and maintenance.  You can
reach him at flex@2xtreme.net (cc'd).

		Vern

------- Message 12

Date:  Wed, 14 Feb 2001 12:57:37 PST
From:  Vern Paxson <vern>
Subject:  Re: Bug#84780: Fix for info documentation (fwd)
To:  Santiago Vila <sanvila@unex.es>
Cc:  Gordon Sadler <gbsadler1@lcisp.com>, flex@2xtreme.net
In-reply-to:  Your message of Wed, 14 Feb 2001 15:40:30 PST.

Please note, Dick King has taken over flex maintenance and development,
and has set up the address flex@2xtreme.net for flex correspondence.

		Vern


> Hello.
> 
> I received this from the Debian Bug System.
> 
> ---------- Forwarded message ----------
> Date: Sun, 4 Feb 2001 02:41:30 -0600
> From: Gordon Sadler <gbsadler1@lcisp.com>
> To: Debian Bug Tracking System <submit@bugs.debian.org>
> Subject: #84780: Fix for info documentation
> 
> Package: flex
> Version: 2.5.4a-9
> Severity: wishlist
> 
> Attached find a diff to MISC/texinfo/flex.texi
> I noticed during the texi2html run it complains of first section not
> being toplevel. I opened the texi file and changed the toplevel
> sections to chapters. While I was there noticed the comment about
> fixing all of the See... to make them @xref, so I did.
> 
> Looks like upstream is pretty much done ... but you seem to be in
> touch, last changelog mentions manpage patch from author?
> 
> If you use this texi to regen the info the x-refs make it a little more
> useable. Maybe I'll add the index in next -)
> 
> Gordon Sadler
> ------------------------------------------------------------------------
> This is the patch in unified format:
> 
> diff -r -u flex-2.5.4.orig/MISC/texinfo/flex.texi flex-2.5.4/MISC/texinfo/flex.texi
> --- flex-2.5.4.orig/MISC/texinfo/flex.texi	Sun Jul 27 04:47:21 1997
> +++ flex-2.5.4/MISC/texinfo/flex.texi	Wed Feb 14 15:34:49 2001
> @@ -151,12 +151,12 @@
>  @end ifinfo
> 
>  @node Name, Synopsis, Top, Top
> -@section Name
> +@chapter Name
> 
>  flex - fast lexical analyzer generator
> 
>  @node Synopsis, Overview, Name, Top
> -@section Synopsis
> +@chapter Synopsis
> 
>  @example
>  flex [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]
> @@ -164,7 +164,7 @@
>  @end example
> 
>  @node Overview, Description, Synopsis, Top
> -@section Overview
> +@chapter Overview
> 
>  This manual describes @code{flex}, a tool for generating programs
>  that perform pattern-matching on text.  The manual
> @@ -244,7 +244,7 @@
>  @end table
> 
>  @node Description, Examples, Overview, Top
> -@section Description
> +@chapter Description
> 
>  @code{flex} is a tool for generating @dfn{scanners}: programs which
>  recognized lexical patterns in text.  @code{flex} reads the given
> @@ -260,7 +260,7 @@
>  corresponding C code.
> 
>  @node Examples, Format, Description, Top
> -@section Some simple examples
> +@chapter Some simple examples
> 
>  First some simple examples to get the flavor of how one
>  uses @code{flex}.  The following @code{flex} input specifies a scanner
> @@ -371,7 +371,7 @@
>  following sections.
> 
>  @node Format, Patterns, Examples, Top
> -@section Format of the input file
> +@chapter Format of the input file
> 
>  The @code{flex} input file consists of three sections, separated
>  by a line with just @samp{%%} in it:
> @@ -439,7 +439,7 @@
>  where the pattern must be unindented and the action must
>  begin on the same line.
> 
> -See below for a further description of patterns and
> +@xref{Patterns}, for a further description of patterns and
>  actions.
> 
>  Finally, the user code section is simply copied to
> @@ -468,7 +468,7 @@
>  is also copied verbatim to the output up to the next "*/".
> 
>  @node Patterns, Matching, Format, Top
> -@section Patterns
> +@chapter Patterns
> 
>  The patterns in the input are written using an extended
>  set of regular expressions.  These are:
> @@ -697,7 +697,7 @@
>  @end itemize
> 
>  @node Matching, Actions, Patterns, Top
> -@section How the input is matched
> +@chapter How the input is matched
> 
>  When the generated scanner is run, it analyzes its input
>  looking for strings which match any of its patterns.  If
> @@ -773,7 +773,7 @@
>  classes (the @code{c++} option; see below).
> 
>  @node Actions, Generated scanner, Matching, Top
> -@section Actions
> +@chapter Actions
> 
>  Each pattern in a rule has a corresponding action, which
>  can be any arbitrary C statement.  The pattern ends at the
> @@ -1035,7 +1035,7 @@
>  @end itemize
> 
>  @node Generated scanner, Start conditions, Actions, Top
> -@section The generated scanner
> +@chapter The generated scanner
> 
>  The output of @code{flex} is the file @file{lex.yy.c}, which contains
>  the scanning routine @samp{yylex()}, a number of tables used by
> @@ -1136,15 +1136,15 @@
> 
>  Three routines are available for scanning from in-memory
>  buffers rather than files: @samp{yy_scan_string()},
> -@samp{yy_scan_bytes()}, and @samp{yy_scan_buffer()}.  See the discussion
> -of them below in the section Multiple Input Buffers.
> +@samp{yy_scan_bytes()}, and @samp{yy_scan_buffer()}.
> +@xref{Multiple buffers, ,Multiple Input Buffers}.
> 
>  The scanner writes its @samp{ECHO} output to the @code{yyout} global
>  (default, stdout), which may be redefined by the user
>  simply by assigning it to some other @code{FILE} pointer.
> 
>  @node Start conditions, Multiple buffers, Generated scanner, Top
> -@section Start conditions
> +@chapter Start conditions
> 
>  @code{flex} provides a mechanism for conditionally activating
>  rules.  Any rule whose pattern is prefixed with "<sc>"
> @@ -1500,7 +1500,7 @@
>  @samp{%option stack} directive (see Options below).
> 
>  @node Multiple buffers, End-of-file rules, Start conditions, Top
> -@section Multiple input buffers
> +@chapter Multiple input buffers
> 
>  Some scanners (such as those which support "include"
>  files) require reading from several input streams.  As
> @@ -1675,7 +1675,7 @@
>  @end table
> 
>  @node End-of-file rules, Miscellaneous, Multiple buffers, Top
> -@section End-of-file rules
> +@chapter End-of-file rules
> 
>  The special rule "<<EOF>>" indicates actions which are to
>  be taken when an end-of-file is encountered and yywrap()
> @@ -1735,7 +1735,7 @@
>  @end example
> 
>  @node Miscellaneous, User variables, End-of-file rules, Top
> -@section Miscellaneous macros
> +@chapter Miscellaneous macros
> 
>  The macro @code{YY_USER_ACTION} can be defined to provide an
>  action which is always executed prior to the matched
> @@ -1800,7 +1800,7 @@
>  the @code{YY_BREAK} is inaccessible.
> 
>  @node User variables, YACC interface, Miscellaneous, Top
> -@section Values available to the user
> +@chapter Values available to the user
> 
>  This section summarizes the various values available to
>  the user in the rule actions.
> @@ -1865,7 +1865,7 @@
>  @end itemize
> 
>  @node YACC interface, Options, User variables, Top
> -@section Interfacing with @code{yacc}
> +@chapter Interfacing with @code{yacc}
> 
>  One of the main uses of @code{flex} is as a companion to the @code{yacc}
>  parser-generator.  @code{yacc} parsers expect to call a routine
> @@ -1890,7 +1890,7 @@
>  @end example
> 
>  @node Options, Performance, YACC interface, Top
> -@section Options
> +@chapter Options
>  @code{flex} has the following options:
> 
>  @table @samp
> @@ -1903,8 +1903,8 @@
>  and @samp{-Cf} or @samp{-CF} is used, the generated scanner will
>  run faster (see the @samp{-p} flag).  Only users who wish
>  to squeeze every last cycle out of their scanners
> -need worry about this option.  (See the section on
> -Performance Considerations below.)
> +need worry about this option.  (@pxref{Performance, ,
> +Performance Considerations})
> 
>  @item -c
>  is a do-nothing, deprecated option included for
> @@ -2138,8 +2138,7 @@
> 
>  @item -+
>  specifies that you want flex to generate a C++
> -scanner class.  See the section on Generating C++
> -Scanners below for details.
> +scanner class.  @xref{C++, ,Generating C++ Scanners}.
> 
>  @item -C[aefFmr]
>  controls the degree of table compression and, more
> @@ -2419,8 +2418,7 @@
>  function @samp{foo::yylex()} instead of @samp{yyFlexLexer::yylex()}.
>  It also generates a @samp{yyFlexLexer::yylex()} member function that
>  emits a run-time error (by invoking @samp{yyFlexLexer::LexerError()})
> -if called.  See Generating C++ Scanners, below, for additional
> -information.
> +if called.  @xref{C++, ,Generating C++ Scanners}.
> 
>  A number of options are available for lint purists who
>  want to suppress the appearance of unneeded routines in
> @@ -2439,7 +2437,7 @@
>  unless you use @samp{%option stack}).
> 
>  @node Performance, C++, Options, Top
> -@section Performance considerations
> +@chapter Performance considerations
> 
>  The main design goal of @code{flex} is that it generate
>  high-performance scanners.  It has been optimized for dealing
> @@ -2756,7 +2754,7 @@
>  the two is at about 8K characters/token.
> 
>  @node C++, Incompatibilities, Performance, Top
> -@section Generating C++ scanners
> +@chapter Generating C++ scanners
> 
>  @code{flex} provides two different ways to generate scanners for
>  use with C++.  The first way is to simply compile a
> @@ -2975,7 +2973,7 @@
>  releases.
> 
>  @node Incompatibilities, Diagnostics, C++, Top
> -@section Incompatibilities with @code{lex} and POSIX
> +@chapter Incompatibilities with @code{lex} and POSIX
> 
>  @code{flex} is a rewrite of the AT&T Unix @code{lex} tool (the two
>  implementations do not share any code, though), with some
> @@ -3051,8 +3049,8 @@
> 
>  Also note that flex C++ scanner classes @emph{are}
>  reentrant, so if using C++ is an option for you, you
> -should use them instead.  See "Generating C++
> -Scanners" above for details.
> +should use them instead.  @xref{C++, ,Generating C++
> +Scanners}.
> 
>  @item
>  @samp{output()} is not supported.  Output from the @samp{ECHO}
> @@ -3198,7 +3196,7 @@
>  line.
> 
>  @node Diagnostics, Files, Incompatibilities, Top
> -@section Diagnostics
> +@chapter Diagnostics
> 
>  @table @samp
>  @item warning, rule cannot be matched
> @@ -3251,8 +3249,7 @@
>  scanner specification includes recognizing the 8-bit
>  character @var{x} and you did not specify the -8 flag, and your
>  scanner defaulted to 7-bit because you used the @samp{-Cf} or @samp{-CF}
> -table compression options.  See the discussion of the @samp{-7}
> -flag for details.
> +table compression options. @xref{Options, ,@samp{-7}flag}.
> 
>  @item flex scanner push-back overflow
>  you used @samp{unput()} to push
> @@ -3285,7 +3282,7 @@
>  @end table
> 
>  @node Files, Deficiencies, Diagnostics, Top
> -@section Files
> +@chapter Files
> 
>  @table @file
>  @item -lfl
> @@ -3311,7 +3308,7 @@
>  @end table
> 
>  @node Deficiencies, See also, Files, Top
> -@section Deficiencies / Bugs
> +@chapter Deficiencies / Bugs
> 
>  Some trailing context patterns cannot be properly matched
>  and generate warning messages ("dangerous trailing
> @@ -3365,7 +3362,7 @@
>  The @code{flex} internal algorithms need documentation.
> 
>  @node See also, Author, Deficiencies, Top
> -@section See also
> +@chapter See also
> 
>  @code{lex}(1), @code{yacc}(1), @code{sed}(1), @code{awk}(1).
> 
> @@ -3380,7 +3377,7 @@
>  (deterministic finite automata).
> 
>  @node Author,  , See also, Top
> -@section Author
> +@chapter Author
> 
>  Vern Paxson, with the help of many ideas and much inspiration from
>  Van Jacobson.  Original version by Jef Poskanzer.  The fast table
> 

------- End of Forwarded Messages


1, answered,,
X-Coding-System: nil
Mail-from: From vern@daffy.ee.lbl.gov  Mon Mar 26 18:48:05 2001
Return-Path: <vern@daffy.ee.lbl.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA00754
	for <wlestes@localhost>; Mon, 26 Mar 2001 18:48:05 -0500
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Mon, 26 Mar 2001 18:48:05 -0500 (EST)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2QNVUe03862
	for <wlestes@hermes.email.uncg.edu>; Mon, 26 Mar 2001 18:31:30 -0500 (EST)
Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA18856
	for <wlestes@uncg.edu>; Mon, 26 Mar 2001 18:31:28 -0500 (EST)
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2QNVPc23647;
	Mon, 26 Mar 2001 15:31:25 -0800 (PST)
Message-Id: <200103262331.f2QNVPc23647@daffy.ee.lbl.gov>
To: wlestes@uncg.edu
Subject: Fwd: release 2.5 of flex...
Date: Mon, 26 Mar 2001 15:31:25 PST
From: Vern Paxson <vern@ee.lbl.gov>

*** EOOH ***
To: wlestes@uncg.edu
Subject: Fwd: release 2.5 of flex...
Date: Mon, 26 Mar 2001 15:31:25 PST
From: Vern Paxson <vern@ee.lbl.gov>

(Any luck finding some flex cycles?)

------- Forwarded Message

Date:  Mon, 26 Mar 2001 00:06:31 +0200
From:  Kai Hennig <khennig@pobox.com>
Subject:  release 2.5 of flex...
To:  vern@ee.lbl.gov
X-Spam-Filter:  check_local@studserv.stud.uni-hannover.de by digitalanswers.org
Reply-To:  khennig@pobox.com
Organization:  TRI Systems
X-Mailer:  Mozilla 4.76 (Macintosh; U; PPC)
X-Accept-Language:  en
MIME-Version:  1.0
Content-Type:  text/plain; charset=iso-8859-1
Content-Transfer-Encoding:  8bit

> Extract from file 'INSTALL' from flex-2.5.4
>
> ...
> If you need to do unusual things to compile the package, we encourage
> you to figure out how `configure' could check whether to do them, and
> mail diffs or instructions to the address given in the README so we
> can include them in the next release.
> ...

Hi Vern,

I'm using your flex package 2.5.4 on a Macintosh with Apple's Macintosh
Programmers Workshop 3.5 (MPW). There is a description comming along
with your package for the THINK C version 6.0 from Scott Hofmann
(23-JUL-94) which is not helpfull for using the package with MPW. I
enclosed a brief instruction for using the flex package with MPW which
might be more helpfull since Think C is no longer officially available
(as far as I know).

greetings,
Kai




Notes on the MPW 3.5 version of Flex 2.5.4
Kai Hennig 25-Mar-2001
Internet: khennig@pobox.com

To compile and run Flex 2.5.4 as an MPW Tool no changes to any file have
to be done. Instead add a file called 'config.h' to the files listed in
the command lines given below with the content listed below the
commands. To compile and link all necessary files execute the following
commands in the MPW shell:

MrC -noMapCR -alloca -ansi strict main.c
MrC -noMapCR -alloca -ansi strict ccl.c
MrC -noMapCR -alloca -ansi strict dfa.c
MrC -noMapCR -alloca -ansi strict ecs.c
MrC -noMapCR -alloca -ansi strict gen.c
MrC -noMapCR -alloca -ansi strict misc.c
MrC -noMapCR -alloca -ansi strict nfa.c
MrC -noMapCR -alloca -ansi strict -w off parse.c
MrC -noMapCR -alloca -ansi strict initscan.c
MrC -noMapCR -alloca -ansi strict tblcmp.c
MrC -noMapCR -alloca -ansi strict sym.c
MrC -noMapCR -alloca -ansi strict skel.c
MrC -noMapCR -alloca -ansi strict yylex.c
PPCLink -t 'MPST' -c 'MPS ' -o flex *
main.c.o *
ccl.c.o *
dfa.c.o *
ecs.c.o *
gen.c.o *
misc.c.o *
nfa.c.o *
parse.c.o *
initscan.c.o *
tblcmp.c.o *
sym.c.o *
skel.c.o *
yylex.c.o *
"{SharedLibraries}InterfaceLib" *
"{SharedLibraries}StdCLib" *
"{SharedLibraries}MathLib" *
"{PPCLibraries}StdCRuntime.o" *
"{PPCLibraries}PPCCRuntime.o" *
"{PPCLibraries}MrCIOStreams.o" *
"{PPCLibraries}PPCToolLibs.o"


/* File 'config.h' */
/* Define to `unsigned' if <sys/types.h> doesn't define.  */
#undef size_t

/* Define if you have the ANSI C header files.  */
#define STDC_HEADERS 1

/* Define if you have the <string.h> header file.  */
#define HAVE_STRING_H 1

/* Define if you have <alloca.h> and it should be used (not on 
Ultrix).  */
#define HAVE_ALLOCA_H 1

/* Define if you use FAT file system, leave undefined for NTFS */
#undef SHORT_FILE_NAMES 

/* Never do interactive input */
#define YY_NEVER_INTERACTIVE 1
/* EOF File 'config.h' */

------- End of Forwarded Message


1,,
X-Coding-System: nil
Mail-from: From vern@daffy.ee.lbl.gov  Wed Mar 28 04:07:49 2001
Return-Path: <vern@daffy.ee.lbl.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA02765
	for <wlestes@localhost>; Wed, 28 Mar 2001 04:07:49 -0500
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 28 Mar 2001 04:07:49 -0500 (EST)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2S8o2e15934
	for <wlestes@hermes.email.uncg.edu>; Wed, 28 Mar 2001 03:50:02 -0500 (EST)
Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA23213
	for <wlestes@uncg.edu>; Wed, 28 Mar 2001 03:50:00 -0500 (EST)
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2S8nr529885;
	Wed, 28 Mar 2001 00:49:53 -0800 (PST)
Message-Id: <200103280849.f2S8nr529885@daffy.ee.lbl.gov>
To: "John W. Millaway" <johnmillaway@yahoo.com>
Cc: help-flex@gnu.org, wlestes@uncg.edu
Subject: Re: reentrant C scanner
In-reply-to: Your message of Tue, 27 Mar 2001 12:49:46 PST.
Date: Wed, 28 Mar 2001 00:49:53 PST
From: Vern Paxson <vern@ee.lbl.gov>

*** EOOH ***
To: "John W. Millaway" <johnmillaway@yahoo.com>
Cc: help-flex@gnu.org, wlestes@uncg.edu
Subject: Re: reentrant C scanner
In-reply-to: Your message of Tue, 27 Mar 2001 12:49:46 PST.
Date: Wed, 28 Mar 2001 00:49:53 PST
From: Vern Paxson <vern@ee.lbl.gov>

> I contacted you (or someone there at flex H.Q.) about modifying flex to generate a
> reentrant scanner. I found some time recently, and the modifications are nearly
> complete. It wasn't as bad as I had originally thought it would be.
> 
> I have two questions for you:
> 
> 1. What is the procedure for regression testing?
> 2. What is the procedure for merging my modifications with the current
> distribution?

Both of these are not well defined at the moment.  Will Estes (cc'd) has
volunteered to give taking over flex maintenance/development a try, and
we're right now in a preliminary period during which he's gauging whether
he'll indeed have the cycles for doing so.

		Vern


1,,
X-Coding-System: nil
Mail-from: From vern@daffy.ee.lbl.gov  Thu Mar 29 18:05:46 2001
Return-Path: <vern@daffy.ee.lbl.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA02631
	for <wlestes@localhost>; Thu, 29 Mar 2001 18:05:46 -0500
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Thu, 29 Mar 2001 18:05:46 -0500 (EST)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2TMmHe28250
	for <wlestes@hermes.email.uncg.edu>; Thu, 29 Mar 2001 17:48:17 -0500 (EST)
Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id RAA02561
	for <wlestes@uncg.edu>; Thu, 29 Mar 2001 17:48:16 -0500 (EST)
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2TMmCD10050;
	Thu, 29 Mar 2001 14:48:12 -0800 (PST)
Message-Id: <200103292248.f2TMmCD10050@daffy.ee.lbl.gov>
To: John Tupper <john_tupper@tenornetworks.com>
Subject: Re: flex bug
Cc: wlestes@uncg.edu
In-reply-to: Your message of Thu, 29 Mar 2001 13:52:38 PST.
Date: Thu, 29 Mar 2001 14:48:12 PST
From: Vern Paxson <vern@ee.lbl.gov>

*** EOOH ***
To: John Tupper <john_tupper@tenornetworks.com>
Subject: Re: flex bug
Cc: wlestes@uncg.edu
In-reply-to: Your message of Thu, 29 Mar 2001 13:52:38 PST.
Date: Thu, 29 Mar 2001 14:48:12 PST
From: Vern Paxson <vern@ee.lbl.gov>

Argh, yes, you're right.  This is (mis)feature interaction between
%option yylineno and trailing context.

I've cc'd Will Estes, who is trying out taking over flex maintenance /
development.  Will, I think the place to fix this is in finish_rule() in
nfa.c, making it generate extra code to loop through the characters being
put back and decrement yylineno accordingly.

		Vern


> 
> --------------DC4CBAA5BA86BA0906373DD6
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
> Vern,
>   Are you the right person to send this to?  It's a groaner. . .
> 
> If you define a rule with a trailing context and the trailing context
> matches a newline, the newline gets counted twice (in yylineno), once in
> the trailing context and once when its matched for real.
> 
> Sample grammer:
> 
> \/\*               { begin(Comment); }
> <Comment>\*/[^/]   { ; /* this rule is problematic */ }
> <Comment>[^\*]+    { ; }
> <Comment>\*\/      { begin(0); }
> 
> The above grammer strips out C style comments.  If a comment contains a
> star at the end of a line, yylineno gets incremented twice.
> 
> We used the obvious work around by adding a seperate rule to explicitly
> match *\n without any trailing context, so we're not waiting for a fix.
> 
> Oh yeah, we're using version 2.5.4.
> 
> Thanks,
> John Tupper
> (john_tupper@tenornetworks.com)
> 
> 
> --------------DC4CBAA5BA86BA0906373DD6
> Content-Type: text/html; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
> Vern,
> <br>&nbsp; Are you the right person to send this to?&nbsp; It's a groaner.
> . .
> <p>If you define a rule with a trailing context and the trailing context
> matches a newline, the newline gets counted twice (in yylineno), once in
> the trailing context and once when its matched for real.
> <p>Sample grammer:
> <p><tt>\/\*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> { begin(Comment); }</tt>
> <br><tt>&lt;Comment>\*/[^/]&nbsp;&nbsp; { ; /* this rule is problematic
> */ }</tt>
> <br><tt>&lt;Comment>[^\*]+&nbsp;&nbsp;&nbsp; { ; }</tt>
> <br><tt>&lt;Comment>\*\/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { begin(0); }</tt>
> <p>The above grammer strips out C style comments.&nbsp; If a comment contains
> a star at the end of a line, yylineno gets incremented twice.
> <p>We used the obvious work around by adding a seperate rule to explicitly
> match *\n without any trailing context, so we're not waiting for a fix.
> <p>Oh yeah, we're using version 2.5.4.
> <p>Thanks,
> <br>John Tupper
> <br>(john_tupper@tenornetworks.com)
> <br>&nbsp;</html>
> 
> --------------DC4CBAA5BA86BA0906373DD6--
> 


1, answered,,
X-Coding-System: nil
Mail-from: From johnmillaway@yahoo.com  Sun Apr  8 18:10:46 2001
Return-Path: <johnmillaway@yahoo.com>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA06099
	for <wlestes@localhost>; Sun, 8 Apr 2001 18:10:46 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Sun, 08 Apr 2001 18:10:46 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f38Lr7e10030
	for <wlestes@hermes.email.uncg.edu>; Sun, 8 Apr 2001 17:53:07 -0400 (EDT)
Received: from web9407.mail.yahoo.com (web9407.mail.yahoo.com [216.136.129.23])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id RAA28292
	for <wlestes@uncg.edu>; Sun, 8 Apr 2001 17:53:05 -0400 (EDT)
Message-ID: <20010408215303.56462.qmail@web9407.mail.yahoo.com>
Received: from [216.254.82.102] by web9407.mail.yahoo.com; Sun, 08 Apr 2001 14:53:03 PDT
Date: Sun, 8 Apr 2001 14:53:03 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: reentrant C scanner
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200104082000.QAA05847@michael.uncg.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

*** EOOH ***
Date: Sun, 8 Apr 2001 14:53:03 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: reentrant C scanner
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200104082000.QAA05847@michael.uncg.edu>

Hi,

(Sorry it took a while, my DSL went down again.)

Here is a link to the diff, because my browser (Opera) doesn't do file-uploads
properly.

http://astro.temple.edu/~john43/flex_r.diff.gz

I did not include a diff of skel.c, because it is built from flex.skl. I did a GNU
diff, instead of CVS diff, because I had already modified flex before importing it
into CVS... which means `cvs diff' won't work without some massaging. I'm no CVS
expert, let me know if you have a solution.

This all works, but is not finished. I want to test it with as many scanners as I
can dig up. At some point, I'll submit a test directory and a "README.reenrant" as
well as a modification of the texinfo docs.

Briefly, the changes are these:

1. Added option "reentrant" (-R).
2. Added preprocessor directive: YY_REENTRANT. (and a few more related to this).
3. Added internal "struct yy_globals_t"; user-visible as "void*".
4. All global variables are conditionally eliminated and placed in the struct.
5. Nearly all functions conditionally take an additional argument.
6. yylex() is now yylex_r(void*)
7. All access to globals must be wrapped in YY_G() macro.
8. User may attach arbitrary data (void*) to the scanner, to maintain state.
9. New functions for using scanner:  yy_init_r, yy_free_r;
10. Accessor functions to extract values from struct or globals.
11. Frequently accessed variables (yytext, yyleng, etc..) have macro shortcuts,
(yytext_r, yyleng_r, etc.) which hide the internals from users building reentrant
scanners.

-John Millaway


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/


1,,
X-Coding-System: nil
Mail-from: From johnmillaway@yahoo.com  Sun Apr  8 19:16:58 2001
Return-Path: <johnmillaway@yahoo.com>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id TAA06140
	for <wlestes@localhost>; Sun, 8 Apr 2001 19:16:58 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Sun, 08 Apr 2001 19:16:58 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f38MwXe18411
	for <wlestes@hermes.email.uncg.edu>; Sun, 8 Apr 2001 18:58:33 -0400 (EDT)
Received: from web9402.mail.yahoo.com (web9402.mail.yahoo.com [216.136.129.108])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id SAA01092
	for <wlestes@uncg.edu>; Sun, 8 Apr 2001 18:58:32 -0400 (EDT)
Message-ID: <20010408225832.81903.qmail@web9402.mail.yahoo.com>
Received: from [216.254.82.102] by web9402.mail.yahoo.com; Sun, 08 Apr 2001 15:58:32 PDT
Date: Sun, 8 Apr 2001 15:58:32 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: reentrant C scanner
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200104082224.SAA06112@michael.uncg.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

*** EOOH ***
Date: Sun, 8 Apr 2001 15:58:32 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: reentrant C scanner
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200104082224.SAA06112@michael.uncg.edu>

> have downloaded this and will set aside time to read your patch this
> week.
Please download again, I fixed another bug.

> > I did not include a diff of skel.c, because it is built from flex.skl. I did a
> GNU> 
> ok. will remember this...

Just do `./mkskel.sh <flex.skl >skel.c` to rebuild it.

> tag your current sources.
> import the standard sources and give them another tag/branch name.
> do a cvs diff explicitly between the two above.

Will do.


> that's the gut reaction. let me know if that works or if you have
> troubles. But I need to prepare a publicly readable cvs archive anyway.

Have you thought about sourceforge?

> the scanner stuff is finished, yes? (sure, there will be bugs and
> things to work out, but i am asking if the reentrant stuff is in place.)
Yes, finished. But the changes were so widespread and there are so many options and
directives that I'm sure something will break very soon. That's why a
regression-test directory would be nice.

> Go ahead and write the README. This is a good exercise--and usually
> fairly easy to knock off. It can serve as a guide later on down the
> road.
OK.

> To clarify, reentrant should probably not be a default behavior for
> now.
It is not. In fact, yacc/bison parsers won't call yylex_r()... something I'll work
on later.


> If it's ok with you, I'm going to forward your post on to
> help-flex@gnu.org so the "community" can dig in too.

Great. Please include my email address.

Also, the community should really decide on the new API. I am wide open to
suggestions. Currently, the new API allows a lexer to be backwards compatible, so
that a working reentrant scanner should be able to be recompiled as a non-reentrant
scanner, and everything will work just dandy on the inside. However, the syntax is
not so pretty for the user. On the other hand, a reentrant scanner that is not
meant to be backwards compatible has a cleaner API (fewer oddball macros).

An example to illustrate:

%option reentrant
%s FOOBAR

%%

  /* The line in each pair below do the same thing.
     But second of each pair is backwards-compatible. */

"call-func"  { yy_push_state ( FOOBAR , yy_globals ); }
"call-func"  { yy_push_state ( FOOBAR  YYCALL_LAST_ARG ); }

"user-data"  { printf( (char*) yyusr_r );}
"user-data"  { printf( (char*) yy_get_usr(YYCALL_ONLY_ARG));}

"yyleng"     { printf( "%s %d" , yy_text_r, yyleng_r ); }
"yyleng"     { printf( "%s %d" , YY_G(yy_text), YY_G(yyleng)); }

%%
main()
{
    char* stuff = "user specific data.";
    void * mylexer;
   
    yy_init_r ( & mylexer );       /* Create the scanner. */
    yy_set_usr( stuff, mylexer );  /* set user-defined stuff. */

    while( 1 )
        yylex_r ( lexer );

    yy_free_r ( lexer );
}

-John Millaway


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/


1,,
X-Coding-System: nil
Mail-from: From johnmillaway@yahoo.com  Sun Apr  8 20:12:39 2001
Return-Path: <johnmillaway@yahoo.com>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id UAA06162
	for <wlestes@localhost>; Sun, 8 Apr 2001 20:12:39 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Sun, 08 Apr 2001 20:12:39 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f38NsQe25613
	for <wlestes@hermes.email.uncg.edu>; Sun, 8 Apr 2001 19:54:26 -0400 (EDT)
Received: from web9406.mail.yahoo.com (web9406.mail.yahoo.com [216.136.129.22])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id TAA03391
	for <wlestes@uncg.edu>; Sun, 8 Apr 2001 19:54:24 -0400 (EDT)
Message-ID: <20010408235423.12509.qmail@web9406.mail.yahoo.com>
Received: from [216.254.82.102] by web9406.mail.yahoo.com; Sun, 08 Apr 2001 16:54:23 PDT
Date: Sun, 8 Apr 2001 16:54:23 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: reentrant C scanner
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200104082224.SAA06112@michael.uncg.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

*** EOOH ***
Date: Sun, 8 Apr 2001 16:54:23 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: reentrant C scanner
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200104082224.SAA06112@michael.uncg.edu>

I'm sure you haven't had time to look at it yet, but there are two other points I
wanted to mention:

1. Once the reentrant scanner is working, there is no need for the non-reentrant
scanner. The non-reentrant API can be built as a wrapper around the reentrant
scanner. Much, much less code maintenance. I will happily do the conversion.

2. The reentrancy can be verified, in part, by running `nm -A -l' on a compiled
scanner. `nm` is part of binutils and shows, among other things, the global
variables. In the reentrant scanner, there should be none.

-John Millaway

PS - What is the mailing list? I guess I should subscribe! The gnu site says that
there is currently no list for flex:
http://www.gnu.org/software/flex/flex.html#lists


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/


1, answered,,
X-Coding-System: nil
Mail-from: From vern@daffy.ee.lbl.gov  Tue Apr 17 04:00:22 2001
Return-Path: <vern@daffy.ee.lbl.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA31012
	for <wlestes@localhost>; Tue, 17 Apr 2001 04:00:21 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Tue, 17 Apr 2001 04:00:21 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3H7eqe08321
	for <wlestes@hermes.email.uncg.edu>; Tue, 17 Apr 2001 03:40:52 -0400 (EDT)
Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA08895
	for <wlestes@uncg.edu>; Tue, 17 Apr 2001 03:40:50 -0400 (EDT)
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f3H7eoW18946;
	Tue, 17 Apr 2001 00:40:50 -0700 (PDT)
Message-Id: <200104170740.f3H7eoW18946@daffy.ee.lbl.gov>
To: "Yuri Victorovich" <yurivict@hotmail.com>
Subject: Re: Flex comments
Cc: wlestes@uncg.edu
In-reply-to: Your message of Sun, 15 Apr 2001 22:47:37 PDT.
Date: Tue, 17 Apr 2001 00:40:50 PDT
From: Vern Paxson <vern@ee.lbl.gov>

*** EOOH ***
To: "Yuri Victorovich" <yurivict@hotmail.com>
Subject: Re: Flex comments
Cc: wlestes@uncg.edu
In-reply-to: Your message of Sun, 15 Apr 2001 22:47:37 PDT.
Date: Tue, 17 Apr 2001 00:40:50 PDT
From: Vern Paxson <vern@ee.lbl.gov>

> One problem: how to eliminate the static variables without making it C++ 
> scanner with option -+? I do not want to introduce any of C++ into my 
> project and at the same time I use pthreads on FreeBSD.
> 
> That would be a nice feature to have such an option.

I agree it would be nice.  I've cc'd Will Estes, who is trying out taking
over flex maintenance / development.

		Vern


1, answered,,
X-Coding-System: nil
Mail-from: From yurivict@hotmail.com  Tue Apr 17 10:42:56 2001
Return-Path: <yurivict@hotmail.com>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id KAA01266
	for <wlestes@localhost>; Tue, 17 Apr 2001 10:42:56 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Tue, 17 Apr 2001 10:42:56 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3HENMe01358
	for <wlestes@hermes.email.uncg.edu>; Tue, 17 Apr 2001 10:23:22 -0400 (EDT)
Received: from hotmail.com (f210.law12.hotmail.com [64.4.19.210])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id KAA06325
	for <wlestes@uncg.edu>; Tue, 17 Apr 2001 10:23:21 -0400 (EDT)
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Tue, 17 Apr 2001 07:22:51 -0700
Received: from 194.158.212.99 by lw12fd.law12.hotmail.msn.com with HTTP;	Tue, 17 Apr 2001 14:22:51 GMT
X-Originating-IP: [194.158.212.99]
From: "Yuri Victorovich" <yurivict@hotmail.com>
To: wlestes@uncg.edu
Subject: Re: Flex comments
Date: Tue, 17 Apr 2001 07:22:51 -0700
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <F210b98KtdhQYZkxOjm00009556@hotmail.com>
X-OriginalArrivalTime: 17 Apr 2001 14:22:51.0694 (UTC) FILETIME=[E2BCD4E0:01C0C749]

*** EOOH ***
From: "Yuri Victorovich" <yurivict@hotmail.com>
To: wlestes@uncg.edu
Subject: Re: Flex comments
Date: Tue, 17 Apr 2001 07:22:51 -0700

Will, Thank you for reply!

I spent the whole day yesterday writing awk script to
convert normal flex output to thread-safe form.

If you do not have time or will need help with this
work on flex -- I can do anything from research, programming
to testing. Just let me know -- I digged into it to some
extent already and will have some time in the coming weeks.

Kind Regards,
Yuri.





>From: "W. L. Estes" <wlestes@uncg.edu>
>To: vern@ee.lbl.gov
>CC: yurivict@hotmail.com
>Subject: Re: Flex comments
>Date: Tue, 17 Apr 2001 08:33:35 -0400
>
> > > One problem: how to eliminate the static variables without making it 
>C++
> > > scanner with option -+? I do not want to introduce any of C++ into my
> > > project and at the same time I use pthreads on FreeBSD.
> > >
> > > That would be a nice feature to have such an option.
> >
> > I agree it would be nice.  I've cc'd Will Estes, who is trying out 
>taking
> > over flex maintenance / development.
>
>Thanks for the suggestion. I'll look into what it will take to do
>this.
>
>--Will

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


1, answered,,
X-Coding-System: nil
Mail-from: From vern@daffy.ee.lbl.gov  Tue Apr 17 12:34:26 2001
Return-Path: <vern@daffy.ee.lbl.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA01409
	for <wlestes@localhost>; Tue, 17 Apr 2001 12:34:26 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Tue, 17 Apr 2001 12:34:26 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3HGFpe27457
	for <wlestes@hermes.email.uncg.edu>; Tue, 17 Apr 2001 12:15:51 -0400 (EDT)
Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA20041
	for <wlestes@uncg.edu>; Tue, 17 Apr 2001 12:15:49 -0400 (EDT)
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f3HGFoP19785;
	Tue, 17 Apr 2001 09:15:50 -0700 (PDT)
Message-Id: <200104171615.f3HGFoP19785@daffy.ee.lbl.gov>
To: "W. L. Estes" <wlestes@uncg.edu>
Subject: Re: Flex comments
In-reply-to: Your message of Tue, 17 Apr 2001 08:57:41 PDT.
Date: Tue, 17 Apr 2001 09:15:50 PDT
From: Vern Paxson <vern@ee.lbl.gov>

*** EOOH ***
To: "W. L. Estes" <wlestes@uncg.edu>
Subject: Re: Flex comments
In-reply-to: Your message of Tue, 17 Apr 2001 08:57:41 PDT.
Date: Tue, 17 Apr 2001 09:15:50 PDT
From: Vern Paxson <vern@ee.lbl.gov>

> If there is more detail in the original message, could you forward it
> to me?

That was the whole message.  The basic problem that people run into
is they want reentrant scanners, so no statics or global variables.
The general strategy for this is to have a new yylex() interface in
which the caller passes in a struct that has all of the otherwise-global
variables.  This is a bit tricky to do cleanly because you can't switch
to that as *the* interface, of course, because it would break the
existing API; which means you have to be able to generate two forms of
the skeleton file, one for the existing API with the statics/globals,
and one without them and the struct definition instead.

There's probably some more discussion on this in the mail tarball I sent
you - search for "reentrant".

		Vern


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 00:20:40 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id AAA22703
	for <wlestes@localhost>; Wed, 25 Apr 2001 00:20:40 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 00:20:40 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3P403e01034
	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 00:00:03 -0400 (EDT)
Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id AAA05202
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 00:00:02 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14sGTC-0006Tm-00
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 00:00:02 -0400
Received: from [203.199.199.50] (helo=banyannetworks.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14sGRt-0006Sr-00
	for <help-flex@gnu.org>; Tue, 24 Apr 2001 23:58:44 -0400
Received: from localhost (arasi@localhost) by banyannetworks.com (8.9.3/8.8.3) with ESMTP id JAA03208 for <help-flex@gnu.org>; Wed, 25 Apr 2001 09:25:36 +0530
From: Avai Arasi <arasi@banyanNetworks.com>
To: help-flex@gnu.org
Subject: Clarification Regarding Porting Flex and Bison to RTOS
Message-ID: <Pine.LNX.4.10.10104250920140.3092-100000@banyannetworks.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 09:25:36 +0530 (IST)

*** EOOH ***
From: Avai Arasi <arasi@banyanNetworks.com>
To: help-flex@gnu.org
Subject: Clarification Regarding Porting Flex and Bison to RTOS
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 09:25:36 +0530 (IST)

Hello,

   I am trying to port both Flex and Bison to a Real Time OS. I don't have
the device options like the file which the Flex expects as input. In the
place of the file i have a character pointer. How should I proceed with
the parsing ? 

  Is there any standard procedure for this porting ? If somebody has
already done such a work can i have some hints please.

Thank You.

Regards,
Avaiarasi
Senior Engineer R & D
Banyan Networks Pvt. Ltd.
Chennai.


_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 13:17:31 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA23790
	for <wlestes@localhost>; Wed, 25 Apr 2001 13:17:31 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 13:17:31 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PGv2e04258
	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 12:57:02 -0400 (EDT)
Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA11157
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 12:57:01 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14sSb8-00056g-00
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 12:57:02 -0400
Received: from web9403.mail.yahoo.com ([216.136.129.109])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 14sSYq-00053W-00
	for <help-flex@gnu.org>; Wed, 25 Apr 2001 12:54:41 -0400
Message-ID: <20010425165439.64856.qmail@web9403.mail.yahoo.com>
Received: from [216.254.82.102] by web9403.mail.yahoo.com; Wed, 25 Apr 2001 09:54:39 PDT
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Bug: %option main overrides %option yywrap
To: help-flex@gnu.org
In-Reply-To: <200104251228.IAA23213@michael.uncg.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 09:54:39 -0700 (PDT)

*** EOOH ***
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Bug: %option main overrides %option yywrap
To: help-flex@gnu.org
In-Reply-To: <200104251228.IAA23213@michael.uncg.edu>
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 09:54:39 -0700 (PDT)

Hello,

There is a "bug" in the current version of flex (2.5.4) in which the %option
[no]main unconditionally sets the %option [no]yywrap. I use the term "bug"
hesitantly, because this behavior appears to be intentional. However, I can't think
of any use for it other than to cause unexpected link errors when yywrap() is not
found.

Example:

  %option noyywrap  /* Disable option yywrap. */
  %option nomain    /* Option yywrap is now enabled! */

One workaround is to always specify %option yywrap AFTER %option main. In general,
if the user explicitly sets an option, then flex should either honor that setting,
or report a conflict.

The bug is in "scan.l" at line 247, and is undocumented.

244:	lex-compat	lex_compat = option_sense;
245:	main		{
246:			action_define( "YY_MAIN", option_sense );
247:			do_yywrap = ! option_sense;
248:			}
249:	meta-ecs	usemecs = option_sense;

-John Millaway


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 14:11:45 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA23826
	for <wlestes@localhost>; Wed, 25 Apr 2001 14:11:44 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 14:11:44 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PHp7e27019
	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 13:51:07 -0400 (EDT)
Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA17880
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 13:51:08 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14sTRT-0003QA-00
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 13:51:07 -0400
Received: from web9404.mail.yahoo.com ([216.136.129.110])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 14sTQy-0003Pm-00
	for <help-flex@gnu.org>; Wed, 25 Apr 2001 13:50:36 -0400
Message-ID: <20010425175036.43329.qmail@web9404.mail.yahoo.com>
Received: from [216.254.82.102] by web9404.mail.yahoo.com; Wed, 25 Apr 2001 10:50:36 PDT
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: scaning from memory
To: "alexandre.gouraud" <alexandre.gouraud@laposte.net>, help-flex@gnu.org
In-Reply-To: <GCCZ8R$IiFF_2Id0FNAO2kAXNPACqX5slPk_GQyEsHVyKKjYXVpqFi3j4Ntc@laposte.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 10:50:36 -0700 (PDT)

*** EOOH ***
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: scaning from memory
To: "alexandre.gouraud" <alexandre.gouraud@laposte.net>, help-flex@gnu.org
In-Reply-To: <GCCZ8R$IiFF_2Id0FNAO2kAXNPACqX5slPk_GQyEsHVyKKjYXVpqFi3j4Ntc@laposte.net>
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 10:50:36 -0700 (PDT)

> I am trying to write a parser with flex/bison scaning strings
> in memory, but I can't make it work. I am pretty sure it's a
> common way of using flex, but I didn't find any example on the
> web. (I have read the manual, of course). I have found several
> times this question, but no answer.
> I don't know where to put the yy_scan_string() statement. I
> use the <<EOF>> rule as last rule. And I have also modified
> the prototype of the yylex function with
> #define YY_DECL int yylex(YYSTYPE *lvalp,char *name)
> where name is the string I want to parse.

You should call yy_scan_string before calling yylex. Here are two examples:

1. In general:

  YY_BUFFER_STATE buf_state = yy_scan_string( str );
  while( yylex() != 0 )
      ;
  yy_delete_buffer(buf_state);


2. Your particular scanner:

%{
#define YY_USER_INIT  buf_state = yy_scan_string( name );
%}
%%
    static YY_BUFFER_STATE buf_state;

<<EOF>>   { yy_buffer_delete( buf_state ); yyterminate(); }
%%

-John


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 14:41:58 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA23852
	for <wlestes@localhost>; Wed, 25 Apr 2001 14:41:58 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 14:41:58 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PILLe10211
	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 14:21:21 -0400 (EDT)
Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA21692
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 14:21:21 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14sTuj-0007Yw-00
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 14:21:21 -0400
Received: from daffy.ee.lbl.gov ([131.243.1.31])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14sTtm-0007Xg-00
	for <help-flex@gnu.org>; Wed, 25 Apr 2001 14:20:22 -0400
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f3PIKJa19998;
	Wed, 25 Apr 2001 11:20:19 -0700 (PDT)
Message-Id: <200104251820.f3PIKJa19998@daffy.ee.lbl.gov>
To: "John W. Millaway" <johnmillaway@yahoo.com>
Cc: help-flex@gnu.org
Subject: Re: Bug: %option main overrides %option yywrap
In-reply-to: Your message of Wed, 25 Apr 2001 09:54:39 PDT.
From: Vern Paxson <vern@ee.lbl.gov>
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 11:20:19 PDT

*** EOOH ***
To: "John W. Millaway" <johnmillaway@yahoo.com>
Cc: help-flex@gnu.org
Subject: Re: Bug: %option main overrides %option yywrap
In-reply-to: Your message of Wed, 25 Apr 2001 09:54:39 PDT.
From: Vern Paxson <vern@ee.lbl.gov>
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 11:20:19 PDT

> 245:	main		{
> 246:			action_define( "YY_MAIN", option_sense );
> 247:			do_yywrap = ! option_sense;
> 248:			}

I think I did that (which is documented in the manual, by the way) so that
"%option main" would be a quick way to specify you want a bare-bones
program for which you don't have to define any additional routines.
I'd be disinclined to change it (though it's Will's call) because it's
so easy to work around - just don't use "%option main", which is only
saving you a few lines of code anyway.

		Vern

_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 16:28:59 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id QAA23955
	for <wlestes@localhost>; Wed, 25 Apr 2001 16:28:59 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 16:28:59 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PK99e25951
	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 16:09:09 -0400 (EDT)
Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id QAA05277
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 16:09:08 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14sVb1-0005jV-00
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 16:09:07 -0400
Received: from michael.uncg.edu ([152.13.5.20])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14sVaJ-0005iu-00
	for <help-flex@gnu.org>; Wed, 25 Apr 2001 16:08:23 -0400
Received: (from wlestes@localhost)
	by michael.uncg.edu (8.9.3/8.9.3) id QAA23947;
	Wed, 25 Apr 2001 16:27:46 -0400
Message-Id: <200104252027.QAA23947@michael.uncg.edu>
X-Authentication-Warning: michael.uncg.edu: wlestes set sender to wlestes@michael.uncg.edu using -f
From: "W. L. Estes" <wlestes@uncg.edu>
To: vern@ee.lbl.gov
CC: johnmillaway@yahoo.com, help-flex@gnu.org
In-reply-to: <200104251820.f3PIKJa19998@daffy.ee.lbl.gov> (message from Vern
	Paxson on Wed, 25 Apr 2001 11:20:19 PDT)
Subject: Re: Bug: %option main overrides %option yywrap
References:  <200104251820.f3PIKJa19998@daffy.ee.lbl.gov>
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 16:27:46 -0400

*** EOOH ***
From: "W. L. Estes" <wlestes@uncg.edu>
To: vern@ee.lbl.gov
CC: johnmillaway@yahoo.com, help-flex@gnu.org
In-reply-to: <200104251820.f3PIKJa19998@daffy.ee.lbl.gov> (message from Vern
	Paxson on Wed, 25 Apr 2001 11:20:19 PDT)
Subject: Re: Bug: %option main overrides %option yywrap
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Wed, 25 Apr 2001 16:27:46 -0400

> I think I did that (which is documented in the manual, by the way) so that
> "%option main" would be a quick way to specify you want a bare-bones
> program for which you don't have to define any additional routines.
> I'd be disinclined to change it (though it's Will's call) because it's
> so easy to work around - just don't use "%option main", which is only
> saving you a few lines of code anyway.

Additionally, flex.1 says the following:

       main   directs  flex  to  provide a default main() program
              for the scanner, which simply calls yylex().   This
              option implies noyywrap (see below).

My sense is that Vern is correct: The right thing to do is to not use
%option main if you want yywrap() to be under your control.

Thanks,

--Will

_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Thu Apr 26 12:11:23 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA25162
	for <wlestes@localhost>; Thu, 26 Apr 2001 12:11:22 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Thu, 26 Apr 2001 12:11:22 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3QFp6e21203
	for <wlestes@hermes.email.uncg.edu>; Thu, 26 Apr 2001 11:51:06 -0400 (EDT)
Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id LAA21348
	for <wlestes@uncg.edu>; Thu, 26 Apr 2001 11:51:05 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14so2r-00043k-00
	for <wlestes@uncg.edu>; Thu, 26 Apr 2001 11:51:05 -0400
Received: from [208.155.173.144] (helo=symbology.com)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14so2e-0003Dl-00
	for <help-flex@gnu.org>; Thu, 26 Apr 2001 11:50:53 -0400
Received: from Spooler by symbology.com (Mercury/32 v3.21c) ID MO003737;
    26 Apr 01 10:52:43 -0500
Received: from spooler by symbology.com (Mercury/32 v3.21c); 26 Apr 01 10:52:29 -0500
Received: from grommit (10.0.0.74) by Symbology (Mercury/32 v3.21c) ID MG003736;
   26 Apr 01 10:52:22 -0500
From: "Dave Dutcher" <ddutcher@symbology.com>
To: <help-flex@gnu.org>
Subject: Suppress copying characters to yytext?
Message-ID: <002501c0ce68$99b3ec40$4a00000a@symbology.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Thu, 26 Apr 2001 10:50:20 -0500

*** EOOH ***
From: "Dave Dutcher" <ddutcher@symbology.com>
To: <help-flex@gnu.org>
Subject: Suppress copying characters to yytext?
Importance: Normal
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Thu, 26 Apr 2001 10:50:20 -0500

Hi,

First off I was wondering if there is an official web site for Flex?

Second, I would like to be able to have Flex use certain characters in a
regular expression to match the expression but suppress copying the
characters to yytext.  A simple example would be if I was trying to match
text surrounded by quotes, but I don't want to use the quotes. i.e.

\"[^\n]\"		{ yylval = strdup(yytext); //This gives me the text and quotes. }

or

\"[^\n]\"		{ yylval = strdup(yytext+1); yylval[strlen(yylval)-1] = '\0';
//Now I've removed the quotes. }

But since I'm lazy ;)  I would like to be able to tell Flex not to copy the
quotes.  What I would like is an operator that would tell flex to match an
expression but to not copy it to yytext.  Off the top of my head maybe the #
symbol could work for such an operator, so I could then do:

\"#[^\n]\"#	{ yylval = strdup(yytext); //This would give me the text without
the quotes. }

Does anyone know if such a feature or something similar exists?  If this
doesn't exists would it be practical?

Thanks,

Dave Dutcher
Software Engineer
Symbology, Inc.
Minneapolis, MN


_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Thu Apr 26 12:26:26 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA25203
	for <wlestes@localhost>; Thu, 26 Apr 2001 12:26:26 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Thu, 26 Apr 2001 12:26:26 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3QG63e27511
	for <wlestes@hermes.email.uncg.edu>; Thu, 26 Apr 2001 12:06:03 -0400 (EDT)
Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA23192
	for <wlestes@uncg.edu>; Thu, 26 Apr 2001 12:06:02 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14soHK-0004gM-00
	for <wlestes@uncg.edu>; Thu, 26 Apr 2001 12:06:02 -0400
Received: from acp3bf.physik.rwth-aachen.de ([137.226.32.75])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 14soFe-0004cw-00
	for <help-flex@gnu.org>; Thu, 26 Apr 2001 12:04:18 -0400
Received: from localhost (broeker@localhost) by acp3bf.physik.rwth-aachen.de (8.7.5/v3.2) with ESMTP id SAA00797; Thu, 26 Apr 2001 18:04:09 +0200
X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
From: Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
X-Sender: broeker@acp3bf
To: Dave Dutcher <ddutcher@symbology.com>
cc: help-flex@gnu.org
Subject: Re: Suppress copying characters to yytext?
In-Reply-To: <002501c0ce68$99b3ec40$4a00000a@symbology.com>
Message-ID: <Pine.LNX.4.10.10104261759540.592-100000@acp3bf>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Thu, 26 Apr 2001 18:04:06 +0200 (MET DST)

*** EOOH ***
From: Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
To: Dave Dutcher <ddutcher@symbology.com>
cc: help-flex@gnu.org
Subject: Re: Suppress copying characters to yytext?
In-Reply-To: <002501c0ce68$99b3ec40$4a00000a@symbology.com>
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Thu, 26 Apr 2001 18:04:06 +0200 (MET DST)

On Thu, 26 Apr 2001, Dave Dutcher wrote:

> Second, I would like to be able to have Flex use certain characters in a
> regular expression to match the expression but suppress copying the
> characters to yytext.  

You can do that with a start condition and trailing context rules. I.e.
roughly like this:

<INITIAL>\"	BEGIN(IN_STRING)

<IN_STRING>[^\n]*/\"	{ 
			/* yytext is the interior of the string, now */
			BEGIN(INITIAL)
			}

-- 
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.


_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1, answered,,
X-Coding-System: nil
Mail-from: From johnmillaway@yahoo.com  Wed Apr 25 18:52:08 2001
Return-Path: <johnmillaway@yahoo.com>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA24103
	for <wlestes@localhost>; Wed, 25 Apr 2001 18:52:08 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 18:52:08 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PMWQe07299
	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 18:32:26 -0400 (EDT)
Received: from web9404.mail.yahoo.com (web9404.mail.yahoo.com [216.136.129.110])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id SAA23019
	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 18:32:24 -0400 (EDT)
Message-ID: <20010425223059.65780.qmail@web9404.mail.yahoo.com>
Received: from [216.254.82.102] by web9404.mail.yahoo.com; Wed, 25 Apr 2001 15:30:59 PDT
Date: Wed, 25 Apr 2001 15:30:59 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: Bug: %option main overrides %option yywrap
To: "W. L. Estes" <wlestes@uncg.edu>, vern@ee.lbl.gov
Cc: help-flex@gnu.org
In-Reply-To: <200104252027.QAA23947@michael.uncg.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

*** EOOH ***
Date: Wed, 25 Apr 2001 15:30:59 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: Bug: %option main overrides %option yywrap
To: "W. L. Estes" <wlestes@uncg.edu>, vern@ee.lbl.gov
Cc: help-flex@gnu.org
In-Reply-To: <200104252027.QAA23947@michael.uncg.edu>

> Additionally, flex.1 says the following:
> 
>        main   directs  flex  to  provide a default main() program
>               for the scanner, which simply calls yylex().   This
>               option implies noyywrap (see below).

I understand, and it makes sense. Just be aware that the inverse of this rule is
also true --  %option nomain implies yywrap -- which makes much less sense.

Of course, I only complain because it had me on one heck of a bug hunt. I had
specified %option noyywrap and %option nomain, yet the linker complained that it
couldn't find yywrap. I thought I had broken something! :)

-John


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/


1, answered,,
X-Coding-System: nil
Mail-from: From johnmillaway@yahoo.com  Thu May  3 14:16:31 2001
Return-Path: <johnmillaway@yahoo.com>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA09489
	for <wlestes@localhost>; Thu, 3 May 2001 14:16:31 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Thu, 03 May 2001 14:16:31 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f43Hv6q26933
	for <wlestes@hermes.email.uncg.edu>; Thu, 3 May 2001 13:57:06 -0400 (EDT)
Received: from web9406.mail.yahoo.com (web9406.mail.yahoo.com [216.136.129.22])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id NAA14179
	for <wlestes@uncg.edu>; Thu, 3 May 2001 13:57:04 -0400 (EDT)
Message-ID: <20010503175704.85520.qmail@web9406.mail.yahoo.com>
Received: from [155.247.207.90] by web9406.mail.yahoo.com; Thu, 03 May 2001 10:57:04 PDT
Date: Thu, 3 May 2001 10:57:04 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Reentrant flex - progress update.
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200105011710.NAA02531@michael.uncg.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

*** EOOH ***
Date: Thu, 3 May 2001 10:57:04 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Reentrant flex - progress update.
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200105011710.NAA02531@michael.uncg.edu>

Will,
Progress update: This week is finals week. I'll send the tarballs soon.

I made another, very minor, adjustment a few days ago:  The integer yylineno will
always be present in reentrant scanners, but only modified by flex if %option
yylineno is enabled.  Many scanners I have seen and built will disable %option
yylineno, then declare an integer "lineno" to keep a line count anyway, (because
the man page warns about the performance penalty of %option yylineno.) This way,
reentrant flex provides support for users who wish to maintain their own linecount.

  /* just like 'wc -l' */
  %option reentrant noyylineno main
  %%
           yylineno_r = 1;

  \n       yylineno_r++;
  .        { }
  <<EOF>>  printf( "%7d", yylineno_r);

Another important note: As far as I know, none of my modifications should have any
effect on NON-reentrant scanners. In fact, I believe compiled scanners generated
with the previous version should be binary equivalent to non-reentrant scanners
generated with the new version. I have not verified this, but if they are not, then
I may have made an oversight.

-John Millaway


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Fri May  4 14:36:27 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA13535
	for <wlestes@localhost>; Fri, 4 May 2001 14:36:27 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Fri, 04 May 2001 14:36:27 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f44II5q04369
	for <wlestes@hermes.email.uncg.edu>; Fri, 4 May 2001 14:18:05 -0400 (EDT)
Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA14696
	for <wlestes@uncg.edu>; Fri, 4 May 2001 14:18:04 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14vk9T-00065Q-00
	for <wlestes@uncg.edu>; Fri, 04 May 2001 14:18:03 -0400
Received: from web9401.mail.yahoo.com ([216.136.129.107])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 14vk7I-0005Hj-00
	for <help-flex@gnu.org>; Fri, 04 May 2001 14:15:48 -0400
Message-ID: <20010504181547.55844.qmail@web9401.mail.yahoo.com>
Received: from [155.247.207.90] by web9401.mail.yahoo.com; Fri, 04 May 2001 11:15:47 PDT
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Why is YY_BUF_SIZE not override-able?
To: help-flex@gnu.org
In-Reply-To: <20010430181855.46942.qmail@web9407.mail.yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Fri, 4 May 2001 11:15:47 -0700 (PDT)

*** EOOH ***
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Why is YY_BUF_SIZE not override-able?
To: help-flex@gnu.org
In-Reply-To: <20010430181855.46942.qmail@web9407.mail.yahoo.com>
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Fri, 4 May 2001 11:15:47 -0700 (PDT)

Hi,

Most everything can be overridden by the user. However the size of the input
buffer, YY_BUF_SIZE, is fixed. Is there a reason why YY_BUF_SIZE can't be
overridden?

Let's say I knew that all my tokens will match under 80 characters plus newlines,
plus nulls, plus flex-flags... I might decide to set YY_BUF_SIZE to 100.

-John


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1, answered,,
X-Coding-System: nil
Mail-from: From johnmillaway@yahoo.com  Fri May  4 15:44:19 2001
Return-Path: <johnmillaway@yahoo.com>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id PAA13788
	for <wlestes@localhost>; Fri, 4 May 2001 15:44:19 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Fri, 04 May 2001 15:44:19 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f44JPXq26400
	for <wlestes@hermes.email.uncg.edu>; Fri, 4 May 2001 15:25:33 -0400 (EDT)
Received: from web9407.mail.yahoo.com (web9407.mail.yahoo.com [216.136.129.23])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id PAA21302
	for <wlestes@uncg.edu>; Fri, 4 May 2001 15:25:31 -0400 (EDT)
Message-ID: <20010504192531.73966.qmail@web9407.mail.yahoo.com>
Received: from [155.247.207.90] by web9407.mail.yahoo.com; Fri, 04 May 2001 12:25:31 PDT
Date: Fri, 4 May 2001 12:25:31 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Reentrant flex - test results.
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200105031914.PAA09683@michael.uncg.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

*** EOOH ***
Date: Fri, 4 May 2001 12:25:31 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Reentrant flex - test results.
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200105031914.PAA09683@michael.uncg.edu>

My concerns are this:
1. The build relies on bison or yacc. Is this intentional? Why not include the
parse.c and parse.h in the dist?

2. The TESTS/ "make check" stops at the first error. I'm thinking it may not be
what we want. The change is simple: Omit the "|| exit -1" part from the commands in
TESTS/Makefile.in.

3. Since I'm not the autoconf guru, I couldn't find a cleaner way to do all the
tests. So I just used a /bin/sh loop in the TESTS/Makefile.in.



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/


1,,
X-Coding-System: nil
Mail-from: From johnmillaway@yahoo.com  Fri May  4 15:56:22 2001
Return-Path: <johnmillaway@yahoo.com>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id PAA13813
	for <wlestes@localhost>; Fri, 4 May 2001 15:56:22 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Fri, 04 May 2001 15:56:22 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f44JbZq00252
	for <wlestes@hermes.email.uncg.edu>; Fri, 4 May 2001 15:37:35 -0400 (EDT)
Received: from web9406.mail.yahoo.com (web9406.mail.yahoo.com [216.136.129.22])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id PAA22444
	for <wlestes@uncg.edu>; Fri, 4 May 2001 15:37:33 -0400 (EDT)
Message-ID: <20010504193731.93040.qmail@web9406.mail.yahoo.com>
Received: from [155.247.207.90] by web9406.mail.yahoo.com; Fri, 04 May 2001 12:37:31 PDT
Date: Fri, 4 May 2001 12:37:31 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: Reentrant flex - progress update.
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200105041912.PAA13694@michael.uncg.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

*** EOOH ***
Date: Fri, 4 May 2001 12:37:31 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: Reentrant flex - progress update.
To: "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <200105041912.PAA13694@michael.uncg.edu>

> Do you think your test suite is complete? or is it just reasonably
> thorough? (i.e. if someone thinks a feature isn't tested, should that
> be a bug?)

No, it is by no means complete. Yes, missing feature tests are bugs of a sort. The
test suite was designed to cope with all the possible build configurations of a
generated scanner, while developing flex itself. I didn't want to modify or add one
feature, but break another. The breakage would easily go unnoticed.

>From the top of my head, I didn't test %array, REJECT, and yy_set_bol, because I
plain forgot about them. I didn't test the C++ option because it is broken AFAIK.
All of the tests came in handy at one point or another during the past month,
though.


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/


1, answered,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Sat May  5 03:45:30 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA14343
	for <wlestes@localhost>; Sat, 5 May 2001 03:45:30 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Sat, 05 May 2001 03:45:30 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f457R2q28664
	for <wlestes@hermes.email.uncg.edu>; Sat, 5 May 2001 03:27:02 -0400 (EDT)
Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA13852
	for <wlestes@uncg.edu>; Sat, 5 May 2001 03:27:02 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14vwT0-0007qN-00
	for <wlestes@uncg.edu>; Sat, 05 May 2001 03:27:02 -0400
Received: from daffy.ee.lbl.gov ([131.243.1.31])
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 14vwQr-0007nj-00
	for <help-flex@gnu.org>; Sat, 05 May 2001 03:24:49 -0400
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f457Ol523882;
	Sat, 5 May 2001 00:24:47 -0700 (PDT)
Message-Id: <200105050724.f457Ol523882@daffy.ee.lbl.gov>
To: "John W. Millaway" <johnmillaway@yahoo.com>
Cc: help-flex@gnu.org
Subject: Re: Why is YY_BUF_SIZE not override-able?
In-reply-to: Your message of Fri, 04 May 2001 11:15:47 PDT.
From: Vern Paxson <vern@ee.lbl.gov>
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Sat, 05 May 2001 00:24:46 PDT

*** EOOH ***
To: "John W. Millaway" <johnmillaway@yahoo.com>
Cc: help-flex@gnu.org
Subject: Re: Why is YY_BUF_SIZE not override-able?
In-reply-to: Your message of Fri, 04 May 2001 11:15:47 PDT.
From: Vern Paxson <vern@ee.lbl.gov>
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Sat, 05 May 2001 00:24:46 PDT

> Most everything can be overridden by the user. However the size of the input
> buffer, YY_BUF_SIZE, is fixed. Is there a reason why YY_BUF_SIZE can't be
> overridden?

I don't remember offhand why I didn't make it redefinable, but note that
you can effect smaller buffer sizes using yy_create_buffer().

		Vern

_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Mon May 21 05:59:38 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id FAA13870
	for <wlestes@localhost>; Mon, 21 May 2001 05:59:38 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Mon, 21 May 2001 05:59:38 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f4L9d5q15741
	for <wlestes@hermes.email.uncg.edu>; Mon, 21 May 2001 05:39:05 -0400 (EDT)
Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id FAA22405
	for <wlestes@uncg.edu>; Mon, 21 May 2001 05:39:06 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 151m9W-000616-00
	for <wlestes@uncg.edu>; Mon, 21 May 2001 05:39:02 -0400
Received: from [202.54.26.202] (helo=hindon.hss.co.in)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 151m7z-0005xX-00
	for <help-flex@gnu.org>; Mon, 21 May 2001 05:37:27 -0400
Received: from hsssun01.hss.hns.com (localhost [127.0.0.1])
	by hindon.hss.co.in (8.10.0/8.10.0) with ESMTP id f4L9cb501756
	for <help-flex@gnu.org>; Mon, 21 May 2001 15:08:38 +0530 (IST)
Received: from sampark.hss.hns.com (sampark [139.85.229.22])
	by hsssun01.hss.hns.com (8.10.0/8.10.0) with SMTP id f4L9kWY10057
	for <help-flex@gnu.org>; Mon, 21 May 2001 15:16:45 +0530 (IST)
Received: by sampark.hss.hns.com(Lotus SMTP MTA Internal build v4.6.2  (651.2 6-10-1998))  id 65256A53.0034A297 ; Mon, 21 May 2001 15:04:54 +0530
X-Lotus-FromDomain: HSSBLR
From: kbinu@hss.hns.com
To: help-flex@gnu.org
cc: crajasri@hss.hns.com
Message-ID: <65256A53.0034A096.00@sampark.hss.hns.com>
Subject: Enhancements in flex for error handling
Mime-Version: 1.0
Content-type: text/plain; charset=us-ascii
Content-Disposition: inline
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Mon, 21 May 2001 14:55:56 +0530

*** EOOH ***
From: kbinu@hss.hns.com
To: help-flex@gnu.org
cc: crajasri@hss.hns.com
Subject: Enhancements in flex for error handling
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Mon, 21 May 2001 14:55:56 +0530




Hi
     We have been using flex generated scanners for a project. In our
application, we need to ensure that the application does not exit on system
errors including memory allocation failures. For errors that might occur
while the scanner allocates memory, we thought we would re-define
YY_FATAL_ERROR to something like
#define YY_FATAL_ERROR(x) return (error_indication=x, 0)
where error_indication is a global that I would check after the lexer
returns. This however is not feasible since YY_FATAL_ERROR is used in
functions called within yylex. Some of these do not return values. Also
yylex doesn't check if the called function encountered errors.
Is there any plan to enhance flex to return cleanly from yylex instead of
using exit() ? If not, any references on how to go about modifying the
skeleton scanner for this feature ?

-Binu



_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Mon May 21 12:35:41 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA14455
	for <wlestes@localhost>; Mon, 21 May 2001 12:35:41 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Mon, 21 May 2001 12:35:41 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f4LGF4q14830
	for <wlestes@hermes.email.uncg.edu>; Mon, 21 May 2001 12:15:05 -0400 (EDT)
Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA05855
	for <wlestes@uncg.edu>; Mon, 21 May 2001 12:15:04 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 151sKm-0003HU-00
	for <wlestes@uncg.edu>; Mon, 21 May 2001 12:15:04 -0400
Received: from web9407.mail.yahoo.com ([216.136.129.23])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 151sIL-0003CL-00
	for <help-flex@gnu.org>; Mon, 21 May 2001 12:12:33 -0400
Message-ID: <20010521161232.55864.qmail@web9407.mail.yahoo.com>
Received: from [216.254.82.102] by web9407.mail.yahoo.com; Mon, 21 May 2001 09:12:32 PDT
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: Enhancements in flex for error handling
To: kbinu@hss.hns.com, help-flex@gnu.org
Cc: crajasri@hss.hns.com
In-Reply-To: <65256A53.0034A096.00@sampark.hss.hns.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Mon, 21 May 2001 09:12:32 -0700 (PDT)

*** EOOH ***
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: Enhancements in flex for error handling
To: kbinu@hss.hns.com, help-flex@gnu.org
Cc: crajasri@hss.hns.com
In-Reply-To: <65256A53.0034A096.00@sampark.hss.hns.com>
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Mon, 21 May 2001 09:12:32 -0700 (PDT)

> using exit() ? If not, any references on how to go about modifying the
> skeleton scanner for this feature ?

You might get away with something like this (without having to modify the skeleton
code):   yyerror sets a flag, then resets the scanner, pointing the input to
/dev/null.
The parser will have to check the error flag, of course.

-John




__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Mon Jun  4 11:26:56 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id LAA07669
	for <wlestes@localhost>; Mon, 4 Jun 2001 11:26:55 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Mon, 04 Jun 2001 11:26:55 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f54F63q16735
	for <wlestes@hermes.email.uncg.edu>; Mon, 4 Jun 2001 11:06:03 -0400 (EDT)
Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id LAA00743
	for <wlestes@uncg.edu>; Mon, 4 Jun 2001 11:06:02 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 156vve-0003bF-00
	for <wlestes@uncg.edu>; Mon, 04 Jun 2001 11:06:02 -0400
Received: from mx1.thebiz.net ([216.238.0.20])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 156vtP-0003Xd-00
	for <help-flex@gnu.org>; Mon, 04 Jun 2001 11:03:43 -0400
Received: (qmail 14188 invoked from network); 4 Jun 2001 11:03:40 -0400
Received: from mail2.backend.thebiz.net (HELO mail2.thebiz.net) (172.16.0.129)
  by mx1.backend.thebiz.net with SMTP; 4 Jun 2001 11:03:40 -0400
Received: (qmail 26039 invoked by uid 0); 4 Jun 2001 11:03:39 -0400
Received: from unknown (HELO abit) (216.238.78.51)
  by mail.ulster.net with SMTP; 4 Jun 2001 11:03:39 -0400
Message-ID: <006701c0ed07$fcefc5a0$0400a8c0@abit>
From: "Bill Fenlason" <BillFen@Ulster.Net>
To: <help-flex@gnu.org>
Subject: FLEX <<EOF>> with yymore() token
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.3
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Mon, 4 Jun 2001 11:06:52 -0400

*** EOOH ***
From: "Bill Fenlason" <BillFen@Ulster.Net>
To: <help-flex@gnu.org>
Subject: FLEX <<EOF>> with yymore() token
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Mon, 4 Jun 2001 11:06:52 -0400

I posted part of this question to comp.compilers, and John Millaway pointed
me here.  Thanks John.  I've read the archives but did not see this topic
discussed.

In FLEX, the current buffer is flushed immediately when EOF is encountered,
even if it contains a token pushed by yymore().  That means that something
like:
    <start_cond><<EOF>>{If (yyleng > 0) return(A_TOKEN) .... }
fails, because yyleng may be non-zero but yytext is null.  The token is
copied to the start of the buffer but is then overwritten by the buffer
flush (via yyrestart).

I modified the skeleton to check this out.  If the call to yyrestart is
bypassed (OK in my case), the problem partly goes away.  Is this a bug or an
unintended byproduct?

The core issue relates to <<EOF>> and what actions after <<EOF>> are
allowed.  <<EOF>> is logically a state rather than a token, and the null
return (after yywrap) makes perfect sense to me.  The comment in the code
about a repeated call returning null again also makes sense, but it seems to
me that allowing the return of a residual token (pushed by yymore) would be
appropriate.  I realize the difficulty in trying to allow <<EOF>> as right
context in a pattern, and I had hoped to accomplish the same thing via the
<<EOF>> rules.

Currently at <<EOF>> yyleng is set to 1 plus the yymore length, and I would
propose that it should be set to the yymore length only (usually 0).  The
scan has to rely on the trailing null in the buffer to identify the <<EOF>>
state, but should it be treated as an actual token?  (In the case above I
needed to use --yyleng.)

I understand the need to reset the buffer in case the user has changed yyin.

The man page specifies that repeated calls after EOF are undefined.  Would
defining them such that zero additional characters are matched and that null
is returned be an improvement?  Should the calculation of yyleng at <<EOF>>
be changed?  Should there be a change regarding the buffer flush to allow
the residual token to be returned?

My case involves recognizing identifiers which may contain extralingual
characters defined at runtime.

Thank you.

Bill Fenlason




_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1, answered,,
X-Coding-System: nil
Mail-from: From BillFen@Ulster.Net  Sun Jun 10 13:20:00 2001
Return-Path: <BillFen@Ulster.Net>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA02104
	for <wlestes@localhost>; Sun, 10 Jun 2001 13:20:00 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Sun, 10 Jun 2001 13:20:00 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5AHIPs03250
	for <wlestes@hermes.email.uncg.edu>; Sun, 10 Jun 2001 13:18:25 -0400 (EDT)
Received: from mx1.thebiz.net (mx1.thebiz.net [216.238.0.20])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id NAA27551
	for <wlestes@uncg.edu>; Sun, 10 Jun 2001 13:18:24 -0400 (EDT)
Received: (qmail 24543 invoked from network); 10 Jun 2001 13:18:24 -0400
Received: from unknown (HELO mail2.thebiz.net) (172.16.0.129)
  by mx1.backend.thebiz.net with SMTP; 10 Jun 2001 13:18:24 -0400
Received: (qmail 29926 invoked by uid 0); 10 Jun 2001 13:18:23 -0400
Received: from unknown (HELO abit) (216.238.78.51)
  by mail.ulster.net with SMTP; 10 Jun 2001 13:18:23 -0400
Message-ID: <00f301c0f1d1$bb1ef140$0400a8c0@abit>
From: "Bill Fenlason" <BillFen@Ulster.Net>
To: <wlestes@uncg.edu>
Subject: FLEX modifications
Date: Sun, 10 Jun 2001 13:21:02 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300

*** EOOH ***
From: "Bill Fenlason" <BillFen@Ulster.Net>
To: <wlestes@uncg.edu>
Subject: FLEX modifications
Date: Sun, 10 Jun 2001 13:21:02 -0400

Hello Will,

Are you currently the one responsible for FLEX development and maint?  I saw
you pointed to in the FLEX help archives.

Since no one has commented on my recent message regarding yymore() and
<<EOF>>, I though I would send you a note directly.

Are you interested in a patch and documentation changes?  I'll be happy to
develop them and send them to you.  It will be some work for me since I
would want to be sure that everything is bulletproof.  But I don't want to
spend the time on it if there is no agreement that the change is both needed
and wanted.

The reason I'm implementing this is that the parser interface routine I'm
developing builds a token chain that includes tokens for missing ending
delimiters (comment ends, quotes, parens, etc, as well as include file end
identifiers.  It is convenient to keep generating zero length tokens at
<<EOF>> to handle this, with the final YY_NULL being delayed until nothing
is outstanding or pushed with yymore().  Leaving repeated calls after EOF as
undefined and undocumented seems to me to be a loose end that might well be
clarified.  I think that my approach makes sense in general, and had hoped
that others more experienced with FLEX would point out some pros and cons.

I have some other topics to ask about along with some suggestions, and it
will be helpful to know if you are interested in this or other changes and
additions to FLEX.

I'll be using a modified skeleton in any event so I'm not dependent (or
asking for) any "official" changes.  But FLEX is a wonderful tool, and I
wouldn't mind contributing something to it if I am able to.

Thanks.

Bill Fenlason

ps I assume that Vern is a very busy guy so I have not written to him.  But
feel free to forward this to him if you think it appropriate.





1, answered,,
Summary-line: 10-Jun         BillFen@Ulster.Net [121] #Re: FLEX modifications
X-Coding-System: nil
Mail-from: From BillFen@Ulster.Net  Sun Jun 10 20:30:13 2001
Return-Path: <BillFen@Ulster.Net>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id UAA02667
	for <wlestes@localhost>; Sun, 10 Jun 2001 20:30:13 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Sun, 10 Jun 2001 20:30:13 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5B0SGs07342
	for <wlestes@hermes.email.uncg.edu>; Sun, 10 Jun 2001 20:28:16 -0400 (EDT)
Received: from mx1.thebiz.net (mx1.thebiz.net [216.238.0.20])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id UAA12568
	for <wlestes@uncg.edu>; Sun, 10 Jun 2001 20:28:17 -0400 (EDT)
Received: (qmail 24345 invoked from network); 10 Jun 2001 20:28:15 -0400
Received: from unknown (HELO mail2.thebiz.net) (172.16.0.129)
  by mx1.backend.thebiz.net with SMTP; 10 Jun 2001 20:28:15 -0400
Received: (qmail 3989 invoked by uid 0); 10 Jun 2001 20:28:13 -0400
Received: from unknown (HELO abit) (216.238.78.51)
  by mail.ulster.net with SMTP; 10 Jun 2001 20:28:13 -0400
Message-ID: <001201c0f20d$eb553360$0400a8c0@abit>
From: "Bill Fenlason" <BillFen@Ulster.Net>
To: "W. L. Estes" <wlestes@uncg.edu>
References:  <00f301c0f1d1$bb1ef140$0400a8c0@abit> <200106101934.PAA02280@michael.uncg.edu>
Subject: Re: FLEX modifications
Date: Sun, 10 Jun 2001 20:31:55 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300

*** EOOH ***
From: "Bill Fenlason" <BillFen@Ulster.Net>
To: "W. L. Estes" <wlestes@uncg.edu>
Subject: Re: FLEX modifications
Date: Sun, 10 Jun 2001 20:31:55 -0400

Will,

Thanks for responding, and for pointing out that I could keep track of the
paired delimiter state in the calling program - certainly a reasonable
question.

I decided against that approach primarily because I didn't want to
complicate the calling program unnecessarily.  I found that treating this as
a scanning function allowed the overall coding to be smaller and more
reasonable.  For example, I handle nested comments, and the scanner needs to
use separate start conditions.  The nesting level needs to be maintained for
that any way, so using additional calls after eof makes it really simple - I
just return the zero length "missing delimeter" tokens and decrease the
nesting level.  When it reaches zero I go back to the base state and YY_NULL
is returned.  All in all, trying to keep track in both places is a
duplication.

But that does not explain the yymore() issue.  The language I'm scanning
(PL/I) allows identifier name characters to be specified at runtime.  The
feature is to support foreign language keyboards etc.  So the problem is how
to scan them?  I don't want to force the calling program to paste parts of a
word together, and I have to test any non conventional character (i.e.
128-255) to determine if it is a name character or not.  My solution is to
yymore() each word, and either append a valid extralingual character or
return the word.  Works great, except at EOF.  I don't want to depend on a
trailing NL character, although it would be present almost all of the time.
(After 35 years of programming, I've learned the value of making things
bulletproof  8:-).

Finally, the actions at eof I'm proposing just "feel right".  I hope after
some reflection you come to the same conclusion.  I'll be glad to go into
lots more detail in case you have any fine points to consider.

The next few issues I have relate to providing assistance for unlimied
include file nesting, and how to assist with token location information
(yylineno and offset) without having the performance robbing rescan for NL.
Also I'd like to kick around some ideas related to gen.c and skeletons.

Would you rather that I discuss these things with you directly, or should I
use the list?  I don't know the balance between knowledgeable programmers
and developers, and users in the list membership.  I would like a healthy
discussion on these ideas and questions but I wouldn't want to add
inappropriate things to the list.

Thanks again - hope this is not taking too much of your time.

Bill Fenlason

ps. a snapshot would be great!

----- Original Message -----
From: W. L. Estes
To: BillFen@Ulster.Net
Sent: Sunday, June 10, 2001 3:34 PM
Subject: Re: FLEX modifications


> Are you currently the one responsible for FLEX development and maint?  I
saw
> you pointed to in the FLEX help archives.

yes. :)

> Since no one has commented on my recent message regarding yymore() and
> <<EOF>>, I though I would send you a note directly.
>
> Are you interested in a patch and documentation changes?  I'll be happy to
> develop them and send them to you.  It will be some work for me since I
> would want to be sure that everything is bulletproof.  But I don't want to
> spend the time on it if there is no agreement that the change is both
needed
> and wanted.

On first reading of your message, I thought that I needed to think
about what you were asking. Unfortunately, you got put way down in the
queue.

> The reason I'm implementing this is that the parser interface routine I'm
> developing builds a token chain that includes tokens for missing ending
> delimiters (comment ends, quotes, parens, etc, as well as include file end
> identifiers.  It is convenient to keep generating zero length tokens at
> <<EOF>> to handle this, with the final YY_NULL being delayed until nothing
> is outstanding or pushed with yymore().  Leaving repeated calls after EOF
as
> undefined and undocumented seems to me to be a loose end that might well
be
> clarified.  I think that my approach makes sense in general, and had hoped

> that others more experienced with FLEX would point out some pros and cons.

devil's advocate question: why not just keep track of your state and
compare: e.g. if (eof && !closed_delim_state)...

> I have some other topics to ask about along with some suggestions, and it
> will be helpful to know if you are interested in this or other changes and
> additions to FLEX.

I'm always interested in suggestions, patches etc. please note: i'm
not saying no to your idea above, i'm just asking you to explain it to
me better--because i'm not quite getting what you're saying.

> I'll be using a modified skeleton in any event so I'm not dependent (or
> asking for) any "official" changes.  But FLEX is a wonderful tool, and I
> wouldn't mind contributing something to it if I am able to.

Certainly. If you'd like my current sources (which have migrated quite
a bit since Vern's last 2.5.4 release), let me know. you can have a
copy of the cvs repository or a snapshot of the current tree.

and what is your need for a modified skeleton? (i.e. is that something
which might be of use to the general flex user?)

> Thanks.

--Will


1, answered,,
Summary-line: 15-Jun         BillFen@Ulster.Net  [66] #Re: FLEX modifications
X-Coding-System: nil
Mail-from: From BillFen@Ulster.Net  Fri Jun 15 15:22:34 2001
Return-Path: <BillFen@Ulster.Net>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id PAA05265
	for <wlestes@localhost>; Fri, 15 Jun 2001 15:22:33 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Fri, 15 Jun 2001 15:22:33 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5FJKjs04809
	for <wlestes@hermes.email.uncg.edu>; Fri, 15 Jun 2001 15:20:45 -0400 (EDT)
Received: from mx3.thebiz.net (mx3.thebiz.net [216.238.0.22])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id PAA05329
	for <wlestes@uncg.edu>; Fri, 15 Jun 2001 15:20:45 -0400 (EDT)
Received: (qmail 34351 invoked from network); 15 Jun 2001 15:19:39 -0400
Received: from unknown (172.16.0.72)
  by mx3.backend.thebiz.net with QMQP; 15 Jun 2001 15:19:39 -0400
Received: from unknown (HELO abit) (216.238.78.36)
  by mail.ulster.net with SMTP; 15 Jun 2001 15:19:39 -0400
Message-ID: <001901c0f5d0$a7080fe0$0400a8c0@abit>
From: "Bill Fenlason" <BillFen@Ulster.Net>
To: "W. L. Estes" <wlestes@uncg.edu>
References:  <00f301c0f1d1$bb1ef140$0400a8c0@abit> <200106101934.PAA02280@michael.uncg.edu>
Subject: Re: FLEX modifications
Date: Fri, 15 Jun 2001 15:23:25 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300

*** EOOH ***
From: "Bill Fenlason" <BillFen@Ulster.Net>
To: "W. L. Estes" <wlestes@uncg.edu>
Subject: Re: FLEX modifications
Date: Fri, 15 Jun 2001 15:23:25 -0400

Hello Will,

I assume that you have not had time to get to my last note, or perhaps it is
just too far down in the queue.  This one will keep it company  8-).

There are two lines of code that I've added to the skeleton which seem to
solve the problem of repeated calls at end of file and the yymore()
situation.  I'll briefly describe them so you can decide if you would like
to consider including them.

This is below the yywrap() test, near:
   case EOB_ACT_END_OF_FILE:

     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;

     yyleng = YY_MORE_ADJ;    /* <== Added Line */

As the related comment described, yytext was carefully set up.  This line
sets up yyleng as for a normal token.  The value will be the length of any
yymore() token (normally zero), which is the difference between the
current buffer pointer and the current text pointer.  The code after the
match
is made sets he length to one greater because of the double null EOB
marker.  --yyleng will work as well.

The second change is in the yy_get_next_buffer routine:

    ret_val = EOB_ACT_END_OF_FILE;

    /* <== Inserted if condition ==> */
    if ( yyin != yy_current_buffer->yy_input_file
    || yy_current_buffer-> yy_buffer_status == YY_BUFFER_NEW)

   yyrestart( yyin );

It makes the restart conditional on a change of the yyin address or a newly
created buffer.  It is not exactly the way I would like it, but it is not
unreasonable.

I can understand the desire to allow the user to just reassign yyin within
an <<EOF>> rule, but I think the earlier version approach of requiring the
user to issue YY_NEW_FILE is more orderly.  The philosophical issue is
if EOF is a persistent state or if a recall after it should automatically
imply that a new file is being provided.  Both sides of the argument can
have
advantages for the user and I had hoped for some discussion of the point
in case there is something that I don't understand about it.

I'm still testing and researching the code and will let you know if I find
anything else necessary - I need to more fully check the input() routine.  I
spent a while checking both the skeleton logic and the various alternatives
generated within gen.c.  Hopefully I didn't miss anything.  .

Bill Fenlason








1, answered,,
X-Coding-System: nil
Mail-from: From vern@daffy.ee.lbl.gov  Sun Jun 17 03:08:59 2001
Return-Path: <vern@daffy.ee.lbl.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA06939
	for <wlestes@localhost>; Sun, 17 Jun 2001 03:08:58 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Sun, 17 Jun 2001 03:08:58 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5H76cs21638
	for <wlestes@hermes.email.uncg.edu>; Sun, 17 Jun 2001 03:06:38 -0400 (EDT)
Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA19164
	for <wlestes@uncg.edu>; Sun, 17 Jun 2001 03:06:38 -0400 (EDT)
Received: (from vern@localhost)
	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f5H76So24900;
	Sun, 17 Jun 2001 00:06:28 -0700 (PDT)
Message-Id: <200106170706.f5H76So24900@daffy.ee.lbl.gov>
To: Theo de Raadt <deraadt@cvs.openbsd.org>
Subject: Re: lex license
Cc: wlestes@uncg.edu
In-reply-to: Your message of Sat, 02 Jun 2001 13:15:37 PDT.
Date: Sun, 17 Jun 2001 00:06:28 PDT
From: Vern Paxson <vern@ee.lbl.gov>

*** EOOH ***
To: Theo de Raadt <deraadt@cvs.openbsd.org>
Subject: Re: lex license
Cc: wlestes@uncg.edu
In-reply-to: Your message of Sat, 02 Jun 2001 13:15:37 PDT.
Date: Sun, 17 Jun 2001 00:06:28 PDT
From: Vern Paxson <vern@ee.lbl.gov>

> Specifically, this license does not grant modification
> rights -- which must be explicitly granted under copyright law.

Yes, this came up a while ago, and I put together a flex release with
a modified copyright that begins:

        Redistribution and use in source and binary forms, with or
        without modification, are permitted provided that:

However, that version didn't get fully integrated into the sources I sent
to Will.  It's in the COPYING file but not in the individual source files,
just because I hadn't gotten around to it.

Will, feel free to update the copyrights in each of the files with the
one in COPYING.

		Vern


1,,
X-Coding-System: nil
Mail-from: From help-flex-admin@gnu.org  Sun Jun 17 13:08:17 2001
Return-Path: <help-flex-admin@gnu.org>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA08097
	for <wlestes@localhost>; Sun, 17 Jun 2001 13:08:17 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Sun, 17 Jun 2001 13:08:17 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5HH62s28053
	for <wlestes@hermes.email.uncg.edu>; Sun, 17 Jun 2001 13:06:02 -0400 (EDT)
Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA09353
	for <wlestes@uncg.edu>; Sun, 17 Jun 2001 13:06:02 -0400 (EDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
	id 15Bfzu-0005ly-00
	for <wlestes@uncg.edu>; Sun, 17 Jun 2001 13:06:02 -0400
Received: from web9406.mail.yahoo.com ([216.136.129.22])
	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
	id 15BfxJ-0005iZ-00
	for <help-flex@gnu.org>; Sun, 17 Jun 2001 13:03:21 -0400
Message-ID: <20010617170320.76960.qmail@web9406.mail.yahoo.com>
Received: from [205.197.108.252] by web9406.mail.yahoo.com; Sun, 17 Jun 2001 10:03:20 PDT
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: yylineno
To: Bill Fenlason <BillFen@Ulster.Net>
Cc: help-flex@gnu.org
In-Reply-To: <001601c0f6ce$b174eda0$0400a8c0@abit>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: help-flex-admin@gnu.org
Errors-To: help-flex-admin@gnu.org
X-BeenThere: help-flex@gnu.org
X-Mailman-Version: 2.0.5
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Sun, 17 Jun 2001 10:03:20 -0700 (PDT)

*** EOOH ***
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: yylineno
To: Bill Fenlason <BillFen@Ulster.Net>
Cc: help-flex@gnu.org
In-Reply-To: <001601c0f6ce$b174eda0$0400a8c0@abit>
Sender: help-flex-admin@gnu.org
Precedence: bulk
List-Help: <mailto:help-flex-request@gnu.org?subject=help>
List-Post: <mailto:help-flex@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=subscribe>
List-Id: Users list for Flex,
	the GNU lexical analyser generator <help-flex.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
Date: Sun, 17 Jun 2001 10:03:20 -0700 (PDT)

> How do you (or would you) keep track of the token offset within the line?
> 

By this, do you mean the "column"?  If your tokens do not span lines,
then you can use yyleng. If the tokens do span lines,
then you have to rescan the token. Yuk!

%%
  /* This is untested code. But in the right spirit ! */
  static int yycol=0, next_col=0;
  char* _p;

  /* Update yycol for tokens that do not contain '\n' */
  #define COL()  yycol=next_col; next_col += yyleng

  /* Update yycol for tokens that may possibly contain '\n' */
  #define COLN() do{ \
                   yycol=next_col; \
                   for(_p=yytext; *_p; _p++,next_col++)  \
                      if( *_p == '\n' )  \
                         next_col = -1; \
                 }while(0)

  #define NEWL() yycol = next_col= 0

foo|bar  { COL();  printf("%d: %s\n" ,  yycol, yytext); }
\n       { NEWL(); printf("%d: NEWL\n", yycol); }
foo\nbar { COLN(); printf("%d: %s\n" ,  yycol, yytext); }

%%

-John



__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/

_______________________________________________
Help-flex mailing list
Help-flex@gnu.org
http://mail.gnu.org/mailman/listinfo/help-flex


1, answered,,
X-Coding-System: nil
Mail-from: From avn@any.ru  Sun Jun 24 03:10:57 2001
Return-Path: <avn@any.ru>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA10135
	for <wlestes@localhost>; Sun, 24 Jun 2001 03:10:57 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Sun, 24 Jun 2001 03:10:57 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5O78ts09193
	for <wlestes@hermes.email.uncg.edu>; Sun, 24 Jun 2001 03:08:55 -0400 (EDT)
Received: from ajax2.sovam.com (ajax2.sovam.com [194.67.1.173])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA15567
	for <wlestes@uncg.edu>; Sun, 24 Jun 2001 03:08:54 -0400 (EDT)
Received: from ts11-a1.dial.sovam.com ([195.239.68.1]:2044 "EHLO srv2.any"
	ident: "TIMEDOUT" whoson: "-unregistered-" smtp-auth: <none> TLS-CIPHER:
	<none> TLS-PEER: <none>) by ajax2.sovam.com with ESMTP
	id <S426173AbRFXHIs>; Sun, 24 Jun 2001 11:08:48 +0400
Received: from localhost (avn@localhost)
	by srv2.any (8.11.3/8.11.3) with ESMTP id f5O7Adg89096
	for <wlestes@uncg.edu>; Sun, 24 Jun 2001 11:10:39 +0400 (MSD)
	(envelope-from avn@any.ru)
Date: 	Sun, 24 Jun 2001 11:10:39 +0400 (MSD)
From: "Alexey V. Neyman" <avn@any.ru>
X-X-Sender:  <avn@srv2.any>
To: <wlestes@uncg.edu>
Subject: lex generates files that give warnings with gcc
Message-ID: <20010624111019.R89058-100000@srv2.any>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

*** EOOH ***
Date: 	Sun, 24 Jun 2001 11:10:39 +0400 (MSD)
From: "Alexey V. Neyman" <avn@any.ru>
To: <wlestes@uncg.edu>
Subject: lex generates files that give warnings with gcc

Hello!

I compiled lex-produced files with 'gcc -Wconversion', and it gives
warnings about passing arguments to fread/fwrite as unsigned due to
function prototypes. This produces warnings when program is compiled
under suggested 'strict warnings' in FreeBSD, ${BDECFLAGS}. More, these
warnings point to .l file that was fed to lex.

You can see detailed problem report, samples of failing code and a
proposed fix at:

http://www.freebsd.org/cgi/query-pr.cgi?pr=28364

Regards, Alexey.
PS. Waiting for fix and for FreeBSD to import fixed :)

-- 
-------------------------------------------------+---------------------------
         We chose to leave when there was        | Regards, Alexey V. Neyman
           no longer a reason to stay.           |     mailto: avn@any.ru
---------------------------------( Arilou, SC2 )-+---------------------------




1, answered,,
X-Coding-System: nil
Mail-from: From ashalper@usgs.gov  Mon Jul 23 20:31:28 2001
Return-Path: <ashalper@usgs.gov>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id UAA31191
	for <wlestes@localhost>; Mon, 23 Jul 2001 20:31:28 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Mon, 23 Jul 2001 20:31:28 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f6O0QmW26609
	for <wlestes@hermes.email.uncg.edu>; Mon, 23 Jul 2001 20:26:48 -0400 (EDT)
Received: from gsazflgm01.wr.usgs.gov (gsazflgm01.wr.usgs.gov [130.118.164.152])
	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id UAA17843
	for <wlestes@uncg.edu>; Mon, 23 Jul 2001 20:26:47 -0400 (EDT)
Subject: Re: shared object libfl?
To: wlestes@uncg.edu
X-Mailer: Lotus Notes Release 5.0.1b September 30, 1999
Message-ID: <OF7BEDABA3.AFD35C13-ON07256A92.00837F9F@wr.usgs.gov>
From: "Andrew S Halper" <ashalper@usgs.gov>
Date: Mon, 23 Jul 2001 16:56:52 -0700
X-MIMETrack: Serialize by Router on gsazflgm01/SERVER/USGS/DOI(Release 5.0.7 |March 21, 2001) at
 07/23/2001 05:26:49 PM
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii

*** EOOH ***
Subject: Re: shared object libfl?
To: wlestes@uncg.edu
From: "Andrew S Halper" <ashalper@usgs.gov>
Date: Mon, 23 Jul 2001 16:56:52 -0700


----- Forwarded by Andrew S Halper/WRD/USGS/DOI on 07/23/01 04:56 PM -----
                                                                                                                              
                    Vern Paxson                                                                                               
                    <vern@ee.lbl.        To:     "Andrew S Halper" <ashalper@usgs.gov>                                        
                    gov>                 cc:                                                                                  
                                         Subject:     Re: shared object libfl?                                                
                    07/23/01                                                                                                  
                    05:15 PM                                                                                                  
                                                                                                                              
                                                                                                                              



> Is there any special reason a shared object library is not built by the
> flex source? Is there a 'configure' option to make one?

Please send this to Will Estes (wlestes@uncg.edu), who has now taken over
flex maintenance and development.

           Thanks,

                     Vern




1,,
X-Coding-System: nil
Mail-from: From johnmillaway@yahoo.com  Thu Aug 16 11:11:13 2001
Return-Path: <johnmillaway@yahoo.com>
Received: from localhost (localhost [127.0.0.1])
	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id LAA22070
	for <wlestes@localhost>; Thu, 16 Aug 2001 11:11:13 -0400
Received: from imap.uncg.edu
	by localhost with IMAP (fetchmail-5.1.0)
	for wlestes@localhost (single-drop); Thu, 16 Aug 2001 11:11:13 -0400 (EDT)
Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f7GF5xW19868
	for <wlestes@hermes.email.uncg.edu>; Thu, 16 Aug 2001 11:05:59 -0400 (EDT)
Received: from web9405.mail.yahoo.com (web9405.mail.yahoo.com [216.136.129.111])
	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id LAA07077
	for <wlestes@uncg.edu>; Thu, 16 Aug 2001 11:05:57 -0400 (EDT)
Message-ID: <20010816150558.37014.qmail@web9405.mail.yahoo.com>
Received: from [216.254.82.102] by web9405.mail.yahoo.com; Thu, 16 Aug 2001 08:05:58 PDT
Date: Thu, 16 Aug 2001 08:05:58 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: comments in lexical definitions
To: Tobias Ostgathe <ostgathe@tesionmail.de>
Cc: help-flex@gnu.org, Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>,
        "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <003301c1264e$0677bea0$2465e2c3@wuschtbix>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

*** EOOH ***
Date: Thu, 16 Aug 2001 08:05:58 -0700 (PDT)
From: "John W. Millaway" <johnmillaway@yahoo.com>
Subject: Re: comments in lexical definitions
To: Tobias Ostgathe <ostgathe@tesionmail.de>
Cc: help-flex@gnu.org, Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>,
        "W. L. Estes" <wlestes@uncg.edu>
In-Reply-To: <003301c1264e$0677bea0$2465e2c3@wuschtbix>

> > > I'm missing the possibility to include comments in lexical definition

Flex does allow comments everywhere you could possibly need them. This
discussion suggests a failure in the flex docs to make the syntax clear. What's
the trick, then? 

1. Use traditional C comments, not '//' comments.
2. INDENT THE COMMENT.

-John
(Exhaustive example follows)

%{
    /* 1  */
%}
    /*  2  */
%option reentrant
%x STATE_X

%%
   /* 3 */
ruleA    /* 4 */ { /* 5 */}
ruleB    /* 6 */ ECHO; /* 7 */
   /* 8 */
<STATE_X>{
ruleC   ECHO;
   /* 9 */
ruleD   ECHO;
}

%%
/* 10 */



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/