Changeset 63135 in vbox for trunk/src/VBox
- Timestamp:
- Aug 7, 2016 2:21:18 PM (8 years ago)
- Location:
- trunk/src/VBox/ExtPacks/VBoxDTrace/generated
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.c
r62839 r63135 1 /* A Bison parser, made by GNU Bison 2.3. */ 1 2 /* A Bison parser, made by GNU Bison 2.4.1. */ 2 3 3 4 /* Skeleton implementation for Bison's Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 20065 6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 7 Free Software Foundation, Inc. 7 8 This program is free software ;you can redistribute it and/or modify8 9 This program is free software: you can redistribute it and/or modify 9 10 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation ; either version 2, or (at your option)11 any later version.12 11 the Free Software Foundation, either version 3 of the License, or 12 (at your option) any later version. 13 13 14 This program is distributed in the hope that it will be useful, 14 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 17 GNU General Public License for more details. 17 18 18 19 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 Boston, MA 02110-1301, USA. */ 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 22 21 23 22 /* As a special exception, you may create a larger work that contains … … 30 29 Bison output files to be licensed under the GNU General Public 31 30 License without this special exception. 32 31 33 32 This special exception was added by the Free Software Foundation in 34 33 version 2.2 of Bison. */ … … 48 47 49 48 /* Bison version. */ 50 #define YYBISON_VERSION "2. 3"49 #define YYBISON_VERSION "2.4.1" 51 50 52 51 /* Skeleton name. */ … … 56 55 #define YYPURE 0 57 56 57 /* Push parsers. */ 58 #define YYPUSH 0 59 60 /* Pull parsers. */ 61 #define YYPULL 1 62 58 63 /* Using locations. */ 59 64 #define YYLSP_NEEDED 0 60 65 66 67 68 /* Copy the first part of user declarations. */ 69 70 /* Line 189 of yacc.c */ 71 #line 1 "dt_grammar.y" 72 73 /* 74 * CDDL HEADER START 75 * 76 * The contents of this file are subject to the terms of the 77 * Common Development and Distribution License, Version 1.0 only 78 * (the "License"). You may not use this file except in compliance 79 * with the License. 80 * 81 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 82 * or http://www.opensolaris.org/os/licensing. 83 * See the License for the specific language governing permissions 84 * and limitations under the License. 85 * 86 * When distributing Covered Code, include this CDDL HEADER in each 87 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 88 * If applicable, add the following below this CDDL HEADER, with the 89 * fields enclosed by brackets "[]" replaced with your own identifying 90 * information: Portions Copyright [yyyy] [name of copyright owner] 91 * 92 * CDDL HEADER END 93 * 94 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 95 * Use is subject to license terms. 96 */ 97 98 #ifndef VBOX 99 #pragma ident "%Z%%M% %I% %E% SMI" 100 #else 101 # ifdef _MSC_VER 102 # pragma warning(disable:4255 4702) 103 # endif 104 #endif 105 106 #include <dt_impl.h> 107 108 #define OP1(op, c) dt_node_op1(op, c) 109 #define OP2(op, l, r) dt_node_op2(op, l, r) 110 #define OP3(x, y, z) dt_node_op3(x, y, z) 111 #define LINK(l, r) dt_node_link(l, r) 112 #define DUP(s) strdup(s) 113 114 #ifdef VBOX 115 # define YYMALLOC RTMemAlloc 116 # define YYFREE RTMemFree 117 #endif 118 119 120 121 122 /* Line 189 of yacc.c */ 123 #line 124 "dt_grammar.c" 124 125 /* Enabling traces. */ 126 #ifndef YYDEBUG 127 # define YYDEBUG 0 128 #endif 129 130 /* Enabling verbose error messages. */ 131 #ifdef YYERROR_VERBOSE 132 # undef YYERROR_VERBOSE 133 # define YYERROR_VERBOSE 1 134 #else 135 # define YYERROR_VERBOSE 0 136 #endif 137 138 /* Enabling the token table. */ 139 #ifndef YYTOKEN_TABLE 140 # define YYTOKEN_TABLE 0 141 #endif 61 142 62 143 … … 290 371 291 372 292 /* Copy the first part of user declarations. */293 #line 1 "dt_grammar.y"294 295 /*296 * CDDL HEADER START297 *298 * The contents of this file are subject to the terms of the299 * Common Development and Distribution License, Version 1.0 only300 * (the "License"). You may not use this file except in compliance301 * with the License.302 *303 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE304 * or http://www.opensolaris.org/os/licensing.305 * See the License for the specific language governing permissions306 * and limitations under the License.307 *308 * When distributing Covered Code, include this CDDL HEADER in each309 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.310 * If applicable, add the following below this CDDL HEADER, with the311 * fields enclosed by brackets "[]" replaced with your own identifying312 * information: Portions Copyright [yyyy] [name of copyright owner]313 *314 * CDDL HEADER END315 *316 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.317 * Use is subject to license terms.318 */319 320 #ifndef VBOX321 #pragma ident "%Z%%M% %I% %E% SMI"322 #endif323 324 #include <dt_impl.h>325 326 #define OP1(op, c) dt_node_op1(op, c)327 #define OP2(op, l, r) dt_node_op2(op, l, r)328 #define OP3(x, y, z) dt_node_op3(x, y, z)329 #define LINK(l, r) dt_node_link(l, r)330 #define DUP(s) strdup(s)331 332 #ifdef VBOX333 # define YYMALLOC RTMemAlloc334 # define YYFREE RTMemFree335 #endif336 337 338 339 340 /* Enabling traces. */341 #ifndef YYDEBUG342 # define YYDEBUG 0343 #endif344 345 /* Enabling verbose error messages. */346 #ifdef YYERROR_VERBOSE347 # undef YYERROR_VERBOSE348 # define YYERROR_VERBOSE 1349 #else350 # define YYERROR_VERBOSE 0351 #endif352 353 /* Enabling the token table. */354 #ifndef YYTOKEN_TABLE355 # define YYTOKEN_TABLE 0356 #endif357 358 373 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 359 374 typedef union YYSTYPE 360 #line 47 "dt_grammar.y"361 375 { 376 377 /* Line 214 of yacc.c */ 378 #line 51 "dt_grammar.y" 379 362 380 dt_node_t *l_node; 363 381 dt_decl_t *l_decl; … … 365 383 uintmax_t l_int; 366 384 int l_tok; 367 } 368 /* Line 193 of yacc.c. */ 369 #line 370 "dt_grammar.c" 370 YYSTYPE; 385 386 387 388 /* Line 214 of yacc.c */ 389 #line 390 "dt_grammar.c" 390 } YYSTYPE; 391 # define YYSTYPE_IS_TRIVIAL 1 371 392 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 372 393 # define YYSTYPE_IS_DECLARED 1 373 # define YYSTYPE_IS_TRIVIAL 1 374 #endif 375 394 #endif 376 395 377 396 … … 379 398 380 399 381 /* Line 2 16 of yacc.c.*/382 #line 383"dt_grammar.c"400 /* Line 264 of yacc.c */ 401 #line 402 "dt_grammar.c" 383 402 384 403 #ifdef short … … 430 449 431 450 #ifndef YY_ 432 # if defined YYENABLE_NLS &&YYENABLE_NLS451 # if YYENABLE_NLS 433 452 # if ENABLE_NLS 434 453 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ … … 455 474 || defined __cplusplus || defined _MSC_VER) 456 475 static int 457 YYID (int i)476 YYID (int yyi) 458 477 #else 459 478 static int 460 YYID ( i)461 int i;479 YYID (yyi) 480 int yyi; 462 481 #endif 463 482 { 464 return i;483 return yyi; 465 484 } 466 485 #endif … … 543 562 union yyalloc 544 563 { 545 yytype_int16 yyss ;546 YYSTYPE yyvs ;547 564 yytype_int16 yyss_alloc; 565 YYSTYPE yyvs_alloc; 566 }; 548 567 549 568 /* The size of the maximum gap between one aligned stack and the next. */ … … 579 598 stack. Advance YYPTR to a properly aligned location for the next 580 599 stack. */ 581 # define YYSTACK_RELOCATE(Stack )\600 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 582 601 do \ 583 602 { \ 584 603 YYSIZE_T yynewbytes; \ 585 YYCOPY (&yyptr->Stack , Stack, yysize);\586 Stack = &yyptr->Stack ;\604 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 605 Stack = &yyptr->Stack_alloc; \ 587 606 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 588 607 yyptr += yynewbytes / sizeof (*yyptr); \ … … 765 784 static const yytype_uint16 yyrline[] = 766 785 { 767 0, 2 17, 217, 218, 219, 222, 223, 226, 227, 230,768 23 1, 235, 236, 240, 241, 242, 243, 244, 249, 248,769 26 4, 268, 275, 276, 280, 286, 289, 295, 296, 300,770 30 3, 310, 326, 329, 333, 340, 344, 345, 351, 352,771 35 5, 356, 359, 360, 364, 365, 371, 372, 373, 374,772 37 5, 376, 377, 381, 382, 386, 389, 393, 396, 399,773 40 2, 405, 408, 411, 415, 419, 426, 427, 428, 429,774 43 0, 431, 434, 439, 440, 441, 442, 443, 444, 448,775 4 49, 455, 456, 459, 462, 468, 469, 472, 478, 479,776 48 2, 488, 489, 492, 495, 498, 504, 505, 508, 514,777 51 5, 521, 522, 528, 529, 535, 536, 542, 543, 549,778 55 0, 555, 559, 560, 565, 566, 572, 573, 574, 575,779 5 76, 577, 578, 579, 580, 581, 582, 585, 586, 591,780 596, 604, 605, 606, 607, 608, 609, 613, 614, 615,781 6 16, 617, 618, 622, 623, 624, 625, 626, 630, 631,782 63 2, 635, 636, 637, 638, 639, 640, 641, 642, 643,783 64 4, 647, 648, 649, 652, 653, 654, 658, 661, 662,784 6 66, 667, 668, 672, 673, 677, 678, 682, 683, 689,785 696, 702, 703, 704, 705, 709, 710, 714, 715, 716,786 72 2, 723, 724, 728, 729, 730, 734, 735, 738, 739,787 74 4, 745, 749, 750, 751, 752, 755, 758, 759, 760,788 76 1, 765, 766, 770, 771, 772, 777, 778, 784, 787,789 79 0, 795, 798, 804, 805, 806, 810, 811, 812, 813,790 81 4, 817, 817, 825, 826, 827, 830, 830, 838, 839786 0, 221, 221, 222, 223, 226, 227, 230, 231, 234, 787 235, 239, 240, 244, 245, 246, 247, 248, 253, 252, 788 268, 272, 279, 280, 284, 290, 293, 299, 300, 304, 789 307, 314, 330, 333, 337, 344, 348, 349, 355, 356, 790 359, 360, 363, 364, 368, 369, 375, 376, 377, 378, 791 379, 380, 381, 385, 386, 390, 393, 397, 400, 403, 792 406, 409, 412, 415, 419, 423, 430, 431, 432, 433, 793 434, 435, 438, 443, 444, 445, 446, 447, 448, 452, 794 453, 459, 460, 463, 466, 472, 473, 476, 482, 483, 795 486, 492, 493, 496, 499, 502, 508, 509, 512, 518, 796 519, 525, 526, 532, 533, 539, 540, 546, 547, 553, 797 554, 559, 563, 564, 569, 570, 576, 577, 578, 579, 798 580, 581, 582, 583, 584, 585, 586, 589, 590, 595, 799 600, 608, 609, 610, 611, 612, 613, 617, 618, 619, 800 620, 621, 622, 626, 627, 628, 629, 630, 634, 635, 801 636, 639, 640, 641, 642, 643, 644, 645, 646, 647, 802 648, 651, 652, 653, 656, 657, 658, 662, 665, 666, 803 670, 671, 672, 676, 677, 681, 682, 686, 687, 693, 804 700, 706, 707, 708, 709, 713, 714, 718, 719, 720, 805 726, 727, 728, 732, 733, 734, 738, 739, 742, 743, 806 748, 749, 753, 754, 755, 756, 759, 762, 763, 764, 807 765, 769, 770, 774, 775, 776, 781, 782, 788, 791, 808 794, 799, 802, 808, 809, 810, 814, 815, 816, 817, 809 818, 821, 821, 829, 830, 831, 834, 834, 842, 843 791 810 }; 792 811 #endif … … 825 844 "DT_CTX_DTYPE", "';'", "'{'", "'}'", "$accept", "dtrace_program", 826 845 "d_expression", "d_program", "d_type", "translation_unit", 827 "external_declaration", "inline_definition", " @1",846 "external_declaration", "inline_definition", "$@1", 828 847 "translator_definition", "translator_member_list", "translator_member", 829 848 "provider_definition", "provider_probe_list", "provider_probe", … … 849 868 "parameter_type_list", "parameter_list", "parameter_declaration", 850 869 "type_name", "abstract_declarator", "direct_abstract_declarator", 851 "array", " @2", "array_parameters", "function", "@3",870 "array", "$@2", "array_parameters", "function", "$@3", 852 871 "function_parameters", 0 853 872 }; … … 1343 1362 1344 1363 #ifndef YY_LOCATION_PRINT 1345 # if defined YYLTYPE_IS_TRIVIAL &&YYLTYPE_IS_TRIVIAL1364 # if YYLTYPE_IS_TRIVIAL 1346 1365 # define YY_LOCATION_PRINT(File, Loc) \ 1347 1366 fprintf (File, "%d.%d-%d.%d", \ … … 1454 1473 || defined __cplusplus || defined _MSC_VER) 1455 1474 static void 1456 yy_stack_print (yytype_int16 * bottom, yytype_int16 *top)1475 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 1457 1476 #else 1458 1477 static void 1459 yy_stack_print ( bottom,top)1460 yytype_int16 * bottom;1461 yytype_int16 * top;1478 yy_stack_print (yybottom, yytop) 1479 yytype_int16 *yybottom; 1480 yytype_int16 *yytop; 1462 1481 #endif 1463 1482 { 1464 1483 YYFPRINTF (stderr, "Stack now"); 1465 for (; bottom <= top; ++bottom) 1466 YYFPRINTF (stderr, " %d", *bottom); 1484 for (; yybottom <= yytop; yybottom++) 1485 { 1486 int yybot = *yybottom; 1487 YYFPRINTF (stderr, " %d", yybot); 1488 } 1467 1489 YYFPRINTF (stderr, "\n"); 1468 1490 } … … 1498 1520 for (yyi = 0; yyi < yynrhs; yyi++) 1499 1521 { 1500 fprintf(stderr, " $%d = ", yyi + 1);1522 YYFPRINTF (stderr, " $%d = ", yyi + 1); 1501 1523 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 1502 1524 &(yyvsp[(yyi + 1) - (yynrhs)]) 1503 1525 ); 1504 fprintf(stderr, "\n");1526 YYFPRINTF (stderr, "\n"); 1505 1527 } 1506 1528 } … … 1785 1807 } 1786 1808 1787 1788 1789 1809 /* Prevent warnings from -Wmissing-prototypes. */ 1790 1791 1810 #ifdef YYPARSE_PARAM 1792 1811 #if defined __STDC__ || defined __cplusplus … … 1804 1823 1805 1824 1806 1807 /* The look-ahead symbol. */ 1825 /* The lookahead symbol. */ 1808 1826 int yychar; 1809 1827 1810 /* The semantic value of the look -ahead symbol. */1828 /* The semantic value of the lookahead symbol. */ 1811 1829 YYSTYPE yylval; 1812 1830 … … 1816 1834 1817 1835 1818 /*---------- .1819 | yyparse . |1820 `---------- */1836 /*-------------------------. 1837 | yyparse or yypush_parse. | 1838 `-------------------------*/ 1821 1839 1822 1840 #ifdef YYPARSE_PARAM … … 1842 1860 #endif 1843 1861 { 1844 1845 int yystate; 1862 1863 1864 int yystate; 1865 /* Number of tokens to shift before error messages enabled. */ 1866 int yyerrstatus; 1867 1868 /* The stacks and their tools: 1869 `yyss': related to states. 1870 `yyvs': related to semantic values. 1871 1872 Refer to the stacks thru separate pointers, to allow yyoverflow 1873 to reallocate them elsewhere. */ 1874 1875 /* The state stack. */ 1876 yytype_int16 yyssa[YYINITDEPTH]; 1877 yytype_int16 *yyss; 1878 yytype_int16 *yyssp; 1879 1880 /* The semantic value stack. */ 1881 YYSTYPE yyvsa[YYINITDEPTH]; 1882 YYSTYPE *yyvs; 1883 YYSTYPE *yyvsp; 1884 1885 YYSIZE_T yystacksize; 1886 1846 1887 int yyn; 1847 1888 int yyresult; 1848 /* Number of tokens to shift before error messages enabled. */ 1849 int yyerrstatus; 1850 /* Look-ahead token as an internal (translated) token number. */ 1851 int yytoken = 0; 1889 /* Lookahead token as an internal (translated) token number. */ 1890 int yytoken; 1891 /* The variables used to return semantic value and location from the 1892 action routines. */ 1893 YYSTYPE yyval; 1894 1852 1895 #if YYERROR_VERBOSE 1853 1896 /* Buffer for error messages, and its allocated size. */ … … 1857 1900 #endif 1858 1901 1859 /* Three stacks and their tools:1860 `yyss': related to states,1861 `yyvs': related to semantic values,1862 `yyls': related to locations.1863 1864 Refer to the stacks thru separate pointers, to allow yyoverflow1865 to reallocate them elsewhere. */1866 1867 /* The state stack. */1868 yytype_int16 yyssa[YYINITDEPTH];1869 yytype_int16 *yyss = yyssa;1870 yytype_int16 *yyssp;1871 1872 /* The semantic value stack. */1873 YYSTYPE yyvsa[YYINITDEPTH];1874 YYSTYPE *yyvs = yyvsa;1875 YYSTYPE *yyvsp;1876 1877 1878 1879 1902 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1880 1881 YYSIZE_T yystacksize = YYINITDEPTH;1882 1883 /* The variables used to return semantic value and location from the1884 action routines. */1885 YYSTYPE yyval;1886 1887 1903 1888 1904 /* The number of symbols on the RHS of the reduced rule. … … 1890 1906 int yylen = 0; 1891 1907 1908 yytoken = 0; 1909 yyss = yyssa; 1910 yyvs = yyvsa; 1911 yystacksize = YYINITDEPTH; 1912 1892 1913 YYDPRINTF ((stderr, "Starting parse\n")); 1893 1914 … … 1895 1916 yyerrstatus = 0; 1896 1917 yynerrs = 0; 1897 yychar = YYEMPTY; 1918 yychar = YYEMPTY; /* Cause a token to be read. */ 1898 1919 1899 1920 /* Initialize stack pointers. … … 1901 1922 so that they stay on the same level as the state stack. 1902 1923 The wasted elements are never initialized. */ 1903 1904 1924 yyssp = yyss; 1905 1925 yyvsp = yyvs; … … 1931 1951 yytype_int16 *yyss1 = yyss; 1932 1952 1933 1934 1953 /* Each stack pointer address is followed by the size of the 1935 1954 data in use in that stack, in bytes. This used to be a … … 1939 1958 &yyss1, yysize * sizeof (*yyssp), 1940 1959 &yyvs1, yysize * sizeof (*yyvsp), 1941 1942 1960 &yystacksize); 1943 1961 … … 1962 1980 if (! yyptr) 1963 1981 goto yyexhaustedlab; 1964 YYSTACK_RELOCATE (yyss); 1965 YYSTACK_RELOCATE (yyvs); 1966 1982 YYSTACK_RELOCATE (yyss_alloc, yyss); 1983 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1967 1984 # undef YYSTACK_RELOCATE 1968 1985 if (yyss1 != yyssa) … … 1975 1992 yyvsp = yyvs + yysize - 1; 1976 1993 1977 1978 1994 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1979 1995 (unsigned long int) yystacksize)); … … 1984 2000 1985 2001 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 2002 2003 if (yystate == YYFINAL) 2004 YYACCEPT; 1986 2005 1987 2006 goto yybackup; … … 1993 2012 1994 2013 /* Do appropriate processing given the current state. Read a 1995 look -ahead token if we need one and don't already have one. */1996 1997 /* First try to decide what to do without reference to look -ahead token. */2014 lookahead token if we need one and don't already have one. */ 2015 2016 /* First try to decide what to do without reference to lookahead token. */ 1998 2017 yyn = yypact[yystate]; 1999 2018 if (yyn == YYPACT_NINF) 2000 2019 goto yydefault; 2001 2020 2002 /* Not known => get a look -ahead token if don't already have one. */2003 2004 /* YYCHAR is either YYEMPTY or YYEOF or a valid look -ahead symbol. */2021 /* Not known => get a lookahead token if don't already have one. */ 2022 2023 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 2005 2024 if (yychar == YYEMPTY) 2006 2025 { … … 2034 2053 } 2035 2054 2036 if (yyn == YYFINAL)2037 YYACCEPT;2038 2039 2055 /* Count tokens shifted since error; after three, turn off error 2040 2056 status. */ … … 2042 2058 yyerrstatus--; 2043 2059 2044 /* Shift the look -ahead token. */2060 /* Shift the lookahead token. */ 2045 2061 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 2046 2062 2047 /* Discard the shifted token unless it is eof. */ 2048 if (yychar != YYEOF) 2049 yychar = YYEMPTY; 2063 /* Discard the shifted token. */ 2064 yychar = YYEMPTY; 2050 2065 2051 2066 yystate = yyn; … … 2087 2102 { 2088 2103 case 2: 2089 #line 217 "dt_grammar.y" 2104 2105 /* Line 1455 of yacc.c */ 2106 #line 221 "dt_grammar.y" 2090 2107 { return (dt_node_root((yyvsp[(1) - (2)].l_node))); } 2091 2108 break; 2092 2109 2093 2110 case 3: 2094 #line 218 "dt_grammar.y" 2111 2112 /* Line 1455 of yacc.c */ 2113 #line 222 "dt_grammar.y" 2095 2114 { return (dt_node_root((yyvsp[(1) - (2)].l_node))); } 2096 2115 break; 2097 2116 2098 2117 case 4: 2099 #line 219 "dt_grammar.y" 2118 2119 /* Line 1455 of yacc.c */ 2120 #line 223 "dt_grammar.y" 2100 2121 { return (dt_node_root((yyvsp[(1) - (2)].l_node))); } 2101 2122 break; 2102 2123 2103 2124 case 5: 2104 #line 222 "dt_grammar.y" 2125 2126 /* Line 1455 of yacc.c */ 2127 #line 226 "dt_grammar.y" 2105 2128 { (yyval.l_node) = NULL; } 2106 2129 break; 2107 2130 2108 2131 case 6: 2109 #line 223 "dt_grammar.y" 2132 2133 /* Line 1455 of yacc.c */ 2134 #line 227 "dt_grammar.y" 2110 2135 { (yyval.l_node) = (yyvsp[(2) - (2)].l_node); } 2111 2136 break; 2112 2137 2113 2138 case 7: 2114 #line 226 "dt_grammar.y" 2139 2140 /* Line 1455 of yacc.c */ 2141 #line 230 "dt_grammar.y" 2115 2142 { (yyval.l_node) = dt_node_program(NULL); } 2116 2143 break; 2117 2144 2118 2145 case 8: 2119 #line 227 "dt_grammar.y" 2146 2147 /* Line 1455 of yacc.c */ 2148 #line 231 "dt_grammar.y" 2120 2149 { (yyval.l_node) = dt_node_program((yyvsp[(2) - (2)].l_node)); } 2121 2150 break; 2122 2151 2123 2152 case 9: 2124 #line 230 "dt_grammar.y" 2153 2154 /* Line 1455 of yacc.c */ 2155 #line 234 "dt_grammar.y" 2125 2156 { (yyval.l_node) = NULL; } 2126 2157 break; 2127 2158 2128 2159 case 10: 2129 #line 231 "dt_grammar.y" 2160 2161 /* Line 1455 of yacc.c */ 2162 #line 235 "dt_grammar.y" 2130 2163 { (yyval.l_node) = (dt_node_t *)(yyvsp[(2) - (2)].l_decl); } 2131 2164 break; 2132 2165 2133 2166 case 12: 2134 #line 236 "dt_grammar.y" 2167 2168 /* Line 1455 of yacc.c */ 2169 #line 240 "dt_grammar.y" 2135 2170 { (yyval.l_node) = LINK((yyvsp[(1) - (2)].l_node), (yyvsp[(2) - (2)].l_node)); } 2136 2171 break; 2137 2172 2138 2173 case 18: 2139 #line 249 "dt_grammar.y" 2174 2175 /* Line 1455 of yacc.c */ 2176 #line 253 "dt_grammar.y" 2140 2177 { dt_scope_push(NULL, CTF_ERR); } 2141 2178 break; 2142 2179 2143 2180 case 19: 2144 #line 250 "dt_grammar.y" 2181 2182 /* Line 1455 of yacc.c */ 2183 #line 254 "dt_grammar.y" 2145 2184 { 2146 2185 /* … … 2157 2196 2158 2197 case 20: 2159 #line 265 "dt_grammar.y" 2198 2199 /* Line 1455 of yacc.c */ 2200 #line 269 "dt_grammar.y" 2160 2201 { 2161 2202 (yyval.l_node) = dt_node_xlator((yyvsp[(2) - (10)].l_decl), (yyvsp[(4) - (10)].l_decl), (yyvsp[(5) - (10)].l_str), (yyvsp[(8) - (10)].l_node)); … … 2164 2205 2165 2206 case 21: 2166 #line 269 "dt_grammar.y" 2207 2208 /* Line 1455 of yacc.c */ 2209 #line 273 "dt_grammar.y" 2167 2210 { 2168 2211 (yyval.l_node) = dt_node_xlator((yyvsp[(2) - (9)].l_decl), (yyvsp[(4) - (9)].l_decl), (yyvsp[(5) - (9)].l_str), NULL); … … 2171 2214 2172 2215 case 23: 2173 #line 276 "dt_grammar.y" 2216 2217 /* Line 1455 of yacc.c */ 2218 #line 280 "dt_grammar.y" 2174 2219 { (yyval.l_node) = LINK((yyvsp[(1) - (2)].l_node),(yyvsp[(2) - (2)].l_node)); } 2175 2220 break; 2176 2221 2177 2222 case 24: 2178 #line 280 "dt_grammar.y" 2223 2224 /* Line 1455 of yacc.c */ 2225 #line 284 "dt_grammar.y" 2179 2226 { 2180 2227 (yyval.l_node) = dt_node_member(NULL, (yyvsp[(1) - (4)].l_str), (yyvsp[(3) - (4)].l_node)); … … 2183 2230 2184 2231 case 25: 2185 #line 286 "dt_grammar.y" 2232 2233 /* Line 1455 of yacc.c */ 2234 #line 290 "dt_grammar.y" 2186 2235 { 2187 2236 (yyval.l_node) = dt_node_provider((yyvsp[(2) - (6)].l_str), (yyvsp[(4) - (6)].l_node)); … … 2190 2239 2191 2240 case 26: 2192 #line 289 "dt_grammar.y" 2241 2242 /* Line 1455 of yacc.c */ 2243 #line 293 "dt_grammar.y" 2193 2244 { 2194 2245 (yyval.l_node) = dt_node_provider((yyvsp[(2) - (5)].l_str), NULL); … … 2197 2248 2198 2249 case 28: 2199 #line 296 "dt_grammar.y" 2250 2251 /* Line 1455 of yacc.c */ 2252 #line 300 "dt_grammar.y" 2200 2253 { (yyval.l_node) = LINK((yyvsp[(1) - (2)].l_node), (yyvsp[(2) - (2)].l_node)); } 2201 2254 break; 2202 2255 2203 2256 case 29: 2204 #line 300 "dt_grammar.y" 2257 2258 /* Line 1455 of yacc.c */ 2259 #line 304 "dt_grammar.y" 2205 2260 { 2206 2261 (yyval.l_node) = dt_node_probe((yyvsp[(2) - (6)].l_str), 2, (yyvsp[(3) - (6)].l_node), (yyvsp[(5) - (6)].l_node)); … … 2209 2264 2210 2265 case 30: 2211 #line 303 "dt_grammar.y" 2266 2267 /* Line 1455 of yacc.c */ 2268 #line 307 "dt_grammar.y" 2212 2269 { 2213 2270 (yyval.l_node) = dt_node_probe((yyvsp[(2) - (4)].l_str), 1, (yyvsp[(3) - (4)].l_node), NULL); … … 2216 2273 2217 2274 case 31: 2218 #line 310 "dt_grammar.y" 2275 2276 /* Line 1455 of yacc.c */ 2277 #line 314 "dt_grammar.y" 2219 2278 { 2220 2279 /* … … 2236 2295 2237 2296 case 32: 2238 #line 326 "dt_grammar.y" 2297 2298 /* Line 1455 of yacc.c */ 2299 #line 330 "dt_grammar.y" 2239 2300 { 2240 2301 (yyval.l_node) = dt_node_clause((yyvsp[(1) - (4)].l_node), NULL, (yyvsp[(3) - (4)].l_node)); … … 2243 2304 2244 2305 case 33: 2245 #line 329 "dt_grammar.y" 2306 2307 /* Line 1455 of yacc.c */ 2308 #line 333 "dt_grammar.y" 2246 2309 { 2247 2310 dnerror((yyvsp[(3) - (4)].l_node), D_SYNTAX, "expected actions { } following " … … 2251 2314 2252 2315 case 34: 2253 #line 334 "dt_grammar.y" 2316 2317 /* Line 1455 of yacc.c */ 2318 #line 338 "dt_grammar.y" 2254 2319 { 2255 2320 (yyval.l_node) = dt_node_clause((yyvsp[(1) - (7)].l_node), (yyvsp[(3) - (7)].l_node), (yyvsp[(6) - (7)].l_node)); … … 2258 2323 2259 2324 case 35: 2260 #line 340 "dt_grammar.y" 2325 2326 /* Line 1455 of yacc.c */ 2327 #line 344 "dt_grammar.y" 2261 2328 { yybegin(YYS_EXPR); (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } 2262 2329 break; 2263 2330 2264 2331 case 37: 2265 #line 345 "dt_grammar.y" 2332 2333 /* Line 1455 of yacc.c */ 2334 #line 349 "dt_grammar.y" 2266 2335 { 2267 2336 (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2270 2339 2271 2340 case 38: 2272 #line 351 "dt_grammar.y" 2341 2342 /* Line 1455 of yacc.c */ 2343 #line 355 "dt_grammar.y" 2273 2344 { (yyval.l_node) = dt_node_pdesc_by_name((yyvsp[(1) - (1)].l_str)); } 2274 2345 break; 2275 2346 2276 2347 case 39: 2277 #line 352 "dt_grammar.y" 2348 2349 /* Line 1455 of yacc.c */ 2350 #line 356 "dt_grammar.y" 2278 2351 { (yyval.l_node) = dt_node_pdesc_by_id((yyvsp[(1) - (1)].l_int)); } 2279 2352 break; 2280 2353 2281 2354 case 40: 2282 #line 355 "dt_grammar.y" 2355 2356 /* Line 1455 of yacc.c */ 2357 #line 359 "dt_grammar.y" 2283 2358 { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } 2284 2359 break; 2285 2360 2286 2361 case 41: 2287 #line 356 "dt_grammar.y" 2362 2363 /* Line 1455 of yacc.c */ 2364 #line 360 "dt_grammar.y" 2288 2365 { (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); } 2289 2366 break; 2290 2367 2291 2368 case 42: 2292 #line 359 "dt_grammar.y" 2369 2370 /* Line 1455 of yacc.c */ 2371 #line 363 "dt_grammar.y" 2293 2372 { (yyval.l_node) = NULL; } 2294 2373 break; 2295 2374 2296 2375 case 43: 2297 #line 360 "dt_grammar.y" 2376 2377 /* Line 1455 of yacc.c */ 2378 #line 364 "dt_grammar.y" 2298 2379 { (yyval.l_node) = dt_node_statement((yyvsp[(1) - (1)].l_node)); } 2299 2380 break; 2300 2381 2301 2382 case 45: 2302 #line 365 "dt_grammar.y" 2383 2384 /* Line 1455 of yacc.c */ 2385 #line 369 "dt_grammar.y" 2303 2386 { 2304 2387 (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2307 2390 2308 2391 case 46: 2309 #line 371 "dt_grammar.y" 2392 2393 /* Line 1455 of yacc.c */ 2394 #line 375 "dt_grammar.y" 2310 2395 { (yyval.l_node) = dt_node_ident((yyvsp[(1) - (1)].l_str)); } 2311 2396 break; 2312 2397 2313 2398 case 47: 2314 #line 372 "dt_grammar.y" 2399 2400 /* Line 1455 of yacc.c */ 2401 #line 376 "dt_grammar.y" 2315 2402 { (yyval.l_node) = dt_node_ident((yyvsp[(1) - (1)].l_str)); } 2316 2403 break; 2317 2404 2318 2405 case 48: 2319 #line 373 "dt_grammar.y" 2406 2407 /* Line 1455 of yacc.c */ 2408 #line 377 "dt_grammar.y" 2320 2409 { (yyval.l_node) = dt_node_int((yyvsp[(1) - (1)].l_int)); } 2321 2410 break; 2322 2411 2323 2412 case 49: 2324 #line 374 "dt_grammar.y" 2413 2414 /* Line 1455 of yacc.c */ 2415 #line 378 "dt_grammar.y" 2325 2416 { (yyval.l_node) = dt_node_string((yyvsp[(1) - (1)].l_str)); } 2326 2417 break; 2327 2418 2328 2419 case 50: 2329 #line 375 "dt_grammar.y" 2420 2421 /* Line 1455 of yacc.c */ 2422 #line 379 "dt_grammar.y" 2330 2423 { (yyval.l_node) = dt_node_ident(DUP("self")); } 2331 2424 break; 2332 2425 2333 2426 case 51: 2334 #line 376 "dt_grammar.y" 2427 2428 /* Line 1455 of yacc.c */ 2429 #line 380 "dt_grammar.y" 2335 2430 { (yyval.l_node) = dt_node_ident(DUP("this")); } 2336 2431 break; 2337 2432 2338 2433 case 52: 2339 #line 377 "dt_grammar.y" 2434 2435 /* Line 1455 of yacc.c */ 2436 #line 381 "dt_grammar.y" 2340 2437 { (yyval.l_node) = (yyvsp[(2) - (3)].l_node); } 2341 2438 break; 2342 2439 2343 2440 case 54: 2344 #line 383 "dt_grammar.y" 2441 2442 /* Line 1455 of yacc.c */ 2443 #line 387 "dt_grammar.y" 2345 2444 { 2346 2445 (yyval.l_node) = OP2(DT_TOK_LBRAC, (yyvsp[(1) - (4)].l_node), (yyvsp[(3) - (4)].l_node)); … … 2349 2448 2350 2449 case 55: 2351 #line 386 "dt_grammar.y" 2450 2451 /* Line 1455 of yacc.c */ 2452 #line 390 "dt_grammar.y" 2352 2453 { 2353 2454 (yyval.l_node) = dt_node_func((yyvsp[(1) - (3)].l_node), NULL); … … 2356 2457 2357 2458 case 56: 2358 #line 390 "dt_grammar.y" 2459 2460 /* Line 1455 of yacc.c */ 2461 #line 394 "dt_grammar.y" 2359 2462 { 2360 2463 (yyval.l_node) = dt_node_func((yyvsp[(1) - (4)].l_node), (yyvsp[(3) - (4)].l_node)); … … 2363 2466 2364 2467 case 57: 2365 #line 393 "dt_grammar.y" 2468 2469 /* Line 1455 of yacc.c */ 2470 #line 397 "dt_grammar.y" 2366 2471 { 2367 2472 (yyval.l_node) = OP2(DT_TOK_DOT, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str))); … … 2370 2475 2371 2476 case 58: 2372 #line 396 "dt_grammar.y" 2477 2478 /* Line 1455 of yacc.c */ 2479 #line 400 "dt_grammar.y" 2373 2480 { 2374 2481 (yyval.l_node) = OP2(DT_TOK_DOT, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str))); … … 2377 2484 2378 2485 case 59: 2379 #line 399 "dt_grammar.y" 2486 2487 /* Line 1455 of yacc.c */ 2488 #line 403 "dt_grammar.y" 2380 2489 { 2381 2490 (yyval.l_node) = OP2(DT_TOK_PTR, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str))); … … 2384 2493 2385 2494 case 60: 2386 #line 402 "dt_grammar.y" 2495 2496 /* Line 1455 of yacc.c */ 2497 #line 406 "dt_grammar.y" 2387 2498 { 2388 2499 (yyval.l_node) = OP2(DT_TOK_PTR, (yyvsp[(1) - (3)].l_node), dt_node_ident((yyvsp[(3) - (3)].l_str))); … … 2391 2502 2392 2503 case 61: 2393 #line 405 "dt_grammar.y" 2504 2505 /* Line 1455 of yacc.c */ 2506 #line 409 "dt_grammar.y" 2394 2507 { 2395 2508 (yyval.l_node) = OP1(DT_TOK_POSTINC, (yyvsp[(1) - (2)].l_node)); … … 2398 2511 2399 2512 case 62: 2400 #line 408 "dt_grammar.y" 2513 2514 /* Line 1455 of yacc.c */ 2515 #line 412 "dt_grammar.y" 2401 2516 { 2402 2517 (yyval.l_node) = OP1(DT_TOK_POSTDEC, (yyvsp[(1) - (2)].l_node)); … … 2405 2520 2406 2521 case 63: 2407 #line 412 "dt_grammar.y" 2522 2523 /* Line 1455 of yacc.c */ 2524 #line 416 "dt_grammar.y" 2408 2525 { 2409 2526 (yyval.l_node) = dt_node_offsetof((yyvsp[(3) - (6)].l_decl), (yyvsp[(5) - (6)].l_str)); … … 2412 2529 2413 2530 case 64: 2414 #line 416 "dt_grammar.y" 2531 2532 /* Line 1455 of yacc.c */ 2533 #line 420 "dt_grammar.y" 2415 2534 { 2416 2535 (yyval.l_node) = dt_node_offsetof((yyvsp[(3) - (6)].l_decl), (yyvsp[(5) - (6)].l_str)); … … 2419 2538 2420 2539 case 65: 2421 #line 420 "dt_grammar.y" 2540 2541 /* Line 1455 of yacc.c */ 2542 #line 424 "dt_grammar.y" 2422 2543 { 2423 2544 (yyval.l_node) = OP2(DT_TOK_XLATE, dt_node_type((yyvsp[(3) - (7)].l_decl)), (yyvsp[(6) - (7)].l_node)); … … 2426 2547 2427 2548 case 67: 2428 #line 427 "dt_grammar.y" 2549 2550 /* Line 1455 of yacc.c */ 2551 #line 431 "dt_grammar.y" 2429 2552 { (yyval.l_node) = OP1(DT_TOK_PREINC, (yyvsp[(2) - (2)].l_node)); } 2430 2553 break; 2431 2554 2432 2555 case 68: 2433 #line 428 "dt_grammar.y" 2556 2557 /* Line 1455 of yacc.c */ 2558 #line 432 "dt_grammar.y" 2434 2559 { (yyval.l_node) = OP1(DT_TOK_PREDEC, (yyvsp[(2) - (2)].l_node)); } 2435 2560 break; 2436 2561 2437 2562 case 69: 2438 #line 429 "dt_grammar.y" 2563 2564 /* Line 1455 of yacc.c */ 2565 #line 433 "dt_grammar.y" 2439 2566 { (yyval.l_node) = OP1((yyvsp[(1) - (2)].l_tok), (yyvsp[(2) - (2)].l_node)); } 2440 2567 break; 2441 2568 2442 2569 case 70: 2443 #line 430 "dt_grammar.y" 2570 2571 /* Line 1455 of yacc.c */ 2572 #line 434 "dt_grammar.y" 2444 2573 { (yyval.l_node) = OP1(DT_TOK_SIZEOF, (yyvsp[(2) - (2)].l_node)); } 2445 2574 break; 2446 2575 2447 2576 case 71: 2448 #line 431 "dt_grammar.y" 2577 2578 /* Line 1455 of yacc.c */ 2579 #line 435 "dt_grammar.y" 2449 2580 { 2450 2581 (yyval.l_node) = OP1(DT_TOK_SIZEOF, dt_node_type((yyvsp[(3) - (4)].l_decl))); … … 2453 2584 2454 2585 case 72: 2455 #line 434 "dt_grammar.y" 2586 2587 /* Line 1455 of yacc.c */ 2588 #line 438 "dt_grammar.y" 2456 2589 { 2457 2590 (yyval.l_node) = OP1(DT_TOK_STRINGOF, (yyvsp[(2) - (2)].l_node)); … … 2460 2593 2461 2594 case 73: 2462 #line 439 "dt_grammar.y" 2595 2596 /* Line 1455 of yacc.c */ 2597 #line 443 "dt_grammar.y" 2463 2598 { (yyval.l_tok) = DT_TOK_ADDROF; } 2464 2599 break; 2465 2600 2466 2601 case 74: 2467 #line 440 "dt_grammar.y" 2602 2603 /* Line 1455 of yacc.c */ 2604 #line 444 "dt_grammar.y" 2468 2605 { (yyval.l_tok) = DT_TOK_DEREF; } 2469 2606 break; 2470 2607 2471 2608 case 75: 2472 #line 441 "dt_grammar.y" 2609 2610 /* Line 1455 of yacc.c */ 2611 #line 445 "dt_grammar.y" 2473 2612 { (yyval.l_tok) = DT_TOK_IPOS; } 2474 2613 break; 2475 2614 2476 2615 case 76: 2477 #line 442 "dt_grammar.y" 2616 2617 /* Line 1455 of yacc.c */ 2618 #line 446 "dt_grammar.y" 2478 2619 { (yyval.l_tok) = DT_TOK_INEG; } 2479 2620 break; 2480 2621 2481 2622 case 77: 2482 #line 443 "dt_grammar.y" 2623 2624 /* Line 1455 of yacc.c */ 2625 #line 447 "dt_grammar.y" 2483 2626 { (yyval.l_tok) = DT_TOK_BNEG; } 2484 2627 break; 2485 2628 2486 2629 case 78: 2487 #line 444 "dt_grammar.y" 2630 2631 /* Line 1455 of yacc.c */ 2632 #line 448 "dt_grammar.y" 2488 2633 { (yyval.l_tok) = DT_TOK_LNEG; } 2489 2634 break; 2490 2635 2491 2636 case 80: 2492 #line 449 "dt_grammar.y" 2637 2638 /* Line 1455 of yacc.c */ 2639 #line 453 "dt_grammar.y" 2493 2640 { 2494 2641 (yyval.l_node) = OP2(DT_TOK_LPAR, dt_node_type((yyvsp[(2) - (4)].l_decl)), (yyvsp[(4) - (4)].l_node)); … … 2497 2644 2498 2645 case 82: 2499 #line 456 "dt_grammar.y" 2646 2647 /* Line 1455 of yacc.c */ 2648 #line 460 "dt_grammar.y" 2500 2649 { 2501 2650 (yyval.l_node) = OP2(DT_TOK_MUL, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2504 2653 2505 2654 case 83: 2506 #line 459 "dt_grammar.y" 2655 2656 /* Line 1455 of yacc.c */ 2657 #line 463 "dt_grammar.y" 2507 2658 { 2508 2659 (yyval.l_node) = OP2(DT_TOK_DIV, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2511 2662 2512 2663 case 84: 2513 #line 462 "dt_grammar.y" 2664 2665 /* Line 1455 of yacc.c */ 2666 #line 466 "dt_grammar.y" 2514 2667 { 2515 2668 (yyval.l_node) = OP2(DT_TOK_MOD, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2518 2671 2519 2672 case 86: 2520 #line 469 "dt_grammar.y" 2673 2674 /* Line 1455 of yacc.c */ 2675 #line 473 "dt_grammar.y" 2521 2676 { 2522 2677 (yyval.l_node) = OP2(DT_TOK_ADD, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2525 2680 2526 2681 case 87: 2527 #line 472 "dt_grammar.y" 2682 2683 /* Line 1455 of yacc.c */ 2684 #line 476 "dt_grammar.y" 2528 2685 { 2529 2686 (yyval.l_node) = OP2(DT_TOK_SUB, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2532 2689 2533 2690 case 89: 2534 #line 479 "dt_grammar.y" 2691 2692 /* Line 1455 of yacc.c */ 2693 #line 483 "dt_grammar.y" 2535 2694 { 2536 2695 (yyval.l_node) = OP2(DT_TOK_LSH, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2539 2698 2540 2699 case 90: 2541 #line 482 "dt_grammar.y" 2700 2701 /* Line 1455 of yacc.c */ 2702 #line 486 "dt_grammar.y" 2542 2703 { 2543 2704 (yyval.l_node) = OP2(DT_TOK_RSH, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2546 2707 2547 2708 case 92: 2548 #line 489 "dt_grammar.y" 2709 2710 /* Line 1455 of yacc.c */ 2711 #line 493 "dt_grammar.y" 2549 2712 { 2550 2713 (yyval.l_node) = OP2(DT_TOK_LT, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2553 2716 2554 2717 case 93: 2555 #line 492 "dt_grammar.y" 2718 2719 /* Line 1455 of yacc.c */ 2720 #line 496 "dt_grammar.y" 2556 2721 { 2557 2722 (yyval.l_node) = OP2(DT_TOK_GT, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2560 2725 2561 2726 case 94: 2562 #line 495 "dt_grammar.y" 2727 2728 /* Line 1455 of yacc.c */ 2729 #line 499 "dt_grammar.y" 2563 2730 { 2564 2731 (yyval.l_node) = OP2(DT_TOK_LE, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2567 2734 2568 2735 case 95: 2569 #line 498 "dt_grammar.y" 2736 2737 /* Line 1455 of yacc.c */ 2738 #line 502 "dt_grammar.y" 2570 2739 { 2571 2740 (yyval.l_node) = OP2(DT_TOK_GE, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2574 2743 2575 2744 case 97: 2576 #line 505 "dt_grammar.y" 2745 2746 /* Line 1455 of yacc.c */ 2747 #line 509 "dt_grammar.y" 2577 2748 { 2578 2749 (yyval.l_node) = OP2(DT_TOK_EQU, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2581 2752 2582 2753 case 98: 2583 #line 508 "dt_grammar.y" 2754 2755 /* Line 1455 of yacc.c */ 2756 #line 512 "dt_grammar.y" 2584 2757 { 2585 2758 (yyval.l_node) = OP2(DT_TOK_NEQ, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2588 2761 2589 2762 case 100: 2590 #line 515 "dt_grammar.y" 2763 2764 /* Line 1455 of yacc.c */ 2765 #line 519 "dt_grammar.y" 2591 2766 { 2592 2767 (yyval.l_node) = OP2(DT_TOK_BAND, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2595 2770 2596 2771 case 102: 2597 #line 522 "dt_grammar.y" 2772 2773 /* Line 1455 of yacc.c */ 2774 #line 526 "dt_grammar.y" 2598 2775 { 2599 2776 (yyval.l_node) = OP2(DT_TOK_XOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2602 2779 2603 2780 case 104: 2604 #line 529 "dt_grammar.y" 2781 2782 /* Line 1455 of yacc.c */ 2783 #line 533 "dt_grammar.y" 2605 2784 { 2606 2785 (yyval.l_node) = OP2(DT_TOK_BOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2609 2788 2610 2789 case 106: 2611 #line 536 "dt_grammar.y" 2790 2791 /* Line 1455 of yacc.c */ 2792 #line 540 "dt_grammar.y" 2612 2793 { 2613 2794 (yyval.l_node) = OP2(DT_TOK_LAND, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2616 2797 2617 2798 case 108: 2618 #line 543 "dt_grammar.y" 2799 2800 /* Line 1455 of yacc.c */ 2801 #line 547 "dt_grammar.y" 2619 2802 { 2620 2803 (yyval.l_node) = OP2(DT_TOK_LXOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2623 2806 2624 2807 case 110: 2625 #line 550 "dt_grammar.y" 2808 2809 /* Line 1455 of yacc.c */ 2810 #line 554 "dt_grammar.y" 2626 2811 { 2627 2812 (yyval.l_node) = OP2(DT_TOK_LOR, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2630 2815 2631 2816 case 113: 2632 #line 561 "dt_grammar.y" 2817 2818 /* Line 1455 of yacc.c */ 2819 #line 565 "dt_grammar.y" 2633 2820 { (yyval.l_node) = OP3((yyvsp[(1) - (5)].l_node), (yyvsp[(3) - (5)].l_node), (yyvsp[(5) - (5)].l_node)); } 2634 2821 break; 2635 2822 2636 2823 case 115: 2637 #line 566 "dt_grammar.y" 2824 2825 /* Line 1455 of yacc.c */ 2826 #line 570 "dt_grammar.y" 2638 2827 { 2639 2828 (yyval.l_node) = OP2((yyvsp[(2) - (3)].l_tok), (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2642 2831 2643 2832 case 116: 2644 #line 572 "dt_grammar.y" 2833 2834 /* Line 1455 of yacc.c */ 2835 #line 576 "dt_grammar.y" 2645 2836 { (yyval.l_tok) = DT_TOK_ASGN; } 2646 2837 break; 2647 2838 2648 2839 case 117: 2649 #line 573 "dt_grammar.y" 2840 2841 /* Line 1455 of yacc.c */ 2842 #line 577 "dt_grammar.y" 2650 2843 { (yyval.l_tok) = DT_TOK_MUL_EQ; } 2651 2844 break; 2652 2845 2653 2846 case 118: 2654 #line 574 "dt_grammar.y" 2847 2848 /* Line 1455 of yacc.c */ 2849 #line 578 "dt_grammar.y" 2655 2850 { (yyval.l_tok) = DT_TOK_DIV_EQ; } 2656 2851 break; 2657 2852 2658 2853 case 119: 2659 #line 575 "dt_grammar.y" 2854 2855 /* Line 1455 of yacc.c */ 2856 #line 579 "dt_grammar.y" 2660 2857 { (yyval.l_tok) = DT_TOK_MOD_EQ; } 2661 2858 break; 2662 2859 2663 2860 case 120: 2664 #line 576 "dt_grammar.y" 2861 2862 /* Line 1455 of yacc.c */ 2863 #line 580 "dt_grammar.y" 2665 2864 { (yyval.l_tok) = DT_TOK_ADD_EQ; } 2666 2865 break; 2667 2866 2668 2867 case 121: 2669 #line 577 "dt_grammar.y" 2868 2869 /* Line 1455 of yacc.c */ 2870 #line 581 "dt_grammar.y" 2670 2871 { (yyval.l_tok) = DT_TOK_SUB_EQ; } 2671 2872 break; 2672 2873 2673 2874 case 122: 2674 #line 578 "dt_grammar.y" 2875 2876 /* Line 1455 of yacc.c */ 2877 #line 582 "dt_grammar.y" 2675 2878 { (yyval.l_tok) = DT_TOK_LSH_EQ; } 2676 2879 break; 2677 2880 2678 2881 case 123: 2679 #line 579 "dt_grammar.y" 2882 2883 /* Line 1455 of yacc.c */ 2884 #line 583 "dt_grammar.y" 2680 2885 { (yyval.l_tok) = DT_TOK_RSH_EQ; } 2681 2886 break; 2682 2887 2683 2888 case 124: 2684 #line 580 "dt_grammar.y" 2889 2890 /* Line 1455 of yacc.c */ 2891 #line 584 "dt_grammar.y" 2685 2892 { (yyval.l_tok) = DT_TOK_AND_EQ; } 2686 2893 break; 2687 2894 2688 2895 case 125: 2689 #line 581 "dt_grammar.y" 2896 2897 /* Line 1455 of yacc.c */ 2898 #line 585 "dt_grammar.y" 2690 2899 { (yyval.l_tok) = DT_TOK_XOR_EQ; } 2691 2900 break; 2692 2901 2693 2902 case 126: 2694 #line 582 "dt_grammar.y" 2903 2904 /* Line 1455 of yacc.c */ 2905 #line 586 "dt_grammar.y" 2695 2906 { (yyval.l_tok) = DT_TOK_OR_EQ; } 2696 2907 break; 2697 2908 2698 2909 case 128: 2699 #line 586 "dt_grammar.y" 2910 2911 /* Line 1455 of yacc.c */ 2912 #line 590 "dt_grammar.y" 2700 2913 { 2701 2914 (yyval.l_node) = OP2(DT_TOK_COMMA, (yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2704 2917 2705 2918 case 129: 2706 #line 591 "dt_grammar.y" 2919 2920 /* Line 1455 of yacc.c */ 2921 #line 595 "dt_grammar.y" 2707 2922 { 2708 2923 (yyval.l_node) = dt_node_decl(); … … 2713 2928 2714 2929 case 130: 2715 #line 596 "dt_grammar.y" 2930 2931 /* Line 1455 of yacc.c */ 2932 #line 600 "dt_grammar.y" 2716 2933 { 2717 2934 (yyval.l_node) = (yyvsp[(2) - (3)].l_node); … … 2722 2939 2723 2940 case 143: 2724 #line 622 "dt_grammar.y" 2941 2942 /* Line 1455 of yacc.c */ 2943 #line 626 "dt_grammar.y" 2725 2944 { dt_decl_class(DT_DC_AUTO); } 2726 2945 break; 2727 2946 2728 2947 case 144: 2729 #line 623 "dt_grammar.y" 2948 2949 /* Line 1455 of yacc.c */ 2950 #line 627 "dt_grammar.y" 2730 2951 { dt_decl_class(DT_DC_REGISTER); } 2731 2952 break; 2732 2953 2733 2954 case 145: 2734 #line 624 "dt_grammar.y" 2955 2956 /* Line 1455 of yacc.c */ 2957 #line 628 "dt_grammar.y" 2735 2958 { dt_decl_class(DT_DC_STATIC); } 2736 2959 break; 2737 2960 2738 2961 case 146: 2739 #line 625 "dt_grammar.y" 2962 2963 /* Line 1455 of yacc.c */ 2964 #line 629 "dt_grammar.y" 2740 2965 { dt_decl_class(DT_DC_EXTERN); } 2741 2966 break; 2742 2967 2743 2968 case 147: 2744 #line 626 "dt_grammar.y" 2969 2970 /* Line 1455 of yacc.c */ 2971 #line 630 "dt_grammar.y" 2745 2972 { dt_decl_class(DT_DC_TYPEDEF); } 2746 2973 break; 2747 2974 2748 2975 case 149: 2749 #line 631 "dt_grammar.y" 2976 2977 /* Line 1455 of yacc.c */ 2978 #line 635 "dt_grammar.y" 2750 2979 { dt_decl_class(DT_DC_SELF); } 2751 2980 break; 2752 2981 2753 2982 case 150: 2754 #line 632 "dt_grammar.y" 2983 2984 /* Line 1455 of yacc.c */ 2985 #line 636 "dt_grammar.y" 2755 2986 { dt_decl_class(DT_DC_THIS); } 2756 2987 break; 2757 2988 2758 2989 case 151: 2759 #line 635 "dt_grammar.y" 2990 2991 /* Line 1455 of yacc.c */ 2992 #line 639 "dt_grammar.y" 2760 2993 { (yyval.l_decl) = dt_decl_spec(CTF_K_INTEGER, DUP("void")); } 2761 2994 break; 2762 2995 2763 2996 case 152: 2764 #line 636 "dt_grammar.y" 2997 2998 /* Line 1455 of yacc.c */ 2999 #line 640 "dt_grammar.y" 2765 3000 { (yyval.l_decl) = dt_decl_spec(CTF_K_INTEGER, DUP("char")); } 2766 3001 break; 2767 3002 2768 3003 case 153: 2769 #line 637 "dt_grammar.y" 3004 3005 /* Line 1455 of yacc.c */ 3006 #line 641 "dt_grammar.y" 2770 3007 { (yyval.l_decl) = dt_decl_attr(DT_DA_SHORT); } 2771 3008 break; 2772 3009 2773 3010 case 154: 2774 #line 638 "dt_grammar.y" 3011 3012 /* Line 1455 of yacc.c */ 3013 #line 642 "dt_grammar.y" 2775 3014 { (yyval.l_decl) = dt_decl_spec(CTF_K_INTEGER, DUP("int")); } 2776 3015 break; 2777 3016 2778 3017 case 155: 2779 #line 639 "dt_grammar.y" 3018 3019 /* Line 1455 of yacc.c */ 3020 #line 643 "dt_grammar.y" 2780 3021 { (yyval.l_decl) = dt_decl_attr(DT_DA_LONG); } 2781 3022 break; 2782 3023 2783 3024 case 156: 2784 #line 640 "dt_grammar.y" 3025 3026 /* Line 1455 of yacc.c */ 3027 #line 644 "dt_grammar.y" 2785 3028 { (yyval.l_decl) = dt_decl_spec(CTF_K_FLOAT, DUP("float")); } 2786 3029 break; 2787 3030 2788 3031 case 157: 2789 #line 641 "dt_grammar.y" 3032 3033 /* Line 1455 of yacc.c */ 3034 #line 645 "dt_grammar.y" 2790 3035 { (yyval.l_decl) = dt_decl_spec(CTF_K_FLOAT, DUP("double")); } 2791 3036 break; 2792 3037 2793 3038 case 158: 2794 #line 642 "dt_grammar.y" 3039 3040 /* Line 1455 of yacc.c */ 3041 #line 646 "dt_grammar.y" 2795 3042 { (yyval.l_decl) = dt_decl_attr(DT_DA_SIGNED); } 2796 3043 break; 2797 3044 2798 3045 case 159: 2799 #line 643 "dt_grammar.y" 3046 3047 /* Line 1455 of yacc.c */ 3048 #line 647 "dt_grammar.y" 2800 3049 { (yyval.l_decl) = dt_decl_attr(DT_DA_UNSIGNED); } 2801 3050 break; 2802 3051 2803 3052 case 160: 2804 #line 644 "dt_grammar.y" 3053 3054 /* Line 1455 of yacc.c */ 3055 #line 648 "dt_grammar.y" 2805 3056 { 2806 3057 (yyval.l_decl) = dt_decl_spec(CTF_K_TYPEDEF, DUP("string")); … … 2809 3060 2810 3061 case 161: 2811 #line 647 "dt_grammar.y" 3062 3063 /* Line 1455 of yacc.c */ 3064 #line 651 "dt_grammar.y" 2812 3065 { (yyval.l_decl) = dt_decl_spec(CTF_K_TYPEDEF, (yyvsp[(1) - (1)].l_str)); } 2813 3066 break; 2814 3067 2815 3068 case 164: 2816 #line 652 "dt_grammar.y" 3069 3070 /* Line 1455 of yacc.c */ 3071 #line 656 "dt_grammar.y" 2817 3072 { (yyval.l_decl) = dt_decl_attr(DT_DA_CONST); } 2818 3073 break; 2819 3074 2820 3075 case 165: 2821 #line 653 "dt_grammar.y" 3076 3077 /* Line 1455 of yacc.c */ 3078 #line 657 "dt_grammar.y" 2822 3079 { (yyval.l_decl) = dt_decl_attr(DT_DA_RESTRICT); } 2823 3080 break; 2824 3081 2825 3082 case 166: 2826 #line 654 "dt_grammar.y" 3083 3084 /* Line 1455 of yacc.c */ 3085 #line 658 "dt_grammar.y" 2827 3086 { (yyval.l_decl) = dt_decl_attr(DT_DA_VOLATILE); } 2828 3087 break; 2829 3088 2830 3089 case 167: 2831 #line 658 "dt_grammar.y" 3090 3091 /* Line 1455 of yacc.c */ 3092 #line 662 "dt_grammar.y" 2832 3093 { 2833 3094 (yyval.l_decl) = dt_scope_pop(); … … 2836 3097 2837 3098 case 168: 2838 #line 661 "dt_grammar.y" 3099 3100 /* Line 1455 of yacc.c */ 3101 #line 665 "dt_grammar.y" 2839 3102 { (yyval.l_decl) = dt_decl_spec((yyvsp[(1) - (2)].l_tok), (yyvsp[(2) - (2)].l_str)); } 2840 3103 break; 2841 3104 2842 3105 case 169: 2843 #line 662 "dt_grammar.y" 3106 3107 /* Line 1455 of yacc.c */ 3108 #line 666 "dt_grammar.y" 2844 3109 { (yyval.l_decl) = dt_decl_spec((yyvsp[(1) - (2)].l_tok), (yyvsp[(2) - (2)].l_str)); } 2845 3110 break; 2846 3111 2847 3112 case 170: 2848 #line 666 "dt_grammar.y" 3113 3114 /* Line 1455 of yacc.c */ 3115 #line 670 "dt_grammar.y" 2849 3116 { dt_decl_sou((yyvsp[(1) - (2)].l_tok), NULL); } 2850 3117 break; 2851 3118 2852 3119 case 171: 2853 #line 667 "dt_grammar.y" 3120 3121 /* Line 1455 of yacc.c */ 3122 #line 671 "dt_grammar.y" 2854 3123 { dt_decl_sou((yyvsp[(1) - (3)].l_tok), (yyvsp[(2) - (3)].l_str)); } 2855 3124 break; 2856 3125 2857 3126 case 172: 2858 #line 668 "dt_grammar.y" 3127 3128 /* Line 1455 of yacc.c */ 3129 #line 672 "dt_grammar.y" 2859 3130 { dt_decl_sou((yyvsp[(1) - (3)].l_tok), (yyvsp[(2) - (3)].l_str)); } 2860 3131 break; 2861 3132 2862 3133 case 173: 2863 #line 672 "dt_grammar.y" 3134 3135 /* Line 1455 of yacc.c */ 3136 #line 676 "dt_grammar.y" 2864 3137 { (yyval.l_tok) = CTF_K_STRUCT; } 2865 3138 break; 2866 3139 2867 3140 case 174: 2868 #line 673 "dt_grammar.y" 3141 3142 /* Line 1455 of yacc.c */ 3143 #line 677 "dt_grammar.y" 2869 3144 { (yyval.l_tok) = CTF_K_UNION; } 2870 3145 break; 2871 3146 2872 3147 case 178: 2873 #line 683 "dt_grammar.y" 3148 3149 /* Line 1455 of yacc.c */ 3150 #line 687 "dt_grammar.y" 2874 3151 { 2875 3152 (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 2878 3155 2879 3156 case 179: 2880 #line 689 "dt_grammar.y" 3157 3158 /* Line 1455 of yacc.c */ 3159 #line 693 "dt_grammar.y" 2881 3160 { 2882 3161 (yyval.l_node) = dt_node_decl(); … … 2886 3165 2887 3166 case 180: 2888 #line 696 "dt_grammar.y" 3167 3168 /* Line 1455 of yacc.c */ 3169 #line 700 "dt_grammar.y" 2889 3170 { 2890 3171 dt_decl_free(dt_decl_pop()); … … 2893 3174 2894 3175 case 182: 2895 #line 703 "dt_grammar.y" 3176 3177 /* Line 1455 of yacc.c */ 3178 #line 707 "dt_grammar.y" 2896 3179 { (yyval.l_decl) = (yyvsp[(2) - (2)].l_decl); } 2897 3180 break; 2898 3181 2899 3182 case 184: 2900 #line 705 "dt_grammar.y" 3183 3184 /* Line 1455 of yacc.c */ 3185 #line 709 "dt_grammar.y" 2901 3186 { (yyval.l_decl) = (yyvsp[(2) - (2)].l_decl); } 2902 3187 break; 2903 3188 2904 3189 case 187: 2905 #line 714 "dt_grammar.y" 3190 3191 /* Line 1455 of yacc.c */ 3192 #line 718 "dt_grammar.y" 2906 3193 { dt_decl_member(NULL); } 2907 3194 break; 2908 3195 2909 3196 case 188: 2910 #line 715 "dt_grammar.y" 3197 3198 /* Line 1455 of yacc.c */ 3199 #line 719 "dt_grammar.y" 2911 3200 { dt_decl_member((yyvsp[(2) - (2)].l_node)); } 2912 3201 break; 2913 3202 2914 3203 case 189: 2915 #line 716 "dt_grammar.y" 3204 3205 /* Line 1455 of yacc.c */ 3206 #line 720 "dt_grammar.y" 2916 3207 { 2917 3208 dt_decl_member((yyvsp[(3) - (3)].l_node)); … … 2920 3211 2921 3212 case 190: 2922 #line 722 "dt_grammar.y" 3213 3214 /* Line 1455 of yacc.c */ 3215 #line 726 "dt_grammar.y" 2923 3216 { (yyval.l_decl) = dt_scope_pop(); } 2924 3217 break; 2925 3218 2926 3219 case 191: 2927 #line 723 "dt_grammar.y" 3220 3221 /* Line 1455 of yacc.c */ 3222 #line 727 "dt_grammar.y" 2928 3223 { (yyval.l_decl) = dt_decl_spec(CTF_K_ENUM, (yyvsp[(2) - (2)].l_str)); } 2929 3224 break; 2930 3225 2931 3226 case 192: 2932 #line 724 "dt_grammar.y" 3227 3228 /* Line 1455 of yacc.c */ 3229 #line 728 "dt_grammar.y" 2933 3230 { (yyval.l_decl) = dt_decl_spec(CTF_K_ENUM, (yyvsp[(2) - (2)].l_str)); } 2934 3231 break; 2935 3232 2936 3233 case 193: 2937 #line 728 "dt_grammar.y" 3234 3235 /* Line 1455 of yacc.c */ 3236 #line 732 "dt_grammar.y" 2938 3237 { dt_decl_enum(NULL); } 2939 3238 break; 2940 3239 2941 3240 case 194: 2942 #line 729 "dt_grammar.y" 3241 3242 /* Line 1455 of yacc.c */ 3243 #line 733 "dt_grammar.y" 2943 3244 { dt_decl_enum((yyvsp[(2) - (3)].l_str)); } 2944 3245 break; 2945 3246 2946 3247 case 195: 2947 #line 730 "dt_grammar.y" 3248 3249 /* Line 1455 of yacc.c */ 3250 #line 734 "dt_grammar.y" 2948 3251 { dt_decl_enum((yyvsp[(2) - (3)].l_str)); } 2949 3252 break; 2950 3253 2951 3254 case 198: 2952 #line 738 "dt_grammar.y" 3255 3256 /* Line 1455 of yacc.c */ 3257 #line 742 "dt_grammar.y" 2953 3258 { dt_decl_enumerator((yyvsp[(1) - (1)].l_str), NULL); } 2954 3259 break; 2955 3260 2956 3261 case 199: 2957 #line 739 "dt_grammar.y" 3262 3263 /* Line 1455 of yacc.c */ 3264 #line 743 "dt_grammar.y" 2958 3265 { 2959 3266 dt_decl_enumerator((yyvsp[(1) - (3)].l_str), (yyvsp[(3) - (3)].l_node)); … … 2962 3269 2963 3270 case 202: 2964 #line 749 "dt_grammar.y" 3271 3272 /* Line 1455 of yacc.c */ 3273 #line 753 "dt_grammar.y" 2965 3274 { (yyval.l_decl) = dt_decl_ident((yyvsp[(1) - (1)].l_str)); } 2966 3275 break; 2967 3276 2968 3277 case 203: 2969 #line 750 "dt_grammar.y" 3278 3279 /* Line 1455 of yacc.c */ 3280 #line 754 "dt_grammar.y" 2970 3281 { (yyval.l_decl) = (yyvsp[(2) - (3)].l_decl); } 2971 3282 break; 2972 3283 2973 3284 case 204: 2974 #line 751 "dt_grammar.y" 3285 3286 /* Line 1455 of yacc.c */ 3287 #line 755 "dt_grammar.y" 2975 3288 { dt_decl_array((yyvsp[(2) - (2)].l_node)); } 2976 3289 break; 2977 3290 2978 3291 case 205: 2979 #line 752 "dt_grammar.y" 3292 3293 /* Line 1455 of yacc.c */ 3294 #line 756 "dt_grammar.y" 2980 3295 { dt_decl_func((yyvsp[(1) - (2)].l_decl), (yyvsp[(2) - (2)].l_node)); } 2981 3296 break; 2982 3297 2983 3298 case 206: 2984 #line 755 "dt_grammar.y" 3299 3300 /* Line 1455 of yacc.c */ 3301 #line 759 "dt_grammar.y" 2985 3302 { dt_decl_top()->dd_attr |= DT_DA_PAREN; } 2986 3303 break; 2987 3304 2988 3305 case 207: 2989 #line 758 "dt_grammar.y" 3306 3307 /* Line 1455 of yacc.c */ 3308 #line 762 "dt_grammar.y" 2990 3309 { (yyval.l_decl) = dt_decl_ptr(); } 2991 3310 break; 2992 3311 2993 3312 case 208: 2994 #line 759 "dt_grammar.y" 3313 3314 /* Line 1455 of yacc.c */ 3315 #line 763 "dt_grammar.y" 2995 3316 { (yyval.l_decl) = dt_decl_ptr(); } 2996 3317 break; 2997 3318 2998 3319 case 209: 2999 #line 760 "dt_grammar.y" 3320 3321 /* Line 1455 of yacc.c */ 3322 #line 764 "dt_grammar.y" 3000 3323 { (yyval.l_decl) = dt_decl_ptr(); } 3001 3324 break; 3002 3325 3003 3326 case 210: 3004 #line 761 "dt_grammar.y" 3327 3328 /* Line 1455 of yacc.c */ 3329 #line 765 "dt_grammar.y" 3005 3330 { (yyval.l_decl) = dt_decl_ptr(); } 3006 3331 break; 3007 3332 3008 3333 case 212: 3009 #line 766 "dt_grammar.y" 3334 3335 /* Line 1455 of yacc.c */ 3336 #line 770 "dt_grammar.y" 3010 3337 { (yyval.l_decl) = (yyvsp[(2) - (2)].l_decl); } 3011 3338 break; 3012 3339 3013 3340 case 214: 3014 #line 771 "dt_grammar.y" 3341 3342 /* Line 1455 of yacc.c */ 3343 #line 775 "dt_grammar.y" 3015 3344 { (yyval.l_node) = dt_node_vatype(); } 3016 3345 break; 3017 3346 3018 3347 case 215: 3019 #line 772 "dt_grammar.y" 3348 3349 /* Line 1455 of yacc.c */ 3350 #line 776 "dt_grammar.y" 3020 3351 { 3021 3352 (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), dt_node_vatype()); … … 3024 3355 3025 3356 case 217: 3026 #line 778 "dt_grammar.y" 3357 3358 /* Line 1455 of yacc.c */ 3359 #line 782 "dt_grammar.y" 3027 3360 { 3028 3361 (yyval.l_node) = LINK((yyvsp[(1) - (3)].l_node), (yyvsp[(3) - (3)].l_node)); … … 3031 3364 3032 3365 case 218: 3033 #line 784 "dt_grammar.y" 3366 3367 /* Line 1455 of yacc.c */ 3368 #line 788 "dt_grammar.y" 3034 3369 { 3035 3370 (yyval.l_node) = dt_node_type(NULL); … … 3038 3373 3039 3374 case 219: 3040 #line 787 "dt_grammar.y" 3375 3376 /* Line 1455 of yacc.c */ 3377 #line 791 "dt_grammar.y" 3041 3378 { 3042 3379 (yyval.l_node) = dt_node_type(NULL); … … 3045 3382 3046 3383 case 220: 3047 #line 790 "dt_grammar.y" 3384 3385 /* Line 1455 of yacc.c */ 3386 #line 794 "dt_grammar.y" 3048 3387 { 3049 3388 (yyval.l_node) = dt_node_type(NULL); … … 3052 3391 3053 3392 case 221: 3054 #line 795 "dt_grammar.y" 3393 3394 /* Line 1455 of yacc.c */ 3395 #line 799 "dt_grammar.y" 3055 3396 { 3056 3397 (yyval.l_decl) = dt_decl_pop(); … … 3059 3400 3060 3401 case 222: 3061 #line 798 "dt_grammar.y" 3402 3403 /* Line 1455 of yacc.c */ 3404 #line 802 "dt_grammar.y" 3062 3405 { 3063 3406 (yyval.l_decl) = dt_decl_pop(); … … 3066 3409 3067 3410 case 226: 3068 #line 810 "dt_grammar.y" 3411 3412 /* Line 1455 of yacc.c */ 3413 #line 814 "dt_grammar.y" 3069 3414 { (yyval.l_decl) = (yyvsp[(2) - (3)].l_decl); } 3070 3415 break; 3071 3416 3072 3417 case 227: 3073 #line 811 "dt_grammar.y" 3418 3419 /* Line 1455 of yacc.c */ 3420 #line 815 "dt_grammar.y" 3074 3421 { dt_decl_array((yyvsp[(2) - (2)].l_node)); } 3075 3422 break; 3076 3423 3077 3424 case 228: 3078 #line 812 "dt_grammar.y" 3425 3426 /* Line 1455 of yacc.c */ 3427 #line 816 "dt_grammar.y" 3079 3428 { dt_decl_array((yyvsp[(1) - (1)].l_node)); (yyval.l_decl) = NULL; } 3080 3429 break; 3081 3430 3082 3431 case 229: 3083 #line 813 "dt_grammar.y" 3432 3433 /* Line 1455 of yacc.c */ 3434 #line 817 "dt_grammar.y" 3084 3435 { dt_decl_func((yyvsp[(1) - (2)].l_decl), (yyvsp[(2) - (2)].l_node)); } 3085 3436 break; 3086 3437 3087 3438 case 230: 3088 #line 814 "dt_grammar.y" 3439 3440 /* Line 1455 of yacc.c */ 3441 #line 818 "dt_grammar.y" 3089 3442 { dt_decl_func(NULL, (yyvsp[(1) - (1)].l_node)); } 3090 3443 break; 3091 3444 3092 3445 case 231: 3093 #line 817 "dt_grammar.y" 3446 3447 /* Line 1455 of yacc.c */ 3448 #line 821 "dt_grammar.y" 3094 3449 { dt_scope_push(NULL, CTF_ERR); } 3095 3450 break; 3096 3451 3097 3452 case 232: 3098 #line 818 "dt_grammar.y" 3453 3454 /* Line 1455 of yacc.c */ 3455 #line 822 "dt_grammar.y" 3099 3456 { 3100 3457 dt_scope_pop(); … … 3104 3461 3105 3462 case 233: 3106 #line 825 "dt_grammar.y" 3463 3464 /* Line 1455 of yacc.c */ 3465 #line 829 "dt_grammar.y" 3107 3466 { (yyval.l_node) = NULL; } 3108 3467 break; 3109 3468 3110 3469 case 234: 3111 #line 826 "dt_grammar.y" 3470 3471 /* Line 1455 of yacc.c */ 3472 #line 830 "dt_grammar.y" 3112 3473 { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } 3113 3474 break; 3114 3475 3115 3476 case 235: 3116 #line 827 "dt_grammar.y" 3477 3478 /* Line 1455 of yacc.c */ 3479 #line 831 "dt_grammar.y" 3117 3480 { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } 3118 3481 break; 3119 3482 3120 3483 case 236: 3121 #line 830 "dt_grammar.y" 3484 3485 /* Line 1455 of yacc.c */ 3486 #line 834 "dt_grammar.y" 3122 3487 { dt_scope_push(NULL, CTF_ERR); } 3123 3488 break; 3124 3489 3125 3490 case 237: 3126 #line 831 "dt_grammar.y" 3491 3492 /* Line 1455 of yacc.c */ 3493 #line 835 "dt_grammar.y" 3127 3494 { 3128 3495 dt_scope_pop(); … … 3132 3499 3133 3500 case 238: 3134 #line 838 "dt_grammar.y" 3501 3502 /* Line 1455 of yacc.c */ 3503 #line 842 "dt_grammar.y" 3135 3504 { (yyval.l_node) = NULL; } 3136 3505 break; 3137 3506 3138 3507 case 239: 3139 #line 839 "dt_grammar.y" 3508 3509 /* Line 1455 of yacc.c */ 3510 #line 843 "dt_grammar.y" 3140 3511 { (yyval.l_node) = (yyvsp[(1) - (1)].l_node); } 3141 3512 break; 3142 3513 3143 3514 3144 /* Line 1267 of yacc.c. */ 3145 #line 3143 "dt_grammar.c" 3515 3516 /* Line 1455 of yacc.c */ 3517 #line 3516 "dt_grammar.c" 3146 3518 default: break; 3147 3519 } … … 3153 3525 3154 3526 *++yyvsp = yyval; 3155 3156 3527 3157 3528 /* Now `shift' the result of the reduction. Determine what state … … 3219 3590 if (yyerrstatus == 3) 3220 3591 { 3221 /* If just tried and failed to reuse look -ahead token after an3592 /* If just tried and failed to reuse lookahead token after an 3222 3593 error, discard it. */ 3223 3594 … … 3236 3607 } 3237 3608 3238 /* Else will try to reuse look -ahead token after shifting the error3609 /* Else will try to reuse lookahead token after shifting the error 3239 3610 token. */ 3240 3611 goto yyerrlab1; … … 3293 3664 } 3294 3665 3295 if (yyn == YYFINAL)3296 YYACCEPT;3297 3298 3666 *++yyvsp = yylval; 3299 3667 … … 3320 3688 goto yyreturn; 3321 3689 3322 #if ndef yyoverflow3690 #if !defined(yyoverflow) || YYERROR_VERBOSE 3323 3691 /*-------------------------------------------------. 3324 3692 | yyexhaustedlab -- memory exhaustion comes here. | … … 3331 3699 3332 3700 yyreturn: 3333 if (yychar != YYE OF && yychar != YYEMPTY)3701 if (yychar != YYEMPTY) 3334 3702 yydestruct ("Cleanup: discarding lookahead", 3335 3703 yytoken, &yylval); … … 3357 3725 3358 3726 3359 #line 842 "dt_grammar.y" 3360 3361 3727 3728 /* Line 1675 of yacc.c */ 3729 #line 846 "dt_grammar.y" 3730 3731 -
trunk/src/VBox/ExtPacks/VBoxDTrace/generated/dt_grammar.h
r53983 r63135 1 /* A Bison parser, made by GNU Bison 2.3. */ 1 2 /* A Bison parser, made by GNU Bison 2.4.1. */ 2 3 3 4 /* Skeleton interface for Bison's Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 20065 6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 7 Free Software Foundation, Inc. 7 8 This program is free software ;you can redistribute it and/or modify8 9 This program is free software: you can redistribute it and/or modify 9 10 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation ; either version 2, or (at your option)11 any later version.12 11 the Free Software Foundation, either version 3 of the License, or 12 (at your option) any later version. 13 13 14 This program is distributed in the hope that it will be useful, 14 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 17 GNU General Public License for more details. 17 18 18 19 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 Boston, MA 02110-1301, USA. */ 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 22 21 23 22 /* As a special exception, you may create a larger work that contains … … 30 29 Bison output files to be licensed under the GNU General Public 31 30 License without this special exception. 32 31 33 32 This special exception was added by the Free Software Foundation in 34 33 version 2.2 of Bison. */ 34 35 35 36 36 /* Tokens. */ … … 265 265 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 266 266 typedef union YYSTYPE 267 #line 47 "dt_grammar.y"268 267 { 268 269 /* Line 1676 of yacc.c */ 270 #line 51 "dt_grammar.y" 271 269 272 dt_node_t *l_node; 270 273 dt_decl_t *l_decl; … … 272 275 uintmax_t l_int; 273 276 int l_tok; 274 } 275 /* Line 1529 of yacc.c. */ 276 #line 277 "dt_grammar.h" 277 YYSTYPE; 277 278 279 280 /* Line 1676 of yacc.c */ 281 #line 282 "dt_grammar.h" 282 } YYSTYPE; 283 # define YYSTYPE_IS_TRIVIAL 1 278 284 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 279 285 # define YYSTYPE_IS_DECLARED 1 280 # define YYSTYPE_IS_TRIVIAL 1281 286 #endif 282 287 283 288 extern YYSTYPE yylval; 284 289 290 -
trunk/src/VBox/ExtPacks/VBoxDTrace/generated/dt_lex.c
r53986 r63135 1 1 #line 2 "dt_lex.c" 2 3 #line 4 "dt_lex.c"4 5 #define YY_INT_ALIGNED short int6 7 2 /* A lexical scanner generated by flex */ 3 4 /* Scanner skeleton version: 5 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ 6 */ 8 7 9 8 #define FLEX_SCANNER 10 9 #define YY_FLEX_MAJOR_VERSION 2 11 10 #define YY_FLEX_MINOR_VERSION 5 12 #define YY_FLEX_SUBMINOR_VERSION 35 13 #if YY_FLEX_SUBMINOR_VERSION > 0 14 #define FLEX_BETA 15 #endif 16 17 /* First, we deal with platform-specific or compiler-specific issues. */ 18 19 /* begin standard C headers. */ 11 20 12 #include <stdio.h> 21 #include <string.h> 22 #include <errno.h> 13 14 15 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 16 #ifdef c_plusplus 17 #ifndef __cplusplus 18 #define __cplusplus 19 #endif 20 #endif 21 22 23 #ifdef __cplusplus 24 23 25 #include <stdlib.h> 24 25 /* end standard C headers. */ 26 27 /* flex integer type definitions */ 28 29 #ifndef FLEXINT_H 30 #define FLEXINT_H 31 32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 33 34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 35 36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 37 * if you want the limit (max/min) macros for int types. 38 */ 39 #ifndef __STDC_LIMIT_MACROS 40 #define __STDC_LIMIT_MACROS 1 41 #endif 42 43 #include <inttypes.h> 44 typedef int8_t flex_int8_t; 45 typedef uint8_t flex_uint8_t; 46 typedef int16_t flex_int16_t; 47 typedef uint16_t flex_uint16_t; 48 typedef int32_t flex_int32_t; 49 typedef uint32_t flex_uint32_t; 50 #else 51 typedef signed char flex_int8_t; 52 typedef short int flex_int16_t; 53 typedef int flex_int32_t; 54 typedef unsigned char flex_uint8_t; 55 typedef unsigned short int flex_uint16_t; 56 typedef unsigned int flex_uint32_t; 57 #endif /* ! C99 */ 58 59 /* Limits of integral types. */ 60 #ifndef INT8_MIN 61 #define INT8_MIN (-128) 62 #endif 63 #ifndef INT16_MIN 64 #define INT16_MIN (-32767-1) 65 #endif 66 #ifndef INT32_MIN 67 #define INT32_MIN (-2147483647-1) 68 #endif 69 #ifndef INT8_MAX 70 #define INT8_MAX (127) 71 #endif 72 #ifndef INT16_MAX 73 #define INT16_MAX (32767) 74 #endif 75 #ifndef INT32_MAX 76 #define INT32_MAX (2147483647) 77 #endif 78 #ifndef UINT8_MAX 79 #define UINT8_MAX (255U) 80 #endif 81 #ifndef UINT16_MAX 82 #define UINT16_MAX (65535U) 83 #endif 84 #ifndef UINT32_MAX 85 #define UINT32_MAX (4294967295U) 86 #endif 87 88 #endif /* ! FLEXINT_H */ 89 90 #ifdef __cplusplus 26 #include <unistd.h> 27 28 /* Use prototypes in function declarations. */ 29 #define YY_USE_PROTOS 91 30 92 31 /* The "const" storage-class-modifier is valid. */ … … 95 34 #else /* ! __cplusplus */ 96 35 97 /* C99 requires __STDC__ to be defined as 1. */ 98 #if defined (__STDC__) 99 36 #if __STDC__ 37 38 #define YY_USE_PROTOS 100 39 #define YY_USE_CONST 101 40 102 #endif /* defined (__STDC__)*/41 #endif /* __STDC__ */ 103 42 #endif /* ! __cplusplus */ 43 44 #ifdef __TURBOC__ 45 #pragma warn -rch 46 #pragma warn -use 47 #include <io.h> 48 #include <stdlib.h> 49 #define YY_USE_CONST 50 #define YY_USE_PROTOS 51 #endif 104 52 105 53 #ifdef YY_USE_CONST … … 107 55 #else 108 56 #define yyconst 57 #endif 58 59 60 #ifdef YY_USE_PROTOS 61 #define YY_PROTO(proto) proto 62 #else 63 #define YY_PROTO(proto) () 109 64 #endif 110 65 … … 123 78 * definition of BEGIN. 124 79 */ 125 #define BEGIN (yy_start)= 1 + 2 *80 #define BEGIN yy_start = 1 + 2 * 126 81 127 82 /* Translate the current start state into a value that can be later handed … … 129 84 * compatibility. 130 85 */ 131 #define YY_START (( (yy_start)- 1) / 2)86 #define YY_START ((yy_start - 1) / 2) 132 87 #define YYSTATE YY_START 133 88 … … 136 91 137 92 /* Special action meaning "start processing a new file". */ 138 #define YY_NEW_FILE yyrestart( yyin)93 #define YY_NEW_FILE yyrestart( yyin ) 139 94 140 95 #define YY_END_OF_BUFFER_CHAR 0 141 96 142 97 /* Size of default input buffer. */ 143 #ifndef YY_BUF_SIZE144 98 #define YY_BUF_SIZE 16384 145 #endif 146 147 /* The state buf must be large enough to hold one state per character in the main buffer. 148 */ 149 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 150 151 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 152 #define YY_TYPEDEF_YY_BUFFER_STATE 99 153 100 typedef struct yy_buffer_state *YY_BUFFER_STATE; 154 #endif 155 156 #ifndef YY_TYPEDEF_YY_SIZE_T 157 #define YY_TYPEDEF_YY_SIZE_T 158 typedef size_t yy_size_t; 159 #endif 160 161 extern yy_size_t yyleng; 162 101 102 extern int yyleng; 163 103 extern FILE *yyin, *yyout; 164 104 … … 167 107 #define EOB_ACT_LAST_MATCH 2 168 108 169 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires 170 * access to the local variable yy_act. Since yyless() is a macro, it would break171 * existing scanners that call yyless() from OUTSIDE yylex.172 * One obvious solution it to make yy_act a global. I tried that, and saw173 * a 5% performance hit in a non-yylineno scanner, because yy_act is174 * normally declared as a register variable-- so it is not worth it.175 */176 #define YY_LESS_LINENO(n) \177 do { \178 yy_size_t yyl;\179 for ( yyl = n; yyl < yyleng; ++yyl )\180 if ( yytext[yyl] == '\n' )\181 --yylineno;\182 }while(0) 183 184 /* Return all but the first "n" matched characters back to the input stream. */ 109 /* The funky do-while in the following #define is used to turn the definition 110 * int a single C statement (which needs a semi-colon terminator). This 111 * avoids problems with code like: 112 * 113 * if ( condition_holds ) 114 * yyless( 5 ); 115 * else 116 * do_something_else(); 117 * 118 * Prior to using the do-while the compiler would get upset at the 119 * "else" because it interpreted the "if" statement as being all 120 * done when it reached the ';' after the yyless() call. 121 */ 122 123 /* Return all but the first 'n' matched characters back to the input stream. */ 124 185 125 #define yyless(n) \ 186 126 do \ 187 127 { \ 188 128 /* Undo effects of setting up yytext. */ \ 189 int yyless_macro_arg = (n); \ 190 YY_LESS_LINENO(yyless_macro_arg);\ 191 *yy_cp = (yy_hold_char); \ 129 *yy_cp = yy_hold_char; \ 192 130 YY_RESTORE_YY_MORE_OFFSET \ 193 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg- YY_MORE_ADJ; \131 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 194 132 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 195 133 } \ 196 134 while ( 0 ) 197 135 198 #define unput(c) yyunput( c, (yytext_ptr) ) 199 200 #ifndef YY_STRUCT_YY_BUFFER_STATE 201 #define YY_STRUCT_YY_BUFFER_STATE 136 #define unput(c) yyunput( c, yytext_ptr ) 137 138 /* The following is because we cannot portably get our hands on size_t 139 * (without autoconf's help, which isn't available because we want 140 * flex-generated scanners to compile on their own). 141 */ 142 typedef unsigned int yy_size_t; 143 144 202 145 struct yy_buffer_state 203 146 { … … 215 158 * characters. 216 159 */ 217 yy_size_t yy_n_chars;160 int yy_n_chars; 218 161 219 162 /* Whether we "own" the buffer - i.e., we know we created it, … … 236 179 int yy_at_bol; 237 180 238 int yy_bs_lineno; /**< The line count. */239 int yy_bs_column; /**< The column count. */240 241 181 /* Whether to try to fill the input buffer when we reach the 242 182 * end of it. … … 245 185 246 186 int yy_buffer_status; 247 248 187 #define YY_BUFFER_NEW 0 249 188 #define YY_BUFFER_NORMAL 1 … … 259 198 */ 260 199 #define YY_BUFFER_EOF_PENDING 2 261 262 200 }; 263 #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 264 265 /* Stack of input buffers. */ 266 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 267 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 268 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 201 202 static YY_BUFFER_STATE yy_current_buffer = 0; 269 203 270 204 /* We provide macros for accessing buffer states in case in the 271 205 * future we want to put the buffer states in a more general 272 206 * "scanner state". 273 *274 * Returns the top of the stack, or NULL.275 207 */ 276 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 277 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 278 : NULL) 279 280 /* Same as previous macro, but useful when we know that the buffer stack is not 281 * NULL or when we need an lvalue. For internal use only. 282 */ 283 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 208 #define YY_CURRENT_BUFFER yy_current_buffer 209 284 210 285 211 /* yy_hold_char holds the character lost when yytext is formed. */ 286 212 static char yy_hold_char; 287 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ 288 yy_size_t yyleng; 213 214 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 215 216 217 int yyleng; 289 218 290 219 /* Points to current character in buffer. */ 291 220 static char *yy_c_buf_p = (char *) 0; 292 static int yy_init = 0; /* whether we need to initialize */221 static int yy_init = 1; /* whether we need to initialize */ 293 222 static int yy_start = 0; /* start state number */ 294 223 … … 298 227 static int yy_did_buffer_switch_on_eof; 299 228 300 void yyrestart (FILE *input_file ); 301 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 302 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); 303 void yy_delete_buffer (YY_BUFFER_STATE b ); 304 void yy_flush_buffer (YY_BUFFER_STATE b ); 305 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); 306 void yypop_buffer_state (void ); 307 308 static void yyensure_buffer_stack (void ); 309 static void yy_load_buffer_state (void ); 310 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 311 312 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 313 314 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); 315 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 316 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); 317 318 void *yyalloc (yy_size_t ); 319 void *yyrealloc (void *,yy_size_t ); 320 void yyfree (void * ); 229 void yyrestart YY_PROTO(( FILE *input_file )); 230 231 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 232 void yy_load_buffer_state YY_PROTO(( void )); 233 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 234 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 235 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 236 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 237 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 238 239 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 240 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 241 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 242 243 static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 244 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 245 static void yy_flex_free YY_PROTO(( void * )); 321 246 322 247 #define yy_new_buffer yy_create_buffer … … 324 249 #define yy_set_interactive(is_interactive) \ 325 250 { \ 326 if ( ! YY_CURRENT_BUFFER ){ \ 327 yyensure_buffer_stack (); \ 328 YY_CURRENT_BUFFER_LVALUE = \ 329 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 330 } \ 331 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 251 if ( ! yy_current_buffer ) \ 252 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 253 yy_current_buffer->yy_is_interactive = is_interactive; \ 332 254 } 333 255 334 256 #define yy_set_bol(at_bol) \ 335 257 { \ 336 if ( ! YY_CURRENT_BUFFER ){\ 337 yyensure_buffer_stack (); \ 338 YY_CURRENT_BUFFER_LVALUE = \ 339 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 340 } \ 341 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 258 if ( ! yy_current_buffer ) \ 259 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 260 yy_current_buffer->yy_at_bol = at_bol; \ 342 261 } 343 262 344 #define YY_AT_BOL() ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol)345 346 /* Begin user sect3 */ 347 263 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 264 265 266 #define YY_USES_REJECT 348 267 typedef unsigned char YY_CHAR; 349 350 268 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 351 352 269 typedef int yy_state_type; 353 354 270 #define YY_FLEX_LEX_COMPAT 355 271 extern int yylineno; 356 357 272 int yylineno = 1; 358 359 273 extern char yytext[]; 360 274 361 static yy_state_type yy_get_previous_state (void ); 362 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 363 static int yy_get_next_buffer (void ); 364 static void yy_fatal_error (yyconst char msg[] ); 275 276 static yy_state_type yy_get_previous_state YY_PROTO(( void )); 277 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 278 static int yy_get_next_buffer YY_PROTO(( void )); 279 static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 365 280 366 281 /* Done after the current pattern has been matched and before the … … 368 283 */ 369 284 #define YY_DO_BEFORE_ACTION \ 370 (yytext_ptr)= yy_bp; \371 yyleng = ( size_t) (yy_cp - yy_bp); \372 (yy_hold_char)= *yy_cp; \285 yytext_ptr = yy_bp; \ 286 yyleng = (int) (yy_cp - yy_bp); \ 287 yy_hold_char = *yy_cp; \ 373 288 *yy_cp = '\0'; \ 374 if ( yyleng + (yy_more_offset)>= YYLMAX ) \289 if ( yyleng + yy_more_offset >= YYLMAX ) \ 375 290 YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ 376 yy_flex_strncpy( &yytext[ (yy_more_offset)], (yytext_ptr), yyleng + 1 ); \377 yyleng += (yy_more_offset); \378 (yy_prev_more_offset) = (yy_more_offset); \379 (yy_more_offset)= 0; \380 (yy_c_buf_p)= yy_cp;291 yy_flex_strncpy( &yytext[yy_more_offset], yytext_ptr, yyleng + 1 ); \ 292 yyleng += yy_more_offset; \ 293 yy_prev_more_offset = yy_more_offset; \ 294 yy_more_offset = 0; \ 295 yy_c_buf_p = yy_cp; 381 296 382 297 #define YY_NUM_RULES 162 383 298 #define YY_END_OF_BUFFER 163 384 /* This struct is not used in this scanner, 385 but its presence is necessary. */ 386 struct yy_trans_info 387 { 388 flex_int32_t yy_verify; 389 flex_int32_t yy_nxt; 390 }; 391 static yyconst flex_int16_t yy_acclist[740] = 299 static yyconst short int yy_acclist[740] = 392 300 { 0, 393 301 163, 162, 149, 162, 147, 149, 162, 147, 162, 126, … … 474 382 } ; 475 383 476 static yyconst flex_int16_t yy_accept[511] =384 static yyconst short int yy_accept[511] = 477 385 { 0, 478 386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … … 534 442 } ; 535 443 536 static yyconst flex_int32_t yy_ec[256] =444 static yyconst int yy_ec[256] = 537 445 { 0, 538 446 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, … … 566 474 } ; 567 475 568 static yyconst flex_int32_t yy_meta[69] =476 static yyconst int yy_meta[69] = 569 477 { 0, 570 478 1, 2, 3, 1, 4, 2, 1, 5, 1, 1, … … 577 485 } ; 578 486 579 static yyconst flex_int16_t yy_base[530] =487 static yyconst short int yy_base[530] = 580 488 { 0, 581 489 0, 0, 0, 67, 56, 57, 76, 143, 145, 150, … … 639 547 } ; 640 548 641 static yyconst flex_int16_t yy_def[530] =549 static yyconst short int yy_def[530] = 642 550 { 0, 643 551 510, 510, 509, 3, 511, 511, 509, 7, 512, 512, … … 701 609 } ; 702 610 703 static yyconst flex_int16_t yy_nxt[884] =611 static yyconst short int yy_nxt[884] = 704 612 { 0, 705 613 15, 16, 17, 16, 18, 19, 15, 20, 21, 22, … … 802 710 } ; 803 711 804 static yyconst flex_int16_t yy_chk[884] =712 static yyconst short int yy_chk[884] = 805 713 { 0, 806 714 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, … … 903 811 } ; 904 812 905 /* Table of booleans, true if rule could match eol. */ 906 static yyconst flex_int32_t yy_rule_can_match_eol[163] = 907 { 0, 908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 911 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 912 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 915 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 916 0, 0, 0, }; 917 918 extern int yy_flex_debug; 919 int yy_flex_debug = 0; 920 921 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; 813 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; 922 814 static char *yy_full_match; 923 815 static int yy_lp; … … 929 821 #define REJECT \ 930 822 { \ 931 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \932 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \933 (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \934 (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \935 yy_current_state = * (yy_state_ptr); /* restore curr. state */ \936 ++ (yy_lp); \823 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ 824 yy_cp = yy_full_match; /* restore poss. backed-over text */ \ 825 yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \ 826 yy_state_ptr = yy_full_state; /* restore orig. state */ \ 827 yy_current_state = *yy_state_ptr; /* restore curr. state */ \ 828 ++yy_lp; \ 937 829 goto find_rule; \ 938 830 } 939 940 831 static int yy_more_offset = 0; 941 832 static int yy_prev_more_offset = 0; 942 #define yymore() ( (yy_more_offset)= yy_flex_strlen( yytext ))833 #define yymore() (yy_more_offset = yy_flex_strlen( yytext )) 943 834 #define YY_NEED_STRLEN 944 835 #define YY_MORE_ADJ 0 945 836 #define YY_RESTORE_YY_MORE_OFFSET \ 946 837 { \ 947 (yy_more_offset) = (yy_prev_more_offset); \948 yyleng -= (yy_more_offset); \838 yy_more_offset = yy_prev_more_offset; \ 839 yyleng -= yy_more_offset; \ 949 840 } 950 841 #ifndef YYLMAX … … 955 846 char *yytext_ptr; 956 847 #line 1 "dt_lex.l" 848 #define INITIAL 0 957 849 #line 2 "dt_lex.l" 958 850 /* … … 999 891 # undef UINT32_MAX 1000 892 # undef UINT64_MAX 893 # endif 894 # ifdef _MSC_VER 895 # pragma warning(disable:4668 4131 4255) 1001 896 # endif 1002 897 # include <iprt/ctype.h> … … 1059 954 * S4 - D control line scan (locate control directives only and invoke S3) 1060 955 */ 1061 1062 #line 1063 "dt_lex.c"1063 1064 #define INITIAL 01065 956 #define S0 1 1066 957 #define S1 2 … … 1069 960 #define S4 5 1070 961 1071 #ifndef YY_NO_UNISTD_H 1072 /* Special case for "unistd.h", since it is non-ANSI. We include it way 1073 * down here because we want the user's section 1 to have been scanned first. 1074 * The user has a chance to override it with an option. 1075 */ 1076 #include <unistd.h> 1077 #endif 1078 1079 #ifndef YY_EXTRA_TYPE 1080 #define YY_EXTRA_TYPE void * 1081 #endif 1082 1083 static int yy_init_globals (void ); 1084 1085 /* Accessor methods to globals. 1086 These are made visible to non-reentrant scanners for convenience. */ 1087 1088 int yylex_destroy (void ); 1089 1090 int yyget_debug (void ); 1091 1092 void yyset_debug (int debug_flag ); 1093 1094 YY_EXTRA_TYPE yyget_extra (void ); 1095 1096 void yyset_extra (YY_EXTRA_TYPE user_defined ); 1097 1098 FILE *yyget_in (void ); 1099 1100 void yyset_in (FILE * in_str ); 1101 1102 FILE *yyget_out (void ); 1103 1104 void yyset_out (FILE * out_str ); 1105 1106 yy_size_t yyget_leng (void ); 1107 1108 char *yyget_text (void ); 1109 1110 int yyget_lineno (void ); 1111 1112 void yyset_lineno (int line_number ); 962 #line 963 "dt_lex.c" 1113 963 1114 964 /* Macros after this point can all be overridden by user definitions in … … 1118 968 #ifndef YY_SKIP_YYWRAP 1119 969 #ifdef __cplusplus 1120 extern "C" int yywrap (void ); 1121 #else 1122 extern int yywrap (void ); 1123 #endif 1124 #endif 1125 1126 static void yyunput (int c,char *buf_ptr ); 1127 970 extern "C" int yywrap YY_PROTO(( void )); 971 #else 972 extern int yywrap YY_PROTO(( void )); 973 #endif 974 #endif 975 976 #ifndef YY_NO_UNPUT 977 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 978 #endif 979 1128 980 #ifndef yytext_ptr 1129 static void yy_flex_strncpy (char *,yyconst char *,int);981 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 1130 982 #endif 1131 983 1132 984 #ifdef YY_NEED_STRLEN 1133 static int yy_flex_strlen (yyconst char *);985 static int yy_flex_strlen YY_PROTO(( yyconst char * )); 1134 986 #endif 1135 987 1136 988 #ifndef YY_NO_INPUT 1137 1138 989 #ifdef __cplusplus 1139 static int yyinput (void ); 1140 #else 1141 static int input (void ); 1142 #endif 1143 990 static int yyinput YY_PROTO(( void )); 991 #else 992 static int input YY_PROTO(( void )); 993 #endif 994 #endif 995 996 #if YY_STACK_USED 997 static int yy_start_stack_ptr = 0; 998 static int yy_start_stack_depth = 0; 999 static int *yy_start_stack = 0; 1000 #ifndef YY_NO_PUSH_STATE 1001 static void yy_push_state YY_PROTO(( int new_state )); 1002 #endif 1003 #ifndef YY_NO_POP_STATE 1004 static void yy_pop_state YY_PROTO(( void )); 1005 #endif 1006 #ifndef YY_NO_TOP_STATE 1007 static int yy_top_state YY_PROTO(( void )); 1008 #endif 1009 1010 #else 1011 #define YY_NO_PUSH_STATE 1 1012 #define YY_NO_POP_STATE 1 1013 #define YY_NO_TOP_STATE 1 1014 #endif 1015 1016 #ifdef YY_MALLOC_DECL 1017 YY_MALLOC_DECL 1018 #else 1019 #if __STDC__ 1020 #ifndef __cplusplus 1021 #include <stdlib.h> 1022 #endif 1023 #else 1024 /* Just try to get by without declaring the routines. This will fail 1025 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 1026 * or sizeof(void*) != sizeof(int). 1027 */ 1028 #endif 1144 1029 #endif 1145 1030 … … 1150 1035 1151 1036 /* Copy whatever the last rule matched to the standard output. */ 1037 1152 1038 #ifndef ECHO 1153 1039 /* This used to be an fputs(), but since the string might contain NUL's, 1154 1040 * we now use fwrite(). 1155 1041 */ 1156 #define ECHO fwrite( yytext, yyleng, 1, yyout )1042 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 1157 1043 #endif 1158 1044 … … 1162 1048 #ifndef YY_INPUT 1163 1049 #define YY_INPUT(buf,result,max_size) \ 1164 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \1050 if ( yy_current_buffer->yy_is_interactive ) \ 1165 1051 { \ 1166 int c = '*'; \ 1167 yy_size_t n; \ 1052 int c = '*', n; \ 1168 1053 for ( n = 0; n < max_size && \ 1169 1054 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ … … 1175 1060 result = n; \ 1176 1061 } \ 1177 else \ 1178 { \ 1179 errno=0; \ 1180 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 1181 { \ 1182 if( errno != EINTR) \ 1183 { \ 1184 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 1185 break; \ 1186 } \ 1187 errno=0; \ 1188 clearerr(yyin); \ 1189 } \ 1190 }\ 1191 \ 1192 1062 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 1063 && ferror( yyin ) ) \ 1064 YY_FATAL_ERROR( "input in flex scanner failed" ); 1193 1065 #endif 1194 1066 … … 1211 1083 #endif 1212 1084 1213 /* end tables serialization structures and prototypes */1214 1215 1085 /* Default declaration of generated scanner - a define so the user can 1216 1086 * easily add parameters. 1217 1087 */ 1218 1088 #ifndef YY_DECL 1219 #define YY_DECL_IS_OURS 1 1220 1221 extern int yylex (void); 1222 1223 #define YY_DECL int yylex (void) 1224 #endif /* !YY_DECL */ 1089 #define YY_DECL int yylex YY_PROTO(( void )) 1090 #endif 1225 1091 1226 1092 /* Code executed at the beginning of each rule, after yytext and yyleng … … 1238 1104 #define YY_RULE_SETUP \ 1239 1105 if ( yyleng > 0 ) \ 1240 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \1106 yy_current_buffer->yy_at_bol = \ 1241 1107 (yytext[yyleng - 1] == '\n'); \ 1242 1108 YY_USER_ACTION 1243 1109 1244 /** The main scanner function which does all the work.1245 */1246 1110 YY_DECL 1247 {1111 { 1248 1112 register yy_state_type yy_current_state; 1249 1113 register char *yy_cp, *yy_bp; 1250 1114 register int yy_act; 1251 1252 #line 12 4"dt_lex.l"1115 1116 #line 127 "dt_lex.l" 1253 1117 1254 1118 … … 1270 1134 1271 1135 1272 #line 1 273"dt_lex.c"1273 1274 if ( !(yy_init))1136 #line 1137 "dt_lex.c" 1137 1138 if ( yy_init ) 1275 1139 { 1276 (yy_init) = 1;1140 yy_init = 0; 1277 1141 1278 1142 #ifdef YY_USER_INIT … … 1280 1144 #endif 1281 1145 1282 /* Create the reject buffer large enough to save one state per allowed character. */ 1283 if ( ! (yy_state_buf) ) 1284 (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE ); 1285 if ( ! (yy_state_buf) ) 1286 YY_FATAL_ERROR( "out of dynamic memory in yylex()" ); 1287 1288 if ( ! (yy_start) ) 1289 (yy_start) = 1; /* first start state */ 1146 if ( ! yy_start ) 1147 yy_start = 1; /* first start state */ 1290 1148 1291 1149 if ( ! yyin ) … … 1295 1153 yyout = stdout; 1296 1154 1297 if ( ! YY_CURRENT_BUFFER ) { 1298 yyensure_buffer_stack (); 1299 YY_CURRENT_BUFFER_LVALUE = 1300 yy_create_buffer(yyin,YY_BUF_SIZE ); 1301 } 1302 1303 yy_load_buffer_state( ); 1155 if ( ! yy_current_buffer ) 1156 yy_current_buffer = 1157 yy_create_buffer( yyin, YY_BUF_SIZE ); 1158 1159 yy_load_buffer_state(); 1304 1160 } 1305 1161 1306 1162 while ( 1 ) /* loops until end-of-file is reached */ 1307 1163 { 1308 yy_cp = (yy_c_buf_p);1164 yy_cp = yy_c_buf_p; 1309 1165 1310 1166 /* Support of yytext. */ 1311 *yy_cp = (yy_hold_char);1167 *yy_cp = yy_hold_char; 1312 1168 1313 1169 /* yy_bp points to the position in yy_ch_buf of the start of … … 1316 1172 yy_bp = yy_cp; 1317 1173 1318 yy_current_state = (yy_start);1174 yy_current_state = yy_start; 1319 1175 yy_current_state += YY_AT_BOL(); 1320 1321 (yy_state_ptr) = (yy_state_buf); 1322 *(yy_state_ptr)++ = yy_current_state; 1323 1176 yy_state_ptr = yy_state_buf; 1177 *yy_state_ptr++ = yy_current_state; 1324 1178 yy_match: 1325 1179 do … … 1333 1187 } 1334 1188 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1335 * (yy_state_ptr)++ = yy_current_state;1189 *yy_state_ptr++ = yy_current_state; 1336 1190 ++yy_cp; 1337 1191 } … … 1339 1193 1340 1194 yy_find_action: 1341 yy_current_state = *--(yy_state_ptr); 1342 (yy_lp) = yy_accept[yy_current_state]; 1343 goto find_rule; /* Shut up GCC warning -Wall */ 1195 yy_current_state = *--yy_state_ptr; 1196 yy_lp = yy_accept[yy_current_state]; 1344 1197 find_rule: /* we branch to this label when backing up */ 1345 1198 for ( ; ; ) /* until we find what rule we matched */ 1346 1199 { 1347 if ( (yy_lp) && (yy_lp)< yy_accept[yy_current_state + 1] )1200 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) 1348 1201 { 1349 yy_act = yy_acclist[ (yy_lp)];1202 yy_act = yy_acclist[yy_lp]; 1350 1203 if ( yy_act & YY_TRAILING_HEAD_MASK || 1351 (yy_looking_for_trail_begin))1204 yy_looking_for_trail_begin ) 1352 1205 { 1353 if ( yy_act == (yy_looking_for_trail_begin))1206 if ( yy_act == yy_looking_for_trail_begin ) 1354 1207 { 1355 (yy_looking_for_trail_begin)= 0;1208 yy_looking_for_trail_begin = 0; 1356 1209 yy_act &= ~YY_TRAILING_HEAD_MASK; 1357 1210 break; … … 1360 1213 else if ( yy_act & YY_TRAILING_MASK ) 1361 1214 { 1362 (yy_looking_for_trail_begin)= yy_act & ~YY_TRAILING_MASK;1363 (yy_looking_for_trail_begin)|= YY_TRAILING_HEAD_MASK;1364 (yy_full_match)= yy_cp;1365 (yy_full_state) = (yy_state_ptr);1366 (yy_full_lp) = (yy_lp);1215 yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK; 1216 yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK; 1217 yy_full_match = yy_cp; 1218 yy_full_state = yy_state_ptr; 1219 yy_full_lp = yy_lp; 1367 1220 } 1368 1221 else 1369 1222 { 1370 (yy_full_match)= yy_cp;1371 (yy_full_state) = (yy_state_ptr);1372 (yy_full_lp) = (yy_lp);1223 yy_full_match = yy_cp; 1224 yy_full_state = yy_state_ptr; 1225 yy_full_lp = yy_lp; 1373 1226 break; 1374 1227 } 1375 ++ (yy_lp);1228 ++yy_lp; 1376 1229 goto find_rule; 1377 1230 } 1378 1231 --yy_cp; 1379 yy_current_state = *-- (yy_state_ptr);1380 (yy_lp)= yy_accept[yy_current_state];1232 yy_current_state = *--yy_state_ptr; 1233 yy_lp = yy_accept[yy_current_state]; 1381 1234 } 1382 1235 1383 1236 YY_DO_BEFORE_ACTION; 1384 1237 1385 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act])1238 if ( yy_act != YY_END_OF_BUFFER ) 1386 1239 { 1387 yy_size_t yyl;1388 for ( yyl = (yy_prev_more_offset); yyl < yyleng; ++yyl )1240 int yyl; 1241 for ( yyl = 0; yyl < yyleng; ++yyl ) 1389 1242 if ( yytext[yyl] == '\n' ) 1390 1391 yylineno++; 1392 ; 1243 ++yylineno; 1393 1244 } 1394 1245 1395 1246 do_action: /* This label is used only to access EOF actions. */ 1247 1396 1248 1397 1249 switch ( yy_act ) … … 1399 1251 case 1: 1400 1252 YY_RULE_SETUP 1401 #line 14 3"dt_lex.l"1253 #line 146 "dt_lex.l" 1402 1254 return (DT_KEY_AUTO); 1403 1255 YY_BREAK 1404 1256 case 2: 1405 1257 YY_RULE_SETUP 1406 #line 14 4"dt_lex.l"1258 #line 147 "dt_lex.l" 1407 1259 return (DT_KEY_BREAK); 1408 1260 YY_BREAK 1409 1261 case 3: 1410 1262 YY_RULE_SETUP 1411 #line 14 5"dt_lex.l"1263 #line 148 "dt_lex.l" 1412 1264 return (DT_KEY_CASE); 1413 1265 YY_BREAK 1414 1266 case 4: 1415 1267 YY_RULE_SETUP 1416 #line 14 6"dt_lex.l"1268 #line 149 "dt_lex.l" 1417 1269 return (DT_KEY_CHAR); 1418 1270 YY_BREAK 1419 1271 case 5: 1420 1272 YY_RULE_SETUP 1421 #line 1 47"dt_lex.l"1273 #line 150 "dt_lex.l" 1422 1274 return (DT_KEY_CONST); 1423 1275 YY_BREAK 1424 1276 case 6: 1425 1277 YY_RULE_SETUP 1426 #line 1 48"dt_lex.l"1278 #line 151 "dt_lex.l" 1427 1279 return (DT_KEY_CONTINUE); 1428 1280 YY_BREAK 1429 1281 case 7: 1430 1282 YY_RULE_SETUP 1431 #line 1 49"dt_lex.l"1283 #line 152 "dt_lex.l" 1432 1284 return (DT_KEY_COUNTER); 1433 1285 YY_BREAK 1434 1286 case 8: 1435 1287 YY_RULE_SETUP 1436 #line 15 0"dt_lex.l"1288 #line 153 "dt_lex.l" 1437 1289 return (DT_KEY_DEFAULT); 1438 1290 YY_BREAK 1439 1291 case 9: 1440 1292 YY_RULE_SETUP 1441 #line 15 1"dt_lex.l"1293 #line 154 "dt_lex.l" 1442 1294 return (DT_KEY_DO); 1443 1295 YY_BREAK 1444 1296 case 10: 1445 1297 YY_RULE_SETUP 1446 #line 15 2"dt_lex.l"1298 #line 155 "dt_lex.l" 1447 1299 return (DT_KEY_DOUBLE); 1448 1300 YY_BREAK 1449 1301 case 11: 1450 1302 YY_RULE_SETUP 1451 #line 15 3"dt_lex.l"1303 #line 156 "dt_lex.l" 1452 1304 return (DT_KEY_ELSE); 1453 1305 YY_BREAK 1454 1306 case 12: 1455 1307 YY_RULE_SETUP 1456 #line 15 4"dt_lex.l"1308 #line 157 "dt_lex.l" 1457 1309 return (DT_KEY_ENUM); 1458 1310 YY_BREAK 1459 1311 case 13: 1460 1312 YY_RULE_SETUP 1461 #line 15 5"dt_lex.l"1313 #line 158 "dt_lex.l" 1462 1314 return (DT_KEY_EXTERN); 1463 1315 YY_BREAK 1464 1316 case 14: 1465 1317 YY_RULE_SETUP 1466 #line 15 6"dt_lex.l"1318 #line 159 "dt_lex.l" 1467 1319 return (DT_KEY_FLOAT); 1468 1320 YY_BREAK 1469 1321 case 15: 1470 1322 YY_RULE_SETUP 1471 #line 1 57"dt_lex.l"1323 #line 160 "dt_lex.l" 1472 1324 return (DT_KEY_FOR); 1473 1325 YY_BREAK 1474 1326 case 16: 1475 1327 YY_RULE_SETUP 1476 #line 1 58"dt_lex.l"1328 #line 161 "dt_lex.l" 1477 1329 return (DT_KEY_GOTO); 1478 1330 YY_BREAK 1479 1331 case 17: 1480 1332 YY_RULE_SETUP 1481 #line 1 59"dt_lex.l"1333 #line 162 "dt_lex.l" 1482 1334 return (DT_KEY_IF); 1483 1335 YY_BREAK 1484 1336 case 18: 1485 1337 YY_RULE_SETUP 1486 #line 16 0"dt_lex.l"1338 #line 163 "dt_lex.l" 1487 1339 return (DT_KEY_IMPORT); 1488 1340 YY_BREAK 1489 1341 case 19: 1490 1342 YY_RULE_SETUP 1491 #line 16 1"dt_lex.l"1343 #line 164 "dt_lex.l" 1492 1344 return (DT_KEY_INLINE); 1493 1345 YY_BREAK 1494 1346 case 20: 1495 1347 YY_RULE_SETUP 1496 #line 16 2"dt_lex.l"1348 #line 165 "dt_lex.l" 1497 1349 return (DT_KEY_INT); 1498 1350 YY_BREAK 1499 1351 case 21: 1500 1352 YY_RULE_SETUP 1501 #line 16 3"dt_lex.l"1353 #line 166 "dt_lex.l" 1502 1354 return (DT_KEY_LONG); 1503 1355 YY_BREAK 1504 1356 case 22: 1505 1357 YY_RULE_SETUP 1506 #line 16 4"dt_lex.l"1358 #line 167 "dt_lex.l" 1507 1359 return (DT_TOK_OFFSETOF); 1508 1360 YY_BREAK 1509 1361 case 23: 1510 1362 YY_RULE_SETUP 1511 #line 16 5"dt_lex.l"1363 #line 168 "dt_lex.l" 1512 1364 return (DT_KEY_PROBE); 1513 1365 YY_BREAK 1514 1366 case 24: 1515 1367 YY_RULE_SETUP 1516 #line 16 6"dt_lex.l"1368 #line 169 "dt_lex.l" 1517 1369 return (DT_KEY_PROVIDER); 1518 1370 YY_BREAK 1519 1371 case 25: 1520 1372 YY_RULE_SETUP 1521 #line 1 67"dt_lex.l"1373 #line 170 "dt_lex.l" 1522 1374 return (DT_KEY_REGISTER); 1523 1375 YY_BREAK 1524 1376 case 26: 1525 1377 YY_RULE_SETUP 1526 #line 1 68"dt_lex.l"1378 #line 171 "dt_lex.l" 1527 1379 return (DT_KEY_RESTRICT); 1528 1380 YY_BREAK 1529 1381 case 27: 1530 1382 YY_RULE_SETUP 1531 #line 1 69"dt_lex.l"1383 #line 172 "dt_lex.l" 1532 1384 return (DT_KEY_RETURN); 1533 1385 YY_BREAK 1534 1386 case 28: 1535 1387 YY_RULE_SETUP 1536 #line 17 0"dt_lex.l"1388 #line 173 "dt_lex.l" 1537 1389 return (DT_KEY_SELF); 1538 1390 YY_BREAK 1539 1391 case 29: 1540 1392 YY_RULE_SETUP 1541 #line 17 1"dt_lex.l"1393 #line 174 "dt_lex.l" 1542 1394 return (DT_KEY_SHORT); 1543 1395 YY_BREAK 1544 1396 case 30: 1545 1397 YY_RULE_SETUP 1546 #line 17 2"dt_lex.l"1398 #line 175 "dt_lex.l" 1547 1399 return (DT_KEY_SIGNED); 1548 1400 YY_BREAK 1549 1401 case 31: 1550 1402 YY_RULE_SETUP 1551 #line 17 3"dt_lex.l"1403 #line 176 "dt_lex.l" 1552 1404 return (DT_TOK_SIZEOF); 1553 1405 YY_BREAK 1554 1406 case 32: 1555 1407 YY_RULE_SETUP 1556 #line 17 4"dt_lex.l"1408 #line 177 "dt_lex.l" 1557 1409 return (DT_KEY_STATIC); 1558 1410 YY_BREAK 1559 1411 case 33: 1560 1412 YY_RULE_SETUP 1561 #line 17 5"dt_lex.l"1413 #line 178 "dt_lex.l" 1562 1414 return (DT_KEY_STRING); 1563 1415 YY_BREAK 1564 1416 case 34: 1565 1417 YY_RULE_SETUP 1566 #line 17 6"dt_lex.l"1418 #line 179 "dt_lex.l" 1567 1419 return (DT_TOK_STRINGOF); 1568 1420 YY_BREAK 1569 1421 case 35: 1570 1422 YY_RULE_SETUP 1571 #line 1 77"dt_lex.l"1423 #line 180 "dt_lex.l" 1572 1424 return (DT_KEY_STRUCT); 1573 1425 YY_BREAK 1574 1426 case 36: 1575 1427 YY_RULE_SETUP 1576 #line 1 78"dt_lex.l"1428 #line 181 "dt_lex.l" 1577 1429 return (DT_KEY_SWITCH); 1578 1430 YY_BREAK 1579 1431 case 37: 1580 1432 YY_RULE_SETUP 1581 #line 1 79"dt_lex.l"1433 #line 182 "dt_lex.l" 1582 1434 return (DT_KEY_THIS); 1583 1435 YY_BREAK 1584 1436 case 38: 1585 1437 YY_RULE_SETUP 1586 #line 18 0"dt_lex.l"1438 #line 183 "dt_lex.l" 1587 1439 return (DT_KEY_XLATOR); 1588 1440 YY_BREAK 1589 1441 case 39: 1590 1442 YY_RULE_SETUP 1591 #line 18 1"dt_lex.l"1443 #line 184 "dt_lex.l" 1592 1444 return (DT_KEY_TYPEDEF); 1593 1445 YY_BREAK 1594 1446 case 40: 1595 1447 YY_RULE_SETUP 1596 #line 18 2"dt_lex.l"1448 #line 185 "dt_lex.l" 1597 1449 return (DT_KEY_UNION); 1598 1450 YY_BREAK 1599 1451 case 41: 1600 1452 YY_RULE_SETUP 1601 #line 18 3"dt_lex.l"1453 #line 186 "dt_lex.l" 1602 1454 return (DT_KEY_UNSIGNED); 1603 1455 YY_BREAK 1604 1456 case 42: 1605 1457 YY_RULE_SETUP 1606 #line 18 4"dt_lex.l"1458 #line 187 "dt_lex.l" 1607 1459 return (DT_KEY_VOID); 1608 1460 YY_BREAK 1609 1461 case 43: 1610 1462 YY_RULE_SETUP 1611 #line 18 5"dt_lex.l"1463 #line 188 "dt_lex.l" 1612 1464 return (DT_KEY_VOLATILE); 1613 1465 YY_BREAK 1614 1466 case 44: 1615 1467 YY_RULE_SETUP 1616 #line 18 6"dt_lex.l"1468 #line 189 "dt_lex.l" 1617 1469 return (DT_KEY_WHILE); 1618 1470 YY_BREAK 1619 1471 case 45: 1620 1472 YY_RULE_SETUP 1621 #line 1 87"dt_lex.l"1473 #line 190 "dt_lex.l" 1622 1474 return (DT_TOK_XLATE); 1623 1475 YY_BREAK 1624 1476 case 46: 1625 1477 YY_RULE_SETUP 1626 #line 1 89"dt_lex.l"1478 #line 192 "dt_lex.l" 1627 1479 { yybegin(YYS_EXPR); return (DT_KEY_AUTO); } 1628 1480 YY_BREAK 1629 1481 case 47: 1630 1482 YY_RULE_SETUP 1631 #line 19 0"dt_lex.l"1483 #line 193 "dt_lex.l" 1632 1484 { yybegin(YYS_EXPR); return (DT_KEY_CHAR); } 1633 1485 YY_BREAK 1634 1486 case 48: 1635 1487 YY_RULE_SETUP 1636 #line 19 1"dt_lex.l"1488 #line 194 "dt_lex.l" 1637 1489 { yybegin(YYS_EXPR); return (DT_KEY_CONST); } 1638 1490 YY_BREAK 1639 1491 case 49: 1640 1492 YY_RULE_SETUP 1641 #line 19 2"dt_lex.l"1493 #line 195 "dt_lex.l" 1642 1494 { yybegin(YYS_DEFINE); return (DT_KEY_COUNTER); } 1643 1495 YY_BREAK 1644 1496 case 50: 1645 1497 YY_RULE_SETUP 1646 #line 19 3"dt_lex.l"1498 #line 196 "dt_lex.l" 1647 1499 { yybegin(YYS_EXPR); return (DT_KEY_DOUBLE); } 1648 1500 YY_BREAK 1649 1501 case 51: 1650 1502 YY_RULE_SETUP 1651 #line 19 4"dt_lex.l"1503 #line 197 "dt_lex.l" 1652 1504 { yybegin(YYS_EXPR); return (DT_KEY_ENUM); } 1653 1505 YY_BREAK 1654 1506 case 52: 1655 1507 YY_RULE_SETUP 1656 #line 19 5"dt_lex.l"1508 #line 198 "dt_lex.l" 1657 1509 { yybegin(YYS_EXPR); return (DT_KEY_EXTERN); } 1658 1510 YY_BREAK 1659 1511 case 53: 1660 1512 YY_RULE_SETUP 1661 #line 19 6"dt_lex.l"1513 #line 199 "dt_lex.l" 1662 1514 { yybegin(YYS_EXPR); return (DT_KEY_FLOAT); } 1663 1515 YY_BREAK 1664 1516 case 54: 1665 1517 YY_RULE_SETUP 1666 #line 197"dt_lex.l"1518 #line 200 "dt_lex.l" 1667 1519 { yybegin(YYS_EXPR); return (DT_KEY_IMPORT); } 1668 1520 YY_BREAK 1669 1521 case 55: 1670 1522 YY_RULE_SETUP 1671 #line 198"dt_lex.l"1523 #line 201 "dt_lex.l" 1672 1524 { yybegin(YYS_DEFINE); return (DT_KEY_INLINE); } 1673 1525 YY_BREAK 1674 1526 case 56: 1675 1527 YY_RULE_SETUP 1676 #line 199"dt_lex.l"1528 #line 202 "dt_lex.l" 1677 1529 { yybegin(YYS_EXPR); return (DT_KEY_INT); } 1678 1530 YY_BREAK 1679 1531 case 57: 1680 1532 YY_RULE_SETUP 1681 #line 20 0"dt_lex.l"1533 #line 203 "dt_lex.l" 1682 1534 { yybegin(YYS_EXPR); return (DT_KEY_LONG); } 1683 1535 YY_BREAK 1684 1536 case 58: 1685 1537 YY_RULE_SETUP 1686 #line 20 1"dt_lex.l"1538 #line 204 "dt_lex.l" 1687 1539 { yybegin(YYS_DEFINE); return (DT_KEY_PROVIDER); } 1688 1540 YY_BREAK 1689 1541 case 59: 1690 1542 YY_RULE_SETUP 1691 #line 20 2"dt_lex.l"1543 #line 205 "dt_lex.l" 1692 1544 { yybegin(YYS_EXPR); return (DT_KEY_REGISTER); } 1693 1545 YY_BREAK 1694 1546 case 60: 1695 1547 YY_RULE_SETUP 1696 #line 20 3"dt_lex.l"1548 #line 206 "dt_lex.l" 1697 1549 { yybegin(YYS_EXPR); return (DT_KEY_RESTRICT); } 1698 1550 YY_BREAK 1699 1551 case 61: 1700 1552 YY_RULE_SETUP 1701 #line 20 4"dt_lex.l"1553 #line 207 "dt_lex.l" 1702 1554 { yybegin(YYS_EXPR); return (DT_KEY_SELF); } 1703 1555 YY_BREAK 1704 1556 case 62: 1705 1557 YY_RULE_SETUP 1706 #line 20 5"dt_lex.l"1558 #line 208 "dt_lex.l" 1707 1559 { yybegin(YYS_EXPR); return (DT_KEY_SHORT); } 1708 1560 YY_BREAK 1709 1561 case 63: 1710 1562 YY_RULE_SETUP 1711 #line 20 6"dt_lex.l"1563 #line 209 "dt_lex.l" 1712 1564 { yybegin(YYS_EXPR); return (DT_KEY_SIGNED); } 1713 1565 YY_BREAK 1714 1566 case 64: 1715 1567 YY_RULE_SETUP 1716 #line 2 07"dt_lex.l"1568 #line 210 "dt_lex.l" 1717 1569 { yybegin(YYS_EXPR); return (DT_KEY_STATIC); } 1718 1570 YY_BREAK 1719 1571 case 65: 1720 1572 YY_RULE_SETUP 1721 #line 2 08"dt_lex.l"1573 #line 211 "dt_lex.l" 1722 1574 { yybegin(YYS_EXPR); return (DT_KEY_STRING); } 1723 1575 YY_BREAK 1724 1576 case 66: 1725 1577 YY_RULE_SETUP 1726 #line 2 09"dt_lex.l"1578 #line 212 "dt_lex.l" 1727 1579 { yybegin(YYS_EXPR); return (DT_KEY_STRUCT); } 1728 1580 YY_BREAK 1729 1581 case 67: 1730 1582 YY_RULE_SETUP 1731 #line 21 0"dt_lex.l"1583 #line 213 "dt_lex.l" 1732 1584 { yybegin(YYS_EXPR); return (DT_KEY_THIS); } 1733 1585 YY_BREAK 1734 1586 case 68: 1735 1587 YY_RULE_SETUP 1736 #line 21 1"dt_lex.l"1588 #line 214 "dt_lex.l" 1737 1589 { yybegin(YYS_DEFINE); return (DT_KEY_XLATOR); } 1738 1590 YY_BREAK 1739 1591 case 69: 1740 1592 YY_RULE_SETUP 1741 #line 21 2"dt_lex.l"1593 #line 215 "dt_lex.l" 1742 1594 { yybegin(YYS_EXPR); return (DT_KEY_TYPEDEF); } 1743 1595 YY_BREAK 1744 1596 case 70: 1745 1597 YY_RULE_SETUP 1746 #line 21 3"dt_lex.l"1598 #line 216 "dt_lex.l" 1747 1599 { yybegin(YYS_EXPR); return (DT_KEY_UNION); } 1748 1600 YY_BREAK 1749 1601 case 71: 1750 1602 YY_RULE_SETUP 1751 #line 21 4"dt_lex.l"1603 #line 217 "dt_lex.l" 1752 1604 { yybegin(YYS_EXPR); return (DT_KEY_UNSIGNED); } 1753 1605 YY_BREAK 1754 1606 case 72: 1755 1607 YY_RULE_SETUP 1756 #line 21 5"dt_lex.l"1608 #line 218 "dt_lex.l" 1757 1609 { yybegin(YYS_EXPR); return (DT_KEY_VOID); } 1758 1610 YY_BREAK 1759 1611 case 73: 1760 1612 YY_RULE_SETUP 1761 #line 21 6"dt_lex.l"1613 #line 219 "dt_lex.l" 1762 1614 { yybegin(YYS_EXPR); return (DT_KEY_VOLATILE); } 1763 1615 YY_BREAK 1764 1616 case 74: 1765 1617 YY_RULE_SETUP 1766 #line 2 18"dt_lex.l"1618 #line 221 "dt_lex.l" 1767 1619 { 1768 1620 int i = atoi(yytext + 2); … … 1797 1649 case 75: 1798 1650 YY_RULE_SETUP 1799 #line 2 48"dt_lex.l"1651 #line 251 "dt_lex.l" 1800 1652 { 1801 1653 int i = atoi(yytext + 1); … … 1881 1733 case 76: 1882 1734 YY_RULE_SETUP 1883 #line 3 29"dt_lex.l"1735 #line 332 "dt_lex.l" 1884 1736 { 1885 1737 dt_ident_t *idp = dt_idhash_lookup( … … 1906 1758 case 77: 1907 1759 YY_RULE_SETUP 1908 #line 35 1"dt_lex.l"1760 #line 354 "dt_lex.l" 1909 1761 { 1910 1762 dt_ident_t *idp = dt_idhash_lookup( … … 1930 1782 case 78: 1931 1783 YY_RULE_SETUP 1932 #line 37 2"dt_lex.l"1784 #line 375 "dt_lex.l" 1933 1785 { 1934 1786 return (id_or_type(yytext)); … … 1937 1789 case 79: 1938 1790 YY_RULE_SETUP 1939 #line 37 6"dt_lex.l"1791 #line 379 "dt_lex.l" 1940 1792 { 1941 1793 if ((yylval.l_str = strdup(yytext)) == NULL) … … 1946 1798 case 80: 1947 1799 YY_RULE_SETUP 1948 #line 38 2"dt_lex.l"1800 #line 385 "dt_lex.l" 1949 1801 { 1950 1802 if ((yylval.l_str = strdup("@_")) == NULL) … … 1954 1806 YY_BREAK 1955 1807 case 81: 1956 #line 3 89"dt_lex.l"1808 #line 392 "dt_lex.l" 1957 1809 case 82: 1958 #line 39 0"dt_lex.l"1810 #line 393 "dt_lex.l" 1959 1811 case 83: 1960 1812 YY_RULE_SETUP 1961 #line 39 0"dt_lex.l"1813 #line 393 "dt_lex.l" 1962 1814 { 1963 1815 char *p; … … 1995 1847 case 84: 1996 1848 YY_RULE_SETUP 1997 #line 42 3"dt_lex.l"1849 #line 426 "dt_lex.l" 1998 1850 yyerror("floating-point constants are not permitted\n"); 1999 1851 YY_BREAK … … 2004 1856 case 85: 2005 1857 YY_RULE_SETUP 2006 #line 4 29"dt_lex.l"1858 #line 432 "dt_lex.l" 2007 1859 xyerror(D_STR_NL, "newline encountered in string literal"); 2008 1860 YY_BREAK 2009 1861 case 86: 2010 #line 43 2"dt_lex.l"1862 #line 435 "dt_lex.l" 2011 1863 case 87: 2012 1864 YY_RULE_SETUP 2013 #line 43 2"dt_lex.l"1865 #line 435 "dt_lex.l" 2014 1866 { 2015 1867 /* … … 2032 1884 case 88: 2033 1885 YY_RULE_SETUP 2034 #line 45 0"dt_lex.l"1886 #line 453 "dt_lex.l" 2035 1887 xyerror(D_CHR_NL, "newline encountered in character constant"); 2036 1888 YY_BREAK 2037 1889 case 89: 2038 1890 YY_RULE_SETUP 2039 #line 45 2"dt_lex.l"1891 #line 455 "dt_lex.l" 2040 1892 { 2041 1893 char *s, *p, *q; … … 2073 1925 YY_BREAK 2074 1926 case 90: 2075 #line 4 87"dt_lex.l"1927 #line 490 "dt_lex.l" 2076 1928 case 91: 2077 1929 YY_RULE_SETUP 2078 #line 4 87"dt_lex.l"1930 #line 490 "dt_lex.l" 2079 1931 { 2080 1932 yypcb->pcb_cstate = (YYSTATE); … … 2083 1935 YY_BREAK 2084 1936 case 92: 2085 #line 49 3"dt_lex.l"1937 #line 496 "dt_lex.l" 2086 1938 case 93: 2087 1939 YY_RULE_SETUP 2088 #line 49 3"dt_lex.l"1940 #line 496 "dt_lex.l" 2089 1941 ; /* discard any #! lines */ 2090 1942 YY_BREAK 2091 1943 case 94: 2092 #line 49 6"dt_lex.l"1944 #line 499 "dt_lex.l" 2093 1945 case 95: 2094 #line 497"dt_lex.l"1946 #line 500 "dt_lex.l" 2095 1947 case 96: 2096 1948 YY_RULE_SETUP 2097 #line 497"dt_lex.l"1949 #line 500 "dt_lex.l" 2098 1950 { 2099 1951 assert(yypragma == NULL); … … 2104 1956 case 97: 2105 1957 YY_RULE_SETUP 2106 #line 50 3"dt_lex.l"1958 #line 506 "dt_lex.l" 2107 1959 ; /* discard */ 2108 1960 YY_BREAK 2109 1961 case 98: 2110 /* rule 98 can match eol */ 2111 YY_RULE_SETUP 2112 #line 504 "dt_lex.l" 1962 YY_RULE_SETUP 1963 #line 507 "dt_lex.l" 2113 1964 ; /* discard */ 2114 1965 YY_BREAK 2115 1966 case 99: 2116 1967 YY_RULE_SETUP 2117 #line 50 6"dt_lex.l"1968 #line 509 "dt_lex.l" 2118 1969 { 2119 1970 int c, tok; … … 2152 2003 case 100: 2153 2004 YY_RULE_SETUP 2154 #line 54 0"dt_lex.l"2005 #line 543 "dt_lex.l" 2155 2006 { 2156 2007 yypcb->pcb_parens++; … … 2160 2011 case 101: 2161 2012 YY_RULE_SETUP 2162 #line 54 5"dt_lex.l"2013 #line 548 "dt_lex.l" 2163 2014 { 2164 2015 if (--yypcb->pcb_parens < 0) … … 2169 2020 case 102: 2170 2021 YY_RULE_SETUP 2171 #line 55 1"dt_lex.l"2022 #line 554 "dt_lex.l" 2172 2023 { 2173 2024 yypcb->pcb_brackets++; … … 2177 2028 case 103: 2178 2029 YY_RULE_SETUP 2179 #line 55 6"dt_lex.l"2030 #line 559 "dt_lex.l" 2180 2031 { 2181 2032 if (--yypcb->pcb_brackets < 0) … … 2185 2036 YY_BREAK 2186 2037 case 104: 2187 #line 56 3"dt_lex.l"2038 #line 566 "dt_lex.l" 2188 2039 case 105: 2189 2040 YY_RULE_SETUP 2190 #line 56 3"dt_lex.l"2041 #line 566 "dt_lex.l" 2191 2042 { 2192 2043 yypcb->pcb_braces++; … … 2196 2047 case 106: 2197 2048 YY_RULE_SETUP 2198 #line 5 68"dt_lex.l"2049 #line 571 "dt_lex.l" 2199 2050 { 2200 2051 if (--yypcb->pcb_braces < 0) … … 2205 2056 case 107: 2206 2057 YY_RULE_SETUP 2207 #line 57 4"dt_lex.l"2058 #line 577 "dt_lex.l" 2208 2059 return (DT_TOK_BOR); 2209 2060 YY_BREAK 2210 2061 case 108: 2211 2062 YY_RULE_SETUP 2212 #line 57 5"dt_lex.l"2063 #line 578 "dt_lex.l" 2213 2064 return (DT_TOK_XOR); 2214 2065 YY_BREAK 2215 2066 case 109: 2216 2067 YY_RULE_SETUP 2217 #line 57 6"dt_lex.l"2068 #line 579 "dt_lex.l" 2218 2069 return (DT_TOK_BAND); 2219 2070 YY_BREAK 2220 2071 case 110: 2221 2072 YY_RULE_SETUP 2222 #line 5 77"dt_lex.l"2073 #line 580 "dt_lex.l" 2223 2074 return (DT_TOK_LAND); 2224 2075 YY_BREAK 2225 2076 case 111: 2226 2077 YY_RULE_SETUP 2227 #line 5 78"dt_lex.l"2078 #line 581 "dt_lex.l" 2228 2079 return (DT_TOK_LXOR); 2229 2080 YY_BREAK 2230 2081 case 112: 2231 2082 YY_RULE_SETUP 2232 #line 5 79"dt_lex.l"2083 #line 582 "dt_lex.l" 2233 2084 return (DT_TOK_LOR); 2234 2085 YY_BREAK 2235 2086 case 113: 2236 2087 YY_RULE_SETUP 2237 #line 58 0"dt_lex.l"2088 #line 583 "dt_lex.l" 2238 2089 return (DT_TOK_EQU); 2239 2090 YY_BREAK 2240 2091 case 114: 2241 2092 YY_RULE_SETUP 2242 #line 58 1"dt_lex.l"2093 #line 584 "dt_lex.l" 2243 2094 return (DT_TOK_NEQ); 2244 2095 YY_BREAK 2245 2096 case 115: 2246 2097 YY_RULE_SETUP 2247 #line 58 2"dt_lex.l"2098 #line 585 "dt_lex.l" 2248 2099 return (DT_TOK_LT); 2249 2100 YY_BREAK 2250 2101 case 116: 2251 2102 YY_RULE_SETUP 2252 #line 58 3"dt_lex.l"2103 #line 586 "dt_lex.l" 2253 2104 return (DT_TOK_LE); 2254 2105 YY_BREAK 2255 2106 case 117: 2256 2107 YY_RULE_SETUP 2257 #line 58 4"dt_lex.l"2108 #line 587 "dt_lex.l" 2258 2109 return (DT_TOK_GT); 2259 2110 YY_BREAK 2260 2111 case 118: 2261 2112 YY_RULE_SETUP 2262 #line 58 5"dt_lex.l"2113 #line 588 "dt_lex.l" 2263 2114 return (DT_TOK_GE); 2264 2115 YY_BREAK 2265 2116 case 119: 2266 2117 YY_RULE_SETUP 2267 #line 58 6"dt_lex.l"2118 #line 589 "dt_lex.l" 2268 2119 return (DT_TOK_LSH); 2269 2120 YY_BREAK 2270 2121 case 120: 2271 2122 YY_RULE_SETUP 2272 #line 5 87"dt_lex.l"2123 #line 590 "dt_lex.l" 2273 2124 return (DT_TOK_RSH); 2274 2125 YY_BREAK 2275 2126 case 121: 2276 2127 YY_RULE_SETUP 2277 #line 5 88"dt_lex.l"2128 #line 591 "dt_lex.l" 2278 2129 return (DT_TOK_ADD); 2279 2130 YY_BREAK 2280 2131 case 122: 2281 2132 YY_RULE_SETUP 2282 #line 5 89"dt_lex.l"2133 #line 592 "dt_lex.l" 2283 2134 return (DT_TOK_SUB); 2284 2135 YY_BREAK 2285 2136 case 123: 2286 2137 YY_RULE_SETUP 2287 #line 59 0"dt_lex.l"2138 #line 593 "dt_lex.l" 2288 2139 return (DT_TOK_MUL); 2289 2140 YY_BREAK 2290 2141 case 124: 2291 2142 YY_RULE_SETUP 2292 #line 59 1"dt_lex.l"2143 #line 594 "dt_lex.l" 2293 2144 return (DT_TOK_MOD); 2294 2145 YY_BREAK 2295 2146 case 125: 2296 2147 YY_RULE_SETUP 2297 #line 59 2"dt_lex.l"2148 #line 595 "dt_lex.l" 2298 2149 return (DT_TOK_BNEG); 2299 2150 YY_BREAK 2300 2151 case 126: 2301 2152 YY_RULE_SETUP 2302 #line 59 3"dt_lex.l"2153 #line 596 "dt_lex.l" 2303 2154 return (DT_TOK_LNEG); 2304 2155 YY_BREAK 2305 2156 case 127: 2306 2157 YY_RULE_SETUP 2307 #line 59 4"dt_lex.l"2158 #line 597 "dt_lex.l" 2308 2159 return (DT_TOK_QUESTION); 2309 2160 YY_BREAK 2310 2161 case 128: 2311 2162 YY_RULE_SETUP 2312 #line 59 5"dt_lex.l"2163 #line 598 "dt_lex.l" 2313 2164 return (DT_TOK_COLON); 2314 2165 YY_BREAK 2315 2166 case 129: 2316 2167 YY_RULE_SETUP 2317 #line 59 6"dt_lex.l"2168 #line 599 "dt_lex.l" 2318 2169 return (DT_TOK_DOT); 2319 2170 YY_BREAK 2320 2171 case 130: 2321 2172 YY_RULE_SETUP 2322 #line 597"dt_lex.l"2173 #line 600 "dt_lex.l" 2323 2174 return (DT_TOK_PTR); 2324 2175 YY_BREAK 2325 2176 case 131: 2326 2177 YY_RULE_SETUP 2327 #line 598"dt_lex.l"2178 #line 601 "dt_lex.l" 2328 2179 return (DT_TOK_ASGN); 2329 2180 YY_BREAK 2330 2181 case 132: 2331 2182 YY_RULE_SETUP 2332 #line 599"dt_lex.l"2183 #line 602 "dt_lex.l" 2333 2184 return (DT_TOK_ADD_EQ); 2334 2185 YY_BREAK 2335 2186 case 133: 2336 2187 YY_RULE_SETUP 2337 #line 60 0"dt_lex.l"2188 #line 603 "dt_lex.l" 2338 2189 return (DT_TOK_SUB_EQ); 2339 2190 YY_BREAK 2340 2191 case 134: 2341 2192 YY_RULE_SETUP 2342 #line 60 1"dt_lex.l"2193 #line 604 "dt_lex.l" 2343 2194 return (DT_TOK_MUL_EQ); 2344 2195 YY_BREAK 2345 2196 case 135: 2346 2197 YY_RULE_SETUP 2347 #line 60 2"dt_lex.l"2198 #line 605 "dt_lex.l" 2348 2199 return (DT_TOK_DIV_EQ); 2349 2200 YY_BREAK 2350 2201 case 136: 2351 2202 YY_RULE_SETUP 2352 #line 60 3"dt_lex.l"2203 #line 606 "dt_lex.l" 2353 2204 return (DT_TOK_MOD_EQ); 2354 2205 YY_BREAK 2355 2206 case 137: 2356 2207 YY_RULE_SETUP 2357 #line 60 4"dt_lex.l"2208 #line 607 "dt_lex.l" 2358 2209 return (DT_TOK_AND_EQ); 2359 2210 YY_BREAK 2360 2211 case 138: 2361 2212 YY_RULE_SETUP 2362 #line 60 5"dt_lex.l"2213 #line 608 "dt_lex.l" 2363 2214 return (DT_TOK_XOR_EQ); 2364 2215 YY_BREAK 2365 2216 case 139: 2366 2217 YY_RULE_SETUP 2367 #line 60 6"dt_lex.l"2218 #line 609 "dt_lex.l" 2368 2219 return (DT_TOK_OR_EQ); 2369 2220 YY_BREAK 2370 2221 case 140: 2371 2222 YY_RULE_SETUP 2372 #line 6 07"dt_lex.l"2223 #line 610 "dt_lex.l" 2373 2224 return (DT_TOK_LSH_EQ); 2374 2225 YY_BREAK 2375 2226 case 141: 2376 2227 YY_RULE_SETUP 2377 #line 6 08"dt_lex.l"2228 #line 611 "dt_lex.l" 2378 2229 return (DT_TOK_RSH_EQ); 2379 2230 YY_BREAK 2380 2231 case 142: 2381 2232 YY_RULE_SETUP 2382 #line 6 09"dt_lex.l"2233 #line 612 "dt_lex.l" 2383 2234 return (DT_TOK_ADDADD); 2384 2235 YY_BREAK 2385 2236 case 143: 2386 2237 YY_RULE_SETUP 2387 #line 61 0"dt_lex.l"2238 #line 613 "dt_lex.l" 2388 2239 return (DT_TOK_SUBSUB); 2389 2240 YY_BREAK 2390 2241 case 144: 2391 2242 YY_RULE_SETUP 2392 #line 61 1"dt_lex.l"2243 #line 614 "dt_lex.l" 2393 2244 return (DT_TOK_ELLIPSIS); 2394 2245 YY_BREAK 2395 2246 case 145: 2396 2247 YY_RULE_SETUP 2397 #line 61 2"dt_lex.l"2248 #line 615 "dt_lex.l" 2398 2249 return (DT_TOK_COMMA); 2399 2250 YY_BREAK 2400 2251 case 146: 2401 2252 YY_RULE_SETUP 2402 #line 61 3"dt_lex.l"2253 #line 616 "dt_lex.l" 2403 2254 return (';'); 2404 2255 YY_BREAK 2405 2256 case 147: 2406 /* rule 147 can match eol */ 2407 YY_RULE_SETUP 2408 #line 614 "dt_lex.l" 2257 YY_RULE_SETUP 2258 #line 617 "dt_lex.l" 2409 2259 ; /* discard */ 2410 2260 YY_BREAK 2411 2261 case 148: 2412 /* rule 148 can match eol */ 2413 YY_RULE_SETUP 2414 #line 615 "dt_lex.l" 2262 YY_RULE_SETUP 2263 #line 618 "dt_lex.l" 2415 2264 ; /* discard */ 2416 2265 YY_BREAK 2417 2266 case 149: 2418 2267 YY_RULE_SETUP 2419 #line 61 6"dt_lex.l"2268 #line 619 "dt_lex.l" 2420 2269 yyerror("syntax error near \"%c\"\n", yytext[0]); 2421 2270 YY_BREAK 2422 2271 case 150: 2423 2272 YY_RULE_SETUP 2424 #line 6 18"dt_lex.l"2273 #line 621 "dt_lex.l" 2425 2274 yyerror("/* encountered inside a comment\n"); 2426 2275 YY_BREAK 2427 2276 case 151: 2428 2277 YY_RULE_SETUP 2429 #line 6 19"dt_lex.l"2278 #line 622 "dt_lex.l" 2430 2279 BEGIN(yypcb->pcb_cstate); 2431 2280 YY_BREAK 2432 2281 /* VBOX - START */ 2433 2282 case YY_STATE_EOF(S1): 2434 #line 62 1"dt_lex.l"2283 #line 624 "dt_lex.l" 2435 2284 yyerror("end-of-file encountered before matching */\n"); 2436 2285 YY_BREAK 2437 2286 /* VBOX - END */ 2438 2287 case 152: 2439 /* rule 152 can match eol */ 2440 YY_RULE_SETUP 2441 #line 623 "dt_lex.l" 2288 YY_RULE_SETUP 2289 #line 626 "dt_lex.l" 2442 2290 ; /* discard */ 2443 2291 YY_BREAK 2444 2292 case 153: 2445 2293 YY_RULE_SETUP 2446 #line 62 5"dt_lex.l"2294 #line 628 "dt_lex.l" 2447 2295 { 2448 2296 /* … … 2500 2348 case 154: 2501 2349 YY_RULE_SETUP 2502 #line 6 78"dt_lex.l"2350 #line 681 "dt_lex.l" 2503 2351 return (DT_TOK_DIV); 2504 2352 YY_BREAK 2505 2353 case 155: 2506 2354 YY_RULE_SETUP 2507 #line 6 79"dt_lex.l"2355 #line 682 "dt_lex.l" 2508 2356 return (DT_TOK_COMMA); 2509 2357 YY_BREAK 2510 2358 case 156: 2511 /* rule 156 can match eol */ 2512 YY_RULE_SETUP 2513 #line 681 "dt_lex.l" 2359 YY_RULE_SETUP 2360 #line 684 "dt_lex.l" 2514 2361 ; /* discard */ 2515 2362 YY_BREAK 2516 2363 case 157: 2517 2364 YY_RULE_SETUP 2518 #line 68 2"dt_lex.l"2365 #line 685 "dt_lex.l" 2519 2366 yyerror("syntax error near \"%c\"\n", yytext[0]); 2520 2367 YY_BREAK 2521 2368 case 158: 2522 /* rule 158 can match eol */ 2523 YY_RULE_SETUP 2524 #line 684 "dt_lex.l" 2369 YY_RULE_SETUP 2370 #line 687 "dt_lex.l" 2525 2371 { 2526 2372 dt_pragma(yypragma); … … 2531 2377 case 159: 2532 2378 YY_RULE_SETUP 2533 #line 69 0"dt_lex.l"2379 #line 693 "dt_lex.l" 2534 2380 ; /* discard */ 2535 2381 YY_BREAK 2536 2382 case 160: 2537 2383 YY_RULE_SETUP 2538 #line 69 2"dt_lex.l"2384 #line 695 "dt_lex.l" 2539 2385 { 2540 2386 dt_node_t *dnp; … … 2558 2404 /* VBOX - BEGIN */ 2559 2405 case YY_STATE_EOF(S3): 2560 #line 71 2"dt_lex.l"2406 #line 715 "dt_lex.l" 2561 2407 yyerror("end-of-file encountered before end of control line\n"); 2562 2408 YY_BREAK … … 2564 2410 case 161: 2565 2411 YY_RULE_SETUP 2566 #line 71 4"dt_lex.l"2412 #line 717 "dt_lex.l" 2567 2413 yyerror("syntax error near \"%c\"\n", yytext[0]); 2568 2414 YY_BREAK 2569 2415 case 162: 2570 2416 YY_RULE_SETUP 2571 #line 71 6"dt_lex.l"2417 #line 719 "dt_lex.l" 2572 2418 ECHO; 2573 2419 YY_BREAK 2574 #line 2 575"dt_lex.c"2420 #line 2421 "dt_lex.c" 2575 2421 case YY_STATE_EOF(INITIAL): 2576 2422 case YY_STATE_EOF(S0): … … 2582 2428 { 2583 2429 /* Amount of text matched not including the EOB char. */ 2584 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;2430 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 2585 2431 2586 2432 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 2587 *yy_cp = (yy_hold_char);2433 *yy_cp = yy_hold_char; 2588 2434 YY_RESTORE_YY_MORE_OFFSET 2589 2435 2590 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )2436 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 2591 2437 { 2592 2438 /* We're scanning a new file or input source. It's … … 2594 2440 * just pointed yyin at a new source and called 2595 2441 * yylex(). If so, then we have to assure 2596 * consistency between YY_CURRENT_BUFFERand our2442 * consistency between yy_current_buffer and our 2597 2443 * globals. Here is the right place to do so, because 2598 2444 * this is the first action (other than possibly a 2599 2445 * back-up) that will match for the new input source. 2600 2446 */ 2601 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;2602 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;2603 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;2447 yy_n_chars = yy_current_buffer->yy_n_chars; 2448 yy_current_buffer->yy_input_file = yyin; 2449 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 2604 2450 } 2605 2451 … … 2611 2457 * in input(). 2612 2458 */ 2613 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )2459 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 2614 2460 { /* This was really a NUL. */ 2615 2461 yy_state_type yy_next_state; 2616 2462 2617 (yy_c_buf_p) = (yytext_ptr)+ yy_amount_of_matched_text;2618 2619 yy_current_state = yy_get_previous_state( 2463 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 2464 2465 yy_current_state = yy_get_previous_state(); 2620 2466 2621 2467 /* Okay, we're now positioned to make the NUL … … 2630 2476 yy_next_state = yy_try_NUL_trans( yy_current_state ); 2631 2477 2632 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;2478 yy_bp = yytext_ptr + YY_MORE_ADJ; 2633 2479 2634 2480 if ( yy_next_state ) 2635 2481 { 2636 2482 /* Consume the NUL. */ 2637 yy_cp = ++ (yy_c_buf_p);2483 yy_cp = ++yy_c_buf_p; 2638 2484 yy_current_state = yy_next_state; 2639 2485 goto yy_match; … … 2642 2488 else 2643 2489 { 2644 yy_cp = (yy_c_buf_p);2490 yy_cp = yy_c_buf_p; 2645 2491 goto yy_find_action; 2646 2492 } 2647 2493 } 2648 2494 2649 else switch ( yy_get_next_buffer( 2495 else switch ( yy_get_next_buffer() ) 2650 2496 { 2651 2497 case EOB_ACT_END_OF_FILE: 2652 2498 { 2653 (yy_did_buffer_switch_on_eof)= 0;2654 2655 if ( yywrap( 2499 yy_did_buffer_switch_on_eof = 0; 2500 2501 if ( yywrap() ) 2656 2502 { 2657 2503 /* Note: because we've taken care in … … 2664 2510 * YY_NULL will get returned. 2665 2511 */ 2666 (yy_c_buf_p) = (yytext_ptr)+ YY_MORE_ADJ;2512 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 2667 2513 2668 2514 yy_act = YY_STATE_EOF(YY_START); … … 2672 2518 else 2673 2519 { 2674 if ( ! (yy_did_buffer_switch_on_eof))2520 if ( ! yy_did_buffer_switch_on_eof ) 2675 2521 YY_NEW_FILE; 2676 2522 } … … 2679 2525 2680 2526 case EOB_ACT_CONTINUE_SCAN: 2681 (yy_c_buf_p)=2682 (yytext_ptr)+ yy_amount_of_matched_text;2683 2684 yy_current_state = yy_get_previous_state( 2685 2686 yy_cp = (yy_c_buf_p);2687 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;2527 yy_c_buf_p = 2528 yytext_ptr + yy_amount_of_matched_text; 2529 2530 yy_current_state = yy_get_previous_state(); 2531 2532 yy_cp = yy_c_buf_p; 2533 yy_bp = yytext_ptr + YY_MORE_ADJ; 2688 2534 goto yy_match; 2689 2535 2690 2536 case EOB_ACT_LAST_MATCH: 2691 (yy_c_buf_p)=2692 & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];2693 2694 yy_current_state = yy_get_previous_state( 2695 2696 yy_cp = (yy_c_buf_p);2697 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;2537 yy_c_buf_p = 2538 &yy_current_buffer->yy_ch_buf[yy_n_chars]; 2539 2540 yy_current_state = yy_get_previous_state(); 2541 2542 yy_cp = yy_c_buf_p; 2543 yy_bp = yytext_ptr + YY_MORE_ADJ; 2698 2544 goto yy_find_action; 2699 2545 } … … 2706 2552 } /* end of action switch */ 2707 2553 } /* end of scanning one token */ 2708 } /* end of yylex */ 2554 } /* end of yylex */ 2555 2709 2556 2710 2557 /* yy_get_next_buffer - try to read in a new buffer … … 2715 2562 * EOB_ACT_END_OF_FILE - end of file 2716 2563 */ 2717 static int yy_get_next_buffer (void) 2718 { 2719 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 2720 register char *source = (yytext_ptr); 2564 2565 static int yy_get_next_buffer() 2566 { 2567 register char *dest = yy_current_buffer->yy_ch_buf; 2568 register char *source = yytext_ptr; 2721 2569 register int number_to_move, i; 2722 2570 int ret_val; 2723 2571 2724 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)+ 1] )2572 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 2725 2573 YY_FATAL_ERROR( 2726 2574 "fatal flex scanner internal error--end of buffer missed" ); 2727 2575 2728 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )2576 if ( yy_current_buffer->yy_fill_buffer == 0 ) 2729 2577 { /* Don't try to fill the buffer, so this is an EOF. */ 2730 if ( (yy_c_buf_p) - (yytext_ptr)- YY_MORE_ADJ == 1 )2578 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 2731 2579 { 2732 2580 /* We matched a single character, the EOB, so … … 2748 2596 2749 2597 /* First move last chars to start of buffer. */ 2750 number_to_move = (int) ( (yy_c_buf_p) - (yytext_ptr)) - 1;2598 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 2751 2599 2752 2600 for ( i = 0; i < number_to_move; ++i ) 2753 2601 *(dest++) = *(source++); 2754 2602 2755 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )2603 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 2756 2604 /* don't do the read, it's not guaranteed to return an EOF, 2757 2605 * just force an EOF 2758 2606 */ 2759 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars)= 0;2607 yy_current_buffer->yy_n_chars = yy_n_chars = 0; 2760 2608 2761 2609 else 2762 2610 { 2763 yy_size_t num_to_read =2764 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;2611 int num_to_read = 2612 yy_current_buffer->yy_buf_size - number_to_move - 1; 2765 2613 2766 2614 while ( num_to_read <= 0 ) 2767 2615 { /* Not enough room in the buffer - grow it. */ 2768 2616 #ifdef YY_USES_REJECT 2769 2617 YY_FATAL_ERROR( 2770 2618 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 2771 2619 #else 2620 2621 /* just a shorter name for the current buffer */ 2622 YY_BUFFER_STATE b = yy_current_buffer; 2623 2624 int yy_c_buf_p_offset = 2625 (int) (yy_c_buf_p - b->yy_ch_buf); 2626 2627 if ( b->yy_is_our_buffer ) 2628 { 2629 int new_size = b->yy_buf_size * 2; 2630 2631 if ( new_size <= 0 ) 2632 b->yy_buf_size += b->yy_buf_size / 8; 2633 else 2634 b->yy_buf_size *= 2; 2635 2636 b->yy_ch_buf = (char *) 2637 /* Include room in for 2 EOB chars. */ 2638 yy_flex_realloc( (void *) b->yy_ch_buf, 2639 b->yy_buf_size + 2 ); 2640 } 2641 else 2642 /* Can't grow it, we don't own it. */ 2643 b->yy_ch_buf = 0; 2644 2645 if ( ! b->yy_ch_buf ) 2646 YY_FATAL_ERROR( 2647 "fatal error - scanner input buffer overflow" ); 2648 2649 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 2650 2651 num_to_read = yy_current_buffer->yy_buf_size - 2652 number_to_move - 1; 2653 #endif 2772 2654 } 2773 2655 … … 2776 2658 2777 2659 /* Read in more data. */ 2778 YY_INPUT( (& YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),2779 (yy_n_chars), num_to_read );2780 2781 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);2660 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 2661 yy_n_chars, num_to_read ); 2662 2663 yy_current_buffer->yy_n_chars = yy_n_chars; 2782 2664 } 2783 2665 2784 if ( (yy_n_chars)== 0 )2666 if ( yy_n_chars == 0 ) 2785 2667 { 2786 2668 if ( number_to_move == YY_MORE_ADJ ) 2787 2669 { 2788 2670 ret_val = EOB_ACT_END_OF_FILE; 2789 yyrestart( yyin);2671 yyrestart( yyin ); 2790 2672 } 2791 2673 … … 2793 2675 { 2794 2676 ret_val = EOB_ACT_LAST_MATCH; 2795 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =2677 yy_current_buffer->yy_buffer_status = 2796 2678 YY_BUFFER_EOF_PENDING; 2797 2679 } … … 2801 2683 ret_val = EOB_ACT_CONTINUE_SCAN; 2802 2684 2803 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { 2804 /* Extend the array by 50%, plus the number we really need. */ 2805 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); 2806 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); 2807 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 2808 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 2685 yy_n_chars += number_to_move; 2686 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 2687 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 2688 2689 yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 2690 2691 return ret_val; 2809 2692 } 2810 2693 2811 (yy_n_chars) += number_to_move;2812 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;2813 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;2814 2815 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];2816 2817 return ret_val;2818 }2819 2694 2820 2695 /* yy_get_previous_state - get the state just before the EOB char was reached */ 2821 2696 2822 static yy_state_type yy_get_previous_state (void)2823 {2697 static yy_state_type yy_get_previous_state() 2698 { 2824 2699 register yy_state_type yy_current_state; 2825 2700 register char *yy_cp; 2826 2827 yy_current_state = (yy_start);2701 2702 yy_current_state = yy_start; 2828 2703 yy_current_state += YY_AT_BOL(); 2829 2830 (yy_state_ptr) = (yy_state_buf); 2831 *(yy_state_ptr)++ = yy_current_state; 2832 2833 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 2704 yy_state_ptr = yy_state_buf; 2705 *yy_state_ptr++ = yy_current_state; 2706 2707 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 2834 2708 { 2835 2709 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); … … 2841 2715 } 2842 2716 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 2843 * (yy_state_ptr)++ = yy_current_state;2717 *yy_state_ptr++ = yy_current_state; 2844 2718 } 2845 2719 2846 2720 return yy_current_state; 2847 } 2721 } 2722 2848 2723 2849 2724 /* yy_try_NUL_trans - try to make a transition on the NUL character … … 2852 2727 * next_state = yy_try_NUL_trans( current_state ); 2853 2728 */ 2854 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 2855 { 2729 2730 #ifdef YY_USE_PROTOS 2731 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 2732 #else 2733 static yy_state_type yy_try_NUL_trans( yy_current_state ) 2734 yy_state_type yy_current_state; 2735 #endif 2736 { 2856 2737 register int yy_is_jam; 2857 2738 2858 2739 register YY_CHAR yy_c = 1; 2859 2740 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) … … 2866 2747 yy_is_jam = (yy_current_state == 509); 2867 2748 if ( ! yy_is_jam ) 2868 * (yy_state_ptr)++ = yy_current_state;2749 *yy_state_ptr++ = yy_current_state; 2869 2750 2870 2751 return yy_is_jam ? 0 : yy_current_state; 2871 } 2872 2873 static void yyunput (int c, register char * yy_bp ) 2874 { 2875 register char *yy_cp; 2876 2877 yy_cp = (yy_c_buf_p); 2752 } 2753 2754 2755 #ifndef YY_NO_UNPUT 2756 #ifdef YY_USE_PROTOS 2757 static void yyunput( int c, register char *yy_bp ) 2758 #else 2759 static void yyunput( c, yy_bp ) 2760 int c; 2761 register char *yy_bp; 2762 #endif 2763 { 2764 register char *yy_cp = yy_c_buf_p; 2878 2765 2879 2766 /* undo effects of setting up yytext */ 2880 *yy_cp = (yy_hold_char);2881 2882 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )2767 *yy_cp = yy_hold_char; 2768 2769 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 2883 2770 { /* need to shift things up to make room */ 2884 2771 /* +2 for EOB chars. */ 2885 register yy_size_t number_to_move = (yy_n_chars)+ 2;2886 register char *dest = & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[2887 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];2772 register int number_to_move = yy_n_chars + 2; 2773 register char *dest = &yy_current_buffer->yy_ch_buf[ 2774 yy_current_buffer->yy_buf_size + 2]; 2888 2775 register char *source = 2889 & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];2890 2891 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )2776 &yy_current_buffer->yy_ch_buf[number_to_move]; 2777 2778 while ( source > yy_current_buffer->yy_ch_buf ) 2892 2779 *--dest = *--source; 2893 2780 2894 2781 yy_cp += (int) (dest - source); 2895 2782 yy_bp += (int) (dest - source); 2896 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =2897 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;2898 2899 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )2783 yy_current_buffer->yy_n_chars = 2784 yy_n_chars = yy_current_buffer->yy_buf_size; 2785 2786 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 2900 2787 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 2901 2788 } … … 2903 2790 *--yy_cp = (char) c; 2904 2791 2905 if ( c == '\n' ){ 2906 2907 } 2908 2909 (yytext_ptr) = yy_bp;2910 (yy_hold_char) = *yy_cp;2911 (yy_c_buf_p) = yy_cp;2912 } 2913 2914 #ifndef YY_NO_INPUT 2792 if ( c == '\n' ) 2793 --yylineno; 2794 2795 yytext_ptr = yy_bp; 2796 yy_hold_char = *yy_cp; 2797 yy_c_buf_p = yy_cp; 2798 } 2799 #endif /* ifndef YY_NO_UNPUT */ 2800 2801 2915 2802 #ifdef __cplusplus 2916 static int yyinput (void) 2917 #else 2918 static int input (void) 2919 #endif 2920 2921 { 2803 static int yyinput() 2804 #else 2805 static int input() 2806 #endif 2807 { 2922 2808 int c; 2923 2924 * (yy_c_buf_p) = (yy_hold_char);2925 2926 if ( * (yy_c_buf_p)== YY_END_OF_BUFFER_CHAR )2809 2810 *yy_c_buf_p = yy_hold_char; 2811 2812 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 2927 2813 { 2928 2814 /* yy_c_buf_p now points to the character we want to return. … … 2930 2816 * valid NUL; if not, then we've hit the end of the buffer. 2931 2817 */ 2932 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )2818 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 2933 2819 /* This was really a NUL. */ 2934 * (yy_c_buf_p)= '\0';2820 *yy_c_buf_p = '\0'; 2935 2821 2936 2822 else 2937 2823 { /* need more input */ 2938 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);2939 ++ (yy_c_buf_p);2940 2941 switch ( yy_get_next_buffer( 2824 int offset = yy_c_buf_p - yytext_ptr; 2825 ++yy_c_buf_p; 2826 2827 switch ( yy_get_next_buffer() ) 2942 2828 { 2943 2829 case EOB_ACT_LAST_MATCH: … … 2953 2839 2954 2840 /* Reset buffer status. */ 2955 yyrestart( yyin );2956 2957 /* FALLTHROUGH*/2841 yyrestart( yyin ); 2842 2843 /* fall through */ 2958 2844 2959 2845 case EOB_ACT_END_OF_FILE: 2960 2846 { 2961 if ( yywrap( 2962 return 0;2963 2964 if ( ! (yy_did_buffer_switch_on_eof))2847 if ( yywrap() ) 2848 return EOF; 2849 2850 if ( ! yy_did_buffer_switch_on_eof ) 2965 2851 YY_NEW_FILE; 2966 2852 #ifdef __cplusplus … … 2972 2858 2973 2859 case EOB_ACT_CONTINUE_SCAN: 2974 (yy_c_buf_p) = (yytext_ptr)+ offset;2860 yy_c_buf_p = yytext_ptr + offset; 2975 2861 break; 2976 2862 } … … 2978 2864 } 2979 2865 2980 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 2981 *(yy_c_buf_p) = '\0'; /* preserve yytext */ 2982 (yy_hold_char) = *++(yy_c_buf_p); 2983 2984 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); 2985 if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol ) 2986 2987 yylineno++; 2988 ; 2866 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 2867 *yy_c_buf_p = '\0'; /* preserve yytext */ 2868 yy_hold_char = *++yy_c_buf_p; 2869 2870 yy_current_buffer->yy_at_bol = (c == '\n'); 2871 if ( yy_current_buffer->yy_at_bol ) 2872 ++yylineno; 2989 2873 2990 2874 return c; 2991 }2992 #endif /* ifndef YY_NO_INPUT */2993 2994 /** Immediately switch to a different input stream.2995 * @param input_file A readable stream.2996 *2997 * @note This function does not reset the start condition to @c INITIAL .2998 */2999 void yyrestart (FILE * input_file )3000 {3001 3002 if ( ! YY_CURRENT_BUFFER ){3003 yyensure_buffer_stack ();3004 YY_CURRENT_BUFFER_LVALUE =3005 yy_create_buffer(yyin,YY_BUF_SIZE );3006 2875 } 3007 2876 3008 yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 3009 yy_load_buffer_state( ); 3010 } 3011 3012 /** Switch to a different input buffer. 3013 * @param new_buffer The new input buffer. 3014 * 3015 */ 3016 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 3017 { 3018 3019 /* TODO. We should be able to replace this entire function body 3020 * with 3021 * yypop_buffer_state(); 3022 * yypush_buffer_state(new_buffer); 3023 */ 3024 yyensure_buffer_stack (); 3025 if ( YY_CURRENT_BUFFER == new_buffer ) 2877 2878 #ifdef YY_USE_PROTOS 2879 void yyrestart( FILE *input_file ) 2880 #else 2881 void yyrestart( input_file ) 2882 FILE *input_file; 2883 #endif 2884 { 2885 if ( ! yy_current_buffer ) 2886 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 2887 2888 yy_init_buffer( yy_current_buffer, input_file ); 2889 yy_load_buffer_state(); 2890 } 2891 2892 2893 #ifdef YY_USE_PROTOS 2894 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 2895 #else 2896 void yy_switch_to_buffer( new_buffer ) 2897 YY_BUFFER_STATE new_buffer; 2898 #endif 2899 { 2900 if ( yy_current_buffer == new_buffer ) 3026 2901 return; 3027 2902 3028 if ( YY_CURRENT_BUFFER)2903 if ( yy_current_buffer ) 3029 2904 { 3030 2905 /* Flush out information for old buffer. */ 3031 * (yy_c_buf_p) = (yy_hold_char);3032 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);3033 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);2906 *yy_c_buf_p = yy_hold_char; 2907 yy_current_buffer->yy_buf_pos = yy_c_buf_p; 2908 yy_current_buffer->yy_n_chars = yy_n_chars; 3034 2909 } 3035 2910 3036 YY_CURRENT_BUFFER_LVALUE= new_buffer;3037 yy_load_buffer_state( 2911 yy_current_buffer = new_buffer; 2912 yy_load_buffer_state(); 3038 2913 3039 2914 /* We don't actually know whether we did this switch during … … 3042 2917 * to go ahead and always set it. 3043 2918 */ 3044 (yy_did_buffer_switch_on_eof) = 1; 3045 } 3046 3047 static void yy_load_buffer_state (void) 3048 { 3049 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 3050 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 3051 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 3052 (yy_hold_char) = *(yy_c_buf_p); 3053 } 3054 3055 /** Allocate and initialize an input buffer state. 3056 * @param file A readable stream. 3057 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 3058 * 3059 * @return the allocated buffer state. 3060 */ 3061 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) 3062 { 2919 yy_did_buffer_switch_on_eof = 1; 2920 } 2921 2922 2923 #ifdef YY_USE_PROTOS 2924 void yy_load_buffer_state( void ) 2925 #else 2926 void yy_load_buffer_state() 2927 #endif 2928 { 2929 yy_n_chars = yy_current_buffer->yy_n_chars; 2930 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 2931 yyin = yy_current_buffer->yy_input_file; 2932 yy_hold_char = *yy_c_buf_p; 2933 } 2934 2935 2936 #ifdef YY_USE_PROTOS 2937 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 2938 #else 2939 YY_BUFFER_STATE yy_create_buffer( file, size ) 2940 FILE *file; 2941 int size; 2942 #endif 2943 { 3063 2944 YY_BUFFER_STATE b; 3064 3065 b = (YY_BUFFER_STATE) yy alloc(sizeof( struct yy_buffer_state ));2945 2946 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 3066 2947 if ( ! b ) 3067 2948 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); … … 3072 2953 * we need to put in 2 end-of-buffer characters. 3073 2954 */ 3074 b->yy_ch_buf = (char *) yy alloc(b->yy_buf_size + 2);2955 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 3075 2956 if ( ! b->yy_ch_buf ) 3076 2957 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); … … 3078 2959 b->yy_is_our_buffer = 1; 3079 2960 3080 yy_init_buffer( b,file );2961 yy_init_buffer( b, file ); 3081 2962 3082 2963 return b; 3083 } 3084 3085 /** Destroy the buffer. 3086 * @param b a buffer created with yy_create_buffer() 3087 * 3088 */ 3089 void yy_delete_buffer (YY_BUFFER_STATE b ) 3090 { 3091 2964 } 2965 2966 2967 #ifdef YY_USE_PROTOS 2968 void yy_delete_buffer( YY_BUFFER_STATE b ) 2969 #else 2970 void yy_delete_buffer( b ) 2971 YY_BUFFER_STATE b; 2972 #endif 2973 { 3092 2974 if ( ! b ) 3093 2975 return; 3094 2976 3095 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */3096 YY_CURRENT_BUFFER_LVALUE= (YY_BUFFER_STATE) 0;2977 if ( b == yy_current_buffer ) 2978 yy_current_buffer = (YY_BUFFER_STATE) 0; 3097 2979 3098 2980 if ( b->yy_is_our_buffer ) 3099 yyfree((void *) b->yy_ch_buf ); 3100 3101 yyfree((void *) b ); 3102 } 3103 3104 #ifndef __cplusplus 3105 extern int isatty (int ); 3106 #endif /* __cplusplus */ 3107 3108 /* Initializes or reinitializes a buffer. 3109 * This function is sometimes called more than once on the same buffer, 3110 * such as during a yyrestart() or at EOF. 3111 */ 3112 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 3113 3114 { 3115 int oerrno = errno; 3116 3117 yy_flush_buffer(b ); 2981 yy_flex_free( (void *) b->yy_ch_buf ); 2982 2983 yy_flex_free( (void *) b ); 2984 } 2985 2986 2987 #ifndef YY_ALWAYS_INTERACTIVE 2988 #ifndef YY_NEVER_INTERACTIVE 2989 extern int isatty YY_PROTO(( int )); 2990 #endif 2991 #endif 2992 2993 #ifdef YY_USE_PROTOS 2994 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 2995 #else 2996 void yy_init_buffer( b, file ) 2997 YY_BUFFER_STATE b; 2998 FILE *file; 2999 #endif 3000 3001 3002 { 3003 yy_flush_buffer( b ); 3118 3004 3119 3005 b->yy_input_file = file; 3120 3006 b->yy_fill_buffer = 1; 3121 3007 3122 /* If b is the current buffer, then yy_init_buffer was _probably_ 3123 * called from yyrestart() or through yy_get_next_buffer. 3124 * In that case, we don't want to reset the lineno or column. 3125 */ 3126 if (b != YY_CURRENT_BUFFER){ 3127 b->yy_bs_lineno = 1; 3128 b->yy_bs_column =0;3129 } 3130 3131 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 3132 3133 errno = oerrno; 3134 } 3135 3136 /** Discard all buffered characters. On the next scan, YY_INPUT will be called. 3137 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 3138 * 3139 */ 3140 void yy_flush_buffer (YY_BUFFER_STATE b ) 3141 {3142 3008 #if YY_ALWAYS_INTERACTIVE 3009 b->yy_is_interactive = 1; 3010 #else 3011 #if YY_NEVER_INTERACTIVE 3012 b->yy_is_interactive = 0; 3013 #else 3014 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 3015 #endif 3016 #endif 3017 } 3018 3019 3020 #ifdef YY_USE_PROTOS 3021 void yy_flush_buffer( YY_BUFFER_STATE b ) 3022 #else 3023 void yy_flush_buffer( b ) 3024 YY_BUFFER_STATE b; 3025 #endif 3026 3027 { 3028 if ( ! b ) 3143 3029 return; 3144 3030 … … 3157 3043 b->yy_buffer_status = YY_BUFFER_NEW; 3158 3044 3159 if ( b == YY_CURRENT_BUFFER ) 3160 yy_load_buffer_state( ); 3161 } 3162 3163 /** Pushes the new state onto the stack. The new state becomes 3164 * the current state. This function will allocate the stack 3165 * if necessary. 3166 * @param new_buffer The new state. 3167 * 3168 */ 3169 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 3170 { 3171 if (new_buffer == NULL) 3172 return; 3173 3174 yyensure_buffer_stack(); 3175 3176 /* This block is copied from yy_switch_to_buffer. */ 3177 if ( YY_CURRENT_BUFFER ) 3178 { 3179 /* Flush out information for old buffer. */ 3180 *(yy_c_buf_p) = (yy_hold_char); 3181 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 3182 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 3183 } 3184 3185 /* Only push if top exists. Otherwise, replace top. */ 3186 if (YY_CURRENT_BUFFER) 3187 (yy_buffer_stack_top)++; 3188 YY_CURRENT_BUFFER_LVALUE = new_buffer; 3189 3190 /* copied from yy_switch_to_buffer. */ 3191 yy_load_buffer_state( ); 3192 (yy_did_buffer_switch_on_eof) = 1; 3193 } 3194 3195 /** Removes and deletes the top of the stack, if present. 3196 * The next element becomes the new top. 3197 * 3198 */ 3199 void yypop_buffer_state (void) 3200 { 3201 if (!YY_CURRENT_BUFFER) 3202 return; 3203 3204 yy_delete_buffer(YY_CURRENT_BUFFER ); 3205 YY_CURRENT_BUFFER_LVALUE = NULL; 3206 if ((yy_buffer_stack_top) > 0) 3207 --(yy_buffer_stack_top); 3208 3209 if (YY_CURRENT_BUFFER) { 3210 yy_load_buffer_state( ); 3211 (yy_did_buffer_switch_on_eof) = 1; 3045 if ( b == yy_current_buffer ) 3046 yy_load_buffer_state(); 3212 3047 } 3213 } 3214 3215 /* Allocates the stack if it does not exist. 3216 * Guarantees space for at least one push. 3217 */ 3218 static void yyensure_buffer_stack (void) 3219 { 3220 yy_size_t num_to_alloc; 3221 3222 if (!(yy_buffer_stack)) { 3223 3224 /* First allocation is just for 2 elements, since we don't know if this 3225 * scanner will even need a stack. We use 2 instead of 1 to avoid an 3226 * immediate realloc on the next call. 3227 */ 3228 num_to_alloc = 1; 3229 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 3230 (num_to_alloc * sizeof(struct yy_buffer_state*) 3231 ); 3232 if ( ! (yy_buffer_stack) ) 3233 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 3234 3235 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 3236 3237 (yy_buffer_stack_max) = num_to_alloc; 3238 (yy_buffer_stack_top) = 0; 3239 return; 3240 } 3241 3242 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 3243 3244 /* Increase the buffer to prepare for a possible push. */ 3245 int grow_size = 8 /* arbitrary grow size */; 3246 3247 num_to_alloc = (yy_buffer_stack_max) + grow_size; 3248 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 3249 ((yy_buffer_stack), 3250 num_to_alloc * sizeof(struct yy_buffer_state*) 3251 ); 3252 if ( ! (yy_buffer_stack) ) 3253 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 3254 3255 /* zero only the new slots.*/ 3256 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 3257 (yy_buffer_stack_max) = num_to_alloc; 3258 } 3259 } 3260 3261 /** Setup the input buffer state to scan directly from a user-specified character buffer. 3262 * @param base the character buffer 3263 * @param size the size in bytes of the character buffer 3264 * 3265 * @return the newly allocated buffer state object. 3266 */ 3267 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) 3268 { 3048 3049 3050 #ifndef YY_NO_SCAN_BUFFER 3051 #ifdef YY_USE_PROTOS 3052 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 3053 #else 3054 YY_BUFFER_STATE yy_scan_buffer( base, size ) 3055 char *base; 3056 yy_size_t size; 3057 #endif 3058 { 3269 3059 YY_BUFFER_STATE b; 3270 3060 3271 3061 if ( size < 2 || 3272 3062 base[size-2] != YY_END_OF_BUFFER_CHAR || … … 3275 3065 return 0; 3276 3066 3277 b = (YY_BUFFER_STATE) yy alloc(sizeof( struct yy_buffer_state ));3067 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 3278 3068 if ( ! b ) 3279 3069 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); … … 3289 3079 b->yy_buffer_status = YY_BUFFER_NEW; 3290 3080 3291 yy_switch_to_buffer( b);3081 yy_switch_to_buffer( b ); 3292 3082 3293 3083 return b; 3294 } 3295 3296 /** Setup the input buffer state to scan a string. The next call to yylex() will 3297 * scan from a @e copy of @a str. 3298 * @param yystr a NUL-terminated string to scan 3299 * 3300 * @return the newly allocated buffer state object. 3301 * @note If you want to scan bytes that may contain NUL values, then use 3302 * yy_scan_bytes() instead. 3303 */ 3304 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) 3305 { 3306 3307 return yy_scan_bytes(yystr,strlen(yystr) ); 3308 } 3309 3310 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 3311 * scan from a @e copy of @a bytes. 3312 * @param bytes the byte buffer to scan 3313 * @param len the number of bytes in the buffer pointed to by @a bytes. 3314 * 3315 * @return the newly allocated buffer state object. 3316 */ 3317 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) 3318 { 3084 } 3085 #endif 3086 3087 3088 #ifndef YY_NO_SCAN_STRING 3089 #ifdef YY_USE_PROTOS 3090 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 3091 #else 3092 YY_BUFFER_STATE yy_scan_string( yy_str ) 3093 yyconst char *yy_str; 3094 #endif 3095 { 3096 int len; 3097 for ( len = 0; yy_str[len]; ++len ) 3098 ; 3099 3100 return yy_scan_bytes( yy_str, len ); 3101 } 3102 #endif 3103 3104 3105 #ifndef YY_NO_SCAN_BYTES 3106 #ifdef YY_USE_PROTOS 3107 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 3108 #else 3109 YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 3110 yyconst char *bytes; 3111 int len; 3112 #endif 3113 { 3319 3114 YY_BUFFER_STATE b; 3320 3115 char *buf; 3321 yy_size_t n, i; 3322 3116 yy_size_t n; 3117 int i; 3118 3323 3119 /* Get memory for full buffer, including space for trailing EOB's. */ 3324 n = _yybytes_len + 2;3325 buf = (char *) yy alloc(n);3120 n = len + 2; 3121 buf = (char *) yy_flex_alloc( n ); 3326 3122 if ( ! buf ) 3327 3123 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 3328 3124 3329 for ( i = 0; i < _yybytes_len; ++i )3330 buf[i] = yybytes[i];3331 3332 buf[ _yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;3333 3334 b = yy_scan_buffer( buf,n );3125 for ( i = 0; i < len; ++i ) 3126 buf[i] = bytes[i]; 3127 3128 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 3129 3130 b = yy_scan_buffer( buf, n ); 3335 3131 if ( ! b ) 3336 3132 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); … … 3342 3138 3343 3139 return b; 3344 } 3140 } 3141 #endif 3142 3143 3144 #ifndef YY_NO_PUSH_STATE 3145 #ifdef YY_USE_PROTOS 3146 static void yy_push_state( int new_state ) 3147 #else 3148 static void yy_push_state( new_state ) 3149 int new_state; 3150 #endif 3151 { 3152 if ( yy_start_stack_ptr >= yy_start_stack_depth ) 3153 { 3154 yy_size_t new_size; 3155 3156 yy_start_stack_depth += YY_START_STACK_INCR; 3157 new_size = yy_start_stack_depth * sizeof( int ); 3158 3159 if ( ! yy_start_stack ) 3160 yy_start_stack = (int *) yy_flex_alloc( new_size ); 3161 3162 else 3163 yy_start_stack = (int *) yy_flex_realloc( 3164 (void *) yy_start_stack, new_size ); 3165 3166 if ( ! yy_start_stack ) 3167 YY_FATAL_ERROR( 3168 "out of memory expanding start-condition stack" ); 3169 } 3170 3171 yy_start_stack[yy_start_stack_ptr++] = YY_START; 3172 3173 BEGIN(new_state); 3174 } 3175 #endif 3176 3177 3178 #ifndef YY_NO_POP_STATE 3179 static void yy_pop_state() 3180 { 3181 if ( --yy_start_stack_ptr < 0 ) 3182 YY_FATAL_ERROR( "start-condition stack underflow" ); 3183 3184 BEGIN(yy_start_stack[yy_start_stack_ptr]); 3185 } 3186 #endif 3187 3188 3189 #ifndef YY_NO_TOP_STATE 3190 static int yy_top_state() 3191 { 3192 return yy_start_stack[yy_start_stack_ptr - 1]; 3193 } 3194 #endif 3345 3195 3346 3196 #ifndef YY_EXIT_FAILURE … … 3348 3198 #endif 3349 3199 3350 static void yy_fatal_error (yyconst char* msg ) 3351 { 3352 (void) fprintf( stderr, "%s\n", msg ); 3200 #ifdef YY_USE_PROTOS 3201 static void yy_fatal_error( yyconst char msg[] ) 3202 #else 3203 static void yy_fatal_error( msg ) 3204 char msg[]; 3205 #endif 3206 { 3207 (void) fprintf( stderr, "%s\n", msg ); 3353 3208 exit( YY_EXIT_FAILURE ); 3354 } 3209 } 3210 3211 3355 3212 3356 3213 /* Redefine yyless() so it works in section 3 code. */ … … 3361 3218 { \ 3362 3219 /* Undo effects of setting up yytext. */ \ 3363 int yyless_macro_arg = (n); \ 3364 YY_LESS_LINENO(yyless_macro_arg);\ 3365 yytext[yyleng] = (yy_hold_char); \ 3366 (yy_c_buf_p) = yytext + yyless_macro_arg; \ 3367 (yy_hold_char) = *(yy_c_buf_p); \ 3368 *(yy_c_buf_p) = '\0'; \ 3369 yyleng = yyless_macro_arg; \ 3220 yytext[yyleng] = yy_hold_char; \ 3221 yy_c_buf_p = yytext + n; \ 3222 yy_hold_char = *yy_c_buf_p; \ 3223 *yy_c_buf_p = '\0'; \ 3224 yyleng = n; \ 3370 3225 } \ 3371 3226 while ( 0 ) 3372 3227 3373 /* Accessor methods (get/set functions) to struct members. */ 3374 3375 /** Get the current line number. 3376 * 3377 */ 3378 int yyget_lineno (void) 3379 { 3380 3381 return yylineno; 3382 } 3383 3384 /** Get the input stream. 3385 * 3386 */ 3387 FILE *yyget_in (void) 3388 { 3389 return yyin; 3390 } 3391 3392 /** Get the output stream. 3393 * 3394 */ 3395 FILE *yyget_out (void) 3396 { 3397 return yyout; 3398 } 3399 3400 /** Get the length of the current token. 3401 * 3402 */ 3403 yy_size_t yyget_leng (void) 3404 { 3405 return yyleng; 3406 } 3407 3408 /** Get the current token. 3409 * 3410 */ 3411 3412 char *yyget_text (void) 3413 { 3414 return yytext; 3415 } 3416 3417 /** Set the current line number. 3418 * @param line_number 3419 * 3420 */ 3421 void yyset_lineno (int line_number ) 3422 { 3423 3424 yylineno = line_number; 3425 } 3426 3427 /** Set the input stream. This does not discard the current 3428 * input buffer. 3429 * @param in_str A readable stream. 3430 * 3431 * @see yy_switch_to_buffer 3432 */ 3433 void yyset_in (FILE * in_str ) 3434 { 3435 yyin = in_str ; 3436 } 3437 3438 void yyset_out (FILE * out_str ) 3439 { 3440 yyout = out_str ; 3441 } 3442 3443 int yyget_debug (void) 3444 { 3445 return yy_flex_debug; 3446 } 3447 3448 void yyset_debug (int bdebug ) 3449 { 3450 yy_flex_debug = bdebug ; 3451 } 3452 3453 static int yy_init_globals (void) 3454 { 3455 /* Initialization is the same as for the non-reentrant scanner. 3456 * This function is called from yylex_destroy(), so don't allocate here. 3457 */ 3458 3459 /* We do not touch yylineno unless the option is enabled. */ 3460 yylineno = 1; 3461 3462 (yy_buffer_stack) = 0; 3463 (yy_buffer_stack_top) = 0; 3464 (yy_buffer_stack_max) = 0; 3465 (yy_c_buf_p) = (char *) 0; 3466 (yy_init) = 0; 3467 (yy_start) = 0; 3468 3469 (yy_state_buf) = 0; 3470 (yy_state_ptr) = 0; 3471 (yy_full_match) = 0; 3472 (yy_lp) = 0; 3473 3474 /* Defined in main.c */ 3475 #ifdef YY_STDINIT 3476 yyin = stdin; 3477 yyout = stdout; 3478 #else 3479 yyin = (FILE *) 0; 3480 yyout = (FILE *) 0; 3481 #endif 3482 3483 /* For future reference: Set errno on error, since we are called by 3484 * yylex_init() 3485 */ 3486 return 0; 3487 } 3488 3489 /* yylex_destroy is for both reentrant and non-reentrant scanners. */ 3490 int yylex_destroy (void) 3491 { 3492 3493 /* Pop the buffer stack, destroying each element. */ 3494 while(YY_CURRENT_BUFFER){ 3495 yy_delete_buffer(YY_CURRENT_BUFFER ); 3496 YY_CURRENT_BUFFER_LVALUE = NULL; 3497 yypop_buffer_state(); 3498 } 3499 3500 /* Destroy the stack itself. */ 3501 yyfree((yy_buffer_stack) ); 3502 (yy_buffer_stack) = NULL; 3503 3504 yyfree ( (yy_state_buf) ); 3505 (yy_state_buf) = NULL; 3506 3507 /* Reset the globals. This is important in a non-reentrant scanner so the next time 3508 * yylex() is called, initialization will occur. */ 3509 yy_init_globals( ); 3510 3511 return 0; 3512 } 3513 3514 /* 3515 * Internal utility routines. 3516 */ 3228 3229 /* Internal utility routines. */ 3517 3230 3518 3231 #ifndef yytext_ptr 3519 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 3520 { 3232 #ifdef YY_USE_PROTOS 3233 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 3234 #else 3235 static void yy_flex_strncpy( s1, s2, n ) 3236 char *s1; 3237 yyconst char *s2; 3238 int n; 3239 #endif 3240 { 3521 3241 register int i; 3522 3242 for ( i = 0; i < n; ++i ) 3523 3243 s1[i] = s2[i]; 3524 }3244 } 3525 3245 #endif 3526 3246 3527 3247 #ifdef YY_NEED_STRLEN 3528 static int yy_flex_strlen (yyconst char * s ) 3529 { 3248 #ifdef YY_USE_PROTOS 3249 static int yy_flex_strlen( yyconst char *s ) 3250 #else 3251 static int yy_flex_strlen( s ) 3252 yyconst char *s; 3253 #endif 3254 { 3530 3255 register int n; 3531 3256 for ( n = 0; s[n]; ++n ) … … 3533 3258 3534 3259 return n; 3535 } 3536 #endif 3537 3538 void *yyalloc (yy_size_t size ) 3539 { 3260 } 3261 #endif 3262 3263 3264 #ifdef YY_USE_PROTOS 3265 static void *yy_flex_alloc( yy_size_t size ) 3266 #else 3267 static void *yy_flex_alloc( size ) 3268 yy_size_t size; 3269 #endif 3270 { 3540 3271 return (void *) malloc( size ); 3541 } 3542 3543 void *yyrealloc (void * ptr, yy_size_t size ) 3544 { 3272 } 3273 3274 #ifdef YY_USE_PROTOS 3275 static void *yy_flex_realloc( void *ptr, yy_size_t size ) 3276 #else 3277 static void *yy_flex_realloc( ptr, size ) 3278 void *ptr; 3279 yy_size_t size; 3280 #endif 3281 { 3545 3282 /* The cast to (char *) in the following accommodates both 3546 3283 * implementations that use char* generic pointers, and those … … 3551 3288 */ 3552 3289 return (void *) realloc( (char *) ptr, size ); 3553 } 3554 3555 void yyfree (void * ptr ) 3556 { 3557 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ 3558 } 3559 3560 #define YYTABLES_NAME "yytables" 3561 3562 #line 716 "dt_lex.l" 3563 3290 } 3291 3292 #ifdef YY_USE_PROTOS 3293 static void yy_flex_free( void *ptr ) 3294 #else 3295 static void yy_flex_free( ptr ) 3296 void *ptr; 3297 #endif 3298 { 3299 free( ptr ); 3300 } 3301 3302 #if YY_MAIN 3303 int main() 3304 { 3305 yylex(); 3306 return 0; 3307 } 3308 #endif 3309 #line 719 "dt_lex.l" 3564 3310 3565 3311 … … 3619 3365 yysptr = yysbuf; 3620 3366 #else 3621 yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));3367 yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); 3622 3368 #endif 3623 3369 } … … 3761 3507 3762 3508 #endif /* USING_FLEX */ 3763
Note:
See TracChangeset
for help on using the changeset viewer.