Changeset 3e173a in git
- Timestamp:
- Apr 14, 2011, 10:40:08 AM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- abff74aba5be226bf804f522482dfdcd4976a4b1
- Parents:
- 42653b0f140bad76732590061da8a4a27f60ff2d
- Files:
-
- 1 deleted
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
Singular/distrib.h
r42653b r3e173a 1 /* 2 3 */ 4 5 /* define this if we pack a distribution */ 6 /* #undef MAKE_DISTRIBUTION */ 1 #undef MAKE_DISTRIBUTION -
Singular/libparse.cc
r42653b r3e173a 20 20 21 21 /* Scanner skeleton version: 22 * $Header: / exports/cvsroot-2/cvsroot/Singular/libparse.cc,v 1.15 2009-07-28 15:22:17 SingularExp $22 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ 23 23 */ 24 24 … … 1057 1057 #include <stdlib.h> 1058 1058 #include <ctype.h> 1059 #include < Singular/mod2.h>1059 #include <kernel/mod2.h> 1060 1060 #ifdef STANDALONE_PARSER 1061 #include "utils.h"1061 #include <Singular/utils.h> 1062 1062 #define HAVE_LIBPARSER 1063 1063 #define YYLPDEBUG 1 … … 1101 1101 1102 1102 char *yylp_buffer_start; 1103 #ifndef NEW_FLEX 1103 1104 int yylplineno = 1; 1105 #endif /* NEW_FLEX */ 1104 1106 int lpverbose = 0, check = 0; 1105 1107 int texinfo_out = 0; … … 1410 1412 { 1411 1413 register yy_state_type yy_current_state; 1412 register char *yy_cp = NULL, *yy_bp = NULL;1414 register char *yy_cp, *yy_bp; 1413 1415 register int yy_act; 1414 1416 1415 #line 2 28"libparse.l"1417 #line 231 "libparse.l" 1416 1418 1417 1419 … … 1506 1508 case 1: 1507 1509 YY_RULE_SETUP 1508 #line 2 29"libparse.l"1510 #line 232 "libparse.l" 1509 1511 { } 1510 1512 YY_BREAK 1511 1513 case 2: 1512 1514 YY_RULE_SETUP 1513 #line 23 0"libparse.l"1515 #line 233 "libparse.l" 1514 1516 { old_state = YYSTATE; BEGIN(comment); } 1515 1517 YY_BREAK 1516 1518 case 3: 1517 1519 YY_RULE_SETUP 1518 #line 23 2"libparse.l"1520 #line 235 "libparse.l" 1519 1521 { 1520 1522 yyless(4); old_state = YYSTATE; BEGIN(info); … … 1523 1525 case 4: 1524 1526 YY_RULE_SETUP 1525 #line 23 5"libparse.l"1527 #line 238 "libparse.l" 1526 1528 { 1527 1529 yyless(8); old_state = YYSTATE; BEGIN(category); … … 1530 1532 case 5: 1531 1533 YY_RULE_SETUP 1532 #line 2 38"libparse.l"1534 #line 241 "libparse.l" 1533 1535 { 1534 1536 if ( mode != GET_INFO ) … … 1554 1556 case 6: 1555 1557 YY_RULE_SETUP 1556 #line 2 59"libparse.l"1558 #line 262 "libparse.l" 1557 1559 { 1558 1560 found_version++; … … 1591 1593 case 7: 1592 1594 YY_RULE_SETUP 1593 #line 29 3"libparse.l"1595 #line 296 "libparse.l" 1594 1596 { p_static=TRUE; } 1595 1597 YY_BREAK 1596 1598 case 8: 1597 1599 YY_RULE_SETUP 1598 #line 29 5"libparse.l"1600 #line 298 "libparse.l" 1599 1601 { 1600 1602 char proc[256]; … … 1669 1671 case 9: 1670 1672 YY_RULE_SETUP 1671 #line 36 4"libparse.l"1673 #line 367 "libparse.l" 1672 1674 { 1673 1675 BEGIN(pexample); … … 1684 1686 case 10: 1685 1687 YY_RULE_SETUP 1686 #line 37 6"libparse.l"1688 #line 379 "libparse.l" 1687 1689 { quote++; 1688 1690 BEGIN(libcmd); … … 1691 1693 case 11: 1692 1694 YY_RULE_SETUP 1693 #line 38 0"libparse.l"1695 #line 383 "libparse.l" 1694 1696 { quote++; brace2++; 1695 1697 BEGIN(libcmd2); … … 1698 1700 case 12: 1699 1701 YY_RULE_SETUP 1700 #line 38 4"libparse.l"1702 #line 387 "libparse.l" 1701 1703 { 1702 1704 make_version(yytext, 0); … … 1708 1710 case 13: 1709 1711 YY_RULE_SETUP 1710 #line 39 0"libparse.l"1712 #line 393 "libparse.l" 1711 1713 { 1712 1714 #if YYLPDEBUG … … 1717 1719 case 14: 1718 1720 YY_RULE_SETUP 1719 #line 39 5"libparse.l"1721 #line 398 "libparse.l" 1720 1722 { 1721 1723 #if YYLPDEBUG > 1 … … 1726 1728 case 15: 1727 1729 YY_RULE_SETUP 1728 #line 40 0"libparse.l"1730 #line 403 "libparse.l" 1729 1731 { yyless(0); 1730 1732 BEGIN(INITIAL); … … 1734 1736 case 16: 1735 1737 YY_RULE_SETUP 1736 #line 40 4"libparse.l"1738 #line 407 "libparse.l" 1737 1739 { 1738 1740 yyless(0); … … 1744 1746 case 17: 1745 1747 YY_RULE_SETUP 1746 #line 41 1"libparse.l"1748 #line 414 "libparse.l" 1747 1749 { quote++; 1748 1750 BEGIN(libcmd); … … 1751 1753 case 18: 1752 1754 YY_RULE_SETUP 1753 #line 41 4"libparse.l"1755 #line 417 "libparse.l" 1754 1756 { quote++; brace2++; 1755 1757 BEGIN(libcmd2); … … 1758 1760 case 19: 1759 1761 YY_RULE_SETUP 1760 #line 4 17"libparse.l"1762 #line 420 "libparse.l" 1761 1763 { yylplineno++; } 1762 1764 YY_BREAK 1763 1765 case 20: 1764 1766 YY_RULE_SETUP 1765 #line 4 18"libparse.l"1767 #line 421 "libparse.l" 1766 1768 { 1767 1769 #if YYLPDEBUG > 1 … … 1774 1776 case 21: 1775 1777 YY_RULE_SETUP 1776 #line 42 5"libparse.l"1778 #line 428 "libparse.l" 1777 1779 { 1778 1780 #if YYLPDEBUG > 1 … … 1783 1785 case 22: 1784 1786 YY_RULE_SETUP 1785 #line 43 0"libparse.l"1787 #line 433 "libparse.l" 1786 1788 { 1787 1789 #if YYLPDEBUG > 1 … … 1793 1795 case 23: 1794 1796 YY_RULE_SETUP 1795 #line 43 6"libparse.l"1797 #line 439 "libparse.l" 1796 1798 { 1797 1799 yyless(0); … … 1803 1805 case 24: 1804 1806 YY_RULE_SETUP 1805 #line 44 2"libparse.l"1807 #line 445 "libparse.l" 1806 1808 { 1807 1809 yyless(0); … … 1813 1815 case 25: 1814 1816 YY_RULE_SETUP 1815 #line 4 48"libparse.l"1817 #line 451 "libparse.l" 1816 1818 { quote++; 1817 1819 BEGIN(libcmd); … … 1820 1822 case 26: 1821 1823 YY_RULE_SETUP 1822 #line 45 1"libparse.l"1824 #line 454 "libparse.l" 1823 1825 { quote++; brace2++; 1824 1826 BEGIN(libcmd2); … … 1827 1829 case 27: 1828 1830 YY_RULE_SETUP 1829 #line 45 5"libparse.l"1831 #line 458 "libparse.l" 1830 1832 { yylplineno++; } 1831 1833 YY_BREAK 1832 1834 case 28: 1833 1835 YY_RULE_SETUP 1834 #line 45 6"libparse.l"1836 #line 459 "libparse.l" 1835 1837 { 1836 1838 #if YYLPDEBUG … … 1841 1843 case 29: 1842 1844 YY_RULE_SETUP 1843 #line 46 1"libparse.l"1845 #line 464 "libparse.l" 1844 1846 { 1845 1847 found_oldhelp=1; … … 1851 1853 case 30: 1852 1854 YY_RULE_SETUP 1853 #line 4 69"libparse.l"1855 #line 472 "libparse.l" 1854 1856 { quote--; 1855 1857 yytext[yyleng-1] = '\0'; … … 1868 1870 case 31: 1869 1871 YY_RULE_SETUP 1870 #line 48 2"libparse.l"1872 #line 485 "libparse.l" 1871 1873 { quote--; brace2--; 1872 1874 yytext[yyleng-1] = '\0'; … … 1885 1887 case 32: 1886 1888 YY_RULE_SETUP 1887 #line 49 6"libparse.l"1889 #line 499 "libparse.l" 1888 1890 { } 1889 1891 YY_BREAK 1890 1892 case 33: 1891 1893 YY_RULE_SETUP 1892 #line 497"libparse.l"1894 #line 500 "libparse.l" 1893 1895 { 1894 1896 brace2++; … … 1900 1902 case 34: 1901 1903 YY_RULE_SETUP 1902 #line 50 3"libparse.l"1904 #line 506 "libparse.l" 1903 1905 { 1904 1906 brace2--; … … 1919 1921 case 35: 1920 1922 YY_RULE_SETUP 1921 #line 5 18"libparse.l"1923 #line 521 "libparse.l" 1922 1924 { 1923 1925 if(brace2>0) … … 1941 1943 case 36: 1942 1944 YY_RULE_SETUP 1943 #line 53 6"libparse.l"1945 #line 539 "libparse.l" 1944 1946 { yylplineno++; 1945 1947 if(brace2<=0) … … 1954 1956 case 37: 1955 1957 YY_RULE_SETUP 1956 #line 54 5"libparse.l"1958 #line 548 "libparse.l" 1957 1959 { } 1958 1960 YY_BREAK 1959 1961 case 38: 1960 1962 YY_RULE_SETUP 1961 #line 54 6"libparse.l"1963 #line 549 "libparse.l" 1962 1964 { old_state = YYSTATE; BEGIN(comment); } 1963 1965 YY_BREAK 1964 1966 case 39: 1965 1967 YY_RULE_SETUP 1966 #line 5 47"libparse.l"1968 #line 550 "libparse.l" 1967 1969 { 1968 1970 if(brace2<=0) … … 1975 1977 case 40: 1976 1978 YY_RULE_SETUP 1977 #line 55 5"libparse.l"1979 #line 558 "libparse.l" 1978 1980 { 1979 1981 #if YYLPDEBUG … … 1992 1994 case 41: 1993 1995 YY_RULE_SETUP 1994 #line 5 68"libparse.l"1996 #line 571 "libparse.l" 1995 1997 { 1996 1998 #if YYLPDEBUG … … 2003 2005 case 42: 2004 2006 YY_RULE_SETUP 2005 #line 57 5"libparse.l"2007 #line 578 "libparse.l" 2006 2008 { 2007 2009 if(check && yyleng>2) … … 2021 2023 case 43: 2022 2024 YY_RULE_SETUP 2023 #line 5 89"libparse.l"2025 #line 592 "libparse.l" 2024 2026 { printf("[%s]", yytext); } 2025 2027 YY_BREAK 2026 2028 case 44: 2027 2029 YY_RULE_SETUP 2028 #line 59 1"libparse.l"2030 #line 594 "libparse.l" 2029 2031 { } 2030 2032 YY_BREAK 2031 2033 case 45: 2032 2034 YY_RULE_SETUP 2033 #line 59 2"libparse.l"2035 #line 595 "libparse.l" 2034 2036 { 2035 2037 SET_HELP_END(mode, pi, current_pos(0)); … … 2053 2055 case 46: 2054 2056 YY_RULE_SETUP 2055 #line 61 0"libparse.l"2057 #line 613 "libparse.l" 2056 2058 { yylplineno++; } 2057 2059 YY_BREAK 2058 2060 case 47: 2059 2061 YY_RULE_SETUP 2060 #line 61 1"libparse.l"2062 #line 614 "libparse.l" 2061 2063 { } 2062 2064 YY_BREAK 2063 2065 case 48: 2064 2066 YY_RULE_SETUP 2065 #line 61 3"libparse.l"2067 #line 616 "libparse.l" 2066 2068 { 2067 2069 old_state = YYSTATE; … … 2072 2074 case 49: 2073 2075 YY_RULE_SETUP 2074 #line 6 18"libparse.l"2076 #line 621 "libparse.l" 2075 2077 {} 2076 2078 YY_BREAK 2077 2079 case 50: 2078 2080 YY_RULE_SETUP 2079 #line 6 19"libparse.l"2081 #line 622 "libparse.l" 2080 2082 { 2081 2083 brace1++; BEGIN(pbody); … … 2098 2100 case 51: 2099 2101 YY_RULE_SETUP 2100 #line 63 6"libparse.l"2102 #line 639 "libparse.l" 2101 2103 { yylplineno++;} 2102 2104 YY_BREAK 2103 2105 case 52: 2104 2106 YY_RULE_SETUP 2105 #line 6 38"libparse.l"2107 #line 641 "libparse.l" 2106 2108 { } 2107 2109 YY_BREAK 2108 2110 case 53: 2109 2111 YY_RULE_SETUP 2110 #line 6 39"libparse.l"2112 #line 642 "libparse.l" 2111 2113 { quote++; old_state = YYSTATE; 2112 2114 BEGIN(string); /* printf("%s", yytext); */ … … 2115 2117 case 54: 2116 2118 YY_RULE_SETUP 2117 #line 64 3"libparse.l"2119 #line 646 "libparse.l" 2118 2120 { 2119 2121 if(check) printf("*** found 2 proc whithin procedure '%s'.\n", … … 2124 2126 case 55: 2125 2127 YY_RULE_SETUP 2126 #line 6 48"libparse.l"2128 #line 651 "libparse.l" 2127 2129 { 2128 2130 if(check) printf("*** found 1 proc whithin procedure '%s'.\n", … … 2133 2135 case 56: 2134 2136 YY_RULE_SETUP 2135 #line 65 3"libparse.l"2137 #line 656 "libparse.l" 2136 2138 { 2137 2139 brace1++; … … 2143 2145 case 57: 2144 2146 YY_RULE_SETUP 2145 #line 6 59"libparse.l"2147 #line 662 "libparse.l" 2146 2148 { 2147 2149 #if YYLPDEBUG > 1 … … 2173 2175 case 58: 2174 2176 YY_RULE_SETUP 2175 #line 68 5"libparse.l"2177 #line 688 "libparse.l" 2176 2178 { 2177 2179 brace2++; /* printf("%s", yytext); */ … … 2180 2182 case 59: 2181 2183 YY_RULE_SETUP 2182 #line 6 88"libparse.l"2184 #line 691 "libparse.l" 2183 2185 { 2184 2186 brace2--; /* printf("%s", yytext); */ … … 2191 2193 case 60: 2192 2194 YY_RULE_SETUP 2193 #line 69 5"libparse.l"2195 #line 698 "libparse.l" 2194 2196 { 2195 2197 brace3++; /* printf("%s", yytext); */ … … 2198 2200 case 61: 2199 2201 YY_RULE_SETUP 2200 #line 698"libparse.l"2202 #line 701 "libparse.l" 2201 2203 { 2202 2204 brace3--; /* printf("%s", yytext); */ … … 2209 2211 case 62: 2210 2212 YY_RULE_SETUP 2211 #line 70 5"libparse.l"2213 #line 708 "libparse.l" 2212 2214 { yylplineno++; } 2213 2215 YY_BREAK 2214 2216 case 63: 2215 2217 YY_RULE_SETUP 2216 #line 70 6"libparse.l"2218 #line 709 "libparse.l" 2217 2219 { } 2218 2220 YY_BREAK 2219 2221 case 64: 2220 2222 YY_RULE_SETUP 2221 #line 7 08"libparse.l"2223 #line 711 "libparse.l" 2222 2224 { 2223 2225 quote++; BEGIN(string); … … 2230 2232 case 65: 2231 2233 YY_RULE_SETUP 2232 #line 71 5"libparse.l"2234 #line 718 "libparse.l" 2233 2235 { yylplineno++; } 2234 2236 YY_BREAK 2235 2237 case 66: 2236 2238 YY_RULE_SETUP 2237 #line 71 6"libparse.l"2239 #line 719 "libparse.l" 2238 2240 { } 2239 2241 YY_BREAK 2240 2242 case 67: 2241 2243 YY_RULE_SETUP 2242 #line 7 18"libparse.l"2244 #line 721 "libparse.l" 2243 2245 { 2244 2246 quote++; BEGIN(string); … … 2251 2253 case 68: 2252 2254 YY_RULE_SETUP 2253 #line 72 5"libparse.l"2255 #line 728 "libparse.l" 2254 2256 { yylplineno++; } 2255 2257 YY_BREAK 2256 2258 case 69: 2257 2259 YY_RULE_SETUP 2258 #line 72 6"libparse.l"2260 #line 729 "libparse.l" 2259 2261 { } 2260 2262 YY_BREAK 2261 2263 case 70: 2262 2264 YY_RULE_SETUP 2263 #line 7 29"libparse.l"2265 #line 732 "libparse.l" 2264 2266 { quote--; 2265 2267 copy_string(mode); … … 2274 2276 case 71: 2275 2277 YY_RULE_SETUP 2276 #line 7 38"libparse.l"2278 #line 741 "libparse.l" 2277 2279 { if (old_state == phelp) IncrCheckSum(*yytext);} 2278 2280 YY_BREAK 2279 2281 case 72: 2280 2282 YY_RULE_SETUP 2281 #line 7 39"libparse.l"2283 #line 742 "libparse.l" 2282 2284 { yylplineno++; if (old_state == phelp) IncrCheckSum('\n');} 2283 2285 YY_BREAK 2284 2286 case 73: 2285 2287 YY_RULE_SETUP 2286 #line 74 0"libparse.l"2288 #line 743 "libparse.l" 2287 2289 { if (old_state == phelp) IncrCheckSum(*yytext);} 2288 2290 YY_BREAK 2289 2291 case 74: 2290 2292 YY_RULE_SETUP 2291 #line 74 2"libparse.l"2293 #line 745 "libparse.l" 2292 2294 { } 2293 2295 YY_BREAK 2294 2296 case 75: 2295 2297 YY_RULE_SETUP 2296 #line 74 3"libparse.l"2298 #line 746 "libparse.l" 2297 2299 { quote++; old_state = YYSTATE; 2298 2300 BEGIN(string); /* printf("%s", yytext); */ … … 2301 2303 case 76: 2302 2304 YY_RULE_SETUP 2303 #line 74 6"libparse.l"2305 #line 749 "libparse.l" 2304 2306 { 2305 2307 brace1++; /* printf("(%d)%s", brace1, yytext); */ … … 2308 2310 case 77: 2309 2311 YY_RULE_SETUP 2310 #line 7 49"libparse.l"2312 #line 752 "libparse.l" 2311 2313 { 2312 2314 brace1--; /* printf("(%d)%s", brace1, yytext); */ … … 2321 2323 case 78: 2322 2324 YY_RULE_SETUP 2323 #line 7 58"libparse.l"2325 #line 761 "libparse.l" 2324 2326 { 2325 2327 brace2++; /* printf("%s", yytext); */ … … 2328 2330 case 79: 2329 2331 YY_RULE_SETUP 2330 #line 76 1"libparse.l"2332 #line 764 "libparse.l" 2331 2333 { 2332 2334 brace2--; /* printf("%s", yytext); */ … … 2335 2337 case 80: 2336 2338 YY_RULE_SETUP 2337 #line 76 4"libparse.l"2339 #line 767 "libparse.l" 2338 2340 { 2339 2341 brace3++; /* printf("%s", yytext); */ … … 2342 2344 case 81: 2343 2345 YY_RULE_SETUP 2344 #line 7 67"libparse.l"2346 #line 770 "libparse.l" 2345 2347 { 2346 2348 brace3--; /* printf("%s", yytext); */ … … 2349 2351 case 82: 2350 2352 YY_RULE_SETUP 2351 #line 77 0"libparse.l"2353 #line 773 "libparse.l" 2352 2354 { yylplineno++; } 2353 2355 YY_BREAK 2354 2356 case 83: 2355 2357 YY_RULE_SETUP 2356 #line 77 1"libparse.l"2358 #line 774 "libparse.l" 2357 2359 { } 2358 2360 YY_BREAK 2359 2361 case 84: 2360 2362 YY_RULE_SETUP 2361 #line 77 3"libparse.l"2363 #line 776 "libparse.l" 2362 2364 { quote--; 2363 2365 BEGIN(pexample); /* printf("%s", yytext); */ … … 2366 2368 case 85: 2367 2369 YY_RULE_SETUP 2368 #line 776 "libparse.l"2369 { }2370 YY_BREAK2371 case 86:2372 YY_RULE_SETUP2373 #line 777 "libparse.l"2374 { }2375 YY_BREAK2376 case 87:2377 YY_RULE_SETUP2378 #line 778 "libparse.l"2379 { yylplineno++; }2380 YY_BREAK2381 case 88:2382 YY_RULE_SETUP2383 2370 #line 779 "libparse.l" 2384 2371 { } 2385 2372 YY_BREAK 2373 case 86: 2374 YY_RULE_SETUP 2375 #line 780 "libparse.l" 2376 { } 2377 YY_BREAK 2378 case 87: 2379 YY_RULE_SETUP 2380 #line 781 "libparse.l" 2381 { yylplineno++; } 2382 YY_BREAK 2383 case 88: 2384 YY_RULE_SETUP 2385 #line 782 "libparse.l" 2386 { } 2387 YY_BREAK 2386 2388 case 89: 2387 2389 YY_RULE_SETUP 2388 #line 78 1"libparse.l"2390 #line 784 "libparse.l" 2389 2391 { BEGIN(old_state); } 2390 2392 YY_BREAK 2391 2393 case 90: 2392 YY_RULE_SETUP2393 #line 782 "libparse.l"2394 { yylplineno++; }2395 YY_BREAK2396 case 91:2397 YY_RULE_SETUP2398 #line 783 "libparse.l"2399 { }2400 YY_BREAK2401 case 92:2402 2394 YY_RULE_SETUP 2403 2395 #line 785 "libparse.l" 2404 2396 { yylplineno++; } 2405 2397 YY_BREAK 2406 case 9 3:2398 case 91: 2407 2399 YY_RULE_SETUP 2408 2400 #line 786 "libparse.l" 2409 2401 { } 2410 2402 YY_BREAK 2403 case 92: 2404 YY_RULE_SETUP 2405 #line 788 "libparse.l" 2406 { yylplineno++; } 2407 YY_BREAK 2408 case 93: 2409 YY_RULE_SETUP 2410 #line 789 "libparse.l" 2411 { } 2412 YY_BREAK 2411 2413 case 94: 2412 2414 YY_RULE_SETUP 2413 #line 7 87"libparse.l"2415 #line 790 "libparse.l" 2414 2416 { p_static = FALSE; 2415 2417 #if YYLPDEBUG > 1 … … 2420 2422 case 95: 2421 2423 YY_RULE_SETUP 2422 #line 79 2"libparse.l"2424 #line 795 "libparse.l" 2423 2425 { p_static = FALSE; 2424 2426 yylp_errno = YYLP_BAD_CHAR; … … 2438 2440 case 96: 2439 2441 YY_RULE_SETUP 2440 #line 8 07"libparse.l"2442 #line 810 "libparse.l" 2441 2443 ECHO; 2442 2444 YY_BREAK … … 3346 3348 } 3347 3349 #endif 3348 #line 8 07"libparse.l"3350 #line 810 "libparse.l" 3349 3351 3350 3352 … … 3386 3388 quote = 0; 3387 3389 yy_init=1; 3388 yy_delete_buffer( yy_current_buffer);3390 yy_delete_buffer(YY_CURRENT_BUFFER); 3389 3391 } 3390 3392 -
Singular/scanner.cc
r42653b r3e173a 571 571 int feReadLine(char* b, int l); 572 572 #define ALLOC(a) omAlloc((a)) 573 #ifndef NEW_FLEX 573 574 int yylineno = 0; 575 #endif /* NEW_LEX */ 574 576 int blocknest = 0; 575 577 extern char * yytext; … … 815 817 { 816 818 register yy_state_type yy_current_state; 817 register char *yy_cp = NULL, *yy_bp = NULL;819 register char *yy_cp, *yy_bp; 818 820 register int yy_act; 819 821 820 #line 12 0"scanner.l"822 #line 122 "scanner.l" 821 823 822 824 … … 911 913 case 1: 912 914 YY_RULE_SETUP 913 #line 12 1"scanner.l"915 #line 123 "scanner.l" 914 916 { } 915 917 YY_BREAK 916 918 case 2: 917 919 YY_RULE_SETUP 918 #line 12 2"scanner.l"920 #line 124 "scanner.l" 919 921 { } 920 922 YY_BREAK 921 923 case 3: 922 924 YY_RULE_SETUP 923 #line 12 3"scanner.l"925 #line 125 "scanner.l" 924 926 { 925 927 yy_noeof=noeof_comment; … … 943 945 case 4: 944 946 YY_RULE_SETUP 945 #line 14 1"scanner.l"947 #line 143 "scanner.l" 946 948 { prompt_char='.'; 947 949 blocknest = 0; yy_noeof = noeof_brace; BEGIN(brace); … … 950 952 case 5: 951 953 YY_RULE_SETUP 952 #line 14 4"scanner.l"954 #line 146 "scanner.l" 953 955 { prompt_char='.'; 954 956 blocknest = 0; yy_noeof = noeof_brace; BEGIN(brace); … … 957 959 case 6: 958 960 YY_RULE_SETUP 959 #line 1 48"scanner.l"961 #line 150 "scanner.l" 960 962 { yy_noeof = noeof_asstring; 961 963 BEGIN(asstring); … … 965 967 case 7: 966 968 YY_RULE_SETUP 967 #line 15 3"scanner.l"969 #line 155 "scanner.l" 968 970 { yy_noeof = noeof_asstring; 969 971 BEGIN(asstring); … … 973 975 case 8: 974 976 YY_RULE_SETUP 975 #line 1 58"scanner.l"977 #line 160 "scanner.l" 976 978 { 977 979 char c; char *cp; … … 985 987 case 9: 986 988 YY_RULE_SETUP 987 #line 16 6"scanner.l"989 #line 168 "scanner.l" 988 990 { 989 991 lvalp->name = omStrDup((char *)yytext); … … 994 996 case 10: 995 997 YY_RULE_SETUP 996 #line 17 1"scanner.l"998 #line 173 "scanner.l" 997 999 { 998 1000 yy_noeof = 0; BEGIN(INITIAL); … … 1002 1004 case 11: 1003 1005 YY_RULE_SETUP 1004 #line 17 6"scanner.l"1006 #line 178 "scanner.l" 1005 1007 { 1006 1008 yy_noeof = noeof_string; … … 1011 1013 case 12: 1012 1014 YY_RULE_SETUP 1013 #line 18 1"scanner.l"1015 #line 183 "scanner.l" 1014 1016 { if (blocknest++) yymore(); } 1015 1017 YY_BREAK 1016 1018 case 13: 1017 1019 YY_RULE_SETUP 1018 #line 18 2"scanner.l"1020 #line 184 "scanner.l" 1019 1021 { if (blocknest) yymore(); } 1020 1022 YY_BREAK 1021 1023 case 14: 1022 1024 YY_RULE_SETUP 1023 #line 18 3"scanner.l"1025 #line 185 "scanner.l" 1024 1026 { 1025 1027 if (blocknest) … … 1032 1034 case 15: 1033 1035 YY_RULE_SETUP 1034 #line 19 0"scanner.l"1036 #line 192 "scanner.l" 1035 1037 { 1036 1038 if (--blocknest <= 0) … … 1046 1048 case 16: 1047 1049 YY_RULE_SETUP 1048 #line 20 0"scanner.l"1050 #line 202 "scanner.l" 1049 1051 { 1050 1052 yy_noeof = noeof_brace; … … 1055 1057 case 17: 1056 1058 YY_RULE_SETUP 1057 #line 20 5"scanner.l"1059 #line 207 "scanner.l" 1058 1060 { yymore(); } 1059 1061 YY_BREAK 1060 1062 case 18: 1061 1063 YY_RULE_SETUP 1062 #line 20 6"scanner.l"1064 #line 208 "scanner.l" 1063 1065 { return '('; } 1064 1066 YY_BREAK 1065 1067 case 19: 1066 1068 YY_RULE_SETUP 1067 #line 20 7"scanner.l"1069 #line 209 "scanner.l" 1068 1070 { return ','; } 1069 1071 YY_BREAK 1070 1072 case 20: 1071 1073 YY_RULE_SETUP 1072 #line 2 08"scanner.l"1074 #line 210 "scanner.l" 1073 1075 { ; } 1074 1076 YY_BREAK 1075 1077 case 21: 1076 1078 YY_RULE_SETUP 1077 #line 2 09"scanner.l"1079 #line 211 "scanner.l" 1078 1080 { 1079 1081 lvalp->name = omStrDup((char *)yytext); … … 1083 1085 case 22: 1084 1086 YY_RULE_SETUP 1085 #line 21 3"scanner.l"1087 #line 215 "scanner.l" 1086 1088 { 1087 1089 lvalp->name = omStrDup((char *)yytext); … … 1091 1093 case 23: 1092 1094 YY_RULE_SETUP 1093 #line 21 7"scanner.l"1095 #line 219 "scanner.l" 1094 1096 { 1095 1097 yy_noeof = 0; BEGIN(INITIAL); … … 1099 1101 case 24: 1100 1102 YY_RULE_SETUP 1101 #line 22 2"scanner.l"1103 #line 224 "scanner.l" 1102 1104 { 1103 1105 yy_blocklineno = yylineno; … … 1109 1111 case 25: 1110 1112 YY_RULE_SETUP 1111 #line 2 28"scanner.l"1113 #line 230 "scanner.l" 1112 1114 { 1113 1115 yy_noeof = noeof_string; … … 1118 1120 case 26: 1119 1121 YY_RULE_SETUP 1120 #line 233 "scanner.l"1121 { yymore(); }1122 YY_BREAK1123 case 27:1124 YY_RULE_SETUP1125 #line 234 "scanner.l"1126 { yymore(); }1127 YY_BREAK1128 case 28:1129 YY_RULE_SETUP1130 1122 #line 235 "scanner.l" 1131 1123 { yymore(); } 1132 1124 YY_BREAK 1125 case 27: 1126 YY_RULE_SETUP 1127 #line 236 "scanner.l" 1128 { yymore(); } 1129 YY_BREAK 1130 case 28: 1131 YY_RULE_SETUP 1132 #line 237 "scanner.l" 1133 { yymore(); } 1134 YY_BREAK 1133 1135 case 29: 1134 1136 YY_RULE_SETUP 1135 #line 23 6"scanner.l"1137 #line 238 "scanner.l" 1136 1138 { 1137 1139 yy_noeof = noeof_block; … … 1142 1144 case 30: 1143 1145 YY_RULE_SETUP 1144 #line 24 1"scanner.l"1146 #line 243 "scanner.l" 1145 1147 { yymore(); } 1146 1148 YY_BREAK 1147 1149 case 31: 1148 1150 YY_RULE_SETUP 1149 #line 24 2"scanner.l"1151 #line 244 "scanner.l" 1150 1152 { yymore(); } 1151 1153 YY_BREAK 1152 1154 case 32: 1153 1155 YY_RULE_SETUP 1154 #line 24 3"scanner.l"1156 #line 245 "scanner.l" 1155 1157 { blocknest++; yymore(); } 1156 1158 YY_BREAK 1157 1159 case 33: 1158 1160 YY_RULE_SETUP 1159 #line 24 4"scanner.l"1161 #line 246 "scanner.l" 1160 1162 { 1161 1163 if (--blocknest <= 0) … … 1171 1173 case 34: 1172 1174 YY_RULE_SETUP 1173 #line 25 4"scanner.l"1175 #line 256 "scanner.l" 1174 1176 { BEGIN(string); yy_noeof = noeof_string;} 1175 1177 YY_BREAK 1176 1178 case 35: 1177 1179 YY_RULE_SETUP 1178 #line 25 5"scanner.l"1180 #line 257 "scanner.l" 1179 1181 { return SYS_BREAK; } 1180 1182 YY_BREAK 1181 1183 case 36: 1182 YY_RULE_SETUP1183 #line 256 "scanner.l"1184 { yymore(); }1185 YY_BREAK1186 case 37:1187 YY_RULE_SETUP1188 #line 257 "scanner.l"1189 { yymore(); }1190 YY_BREAK1191 case 38:1192 1184 YY_RULE_SETUP 1193 1185 #line 258 "scanner.l" 1194 1186 { yymore(); } 1195 1187 YY_BREAK 1188 case 37: 1189 YY_RULE_SETUP 1190 #line 259 "scanner.l" 1191 { yymore(); } 1192 YY_BREAK 1193 case 38: 1194 YY_RULE_SETUP 1195 #line 260 "scanner.l" 1196 { yymore(); } 1197 YY_BREAK 1196 1198 case 39: 1197 1199 YY_RULE_SETUP 1198 #line 2 59"scanner.l"1200 #line 261 "scanner.l" 1199 1201 { 1200 1202 char * s; … … 1213 1215 case 40: 1214 1216 YY_RULE_SETUP 1215 #line 27 3"scanner.l"1217 #line 275 "scanner.l" 1216 1218 /* skip whitespace */ 1217 1219 YY_BREAK 1218 1220 case 41: 1219 1221 YY_RULE_SETUP 1220 #line 27 4"scanner.l"1222 #line 276 "scanner.l" 1221 1223 { return DOTDOT; } 1222 1224 YY_BREAK 1223 1225 case 42: 1224 1226 YY_RULE_SETUP 1225 #line 27 5"scanner.l"1227 #line 277 "scanner.l" 1226 1228 { return COLONCOLON; } 1227 1229 YY_BREAK 1228 1230 case 43: 1229 1231 YY_RULE_SETUP 1230 #line 27 6"scanner.l"1232 #line 278 "scanner.l" 1231 1233 { return MINUSMINUS; } 1232 1234 YY_BREAK 1233 1235 case 44: 1234 1236 YY_RULE_SETUP 1235 #line 27 7"scanner.l"1237 #line 279 "scanner.l" 1236 1238 { return PLUSPLUS ; } 1237 1239 YY_BREAK 1238 1240 case 45: 1239 1241 YY_RULE_SETUP 1240 #line 2 78"scanner.l"1242 #line 280 "scanner.l" 1241 1243 { return EQUAL_EQUAL; } 1242 1244 YY_BREAK 1243 1245 case 46: 1244 1246 YY_RULE_SETUP 1245 #line 2 79"scanner.l"1247 #line 281 "scanner.l" 1246 1248 { lvalp->i='&'; return LOGIC_OP; } 1247 1249 YY_BREAK 1248 1250 case 47: 1249 1251 YY_RULE_SETUP 1250 #line 28 0"scanner.l"1252 #line 282 "scanner.l" 1251 1253 { lvalp->i='|'; return LOGIC_OP; } 1252 1254 YY_BREAK 1253 1255 case 48: 1254 1256 YY_RULE_SETUP 1255 #line 28 1"scanner.l"1257 #line 283 "scanner.l" 1256 1258 { lvalp->i=LE; return COMP_OP; } 1257 1259 YY_BREAK 1258 1260 case 49: 1259 1261 YY_RULE_SETUP 1260 #line 28 2"scanner.l"1262 #line 284 "scanner.l" 1261 1263 { lvalp->i=GE; return COMP_OP; } 1262 1264 YY_BREAK 1263 1265 case 50: 1264 1266 YY_RULE_SETUP 1265 #line 28 3"scanner.l"1267 #line 285 "scanner.l" 1266 1268 { return NOT; } 1267 1269 YY_BREAK 1268 1270 case 51: 1269 1271 YY_RULE_SETUP 1270 #line 28 4"scanner.l"1272 #line 286 "scanner.l" 1271 1273 { return NOTEQUAL; } 1272 1274 YY_BREAK 1273 1275 case 52: 1274 1276 YY_RULE_SETUP 1275 #line 28 5"scanner.l"1277 #line 287 "scanner.l" 1276 1278 { return NOTEQUAL; } 1277 1279 YY_BREAK 1278 1280 case 53: 1279 1281 YY_RULE_SETUP 1280 #line 28 6"scanner.l"1282 #line 288 "scanner.l" 1281 1283 { return '^'; } 1282 1284 YY_BREAK 1283 1285 case 54: 1284 1286 YY_RULE_SETUP 1285 #line 28 7"scanner.l"1287 #line 289 "scanner.l" 1286 1288 { return '\\'; } 1287 1289 YY_BREAK 1288 1290 case 55: 1289 1291 YY_RULE_SETUP 1290 #line 2 88"scanner.l"1292 #line 290 "scanner.l" 1291 1293 { 1292 1294 lvalp->name = omStrDup("\n"); … … 1296 1298 case 56: 1297 1299 YY_RULE_SETUP 1298 #line 29 2"scanner.l"1300 #line 294 "scanner.l" 1299 1301 { 1300 1302 lvalp->name = (char *)yytext; … … 1304 1306 case 57: 1305 1307 YY_RULE_SETUP 1306 #line 29 6"scanner.l"1308 #line 298 "scanner.l" 1307 1309 { 1308 1310 lvalp->name = (char *)yytext; … … 1312 1314 case 58: 1313 1315 YY_RULE_SETUP 1314 #line 30 0"scanner.l"1316 #line 302 "scanner.l" 1315 1317 { 1316 1318 m2_end(-1); … … 1319 1321 case 59: 1320 1322 YY_RULE_SETUP 1321 #line 30 3"scanner.l"1323 #line 305 "scanner.l" 1322 1324 { 1323 1325 #ifdef MM_STAT … … 1334 1336 case 60: 1335 1337 YY_RULE_SETUP 1336 #line 31 5"scanner.l"1338 #line 317 "scanner.l" 1337 1339 { 1338 1340 lvalp->name = (char *)yytext; … … 1342 1344 case 61: 1343 1345 YY_RULE_SETUP 1344 #line 3 19"scanner.l"1346 #line 321 "scanner.l" 1345 1347 { 1346 1348 lvalp->name = (char *)yytext; … … 1353 1355 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1354 1356 YY_RULE_SETUP 1355 #line 32 3"scanner.l"1357 #line 325 "scanner.l" 1356 1358 { 1357 1359 lvalp->name = (char *)yytext; … … 1361 1363 case 63: 1362 1364 YY_RULE_SETUP 1363 #line 3 28"scanner.l"1365 #line 330 "scanner.l" 1364 1366 { 1365 1367 /* {name} */ … … 1380 1382 case 64: 1381 1383 YY_RULE_SETUP 1382 #line 34 4"scanner.l"1384 #line 346 "scanner.l" 1383 1385 { 1384 1386 /*if (*yytext == '\n') REJECT;*/ … … 1405 1407 case 65: 1406 1408 YY_RULE_SETUP 1407 #line 36 5"scanner.l"1409 #line 367 "scanner.l" 1408 1410 YY_FATAL_ERROR( "flex scanner jammed" ); 1409 1411 YY_BREAK … … 2302 2304 } 2303 2305 #endif 2304 #line 36 5"scanner.l"2306 #line 367 "scanner.l" 2305 2307 2306 2308 2307 2309 void * myynewbuffer() 2308 2310 { 2309 void * oldb = yy_current_buffer;2311 void * oldb = YY_CURRENT_BUFFER; 2310 2312 yy_switch_to_buffer(yy_create_buffer(NULL, YY_BUF_SIZE)); 2311 2313 return oldb; … … 2314 2316 void myyoldbuffer(void * oldb) 2315 2317 { 2316 yy_delete_buffer( yy_current_buffer);2318 yy_delete_buffer(YY_CURRENT_BUFFER); 2317 2319 yy_switch_to_buffer((YY_BUFFER_STATE)oldb); 2318 2320 //yy_flush_buffer((YY_BUFFER_STATE)oldb);
Note: See TracChangeset
for help on using the changeset viewer.