- Timestamp:
- 2014-09-24T14:03:02+02:00 (10 years ago)
- Location:
- branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/Makefile.lex
r4779 r4785 3 3 4 4 all: main.c fortran.c 5 YACC = bison6 5 7 6 main.c : convert.tab.c convert.yy.c -
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/SubLoopCreation.c
r4779 r4785 120 120 strcat(ligne,parcours->var->v_nomvar); 121 121 didvariableadded = 1; 122 122 } 123 123 parcours = parcours -> suiv; 124 124 } … … 131 131 strcat(ligne,parcours->var->v_nomvar); 132 132 didvariableadded = 1; 133 133 } 134 134 parcours = parcours -> suiv; 135 135 } … … 249 249 strcat(ligne,parcours->var->v_nomvar); 250 250 didvariableadded = 1; 251 251 } 252 252 parcours = parcours -> suiv; 253 253 } … … 331 331 332 332 AddUseAgrifUtilBeforeCall_0(fortran_out); 333 WriteArgumentDeclaration_beforecall(); 333 334 if ( functiondeclarationisdone == 0 ) WriteFunctionDeclaration(fortran_out, 0); 334 335 if ( !strcasecmp(subofagrifinitgrids,subroutinename) ) … … 378 379 if ( ImplicitNoneInSubroutine() == 1 ) fprintf(fortran_out, " implicit none\n"); 379 380 WriteLocalParamDeclaration(fortran_out); 381 WriteArgumentDeclaration_beforecall(); 380 382 if ( functiondeclarationisdone == 0 ) WriteFunctionDeclaration(fortran_out, 0); 381 383 /* WriteSubroutineDeclaration(0);*/ -
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/UtilListe.c
r4779 r4785 554 554 } 555 555 tmpvar -> suiv = newvar; 556 }556 } 557 557 else 558 558 { -
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/WorkWithParameterlist.c
r4779 r4785 49 49 if ( VariableIsParameter ) 50 50 List_GlobalParameter_Var = AddListvarToListvar(listin, List_GlobalParameter_Var, 1); 51 }52 51 } 53 52 -
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/WorkWithlistofmodulebysubroutine.c
r4779 r4785 299 299 } 300 300 } 301 }302 301 newmodule = newmodule ->suiv; 303 302 } -
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/WorkWithlistvarindoloop.c
r4779 r4785 615 615 { 616 616 Merge_Variables(parcours->var,parcours1->var); 617 } 617 618 else 618 619 { -
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/decl.h
r4779 r4785 251 251 int PrivateDeclare; /* Variable has been declared as PRIVATE */ 252 252 int ExternalDeclare; /* Variable has been declared as EXTERNAL */ 253 char InitialValueGiven[LONG_C];253 int InitialValueGiven; /* An initial value has been given */ 254 254 int Allocatabledeclare; 255 255 int Targetdeclare; … … 333 333 FILE *subloop; 334 334 FILE *module_declar; 335 FILE *module_declar_type;336 335 FILE *allocationagrif; 337 336 -
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/fortran.c
r4779 r4785 1206 1206 0, 0, 0, 275, 276, 0, 0, 0, 0, 331, 1207 1207 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1208 0, 0, 0, 0, 0, 0, 0, 0, 339, 340,1209 0, 347, 350, 349, 342, 343, 344, 341, 0, 403,1210 250, 247, 0, 279, 316, 318, 315, 281, 314, 280,1211 351, 249, 0, 0, 356, 357, 429, 0, 69, 101,1212 0, 355, 427, 0, 150, 0, 148, 0, 428, 0,1213 415, 414, 393, 538, 0, 540, 0, 417, 408, 35,1214 384, 0, 470, 468, 0, 456, 0, 0, 0, 0,1215 162, 0, 0, 138, 0, 53, 172, 173, 158, 143,1216 144, 170, 169, 234, 235, 108, 72, 52, 30, 15,1217 25, 0, 0, 11, 39, 22, 12, 0, 0, 55,1218 166, 127, 164, 0, 125, 0, 236, 120, 125, 165,1219 137, 0, 165, 0, 0, 0, 236, 154, 159, 0,1220 0, 0, 112, 50, 0, 177, 174, 209, 210, 0,1221 0, 0, 179, 0, 0, 178, 0, 16, 236, 368,1222 363, 37, 382, 381, 383, 164, 409, 407, 0, 0,1223 0, 421, 0, 442, 439, 444, 430, 0, 452, 506,1224 507, 485, 0, 0, 0, 0, 338, 0, 505, 492,1225 493, 453, 458, 462, 0, 484, 0, 454, 390, 0,1226 0, 432, 386, 0, 284, 277, 0, 0, 0, 0,1227 1208 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1228 1209 0, 0, 334, 329, 330, 0, 337, 340, 339, 333, … … 1773 1754 155, 156, 157, 158, 159, 0, 160, 0, 0, 0, 1774 1755 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1775 177, 0, 531, 0, 0, 0, 0, 0, 0, 149,1776 0, 178, 179, 0, 0, 0, 0, 180, 150, 151,1777 532, 0, 0, 0, 0, 0, 0, 181, 182, 0,1778 0, 183, 184, 185, 186, 0, 152, 153, 91, 0,1779 0, 154, 155, 156, 157, 187, 0, 0, 188, 0,1780 0, 0, 0, 158, 159, 160, 161, 162, 163, 164,1781 0, 165, 166, 167, 0, 0, 168, 169, 170, 0,1782 171, 172, 173, 174, 175, 0, 176, 0, 0, 0,1783 1756 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1784 1757 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … … 1793 1766 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1794 1767 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1795 0, 0, 0, 0, 0, 0, 0, 0, 177, 0,1796 650, 0, 0, 0, 0, 0, 0, 149, 0, 178,1797 179, 0, 0, 0, 0, 180, 150, 151, 0, 651,1798 0, 0, 0, 0, 0, 181, 182, 0, 0, 183,1799 184, 185, 186, 0, 152, 153, 91, 0, 0, 154,1800 155, 156, 157, 187, 0, 0, 188, 0, 0, 0,1801 0, 158, 159, 160, 161, 162, 163, 164, 0, 165,1802 166, 167, 0, 0, 168, 169, 170, 0, 171, 172,1803 173, 174, 175, 0, 176, 0, 0, 0, 0, 0,1804 1768 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1805 1769 0, 0, 472, 0, 0, 0, 0, 0, 132, 0, … … 1834 1798 159, 0, 160, 0, 0, 0, 0, 0, 0, 0, 1835 1799 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1836 0, 0, 0, 0, 177, 0, 633, 0, 0, 0,1837 0, 0, 0, 149, 0, 178, 179, 0, 0, 0,1838 0, 180, 150, 151, 0, 0, 0, 0, 0, 0,1839 0, 181, 182, 0, 0, 183, 184, 185, 186, 0,1840 152, 153, 91, 0, 0, 154, 155, 156, 157, 187,1841 0, 0, 188, 0, 0, 0, 0, 158, 159, 160,1842 161, 162, 163, 164, 0, 165, 166, 167, 0, 0,1843 168, 169, 170, 0, 171, 172, 173, 174, 175, 0,1844 176, 0, 0, 0, 0, 0, 0, 0, 0, 0,1845 1800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1846 1801 0, 0, 0, 0, 0, 0, 0, 0, 0, 615, … … 1865 1820 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1866 1821 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1867 0, 0, 177, 0, 655, 0, 0, 0, 0, 0,1868 0, 149, 0, 178, 179, 0, 0, 0, 0, 180,1869 150, 151, 0, 0, 0, 0, 0, 0, 0, 181,1870 182, 0, 0, 183, 184, 185, 186, 0, 152, 153,1871 91, 0, 0, 154, 155, 156, 157, 187, 0, 0,1872 188, 0, 0, 0, 0, 158, 159, 160, 161, 162,1873 163, 164, 0, 165, 166, 167, 0, 0, 168, 169,1874 170, 0, 171, 172, 173, 174, 175, 0, 176, 0,1875 1822 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1876 1823 0, 0, 0, 0, 0, 0, 0, 639, 0, 0, … … 1920 1867 0, 160, 0, 0, 0, 0, 0, 0, 0, 0, 1921 1868 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1922 0, 0, 0, 0, 0, 0, 177, 0, 0, 0,1923 0, 0, 0, 0, 0, 149, 0, 178, 179, 0,1924 0, 0, 0, 180, 150, 151, 532, 0, 0, 0,1925 0, 0, 0, 181, 182, 0, 0, 183, 184, 185,1926 186, 0, 152, 153, 91, 0, 0, 154, 155, 156,1927 157, 187, 0, 0, 748, 0, 0, 0, 0, 158,1928 159, 160, 161, 162, 163, 164, 0, 165, 166, 167,1929 0, 0, 168, 169, 170, 0, 171, 172, 173, 174,1930 175, 0, 176, 0, 0, 0, 0, 0, 0, 0,1931 1869 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1932 1870 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … … 1941 1879 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1942 1880 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1943 0, 0, 0, 0, 177, 0, 0, 0, 0, 0,1944 0, 0, 0, 149, 0, 178, 179, 0, 0, 0,1945 0, 180, 150, 151, 557, 0, 0, 0, 0, 0,1946 0, 181, 182, 0, 0, 183, 184, 185, 186, 0,1947 152, 153, 538, 0, 0, 154, 155, 156, 157, 187,1948 0, 0, 188, 0, 0, 0, 0, 158, 159, 160,1949 161, 162, 163, 164, 0, 165, 166, 167, 0, 0,1950 168, 169, 170, 0, 171, 172, 173, 174, 175, 0,1951 176, 0, 0, 0, 0, 0, 0, 0, 0, 0,1952 1881 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1953 1882 0, 0, 0, 132, 0, 0, 0, 0, 161, 0, … … 1961 1890 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1962 1891 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1963 0, 0, 177, 0, 0, 0, 0, 0, 0, 0,1964 0, 149, 0, 178, 179, 0, 0, 0, 0, 180,1965 150, 151, 532, 0, 0, 0, 0, 0, 0, 181,1966 182, 0, 0, 183, 184, 185, 186, 0, 152, 153,1967 91, 0, 0, 154, 155, 156, 157, 187, 0, 0,1968 188, 0, 0, 0, 0, 158, 159, 160, 161, 162,1969 163, 164, 0, 165, 166, 167, 0, 0, 168, 169,1970 170, 0, 171, 172, 173, 174, 175, 0, 176, 0,1971 1892 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1972 1893 0, 0, 132, 0, 0, 0, 0, 161, 0, 0, … … 2024 1945 156, 157, 158, 159, 0, 160, 0, 0, 0, 0, 2025 1946 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2026 0, 0, 0, 0, 177, 0, 0, 0, 0, 0,2027 0, 0, 0, 149, 0, 178, 179, 0, 0, 0,2028 0, 180, 150, 151, 0, 0, 0, 0, 0, 0,2029 0, 181, 182, 0, 0, 183, 184, 185, 186, 0,2030 152, 153, 91, 0, 0, 154, 155, 156, 157, 187,2031 0, 0, 188, 0, 0, 0, 0, 158, 159, 160,2032 161, 162, 163, 164, 0, 165, 166, 167, 0, 0,2033 168, 169, 170, 0, 171, 172, 173, 174, 175, 0,2034 176, 0, 0, 0, 0, 0, 0, 0, 0, 0,2035 1947 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2036 1948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … … 2045 1957 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2046 1958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2047 0, 0, 177, 0, 0, 0, 0, 0, 0, 0,2048 0, 149, 0, 178, 179, 0, 0, 0, 0, 180,2049 150, 151, 0, 0, 0, 0, 0, 0, 0, 181,2050 182, 0, 0, 183, 184, 185, 186, 0, 152, 153,2051 91, 0, 0, 154, 155, 156, 157, 187, 0, 0,2052 188, 0, 0, 0, 0, 158, 159, 160, 161, 162,2053 163, 164, 0, 165, 166, 167, 0, 0, 168, 169,2054 170, 0, 171, 172, 173, 174, 175, 0, 176, 0,2055 1959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2056 1960 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, … … 2074 1978 159, 0, 160, 0, 0, 0, 0, 0, 0, 0, 2075 1979 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2076 177, 0, 0, 0, 0, 0, 0, 0, 0, 149,2077 0, 178, 179, 0, 0, 0, 0, 180, 150, 151,2078 0, 0, 0, 0, 0, 0, 0, 181, 182, 0,2079 0, 183, 184, 185, 186, 0, 152, 153, 91, 0,2080 0, 154, 155, 156, 157, 187, 0, 0, 381, 0,2081 0, 0, 0, 158, 159, 160, 161, 162, 163, 164,2082 0, 165, 166, 167, 0, 0, 168, 169, 170, 0,2083 171, 172, 173, 174, 175, 0, 176, 0, 0, 0,2084 1980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2085 1981 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … … 2094 1990 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2095 1991 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2096 0, 0, 0, 0, 0, 0, 0, 0, 177, 0,2097 0, 0, 0, 0, 0, 0, 0, 149, 0, 178,2098 179, 0, 0, 0, 0, 180, 150, 151, 0, 0,2099 0, 0, 0, 0, 0, 181, 182, 0, 0, 183,2100 184, 185, 186, 0, 152, 153, 91, 0, 0, 154,2101 155, 156, 157, 444, 0, 0, 188, 0, 0, 0,2102 0, 158, 159, 160, 161, 162, 163, 164, 0, 165,2103 166, 167, 0, 0, 168, 169, 170, 0, 171, 172,2104 173, 174, 175, 0, 176, 0, 0, 0, 0, 0,2105 1992 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2106 1993 0, 0, 0, 0, 132, 0, 0, 0, 0, 161, … … 2448 2335 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2449 2336 -1, -1, -1, -1, 163, 164, 165, -1, -1, -1, 2450 -1, -1, -1, -1, -1, -1, -1, -1, 40, -1,2451 -1, -1, 44, 45, 46, 47, -1, -1, -1, -1,2452 -1, -1, -1, -1, 56, 57, 58, 59, 60, 61,2453 62, -1, 64, 65, 66, 180, -1, 69, 70, 71,2454 185, 186, 74, 75, 76, 77, -1, 79, -1, 131,2455 -1, -1, -1, -1, -1, -1, -1, -1, 12, -1,2456 142, 143, -1, -1, -1, -1, 148, 21, 22, -1,2457 -1, -1, -1, -1, -1, -1, 158, 159, -1, -1,2458 162, 163, 164, 165, -1, 39, 40, 169, -1, -1,2459 44, 45, 46, 47, 176, 185, 186, 179, -1, -1,2460 -1, -1, 56, 57, 58, 59, 60, 61, 62, -1,2461 64, 65, 66, -1, -1, 69, 70, 71, -1, 73,2462 74, 75, 76, 77, -1, 79, -1, -1, -1, -1,2463 -1, -1, -1, -1, -1, -1, -1, 169, -1, -1,2464 2337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2465 2338 -1, -1, -1, 163, 164, 165, 5, 6, 7, 8, -
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/fortran.y
r4779 r4785 275 275 %type <na> opt_signe 276 276 %type <na> filename 277 %type <na c> attribute277 %type <na> attribute 278 278 %type <na> complex_const 279 279 %type <na> begin_array … … 751 751 752 752 save : before_save varsave 753 | before_save 753 | before_save comblock varsave 754 754 | save opt_comma comblock opt_comma varsave 755 755 | save ',' varsave … … 1325 1325 InitialValueGiven = 2; 1326 1326 } 1327 | before_initial TOK_POINT_TO expr1328 {1329 if ( couldaddvariable == 1 )1330 {1331 strcpy(InitValue,$3);1332 strcpy(InitialValueGiven,"=>");1333 }1334 }1335 1327 ; 1336 1328 complex_const : -
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/main.c
r4779 r4785 1 /* A Bison parser, made by GNU Bison 2.7.12-4996. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. 6 7 This program is free software: you can redistribute it and/or modify 1 /* A Bison parser, made by GNU Bison 2.3. */ 2 3 /* Skeleton implementation for Bison's Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 Free Software Foundation, Inc. 7 8 This program is free software; you can redistribute it and/or modify 8 9 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation , either version 3 of the License, or10 (at your option)any later version.11 10 the Free Software Foundation; either version 2, or (at your option) 11 any later version. 12 12 13 This program is distributed in the hope that it will be useful, 13 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 16 GNU General Public License for more details. 16 17 17 18 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 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. */ 19 22 20 23 /* As a special exception, you may create a larger work that contains … … 27 30 Bison output files to be licensed under the GNU General Public 28 31 License without this special exception. 29 32 30 33 This special exception was added by the Free Software Foundation in 31 34 version 2.2 of Bison. */ … … 45 48 46 49 /* Bison version. */ 47 #define YYBISON_VERSION "2. 7.12-4996"50 #define YYBISON_VERSION "2.3" 48 51 49 52 /* Skeleton name. */ … … 53 56 #define YYPURE 0 54 57 55 /* Push parsers. */56 #define YY PUSH058 /* Using locations. */ 59 #define YYLSP_NEEDED 0 57 60 58 61 /* Substitute the variable and function names. */ … … 97 100 98 101 102 103 99 104 /* Copy the first part of user declarations. */ 100 /* Line 371 of yacc.c */101 105 #line 35 "convert.y" 102 106 … … 130 134 #endif 131 135 132 133 /* Enabling traces. */ 134 #ifndef YYDEBUG 135 # define YYDEBUG 0 136 #endif 137 #if YYDEBUG 138 extern int yydebug; 139 #endif 140 141 /* Tokens. */ 142 #ifndef YYTOKENTYPE 143 # define YYTOKENTYPE 144 /* Put the tokens into the symbol table, so that GDB and other debuggers 145 know about them. */ 146 enum yytokentype { 147 TOK_SEP = 258, 148 TOK_USE = 259, 149 TOK_MODULEMAIN = 260, 150 TOK_NOTGRIDDEP = 261, 151 TOK_USEITEM = 262, 152 TOK_NAME = 263, 153 TOK_PROBTYPE = 264 154 }; 155 #endif 156 136 /* Enabling the token table. */ 137 #ifndef YYTOKEN_TABLE 138 # define YYTOKEN_TABLE 0 139 #endif 157 140 158 141 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 159 142 typedef union YYSTYPE 160 143 #line 52 "convert.y" 161 144 { 162 145 char na[LONG_M]; 163 146 } … … 167 150 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 168 151 # define YYSTYPE_IS_DECLARED 1 169 #endif 170 171 extern YYSTYPE yylval; 172 173 #ifdef YYPARSE_PARAM 174 #if defined __STDC__ || defined __cplusplus 175 int yyparse (void *YYPARSE_PARAM); 176 #else 177 int yyparse (); 178 #endif 179 #else /* ! YYPARSE_PARAM */ 180 #if defined __STDC__ || defined __cplusplus 181 int yyparse (void); 182 #else 183 int yyparse (); 184 #endif 185 #endif /* ! YYPARSE_PARAM */ 152 # define YYSTYPE_IS_TRIVIAL 1 153 #endif 186 154 187 155 … … 189 157 /* Copy the second part of user declarations. */ 190 158 191 /* Line 390 of yacc.c */192 #line 159 "convert.tab.c"193 159 194 160 /* Line 216 of yacc.c. */ … … 246 212 # if ENABLE_NLS 247 213 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 248 # define YY_( Msgid) dgettext ("bison-runtime", Msgid)214 # define YY_(msgid) dgettext ("bison-runtime", msgid) 249 215 # endif 250 216 # endif 251 217 # ifndef YY_ 252 # define YY_(Msgid) Msgid 253 # endif 254 #endif 255 256 #ifndef __attribute__ 257 /* This feature is available in gcc versions 2.5 and later. */ 258 # if (! defined __GNUC__ || __GNUC__ < 2 \ 259 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) 260 # define __attribute__(Spec) /* empty */ 218 # define YY_(msgid) msgid 261 219 # endif 262 220 #endif … … 264 222 /* Suppress unused-variable warnings by "using" E. */ 265 223 #if ! defined lint || defined __GNUC__ 266 # define YYUSE( E) ((void) (E))224 # define YYUSE(e) ((void) (e)) 267 225 #else 268 # define YYUSE(E) /* empty */ 269 #endif 270 226 # define YYUSE(e) /* empty */ 227 #endif 271 228 272 229 /* Identity function, used to suppress warnings about constant conditions. */ 273 230 #ifndef lint 274 # define YYID( N) (N)231 # define YYID(n) (n) 275 232 #else 276 233 #if (defined __STDC__ || defined __C99__FUNC__ \ 277 234 || defined __cplusplus || defined _MSC_VER) 278 235 static int 279 YYID (int yyi)236 YYID (int i) 280 237 #else 281 238 static int 282 YYID ( yyi)283 int yyi;284 #endif 285 { 286 return yyi;239 YYID (i) 240 int i; 241 #endif 242 { 243 return i; 287 244 } 288 245 #endif … … 305 262 # else 306 263 # define YYSTACK_ALLOC alloca 307 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS&& (defined __STDC__ || defined __C99__FUNC__ \264 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 308 265 || defined __cplusplus || defined _MSC_VER) 309 266 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 310 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 311 # ifndef EXIT_SUCCESS 312 # define EXIT_SUCCESS 0 267 # ifndef _STDLIB_H 268 # define _STDLIB_H 1 313 269 # endif 314 270 # endif … … 333 289 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 334 290 # endif 335 # if (defined __cplusplus && ! defined EXIT_SUCCESS\291 # if (defined __cplusplus && ! defined _STDLIB_H \ 336 292 && ! ((defined YYMALLOC || defined malloc) \ 337 293 && (defined YYFREE || defined free))) 338 294 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 339 # ifndef EXIT_SUCCESS340 # define EXIT_SUCCESS 0295 # ifndef _STDLIB_H 296 # define _STDLIB_H 1 341 297 # endif 342 298 # endif 343 299 # ifndef YYMALLOC 344 300 # define YYMALLOC malloc 345 # if ! defined malloc && ! defined EXIT_SUCCESS&& (defined __STDC__ || defined __C99__FUNC__ \301 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 346 302 || defined __cplusplus || defined _MSC_VER) 347 303 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ … … 350 306 # ifndef YYFREE 351 307 # define YYFREE free 352 # if ! defined free && ! defined EXIT_SUCCESS&& (defined __STDC__ || defined __C99__FUNC__ \308 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 353 309 || defined __cplusplus || defined _MSC_VER) 354 310 void free (void *); /* INFRINGES ON USER NAME SPACE */ … … 366 322 union yyalloc 367 323 { 368 yytype_int16 yyss _alloc;369 YYSTYPE yyvs _alloc;370 };324 yytype_int16 yyss; 325 YYSTYPE yyvs; 326 }; 371 327 372 328 /* The size of the maximum gap between one aligned stack and the next. */ … … 379 335 + YYSTACK_GAP_MAXIMUM) 380 336 381 # define YYCOPY_NEEDED 1 337 /* Copy COUNT objects from FROM to TO. The source and destination do 338 not overlap. */ 339 # ifndef YYCOPY 340 # if defined __GNUC__ && 1 < __GNUC__ 341 # define YYCOPY(To, From, Count) \ 342 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 343 # else 344 # define YYCOPY(To, From, Count) \ 345 do \ 346 { \ 347 YYSIZE_T yyi; \ 348 for (yyi = 0; yyi < (Count); yyi++) \ 349 (To)[yyi] = (From)[yyi]; \ 350 } \ 351 while (YYID (0)) 352 # endif 353 # endif 382 354 383 355 /* Relocate STACK from its old location to the new one. The … … 386 358 stack. Advance YYPTR to a properly aligned location for the next 387 359 stack. */ 388 # define YYSTACK_RELOCATE(Stack _alloc, Stack)\360 # define YYSTACK_RELOCATE(Stack) \ 389 361 do \ 390 362 { \ 391 363 YYSIZE_T yynewbytes; \ 392 YYCOPY (&yyptr->Stack _alloc, Stack, yysize);\393 Stack = &yyptr->Stack _alloc;\364 YYCOPY (&yyptr->Stack, Stack, yysize); \ 365 Stack = &yyptr->Stack; \ 394 366 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 395 367 yyptr += yynewbytes / sizeof (*yyptr); \ … … 398 370 399 371 #endif 400 401 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED402 /* Copy COUNT objects from SRC to DST. The source and destination do403 not overlap. */404 # ifndef YYCOPY405 # if defined __GNUC__ && 1 < __GNUC__406 # define YYCOPY(Dst, Src, Count) \407 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))408 # else409 # define YYCOPY(Dst, Src, Count) \410 do \411 { \412 YYSIZE_T yyi; \413 for (yyi = 0; yyi < (Count); yyi++) \414 (Dst)[yyi] = (Src)[yyi]; \415 } \416 while (YYID (0))417 # endif418 # endif419 #endif /* !YYCOPY_NEEDED */420 372 421 373 /* YYFINAL -- State number of the termination state. */ … … 499 451 #endif 500 452 501 #if YYDEBUG || YYERROR_VERBOSE || 0453 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 502 454 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 503 455 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ … … 507 459 "TOK_USE", "TOK_MODULEMAIN", "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", 508 460 "TOK_CSTINT", "TOK_PROBTYPE", "','", "';'", "'\\n'", "$accept", "input", 509 "line", YY_NULL461 "line", 0 510 462 }; 511 463 #endif … … 535 487 }; 536 488 537 /* YYDEFACT[STATE-NAME] -- Default r eduction number in state STATE-NUM.538 Performedwhen YYTABLE doesn't specify something else to do. Zero489 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 490 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 539 491 means the default is an error. */ 540 492 static const yytype_uint8 yydefact[] = … … 569 521 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 570 522 positive, shift that token. If negative, reduce the rule which 571 number is the opposite. If YYTABLE_NINF, syntax error. */ 523 number is the opposite. If zero, do what YYDEFACT says. 524 If YYTABLE_NINF, syntax error. */ 572 525 #define YYTABLE_NINF -1 573 526 static const yytype_uint8 yytable[] = … … 578 531 }; 579 532 580 #define yypact_value_is_default(Yystate) \581 (!!((Yystate) == (-10)))582 583 #define yytable_value_is_error(Yytable_value) \584 YYID (0)585 586 533 static const yytype_int8 yycheck[] = 587 534 { … … 612 559 /* Like YYERROR except do call yyerror. This remains here temporarily 613 560 to ease the transition to the new meaning of YYERROR, for GCC. 614 Once GCC version 2 has supplanted version 1, this can go. However, 615 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 616 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 617 discussed. */ 561 Once GCC version 2 has supplanted version 1, this can go. */ 618 562 619 563 #define YYFAIL goto yyerrlab 620 #if defined YYFAIL621 /* This is here to suppress warnings from the GCC cpp's622 -Wunused-macros. Normally we don't worry about that warning, but623 some users do, and we want to make it easy for users to remove624 YYFAIL uses, which will produce warnings from Bison 2.5. */625 #endif626 564 627 565 #define YYRECOVERING() (!!yyerrstatus) 628 566 629 #define YYBACKUP(Token, Value) 630 do 631 if (yychar == YYEMPTY )\632 { 633 yychar = (Token); 634 yylval = (Value); 635 YYPOPSTACK (yylen);\636 yystate = *yyssp;\637 goto yybackup; 638 } 639 else 640 { 567 #define YYBACKUP(Token, Value) \ 568 do \ 569 if (yychar == YYEMPTY && yylen == 1) \ 570 { \ 571 yychar = (Token); \ 572 yylval = (Value); \ 573 yytoken = YYTRANSLATE (yychar); \ 574 YYPOPSTACK (1); \ 575 goto yybackup; \ 576 } \ 577 else \ 578 { \ 641 579 yyerror (YY_("syntax error: cannot back up")); \ 642 580 YYERROR; \ … … 644 582 while (YYID (0)) 645 583 646 /* Error token number */ 584 647 585 #define YYTERROR 1 648 586 #define YYERRCODE 256 649 587 650 588 651 /* This macro is provided for backward compatibility. */ 589 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 590 If N is 0, then set CURRENT to the empty location which ends 591 the previous symbol: RHS[0] (always defined). */ 592 593 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 594 #ifndef YYLLOC_DEFAULT 595 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 596 do \ 597 if (YYID (N)) \ 598 { \ 599 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 600 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 601 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 602 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 603 } \ 604 else \ 605 { \ 606 (Current).first_line = (Current).last_line = \ 607 YYRHSLOC (Rhs, 0).last_line; \ 608 (Current).first_column = (Current).last_column = \ 609 YYRHSLOC (Rhs, 0).last_column; \ 610 } \ 611 while (YYID (0)) 612 #endif 613 614 615 /* YY_LOCATION_PRINT -- Print the location on the stream. 616 This macro was not mandated originally: define only if we know 617 we won't break user code: when these are the locations we know. */ 618 652 619 #ifndef YY_LOCATION_PRINT 653 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 620 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 621 # define YY_LOCATION_PRINT(File, Loc) \ 622 fprintf (File, "%d.%d-%d.%d", \ 623 (Loc).first_line, (Loc).first_column, \ 624 (Loc).last_line, (Loc).last_column) 625 # else 626 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 627 # endif 654 628 #endif 655 629 656 630 657 631 /* YYLEX -- calling `yylex' with the right arguments. */ 632 658 633 #ifdef YYLEX_PARAM 659 634 # define YYLEX yylex (YYLEX_PARAM) … … 705 680 #endif 706 681 { 707 FILE *yyo = yyoutput;708 YYUSE (yyo);709 682 if (!yyvaluep) 710 683 return; … … 715 688 YYUSE (yyoutput); 716 689 # endif 717 YYUSE (yytype); 690 switch (yytype) 691 { 692 default: 693 break; 694 } 718 695 } 719 696 … … 752 729 || defined __cplusplus || defined _MSC_VER) 753 730 static void 754 yy_stack_print (yytype_int16 * yybottom, yytype_int16 *yytop)731 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 755 732 #else 756 733 static void 757 yy_stack_print ( yybottom, yytop)758 yytype_int16 * yybottom;759 yytype_int16 * yytop;734 yy_stack_print (bottom, top) 735 yytype_int16 *bottom; 736 yytype_int16 *top; 760 737 #endif 761 738 { 762 739 YYFPRINTF (stderr, "Stack now"); 763 for (; yybottom <= yytop; yybottom++) 764 { 765 int yybot = *yybottom; 766 YYFPRINTF (stderr, " %d", yybot); 767 } 740 for (; bottom <= top; ++bottom) 741 YYFPRINTF (stderr, " %d", *bottom); 768 742 YYFPRINTF (stderr, "\n"); 769 743 } … … 799 773 for (yyi = 0; yyi < yynrhs; yyi++) 800 774 { 801 YYFPRINTF(stderr, " $%d = ", yyi + 1);775 fprintf (stderr, " $%d = ", yyi + 1); 802 776 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 803 777 &(yyvsp[(yyi + 1) - (yynrhs)]) 804 778 ); 805 YYFPRINTF(stderr, "\n");779 fprintf (stderr, "\n"); 806 780 } 807 781 } … … 839 813 # define YYMAXDEPTH 10000 840 814 #endif 815 816 841 817 842 818 … … 942 918 # endif 943 919 944 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 945 about the unexpected token YYTOKEN for the state stack whose top is 946 YYSSP. 947 948 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 949 not large enough to hold the message. In that case, also set 950 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 951 required number of bytes is too large to store. */ 952 static int 953 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 954 yytype_int16 *yyssp, int yytoken) 955 { 956 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); 957 YYSIZE_T yysize = yysize0; 958 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 959 /* Internationalized format string. */ 960 const char *yyformat = YY_NULL; 961 /* Arguments of yyformat. */ 962 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 963 /* Number of reported tokens (one for the "unexpected", one per 964 "expected"). */ 965 int yycount = 0; 966 967 /* There are many possibilities here to consider: 968 - Assume YYFAIL is not used. It's too flawed to consider. See 969 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 970 for details. YYERROR is fine as it does not invoke this 971 function. 972 - If this state is a consistent state with a default action, then 973 the only way this function was invoked is if the default action 974 is an error action. In that case, don't check for expected 975 tokens because there are none. 976 - The only way there can be no lookahead present (in yychar) is if 977 this state is a consistent state with a default action. Thus, 978 detecting the absence of a lookahead is sufficient to determine 979 that there is no unexpected or expected token to report. In that 980 case, just report a simple "syntax error". 981 - Don't assume there isn't a lookahead just because this state is a 982 consistent state with a default action. There might have been a 983 previous inconsistent state, consistent state with a non-default 984 action, or user semantic action that manipulated yychar. 985 - Of course, the expected token list depends on states to have 986 correct lookahead information, and it depends on the parser not 987 to perform extra reductions after fetching a lookahead from the 988 scanner and before detecting a syntax error. Thus, state merging 989 (from LALR or IELR) and default reductions corrupt the expected 990 token list. However, the list is correct for canonical LR with 991 one exception: it will still contain any token that will not be 992 accepted due to an error action in a later state. 993 */ 994 if (yytoken != YYEMPTY) 920 /* Copy into YYRESULT an error message about the unexpected token 921 YYCHAR while in state YYSTATE. Return the number of bytes copied, 922 including the terminating null byte. If YYRESULT is null, do not 923 copy anything; just return the number of bytes that would be 924 copied. As a special case, return 0 if an ordinary "syntax error" 925 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 926 size calculation. */ 927 static YYSIZE_T 928 yysyntax_error (char *yyresult, int yystate, int yychar) 929 { 930 int yyn = yypact[yystate]; 931 932 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 933 return 0; 934 else 995 935 { 996 int yyn = yypact[*yyssp]; 997 yyarg[yycount++] = yytname[yytoken]; 998 if (!yypact_value_is_default (yyn)) 999 { 1000 /* Start YYX at -YYN if negative to avoid negative indexes in 1001 YYCHECK. In other words, skip the first -YYN actions for 1002 this state because they are default actions. */ 1003 int yyxbegin = yyn < 0 ? -yyn : 0; 1004 /* Stay within bounds of both yycheck and yytname. */ 1005 int yychecklim = YYLAST - yyn + 1; 1006 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1007 int yyx; 1008 1009 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1010 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 1011 && !yytable_value_is_error (yytable[yyx + yyn])) 1012 { 1013 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1014 { 1015 yycount = 1; 1016 yysize = yysize0; 1017 break; 1018 } 1019 yyarg[yycount++] = yytname[yyx]; 1020 { 1021 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); 1022 if (! (yysize <= yysize1 1023 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1024 return 2; 1025 yysize = yysize1; 1026 } 1027 } 1028 } 936 int yytype = YYTRANSLATE (yychar); 937 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 938 YYSIZE_T yysize = yysize0; 939 YYSIZE_T yysize1; 940 int yysize_overflow = 0; 941 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 942 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 943 int yyx; 944 945 # if 0 946 /* This is so xgettext sees the translatable formats that are 947 constructed on the fly. */ 948 YY_("syntax error, unexpected %s"); 949 YY_("syntax error, unexpected %s, expecting %s"); 950 YY_("syntax error, unexpected %s, expecting %s or %s"); 951 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 952 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 953 # endif 954 char *yyfmt; 955 char const *yyf; 956 static char const yyunexpected[] = "syntax error, unexpected %s"; 957 static char const yyexpecting[] = ", expecting %s"; 958 static char const yyor[] = " or %s"; 959 char yyformat[sizeof yyunexpected 960 + sizeof yyexpecting - 1 961 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 962 * (sizeof yyor - 1))]; 963 char const *yyprefix = yyexpecting; 964 965 /* Start YYX at -YYN if negative to avoid negative indexes in 966 YYCHECK. */ 967 int yyxbegin = yyn < 0 ? -yyn : 0; 968 969 /* Stay within bounds of both yycheck and yytname. */ 970 int yychecklim = YYLAST - yyn + 1; 971 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 972 int yycount = 1; 973 974 yyarg[0] = yytname[yytype]; 975 yyfmt = yystpcpy (yyformat, yyunexpected); 976 977 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 978 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 979 { 980 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 981 { 982 yycount = 1; 983 yysize = yysize0; 984 yyformat[sizeof yyunexpected - 1] = '\0'; 985 break; 986 } 987 yyarg[yycount++] = yytname[yyx]; 988 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 989 yysize_overflow |= (yysize1 < yysize); 990 yysize = yysize1; 991 yyfmt = yystpcpy (yyfmt, yyprefix); 992 yyprefix = yyor; 993 } 994 995 yyf = YY_(yyformat); 996 yysize1 = yysize + yystrlen (yyf); 997 yysize_overflow |= (yysize1 < yysize); 998 yysize = yysize1; 999 1000 if (yysize_overflow) 1001 return YYSIZE_MAXIMUM; 1002 1003 if (yyresult) 1004 { 1005 /* Avoid sprintf, as that infringes on the user's name space. 1006 Don't have undefined behavior even if the translation 1007 produced a string with the wrong number of "%s"s. */ 1008 char *yyp = yyresult; 1009 int yyi = 0; 1010 while ((*yyp = *yyf) != '\0') 1011 { 1012 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1013 { 1014 yyp += yytnamerr (yyp, yyarg[yyi++]); 1015 yyf += 2; 1016 } 1017 else 1018 { 1019 yyp++; 1020 yyf++; 1021 } 1022 } 1023 } 1024 return yysize; 1029 1025 } 1030 1031 switch (yycount)1032 {1033 # define YYCASE_(N, S) \1034 case N: \1035 yyformat = S; \1036 break1037 YYCASE_(0, YY_("syntax error"));1038 YYCASE_(1, YY_("syntax error, unexpected %s"));1039 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));1040 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));1041 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));1042 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));1043 # undef YYCASE_1044 }1045 1046 {1047 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);1048 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))1049 return 2;1050 yysize = yysize1;1051 }1052 1053 if (*yymsg_alloc < yysize)1054 {1055 *yymsg_alloc = 2 * yysize;1056 if (! (yysize <= *yymsg_alloc1057 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))1058 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;1059 return 1;1060 }1061 1062 /* Avoid sprintf, as that infringes on the user's name space.1063 Don't have undefined behavior even if the translation1064 produced a string with the wrong number of "%s"s. */1065 {1066 char *yyp = *yymsg;1067 int yyi = 0;1068 while ((*yyp = *yyformat) != '\0')1069 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)1070 {1071 yyp += yytnamerr (yyp, yyarg[yyi++]);1072 yyformat += 2;1073 }1074 else1075 {1076 yyp++;1077 yyformat++;1078 }1079 }1080 return 0;1081 1026 } 1082 1027 #endif /* YYERROR_VERBOSE */ 1028 1029 1083 1030 1084 1031 /*-----------------------------------------------. … … 1105 1052 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1106 1053 1107 YYUSE (yytype); 1108 } 1109 1110 1111 1112 1113 /* The lookahead symbol. */ 1054 switch (yytype) 1055 { 1056 1057 default: 1058 break; 1059 } 1060 } 1061 1062 1063 1064 /* Prevent warnings from -Wmissing-prototypes. */ 1065 1066 #ifdef YYPARSE_PARAM 1067 #if defined __STDC__ || defined __cplusplus 1068 int yyparse (void *YYPARSE_PARAM); 1069 #else 1070 int yyparse (); 1071 #endif 1072 #else /* ! YYPARSE_PARAM */ 1073 #if defined __STDC__ || defined __cplusplus 1074 int yyparse (void); 1075 #else 1076 int yyparse (); 1077 #endif 1078 #endif /* ! YYPARSE_PARAM */ 1079 1080 1081 1082 /* The look-ahead symbol. */ 1114 1083 int yychar; 1115 1084 1116 1117 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1118 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1119 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 1120 #endif 1121 #ifndef YY_INITIAL_VALUE 1122 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 1123 #endif 1124 1125 /* The semantic value of the lookahead symbol. */ 1126 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); 1085 /* The semantic value of the look-ahead symbol. */ 1086 YYSTYPE yylval; 1127 1087 1128 1088 /* Number of syntax errors so far. */ 1129 1089 int yynerrs; 1090 1130 1091 1131 1092 … … 1156 1117 #endif 1157 1118 { 1158 int yystate; 1159 /* Number of tokens to shift before error messages enabled. */ 1160 int yyerrstatus; 1161 1162 /* The stacks and their tools: 1163 `yyss': related to states. 1164 `yyvs': related to semantic values. 1165 1166 Refer to the stacks through separate pointers, to allow yyoverflow 1167 to reallocate them elsewhere. */ 1168 1169 /* The state stack. */ 1170 yytype_int16 yyssa[YYINITDEPTH]; 1171 yytype_int16 *yyss; 1172 yytype_int16 *yyssp; 1173 1174 /* The semantic value stack. */ 1175 YYSTYPE yyvsa[YYINITDEPTH]; 1176 YYSTYPE *yyvs; 1177 YYSTYPE *yyvsp; 1178 1179 YYSIZE_T yystacksize; 1180 1119 1120 int yystate; 1181 1121 int yyn; 1182 1122 int yyresult; 1183 /* Lookahead token as an internal (translated) token number. */ 1123 /* Number of tokens to shift before error messages enabled. */ 1124 int yyerrstatus; 1125 /* Look-ahead token as an internal (translated) token number. */ 1184 1126 int yytoken = 0; 1185 /* The variables used to return semantic value and location from the1186 action routines. */1187 YYSTYPE yyval;1188 1189 1127 #if YYERROR_VERBOSE 1190 1128 /* Buffer for error messages, and its allocated size. */ … … 1194 1132 #endif 1195 1133 1134 /* Three stacks and their tools: 1135 `yyss': related to states, 1136 `yyvs': related to semantic values, 1137 `yyls': related to locations. 1138 1139 Refer to the stacks thru separate pointers, to allow yyoverflow 1140 to reallocate them elsewhere. */ 1141 1142 /* The state stack. */ 1143 yytype_int16 yyssa[YYINITDEPTH]; 1144 yytype_int16 *yyss = yyssa; 1145 yytype_int16 *yyssp; 1146 1147 /* The semantic value stack. */ 1148 YYSTYPE yyvsa[YYINITDEPTH]; 1149 YYSTYPE *yyvs = yyvsa; 1150 YYSTYPE *yyvsp; 1151 1152 1153 1196 1154 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1155 1156 YYSIZE_T yystacksize = YYINITDEPTH; 1157 1158 /* The variables used to return semantic value and location from the 1159 action routines. */ 1160 YYSTYPE yyval; 1161 1197 1162 1198 1163 /* The number of symbols on the RHS of the reduced rule. … … 1200 1165 int yylen = 0; 1201 1166 1202 yyssp = yyss = yyssa;1203 yyvsp = yyvs = yyvsa;1204 yystacksize = YYINITDEPTH;1205 1206 1167 YYDPRINTF ((stderr, "Starting parse\n")); 1207 1168 … … 1209 1170 yyerrstatus = 0; 1210 1171 yynerrs = 0; 1211 yychar = YYEMPTY; /* Cause a token to be read. */ 1172 yychar = YYEMPTY; /* Cause a token to be read. */ 1173 1174 /* Initialize stack pointers. 1175 Waste one element of value and location stack 1176 so that they stay on the same level as the state stack. 1177 The wasted elements are never initialized. */ 1178 1179 yyssp = yyss; 1180 yyvsp = yyvs; 1181 1212 1182 goto yysetstate; 1213 1183 … … 1236 1206 yytype_int16 *yyss1 = yyss; 1237 1207 1208 1238 1209 /* Each stack pointer address is followed by the size of the 1239 1210 data in use in that stack, in bytes. This used to be a … … 1243 1214 &yyss1, yysize * sizeof (*yyssp), 1244 1215 &yyvs1, yysize * sizeof (*yyvsp), 1216 1245 1217 &yystacksize); 1246 1218 … … 1265 1237 if (! yyptr) 1266 1238 goto yyexhaustedlab; 1267 YYSTACK_RELOCATE (yyss_alloc, yyss); 1268 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1239 YYSTACK_RELOCATE (yyss); 1240 YYSTACK_RELOCATE (yyvs); 1241 1269 1242 # undef YYSTACK_RELOCATE 1270 1243 if (yyss1 != yyssa) … … 1277 1250 yyvsp = yyvs + yysize - 1; 1278 1251 1252 1279 1253 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1280 1254 (unsigned long int) yystacksize)); … … 1285 1259 1286 1260 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1287 1288 if (yystate == YYFINAL)1289 YYACCEPT;1290 1261 1291 1262 goto yybackup; … … 1297 1268 1298 1269 /* Do appropriate processing given the current state. Read a 1299 look ahead token if we need one and don't already have one. */1300 1301 /* First try to decide what to do without reference to look ahead token. */1270 look-ahead token if we need one and don't already have one. */ 1271 1272 /* First try to decide what to do without reference to look-ahead token. */ 1302 1273 yyn = yypact[yystate]; 1303 if (yy pact_value_is_default (yyn))1274 if (yyn == YYPACT_NINF) 1304 1275 goto yydefault; 1305 1276 1306 /* Not known => get a look ahead token if don't already have one. */1307 1308 /* YYCHAR is either YYEMPTY or YYEOF or a valid look ahead symbol. */1277 /* Not known => get a look-ahead token if don't already have one. */ 1278 1279 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 1309 1280 if (yychar == YYEMPTY) 1310 1281 { … … 1332 1303 if (yyn <= 0) 1333 1304 { 1334 if (yy table_value_is_error (yyn))1335 1305 if (yyn == 0 || yyn == YYTABLE_NINF) 1306 goto yyerrlab; 1336 1307 yyn = -yyn; 1337 1308 goto yyreduce; 1338 1309 } 1310 1311 if (yyn == YYFINAL) 1312 YYACCEPT; 1339 1313 1340 1314 /* Count tokens shifted since error; after three, turn off error … … 1343 1317 yyerrstatus--; 1344 1318 1345 /* Shift the look ahead token. */1319 /* Shift the look-ahead token. */ 1346 1320 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1347 1321 1348 /* Discard the shifted token. */ 1349 yychar = YYEMPTY; 1322 /* Discard the shifted token unless it is eof. */ 1323 if (yychar != YYEOF) 1324 yychar = YYEMPTY; 1350 1325 1351 1326 yystate = yyn; 1352 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN1353 1327 *++yyvsp = yylval; 1354 YY_IGNORE_MAYBE_UNINITIALIZED_END1355 1328 1356 1329 goto yynewstate; … … 1450 1423 default: break; 1451 1424 } 1452 /* User semantic actions sometimes alter yychar, and that requires1453 that yytoken be updated with the new translation. We take the1454 approach of translating immediately before every use of yytoken.1455 One alternative is translating here after every semantic action,1456 but that translation would be missed if the semantic action invokes1457 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or1458 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an1459 incorrect destructor might then be invoked immediately. In the1460 case of YYERROR or YYBACKUP, subsequent parser actions might lead1461 to an incorrect destructor call or verbose syntax error message1462 before the lookahead is translated. */1463 1425 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1464 1426 … … 1468 1430 1469 1431 *++yyvsp = yyval; 1432 1470 1433 1471 1434 /* Now `shift' the result of the reduction. Determine what state … … 1488 1451 `------------------------------------*/ 1489 1452 yyerrlab: 1490 /* Make sure we have latest lookahead translation. See comments at1491 user semantic actions for why this is necessary. */1492 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);1493 1494 1453 /* If not already recovering from an error, report this error. */ 1495 1454 if (!yyerrstatus) … … 1499 1458 yyerror (YY_("syntax error")); 1500 1459 #else 1501 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \1502 yyssp, yytoken)1503 1460 { 1504 char const *yymsgp = YY_("syntax error"); 1505 int yysyntax_error_status; 1506 yysyntax_error_status = YYSYNTAX_ERROR; 1507 if (yysyntax_error_status == 0) 1508 yymsgp = yymsg; 1509 else if (yysyntax_error_status == 1) 1510 { 1511 if (yymsg != yymsgbuf) 1512 YYSTACK_FREE (yymsg); 1513 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 1514 if (!yymsg) 1515 { 1516 yymsg = yymsgbuf; 1517 yymsg_alloc = sizeof yymsgbuf; 1518 yysyntax_error_status = 2; 1519 } 1520 else 1521 { 1522 yysyntax_error_status = YYSYNTAX_ERROR; 1523 yymsgp = yymsg; 1524 } 1525 } 1526 yyerror (yymsgp); 1527 if (yysyntax_error_status == 2) 1528 goto yyexhaustedlab; 1461 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 1462 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 1463 { 1464 YYSIZE_T yyalloc = 2 * yysize; 1465 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 1466 yyalloc = YYSTACK_ALLOC_MAXIMUM; 1467 if (yymsg != yymsgbuf) 1468 YYSTACK_FREE (yymsg); 1469 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 1470 if (yymsg) 1471 yymsg_alloc = yyalloc; 1472 else 1473 { 1474 yymsg = yymsgbuf; 1475 yymsg_alloc = sizeof yymsgbuf; 1476 } 1477 } 1478 1479 if (0 < yysize && yysize <= yymsg_alloc) 1480 { 1481 (void) yysyntax_error (yymsg, yystate, yychar); 1482 yyerror (yymsg); 1483 } 1484 else 1485 { 1486 yyerror (YY_("syntax error")); 1487 if (yysize != 0) 1488 goto yyexhaustedlab; 1489 } 1529 1490 } 1530 # undef YYSYNTAX_ERROR1531 1491 #endif 1532 1492 } … … 1536 1496 if (yyerrstatus == 3) 1537 1497 { 1538 /* If just tried and failed to reuse look ahead token after an1498 /* If just tried and failed to reuse look-ahead token after an 1539 1499 error, discard it. */ 1540 1500 … … 1553 1513 } 1554 1514 1555 /* Else will try to reuse look ahead token after shifting the error1515 /* Else will try to reuse look-ahead token after shifting the error 1556 1516 token. */ 1557 1517 goto yyerrlab1; … … 1587 1547 { 1588 1548 yyn = yypact[yystate]; 1589 if ( !yypact_value_is_default (yyn))1549 if (yyn != YYPACT_NINF) 1590 1550 { 1591 1551 yyn += YYTERROR; … … 1610 1570 } 1611 1571 1612 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1572 if (yyn == YYFINAL) 1573 YYACCEPT; 1574 1613 1575 *++yyvsp = yylval; 1614 YY_IGNORE_MAYBE_UNINITIALIZED_END1615 1576 1616 1577 … … 1636 1597 goto yyreturn; 1637 1598 1638 #if !defined yyoverflow || YYERROR_VERBOSE1599 #ifndef yyoverflow 1639 1600 /*-------------------------------------------------. 1640 1601 | yyexhaustedlab -- memory exhaustion comes here. | … … 1647 1608 1648 1609 yyreturn: 1649 if (yychar != YYEMPTY) 1650 { 1651 /* Make sure we have latest lookahead translation. See comments at 1652 user semantic actions for why this is necessary. */ 1653 yytoken = YYTRANSLATE (yychar); 1654 yydestruct ("Cleanup: discarding lookahead", 1655 yytoken, &yylval); 1656 } 1610 if (yychar != YYEOF && yychar != YYEMPTY) 1611 yydestruct ("Cleanup: discarding lookahead", 1612 yytoken, &yylval); 1657 1613 /* Do not reclaim the symbols of the rule which action triggered 1658 1614 this YYABORT or YYACCEPT. */ … … 2033 1989 return 0; 2034 1990 } 1991 2035 1992 #line 2 "convert.yy.c" 2036 1993 … … 2063 2020 #define YY_FLEX_MAJOR_VERSION 2 2064 2021 #define YY_FLEX_MINOR_VERSION 5 2065 #define YY_FLEX_SUBMINOR_VERSION 3 72022 #define YY_FLEX_SUBMINOR_VERSION 35 2066 2023 #if YY_FLEX_SUBMINOR_VERSION > 0 2067 2024 #define FLEX_BETA … … 2109 2066 typedef unsigned short int flex_uint16_t; 2110 2067 typedef unsigned int flex_uint32_t; 2068 #endif /* ! C99 */ 2111 2069 2112 2070 /* Limits of integral types. */ … … 2138 2096 #define UINT32_MAX (4294967295U) 2139 2097 #endif 2140 2141 #endif /* ! C99 */2142 2098 2143 2099 #endif /* ! FLEXINT_H */ … … 2728 2684 { \ 2729 2685 int c = '*'; \ 2730 size_t n; \2686 yy_size_t n; \ 2731 2687 for ( n = 0; n < max_size && \ 2732 2688 (c = getc( convert_in )) != EOF && c != '\n'; ++n ) \ … … 3165 3121 3166 3122 /* just a shorter name for the current buffer */ 3167 YY_BUFFER_STATE b = YY_CURRENT_BUFFER _LVALUE;3123 YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 3168 3124 3169 3125 int yy_c_buf_p_offset = … … 3298 3254 yy_is_jam = (yy_current_state == 83); 3299 3255 3300 3256 return yy_is_jam ? 0 : yy_current_state; 3301 3257 } 3302 3258 … … 3386 3342 { 3387 3343 if ( convert_wrap( ) ) 3388 return EOF;3344 return 0; 3389 3345 3390 3346 if ( ! (yy_did_buffer_switch_on_eof) ) … … 3522 3478 } 3523 3479 3480 #ifndef __cplusplus 3481 extern int isatty (int ); 3482 #endif /* __cplusplus */ 3483 3524 3484 /* Initializes or reinitializes a buffer. 3525 3485 * This function is sometimes called more than once on the same buffer, … … 3726 3686 /** Setup the input buffer state to scan the given bytes. The next call to convert_lex() will 3727 3687 * scan from a @e copy of @a bytes. 3728 * @param yybytes the byte buffer to scan3729 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.3688 * @param bytes the byte buffer to scan 3689 * @param len the number of bytes in the buffer pointed to by @a bytes. 3730 3690 * 3731 3691 * @return the newly allocated buffer state object. … … 3735 3695 YY_BUFFER_STATE b; 3736 3696 char *buf; 3737 yy_size_t n; 3738 int i; 3697 yy_size_t n, i; 3739 3698 3740 3699 /* Get memory for full buffer, including space for trailing EOB's. */
Note: See TracChangeset
for help on using the changeset viewer.