Changeset 4
- Timestamp:
- Jul 11, 2015, 9:56:07 AM (10 years ago)
- Location:
- heimdal/trunk
- Files:
-
- 1 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
heimdal/trunk/appl/login/stty_default.c
r1 r4 87 87 termios.c_lflag &= ~(ECHOPRT|TOSTOP|FLUSHO); 88 88 89 #ifndef __OS2__ 89 90 termios.c_oflag |= (OPOST|ONLCR); 91 #else 92 termios.c_oflag |= (OPOST); 93 #endif 90 94 termios.c_oflag &= ~OXTABS; 91 95 -
heimdal/trunk/appl/rsh/rsh.c
r1 r4 850 850 851 851 priv_port1 = priv_port2 = IPPORT_RESERVED-1; 852 #ifndef __OS2__ 852 853 priv_socket1 = rresvport(&priv_port1); 853 854 priv_socket2 = rresvport(&priv_port2); 855 #endif 854 856 uid = getuid (); 855 857 if (setuid (uid) || (uid != 0 && setuid(0) == 0)) -
heimdal/trunk/appl/rsh/rshd.c
r1 r4 660 660 */ 661 661 662 #ifndef __OS2__ 662 663 if (erraddr->sa_family == AF_INET) 663 664 errsock = rresvport (&priv_port); 664 665 else 666 #endif 665 667 errsock = socket (erraddr->sa_family, SOCK_STREAM, 0); 666 668 if (errsock < 0) -
heimdal/trunk/appl/telnet/telnet/sys_bsd.c
r1 r4 356 356 if (f&MODE_ECHO) { 357 357 tmp_tc.c_lflag |= ECHO; 358 #ifndef __OS2__ 358 359 tmp_tc.c_oflag |= ONLCR; 360 #endif 359 361 if (crlf) 360 362 tmp_tc.c_iflag |= ICRNL; 361 363 } else { 362 364 tmp_tc.c_lflag &= ~ECHO; 365 #ifndef __OS2__ 363 366 tmp_tc.c_oflag &= ~ONLCR; 367 #endif 364 368 # ifdef notdef 365 369 if (crlf) -
heimdal/trunk/appl/telnet/telnetd/sys_term.c
r1 r4 933 933 */ 934 934 set_termbuf(); 935 #ifndef __OS2__ 935 936 if (login_tty(t) == -1) 936 937 fatalperror(net, "login_tty"); 938 #endif 937 939 if (net > 2) 938 940 close(net); … … 1644 1646 cleanup(int sig) 1645 1647 { 1648 #ifndef __OS2__ 1646 1649 #if defined(HAVE_UTMPX_H) || !defined(HAVE_LOGWTMP) 1647 1650 rmut(); … … 1662 1665 chmod(line, 0666); 1663 1666 chown(line, 0, 0); 1667 #endif 1664 1668 #endif 1665 1669 shutdown(net, 2); -
heimdal/trunk/base/heimbase.c
r1 r4 36 36 #include "baselocl.h" 37 37 #include <syslog.h> 38 #ifdef __OS2__ 39 #include <sys/time.h> 40 #endif 38 41 39 42 static heim_base_atomic_type tidglobal = HEIM_TID_USER; -
heimdal/trunk/lib/asn1/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=asn1 17 OS2_DLL_NAME=asn1 18 OS2_DLL_OBJ=$(libasn1_la_OBJECTS:%.lo=%.o) $(dist_libasn1base_la_OBJECTS:%.lo=%.o) $(nodist_libasn1base_la_OBJECTS:%.lo=%.o) 19 OS2_DLL_LIBS=$(LIBS) ../roken/.libs/roken.a ../com_err/.libs/com_err.a 15 20 16 21 @SET_MAKE@ … … 631 636 version-script.map 632 637 633 all: $(BUILT_SOURCES) 638 all: $(BUILT_SOURCES) $(OS2_DLL_NAME).dll 634 639 $(MAKE) $(AM_MAKEFLAGS) all-am 635 640 … … 1472 1477 # Otherwise a system limit (for SysV at least) may be exceeded. 1473 1478 .NOEXPORT: 1479 1480 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 1481 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 1482 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 1483 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 1484 echo "EXPORTS" >> $(OS2_DLL_NAME).def 1485 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 1486 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 1487 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 1488 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def -
heimdal/trunk/lib/com_err/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=com_err 17 OS2_DLL_NAME=com_err 18 OS2_DLL_OBJ=$(libcom_err_la_OBJECTS:%.lo=%.o) 19 OS2_DLL_LIBS=$(LIBS) 15 20 16 21 @SET_MAKE@ … … 436 441 version-script.map 437 442 438 all: all-am 443 all: all-am $(OS2_DLL_NAME).dll 439 444 440 445 .SUFFIXES: … … 1050 1055 # Otherwise a system limit (for SysV at least) may be exceeded. 1051 1056 .NOEXPORT: 1057 1058 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 1059 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 1060 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 1061 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 1062 echo "EXPORTS" >> $(OS2_DLL_NAME).def 1063 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 1064 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 1065 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 1066 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def -
heimdal/trunk/lib/gssapi/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=gssapi 17 OS2_DLL_NAME=gssapi 18 OS2_DLL_OBJ=$(libgssapi_la_OBJECTS:%.lo=%.o) 19 OS2_DLL_LIBS=$(LIBS) ../roken/.libs/roken.a ../asn1/.libs/asn1.a ../hcrypto/.libs/hcrypto.a ../wind/.libs/wind.a ../com_err/.libs/com_err.a ../../base/.libs/heimbase.a -lsqlite3 ../hx509/.libs/hx509.a ../ipc/.libs/heim-ipcc.a ../krb5/.libs/krb5.a ../ntlm/.libs/heimntlm.a 15 20 16 21 @SET_MAKE@ … … 836 841 gss-commands.in 837 842 838 all: $(BUILT_SOURCES) 843 all: $(BUILT_SOURCES) $(OS2_DLL_NAME).dll 839 844 $(MAKE) $(AM_MAKEFLAGS) all-am 840 845 … … 2543 2548 # Otherwise a system limit (for SysV at least) may be exceeded. 2544 2549 .NOEXPORT: 2550 2551 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 2552 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 2553 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 2554 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 2555 echo "EXPORTS" >> $(OS2_DLL_NAME).def 2556 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 2557 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 2558 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 2559 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def -
heimdal/trunk/lib/hcrypto/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=hcrypto 17 OS2_DLL_NAME=hcrypto 18 OS2_DLL_OBJ=$(libhcrypto_la_OBJECTS:%.lo=%.o) 19 OS2_DLL_LIBS=$(LIBS) ../roken/.libs/roken.a ../asn1/.libs/asn1.a 15 20 16 21 @SET_MAKE@ … … 867 872 version-script.map 868 873 869 all: all-am 874 all: all-am $(OS2_DLL_NAME).dll 870 875 871 876 .SUFFIXES: … … 2857 2862 # Otherwise a system limit (for SysV at least) may be exceeded. 2858 2863 .NOEXPORT: 2864 2865 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 2866 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 2867 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 2868 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 2869 echo "EXPORTS" >> $(OS2_DLL_NAME).def 2870 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 2871 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 2872 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 2873 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def -
heimdal/trunk/lib/hdb/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=hdb 17 OS2_DLL_NAME=hdb 18 OS2_DLL_OBJ=$(libhdb_la_OBJECTS:%.lo=%.o) 19 OS2_DLL_LIBS=$(LIBS) ../roken/.libs/roken.a ../asn1/.libs/asn1.a ../hcrypto/.libs/hcrypto.a ../wind/.libs/wind.a ../com_err/.libs/com_err.a ../../base/.libs/heimbase.a -lsqlite3 ../hx509/.libs/hx509.a ../ipc/.libs/heim-ipcc.a ../krb5/.libs/krb5.a ../ntlm/.libs/heimntlm.a 15 20 16 21 @SET_MAKE@ … … 541 546 data-mkey.mit.des3.be 542 547 543 all: $(BUILT_SOURCES) 548 all: $(BUILT_SOURCES) $(OS2_DLL_NAME).dll 544 549 $(MAKE) $(AM_MAKEFLAGS) all-am 545 550 … … 1151 1156 # Otherwise a system limit (for SysV at least) may be exceeded. 1152 1157 .NOEXPORT: 1158 1159 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 1160 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 1161 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 1162 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 1163 echo "EXPORTS" >> $(OS2_DLL_NAME).def 1164 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 1165 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 1166 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 1167 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def -
heimdal/trunk/lib/hx509/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=hx509 17 OS2_DLL_NAME=hx509 18 OS2_DLL_OBJ=$(libhx509_la_OBJECTS:%.lo=%.o) 19 OS2_DLL_LIBS=$(LIBS) ../roken/.libs/roken.a ../asn1/.libs/asn1.a ../hcrypto/.libs/hcrypto.a ../wind/.libs/wind.a ../com_err/.libs/com_err.a 15 20 16 21 @SET_MAKE@ … … 767 772 data/yutaka-pad.key 768 773 769 all: $(BUILT_SOURCES) 774 all: $(BUILT_SOURCES) $(OS2_DLL_NAME).dll 770 775 $(MAKE) $(AM_MAKEFLAGS) all-am 771 776 … … 2026 2031 # Otherwise a system limit (for SysV at least) may be exceeded. 2027 2032 .NOEXPORT: 2033 2034 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 2035 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 2036 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 2037 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 2038 echo "EXPORTS" >> $(OS2_DLL_NAME).def 2039 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 2040 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 2041 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 2042 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def -
heimdal/trunk/lib/hx509/sel-gram.c
r1 r4 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. 1 2 /* A Bison parser, made from U:/DEV/heimdal-1.5.3/lib/hx509/sel-gram.y 3 by GNU Bison version 1.28 */ 4 5 #define YYBISON 1 /* Identify Bison output. */ 6 7 #define kw_TRUE 257 8 #define kw_FALSE 258 9 #define kw_AND 259 10 #define kw_OR 260 11 #define kw_IN 261 12 #define kw_TAILMATCH 262 13 #define NUMBER 263 14 #define STRING 264 15 #define IDENTIFIER 265 16 17 #line 34 "sel-gram.y" 18 19 #ifdef HAVE_CONFIG_H 20 #include <config.h> 21 #endif 22 #include <stdio.h> 23 #include <stdlib.h> 24 #include <hx_locl.h> 25 26 27 28 #line 45 "sel-gram.y" 29 typedef union { 30 char *string; 31 struct hx_expr *expr; 32 } YYSTYPE; 33 #include <stdio.h> 34 35 #ifndef __cplusplus 36 #ifndef __STDC__ 37 #define const 38 #endif 39 #endif 40 41 42 43 #define YYFINAL 50 44 #define YYFLAG -32768 45 #define YYNTBASE 21 46 47 #define YYTRANSLATE(x) ((unsigned)(x) <= 265 ? yytranslate[x] : 31) 48 49 static const char yytranslate[] = { 0, 50 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 51 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 52 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 53 2, 2, 12, 2, 2, 2, 17, 2, 2, 13, 54 14, 2, 2, 15, 2, 20, 2, 2, 2, 2, 55 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 56 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 57 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 58 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 59 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 60 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 61 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 62 2, 2, 18, 2, 19, 2, 2, 2, 2, 2, 63 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 64 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 65 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 66 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 67 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 68 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 69 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 74 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 75 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 76 7, 8, 9, 10, 11 77 }; 78 79 #if YYDEBUG != 0 80 static const short yyprhs[] = { 0, 81 0, 2, 4, 6, 9, 13, 17, 21, 23, 25, 82 29, 34, 39, 43, 49, 53, 55, 57, 59, 61, 83 63, 65, 70, 75, 79 84 }; 85 86 static const short yyrhs[] = { 22, 87 0, 3, 0, 4, 0, 12, 22, 0, 22, 5, 88 22, 0, 22, 6, 22, 0, 13, 22, 14, 0, 89 24, 0, 25, 0, 25, 15, 23, 0, 25, 16, 90 16, 25, 0, 25, 12, 16, 25, 0, 25, 8, 91 25, 0, 25, 7, 13, 23, 14, 0, 25, 7, 92 29, 0, 26, 0, 27, 0, 28, 0, 29, 0, 93 9, 0, 10, 0, 11, 13, 23, 14, 0, 17, 94 18, 30, 19, 0, 11, 20, 30, 0, 11, 0 95 }; 96 97 #endif 98 99 #if YYDEBUG != 0 100 static const short yyrline[] = { 0, 101 73, 75, 76, 77, 78, 79, 80, 81, 84, 85, 102 88, 89, 90, 91, 92, 95, 96, 97, 98, 101, 103 102, 104, 107, 110, 112 104 }; 105 #endif 106 107 108 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) 109 110 static const char * const yytname[] = { "$","error","$undefined.","kw_TRUE", 111 "kw_FALSE","kw_AND","kw_OR","kw_IN","kw_TAILMATCH","NUMBER","STRING","IDENTIFIER", 112 "'!'","'('","')'","','","'='","'%'","'{'","'}'","'.'","start","expr","words", 113 "comp","word","number","string","function","variable","variables", NULL 114 }; 115 #endif 116 117 static const short yyr1[] = { 0, 118 21, 22, 22, 22, 22, 22, 22, 22, 23, 23, 119 24, 24, 24, 24, 24, 25, 25, 25, 25, 26, 120 27, 28, 29, 30, 30 121 }; 122 123 static const short yyr2[] = { 0, 124 1, 1, 1, 2, 3, 3, 3, 1, 1, 3, 125 4, 4, 3, 5, 3, 1, 1, 1, 1, 1, 126 1, 4, 4, 3, 1 127 }; 128 129 static const short yydefact[] = { 0, 130 2, 3, 20, 21, 0, 0, 0, 0, 1, 8, 131 0, 16, 17, 18, 19, 0, 4, 0, 0, 0, 132 0, 0, 0, 0, 0, 0, 9, 7, 25, 0, 133 5, 6, 0, 15, 13, 0, 0, 22, 0, 0, 134 23, 0, 12, 11, 10, 24, 14, 0, 0, 0 135 }; 136 137 static const short yydefgoto[] = { 48, 138 9, 26, 10, 11, 12, 13, 14, 15, 30 139 }; 140 141 static const short yypact[] = { 1, 142 -32768,-32768,-32768,-32768, -7, 1, 1, -10, 25,-32768, 143 17,-32768,-32768,-32768,-32768, 27, 25, 21, 8, 1, 144 1, 15, 27, 6, 18, 26, 24,-32768, 22, 28, 145 25, 25, 27,-32768,-32768, 27, 27,-32768, 27, 8, 146 -32768, 29,-32768,-32768,-32768,-32768,-32768, 41, 45,-32768 147 }; 148 149 static const short yypgoto[] = {-32768, 150 -5, -30,-32768, -16,-32768,-32768,-32768, 30, 9 151 }; 152 153 154 #define YYLAST 52 155 156 157 static const short yytable[] = { 27, 158 17, 18, 42, 1, 2, 16, 35, 19, 45, 3, 159 4, 5, 6, 7, 31, 32, 27, 8, 29, 43, 160 44, 36, 27, 22, 23, 20, 21, 33, 24, 20, 161 21, 8, 25, 37, 28, 3, 4, 5, 39, 38, 162 49, 40, 47, 8, 50, 0, 41, 0, 46, 0, 163 0, 34 164 }; 165 166 static const short yycheck[] = { 16, 167 6, 7, 33, 3, 4, 13, 23, 18, 39, 9, 168 10, 11, 12, 13, 20, 21, 33, 17, 11, 36, 169 37, 16, 39, 7, 8, 5, 6, 13, 12, 5, 170 6, 17, 16, 16, 14, 9, 10, 11, 15, 14, 171 0, 20, 14, 17, 0, -1, 19, -1, 40, -1, 172 -1, 22 173 }; 174 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ 175 #line 3 "/emx/share/bison.simple" 176 /* This file comes from bison-1.28. */ 177 178 /* Skeleton output parser for bison, 179 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. 7 180 8 181 This program is free software; you can redistribute it and/or modify … … 18 191 You should have received a copy of the GNU General Public License 19 192 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. */ 22 23 /* As a special exception, you may create a larger work that contains 24 part or all of the Bison parser skeleton and distribute that work 25 under terms of your choice, so long as that work isn't itself a 26 parser generator using the skeleton or a modified version thereof 27 as a parser skeleton. Alternatively, if you modify or redistribute 28 the parser skeleton itself, you may (at your option) remove this 29 special exception, which will cause the skeleton and the resulting 30 Bison output files to be licensed under the GNU General Public 31 License without this special exception. 32 33 This special exception was added by the Free Software Foundation in 34 version 2.2 of Bison. */ 35 36 /* C LALR(1) parser skeleton written by Richard Stallman, by 37 simplifying the original so-called "semantic" parser. */ 38 39 /* All symbols defined below should begin with yy or YY, to avoid 40 infringing on user name space. This should be done even for local 41 variables, as they might otherwise be expanded by user macros. 42 There are some unavoidable exceptions within include files to 43 define necessary library symbols; they are noted "INFRINGES ON 44 USER NAME SPACE" below. */ 45 46 /* Identify Bison output. */ 47 #define YYBISON 1 48 49 /* Bison version. */ 50 #define YYBISON_VERSION "2.3" 51 52 /* Skeleton name. */ 53 #define YYSKELETON_NAME "yacc.c" 54 55 /* Pure parsers. */ 56 #define YYPURE 0 57 58 /* Using locations. */ 59 #define YYLSP_NEEDED 0 60 61 62 63 /* Tokens. */ 64 #ifndef YYTOKENTYPE 65 # define YYTOKENTYPE 66 /* Put the tokens into the symbol table, so that GDB and other debuggers 67 know about them. */ 68 enum yytokentype { 69 kw_TRUE = 258, 70 kw_FALSE = 259, 71 kw_AND = 260, 72 kw_OR = 261, 73 kw_IN = 262, 74 kw_TAILMATCH = 263, 75 NUMBER = 264, 76 STRING = 265, 77 IDENTIFIER = 266 78 }; 79 #endif 80 /* Tokens. */ 81 #define kw_TRUE 258 82 #define kw_FALSE 259 83 #define kw_AND 260 84 #define kw_OR 261 85 #define kw_IN 262 86 #define kw_TAILMATCH 263 87 #define NUMBER 264 88 #define STRING 265 89 #define IDENTIFIER 266 90 91 92 93 94 /* Copy the first part of user declarations. */ 95 #line 34 "sel-gram.y" 96 97 #ifdef HAVE_CONFIG_H 98 #include <config.h> 99 #endif 100 #include <stdio.h> 101 #include <stdlib.h> 102 #include <hx_locl.h> 103 104 105 106 107 /* Enabling traces. */ 108 #ifndef YYDEBUG 109 # define YYDEBUG 0 110 #endif 111 112 /* Enabling verbose error messages. */ 113 #ifdef YYERROR_VERBOSE 114 # undef YYERROR_VERBOSE 115 # define YYERROR_VERBOSE 1 193 Foundation, Inc., 59 Temple Place - Suite 330, 194 Boston, MA 02111-1307, USA. */ 195 196 /* As a special exception, when this file is copied by Bison into a 197 Bison output file, you may use that output file without restriction. 198 This special exception was added by the Free Software Foundation 199 in version 1.24 of Bison. */ 200 201 /* This is the parser code that is written into each bison parser 202 when the %semantic_parser declaration is not specified in the grammar. 203 It was written by Richard Stallman by simplifying the hairy parser 204 used when %semantic_parser is specified. */ 205 206 #ifndef YYSTACK_USE_ALLOCA 207 #ifdef alloca 208 #define YYSTACK_USE_ALLOCA 209 #else /* alloca not defined */ 210 #ifdef __GNUC__ 211 #define YYSTACK_USE_ALLOCA 212 #define alloca __builtin_alloca 213 #else /* not GNU C. */ 214 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) 215 #define YYSTACK_USE_ALLOCA 216 #include <alloca.h> 217 #else /* not sparc */ 218 /* We think this test detects Watcom and Microsoft C. */ 219 /* This used to test MSDOS, but that is a bad idea 220 since that symbol is in the user namespace. */ 221 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) 222 #if 0 /* No need for malloc.h, which pollutes the namespace; 223 instead, just don't use alloca. */ 224 #include <malloc.h> 225 #endif 226 #else /* not MSDOS, or __TURBOC__ */ 227 #if defined(_AIX) 228 /* I don't know what this was needed for, but it pollutes the namespace. 229 So I turned it off. rms, 2 May 1997. */ 230 /* #include <malloc.h> */ 231 #pragma alloca 232 #define YYSTACK_USE_ALLOCA 233 #else /* not MSDOS, or __TURBOC__, or _AIX */ 234 #if 0 235 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, 236 and on HPUX 10. Eventually we can turn this on. */ 237 #define YYSTACK_USE_ALLOCA 238 #define alloca __builtin_alloca 239 #endif /* __hpux */ 240 #endif 241 #endif /* not _AIX */ 242 #endif /* not MSDOS, or __TURBOC__ */ 243 #endif /* not sparc */ 244 #endif /* not GNU C */ 245 #endif /* alloca not defined */ 246 #endif /* YYSTACK_USE_ALLOCA not defined */ 247 248 #ifdef YYSTACK_USE_ALLOCA 249 #define YYSTACK_ALLOC alloca 116 250 #else 117 # define YYERROR_VERBOSE 0 118 #endif 119 120 /* Enabling the token table. */ 121 #ifndef YYTOKEN_TABLE 122 # define YYTOKEN_TABLE 0 123 #endif 124 125 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 126 typedef union YYSTYPE 127 #line 45 "sel-gram.y" 128 { 129 char *string; 130 struct hx_expr *expr; 131 } 132 /* Line 193 of yacc.c. */ 133 #line 134 "sel-gram.c" 134 YYSTYPE; 135 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 136 # define YYSTYPE_IS_DECLARED 1 137 # define YYSTYPE_IS_TRIVIAL 1 138 #endif 139 140 141 142 /* Copy the second part of user declarations. */ 143 144 145 /* Line 216 of yacc.c. */ 146 #line 147 "sel-gram.c" 147 148 #ifdef short 149 # undef short 150 #endif 151 152 #ifdef YYTYPE_UINT8 153 typedef YYTYPE_UINT8 yytype_uint8; 154 #else 155 typedef unsigned char yytype_uint8; 156 #endif 157 158 #ifdef YYTYPE_INT8 159 typedef YYTYPE_INT8 yytype_int8; 160 #elif (defined __STDC__ || defined __C99__FUNC__ \ 161 || defined __cplusplus || defined _MSC_VER) 162 typedef signed char yytype_int8; 163 #else 164 typedef short int yytype_int8; 165 #endif 166 167 #ifdef YYTYPE_UINT16 168 typedef YYTYPE_UINT16 yytype_uint16; 169 #else 170 typedef unsigned short int yytype_uint16; 171 #endif 172 173 #ifdef YYTYPE_INT16 174 typedef YYTYPE_INT16 yytype_int16; 175 #else 176 typedef short int yytype_int16; 177 #endif 178 179 #ifndef YYSIZE_T 180 # ifdef __SIZE_TYPE__ 181 # define YYSIZE_T __SIZE_TYPE__ 182 # elif defined size_t 183 # define YYSIZE_T size_t 184 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 185 || defined __cplusplus || defined _MSC_VER) 186 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 187 # define YYSIZE_T size_t 188 # else 189 # define YYSIZE_T unsigned int 190 # endif 191 #endif 192 193 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 194 195 #ifndef YY_ 196 # if defined YYENABLE_NLS && YYENABLE_NLS 197 # if ENABLE_NLS 198 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 199 # define YY_(msgid) dgettext ("bison-runtime", msgid) 200 # endif 201 # endif 202 # ifndef YY_ 203 # define YY_(msgid) msgid 204 # endif 205 #endif 206 207 /* Suppress unused-variable warnings by "using" E. */ 208 #if ! defined lint || defined __GNUC__ 209 # define YYUSE(e) ((void) (e)) 210 #else 211 # define YYUSE(e) /* empty */ 212 #endif 213 214 /* Identity function, used to suppress warnings about constant conditions. */ 215 #ifndef lint 216 # define YYID(n) (n) 217 #else 218 #if (defined __STDC__ || defined __C99__FUNC__ \ 219 || defined __cplusplus || defined _MSC_VER) 220 static int 221 YYID (int i) 222 #else 223 static int 224 YYID (i) 225 int i; 226 #endif 227 { 228 return i; 229 } 230 #endif 231 232 #if ! defined yyoverflow || YYERROR_VERBOSE 233 234 /* The parser invokes alloca or malloc; define the necessary symbols. */ 235 236 # ifdef YYSTACK_USE_ALLOCA 237 # if YYSTACK_USE_ALLOCA 238 # ifdef __GNUC__ 239 # define YYSTACK_ALLOC __builtin_alloca 240 # elif defined __BUILTIN_VA_ARG_INCR 241 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 242 # elif defined _AIX 243 # define YYSTACK_ALLOC __alloca 244 # elif defined _MSC_VER 245 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 246 # define alloca _alloca 247 # else 248 # define YYSTACK_ALLOC alloca 249 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 250 || defined __cplusplus || defined _MSC_VER) 251 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 252 # ifndef _STDLIB_H 253 # define _STDLIB_H 1 254 # endif 255 # endif 256 # endif 257 # endif 258 # endif 259 260 # ifdef YYSTACK_ALLOC 261 /* Pacify GCC's `empty if-body' warning. */ 262 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 263 # ifndef YYSTACK_ALLOC_MAXIMUM 264 /* The OS might guarantee only one guard page at the bottom of the stack, 265 and a page size can be as small as 4096 bytes. So we cannot safely 266 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 267 to allow for a few compiler-allocated temporary stack slots. */ 268 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 269 # endif 270 # else 271 # define YYSTACK_ALLOC YYMALLOC 272 # define YYSTACK_FREE YYFREE 273 # ifndef YYSTACK_ALLOC_MAXIMUM 274 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 275 # endif 276 # if (defined __cplusplus && ! defined _STDLIB_H \ 277 && ! ((defined YYMALLOC || defined malloc) \ 278 && (defined YYFREE || defined free))) 279 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 280 # ifndef _STDLIB_H 281 # define _STDLIB_H 1 282 # endif 283 # endif 284 # ifndef YYMALLOC 285 # define YYMALLOC malloc 286 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 287 || defined __cplusplus || defined _MSC_VER) 288 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 289 # endif 290 # endif 291 # ifndef YYFREE 292 # define YYFREE free 293 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 294 || defined __cplusplus || defined _MSC_VER) 295 void free (void *); /* INFRINGES ON USER NAME SPACE */ 296 # endif 297 # endif 298 # endif 299 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 300 301 302 #if (! defined yyoverflow \ 303 && (! defined __cplusplus \ 304 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 305 306 /* A type that is properly aligned for any stack member. */ 307 union yyalloc 308 { 309 yytype_int16 yyss; 310 YYSTYPE yyvs; 311 }; 312 313 /* The size of the maximum gap between one aligned stack and the next. */ 314 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 315 316 /* The size of an array large to enough to hold all stacks, each with 317 N elements. */ 318 # define YYSTACK_BYTES(N) \ 319 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 320 + YYSTACK_GAP_MAXIMUM) 321 322 /* Copy COUNT objects from FROM to TO. The source and destination do 323 not overlap. */ 324 # ifndef YYCOPY 325 # if defined __GNUC__ && 1 < __GNUC__ 326 # define YYCOPY(To, From, Count) \ 327 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 328 # else 329 # define YYCOPY(To, From, Count) \ 330 do \ 331 { \ 332 YYSIZE_T yyi; \ 333 for (yyi = 0; yyi < (Count); yyi++) \ 334 (To)[yyi] = (From)[yyi]; \ 335 } \ 336 while (YYID (0)) 337 # endif 338 # endif 339 340 /* Relocate STACK from its old location to the new one. The 341 local variables YYSIZE and YYSTACKSIZE give the old and new number of 342 elements in the stack, and YYPTR gives the new location of the 343 stack. Advance YYPTR to a properly aligned location for the next 344 stack. */ 345 # define YYSTACK_RELOCATE(Stack) \ 346 do \ 347 { \ 348 YYSIZE_T yynewbytes; \ 349 YYCOPY (&yyptr->Stack, Stack, yysize); \ 350 Stack = &yyptr->Stack; \ 351 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 352 yyptr += yynewbytes / sizeof (*yyptr); \ 353 } \ 354 while (YYID (0)) 355 356 #endif 357 358 /* YYFINAL -- State number of the termination state. */ 359 #define YYFINAL 21 360 /* YYLAST -- Last index in YYTABLE. */ 361 #define YYLAST 50 362 363 /* YYNTOKENS -- Number of terminals. */ 364 #define YYNTOKENS 21 365 /* YYNNTS -- Number of nonterminals. */ 366 #define YYNNTS 11 367 /* YYNRULES -- Number of rules. */ 368 #define YYNRULES 26 369 /* YYNRULES -- Number of states. */ 370 #define YYNSTATES 50 371 372 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 373 #define YYUNDEFTOK 2 374 #define YYMAXUTOK 266 375 376 #define YYTRANSLATE(YYX) \ 377 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 378 379 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 380 static const yytype_uint8 yytranslate[] = 381 { 382 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 383 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 384 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 385 2, 2, 2, 12, 2, 2, 2, 17, 2, 2, 386 13, 14, 2, 2, 15, 2, 20, 2, 2, 2, 387 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 388 2, 16, 2, 2, 2, 2, 2, 2, 2, 2, 389 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 390 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 391 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 392 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 393 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 394 2, 2, 2, 18, 2, 19, 2, 2, 2, 2, 395 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 396 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 397 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 398 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 399 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 400 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 401 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 402 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 403 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 404 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 407 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 408 5, 6, 7, 8, 9, 10, 11 409 }; 410 411 #if YYDEBUG 412 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 413 YYRHS. */ 414 static const yytype_uint8 yyprhs[] = 415 { 416 0, 0, 3, 5, 7, 9, 12, 16, 20, 24, 417 26, 28, 32, 37, 42, 46, 52, 56, 58, 60, 418 62, 64, 66, 68, 73, 78, 82 419 }; 420 421 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 422 static const yytype_int8 yyrhs[] = 423 { 424 22, 0, -1, 23, -1, 3, -1, 4, -1, 12, 425 23, -1, 23, 5, 23, -1, 23, 6, 23, -1, 426 13, 23, 14, -1, 25, -1, 26, -1, 26, 15, 427 24, -1, 26, 16, 16, 26, -1, 26, 12, 16, 428 26, -1, 26, 8, 26, -1, 26, 7, 13, 24, 429 14, -1, 26, 7, 30, -1, 27, -1, 28, -1, 430 29, -1, 30, -1, 9, -1, 10, -1, 11, 13, 431 24, 14, -1, 17, 18, 31, 19, -1, 11, 20, 432 31, -1, 11, -1 433 }; 434 435 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 436 static const yytype_uint8 yyrline[] = 437 { 438 0, 73, 73, 75, 76, 77, 78, 79, 80, 81, 439 84, 85, 88, 89, 90, 91, 92, 95, 96, 97, 440 98, 101, 102, 104, 107, 110, 112 441 }; 442 #endif 443 444 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 445 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 446 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 447 static const char *const yytname[] = 448 { 449 "$end", "error", "$undefined", "kw_TRUE", "kw_FALSE", "kw_AND", "kw_OR", 450 "kw_IN", "kw_TAILMATCH", "NUMBER", "STRING", "IDENTIFIER", "'!'", "'('", 451 "')'", "','", "'='", "'%'", "'{'", "'}'", "'.'", "$accept", "start", 452 "expr", "words", "comp", "word", "number", "string", "function", 453 "variable", "variables", 0 454 }; 455 #endif 456 457 # ifdef YYPRINT 458 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 459 token YYLEX-NUM. */ 460 static const yytype_uint16 yytoknum[] = 461 { 462 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 463 265, 266, 33, 40, 41, 44, 61, 37, 123, 125, 464 46 465 }; 466 # endif 467 468 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 469 static const yytype_uint8 yyr1[] = 470 { 471 0, 21, 22, 23, 23, 23, 23, 23, 23, 23, 472 24, 24, 25, 25, 25, 25, 25, 26, 26, 26, 473 26, 27, 28, 29, 30, 31, 31 474 }; 475 476 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 477 static const yytype_uint8 yyr2[] = 478 { 479 0, 2, 1, 1, 1, 2, 3, 3, 3, 1, 480 1, 3, 4, 4, 3, 5, 3, 1, 1, 1, 481 1, 1, 1, 4, 4, 3, 1 482 }; 483 484 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 485 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 486 means the default is an error. */ 487 static const yytype_uint8 yydefact[] = 488 { 489 0, 3, 4, 21, 22, 0, 0, 0, 0, 0, 490 2, 9, 0, 17, 18, 19, 20, 0, 5, 0, 491 0, 1, 0, 0, 0, 0, 0, 0, 0, 10, 492 8, 26, 0, 6, 7, 0, 16, 14, 0, 0, 493 23, 0, 0, 24, 0, 13, 12, 11, 25, 15 494 }; 495 496 /* YYDEFGOTO[NTERM-NUM]. */ 497 static const yytype_int8 yydefgoto[] = 498 { 499 -1, 9, 10, 28, 11, 12, 13, 14, 15, 16, 500 32 501 }; 502 503 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 504 STATE-NUM. */ 505 #define YYPACT_NINF -31 506 static const yytype_int8 yypact[] = 507 { 508 22, -31, -31, -31, -31, -1, 22, 22, -11, 27, 509 11, -31, -6, -31, -31, -31, -31, 19, 11, 9, 510 26, -31, 22, 22, -4, 19, 24, 25, 28, 23, 511 -31, 29, 31, 11, 11, 19, -31, -31, 19, 19, 512 -31, 19, 26, -31, 30, -31, -31, -31, -31, -31 513 }; 514 515 /* YYPGOTO[NTERM-NUM]. */ 516 static const yytype_int8 yypgoto[] = 517 { 518 -31, -31, -3, -30, -31, -17, -31, -31, -31, 21, 519 1 520 }; 521 522 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 523 positive, shift that token. If negative, reduce the rule which 524 number is the opposite. If zero, do what YYDEFACT says. 525 If YYTABLE_NINF, syntax error. */ 526 #define YYTABLE_NINF -1 527 static const yytype_uint8 yytable[] = 528 { 529 29, 24, 25, 18, 19, 44, 26, 20, 37, 35, 530 27, 47, 17, 8, 22, 23, 22, 23, 29, 33, 531 34, 45, 46, 30, 29, 1, 2, 21, 3, 4, 532 5, 3, 4, 5, 6, 7, 8, 31, 41, 8, 533 38, 39, 40, 48, 49, 36, 0, 0, 0, 42, 534 43 535 }; 536 537 static const yytype_int8 yycheck[] = 538 { 539 17, 7, 8, 6, 7, 35, 12, 18, 25, 13, 540 16, 41, 13, 17, 5, 6, 5, 6, 35, 22, 541 23, 38, 39, 14, 41, 3, 4, 0, 9, 10, 542 11, 9, 10, 11, 12, 13, 17, 11, 15, 17, 543 16, 16, 14, 42, 14, 24, -1, -1, -1, 20, 544 19 545 }; 546 547 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 548 symbol of state STATE-NUM. */ 549 static const yytype_uint8 yystos[] = 550 { 551 0, 3, 4, 9, 10, 11, 12, 13, 17, 22, 552 23, 25, 26, 27, 28, 29, 30, 13, 23, 23, 553 18, 0, 5, 6, 7, 8, 12, 16, 24, 26, 554 14, 11, 31, 23, 23, 13, 30, 26, 16, 16, 555 14, 15, 20, 19, 24, 26, 26, 24, 31, 14 556 }; 251 #define YYSTACK_ALLOC malloc 252 #endif 253 254 /* Note: there must be only one dollar sign in this file. 255 It is replaced by the list of actions, each action 256 as one case of the switch. */ 557 257 558 258 #define yyerrok (yyerrstatus = 0) 559 259 #define yyclearin (yychar = YYEMPTY) 560 #define YYEMPTY (-2)260 #define YYEMPTY -2 561 261 #define YYEOF 0 562 563 262 #define YYACCEPT goto yyacceptlab 564 #define YYABORT goto yyabortlab 565 #define YYERROR goto yyerrorlab 566 567 568 /* Like YYERROR except do call yyerror. This remains here temporarily 569 to ease the transition to the new meaning of YYERROR, for GCC. 263 #define YYABORT goto yyabortlab 264 #define YYERROR goto yyerrlab1 265 /* Like YYERROR except do call yyerror. 266 This remains here temporarily to ease the 267 transition to the new meaning of YYERROR, for GCC. 570 268 Once GCC version 2 has supplanted version 1, this can go. */ 571 572 269 #define YYFAIL goto yyerrlab 573 574 270 #define YYRECOVERING() (!!yyerrstatus) 575 576 #define YYBACKUP(Token, Value) \ 271 #define YYBACKUP(token, value) \ 577 272 do \ 578 273 if (yychar == YYEMPTY && yylen == 1) \ 579 { \ 580 yychar = (Token); \ 581 yylval = (Value); \ 582 yytoken = YYTRANSLATE (yychar); \ 583 YYPOPSTACK (1); \ 274 { yychar = (token), yylval = (value); \ 275 yychar1 = YYTRANSLATE (yychar); \ 276 YYPOPSTACK; \ 584 277 goto yybackup; \ 585 278 } \ 586 279 else \ 587 { \ 588 yyerror (YY_("syntax error: cannot back up")); \ 589 YYERROR; \ 590 } \ 591 while (YYID (0)) 592 280 { yyerror ("syntax error: cannot back up"); YYERROR; } \ 281 while (0) 593 282 594 283 #define YYTERROR 1 595 284 #define YYERRCODE 256 596 285 597 598 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 599 If N is 0, then set CURRENT to the empty location which ends 600 the previous symbol: RHS[0] (always defined). */ 601 602 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 603 #ifndef YYLLOC_DEFAULT 604 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 605 do \ 606 if (YYID (N)) \ 607 { \ 608 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 609 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 610 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 611 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 612 } \ 613 else \ 614 { \ 615 (Current).first_line = (Current).last_line = \ 616 YYRHSLOC (Rhs, 0).last_line; \ 617 (Current).first_column = (Current).last_column = \ 618 YYRHSLOC (Rhs, 0).last_column; \ 619 } \ 620 while (YYID (0)) 621 #endif 622 623 624 /* YY_LOCATION_PRINT -- Print the location on the stream. 625 This macro was not mandated originally: define only if we know 626 we won't break user code: when these are the locations we know. */ 627 628 #ifndef YY_LOCATION_PRINT 629 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 630 # define YY_LOCATION_PRINT(File, Loc) \ 631 fprintf (File, "%d.%d-%d.%d", \ 632 (Loc).first_line, (Loc).first_column, \ 633 (Loc).last_line, (Loc).last_column) 634 # else 635 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 636 # endif 637 #endif 638 639 640 /* YYLEX -- calling `yylex' with the right arguments. */ 641 286 #ifndef YYPURE 287 #define YYLEX yylex() 288 #endif 289 290 #ifdef YYPURE 291 #ifdef YYLSP_NEEDED 642 292 #ifdef YYLEX_PARAM 643 # define YYLEX yylex (YYLEX_PARAM)293 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) 644 294 #else 645 # define YYLEX yylex () 646 #endif 647 648 /* Enable debugging if requested. */ 649 #if YYDEBUG 650 651 # ifndef YYFPRINTF 652 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 653 # define YYFPRINTF fprintf 654 # endif 655 656 # define YYDPRINTF(Args) \ 657 do { \ 658 if (yydebug) \ 659 YYFPRINTF Args; \ 660 } while (YYID (0)) 661 662 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 663 do { \ 664 if (yydebug) \ 665 { \ 666 YYFPRINTF (stderr, "%s ", Title); \ 667 yy_symbol_print (stderr, \ 668 Type, Value); \ 669 YYFPRINTF (stderr, "\n"); \ 670 } \ 671 } while (YYID (0)) 672 673 674 /*--------------------------------. 675 | Print this symbol on YYOUTPUT. | 676 `--------------------------------*/ 677 678 /*ARGSUSED*/ 679 #if (defined __STDC__ || defined __C99__FUNC__ \ 680 || defined __cplusplus || defined _MSC_VER) 295 #define YYLEX yylex(&yylval, &yylloc) 296 #endif 297 #else /* not YYLSP_NEEDED */ 298 #ifdef YYLEX_PARAM 299 #define YYLEX yylex(&yylval, YYLEX_PARAM) 300 #else 301 #define YYLEX yylex(&yylval) 302 #endif 303 #endif /* not YYLSP_NEEDED */ 304 #endif 305 306 /* If nonreentrant, generate the variables here */ 307 308 #ifndef YYPURE 309 310 int yychar; /* the lookahead symbol */ 311 YYSTYPE yylval; /* the semantic value of the */ 312 /* lookahead symbol */ 313 314 #ifdef YYLSP_NEEDED 315 YYLTYPE yylloc; /* location data for the lookahead */ 316 /* symbol */ 317 #endif 318 319 int yynerrs; /* number of parse errors so far */ 320 #endif /* not YYPURE */ 321 322 #if YYDEBUG != 0 323 int yydebug; /* nonzero means print parse trace */ 324 /* Since this is uninitialized, it does not stop multiple parsers 325 from coexisting. */ 326 #endif 327 328 /* YYINITDEPTH indicates the initial size of the parser's stacks */ 329 330 #ifndef YYINITDEPTH 331 #define YYINITDEPTH 200 332 #endif 333 334 /* YYMAXDEPTH is the maximum size the stacks can grow to 335 (effective only if the built-in stack extension method is used). */ 336 337 #if YYMAXDEPTH == 0 338 #undef YYMAXDEPTH 339 #endif 340 341 #ifndef YYMAXDEPTH 342 #define YYMAXDEPTH 10000 343 #endif 344 345 346 /* Define __yy_memcpy. Note that the size argument 347 should be passed with type unsigned int, because that is what the non-GCC 348 definitions require. With GCC, __builtin_memcpy takes an arg 349 of type size_t, but it can handle unsigned int. */ 350 351 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ 352 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) 353 #else /* not GNU C or C++ */ 354 #ifndef __cplusplus 355 356 /* This is the most reliable way to avoid incompatibilities 357 in available built-in functions on various systems. */ 681 358 static void 682 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 359 __yy_memcpy (to, from, count) 360 char *to; 361 char *from; 362 unsigned int count; 363 { 364 register char *f = from; 365 register char *t = to; 366 register int i = count; 367 368 while (i-- > 0) 369 *t++ = *f++; 370 } 371 372 #else /* __cplusplus */ 373 374 /* This is the most reliable way to avoid incompatibilities 375 in available built-in functions on various systems. */ 376 static void 377 __yy_memcpy (char *to, char *from, unsigned int count) 378 { 379 register char *t = to; 380 register char *f = from; 381 register int i = count; 382 383 while (i-- > 0) 384 *t++ = *f++; 385 } 386 387 #endif 388 #endif 389 390 391 #line 217 "/emx/share/bison.simple" 392 393 /* The user can define YYPARSE_PARAM as the name of an argument to be passed 394 into yyparse. The argument should have type void *. 395 It should actually point to an object. 396 Grammar actions can access the variable by casting it 397 to the proper pointer type. */ 398 399 #ifdef YYPARSE_PARAM 400 #ifdef __cplusplus 401 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM 402 #define YYPARSE_PARAM_DECL 403 #else /* not __cplusplus */ 404 #define YYPARSE_PARAM_ARG YYPARSE_PARAM 405 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; 406 #endif /* not __cplusplus */ 407 #else /* not YYPARSE_PARAM */ 408 #define YYPARSE_PARAM_ARG 409 #define YYPARSE_PARAM_DECL 410 #endif /* not YYPARSE_PARAM */ 411 412 /* Prevent warning if -Wstrict-prototypes. */ 413 #ifdef __GNUC__ 414 #ifdef YYPARSE_PARAM 415 int yyparse (void *); 683 416 #else 684 static void 685 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 686 FILE *yyoutput; 687 int yytype; 688 YYSTYPE const * const yyvaluep; 689 #endif 417 int yyparse (void); 418 #endif 419 #endif 420 421 int 422 yyparse(YYPARSE_PARAM_ARG) 423 YYPARSE_PARAM_DECL 690 424 { 691 if (!yyvaluep) 692 return; 693 # ifdef YYPRINT 694 if (yytype < YYNTOKENS) 695 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 696 # else 697 YYUSE (yyoutput); 698 # endif 699 switch (yytype) 700 { 701 default: 702 break; 703 } 704 } 705 706 707 /*--------------------------------. 708 | Print this symbol on YYOUTPUT. | 709 `--------------------------------*/ 710 711 #if (defined __STDC__ || defined __C99__FUNC__ \ 712 || defined __cplusplus || defined _MSC_VER) 713 static void 714 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 425 register int yystate; 426 register int yyn; 427 register short *yyssp; 428 register YYSTYPE *yyvsp; 429 int yyerrstatus; /* number of tokens to shift before error messages enabled */ 430 int yychar1 = 0; /* lookahead token as an internal (translated) token number */ 431 432 short yyssa[YYINITDEPTH]; /* the state stack */ 433 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ 434 435 short *yyss = yyssa; /* refer to the stacks thru separate pointers */ 436 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ 437 438 #ifdef YYLSP_NEEDED 439 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ 440 YYLTYPE *yyls = yylsa; 441 YYLTYPE *yylsp; 442 443 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) 715 444 #else 716 static void 717 yy_symbol_print (yyoutput, yytype, yyvaluep) 718 FILE *yyoutput; 719 int yytype; 720 YYSTYPE const * const yyvaluep; 721 #endif 722 { 723 if (yytype < YYNTOKENS) 724 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 725 else 726 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 727 728 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 729 YYFPRINTF (yyoutput, ")"); 730 } 731 732 /*------------------------------------------------------------------. 733 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 734 | TOP (included). | 735 `------------------------------------------------------------------*/ 736 737 #if (defined __STDC__ || defined __C99__FUNC__ \ 738 || defined __cplusplus || defined _MSC_VER) 739 static void 740 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 741 #else 742 static void 743 yy_stack_print (bottom, top) 744 yytype_int16 *bottom; 745 yytype_int16 *top; 746 #endif 747 { 748 YYFPRINTF (stderr, "Stack now"); 749 for (; bottom <= top; ++bottom) 750 YYFPRINTF (stderr, " %d", *bottom); 751 YYFPRINTF (stderr, "\n"); 752 } 753 754 # define YY_STACK_PRINT(Bottom, Top) \ 755 do { \ 756 if (yydebug) \ 757 yy_stack_print ((Bottom), (Top)); \ 758 } while (YYID (0)) 759 760 761 /*------------------------------------------------. 762 | Report that the YYRULE is going to be reduced. | 763 `------------------------------------------------*/ 764 765 #if (defined __STDC__ || defined __C99__FUNC__ \ 766 || defined __cplusplus || defined _MSC_VER) 767 static void 768 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 769 #else 770 static void 771 yy_reduce_print (yyvsp, yyrule) 772 YYSTYPE *yyvsp; 773 int yyrule; 774 #endif 775 { 776 int yynrhs = yyr2[yyrule]; 777 int yyi; 778 unsigned long int yylno = yyrline[yyrule]; 779 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 780 yyrule - 1, yylno); 781 /* The symbols being reduced. */ 782 for (yyi = 0; yyi < yynrhs; yyi++) 783 { 784 fprintf (stderr, " $%d = ", yyi + 1); 785 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 786 &(yyvsp[(yyi + 1) - (yynrhs)]) 787 ); 788 fprintf (stderr, "\n"); 789 } 790 } 791 792 # define YY_REDUCE_PRINT(Rule) \ 793 do { \ 794 if (yydebug) \ 795 yy_reduce_print (yyvsp, Rule); \ 796 } while (YYID (0)) 797 798 /* Nonzero means print parse trace. It is left uninitialized so that 799 multiple parsers can coexist. */ 800 int yydebug; 801 #else /* !YYDEBUG */ 802 # define YYDPRINTF(Args) 803 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 804 # define YY_STACK_PRINT(Bottom, Top) 805 # define YY_REDUCE_PRINT(Rule) 806 #endif /* !YYDEBUG */ 807 808 809 /* YYINITDEPTH -- initial size of the parser's stacks. */ 810 #ifndef YYINITDEPTH 811 # define YYINITDEPTH 200 812 #endif 813 814 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 815 if the built-in stack extension method is used). 816 817 Do not make this value too large; the results are undefined if 818 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 819 evaluated with infinite-precision integer arithmetic. */ 820 821 #ifndef YYMAXDEPTH 822 # define YYMAXDEPTH 10000 823 #endif 824 825 826 827 828 #if YYERROR_VERBOSE 829 830 # ifndef yystrlen 831 # if defined __GLIBC__ && defined _STRING_H 832 # define yystrlen strlen 833 # else 834 /* Return the length of YYSTR. */ 835 #if (defined __STDC__ || defined __C99__FUNC__ \ 836 || defined __cplusplus || defined _MSC_VER) 837 static YYSIZE_T 838 yystrlen (const char *yystr) 839 #else 840 static YYSIZE_T 841 yystrlen (yystr) 842 const char *yystr; 843 #endif 844 { 845 YYSIZE_T yylen; 846 for (yylen = 0; yystr[yylen]; yylen++) 847 continue; 848 return yylen; 849 } 850 # endif 851 # endif 852 853 # ifndef yystpcpy 854 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 855 # define yystpcpy stpcpy 856 # else 857 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 858 YYDEST. */ 859 #if (defined __STDC__ || defined __C99__FUNC__ \ 860 || defined __cplusplus || defined _MSC_VER) 861 static char * 862 yystpcpy (char *yydest, const char *yysrc) 863 #else 864 static char * 865 yystpcpy (yydest, yysrc) 866 char *yydest; 867 const char *yysrc; 868 #endif 869 { 870 char *yyd = yydest; 871 const char *yys = yysrc; 872 873 while ((*yyd++ = *yys++) != '\0') 874 continue; 875 876 return yyd - 1; 877 } 878 # endif 879 # endif 880 881 # ifndef yytnamerr 882 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 883 quotes and backslashes, so that it's suitable for yyerror. The 884 heuristic is that double-quoting is unnecessary unless the string 885 contains an apostrophe, a comma, or backslash (other than 886 backslash-backslash). YYSTR is taken from yytname. If YYRES is 887 null, do not copy; instead, return the length of what the result 888 would have been. */ 889 static YYSIZE_T 890 yytnamerr (char *yyres, const char *yystr) 891 { 892 if (*yystr == '"') 893 { 894 YYSIZE_T yyn = 0; 895 char const *yyp = yystr; 896 897 for (;;) 898 switch (*++yyp) 899 { 900 case '\'': 901 case ',': 902 goto do_not_strip_quotes; 903 904 case '\\': 905 if (*++yyp != '\\') 906 goto do_not_strip_quotes; 907 /* Fall through. */ 908 default: 909 if (yyres) 910 yyres[yyn] = *yyp; 911 yyn++; 912 break; 913 914 case '"': 915 if (yyres) 916 yyres[yyn] = '\0'; 917 return yyn; 918 } 919 do_not_strip_quotes: ; 920 } 921 922 if (! yyres) 923 return yystrlen (yystr); 924 925 return yystpcpy (yyres, yystr) - yyres; 926 } 927 # endif 928 929 /* Copy into YYRESULT an error message about the unexpected token 930 YYCHAR while in state YYSTATE. Return the number of bytes copied, 931 including the terminating null byte. If YYRESULT is null, do not 932 copy anything; just return the number of bytes that would be 933 copied. As a special case, return 0 if an ordinary "syntax error" 934 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 935 size calculation. */ 936 static YYSIZE_T 937 yysyntax_error (char *yyresult, int yystate, int yychar) 938 { 939 int yyn = yypact[yystate]; 940 941 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 942 return 0; 943 else 944 { 945 int yytype = YYTRANSLATE (yychar); 946 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 947 YYSIZE_T yysize = yysize0; 948 YYSIZE_T yysize1; 949 int yysize_overflow = 0; 950 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 951 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 952 int yyx; 953 954 # if 0 955 /* This is so xgettext sees the translatable formats that are 956 constructed on the fly. */ 957 YY_("syntax error, unexpected %s"); 958 YY_("syntax error, unexpected %s, expecting %s"); 959 YY_("syntax error, unexpected %s, expecting %s or %s"); 960 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 961 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 962 # endif 963 char *yyfmt; 964 char const *yyf; 965 static char const yyunexpected[] = "syntax error, unexpected %s"; 966 static char const yyexpecting[] = ", expecting %s"; 967 static char const yyor[] = " or %s"; 968 char yyformat[sizeof yyunexpected 969 + sizeof yyexpecting - 1 970 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 971 * (sizeof yyor - 1))]; 972 char const *yyprefix = yyexpecting; 973 974 /* Start YYX at -YYN if negative to avoid negative indexes in 975 YYCHECK. */ 976 int yyxbegin = yyn < 0 ? -yyn : 0; 977 978 /* Stay within bounds of both yycheck and yytname. */ 979 int yychecklim = YYLAST - yyn + 1; 980 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 981 int yycount = 1; 982 983 yyarg[0] = yytname[yytype]; 984 yyfmt = yystpcpy (yyformat, yyunexpected); 985 986 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 987 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 988 { 989 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 990 { 991 yycount = 1; 992 yysize = yysize0; 993 yyformat[sizeof yyunexpected - 1] = '\0'; 994 break; 995 } 996 yyarg[yycount++] = yytname[yyx]; 997 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 998 yysize_overflow |= (yysize1 < yysize); 999 yysize = yysize1; 1000 yyfmt = yystpcpy (yyfmt, yyprefix); 1001 yyprefix = yyor; 1002 } 1003 1004 yyf = YY_(yyformat); 1005 yysize1 = yysize + yystrlen (yyf); 1006 yysize_overflow |= (yysize1 < yysize); 1007 yysize = yysize1; 1008 1009 if (yysize_overflow) 1010 return YYSIZE_MAXIMUM; 1011 1012 if (yyresult) 1013 { 1014 /* Avoid sprintf, as that infringes on the user's name space. 1015 Don't have undefined behavior even if the translation 1016 produced a string with the wrong number of "%s"s. */ 1017 char *yyp = yyresult; 1018 int yyi = 0; 1019 while ((*yyp = *yyf) != '\0') 1020 { 1021 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1022 { 1023 yyp += yytnamerr (yyp, yyarg[yyi++]); 1024 yyf += 2; 1025 } 1026 else 1027 { 1028 yyp++; 1029 yyf++; 1030 } 1031 } 1032 } 1033 return yysize; 1034 } 1035 } 1036 #endif /* YYERROR_VERBOSE */ 1037 1038 1039 1040 /*-----------------------------------------------. 1041 | Release the memory associated to this symbol. | 1042 `-----------------------------------------------*/ 1043 1044 /*ARGSUSED*/ 1045 #if (defined __STDC__ || defined __C99__FUNC__ \ 1046 || defined __cplusplus || defined _MSC_VER) 1047 static void 1048 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1049 #else 1050 static void 1051 yydestruct (yymsg, yytype, yyvaluep) 1052 const char *yymsg; 1053 int yytype; 1054 YYSTYPE *yyvaluep; 1055 #endif 1056 { 1057 YYUSE (yyvaluep); 1058 1059 if (!yymsg) 1060 yymsg = "Deleting"; 1061 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1062 1063 switch (yytype) 1064 { 1065 1066 default: 1067 break; 1068 } 1069 } 1070 1071 1072 1073 /* Prevent warnings from -Wmissing-prototypes. */ 1074 1075 #ifdef YYPARSE_PARAM 1076 #if defined __STDC__ || defined __cplusplus 1077 int yyparse (void *YYPARSE_PARAM); 1078 #else 1079 int yyparse (); 1080 #endif 1081 #else /* ! YYPARSE_PARAM */ 1082 #if defined __STDC__ || defined __cplusplus 1083 int yyparse (void); 1084 #else 1085 int yyparse (); 1086 #endif 1087 #endif /* ! YYPARSE_PARAM */ 1088 1089 1090 1091 /* The look-ahead symbol. */ 1092 int yychar; 1093 1094 /* The semantic value of the look-ahead symbol. */ 1095 YYSTYPE yylval; 1096 1097 /* Number of syntax errors so far. */ 1098 int yynerrs; 1099 1100 1101 1102 /*----------. 1103 | yyparse. | 1104 `----------*/ 1105 1106 #ifdef YYPARSE_PARAM 1107 #if (defined __STDC__ || defined __C99__FUNC__ \ 1108 || defined __cplusplus || defined _MSC_VER) 1109 int 1110 yyparse (void *YYPARSE_PARAM) 1111 #else 1112 int 1113 yyparse (YYPARSE_PARAM) 1114 void *YYPARSE_PARAM; 1115 #endif 1116 #else /* ! YYPARSE_PARAM */ 1117 #if (defined __STDC__ || defined __C99__FUNC__ \ 1118 || defined __cplusplus || defined _MSC_VER) 1119 int 1120 yyparse (void) 1121 #else 1122 int 1123 yyparse () 1124 1125 #endif 1126 #endif 1127 { 1128 1129 int yystate; 1130 int yyn; 1131 int yyresult; 1132 /* Number of tokens to shift before error messages enabled. */ 1133 int yyerrstatus; 1134 /* Look-ahead token as an internal (translated) token number. */ 1135 int yytoken = 0; 1136 #if YYERROR_VERBOSE 1137 /* Buffer for error messages, and its allocated size. */ 1138 char yymsgbuf[128]; 1139 char *yymsg = yymsgbuf; 1140 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1141 #endif 1142 1143 /* Three stacks and their tools: 1144 `yyss': related to states, 1145 `yyvs': related to semantic values, 1146 `yyls': related to locations. 1147 1148 Refer to the stacks thru separate pointers, to allow yyoverflow 1149 to reallocate them elsewhere. */ 1150 1151 /* The state stack. */ 1152 yytype_int16 yyssa[YYINITDEPTH]; 1153 yytype_int16 *yyss = yyssa; 1154 yytype_int16 *yyssp; 1155 1156 /* The semantic value stack. */ 1157 YYSTYPE yyvsa[YYINITDEPTH]; 1158 YYSTYPE *yyvs = yyvsa; 1159 YYSTYPE *yyvsp; 1160 1161 1162 1163 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1164 1165 YYSIZE_T yystacksize = YYINITDEPTH; 1166 1167 /* The variables used to return semantic value and location from the 1168 action routines. */ 1169 YYSTYPE yyval; 1170 1171 1172 /* The number of symbols on the RHS of the reduced rule. 1173 Keep to zero when no symbol should be popped. */ 1174 int yylen = 0; 1175 1176 YYDPRINTF ((stderr, "Starting parse\n")); 445 #define YYPOPSTACK (yyvsp--, yyssp--) 446 #endif 447 448 int yystacksize = YYINITDEPTH; 449 int yyfree_stacks = 0; 450 451 #ifdef YYPURE 452 int yychar; 453 YYSTYPE yylval; 454 int yynerrs; 455 #ifdef YYLSP_NEEDED 456 YYLTYPE yylloc; 457 #endif 458 #endif 459 460 YYSTYPE yyval; /* the variable used to return */ 461 /* semantic values from the action */ 462 /* routines */ 463 464 int yylen; 465 466 #if YYDEBUG != 0 467 if (yydebug) 468 fprintf(stderr, "Starting parse\n"); 469 #endif 1177 470 1178 471 yystate = 0; … … 1186 479 The wasted elements are never initialized. */ 1187 480 1188 yyssp = yyss ;481 yyssp = yyss - 1; 1189 482 yyvsp = yyvs; 1190 1191 goto yysetstate; 1192 1193 /*------------------------------------------------------------. 1194 | yynewstate -- Push a new state, which is found in yystate. | 1195 `------------------------------------------------------------*/ 1196 yynewstate: 1197 /* In all cases, when you get here, the value and location stacks 1198 have just been pushed. So pushing a state here evens the stacks. */ 1199 yyssp++; 1200 1201 yysetstate: 1202 *yyssp = yystate; 1203 1204 if (yyss + yystacksize - 1 <= yyssp) 1205 { 483 #ifdef YYLSP_NEEDED 484 yylsp = yyls; 485 #endif 486 487 /* Push a new state, which is found in yystate . */ 488 /* In all cases, when you get here, the value and location stacks 489 have just been pushed. so pushing a state here evens the stacks. */ 490 yynewstate: 491 492 *++yyssp = yystate; 493 494 if (yyssp >= yyss + yystacksize - 1) 495 { 496 /* Give user a chance to reallocate the stack */ 497 /* Use copies of these so that the &'s don't force the real ones into memory. */ 498 YYSTYPE *yyvs1 = yyvs; 499 short *yyss1 = yyss; 500 #ifdef YYLSP_NEEDED 501 YYLTYPE *yyls1 = yyls; 502 #endif 503 1206 504 /* Get the current used size of the three stacks, in elements. */ 1207 YYSIZE_T yysize = yyssp - yyss + 1;505 int size = yyssp - yyss + 1; 1208 506 1209 507 #ifdef yyoverflow 1210 {1211 /* Give user a chance to reallocate the stack. Use copies of1212 these so that the &'s don't force the real ones into 1213 memory. */ 1214 YYSTYPE *yyvs1 = yyvs;1215 yytype_int16 *yyss1 = yyss; 1216 1217 1218 /* Each stack pointer address is followed by the size of the1219 data in use in that stack, in bytes. This used to be a1220 conditional around just the two extra args, but that might 1221 be undefined if yyoverflow is a macro. */ 1222 yyoverflow (YY_("memory exhausted"),1223 &yyss1, yysize * sizeof (*yyssp),1224 &yyvs1, yysize * sizeof (*yyvsp),1225 1226 &yystacksize); 1227 1228 yyss = yyss1; 1229 yyvs = yyvs1;1230 } 508 /* Each stack pointer address is followed by the size of 509 the data in use in that stack, in bytes. */ 510 #ifdef YYLSP_NEEDED 511 /* This used to be a conditional around just the two extra args, 512 but that might be undefined if yyoverflow is a macro. */ 513 yyoverflow("parser stack overflow", 514 &yyss1, size * sizeof (*yyssp), 515 &yyvs1, size * sizeof (*yyvsp), 516 &yyls1, size * sizeof (*yylsp), 517 &yystacksize); 518 #else 519 yyoverflow("parser stack overflow", 520 &yyss1, size * sizeof (*yyssp), 521 &yyvs1, size * sizeof (*yyvsp), 522 &yystacksize); 523 #endif 524 525 yyss = yyss1; yyvs = yyvs1; 526 #ifdef YYLSP_NEEDED 527 yyls = yyls1; 528 #endif 1231 529 #else /* no yyoverflow */ 1232 # ifndef YYSTACK_RELOCATE1233 goto yyexhaustedlab;1234 # else1235 530 /* Extend the stack our own way. */ 1236 if (YYMAXDEPTH <= yystacksize) 1237 goto yyexhaustedlab; 531 if (yystacksize >= YYMAXDEPTH) 532 { 533 yyerror("parser stack overflow"); 534 if (yyfree_stacks) 535 { 536 free (yyss); 537 free (yyvs); 538 #ifdef YYLSP_NEEDED 539 free (yyls); 540 #endif 541 } 542 return 2; 543 } 1238 544 yystacksize *= 2; 1239 if ( YYMAXDEPTH < yystacksize)545 if (yystacksize > YYMAXDEPTH) 1240 546 yystacksize = YYMAXDEPTH; 1241 1242 { 1243 yytype_int16 *yyss1 = yyss; 1244 union yyalloc *yyptr = 1245 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1246 if (! yyptr) 1247 goto yyexhaustedlab; 1248 YYSTACK_RELOCATE (yyss); 1249 YYSTACK_RELOCATE (yyvs); 1250 1251 # undef YYSTACK_RELOCATE 1252 if (yyss1 != yyssa) 1253 YYSTACK_FREE (yyss1); 1254 } 1255 # endif 547 #ifndef YYSTACK_USE_ALLOCA 548 yyfree_stacks = 1; 549 #endif 550 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); 551 __yy_memcpy ((char *)yyss, (char *)yyss1, 552 size * (unsigned int) sizeof (*yyssp)); 553 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); 554 __yy_memcpy ((char *)yyvs, (char *)yyvs1, 555 size * (unsigned int) sizeof (*yyvsp)); 556 #ifdef YYLSP_NEEDED 557 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); 558 __yy_memcpy ((char *)yyls, (char *)yyls1, 559 size * (unsigned int) sizeof (*yylsp)); 560 #endif 1256 561 #endif /* no yyoverflow */ 1257 562 1258 yyssp = yyss + yysize - 1; 1259 yyvsp = yyvs + yysize - 1; 1260 1261 1262 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1263 (unsigned long int) yystacksize)); 1264 1265 if (yyss + yystacksize - 1 <= yyssp) 563 yyssp = yyss + size - 1; 564 yyvsp = yyvs + size - 1; 565 #ifdef YYLSP_NEEDED 566 yylsp = yyls + size - 1; 567 #endif 568 569 #if YYDEBUG != 0 570 if (yydebug) 571 fprintf(stderr, "Stack size increased to %d\n", yystacksize); 572 #endif 573 574 if (yyssp >= yyss + yystacksize - 1) 1266 575 YYABORT; 1267 576 } 1268 577 1269 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 578 #if YYDEBUG != 0 579 if (yydebug) 580 fprintf(stderr, "Entering state %d\n", yystate); 581 #endif 1270 582 1271 583 goto yybackup; 1272 1273 /*-----------. 1274 | yybackup. | 1275 `-----------*/ 1276 yybackup: 1277 1278 /* Do appropriate processing given the current state. Read a 1279 look-ahead token if we need one and don't already have one. */ 1280 1281 /* First try to decide what to do without reference to look-ahead token. */ 584 yybackup: 585 586 /* Do appropriate processing given the current state. */ 587 /* Read a lookahead token if we need one and don't already have one. */ 588 /* yyresume: */ 589 590 /* First try to decide what to do without reference to lookahead token. */ 591 1282 592 yyn = yypact[yystate]; 1283 if (yyn == YY PACT_NINF)593 if (yyn == YYFLAG) 1284 594 goto yydefault; 1285 595 1286 /* Not known => get a look-ahead token if don't already have one. */ 1287 1288 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 596 /* Not known => get a lookahead token if don't already have one. */ 597 598 /* yychar is either YYEMPTY or YYEOF 599 or a valid token in external form. */ 600 1289 601 if (yychar == YYEMPTY) 1290 602 { 1291 YYDPRINTF ((stderr, "Reading a token: ")); 603 #if YYDEBUG != 0 604 if (yydebug) 605 fprintf(stderr, "Reading a token: "); 606 #endif 1292 607 yychar = YYLEX; 1293 608 } 1294 609 1295 if (yychar <= YYEOF) 1296 { 1297 yychar = yytoken = YYEOF; 1298 YYDPRINTF ((stderr, "Now at end of input.\n")); 610 /* Convert token to internal form (in yychar1) for indexing tables with */ 611 612 if (yychar <= 0) /* This means end of input. */ 613 { 614 yychar1 = 0; 615 yychar = YYEOF; /* Don't call YYLEX any more */ 616 617 #if YYDEBUG != 0 618 if (yydebug) 619 fprintf(stderr, "Now at end of input.\n"); 620 #endif 1299 621 } 1300 622 else 1301 623 { 1302 yytoken = YYTRANSLATE (yychar); 1303 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1304 } 1305 1306 /* If the proper action on seeing token YYTOKEN is to reduce or to 1307 detect an error, take that action. */ 1308 yyn += yytoken; 1309 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 624 yychar1 = YYTRANSLATE(yychar); 625 626 #if YYDEBUG != 0 627 if (yydebug) 628 { 629 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); 630 /* Give the individual parser a way to print the precise meaning 631 of a token, for further debugging info. */ 632 #ifdef YYPRINT 633 YYPRINT (stderr, yychar, yylval); 634 #endif 635 fprintf (stderr, ")\n"); 636 } 637 #endif 638 } 639 640 yyn += yychar1; 641 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) 1310 642 goto yydefault; 643 1311 644 yyn = yytable[yyn]; 1312 if (yyn <= 0) 1313 { 1314 if (yyn == 0 || yyn == YYTABLE_NINF) 645 646 /* yyn is what to do for this token type in this state. 647 Negative => reduce, -yyn is rule number. 648 Positive => shift, yyn is new state. 649 New state is final state => don't bother to shift, 650 just return success. 651 0, or most negative number => error. */ 652 653 if (yyn < 0) 654 { 655 if (yyn == YYFLAG) 1315 656 goto yyerrlab; 1316 657 yyn = -yyn; 1317 658 goto yyreduce; 1318 659 } 660 else if (yyn == 0) 661 goto yyerrlab; 1319 662 1320 663 if (yyn == YYFINAL) 1321 664 YYACCEPT; 1322 665 1323 /* Count tokens shifted since error; after three, turn off error 1324 status. */ 1325 if (yyerrstatus) 1326 yyerrstatus--; 1327 1328 /* Shift the look-ahead token. */ 1329 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1330 1331 /* Discard the shifted token unless it is eof. */ 666 /* Shift the lookahead token. */ 667 668 #if YYDEBUG != 0 669 if (yydebug) 670 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); 671 #endif 672 673 /* Discard the token being shifted unless it is eof. */ 1332 674 if (yychar != YYEOF) 1333 675 yychar = YYEMPTY; 1334 676 677 *++yyvsp = yylval; 678 #ifdef YYLSP_NEEDED 679 *++yylsp = yylloc; 680 #endif 681 682 /* count tokens shifted since error; after three, turn off error status. */ 683 if (yyerrstatus) yyerrstatus--; 684 1335 685 yystate = yyn; 1336 *++yyvsp = yylval;1337 1338 686 goto yynewstate; 1339 687 1340 1341 /*-----------------------------------------------------------. 1342 | yydefault -- do the default action for the current state. | 1343 `-----------------------------------------------------------*/ 688 /* Do the default action for the current state. */ 1344 689 yydefault: 690 1345 691 yyn = yydefact[yystate]; 1346 692 if (yyn == 0) 1347 693 goto yyerrlab; 1348 goto yyreduce; 1349 1350 1351 /*-----------------------------. 1352 | yyreduce -- Do a reduction. | 1353 `-----------------------------*/ 694 695 /* Do a reduction. yyn is the number of a rule to reduce with. */ 1354 696 yyreduce: 1355 /* yyn is the number of a rule to reduce with. */1356 697 yylen = yyr2[yyn]; 1357 1358 /* If YYLEN is nonzero, implement the default value of the action: 1359 `$$ = $1'. 1360 1361 Otherwise, the following line sets YYVAL to garbage. 1362 This behavior is undocumented and Bison 1363 users should not rely upon it. Assigning to YYVAL 1364 unconditionally makes the parser a bit smaller, and it avoids a 1365 GCC warning that YYVAL may be used uninitialized. */ 1366 yyval = yyvsp[1-yylen]; 1367 1368 1369 YY_REDUCE_PRINT (yyn); 1370 switch (yyn) 1371 { 1372 case 2: 698 if (yylen > 0) 699 yyval = yyvsp[1-yylen]; /* implement default value of the action */ 700 701 #if YYDEBUG != 0 702 if (yydebug) 703 { 704 int i; 705 706 fprintf (stderr, "Reducing via rule %d (line %d), ", 707 yyn, yyrline[yyn]); 708 709 /* Print the symbols being reduced, and their result. */ 710 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) 711 fprintf (stderr, "%s ", yytname[yyrhs[i]]); 712 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); 713 } 714 #endif 715 716 717 switch (yyn) { 718 719 case 1: 1373 720 #line 73 "sel-gram.y" 1374 { _hx509_expr_input.expr = (yyvsp[(1) - (1)].expr); } 1375 break; 1376 1377 case 3: 721 { _hx509_expr_input.expr = yyvsp[0].expr; ; 722 break;} 723 case 2: 1378 724 #line 75 "sel-gram.y" 1379 { (yyval.expr) = _hx509_make_expr(op_TRUE, NULL, NULL); } 1380 break; 1381 1382 case 4: 725 { yyval.expr = _hx509_make_expr(op_TRUE, NULL, NULL); ; 726 break;} 727 case 3: 1383 728 #line 76 "sel-gram.y" 1384 { (yyval.expr) = _hx509_make_expr(op_FALSE, NULL, NULL); } 1385 break; 1386 1387 case 5: 729 { yyval.expr = _hx509_make_expr(op_FALSE, NULL, NULL); ; 730 break;} 731 case 4: 1388 732 #line 77 "sel-gram.y" 1389 { (yyval.expr) = _hx509_make_expr(op_NOT, (yyvsp[(2) - (2)].expr), NULL); } 1390 break; 1391 1392 case 6: 733 { yyval.expr = _hx509_make_expr(op_NOT, yyvsp[0].expr, NULL); ; 734 break;} 735 case 5: 1393 736 #line 78 "sel-gram.y" 1394 { (yyval.expr) = _hx509_make_expr(op_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } 1395 break; 1396 1397 case 7: 737 { yyval.expr = _hx509_make_expr(op_AND, yyvsp[-2].expr, yyvsp[0].expr); ; 738 break;} 739 case 6: 1398 740 #line 79 "sel-gram.y" 1399 { (yyval.expr) = _hx509_make_expr(op_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } 1400 break; 1401 1402 case 8: 741 { yyval.expr = _hx509_make_expr(op_OR, yyvsp[-2].expr, yyvsp[0].expr); ; 742 break;} 743 case 7: 1403 744 #line 80 "sel-gram.y" 1404 { (yyval.expr) = (yyvsp[(2) - (3)].expr); } 1405 break; 1406 1407 case 9: 745 { yyval.expr = yyvsp[-1].expr; ; 746 break;} 747 case 8: 1408 748 #line 81 "sel-gram.y" 1409 { (yyval.expr) = _hx509_make_expr(op_COMP, (yyvsp[(1) - (1)].expr), NULL); } 1410 break; 1411 1412 case 10: 749 { yyval.expr = _hx509_make_expr(op_COMP, yyvsp[0].expr, NULL); ; 750 break;} 751 case 9: 1413 752 #line 84 "sel-gram.y" 1414 { (yyval.expr) = _hx509_make_expr(expr_WORDS, (yyvsp[(1) - (1)].expr), NULL); } 1415 break; 1416 1417 case 11: 753 { yyval.expr = _hx509_make_expr(expr_WORDS, yyvsp[0].expr, NULL); ; 754 break;} 755 case 10: 1418 756 #line 85 "sel-gram.y" 1419 { (yyval.expr) = _hx509_make_expr(expr_WORDS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } 1420 break; 1421 1422 case 12: 757 { yyval.expr = _hx509_make_expr(expr_WORDS, yyvsp[-2].expr, yyvsp[0].expr); ; 758 break;} 759 case 11: 1423 760 #line 88 "sel-gram.y" 1424 { (yyval.expr) = _hx509_make_expr(comp_EQ, (yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].expr)); } 1425 break; 1426 1427 case 13: 761 { yyval.expr = _hx509_make_expr(comp_EQ, yyvsp[-3].expr, yyvsp[0].expr); ; 762 break;} 763 case 12: 1428 764 #line 89 "sel-gram.y" 1429 { (yyval.expr) = _hx509_make_expr(comp_NE, (yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].expr)); } 1430 break; 1431 1432 case 14: 765 { yyval.expr = _hx509_make_expr(comp_NE, yyvsp[-3].expr, yyvsp[0].expr); ; 766 break;} 767 case 13: 1433 768 #line 90 "sel-gram.y" 1434 { (yyval.expr) = _hx509_make_expr(comp_TAILEQ, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } 1435 break; 1436 1437 case 15: 769 { yyval.expr = _hx509_make_expr(comp_TAILEQ, yyvsp[-2].expr, yyvsp[0].expr); ; 770 break;} 771 case 14: 1438 772 #line 91 "sel-gram.y" 1439 { (yyval.expr) = _hx509_make_expr(comp_IN, (yyvsp[(1) - (5)].expr), (yyvsp[(4) - (5)].expr)); } 1440 break; 1441 1442 case 16: 773 { yyval.expr = _hx509_make_expr(comp_IN, yyvsp[-4].expr, yyvsp[-1].expr); ; 774 break;} 775 case 15: 1443 776 #line 92 "sel-gram.y" 1444 { (yyval.expr) = _hx509_make_expr(comp_IN, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } 1445 break; 1446 1447 case 17: 777 { yyval.expr = _hx509_make_expr(comp_IN, yyvsp[-2].expr, yyvsp[0].expr); ; 778 break;} 779 case 16: 1448 780 #line 95 "sel-gram.y" 1449 { (yyval.expr) = (yyvsp[(1) - (1)].expr); } 1450 break; 1451 1452 case 18: 781 { yyval.expr = yyvsp[0].expr; ; 782 break;} 783 case 17: 1453 784 #line 96 "sel-gram.y" 1454 { (yyval.expr) = (yyvsp[(1) - (1)].expr); } 1455 break; 1456 1457 case 19: 785 { yyval.expr = yyvsp[0].expr; ; 786 break;} 787 case 18: 1458 788 #line 97 "sel-gram.y" 1459 { (yyval.expr) = (yyvsp[(1) - (1)].expr); } 1460 break; 1461 1462 case 20: 789 { yyval.expr = yyvsp[0].expr; ; 790 break;} 791 case 19: 1463 792 #line 98 "sel-gram.y" 1464 { (yyval.expr) = (yyvsp[(1) - (1)].expr); } 1465 break; 1466 1467 case 21: 793 { yyval.expr = yyvsp[0].expr; ; 794 break;} 795 case 20: 1468 796 #line 101 "sel-gram.y" 1469 { (yyval.expr) = _hx509_make_expr(expr_NUMBER, (yyvsp[(1) - (1)].string), NULL); } 1470 break; 1471 1472 case 22: 797 { yyval.expr = _hx509_make_expr(expr_NUMBER, yyvsp[0].string, NULL); ; 798 break;} 799 case 21: 1473 800 #line 102 "sel-gram.y" 1474 { (yyval.expr) = _hx509_make_expr(expr_STRING, (yyvsp[(1) - (1)].string), NULL); } 1475 break; 1476 1477 case 23: 801 { yyval.expr = _hx509_make_expr(expr_STRING, yyvsp[0].string, NULL); ; 802 break;} 803 case 22: 1478 804 #line 104 "sel-gram.y" 1479 { 1480 (yyval.expr) = _hx509_make_expr(expr_FUNCTION, (yyvsp[(1) - (4)].string), (yyvsp[(3) - (4)].expr)); } 1481 break; 1482 1483 case 24: 805 { 806 yyval.expr = _hx509_make_expr(expr_FUNCTION, yyvsp[-3].string, yyvsp[-1].expr); ; 807 break;} 808 case 23: 1484 809 #line 107 "sel-gram.y" 1485 { (yyval.expr) = (yyvsp[(3) - (4)].expr); } 1486 break; 1487 1488 case 25: 810 { yyval.expr = yyvsp[-1].expr; ; 811 break;} 812 case 24: 1489 813 #line 110 "sel-gram.y" 1490 { 1491 (yyval.expr) = _hx509_make_expr(expr_VAR, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].expr)); } 1492 break; 1493 1494 case 26: 814 { 815 yyval.expr = _hx509_make_expr(expr_VAR, yyvsp[-2].string, yyvsp[0].expr); ; 816 break;} 817 case 25: 1495 818 #line 112 "sel-gram.y" 1496 { 1497 (yyval.expr) = _hx509_make_expr(expr_VAR, (yyvsp[(1) - (1)].string), NULL); } 1498 break; 1499 1500 1501 /* Line 1267 of yacc.c. */ 1502 #line 1500 "sel-gram.c" 1503 default: break; 1504 } 1505 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1506 1507 YYPOPSTACK (yylen); 1508 yylen = 0; 1509 YY_STACK_PRINT (yyss, yyssp); 819 { 820 yyval.expr = _hx509_make_expr(expr_VAR, yyvsp[0].string, NULL); ; 821 break;} 822 } 823 /* the action file gets copied in in place of this dollarsign */ 824 #line 543 "/emx/share/bison.simple" 825 826 827 yyvsp -= yylen; 828 yyssp -= yylen; 829 #ifdef YYLSP_NEEDED 830 yylsp -= yylen; 831 #endif 832 833 #if YYDEBUG != 0 834 if (yydebug) 835 { 836 short *ssp1 = yyss - 1; 837 fprintf (stderr, "state stack now"); 838 while (ssp1 != yyssp) 839 fprintf (stderr, " %d", *++ssp1); 840 fprintf (stderr, "\n"); 841 } 842 #endif 1510 843 1511 844 *++yyvsp = yyval; 1512 845 1513 1514 /* Now `shift' the result of the reduction. Determine what state 1515 that goes to, based on the state we popped back to and the rule 1516 number reduced by. */ 846 #ifdef YYLSP_NEEDED 847 yylsp++; 848 if (yylen == 0) 849 { 850 yylsp->first_line = yylloc.first_line; 851 yylsp->first_column = yylloc.first_column; 852 yylsp->last_line = (yylsp-1)->last_line; 853 yylsp->last_column = (yylsp-1)->last_column; 854 yylsp->text = 0; 855 } 856 else 857 { 858 yylsp->last_line = (yylsp+yylen-1)->last_line; 859 yylsp->last_column = (yylsp+yylen-1)->last_column; 860 } 861 #endif 862 863 /* Now "shift" the result of the reduction. 864 Determine what state that goes to, 865 based on the state we popped back to 866 and the rule number reduced by. */ 1517 867 1518 868 yyn = yyr1[yyn]; 1519 869 1520 yystate = yypgoto[yyn - YYNT OKENS] + *yyssp;1521 if ( 0 <= yystate&& yystate <= YYLAST && yycheck[yystate] == *yyssp)870 yystate = yypgoto[yyn - YYNTBASE] + *yyssp; 871 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) 1522 872 yystate = yytable[yystate]; 1523 873 else 1524 yystate = yydefgoto[yyn - YYNT OKENS];874 yystate = yydefgoto[yyn - YYNTBASE]; 1525 875 1526 876 goto yynewstate; 1527 877 1528 1529 /*------------------------------------. 1530 | yyerrlab -- here on detecting error | 1531 `------------------------------------*/ 1532 yyerrlab: 1533 /* If not already recovering from an error, report this error. */ 1534 if (!yyerrstatus) 878 yyerrlab: /* here on detecting error */ 879 880 if (! yyerrstatus) 881 /* If not already recovering from an error, report this error. */ 1535 882 { 1536 883 ++yynerrs; 1537 #if ! YYERROR_VERBOSE 1538 yyerror (YY_("syntax error")); 1539 #else 1540 { 1541 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 1542 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 1543 { 1544 YYSIZE_T yyalloc = 2 * yysize; 1545 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 1546 yyalloc = YYSTACK_ALLOC_MAXIMUM; 1547 if (yymsg != yymsgbuf) 1548 YYSTACK_FREE (yymsg); 1549 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 1550 if (yymsg) 1551 yymsg_alloc = yyalloc; 1552 else 1553 { 1554 yymsg = yymsgbuf; 1555 yymsg_alloc = sizeof yymsgbuf; 1556 } 1557 } 1558 1559 if (0 < yysize && yysize <= yymsg_alloc) 1560 { 1561 (void) yysyntax_error (yymsg, yystate, yychar); 1562 yyerror (yymsg); 1563 } 1564 else 1565 { 1566 yyerror (YY_("syntax error")); 1567 if (yysize != 0) 1568 goto yyexhaustedlab; 1569 } 1570 } 1571 #endif 1572 } 1573 1574 1575 1576 if (yyerrstatus == 3) 1577 { 1578 /* If just tried and failed to reuse look-ahead token after an 1579 error, discard it. */ 1580 1581 if (yychar <= YYEOF) 884 885 #ifdef YYERROR_VERBOSE 886 yyn = yypact[yystate]; 887 888 if (yyn > YYFLAG && yyn < YYLAST) 1582 889 { 1583 /* Return failure if at end of input. */ 1584 if (yychar == YYEOF) 1585 YYABORT; 890 int size = 0; 891 char *msg; 892 int x, count; 893 894 count = 0; 895 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ 896 for (x = (yyn < 0 ? -yyn : 0); 897 x < (sizeof(yytname) / sizeof(char *)); x++) 898 if (yycheck[x + yyn] == x) 899 size += strlen(yytname[x]) + 15, count++; 900 msg = (char *) malloc(size + 15); 901 if (msg != 0) 902 { 903 strcpy(msg, "parse error"); 904 905 if (count < 5) 906 { 907 count = 0; 908 for (x = (yyn < 0 ? -yyn : 0); 909 x < (sizeof(yytname) / sizeof(char *)); x++) 910 if (yycheck[x + yyn] == x) 911 { 912 strcat(msg, count == 0 ? ", expecting `" : " or `"); 913 strcat(msg, yytname[x]); 914 strcat(msg, "'"); 915 count++; 916 } 917 } 918 yyerror(msg); 919 free(msg); 920 } 921 else 922 yyerror ("parse error; also virtual memory exceeded"); 1586 923 } 1587 924 else 1588 { 1589 yydestruct ("Error: discarding", 1590 yytoken, &yylval); 1591 yychar = YYEMPTY; 1592 } 1593 } 1594 1595 /* Else will try to reuse look-ahead token after shifting the error 1596 token. */ 925 #endif /* YYERROR_VERBOSE */ 926 yyerror("parse error"); 927 } 928 1597 929 goto yyerrlab1; 1598 1599 1600 /*---------------------------------------------------. 1601 | yyerrorlab -- error raised explicitly by YYERROR. | 1602 `---------------------------------------------------*/ 1603 yyerrorlab: 1604 1605 /* Pacify compilers like GCC when the user code never invokes 1606 YYERROR and the label yyerrorlab therefore never appears in user 1607 code. */ 1608 if (/*CONSTCOND*/ 0) 1609 goto yyerrorlab; 1610 1611 /* Do not reclaim the symbols of the rule which action triggered 1612 this YYERROR. */ 1613 YYPOPSTACK (yylen); 1614 yylen = 0; 1615 YY_STACK_PRINT (yyss, yyssp); 1616 yystate = *yyssp; 1617 goto yyerrlab1; 1618 1619 1620 /*-------------------------------------------------------------. 1621 | yyerrlab1 -- common code for both syntax error and YYERROR. | 1622 `-------------------------------------------------------------*/ 1623 yyerrlab1: 1624 yyerrstatus = 3; /* Each real token shifted decrements this. */ 1625 1626 for (;;) 1627 { 1628 yyn = yypact[yystate]; 1629 if (yyn != YYPACT_NINF) 1630 { 1631 yyn += YYTERROR; 1632 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 1633 { 1634 yyn = yytable[yyn]; 1635 if (0 < yyn) 1636 break; 1637 } 1638 } 1639 1640 /* Pop the current state because it cannot handle the error token. */ 1641 if (yyssp == yyss) 930 yyerrlab1: /* here on error raised explicitly by an action */ 931 932 if (yyerrstatus == 3) 933 { 934 /* if just tried and failed to reuse lookahead token after an error, discard it. */ 935 936 /* return failure if at end of input */ 937 if (yychar == YYEOF) 1642 938 YYABORT; 1643 939 1644 1645 yydestruct ("Error: popping", 1646 yystos[yystate], yyvsp); 1647 YYPOPSTACK (1); 1648 yystate = *yyssp; 1649 YY_STACK_PRINT (yyss, yyssp); 1650 } 940 #if YYDEBUG != 0 941 if (yydebug) 942 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); 943 #endif 944 945 yychar = YYEMPTY; 946 } 947 948 /* Else will try to reuse lookahead token 949 after shifting the error token. */ 950 951 yyerrstatus = 3; /* Each real token shifted decrements this */ 952 953 goto yyerrhandle; 954 955 yyerrdefault: /* current state does not do anything special for the error token. */ 956 957 #if 0 958 /* This is wrong; only states that explicitly want error tokens 959 should shift them. */ 960 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ 961 if (yyn) goto yydefault; 962 #endif 963 964 yyerrpop: /* pop the current state because it cannot handle the error token */ 965 966 if (yyssp == yyss) YYABORT; 967 yyvsp--; 968 yystate = *--yyssp; 969 #ifdef YYLSP_NEEDED 970 yylsp--; 971 #endif 972 973 #if YYDEBUG != 0 974 if (yydebug) 975 { 976 short *ssp1 = yyss - 1; 977 fprintf (stderr, "Error: state stack now"); 978 while (ssp1 != yyssp) 979 fprintf (stderr, " %d", *++ssp1); 980 fprintf (stderr, "\n"); 981 } 982 #endif 983 984 yyerrhandle: 985 986 yyn = yypact[yystate]; 987 if (yyn == YYFLAG) 988 goto yyerrdefault; 989 990 yyn += YYTERROR; 991 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) 992 goto yyerrdefault; 993 994 yyn = yytable[yyn]; 995 if (yyn < 0) 996 { 997 if (yyn == YYFLAG) 998 goto yyerrpop; 999 yyn = -yyn; 1000 goto yyreduce; 1001 } 1002 else if (yyn == 0) 1003 goto yyerrpop; 1651 1004 1652 1005 if (yyn == YYFINAL) 1653 1006 YYACCEPT; 1654 1007 1008 #if YYDEBUG != 0 1009 if (yydebug) 1010 fprintf(stderr, "Shifting error token, "); 1011 #endif 1012 1655 1013 *++yyvsp = yylval; 1656 1657 1658 /* Shift the error token. */ 1659 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 1014 #ifdef YYLSP_NEEDED 1015 *++yylsp = yylloc; 1016 #endif 1660 1017 1661 1018 yystate = yyn; 1662 1019 goto yynewstate; 1663 1020 1664 1665 /*-------------------------------------. 1666 | yyacceptlab -- YYACCEPT comes here. | 1667 `-------------------------------------*/ 1668 yyacceptlab: 1669 yyresult = 0; 1670 goto yyreturn; 1671 1672 /*-----------------------------------. 1673 | yyabortlab -- YYABORT comes here. | 1674 `-----------------------------------*/ 1675 yyabortlab: 1676 yyresult = 1; 1677 goto yyreturn; 1678 1679 #ifndef yyoverflow 1680 /*-------------------------------------------------. 1681 | yyexhaustedlab -- memory exhaustion comes here. | 1682 `-------------------------------------------------*/ 1683 yyexhaustedlab: 1684 yyerror (YY_("memory exhausted")); 1685 yyresult = 2; 1686 /* Fall through. */ 1687 #endif 1688 1689 yyreturn: 1690 if (yychar != YYEOF && yychar != YYEMPTY) 1691 yydestruct ("Cleanup: discarding lookahead", 1692 yytoken, &yylval); 1693 /* Do not reclaim the symbols of the rule which action triggered 1694 this YYABORT or YYACCEPT. */ 1695 YYPOPSTACK (yylen); 1696 YY_STACK_PRINT (yyss, yyssp); 1697 while (yyssp != yyss) 1698 { 1699 yydestruct ("Cleanup: popping", 1700 yystos[*yyssp], yyvsp); 1701 YYPOPSTACK (1); 1702 } 1703 #ifndef yyoverflow 1704 if (yyss != yyssa) 1705 YYSTACK_FREE (yyss); 1706 #endif 1707 #if YYERROR_VERBOSE 1708 if (yymsg != yymsgbuf) 1709 YYSTACK_FREE (yymsg); 1710 #endif 1711 /* Make sure YYID is used. */ 1712 return YYID (yyresult); 1021 yyacceptlab: 1022 /* YYACCEPT comes here. */ 1023 if (yyfree_stacks) 1024 { 1025 free (yyss); 1026 free (yyvs); 1027 #ifdef YYLSP_NEEDED 1028 free (yyls); 1029 #endif 1030 } 1031 return 0; 1032 1033 yyabortlab: 1034 /* YYABORT comes here. */ 1035 if (yyfree_stacks) 1036 { 1037 free (yyss); 1038 free (yyvs); 1039 #ifdef YYLSP_NEEDED 1040 free (yyls); 1041 #endif 1042 } 1043 return 1; 1713 1044 } 1714 1715 1716 1045 #line 115 "sel-gram.y" -
heimdal/trunk/lib/hx509/sel-gram.h
r1 r4 1 /* A Bison parser, made by GNU Bison 2.3. */ 2 3 /* Skeleton interface 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 9 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 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 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. */ 22 23 /* As a special exception, you may create a larger work that contains 24 part or all of the Bison parser skeleton and distribute that work 25 under terms of your choice, so long as that work isn't itself a 26 parser generator using the skeleton or a modified version thereof 27 as a parser skeleton. Alternatively, if you modify or redistribute 28 the parser skeleton itself, you may (at your option) remove this 29 special exception, which will cause the skeleton and the resulting 30 Bison output files to be licensed under the GNU General Public 31 License without this special exception. 32 33 This special exception was added by the Free Software Foundation in 34 version 2.2 of Bison. */ 35 36 /* Tokens. */ 37 #ifndef YYTOKENTYPE 38 # define YYTOKENTYPE 39 /* Put the tokens into the symbol table, so that GDB and other debuggers 40 know about them. */ 41 enum yytokentype { 42 kw_TRUE = 258, 43 kw_FALSE = 259, 44 kw_AND = 260, 45 kw_OR = 261, 46 kw_IN = 262, 47 kw_TAILMATCH = 263, 48 NUMBER = 264, 49 STRING = 265, 50 IDENTIFIER = 266 51 }; 52 #endif 53 /* Tokens. */ 54 #define kw_TRUE 258 55 #define kw_FALSE 259 56 #define kw_AND 260 57 #define kw_OR 261 58 #define kw_IN 262 59 #define kw_TAILMATCH 263 60 #define NUMBER 264 61 #define STRING 265 62 #define IDENTIFIER 266 1 typedef union { 2 char *string; 3 struct hx_expr *expr; 4 } YYSTYPE; 5 #define kw_TRUE 257 6 #define kw_FALSE 258 7 #define kw_AND 259 8 #define kw_OR 260 9 #define kw_IN 261 10 #define kw_TAILMATCH 262 11 #define NUMBER 263 12 #define STRING 264 13 #define IDENTIFIER 265 63 14 64 15 65 66 67 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED68 typedef union YYSTYPE69 #line 45 "sel-gram.y"70 {71 char *string;72 struct hx_expr *expr;73 }74 /* Line 1529 of yacc.c. */75 #line 76 "sel-gram.h"76 YYSTYPE;77 # define yystype YYSTYPE /* obsolescent; will be withdrawn */78 # define YYSTYPE_IS_DECLARED 179 # define YYSTYPE_IS_TRIVIAL 180 #endif81 82 16 extern YYSTYPE yylval; 83 -
heimdal/trunk/lib/hx509/sel-lex.c
r1 r4 1 2 #line 3 "sel-lex.c"3 4 #define YY_INT_ALIGNED short int5 6 1 /* A lexical scanner generated by flex */ 2 3 /* Scanner skeleton version: 4 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ 5 */ 7 6 8 7 #define FLEX_SCANNER 9 8 #define YY_FLEX_MAJOR_VERSION 2 10 9 #define YY_FLEX_MINOR_VERSION 5 11 #define YY_FLEX_SUBMINOR_VERSION 35 12 #if YY_FLEX_SUBMINOR_VERSION > 0 13 #define FLEX_BETA 14 #endif 15 16 /* First, we deal with platform-specific or compiler-specific issues. */ 17 18 /* begin standard C headers. */ 10 19 11 #include <stdio.h> 20 #include <string.h> 21 #include <errno.h> 12 13 14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 15 #ifdef c_plusplus 16 #ifndef __cplusplus 17 #define __cplusplus 18 #endif 19 #endif 20 21 22 #ifdef __cplusplus 23 22 24 #include <stdlib.h> 23 24 /* end standard C headers. */ 25 26 /* flex integer type definitions */ 27 28 #ifndef FLEXINT_H 29 #define FLEXINT_H 30 31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 32 33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 34 35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 36 * if you want the limit (max/min) macros for int types. 37 */ 38 #ifndef __STDC_LIMIT_MACROS 39 #define __STDC_LIMIT_MACROS 1 40 #endif 41 42 #include <inttypes.h> 43 typedef int8_t flex_int8_t; 44 typedef uint8_t flex_uint8_t; 45 typedef int16_t flex_int16_t; 46 typedef uint16_t flex_uint16_t; 47 typedef int32_t flex_int32_t; 48 typedef uint32_t flex_uint32_t; 49 typedef uint64_t flex_uint64_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 25 #include <unistd.h> 26 27 /* Use prototypes in function declarations. */ 28 #define YY_USE_PROTOS 91 29 92 30 /* The "const" storage-class-modifier is valid. */ … … 95 33 #else /* ! __cplusplus */ 96 34 97 /* C99 requires __STDC__ to be defined as 1. */ 98 #if defined (__STDC__) 99 35 #if __STDC__ 36 37 #define YY_USE_PROTOS 100 38 #define YY_USE_CONST 101 39 102 #endif /* defined (__STDC__)*/40 #endif /* __STDC__ */ 103 41 #endif /* ! __cplusplus */ 42 43 #ifdef __TURBOC__ 44 #pragma warn -rch 45 #pragma warn -use 46 #include <io.h> 47 #include <stdlib.h> 48 #define YY_USE_CONST 49 #define YY_USE_PROTOS 50 #endif 104 51 105 52 #ifdef YY_USE_CONST … … 107 54 #else 108 55 #define yyconst 56 #endif 57 58 59 #ifdef YY_USE_PROTOS 60 #define YY_PROTO(proto) proto 61 #else 62 #define YY_PROTO(proto) () 109 63 #endif 110 64 … … 123 77 * definition of BEGIN. 124 78 */ 125 #define BEGIN (yy_start)= 1 + 2 *79 #define BEGIN yy_start = 1 + 2 * 126 80 127 81 /* Translate the current start state into a value that can be later handed … … 129 83 * compatibility. 130 84 */ 131 #define YY_START (( (yy_start)- 1) / 2)85 #define YY_START ((yy_start - 1) / 2) 132 86 #define YYSTATE YY_START 133 87 … … 136 90 137 91 /* Special action meaning "start processing a new file". */ 138 #define YY_NEW_FILE yyrestart( yyin)92 #define YY_NEW_FILE yyrestart( yyin ) 139 93 140 94 #define YY_END_OF_BUFFER_CHAR 0 141 95 142 96 /* Size of default input buffer. */ 143 #ifndef YY_BUF_SIZE144 97 #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 98 153 99 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 100 101 extern int yyleng; 163 102 extern FILE *yyin, *yyout; 164 103 … … 167 106 #define EOB_ACT_LAST_MATCH 2 168 107 169 #define YY_LESS_LINENO(n) 170 171 /* Return all but the first "n" matched characters back to the input stream. */ 108 /* The funky do-while in the following #define is used to turn the definition 109 * int a single C statement (which needs a semi-colon terminator). This 110 * avoids problems with code like: 111 * 112 * if ( condition_holds ) 113 * yyless( 5 ); 114 * else 115 * do_something_else(); 116 * 117 * Prior to using the do-while the compiler would get upset at the 118 * "else" because it interpreted the "if" statement as being all 119 * done when it reached the ';' after the yyless() call. 120 */ 121 122 /* Return all but the first 'n' matched characters back to the input stream. */ 123 172 124 #define yyless(n) \ 173 125 do \ 174 126 { \ 175 127 /* Undo effects of setting up yytext. */ \ 176 int yyless_macro_arg = (n); \ 177 YY_LESS_LINENO(yyless_macro_arg);\ 178 *yy_cp = (yy_hold_char); \ 128 *yy_cp = yy_hold_char; \ 179 129 YY_RESTORE_YY_MORE_OFFSET \ 180 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg- YY_MORE_ADJ; \130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 181 131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 182 132 } \ 183 133 while ( 0 ) 184 134 185 #define unput(c) yyunput( c, (yytext_ptr) ) 186 187 #ifndef YY_STRUCT_YY_BUFFER_STATE 188 #define YY_STRUCT_YY_BUFFER_STATE 135 #define unput(c) yyunput( c, yytext_ptr ) 136 137 /* The following is because we cannot portably get our hands on size_t 138 * (without autoconf's help, which isn't available because we want 139 * flex-generated scanners to compile on their own). 140 */ 141 typedef unsigned int yy_size_t; 142 143 189 144 struct yy_buffer_state 190 145 { … … 202 157 * characters. 203 158 */ 204 yy_size_t yy_n_chars;159 int yy_n_chars; 205 160 206 161 /* Whether we "own" the buffer - i.e., we know we created it, … … 223 178 int yy_at_bol; 224 179 225 int yy_bs_lineno; /**< The line count. */226 int yy_bs_column; /**< The column count. */227 228 180 /* Whether to try to fill the input buffer when we reach the 229 181 * end of it. … … 232 184 233 185 int yy_buffer_status; 234 235 186 #define YY_BUFFER_NEW 0 236 187 #define YY_BUFFER_NORMAL 1 … … 246 197 */ 247 198 #define YY_BUFFER_EOF_PENDING 2 248 249 199 }; 250 #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 251 252 /* Stack of input buffers. */ 253 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 254 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 255 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 200 201 static YY_BUFFER_STATE yy_current_buffer = 0; 256 202 257 203 /* We provide macros for accessing buffer states in case in the 258 204 * future we want to put the buffer states in a more general 259 205 * "scanner state". 260 * 261 * Returns the top of the stack, or NULL. 262 */ 263 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 264 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 265 : NULL) 266 267 /* Same as previous macro, but useful when we know that the buffer stack is not 268 * NULL or when we need an lvalue. For internal use only. 269 */ 270 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 206 */ 207 #define YY_CURRENT_BUFFER yy_current_buffer 208 271 209 272 210 /* yy_hold_char holds the character lost when yytext is formed. */ 273 211 static char yy_hold_char; 274 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ 275 yy_size_t yyleng; 212 213 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 214 215 216 int yyleng; 276 217 277 218 /* Points to current character in buffer. */ 278 219 static char *yy_c_buf_p = (char *) 0; 279 static int yy_init = 0; /* whether we need to initialize */220 static int yy_init = 1; /* whether we need to initialize */ 280 221 static int yy_start = 0; /* start state number */ 281 222 … … 285 226 static int yy_did_buffer_switch_on_eof; 286 227 287 void yyrestart (FILE *input_file ); 288 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 289 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); 290 void yy_delete_buffer (YY_BUFFER_STATE b ); 291 void yy_flush_buffer (YY_BUFFER_STATE b ); 292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); 293 void yypop_buffer_state (void ); 294 295 static void yyensure_buffer_stack (void ); 296 static void yy_load_buffer_state (void ); 297 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 298 299 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 300 301 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); 302 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 303 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); 304 305 void *yyalloc (yy_size_t ); 306 void *yyrealloc (void *,yy_size_t ); 307 void yyfree (void * ); 228 void yyrestart YY_PROTO(( FILE *input_file )); 229 230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 231 void yy_load_buffer_state YY_PROTO(( void )); 232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 237 238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 241 242 static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 244 static void yy_flex_free YY_PROTO(( void * )); 308 245 309 246 #define yy_new_buffer yy_create_buffer … … 311 248 #define yy_set_interactive(is_interactive) \ 312 249 { \ 313 if ( ! YY_CURRENT_BUFFER ){ \ 314 yyensure_buffer_stack (); \ 315 YY_CURRENT_BUFFER_LVALUE = \ 316 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 317 } \ 318 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 250 if ( ! yy_current_buffer ) \ 251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 252 yy_current_buffer->yy_is_interactive = is_interactive; \ 319 253 } 320 254 321 255 #define yy_set_bol(at_bol) \ 322 256 { \ 323 if ( ! YY_CURRENT_BUFFER ){\ 324 yyensure_buffer_stack (); \ 325 YY_CURRENT_BUFFER_LVALUE = \ 326 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 327 } \ 328 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 329 } 330 331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 332 333 /* Begin user sect3 */ 257 if ( ! yy_current_buffer ) \ 258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 259 yy_current_buffer->yy_at_bol = at_bol; \ 260 } 261 262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 334 263 335 264 typedef unsigned char YY_CHAR; 336 337 265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 338 339 266 typedef int yy_state_type; 340 341 extern int yylineno;342 343 int yylineno = 1;344 345 267 extern char *yytext; 346 268 #define yytext_ptr yytext 347 269 348 static yy_state_type yy_get_previous_state (void);349 static yy_state_type yy_try_NUL_trans (yy_state_type current_state);350 static int yy_get_next_buffer (void);351 static void yy_fatal_error (yyconst char msg[]);270 static yy_state_type yy_get_previous_state YY_PROTO(( void )); 271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 272 static int yy_get_next_buffer YY_PROTO(( void )); 273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 352 274 353 275 /* Done after the current pattern has been matched and before the … … 355 277 */ 356 278 #define YY_DO_BEFORE_ACTION \ 357 (yytext_ptr)= yy_bp; \358 yyleng = ( yy_size_t) (yy_cp - yy_bp); \359 (yy_hold_char)= *yy_cp; \279 yytext_ptr = yy_bp; \ 280 yyleng = (int) (yy_cp - yy_bp); \ 281 yy_hold_char = *yy_cp; \ 360 282 *yy_cp = '\0'; \ 361 (yy_c_buf_p)= yy_cp;283 yy_c_buf_p = yy_cp; 362 284 363 285 #define YY_NUM_RULES 12 364 286 #define YY_END_OF_BUFFER 13 365 /* This struct is not used in this scanner, 366 but its presence is necessary. */ 367 struct yy_trans_info 368 { 369 flex_int32_t yy_verify; 370 flex_int32_t yy_nxt; 371 }; 372 static yyconst flex_int16_t yy_accept[36] = 287 static yyconst short int yy_accept[36] = 373 288 { 0, 374 289 0, 0, 13, 12, 11, 9, 10, 8, 7, 7, … … 378 293 } ; 379 294 380 static yyconst flex_int32_t yy_ec[256] =295 static yyconst int yy_ec[256] = 381 296 { 0, 382 297 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, … … 410 325 } ; 411 326 412 static yyconst flex_int32_t yy_meta[23] =327 static yyconst int yy_meta[23] = 413 328 { 0, 414 329 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, … … 417 332 } ; 418 333 419 static yyconst flex_int16_t yy_base[37] =334 static yyconst short int yy_base[37] = 420 335 { 0, 421 336 0, 0, 43, 44, 44, 44, 44, 44, 25, 0, … … 425 340 } ; 426 341 427 static yyconst flex_int16_t yy_def[37] =342 static yyconst short int yy_def[37] = 428 343 { 0, 429 344 35, 1, 35, 35, 35, 35, 35, 35, 36, 36, … … 433 348 } ; 434 349 435 static yyconst flex_int16_t yy_nxt[67] =350 static yyconst short int yy_nxt[67] = 436 351 { 0, 437 352 4, 5, 6, 7, 8, 4, 9, 10, 10, 10, … … 444 359 } ; 445 360 446 static yyconst flex_int16_t yy_chk[67] =361 static yyconst short int yy_chk[67] = 447 362 { 0, 448 363 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … … 458 373 static char *yy_last_accepting_cpos; 459 374 460 extern int yy_flex_debug;461 int yy_flex_debug = 0;462 463 375 /* The intent behind this definition is that it'll catch 464 376 * any uses of REJECT which flex missed. … … 470 382 char *yytext; 471 383 #line 1 "sel-lex.l" 384 #define INITIAL 0 472 385 #line 2 "sel-lex.l" 473 386 /* … … 537 450 #undef ECHO 538 451 539 #line 540 "sel-lex.c" 540 541 #define INITIAL 0 542 543 #ifndef YY_NO_UNISTD_H 544 /* Special case for "unistd.h", since it is non-ANSI. We include it way 545 * down here because we want the user's section 1 to have been scanned first. 546 * The user has a chance to override it with an option. 547 */ 548 #include <unistd.h> 549 #endif 550 551 #ifndef YY_EXTRA_TYPE 552 #define YY_EXTRA_TYPE void * 553 #endif 554 555 static int yy_init_globals (void ); 556 557 /* Accessor methods to globals. 558 These are made visible to non-reentrant scanners for convenience. */ 559 560 int yylex_destroy (void ); 561 562 int yyget_debug (void ); 563 564 void yyset_debug (int debug_flag ); 565 566 YY_EXTRA_TYPE yyget_extra (void ); 567 568 void yyset_extra (YY_EXTRA_TYPE user_defined ); 569 570 FILE *yyget_in (void ); 571 572 void yyset_in (FILE * in_str ); 573 574 FILE *yyget_out (void ); 575 576 void yyset_out (FILE * out_str ); 577 578 yy_size_t yyget_leng (void ); 579 580 char *yyget_text (void ); 581 582 int yyget_lineno (void ); 583 584 void yyset_lineno (int line_number ); 452 #line 453 "sel-lex.c" 585 453 586 454 /* Macros after this point can all be overridden by user definitions in … … 590 458 #ifndef YY_SKIP_YYWRAP 591 459 #ifdef __cplusplus 592 extern "C" int yywrap (void ); 593 #else 594 extern int yywrap (void ); 595 #endif 596 #endif 597 598 static void yyunput (int c,char *buf_ptr ); 599 460 extern "C" int yywrap YY_PROTO(( void )); 461 #else 462 extern int yywrap YY_PROTO(( void )); 463 #endif 464 #endif 465 466 #ifndef YY_NO_UNPUT 467 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 468 #endif 469 600 470 #ifndef yytext_ptr 601 static void yy_flex_strncpy (char *,yyconst char *,int);471 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 602 472 #endif 603 473 604 474 #ifdef YY_NEED_STRLEN 605 static int yy_flex_strlen (yyconst char *);475 static int yy_flex_strlen YY_PROTO(( yyconst char * )); 606 476 #endif 607 477 608 478 #ifndef YY_NO_INPUT 609 610 479 #ifdef __cplusplus 611 static int yyinput (void ); 612 #else 613 static int input (void ); 614 #endif 615 480 static int yyinput YY_PROTO(( void )); 481 #else 482 static int input YY_PROTO(( void )); 483 #endif 484 #endif 485 486 #if YY_STACK_USED 487 static int yy_start_stack_ptr = 0; 488 static int yy_start_stack_depth = 0; 489 static int *yy_start_stack = 0; 490 #ifndef YY_NO_PUSH_STATE 491 static void yy_push_state YY_PROTO(( int new_state )); 492 #endif 493 #ifndef YY_NO_POP_STATE 494 static void yy_pop_state YY_PROTO(( void )); 495 #endif 496 #ifndef YY_NO_TOP_STATE 497 static int yy_top_state YY_PROTO(( void )); 498 #endif 499 500 #else 501 #define YY_NO_PUSH_STATE 1 502 #define YY_NO_POP_STATE 1 503 #define YY_NO_TOP_STATE 1 504 #endif 505 506 #ifdef YY_MALLOC_DECL 507 YY_MALLOC_DECL 508 #else 509 #if __STDC__ 510 #ifndef __cplusplus 511 #include <stdlib.h> 512 #endif 513 #else 514 /* Just try to get by without declaring the routines. This will fail 515 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 516 * or sizeof(void*) != sizeof(int). 517 */ 518 #endif 616 519 #endif 617 520 … … 622 525 623 526 /* Copy whatever the last rule matched to the standard output. */ 527 624 528 #ifndef ECHO 625 529 /* This used to be an fputs(), but since the string might contain NUL's, 626 530 * we now use fwrite(). 627 531 */ 628 #define ECHO fwrite( yytext, yyleng, 1, yyout )532 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 629 533 #endif 630 534 … … 634 538 #ifndef YY_INPUT 635 539 #define YY_INPUT(buf,result,max_size) \ 636 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \540 if ( yy_current_buffer->yy_is_interactive ) \ 637 541 { \ 638 int c = '*'; \ 639 yy_size_t n; \ 542 int c = '*', n; \ 640 543 for ( n = 0; n < max_size && \ 641 544 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ … … 647 550 result = n; \ 648 551 } \ 649 else \ 650 { \ 651 errno=0; \ 652 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 653 { \ 654 if( errno != EINTR) \ 655 { \ 656 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 657 break; \ 658 } \ 659 errno=0; \ 660 clearerr(yyin); \ 661 } \ 662 }\ 663 \ 664 552 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 553 && ferror( yyin ) ) \ 554 YY_FATAL_ERROR( "input in flex scanner failed" ); 665 555 #endif 666 556 … … 683 573 #endif 684 574 685 /* end tables serialization structures and prototypes */686 687 575 /* Default declaration of generated scanner - a define so the user can 688 576 * easily add parameters. 689 577 */ 690 578 #ifndef YY_DECL 691 #define YY_DECL_IS_OURS 1 692 693 extern int yylex (void); 694 695 #define YY_DECL int yylex (void) 696 #endif /* !YY_DECL */ 579 #define YY_DECL int yylex YY_PROTO(( void )) 580 #endif 697 581 698 582 /* Code executed at the beginning of each rule, after yytext and yyleng … … 711 595 YY_USER_ACTION 712 596 713 /** The main scanner function which does all the work.714 */715 597 YY_DECL 716 {598 { 717 599 register yy_state_type yy_current_state; 718 600 register char *yy_cp, *yy_bp; 719 601 register int yy_act; 720 602 721 603 #line 69 "sel-lex.l" 722 604 723 605 724 #line 725"sel-lex.c"725 726 if ( !(yy_init))606 #line 607 "sel-lex.c" 607 608 if ( yy_init ) 727 609 { 728 (yy_init) = 1;610 yy_init = 0; 729 611 730 612 #ifdef YY_USER_INIT … … 732 614 #endif 733 615 734 if ( ! (yy_start))735 (yy_start)= 1; /* first start state */616 if ( ! yy_start ) 617 yy_start = 1; /* first start state */ 736 618 737 619 if ( ! yyin ) … … 741 623 yyout = stdout; 742 624 743 if ( ! YY_CURRENT_BUFFER ) { 744 yyensure_buffer_stack (); 745 YY_CURRENT_BUFFER_LVALUE = 746 yy_create_buffer(yyin,YY_BUF_SIZE ); 747 } 748 749 yy_load_buffer_state( ); 625 if ( ! yy_current_buffer ) 626 yy_current_buffer = 627 yy_create_buffer( yyin, YY_BUF_SIZE ); 628 629 yy_load_buffer_state(); 750 630 } 751 631 752 632 while ( 1 ) /* loops until end-of-file is reached */ 753 633 { 754 yy_cp = (yy_c_buf_p);634 yy_cp = yy_c_buf_p; 755 635 756 636 /* Support of yytext. */ 757 *yy_cp = (yy_hold_char);637 *yy_cp = yy_hold_char; 758 638 759 639 /* yy_bp points to the position in yy_ch_buf of the start of … … 762 642 yy_bp = yy_cp; 763 643 764 yy_current_state = (yy_start);644 yy_current_state = yy_start; 765 645 yy_match: 766 646 do … … 769 649 if ( yy_accept[yy_current_state] ) 770 650 { 771 (yy_last_accepting_state)= yy_current_state;772 (yy_last_accepting_cpos)= yy_cp;651 yy_last_accepting_state = yy_current_state; 652 yy_last_accepting_cpos = yy_cp; 773 653 } 774 654 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) … … 787 667 if ( yy_act == 0 ) 788 668 { /* have to back up */ 789 yy_cp = (yy_last_accepting_cpos);790 yy_current_state = (yy_last_accepting_state);669 yy_cp = yy_last_accepting_cpos; 670 yy_current_state = yy_last_accepting_state; 791 671 yy_act = yy_accept[yy_current_state]; 792 672 } … … 794 674 YY_DO_BEFORE_ACTION; 795 675 676 796 677 do_action: /* This label is used only to access EOF actions. */ 678 797 679 798 680 switch ( yy_act ) … … 800 682 case 0: /* must back up */ 801 683 /* undo the effects of YY_DO_BEFORE_ACTION */ 802 *yy_cp = (yy_hold_char);803 yy_cp = (yy_last_accepting_cpos);804 yy_current_state = (yy_last_accepting_state);684 *yy_cp = yy_hold_char; 685 yy_cp = yy_last_accepting_cpos; 686 yy_current_state = yy_last_accepting_state; 805 687 goto yy_find_action; 806 688 … … 849 731 YY_BREAK 850 732 case 9: 851 /* rule 9 can match eol */852 733 YY_RULE_SETUP 853 734 #line 83 "sel-lex.l" … … 869 750 ECHO; 870 751 YY_BREAK 871 #line 872"sel-lex.c"752 #line 753 "sel-lex.c" 872 753 case YY_STATE_EOF(INITIAL): 873 754 yyterminate(); … … 876 757 { 877 758 /* Amount of text matched not including the EOB char. */ 878 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;759 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 879 760 880 761 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 881 *yy_cp = (yy_hold_char);762 *yy_cp = yy_hold_char; 882 763 YY_RESTORE_YY_MORE_OFFSET 883 764 884 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )765 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 885 766 { 886 767 /* We're scanning a new file or input source. It's … … 888 769 * just pointed yyin at a new source and called 889 770 * yylex(). If so, then we have to assure 890 * consistency between YY_CURRENT_BUFFERand our771 * consistency between yy_current_buffer and our 891 772 * globals. Here is the right place to do so, because 892 773 * this is the first action (other than possibly a 893 774 * back-up) that will match for the new input source. 894 775 */ 895 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;896 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;897 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;776 yy_n_chars = yy_current_buffer->yy_n_chars; 777 yy_current_buffer->yy_input_file = yyin; 778 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 898 779 } 899 780 … … 905 786 * in input(). 906 787 */ 907 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )788 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 908 789 { /* This was really a NUL. */ 909 790 yy_state_type yy_next_state; 910 791 911 (yy_c_buf_p) = (yytext_ptr)+ yy_amount_of_matched_text;912 913 yy_current_state = yy_get_previous_state( 792 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 793 794 yy_current_state = yy_get_previous_state(); 914 795 915 796 /* Okay, we're now positioned to make the NUL … … 924 805 yy_next_state = yy_try_NUL_trans( yy_current_state ); 925 806 926 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;807 yy_bp = yytext_ptr + YY_MORE_ADJ; 927 808 928 809 if ( yy_next_state ) 929 810 { 930 811 /* Consume the NUL. */ 931 yy_cp = ++ (yy_c_buf_p);812 yy_cp = ++yy_c_buf_p; 932 813 yy_current_state = yy_next_state; 933 814 goto yy_match; … … 936 817 else 937 818 { 938 yy_cp = (yy_c_buf_p);819 yy_cp = yy_c_buf_p; 939 820 goto yy_find_action; 940 821 } 941 822 } 942 823 943 else switch ( yy_get_next_buffer( 824 else switch ( yy_get_next_buffer() ) 944 825 { 945 826 case EOB_ACT_END_OF_FILE: 946 827 { 947 (yy_did_buffer_switch_on_eof)= 0;948 949 if ( yywrap( 828 yy_did_buffer_switch_on_eof = 0; 829 830 if ( yywrap() ) 950 831 { 951 832 /* Note: because we've taken care in … … 958 839 * YY_NULL will get returned. 959 840 */ 960 (yy_c_buf_p) = (yytext_ptr)+ YY_MORE_ADJ;841 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 961 842 962 843 yy_act = YY_STATE_EOF(YY_START); … … 966 847 else 967 848 { 968 if ( ! (yy_did_buffer_switch_on_eof))849 if ( ! yy_did_buffer_switch_on_eof ) 969 850 YY_NEW_FILE; 970 851 } … … 973 854 974 855 case EOB_ACT_CONTINUE_SCAN: 975 (yy_c_buf_p)=976 (yytext_ptr)+ yy_amount_of_matched_text;977 978 yy_current_state = yy_get_previous_state( 979 980 yy_cp = (yy_c_buf_p);981 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;856 yy_c_buf_p = 857 yytext_ptr + yy_amount_of_matched_text; 858 859 yy_current_state = yy_get_previous_state(); 860 861 yy_cp = yy_c_buf_p; 862 yy_bp = yytext_ptr + YY_MORE_ADJ; 982 863 goto yy_match; 983 864 984 865 case EOB_ACT_LAST_MATCH: 985 (yy_c_buf_p)=986 & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];987 988 yy_current_state = yy_get_previous_state( 989 990 yy_cp = (yy_c_buf_p);991 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;866 yy_c_buf_p = 867 &yy_current_buffer->yy_ch_buf[yy_n_chars]; 868 869 yy_current_state = yy_get_previous_state(); 870 871 yy_cp = yy_c_buf_p; 872 yy_bp = yytext_ptr + YY_MORE_ADJ; 992 873 goto yy_find_action; 993 874 } … … 1000 881 } /* end of action switch */ 1001 882 } /* end of scanning one token */ 1002 } /* end of yylex */ 883 } /* end of yylex */ 884 1003 885 1004 886 /* yy_get_next_buffer - try to read in a new buffer … … 1009 891 * EOB_ACT_END_OF_FILE - end of file 1010 892 */ 1011 static int yy_get_next_buffer (void) 1012 { 1013 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 1014 register char *source = (yytext_ptr); 893 894 static int yy_get_next_buffer() 895 { 896 register char *dest = yy_current_buffer->yy_ch_buf; 897 register char *source = yytext_ptr; 1015 898 register int number_to_move, i; 1016 899 int ret_val; 1017 900 1018 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)+ 1] )901 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 1019 902 YY_FATAL_ERROR( 1020 903 "fatal flex scanner internal error--end of buffer missed" ); 1021 904 1022 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )905 if ( yy_current_buffer->yy_fill_buffer == 0 ) 1023 906 { /* Don't try to fill the buffer, so this is an EOF. */ 1024 if ( (yy_c_buf_p) - (yytext_ptr)- YY_MORE_ADJ == 1 )907 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 1025 908 { 1026 909 /* We matched a single character, the EOB, so … … 1042 925 1043 926 /* First move last chars to start of buffer. */ 1044 number_to_move = (int) ( (yy_c_buf_p) - (yytext_ptr)) - 1;927 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 1045 928 1046 929 for ( i = 0; i < number_to_move; ++i ) 1047 930 *(dest++) = *(source++); 1048 931 1049 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )932 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1050 933 /* don't do the read, it's not guaranteed to return an EOF, 1051 934 * just force an EOF 1052 935 */ 1053 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars)= 0;936 yy_current_buffer->yy_n_chars = yy_n_chars = 0; 1054 937 1055 938 else 1056 939 { 1057 yy_size_t num_to_read =1058 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;940 int num_to_read = 941 yy_current_buffer->yy_buf_size - number_to_move - 1; 1059 942 1060 943 while ( num_to_read <= 0 ) 1061 944 { /* Not enough room in the buffer - grow it. */ 945 #ifdef YY_USES_REJECT 946 YY_FATAL_ERROR( 947 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 948 #else 1062 949 1063 950 /* just a shorter name for the current buffer */ 1064 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;951 YY_BUFFER_STATE b = yy_current_buffer; 1065 952 1066 953 int yy_c_buf_p_offset = 1067 (int) ( (yy_c_buf_p)- b->yy_ch_buf);954 (int) (yy_c_buf_p - b->yy_ch_buf); 1068 955 1069 956 if ( b->yy_is_our_buffer ) 1070 957 { 1071 yy_size_t new_size = b->yy_buf_size * 2;958 int new_size = b->yy_buf_size * 2; 1072 959 1073 960 if ( new_size <= 0 ) … … 1078 965 b->yy_ch_buf = (char *) 1079 966 /* Include room in for 2 EOB chars. */ 1080 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 967 yy_flex_realloc( (void *) b->yy_ch_buf, 968 b->yy_buf_size + 2 ); 1081 969 } 1082 970 else … … 1088 976 "fatal error - scanner input buffer overflow" ); 1089 977 1090 (yy_c_buf_p)= &b->yy_ch_buf[yy_c_buf_p_offset];1091 1092 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -978 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 979 980 num_to_read = yy_current_buffer->yy_buf_size - 1093 981 number_to_move - 1; 1094 982 #endif 1095 983 } 1096 984 … … 1099 987 1100 988 /* Read in more data. */ 1101 YY_INPUT( (& YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),1102 (yy_n_chars), num_to_read );1103 1104 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);989 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 990 yy_n_chars, num_to_read ); 991 992 yy_current_buffer->yy_n_chars = yy_n_chars; 1105 993 } 1106 994 1107 if ( (yy_n_chars)== 0 )995 if ( yy_n_chars == 0 ) 1108 996 { 1109 997 if ( number_to_move == YY_MORE_ADJ ) 1110 998 { 1111 999 ret_val = EOB_ACT_END_OF_FILE; 1112 yyrestart( yyin);1000 yyrestart( yyin ); 1113 1001 } 1114 1002 … … 1116 1004 { 1117 1005 ret_val = EOB_ACT_LAST_MATCH; 1118 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =1006 yy_current_buffer->yy_buffer_status = 1119 1007 YY_BUFFER_EOF_PENDING; 1120 1008 } … … 1124 1012 ret_val = EOB_ACT_CONTINUE_SCAN; 1125 1013 1126 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { 1127 /* Extend the array by 50%, plus the number we really need. */ 1128 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); 1129 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); 1130 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1131 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 1132 } 1133 1134 (yy_n_chars) += number_to_move; 1135 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 1136 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 1137 1138 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 1014 yy_n_chars += number_to_move; 1015 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 1016 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 1017 1018 yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 1139 1019 1140 1020 return ret_val; 1141 } 1021 } 1022 1142 1023 1143 1024 /* yy_get_previous_state - get the state just before the EOB char was reached */ 1144 1025 1145 static yy_state_type yy_get_previous_state (void)1146 {1026 static yy_state_type yy_get_previous_state() 1027 { 1147 1028 register yy_state_type yy_current_state; 1148 1029 register char *yy_cp; 1149 1150 yy_current_state = (yy_start);1151 1152 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )1030 1031 yy_current_state = yy_start; 1032 1033 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 1153 1034 { 1154 1035 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1155 1036 if ( yy_accept[yy_current_state] ) 1156 1037 { 1157 (yy_last_accepting_state)= yy_current_state;1158 (yy_last_accepting_cpos)= yy_cp;1038 yy_last_accepting_state = yy_current_state; 1039 yy_last_accepting_cpos = yy_cp; 1159 1040 } 1160 1041 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) … … 1168 1049 1169 1050 return yy_current_state; 1170 } 1051 } 1052 1171 1053 1172 1054 /* yy_try_NUL_trans - try to make a transition on the NUL character … … 1175 1057 * next_state = yy_try_NUL_trans( current_state ); 1176 1058 */ 1177 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 1178 { 1059 1060 #ifdef YY_USE_PROTOS 1061 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 1062 #else 1063 static yy_state_type yy_try_NUL_trans( yy_current_state ) 1064 yy_state_type yy_current_state; 1065 #endif 1066 { 1179 1067 register int yy_is_jam; 1180 register char *yy_cp = (yy_c_buf_p);1068 register char *yy_cp = yy_c_buf_p; 1181 1069 1182 1070 register YY_CHAR yy_c = 1; 1183 1071 if ( yy_accept[yy_current_state] ) 1184 1072 { 1185 (yy_last_accepting_state)= yy_current_state;1186 (yy_last_accepting_cpos)= yy_cp;1073 yy_last_accepting_state = yy_current_state; 1074 yy_last_accepting_cpos = yy_cp; 1187 1075 } 1188 1076 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) … … 1196 1084 1197 1085 return yy_is_jam ? 0 : yy_current_state; 1198 } 1199 1200 static void yyunput (int c, register char * yy_bp ) 1201 { 1202 register char *yy_cp; 1203 1204 yy_cp = (yy_c_buf_p); 1086 } 1087 1088 1089 #ifndef YY_NO_UNPUT 1090 #ifdef YY_USE_PROTOS 1091 static void yyunput( int c, register char *yy_bp ) 1092 #else 1093 static void yyunput( c, yy_bp ) 1094 int c; 1095 register char *yy_bp; 1096 #endif 1097 { 1098 register char *yy_cp = yy_c_buf_p; 1205 1099 1206 1100 /* undo effects of setting up yytext */ 1207 *yy_cp = (yy_hold_char);1208 1209 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )1101 *yy_cp = yy_hold_char; 1102 1103 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1210 1104 { /* need to shift things up to make room */ 1211 1105 /* +2 for EOB chars. */ 1212 register yy_size_t number_to_move = (yy_n_chars)+ 2;1213 register char *dest = & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[1214 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];1106 register int number_to_move = yy_n_chars + 2; 1107 register char *dest = &yy_current_buffer->yy_ch_buf[ 1108 yy_current_buffer->yy_buf_size + 2]; 1215 1109 register char *source = 1216 & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];1217 1218 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )1110 &yy_current_buffer->yy_ch_buf[number_to_move]; 1111 1112 while ( source > yy_current_buffer->yy_ch_buf ) 1219 1113 *--dest = *--source; 1220 1114 1221 1115 yy_cp += (int) (dest - source); 1222 1116 yy_bp += (int) (dest - source); 1223 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =1224 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;1225 1226 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )1117 yy_current_buffer->yy_n_chars = 1118 yy_n_chars = yy_current_buffer->yy_buf_size; 1119 1120 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1227 1121 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1228 1122 } … … 1230 1124 *--yy_cp = (char) c; 1231 1125 1232 (yytext_ptr) = yy_bp; 1233 (yy_hold_char) = *yy_cp; 1234 (yy_c_buf_p) = yy_cp; 1235 } 1236 1237 #ifndef YY_NO_INPUT 1126 1127 yytext_ptr = yy_bp; 1128 yy_hold_char = *yy_cp; 1129 yy_c_buf_p = yy_cp; 1130 } 1131 #endif /* ifndef YY_NO_UNPUT */ 1132 1133 1238 1134 #ifdef __cplusplus 1239 static int yyinput (void) 1240 #else 1241 static int input (void) 1242 #endif 1243 1244 { 1135 static int yyinput() 1136 #else 1137 static int input() 1138 #endif 1139 { 1245 1140 int c; 1246 1247 * (yy_c_buf_p) = (yy_hold_char);1248 1249 if ( * (yy_c_buf_p)== YY_END_OF_BUFFER_CHAR )1141 1142 *yy_c_buf_p = yy_hold_char; 1143 1144 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 1250 1145 { 1251 1146 /* yy_c_buf_p now points to the character we want to return. … … 1253 1148 * valid NUL; if not, then we've hit the end of the buffer. 1254 1149 */ 1255 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )1150 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1256 1151 /* This was really a NUL. */ 1257 * (yy_c_buf_p)= '\0';1152 *yy_c_buf_p = '\0'; 1258 1153 1259 1154 else 1260 1155 { /* need more input */ 1261 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);1262 ++ (yy_c_buf_p);1263 1264 switch ( yy_get_next_buffer( 1156 int offset = yy_c_buf_p - yytext_ptr; 1157 ++yy_c_buf_p; 1158 1159 switch ( yy_get_next_buffer() ) 1265 1160 { 1266 1161 case EOB_ACT_LAST_MATCH: … … 1276 1171 1277 1172 /* Reset buffer status. */ 1278 yyrestart( yyin );1279 1280 /* FALLTHROUGH*/1173 yyrestart( yyin ); 1174 1175 /* fall through */ 1281 1176 1282 1177 case EOB_ACT_END_OF_FILE: 1283 1178 { 1284 if ( yywrap( 1285 return 0;1286 1287 if ( ! (yy_did_buffer_switch_on_eof))1179 if ( yywrap() ) 1180 return EOF; 1181 1182 if ( ! yy_did_buffer_switch_on_eof ) 1288 1183 YY_NEW_FILE; 1289 1184 #ifdef __cplusplus … … 1295 1190 1296 1191 case EOB_ACT_CONTINUE_SCAN: 1297 (yy_c_buf_p) = (yytext_ptr)+ offset;1192 yy_c_buf_p = yytext_ptr + offset; 1298 1193 break; 1299 1194 } … … 1301 1196 } 1302 1197 1303 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 1304 *(yy_c_buf_p) = '\0'; /* preserve yytext */ 1305 (yy_hold_char) = *++(yy_c_buf_p); 1198 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 1199 *yy_c_buf_p = '\0'; /* preserve yytext */ 1200 yy_hold_char = *++yy_c_buf_p; 1201 1306 1202 1307 1203 return c; 1308 } 1309 #endif /* ifndef YY_NO_INPUT */ 1310 1311 /** Immediately switch to a different input stream. 1312 * @param input_file A readable stream. 1313 * 1314 * @note This function does not reset the start condition to @c INITIAL . 1315 */ 1316 void yyrestart (FILE * input_file ) 1317 { 1318 1319 if ( ! YY_CURRENT_BUFFER ){ 1320 yyensure_buffer_stack (); 1321 YY_CURRENT_BUFFER_LVALUE = 1322 yy_create_buffer(yyin,YY_BUF_SIZE ); 1323 } 1324 1325 yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 1326 yy_load_buffer_state( ); 1327 } 1328 1329 /** Switch to a different input buffer. 1330 * @param new_buffer The new input buffer. 1331 * 1332 */ 1333 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 1334 { 1335 1336 /* TODO. We should be able to replace this entire function body 1337 * with 1338 * yypop_buffer_state(); 1339 * yypush_buffer_state(new_buffer); 1340 */ 1341 yyensure_buffer_stack (); 1342 if ( YY_CURRENT_BUFFER == new_buffer ) 1204 } 1205 1206 1207 #ifdef YY_USE_PROTOS 1208 void yyrestart( FILE *input_file ) 1209 #else 1210 void yyrestart( input_file ) 1211 FILE *input_file; 1212 #endif 1213 { 1214 if ( ! yy_current_buffer ) 1215 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 1216 1217 yy_init_buffer( yy_current_buffer, input_file ); 1218 yy_load_buffer_state(); 1219 } 1220 1221 1222 #ifdef YY_USE_PROTOS 1223 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 1224 #else 1225 void yy_switch_to_buffer( new_buffer ) 1226 YY_BUFFER_STATE new_buffer; 1227 #endif 1228 { 1229 if ( yy_current_buffer == new_buffer ) 1343 1230 return; 1344 1231 1345 if ( YY_CURRENT_BUFFER)1232 if ( yy_current_buffer ) 1346 1233 { 1347 1234 /* Flush out information for old buffer. */ 1348 * (yy_c_buf_p) = (yy_hold_char);1349 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);1350 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);1235 *yy_c_buf_p = yy_hold_char; 1236 yy_current_buffer->yy_buf_pos = yy_c_buf_p; 1237 yy_current_buffer->yy_n_chars = yy_n_chars; 1351 1238 } 1352 1239 1353 YY_CURRENT_BUFFER_LVALUE= new_buffer;1354 yy_load_buffer_state( 1240 yy_current_buffer = new_buffer; 1241 yy_load_buffer_state(); 1355 1242 1356 1243 /* We don't actually know whether we did this switch during … … 1359 1246 * to go ahead and always set it. 1360 1247 */ 1361 (yy_did_buffer_switch_on_eof) = 1; 1362 } 1363 1364 static void yy_load_buffer_state (void) 1365 { 1366 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1367 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 1368 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 1369 (yy_hold_char) = *(yy_c_buf_p); 1370 } 1371 1372 /** Allocate and initialize an input buffer state. 1373 * @param file A readable stream. 1374 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 1375 * 1376 * @return the allocated buffer state. 1377 */ 1378 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) 1379 { 1248 yy_did_buffer_switch_on_eof = 1; 1249 } 1250 1251 1252 #ifdef YY_USE_PROTOS 1253 void yy_load_buffer_state( void ) 1254 #else 1255 void yy_load_buffer_state() 1256 #endif 1257 { 1258 yy_n_chars = yy_current_buffer->yy_n_chars; 1259 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 1260 yyin = yy_current_buffer->yy_input_file; 1261 yy_hold_char = *yy_c_buf_p; 1262 } 1263 1264 1265 #ifdef YY_USE_PROTOS 1266 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 1267 #else 1268 YY_BUFFER_STATE yy_create_buffer( file, size ) 1269 FILE *file; 1270 int size; 1271 #endif 1272 { 1380 1273 YY_BUFFER_STATE b; 1381 1382 b = (YY_BUFFER_STATE) yy alloc(sizeof( struct yy_buffer_state ));1274 1275 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1383 1276 if ( ! b ) 1384 1277 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); … … 1389 1282 * we need to put in 2 end-of-buffer characters. 1390 1283 */ 1391 b->yy_ch_buf = (char *) yy alloc(b->yy_buf_size + 2);1284 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 1392 1285 if ( ! b->yy_ch_buf ) 1393 1286 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); … … 1395 1288 b->yy_is_our_buffer = 1; 1396 1289 1397 yy_init_buffer( b,file );1290 yy_init_buffer( b, file ); 1398 1291 1399 1292 return b; 1400 } 1401 1402 /** Destroy the buffer. 1403 * @param b a buffer created with yy_create_buffer() 1404 * 1405 */ 1406 void yy_delete_buffer (YY_BUFFER_STATE b ) 1407 { 1408 1293 } 1294 1295 1296 #ifdef YY_USE_PROTOS 1297 void yy_delete_buffer( YY_BUFFER_STATE b ) 1298 #else 1299 void yy_delete_buffer( b ) 1300 YY_BUFFER_STATE b; 1301 #endif 1302 { 1409 1303 if ( ! b ) 1410 1304 return; 1411 1305 1412 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */1413 YY_CURRENT_BUFFER_LVALUE= (YY_BUFFER_STATE) 0;1306 if ( b == yy_current_buffer ) 1307 yy_current_buffer = (YY_BUFFER_STATE) 0; 1414 1308 1415 1309 if ( b->yy_is_our_buffer ) 1416 yyfree((void *) b->yy_ch_buf ); 1417 1418 yyfree((void *) b ); 1419 } 1420 1421 #ifndef __cplusplus 1422 extern int isatty (int ); 1423 #endif /* __cplusplus */ 1424 1425 /* Initializes or reinitializes a buffer. 1426 * This function is sometimes called more than once on the same buffer, 1427 * such as during a yyrestart() or at EOF. 1428 */ 1429 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 1430 1431 { 1432 int oerrno = errno; 1433 1434 yy_flush_buffer(b ); 1310 yy_flex_free( (void *) b->yy_ch_buf ); 1311 1312 yy_flex_free( (void *) b ); 1313 } 1314 1315 1316 #ifndef YY_ALWAYS_INTERACTIVE 1317 #ifndef YY_NEVER_INTERACTIVE 1318 extern int isatty YY_PROTO(( int )); 1319 #endif 1320 #endif 1321 1322 #ifdef YY_USE_PROTOS 1323 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 1324 #else 1325 void yy_init_buffer( b, file ) 1326 YY_BUFFER_STATE b; 1327 FILE *file; 1328 #endif 1329 1330 1331 { 1332 yy_flush_buffer( b ); 1435 1333 1436 1334 b->yy_input_file = file; 1437 1335 b->yy_fill_buffer = 1; 1438 1336 1439 /* If b is the current buffer, then yy_init_buffer was _probably_ 1440 * called from yyrestart() or through yy_get_next_buffer. 1441 * In that case, we don't want to reset the lineno or column. 1442 */ 1443 if (b != YY_CURRENT_BUFFER){ 1444 b->yy_bs_lineno = 1; 1445 b->yy_bs_column =0;1446 } 1447 1448 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1449 1450 errno = oerrno; 1451 } 1452 1453 /** Discard all buffered characters. On the next scan, YY_INPUT will be called. 1454 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 1455 * 1456 */ 1457 void yy_flush_buffer (YY_BUFFER_STATE b ) 1458 {1459 1337 #if YY_ALWAYS_INTERACTIVE 1338 b->yy_is_interactive = 1; 1339 #else 1340 #if YY_NEVER_INTERACTIVE 1341 b->yy_is_interactive = 0; 1342 #else 1343 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1344 #endif 1345 #endif 1346 } 1347 1348 1349 #ifdef YY_USE_PROTOS 1350 void yy_flush_buffer( YY_BUFFER_STATE b ) 1351 #else 1352 void yy_flush_buffer( b ) 1353 YY_BUFFER_STATE b; 1354 #endif 1355 1356 { 1357 if ( ! b ) 1460 1358 return; 1461 1359 … … 1474 1372 b->yy_buffer_status = YY_BUFFER_NEW; 1475 1373 1476 if ( b == YY_CURRENT_BUFFER ) 1477 yy_load_buffer_state( ); 1478 } 1479 1480 /** Pushes the new state onto the stack. The new state becomes 1481 * the current state. This function will allocate the stack 1482 * if necessary. 1483 * @param new_buffer The new state. 1484 * 1485 */ 1486 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 1487 { 1488 if (new_buffer == NULL) 1489 return; 1490 1491 yyensure_buffer_stack(); 1492 1493 /* This block is copied from yy_switch_to_buffer. */ 1494 if ( YY_CURRENT_BUFFER ) 1495 { 1496 /* Flush out information for old buffer. */ 1497 *(yy_c_buf_p) = (yy_hold_char); 1498 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1499 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1500 } 1501 1502 /* Only push if top exists. Otherwise, replace top. */ 1503 if (YY_CURRENT_BUFFER) 1504 (yy_buffer_stack_top)++; 1505 YY_CURRENT_BUFFER_LVALUE = new_buffer; 1506 1507 /* copied from yy_switch_to_buffer. */ 1508 yy_load_buffer_state( ); 1509 (yy_did_buffer_switch_on_eof) = 1; 1510 } 1511 1512 /** Removes and deletes the top of the stack, if present. 1513 * The next element becomes the new top. 1514 * 1515 */ 1516 void yypop_buffer_state (void) 1517 { 1518 if (!YY_CURRENT_BUFFER) 1519 return; 1520 1521 yy_delete_buffer(YY_CURRENT_BUFFER ); 1522 YY_CURRENT_BUFFER_LVALUE = NULL; 1523 if ((yy_buffer_stack_top) > 0) 1524 --(yy_buffer_stack_top); 1525 1526 if (YY_CURRENT_BUFFER) { 1527 yy_load_buffer_state( ); 1528 (yy_did_buffer_switch_on_eof) = 1; 1529 } 1530 } 1531 1532 /* Allocates the stack if it does not exist. 1533 * Guarantees space for at least one push. 1534 */ 1535 static void yyensure_buffer_stack (void) 1536 { 1537 yy_size_t num_to_alloc; 1538 1539 if (!(yy_buffer_stack)) { 1540 1541 /* First allocation is just for 2 elements, since we don't know if this 1542 * scanner will even need a stack. We use 2 instead of 1 to avoid an 1543 * immediate realloc on the next call. 1544 */ 1545 num_to_alloc = 1; 1546 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 1547 (num_to_alloc * sizeof(struct yy_buffer_state*) 1548 ); 1549 if ( ! (yy_buffer_stack) ) 1550 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 1551 1552 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 1553 1554 (yy_buffer_stack_max) = num_to_alloc; 1555 (yy_buffer_stack_top) = 0; 1556 return; 1557 } 1558 1559 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 1560 1561 /* Increase the buffer to prepare for a possible push. */ 1562 int grow_size = 8 /* arbitrary grow size */; 1563 1564 num_to_alloc = (yy_buffer_stack_max) + grow_size; 1565 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 1566 ((yy_buffer_stack), 1567 num_to_alloc * sizeof(struct yy_buffer_state*) 1568 ); 1569 if ( ! (yy_buffer_stack) ) 1570 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 1571 1572 /* zero only the new slots.*/ 1573 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 1574 (yy_buffer_stack_max) = num_to_alloc; 1575 } 1576 } 1577 1578 /** Setup the input buffer state to scan directly from a user-specified character buffer. 1579 * @param base the character buffer 1580 * @param size the size in bytes of the character buffer 1581 * 1582 * @return the newly allocated buffer state object. 1583 */ 1584 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) 1585 { 1374 if ( b == yy_current_buffer ) 1375 yy_load_buffer_state(); 1376 } 1377 1378 1379 #ifndef YY_NO_SCAN_BUFFER 1380 #ifdef YY_USE_PROTOS 1381 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 1382 #else 1383 YY_BUFFER_STATE yy_scan_buffer( base, size ) 1384 char *base; 1385 yy_size_t size; 1386 #endif 1387 { 1586 1388 YY_BUFFER_STATE b; 1587 1389 1588 1390 if ( size < 2 || 1589 1391 base[size-2] != YY_END_OF_BUFFER_CHAR || … … 1592 1394 return 0; 1593 1395 1594 b = (YY_BUFFER_STATE) yy alloc(sizeof( struct yy_buffer_state ));1396 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1595 1397 if ( ! b ) 1596 1398 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); … … 1606 1408 b->yy_buffer_status = YY_BUFFER_NEW; 1607 1409 1608 yy_switch_to_buffer( b);1410 yy_switch_to_buffer( b ); 1609 1411 1610 1412 return b; 1611 } 1612 1613 /** Setup the input buffer state to scan a string. The next call to yylex() will 1614 * scan from a @e copy of @a str. 1615 * @param yystr a NUL-terminated string to scan 1616 * 1617 * @return the newly allocated buffer state object. 1618 * @note If you want to scan bytes that may contain NUL values, then use 1619 * yy_scan_bytes() instead. 1620 */ 1621 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) 1622 { 1623 1624 return yy_scan_bytes(yystr,strlen(yystr) ); 1625 } 1626 1627 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 1628 * scan from a @e copy of @a bytes. 1629 * @param bytes the byte buffer to scan 1630 * @param len the number of bytes in the buffer pointed to by @a bytes. 1631 * 1632 * @return the newly allocated buffer state object. 1633 */ 1634 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) 1635 { 1413 } 1414 #endif 1415 1416 1417 #ifndef YY_NO_SCAN_STRING 1418 #ifdef YY_USE_PROTOS 1419 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 1420 #else 1421 YY_BUFFER_STATE yy_scan_string( yy_str ) 1422 yyconst char *yy_str; 1423 #endif 1424 { 1425 int len; 1426 for ( len = 0; yy_str[len]; ++len ) 1427 ; 1428 1429 return yy_scan_bytes( yy_str, len ); 1430 } 1431 #endif 1432 1433 1434 #ifndef YY_NO_SCAN_BYTES 1435 #ifdef YY_USE_PROTOS 1436 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 1437 #else 1438 YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 1439 yyconst char *bytes; 1440 int len; 1441 #endif 1442 { 1636 1443 YY_BUFFER_STATE b; 1637 1444 char *buf; 1638 yy_size_t n, i; 1639 1445 yy_size_t n; 1446 int i; 1447 1640 1448 /* Get memory for full buffer, including space for trailing EOB's. */ 1641 n = _yybytes_len + 2;1642 buf = (char *) yy alloc(n);1449 n = len + 2; 1450 buf = (char *) yy_flex_alloc( n ); 1643 1451 if ( ! buf ) 1644 1452 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 1645 1453 1646 for ( i = 0; i < _yybytes_len; ++i )1647 buf[i] = yybytes[i];1648 1649 buf[ _yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;1650 1651 b = yy_scan_buffer( buf,n );1454 for ( i = 0; i < len; ++i ) 1455 buf[i] = bytes[i]; 1456 1457 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 1458 1459 b = yy_scan_buffer( buf, n ); 1652 1460 if ( ! b ) 1653 1461 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); … … 1659 1467 1660 1468 return b; 1661 } 1469 } 1470 #endif 1471 1472 1473 #ifndef YY_NO_PUSH_STATE 1474 #ifdef YY_USE_PROTOS 1475 static void yy_push_state( int new_state ) 1476 #else 1477 static void yy_push_state( new_state ) 1478 int new_state; 1479 #endif 1480 { 1481 if ( yy_start_stack_ptr >= yy_start_stack_depth ) 1482 { 1483 yy_size_t new_size; 1484 1485 yy_start_stack_depth += YY_START_STACK_INCR; 1486 new_size = yy_start_stack_depth * sizeof( int ); 1487 1488 if ( ! yy_start_stack ) 1489 yy_start_stack = (int *) yy_flex_alloc( new_size ); 1490 1491 else 1492 yy_start_stack = (int *) yy_flex_realloc( 1493 (void *) yy_start_stack, new_size ); 1494 1495 if ( ! yy_start_stack ) 1496 YY_FATAL_ERROR( 1497 "out of memory expanding start-condition stack" ); 1498 } 1499 1500 yy_start_stack[yy_start_stack_ptr++] = YY_START; 1501 1502 BEGIN(new_state); 1503 } 1504 #endif 1505 1506 1507 #ifndef YY_NO_POP_STATE 1508 static void yy_pop_state() 1509 { 1510 if ( --yy_start_stack_ptr < 0 ) 1511 YY_FATAL_ERROR( "start-condition stack underflow" ); 1512 1513 BEGIN(yy_start_stack[yy_start_stack_ptr]); 1514 } 1515 #endif 1516 1517 1518 #ifndef YY_NO_TOP_STATE 1519 static int yy_top_state() 1520 { 1521 return yy_start_stack[yy_start_stack_ptr - 1]; 1522 } 1523 #endif 1662 1524 1663 1525 #ifndef YY_EXIT_FAILURE … … 1665 1527 #endif 1666 1528 1667 static void yy_fatal_error (yyconst char* msg ) 1668 { 1669 (void) fprintf( stderr, "%s\n", msg ); 1529 #ifdef YY_USE_PROTOS 1530 static void yy_fatal_error( yyconst char msg[] ) 1531 #else 1532 static void yy_fatal_error( msg ) 1533 char msg[]; 1534 #endif 1535 { 1536 (void) fprintf( stderr, "%s\n", msg ); 1670 1537 exit( YY_EXIT_FAILURE ); 1671 } 1538 } 1539 1540 1672 1541 1673 1542 /* Redefine yyless() so it works in section 3 code. */ … … 1678 1547 { \ 1679 1548 /* Undo effects of setting up yytext. */ \ 1680 int yyless_macro_arg = (n); \ 1681 YY_LESS_LINENO(yyless_macro_arg);\ 1682 yytext[yyleng] = (yy_hold_char); \ 1683 (yy_c_buf_p) = yytext + yyless_macro_arg; \ 1684 (yy_hold_char) = *(yy_c_buf_p); \ 1685 *(yy_c_buf_p) = '\0'; \ 1686 yyleng = yyless_macro_arg; \ 1549 yytext[yyleng] = yy_hold_char; \ 1550 yy_c_buf_p = yytext + n; \ 1551 yy_hold_char = *yy_c_buf_p; \ 1552 *yy_c_buf_p = '\0'; \ 1553 yyleng = n; \ 1687 1554 } \ 1688 1555 while ( 0 ) 1689 1556 1690 /* Accessor methods (get/set functions) to struct members. */ 1691 1692 /** Get the current line number. 1693 * 1694 */ 1695 int yyget_lineno (void) 1696 { 1697 1698 return yylineno; 1699 } 1700 1701 /** Get the input stream. 1702 * 1703 */ 1704 FILE *yyget_in (void) 1705 { 1706 return yyin; 1707 } 1708 1709 /** Get the output stream. 1710 * 1711 */ 1712 FILE *yyget_out (void) 1713 { 1714 return yyout; 1715 } 1716 1717 /** Get the length of the current token. 1718 * 1719 */ 1720 yy_size_t yyget_leng (void) 1721 { 1722 return yyleng; 1723 } 1724 1725 /** Get the current token. 1726 * 1727 */ 1728 1729 char *yyget_text (void) 1730 { 1731 return yytext; 1732 } 1733 1734 /** Set the current line number. 1735 * @param line_number 1736 * 1737 */ 1738 void yyset_lineno (int line_number ) 1739 { 1740 1741 yylineno = line_number; 1742 } 1743 1744 /** Set the input stream. This does not discard the current 1745 * input buffer. 1746 * @param in_str A readable stream. 1747 * 1748 * @see yy_switch_to_buffer 1749 */ 1750 void yyset_in (FILE * in_str ) 1751 { 1752 yyin = in_str ; 1753 } 1754 1755 void yyset_out (FILE * out_str ) 1756 { 1757 yyout = out_str ; 1758 } 1759 1760 int yyget_debug (void) 1761 { 1762 return yy_flex_debug; 1763 } 1764 1765 void yyset_debug (int bdebug ) 1766 { 1767 yy_flex_debug = bdebug ; 1768 } 1769 1770 static int yy_init_globals (void) 1771 { 1772 /* Initialization is the same as for the non-reentrant scanner. 1773 * This function is called from yylex_destroy(), so don't allocate here. 1774 */ 1775 1776 (yy_buffer_stack) = 0; 1777 (yy_buffer_stack_top) = 0; 1778 (yy_buffer_stack_max) = 0; 1779 (yy_c_buf_p) = (char *) 0; 1780 (yy_init) = 0; 1781 (yy_start) = 0; 1782 1783 /* Defined in main.c */ 1784 #ifdef YY_STDINIT 1785 yyin = stdin; 1786 yyout = stdout; 1787 #else 1788 yyin = (FILE *) 0; 1789 yyout = (FILE *) 0; 1790 #endif 1791 1792 /* For future reference: Set errno on error, since we are called by 1793 * yylex_init() 1794 */ 1795 return 0; 1796 } 1797 1798 /* yylex_destroy is for both reentrant and non-reentrant scanners. */ 1799 int yylex_destroy (void) 1800 { 1801 1802 /* Pop the buffer stack, destroying each element. */ 1803 while(YY_CURRENT_BUFFER){ 1804 yy_delete_buffer(YY_CURRENT_BUFFER ); 1805 YY_CURRENT_BUFFER_LVALUE = NULL; 1806 yypop_buffer_state(); 1807 } 1808 1809 /* Destroy the stack itself. */ 1810 yyfree((yy_buffer_stack) ); 1811 (yy_buffer_stack) = NULL; 1812 1813 /* Reset the globals. This is important in a non-reentrant scanner so the next time 1814 * yylex() is called, initialization will occur. */ 1815 yy_init_globals( ); 1816 1817 return 0; 1818 } 1819 1820 /* 1821 * Internal utility routines. 1822 */ 1557 1558 /* Internal utility routines. */ 1823 1559 1824 1560 #ifndef yytext_ptr 1825 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 1826 { 1561 #ifdef YY_USE_PROTOS 1562 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 1563 #else 1564 static void yy_flex_strncpy( s1, s2, n ) 1565 char *s1; 1566 yyconst char *s2; 1567 int n; 1568 #endif 1569 { 1827 1570 register int i; 1828 1571 for ( i = 0; i < n; ++i ) 1829 1572 s1[i] = s2[i]; 1830 }1573 } 1831 1574 #endif 1832 1575 1833 1576 #ifdef YY_NEED_STRLEN 1834 static int yy_flex_strlen (yyconst char * s ) 1835 { 1577 #ifdef YY_USE_PROTOS 1578 static int yy_flex_strlen( yyconst char *s ) 1579 #else 1580 static int yy_flex_strlen( s ) 1581 yyconst char *s; 1582 #endif 1583 { 1836 1584 register int n; 1837 1585 for ( n = 0; s[n]; ++n ) … … 1839 1587 1840 1588 return n; 1841 } 1842 #endif 1843 1844 void *yyalloc (yy_size_t size ) 1845 { 1589 } 1590 #endif 1591 1592 1593 #ifdef YY_USE_PROTOS 1594 static void *yy_flex_alloc( yy_size_t size ) 1595 #else 1596 static void *yy_flex_alloc( size ) 1597 yy_size_t size; 1598 #endif 1599 { 1846 1600 return (void *) malloc( size ); 1847 } 1848 1849 void *yyrealloc (void * ptr, yy_size_t size ) 1850 { 1601 } 1602 1603 #ifdef YY_USE_PROTOS 1604 static void *yy_flex_realloc( void *ptr, yy_size_t size ) 1605 #else 1606 static void *yy_flex_realloc( ptr, size ) 1607 void *ptr; 1608 yy_size_t size; 1609 #endif 1610 { 1851 1611 /* The cast to (char *) in the following accommodates both 1852 1612 * implementations that use char* generic pointers, and those … … 1857 1617 */ 1858 1618 return (void *) realloc( (char *) ptr, size ); 1859 } 1860 1861 void yyfree (void * ptr ) 1862 { 1863 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ 1864 } 1865 1866 #define YYTABLES_NAME "yytables" 1867 1619 } 1620 1621 #ifdef YY_USE_PROTOS 1622 static void yy_flex_free( void *ptr ) 1623 #else 1624 static void yy_flex_free( ptr ) 1625 void *ptr; 1626 #endif 1627 { 1628 free( ptr ); 1629 } 1630 1631 #if YY_MAIN 1632 int main() 1633 { 1634 yylex(); 1635 return 0; 1636 } 1637 #endif 1868 1638 #line 86 "sel-lex.l" 1869 1870 1639 1871 1640 … … 1923 1692 return n; 1924 1693 } 1925 -
heimdal/trunk/lib/krb5/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=krb5 17 OS2_DLL_NAME=krb5 18 OS2_DLL_OBJ=$(libkrb5_la_OBJECTS:%.lo=%.o) 19 OS2_DLL_LIBS=$(LIBS) ../roken/.libs/roken.a ../asn1/.libs/asn1.a ../hcrypto/.libs/hcrypto.a ../wind/.libs/wind.a ../com_err/.libs/com_err.a ../../base/.libs/heimbase.a -lsqlite3 ../hx509/.libs/hx509.a ../ipc/.libs/heim-ipcc.a 15 20 16 21 @SET_MAKE@ … … 1040 1045 krb5.moduli 1041 1046 1042 all: all-am 1047 all: all-am $(OS2_DLL_NAME).dll 1043 1048 1044 1049 .SUFFIXES: … … 3214 3219 # Otherwise a system limit (for SysV at least) may be exceeded. 3215 3220 .NOEXPORT: 3221 3222 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 3223 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 3224 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 3225 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 3226 echo "EXPORTS" >> $(OS2_DLL_NAME).def 3227 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 3228 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 3229 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 3230 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def -
heimdal/trunk/lib/krb5/fcache.c
r1 r4 74 74 { 75 75 int ret; 76 #if def HAVE_FCNTL76 #if defined(HAVE_FCNTL) && !defined(__OS2__) 77 77 struct flock l; 78 78 … … 117 117 { 118 118 int ret; 119 #if def HAVE_FCNTL119 #if defined(HAVE_FCNTL) && !defined(__OS2__) 120 120 struct flock l; 121 121 l.l_start = 0; … … 256 256 return errno; 257 257 258 #ifndef __OS2__ 258 259 fd = open(filename, O_RDWR | O_BINARY); 259 260 if(fd < 0) { … … 264 265 } 265 266 rk_cloexec(fd); 267 266 268 ret = _krb5_xlock(context, fd, 1, filename); 267 269 if (ret) { … … 269 271 return ret; 270 272 } 273 #endif 271 274 if (unlink(filename) < 0) { 272 275 _krb5_xunlock(context, fd); -
heimdal/trunk/lib/ntlm/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=heimntlm 17 OS2_DLL_NAME=heimntlm 18 OS2_DLL_OBJ=$(libheimntlm_la_OBJECTS:%.lo=%.o) 19 OS2_DLL_LIBS=$(LIBS) ../roken/.libs/roken.a ../asn1/.libs/asn1.a ../hcrypto/.libs/hcrypto.a ../wind/.libs/wind.a ../com_err/.libs/com_err.a ../../base/.libs/heimbase.a -lsqlite3 ../hx509/.libs/hx509.a ../ipc/.libs/heim-ipcc.a ../krb5/.libs/krb5.a 15 20 16 21 @SET_MAKE@ … … 426 431 ntlm_err.c ntlm_err.h 427 432 428 all: all-am 433 all: all-am $(OS2_DLL_NAME).dll 429 434 430 435 .SUFFIXES: … … 1075 1080 # Otherwise a system limit (for SysV at least) may be exceeded. 1076 1081 .NOEXPORT: 1082 1083 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 1084 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 1085 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 1086 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 1087 echo "EXPORTS" >> $(OS2_DLL_NAME).def 1088 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 1089 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 1090 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 1091 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def -
heimdal/trunk/lib/roken/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=roken 17 OS2_DLL_NAME=roken 18 OS2_DLL_OBJ=$(libroken_la_OBJECTS:%.lo=%.o) $(LIBOBJS) 19 OS2_DLL_LIBS=$(LIBS) 15 20 16 21 @SET_MAKE@ … … 639 644 version-script.map 640 645 641 all: $(BUILT_SOURCES) 646 all: $(BUILT_SOURCES) $(OS2_DLL_NAME).dll 642 647 $(MAKE) $(AM_MAKEFLAGS) all-am 643 648 … … 2050 2055 # Otherwise a system limit (for SysV at least) may be exceeded. 2051 2056 .NOEXPORT: 2057 2058 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 2059 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 2060 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 2061 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 2062 echo "EXPORTS" >> $(OS2_DLL_NAME).def 2063 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 2064 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 2065 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 2066 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def -
heimdal/trunk/lib/sl/slc-lex.c
r1 r4 1 2 #line 3 "slc-lex.c"3 4 #define YY_INT_ALIGNED short int5 6 1 /* A lexical scanner generated by flex */ 2 3 /* Scanner skeleton version: 4 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ 5 */ 7 6 8 7 #define FLEX_SCANNER 9 8 #define YY_FLEX_MAJOR_VERSION 2 10 9 #define YY_FLEX_MINOR_VERSION 5 11 #define YY_FLEX_SUBMINOR_VERSION 35 12 #if YY_FLEX_SUBMINOR_VERSION > 0 13 #define FLEX_BETA 14 #endif 15 16 /* First, we deal with platform-specific or compiler-specific issues. */ 17 18 /* begin standard C headers. */ 10 19 11 #include <stdio.h> 20 #include <string.h> 21 #include <errno.h> 12 13 14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 15 #ifdef c_plusplus 16 #ifndef __cplusplus 17 #define __cplusplus 18 #endif 19 #endif 20 21 22 #ifdef __cplusplus 23 22 24 #include <stdlib.h> 23 24 /* end standard C headers. */ 25 26 /* flex integer type definitions */ 27 28 #ifndef FLEXINT_H 29 #define FLEXINT_H 30 31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 32 33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 34 35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 36 * if you want the limit (max/min) macros for int types. 37 */ 38 #ifndef __STDC_LIMIT_MACROS 39 #define __STDC_LIMIT_MACROS 1 40 #endif 41 42 #include <inttypes.h> 43 typedef int8_t flex_int8_t; 44 typedef uint8_t flex_uint8_t; 45 typedef int16_t flex_int16_t; 46 typedef uint16_t flex_uint16_t; 47 typedef int32_t flex_int32_t; 48 typedef uint32_t flex_uint32_t; 49 typedef uint64_t flex_uint64_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 25 #include <unistd.h> 26 27 /* Use prototypes in function declarations. */ 28 #define YY_USE_PROTOS 91 29 92 30 /* The "const" storage-class-modifier is valid. */ … … 95 33 #else /* ! __cplusplus */ 96 34 97 /* C99 requires __STDC__ to be defined as 1. */ 98 #if defined (__STDC__) 99 35 #if __STDC__ 36 37 #define YY_USE_PROTOS 100 38 #define YY_USE_CONST 101 39 102 #endif /* defined (__STDC__)*/40 #endif /* __STDC__ */ 103 41 #endif /* ! __cplusplus */ 42 43 #ifdef __TURBOC__ 44 #pragma warn -rch 45 #pragma warn -use 46 #include <io.h> 47 #include <stdlib.h> 48 #define YY_USE_CONST 49 #define YY_USE_PROTOS 50 #endif 104 51 105 52 #ifdef YY_USE_CONST … … 107 54 #else 108 55 #define yyconst 56 #endif 57 58 59 #ifdef YY_USE_PROTOS 60 #define YY_PROTO(proto) proto 61 #else 62 #define YY_PROTO(proto) () 109 63 #endif 110 64 … … 123 77 * definition of BEGIN. 124 78 */ 125 #define BEGIN (yy_start)= 1 + 2 *79 #define BEGIN yy_start = 1 + 2 * 126 80 127 81 /* Translate the current start state into a value that can be later handed … … 129 83 * compatibility. 130 84 */ 131 #define YY_START (( (yy_start)- 1) / 2)85 #define YY_START ((yy_start - 1) / 2) 132 86 #define YYSTATE YY_START 133 87 … … 136 90 137 91 /* Special action meaning "start processing a new file". */ 138 #define YY_NEW_FILE yyrestart( yyin)92 #define YY_NEW_FILE yyrestart( yyin ) 139 93 140 94 #define YY_END_OF_BUFFER_CHAR 0 141 95 142 96 /* Size of default input buffer. */ 143 #ifndef YY_BUF_SIZE144 97 #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 98 153 99 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 100 101 extern int yyleng; 163 102 extern FILE *yyin, *yyout; 164 103 … … 167 106 #define EOB_ACT_LAST_MATCH 2 168 107 169 #define YY_LESS_LINENO(n) 170 171 /* Return all but the first "n" matched characters back to the input stream. */ 108 /* The funky do-while in the following #define is used to turn the definition 109 * int a single C statement (which needs a semi-colon terminator). This 110 * avoids problems with code like: 111 * 112 * if ( condition_holds ) 113 * yyless( 5 ); 114 * else 115 * do_something_else(); 116 * 117 * Prior to using the do-while the compiler would get upset at the 118 * "else" because it interpreted the "if" statement as being all 119 * done when it reached the ';' after the yyless() call. 120 */ 121 122 /* Return all but the first 'n' matched characters back to the input stream. */ 123 172 124 #define yyless(n) \ 173 125 do \ 174 126 { \ 175 127 /* Undo effects of setting up yytext. */ \ 176 int yyless_macro_arg = (n); \ 177 YY_LESS_LINENO(yyless_macro_arg);\ 178 *yy_cp = (yy_hold_char); \ 128 *yy_cp = yy_hold_char; \ 179 129 YY_RESTORE_YY_MORE_OFFSET \ 180 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg- YY_MORE_ADJ; \130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 181 131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 182 132 } \ 183 133 while ( 0 ) 184 134 185 #define unput(c) yyunput( c, (yytext_ptr) ) 186 187 #ifndef YY_STRUCT_YY_BUFFER_STATE 188 #define YY_STRUCT_YY_BUFFER_STATE 135 #define unput(c) yyunput( c, yytext_ptr ) 136 137 /* The following is because we cannot portably get our hands on size_t 138 * (without autoconf's help, which isn't available because we want 139 * flex-generated scanners to compile on their own). 140 */ 141 typedef unsigned int yy_size_t; 142 143 189 144 struct yy_buffer_state 190 145 { … … 202 157 * characters. 203 158 */ 204 yy_size_t yy_n_chars;159 int yy_n_chars; 205 160 206 161 /* Whether we "own" the buffer - i.e., we know we created it, … … 223 178 int yy_at_bol; 224 179 225 int yy_bs_lineno; /**< The line count. */226 int yy_bs_column; /**< The column count. */227 228 180 /* Whether to try to fill the input buffer when we reach the 229 181 * end of it. … … 232 184 233 185 int yy_buffer_status; 234 235 186 #define YY_BUFFER_NEW 0 236 187 #define YY_BUFFER_NORMAL 1 … … 246 197 */ 247 198 #define YY_BUFFER_EOF_PENDING 2 248 249 199 }; 250 #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 251 252 /* Stack of input buffers. */ 253 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 254 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 255 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 200 201 static YY_BUFFER_STATE yy_current_buffer = 0; 256 202 257 203 /* We provide macros for accessing buffer states in case in the 258 204 * future we want to put the buffer states in a more general 259 205 * "scanner state". 260 * 261 * Returns the top of the stack, or NULL. 262 */ 263 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 264 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 265 : NULL) 266 267 /* Same as previous macro, but useful when we know that the buffer stack is not 268 * NULL or when we need an lvalue. For internal use only. 269 */ 270 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 206 */ 207 #define YY_CURRENT_BUFFER yy_current_buffer 208 271 209 272 210 /* yy_hold_char holds the character lost when yytext is formed. */ 273 211 static char yy_hold_char; 274 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ 275 yy_size_t yyleng; 212 213 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 214 215 216 int yyleng; 276 217 277 218 /* Points to current character in buffer. */ 278 219 static char *yy_c_buf_p = (char *) 0; 279 static int yy_init = 0; /* whether we need to initialize */220 static int yy_init = 1; /* whether we need to initialize */ 280 221 static int yy_start = 0; /* start state number */ 281 222 … … 285 226 static int yy_did_buffer_switch_on_eof; 286 227 287 void yyrestart (FILE *input_file ); 288 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 289 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); 290 void yy_delete_buffer (YY_BUFFER_STATE b ); 291 void yy_flush_buffer (YY_BUFFER_STATE b ); 292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); 293 void yypop_buffer_state (void ); 294 295 static void yyensure_buffer_stack (void ); 296 static void yy_load_buffer_state (void ); 297 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 298 299 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 300 301 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); 302 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 303 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); 304 305 void *yyalloc (yy_size_t ); 306 void *yyrealloc (void *,yy_size_t ); 307 void yyfree (void * ); 228 void yyrestart YY_PROTO(( FILE *input_file )); 229 230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 231 void yy_load_buffer_state YY_PROTO(( void )); 232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 237 238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 241 242 static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 244 static void yy_flex_free YY_PROTO(( void * )); 308 245 309 246 #define yy_new_buffer yy_create_buffer … … 311 248 #define yy_set_interactive(is_interactive) \ 312 249 { \ 313 if ( ! YY_CURRENT_BUFFER ){ \ 314 yyensure_buffer_stack (); \ 315 YY_CURRENT_BUFFER_LVALUE = \ 316 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 317 } \ 318 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 250 if ( ! yy_current_buffer ) \ 251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 252 yy_current_buffer->yy_is_interactive = is_interactive; \ 319 253 } 320 254 321 255 #define yy_set_bol(at_bol) \ 322 256 { \ 323 if ( ! YY_CURRENT_BUFFER ){\ 324 yyensure_buffer_stack (); \ 325 YY_CURRENT_BUFFER_LVALUE = \ 326 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 327 } \ 328 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 329 } 330 331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 332 333 /* Begin user sect3 */ 257 if ( ! yy_current_buffer ) \ 258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 259 yy_current_buffer->yy_at_bol = at_bol; \ 260 } 261 262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 334 263 335 264 typedef unsigned char YY_CHAR; 336 337 265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 338 339 266 typedef int yy_state_type; 340 341 extern int yylineno;342 343 int yylineno = 1;344 345 267 extern char *yytext; 346 268 #define yytext_ptr yytext 347 269 348 static yy_state_type yy_get_previous_state (void);349 static yy_state_type yy_try_NUL_trans (yy_state_type current_state);350 static int yy_get_next_buffer (void);351 static void yy_fatal_error (yyconst char msg[]);270 static yy_state_type yy_get_previous_state YY_PROTO(( void )); 271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 272 static int yy_get_next_buffer YY_PROTO(( void )); 273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 352 274 353 275 /* Done after the current pattern has been matched and before the … … 355 277 */ 356 278 #define YY_DO_BEFORE_ACTION \ 357 (yytext_ptr)= yy_bp; \358 yyleng = ( yy_size_t) (yy_cp - yy_bp); \359 (yy_hold_char)= *yy_cp; \279 yytext_ptr = yy_bp; \ 280 yyleng = (int) (yy_cp - yy_bp); \ 281 yy_hold_char = *yy_cp; \ 360 282 *yy_cp = '\0'; \ 361 (yy_c_buf_p)= yy_cp;283 yy_c_buf_p = yy_cp; 362 284 363 285 #define YY_NUM_RULES 7 364 286 #define YY_END_OF_BUFFER 8 365 /* This struct is not used in this scanner, 366 but its presence is necessary. */ 367 struct yy_trans_info 368 { 369 flex_int32_t yy_verify; 370 flex_int32_t yy_nxt; 371 }; 372 static yyconst flex_int16_t yy_accept[14] = 287 static yyconst short int yy_accept[14] = 373 288 { 0, 374 289 0, 0, 8, 7, 6, 3, 2, 7, 5, 1, … … 376 291 } ; 377 292 378 static yyconst flex_int32_t yy_ec[256] =293 static yyconst int yy_ec[256] = 379 294 { 0, 380 295 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, … … 408 323 } ; 409 324 410 static yyconst flex_int32_t yy_meta[10] =325 static yyconst int yy_meta[10] = 411 326 { 0, 412 327 1, 1, 1, 1, 1, 2, 1, 1, 2 413 328 } ; 414 329 415 static yyconst flex_int16_t yy_base[15] =330 static yyconst short int yy_base[15] = 416 331 { 0, 417 332 0, 0, 12, 13, 13, 13, 13, 6, 13, 0, … … 419 334 } ; 420 335 421 static yyconst flex_int16_t yy_def[15] =336 static yyconst short int yy_def[15] = 422 337 { 0, 423 338 13, 1, 13, 13, 13, 13, 13, 13, 13, 14, … … 425 340 } ; 426 341 427 static yyconst flex_int16_t yy_nxt[23] =342 static yyconst short int yy_nxt[23] = 428 343 { 0, 429 344 4, 5, 6, 7, 4, 4, 8, 9, 10, 12, … … 432 347 } ; 433 348 434 static yyconst flex_int16_t yy_chk[23] =349 static yyconst short int yy_chk[23] = 435 350 { 0, 436 351 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, … … 441 356 static yy_state_type yy_last_accepting_state; 442 357 static char *yy_last_accepting_cpos; 443 444 extern int yy_flex_debug;445 int yy_flex_debug = 0;446 358 447 359 /* The intent behind this definition is that it'll catch … … 454 366 char *yytext; 455 367 #line 1 "slc-lex.l" 368 #define INITIAL 0 456 369 #line 2 "slc-lex.l" 457 370 /* … … 507 420 #undef ECHO 508 421 509 #line 510 "slc-lex.c" 510 511 #define INITIAL 0 512 513 #ifndef YY_NO_UNISTD_H 514 /* Special case for "unistd.h", since it is non-ANSI. We include it way 515 * down here because we want the user's section 1 to have been scanned first. 516 * The user has a chance to override it with an option. 517 */ 518 #include <unistd.h> 519 #endif 520 521 #ifndef YY_EXTRA_TYPE 522 #define YY_EXTRA_TYPE void * 523 #endif 524 525 static int yy_init_globals (void ); 526 527 /* Accessor methods to globals. 528 These are made visible to non-reentrant scanners for convenience. */ 529 530 int yylex_destroy (void ); 531 532 int yyget_debug (void ); 533 534 void yyset_debug (int debug_flag ); 535 536 YY_EXTRA_TYPE yyget_extra (void ); 537 538 void yyset_extra (YY_EXTRA_TYPE user_defined ); 539 540 FILE *yyget_in (void ); 541 542 void yyset_in (FILE * in_str ); 543 544 FILE *yyget_out (void ); 545 546 void yyset_out (FILE * out_str ); 547 548 yy_size_t yyget_leng (void ); 549 550 char *yyget_text (void ); 551 552 int yyget_lineno (void ); 553 554 void yyset_lineno (int line_number ); 422 #define YY_NO_UNPUT 1 423 #line 424 "slc-lex.c" 555 424 556 425 /* Macros after this point can all be overridden by user definitions in … … 560 429 #ifndef YY_SKIP_YYWRAP 561 430 #ifdef __cplusplus 562 extern "C" int yywrap (void ); 563 #else 564 extern int yywrap (void ); 565 #endif 431 extern "C" int yywrap YY_PROTO(( void )); 432 #else 433 extern int yywrap YY_PROTO(( void )); 434 #endif 435 #endif 436 437 #ifndef YY_NO_UNPUT 438 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 566 439 #endif 567 440 568 441 #ifndef yytext_ptr 569 static void yy_flex_strncpy (char *,yyconst char *,int);442 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 570 443 #endif 571 444 572 445 #ifdef YY_NEED_STRLEN 573 static int yy_flex_strlen (yyconst char *);446 static int yy_flex_strlen YY_PROTO(( yyconst char * )); 574 447 #endif 575 448 576 449 #ifndef YY_NO_INPUT 577 578 450 #ifdef __cplusplus 579 static int yyinput (void ); 580 #else 581 static int input (void ); 582 #endif 583 451 static int yyinput YY_PROTO(( void )); 452 #else 453 static int input YY_PROTO(( void )); 454 #endif 455 #endif 456 457 #if YY_STACK_USED 458 static int yy_start_stack_ptr = 0; 459 static int yy_start_stack_depth = 0; 460 static int *yy_start_stack = 0; 461 #ifndef YY_NO_PUSH_STATE 462 static void yy_push_state YY_PROTO(( int new_state )); 463 #endif 464 #ifndef YY_NO_POP_STATE 465 static void yy_pop_state YY_PROTO(( void )); 466 #endif 467 #ifndef YY_NO_TOP_STATE 468 static int yy_top_state YY_PROTO(( void )); 469 #endif 470 471 #else 472 #define YY_NO_PUSH_STATE 1 473 #define YY_NO_POP_STATE 1 474 #define YY_NO_TOP_STATE 1 475 #endif 476 477 #ifdef YY_MALLOC_DECL 478 YY_MALLOC_DECL 479 #else 480 #if __STDC__ 481 #ifndef __cplusplus 482 #include <stdlib.h> 483 #endif 484 #else 485 /* Just try to get by without declaring the routines. This will fail 486 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 487 * or sizeof(void*) != sizeof(int). 488 */ 489 #endif 584 490 #endif 585 491 … … 590 496 591 497 /* Copy whatever the last rule matched to the standard output. */ 498 592 499 #ifndef ECHO 593 500 /* This used to be an fputs(), but since the string might contain NUL's, 594 501 * we now use fwrite(). 595 502 */ 596 #define ECHO fwrite( yytext, yyleng, 1, yyout )503 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 597 504 #endif 598 505 … … 602 509 #ifndef YY_INPUT 603 510 #define YY_INPUT(buf,result,max_size) \ 604 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \511 if ( yy_current_buffer->yy_is_interactive ) \ 605 512 { \ 606 int c = '*'; \ 607 yy_size_t n; \ 513 int c = '*', n; \ 608 514 for ( n = 0; n < max_size && \ 609 515 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ … … 615 521 result = n; \ 616 522 } \ 617 else \ 618 { \ 619 errno=0; \ 620 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 621 { \ 622 if( errno != EINTR) \ 623 { \ 624 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 625 break; \ 626 } \ 627 errno=0; \ 628 clearerr(yyin); \ 629 } \ 630 }\ 631 \ 632 523 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 524 && ferror( yyin ) ) \ 525 YY_FATAL_ERROR( "input in flex scanner failed" ); 633 526 #endif 634 527 … … 651 544 #endif 652 545 653 /* end tables serialization structures and prototypes */654 655 546 /* Default declaration of generated scanner - a define so the user can 656 547 * easily add parameters. 657 548 */ 658 549 #ifndef YY_DECL 659 #define YY_DECL_IS_OURS 1 660 661 extern int yylex (void); 662 663 #define YY_DECL int yylex (void) 664 #endif /* !YY_DECL */ 550 #define YY_DECL int yylex YY_PROTO(( void )) 551 #endif 665 552 666 553 /* Code executed at the beginning of each rule, after yytext and yyleng … … 679 566 YY_USER_ACTION 680 567 681 /** The main scanner function which does all the work.682 */683 568 YY_DECL 684 {569 { 685 570 register yy_state_type yy_current_state; 686 571 register char *yy_cp, *yy_bp; 687 572 register int yy_act; 688 573 689 574 #line 58 "slc-lex.l" 690 575 691 #line 692"slc-lex.c"692 693 if ( !(yy_init))576 #line 577 "slc-lex.c" 577 578 if ( yy_init ) 694 579 { 695 (yy_init) = 1;580 yy_init = 0; 696 581 697 582 #ifdef YY_USER_INIT … … 699 584 #endif 700 585 701 if ( ! (yy_start))702 (yy_start)= 1; /* first start state */586 if ( ! yy_start ) 587 yy_start = 1; /* first start state */ 703 588 704 589 if ( ! yyin ) … … 708 593 yyout = stdout; 709 594 710 if ( ! YY_CURRENT_BUFFER ) { 711 yyensure_buffer_stack (); 712 YY_CURRENT_BUFFER_LVALUE = 713 yy_create_buffer(yyin,YY_BUF_SIZE ); 714 } 715 716 yy_load_buffer_state( ); 595 if ( ! yy_current_buffer ) 596 yy_current_buffer = 597 yy_create_buffer( yyin, YY_BUF_SIZE ); 598 599 yy_load_buffer_state(); 717 600 } 718 601 719 602 while ( 1 ) /* loops until end-of-file is reached */ 720 603 { 721 yy_cp = (yy_c_buf_p);604 yy_cp = yy_c_buf_p; 722 605 723 606 /* Support of yytext. */ 724 *yy_cp = (yy_hold_char);607 *yy_cp = yy_hold_char; 725 608 726 609 /* yy_bp points to the position in yy_ch_buf of the start of … … 729 612 yy_bp = yy_cp; 730 613 731 yy_current_state = (yy_start);614 yy_current_state = yy_start; 732 615 yy_match: 733 616 do … … 736 619 if ( yy_accept[yy_current_state] ) 737 620 { 738 (yy_last_accepting_state)= yy_current_state;739 (yy_last_accepting_cpos)= yy_cp;621 yy_last_accepting_state = yy_current_state; 622 yy_last_accepting_cpos = yy_cp; 740 623 } 741 624 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) … … 754 637 if ( yy_act == 0 ) 755 638 { /* have to back up */ 756 yy_cp = (yy_last_accepting_cpos);757 yy_current_state = (yy_last_accepting_state);639 yy_cp = yy_last_accepting_cpos; 640 yy_current_state = yy_last_accepting_state; 758 641 yy_act = yy_accept[yy_current_state]; 759 642 } … … 761 644 YY_DO_BEFORE_ACTION; 762 645 646 763 647 do_action: /* This label is used only to access EOF actions. */ 648 764 649 765 650 switch ( yy_act ) … … 767 652 case 0: /* must back up */ 768 653 /* undo the effects of YY_DO_BEFORE_ACTION */ 769 *yy_cp = (yy_hold_char);770 yy_cp = (yy_last_accepting_cpos);771 yy_current_state = (yy_last_accepting_state);654 *yy_cp = yy_hold_char; 655 yy_cp = yy_last_accepting_cpos; 656 yy_current_state = yy_last_accepting_state; 772 657 goto yy_find_action; 773 658 … … 786 671 YY_BREAK 787 672 case 3: 788 /* rule 3 can match eol */789 673 YY_RULE_SETUP 790 674 #line 64 "slc-lex.l" … … 811 695 ECHO; 812 696 YY_BREAK 813 #line 814"slc-lex.c"697 #line 698 "slc-lex.c" 814 698 case YY_STATE_EOF(INITIAL): 815 699 yyterminate(); … … 818 702 { 819 703 /* Amount of text matched not including the EOB char. */ 820 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;704 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 821 705 822 706 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 823 *yy_cp = (yy_hold_char);707 *yy_cp = yy_hold_char; 824 708 YY_RESTORE_YY_MORE_OFFSET 825 709 826 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )710 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 827 711 { 828 712 /* We're scanning a new file or input source. It's … … 830 714 * just pointed yyin at a new source and called 831 715 * yylex(). If so, then we have to assure 832 * consistency between YY_CURRENT_BUFFERand our716 * consistency between yy_current_buffer and our 833 717 * globals. Here is the right place to do so, because 834 718 * this is the first action (other than possibly a 835 719 * back-up) that will match for the new input source. 836 720 */ 837 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;838 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;839 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;721 yy_n_chars = yy_current_buffer->yy_n_chars; 722 yy_current_buffer->yy_input_file = yyin; 723 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 840 724 } 841 725 … … 847 731 * in input(). 848 732 */ 849 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )733 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 850 734 { /* This was really a NUL. */ 851 735 yy_state_type yy_next_state; 852 736 853 (yy_c_buf_p) = (yytext_ptr)+ yy_amount_of_matched_text;854 855 yy_current_state = yy_get_previous_state( 737 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 738 739 yy_current_state = yy_get_previous_state(); 856 740 857 741 /* Okay, we're now positioned to make the NUL … … 866 750 yy_next_state = yy_try_NUL_trans( yy_current_state ); 867 751 868 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;752 yy_bp = yytext_ptr + YY_MORE_ADJ; 869 753 870 754 if ( yy_next_state ) 871 755 { 872 756 /* Consume the NUL. */ 873 yy_cp = ++ (yy_c_buf_p);757 yy_cp = ++yy_c_buf_p; 874 758 yy_current_state = yy_next_state; 875 759 goto yy_match; … … 878 762 else 879 763 { 880 yy_cp = (yy_c_buf_p);764 yy_cp = yy_c_buf_p; 881 765 goto yy_find_action; 882 766 } 883 767 } 884 768 885 else switch ( yy_get_next_buffer( 769 else switch ( yy_get_next_buffer() ) 886 770 { 887 771 case EOB_ACT_END_OF_FILE: 888 772 { 889 (yy_did_buffer_switch_on_eof)= 0;890 891 if ( yywrap( 773 yy_did_buffer_switch_on_eof = 0; 774 775 if ( yywrap() ) 892 776 { 893 777 /* Note: because we've taken care in … … 900 784 * YY_NULL will get returned. 901 785 */ 902 (yy_c_buf_p) = (yytext_ptr)+ YY_MORE_ADJ;786 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 903 787 904 788 yy_act = YY_STATE_EOF(YY_START); … … 908 792 else 909 793 { 910 if ( ! (yy_did_buffer_switch_on_eof))794 if ( ! yy_did_buffer_switch_on_eof ) 911 795 YY_NEW_FILE; 912 796 } … … 915 799 916 800 case EOB_ACT_CONTINUE_SCAN: 917 (yy_c_buf_p)=918 (yytext_ptr)+ yy_amount_of_matched_text;919 920 yy_current_state = yy_get_previous_state( 921 922 yy_cp = (yy_c_buf_p);923 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;801 yy_c_buf_p = 802 yytext_ptr + yy_amount_of_matched_text; 803 804 yy_current_state = yy_get_previous_state(); 805 806 yy_cp = yy_c_buf_p; 807 yy_bp = yytext_ptr + YY_MORE_ADJ; 924 808 goto yy_match; 925 809 926 810 case EOB_ACT_LAST_MATCH: 927 (yy_c_buf_p)=928 & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];929 930 yy_current_state = yy_get_previous_state( 931 932 yy_cp = (yy_c_buf_p);933 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;811 yy_c_buf_p = 812 &yy_current_buffer->yy_ch_buf[yy_n_chars]; 813 814 yy_current_state = yy_get_previous_state(); 815 816 yy_cp = yy_c_buf_p; 817 yy_bp = yytext_ptr + YY_MORE_ADJ; 934 818 goto yy_find_action; 935 819 } … … 942 826 } /* end of action switch */ 943 827 } /* end of scanning one token */ 944 } /* end of yylex */ 828 } /* end of yylex */ 829 945 830 946 831 /* yy_get_next_buffer - try to read in a new buffer … … 951 836 * EOB_ACT_END_OF_FILE - end of file 952 837 */ 953 static int yy_get_next_buffer (void) 954 { 955 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 956 register char *source = (yytext_ptr); 838 839 static int yy_get_next_buffer() 840 { 841 register char *dest = yy_current_buffer->yy_ch_buf; 842 register char *source = yytext_ptr; 957 843 register int number_to_move, i; 958 844 int ret_val; 959 845 960 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)+ 1] )846 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 961 847 YY_FATAL_ERROR( 962 848 "fatal flex scanner internal error--end of buffer missed" ); 963 849 964 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )850 if ( yy_current_buffer->yy_fill_buffer == 0 ) 965 851 { /* Don't try to fill the buffer, so this is an EOF. */ 966 if ( (yy_c_buf_p) - (yytext_ptr)- YY_MORE_ADJ == 1 )852 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 967 853 { 968 854 /* We matched a single character, the EOB, so … … 984 870 985 871 /* First move last chars to start of buffer. */ 986 number_to_move = (int) ( (yy_c_buf_p) - (yytext_ptr)) - 1;872 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 987 873 988 874 for ( i = 0; i < number_to_move; ++i ) 989 875 *(dest++) = *(source++); 990 876 991 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )877 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 992 878 /* don't do the read, it's not guaranteed to return an EOF, 993 879 * just force an EOF 994 880 */ 995 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars)= 0;881 yy_current_buffer->yy_n_chars = yy_n_chars = 0; 996 882 997 883 else 998 884 { 999 yy_size_t num_to_read =1000 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;885 int num_to_read = 886 yy_current_buffer->yy_buf_size - number_to_move - 1; 1001 887 1002 888 while ( num_to_read <= 0 ) 1003 889 { /* Not enough room in the buffer - grow it. */ 890 #ifdef YY_USES_REJECT 891 YY_FATAL_ERROR( 892 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 893 #else 1004 894 1005 895 /* just a shorter name for the current buffer */ 1006 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;896 YY_BUFFER_STATE b = yy_current_buffer; 1007 897 1008 898 int yy_c_buf_p_offset = 1009 (int) ( (yy_c_buf_p)- b->yy_ch_buf);899 (int) (yy_c_buf_p - b->yy_ch_buf); 1010 900 1011 901 if ( b->yy_is_our_buffer ) 1012 902 { 1013 yy_size_t new_size = b->yy_buf_size * 2;903 int new_size = b->yy_buf_size * 2; 1014 904 1015 905 if ( new_size <= 0 ) … … 1020 910 b->yy_ch_buf = (char *) 1021 911 /* Include room in for 2 EOB chars. */ 1022 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 912 yy_flex_realloc( (void *) b->yy_ch_buf, 913 b->yy_buf_size + 2 ); 1023 914 } 1024 915 else … … 1030 921 "fatal error - scanner input buffer overflow" ); 1031 922 1032 (yy_c_buf_p)= &b->yy_ch_buf[yy_c_buf_p_offset];1033 1034 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -923 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 924 925 num_to_read = yy_current_buffer->yy_buf_size - 1035 926 number_to_move - 1; 1036 927 #endif 1037 928 } 1038 929 … … 1041 932 1042 933 /* Read in more data. */ 1043 YY_INPUT( (& YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),1044 (yy_n_chars), num_to_read );1045 1046 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);934 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 935 yy_n_chars, num_to_read ); 936 937 yy_current_buffer->yy_n_chars = yy_n_chars; 1047 938 } 1048 939 1049 if ( (yy_n_chars)== 0 )940 if ( yy_n_chars == 0 ) 1050 941 { 1051 942 if ( number_to_move == YY_MORE_ADJ ) 1052 943 { 1053 944 ret_val = EOB_ACT_END_OF_FILE; 1054 yyrestart( yyin);945 yyrestart( yyin ); 1055 946 } 1056 947 … … 1058 949 { 1059 950 ret_val = EOB_ACT_LAST_MATCH; 1060 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =951 yy_current_buffer->yy_buffer_status = 1061 952 YY_BUFFER_EOF_PENDING; 1062 953 } … … 1066 957 ret_val = EOB_ACT_CONTINUE_SCAN; 1067 958 1068 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { 1069 /* Extend the array by 50%, plus the number we really need. */ 1070 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); 1071 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); 1072 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1073 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 1074 } 1075 1076 (yy_n_chars) += number_to_move; 1077 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 1078 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 1079 1080 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 959 yy_n_chars += number_to_move; 960 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 961 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 962 963 yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 1081 964 1082 965 return ret_val; 1083 } 966 } 967 1084 968 1085 969 /* yy_get_previous_state - get the state just before the EOB char was reached */ 1086 970 1087 static yy_state_type yy_get_previous_state (void)1088 {971 static yy_state_type yy_get_previous_state() 972 { 1089 973 register yy_state_type yy_current_state; 1090 974 register char *yy_cp; 1091 1092 yy_current_state = (yy_start);1093 1094 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )975 976 yy_current_state = yy_start; 977 978 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 1095 979 { 1096 980 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1097 981 if ( yy_accept[yy_current_state] ) 1098 982 { 1099 (yy_last_accepting_state)= yy_current_state;1100 (yy_last_accepting_cpos)= yy_cp;983 yy_last_accepting_state = yy_current_state; 984 yy_last_accepting_cpos = yy_cp; 1101 985 } 1102 986 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) … … 1110 994 1111 995 return yy_current_state; 1112 } 996 } 997 1113 998 1114 999 /* yy_try_NUL_trans - try to make a transition on the NUL character … … 1117 1002 * next_state = yy_try_NUL_trans( current_state ); 1118 1003 */ 1119 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 1120 { 1004 1005 #ifdef YY_USE_PROTOS 1006 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 1007 #else 1008 static yy_state_type yy_try_NUL_trans( yy_current_state ) 1009 yy_state_type yy_current_state; 1010 #endif 1011 { 1121 1012 register int yy_is_jam; 1122 register char *yy_cp = (yy_c_buf_p);1013 register char *yy_cp = yy_c_buf_p; 1123 1014 1124 1015 register YY_CHAR yy_c = 1; 1125 1016 if ( yy_accept[yy_current_state] ) 1126 1017 { 1127 (yy_last_accepting_state)= yy_current_state;1128 (yy_last_accepting_cpos)= yy_cp;1018 yy_last_accepting_state = yy_current_state; 1019 yy_last_accepting_cpos = yy_cp; 1129 1020 } 1130 1021 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) … … 1138 1029 1139 1030 return yy_is_jam ? 0 : yy_current_state; 1140 } 1141 1142 #ifndef YY_NO_INPUT 1031 } 1032 1033 1034 #ifndef YY_NO_UNPUT 1035 #ifdef YY_USE_PROTOS 1036 static void yyunput( int c, register char *yy_bp ) 1037 #else 1038 static void yyunput( c, yy_bp ) 1039 int c; 1040 register char *yy_bp; 1041 #endif 1042 { 1043 register char *yy_cp = yy_c_buf_p; 1044 1045 /* undo effects of setting up yytext */ 1046 *yy_cp = yy_hold_char; 1047 1048 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1049 { /* need to shift things up to make room */ 1050 /* +2 for EOB chars. */ 1051 register int number_to_move = yy_n_chars + 2; 1052 register char *dest = &yy_current_buffer->yy_ch_buf[ 1053 yy_current_buffer->yy_buf_size + 2]; 1054 register char *source = 1055 &yy_current_buffer->yy_ch_buf[number_to_move]; 1056 1057 while ( source > yy_current_buffer->yy_ch_buf ) 1058 *--dest = *--source; 1059 1060 yy_cp += (int) (dest - source); 1061 yy_bp += (int) (dest - source); 1062 yy_current_buffer->yy_n_chars = 1063 yy_n_chars = yy_current_buffer->yy_buf_size; 1064 1065 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1066 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1067 } 1068 1069 *--yy_cp = (char) c; 1070 1071 1072 yytext_ptr = yy_bp; 1073 yy_hold_char = *yy_cp; 1074 yy_c_buf_p = yy_cp; 1075 } 1076 #endif /* ifndef YY_NO_UNPUT */ 1077 1078 1143 1079 #ifdef __cplusplus 1144 static int yyinput (void) 1145 #else 1146 static int input (void) 1147 #endif 1148 1149 { 1080 static int yyinput() 1081 #else 1082 static int input() 1083 #endif 1084 { 1150 1085 int c; 1151 1152 * (yy_c_buf_p) = (yy_hold_char);1153 1154 if ( * (yy_c_buf_p)== YY_END_OF_BUFFER_CHAR )1086 1087 *yy_c_buf_p = yy_hold_char; 1088 1089 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 1155 1090 { 1156 1091 /* yy_c_buf_p now points to the character we want to return. … … 1158 1093 * valid NUL; if not, then we've hit the end of the buffer. 1159 1094 */ 1160 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )1095 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1161 1096 /* This was really a NUL. */ 1162 * (yy_c_buf_p)= '\0';1097 *yy_c_buf_p = '\0'; 1163 1098 1164 1099 else 1165 1100 { /* need more input */ 1166 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);1167 ++ (yy_c_buf_p);1168 1169 switch ( yy_get_next_buffer( 1101 int offset = yy_c_buf_p - yytext_ptr; 1102 ++yy_c_buf_p; 1103 1104 switch ( yy_get_next_buffer() ) 1170 1105 { 1171 1106 case EOB_ACT_LAST_MATCH: … … 1181 1116 1182 1117 /* Reset buffer status. */ 1183 yyrestart( yyin );1184 1185 /* FALLTHROUGH*/1118 yyrestart( yyin ); 1119 1120 /* fall through */ 1186 1121 1187 1122 case EOB_ACT_END_OF_FILE: 1188 1123 { 1189 if ( yywrap( 1190 return 0;1191 1192 if ( ! (yy_did_buffer_switch_on_eof))1124 if ( yywrap() ) 1125 return EOF; 1126 1127 if ( ! yy_did_buffer_switch_on_eof ) 1193 1128 YY_NEW_FILE; 1194 1129 #ifdef __cplusplus … … 1200 1135 1201 1136 case EOB_ACT_CONTINUE_SCAN: 1202 (yy_c_buf_p) = (yytext_ptr)+ offset;1137 yy_c_buf_p = yytext_ptr + offset; 1203 1138 break; 1204 1139 } … … 1206 1141 } 1207 1142 1208 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 1209 *(yy_c_buf_p) = '\0'; /* preserve yytext */ 1210 (yy_hold_char) = *++(yy_c_buf_p); 1143 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 1144 *yy_c_buf_p = '\0'; /* preserve yytext */ 1145 yy_hold_char = *++yy_c_buf_p; 1146 1211 1147 1212 1148 return c; 1213 } 1214 #endif /* ifndef YY_NO_INPUT */ 1215 1216 /** Immediately switch to a different input stream. 1217 * @param input_file A readable stream. 1218 * 1219 * @note This function does not reset the start condition to @c INITIAL . 1220 */ 1221 void yyrestart (FILE * input_file ) 1222 { 1223 1224 if ( ! YY_CURRENT_BUFFER ){ 1225 yyensure_buffer_stack (); 1226 YY_CURRENT_BUFFER_LVALUE = 1227 yy_create_buffer(yyin,YY_BUF_SIZE ); 1228 } 1229 1230 yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 1231 yy_load_buffer_state( ); 1232 } 1233 1234 /** Switch to a different input buffer. 1235 * @param new_buffer The new input buffer. 1236 * 1237 */ 1238 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 1239 { 1240 1241 /* TODO. We should be able to replace this entire function body 1242 * with 1243 * yypop_buffer_state(); 1244 * yypush_buffer_state(new_buffer); 1245 */ 1246 yyensure_buffer_stack (); 1247 if ( YY_CURRENT_BUFFER == new_buffer ) 1149 } 1150 1151 1152 #ifdef YY_USE_PROTOS 1153 void yyrestart( FILE *input_file ) 1154 #else 1155 void yyrestart( input_file ) 1156 FILE *input_file; 1157 #endif 1158 { 1159 if ( ! yy_current_buffer ) 1160 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 1161 1162 yy_init_buffer( yy_current_buffer, input_file ); 1163 yy_load_buffer_state(); 1164 } 1165 1166 1167 #ifdef YY_USE_PROTOS 1168 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 1169 #else 1170 void yy_switch_to_buffer( new_buffer ) 1171 YY_BUFFER_STATE new_buffer; 1172 #endif 1173 { 1174 if ( yy_current_buffer == new_buffer ) 1248 1175 return; 1249 1176 1250 if ( YY_CURRENT_BUFFER)1177 if ( yy_current_buffer ) 1251 1178 { 1252 1179 /* Flush out information for old buffer. */ 1253 * (yy_c_buf_p) = (yy_hold_char);1254 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);1255 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);1180 *yy_c_buf_p = yy_hold_char; 1181 yy_current_buffer->yy_buf_pos = yy_c_buf_p; 1182 yy_current_buffer->yy_n_chars = yy_n_chars; 1256 1183 } 1257 1184 1258 YY_CURRENT_BUFFER_LVALUE= new_buffer;1259 yy_load_buffer_state( 1185 yy_current_buffer = new_buffer; 1186 yy_load_buffer_state(); 1260 1187 1261 1188 /* We don't actually know whether we did this switch during … … 1264 1191 * to go ahead and always set it. 1265 1192 */ 1266 (yy_did_buffer_switch_on_eof) = 1; 1267 } 1268 1269 static void yy_load_buffer_state (void) 1270 { 1271 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1272 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 1273 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 1274 (yy_hold_char) = *(yy_c_buf_p); 1275 } 1276 1277 /** Allocate and initialize an input buffer state. 1278 * @param file A readable stream. 1279 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 1280 * 1281 * @return the allocated buffer state. 1282 */ 1283 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) 1284 { 1193 yy_did_buffer_switch_on_eof = 1; 1194 } 1195 1196 1197 #ifdef YY_USE_PROTOS 1198 void yy_load_buffer_state( void ) 1199 #else 1200 void yy_load_buffer_state() 1201 #endif 1202 { 1203 yy_n_chars = yy_current_buffer->yy_n_chars; 1204 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 1205 yyin = yy_current_buffer->yy_input_file; 1206 yy_hold_char = *yy_c_buf_p; 1207 } 1208 1209 1210 #ifdef YY_USE_PROTOS 1211 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 1212 #else 1213 YY_BUFFER_STATE yy_create_buffer( file, size ) 1214 FILE *file; 1215 int size; 1216 #endif 1217 { 1285 1218 YY_BUFFER_STATE b; 1286 1287 b = (YY_BUFFER_STATE) yy alloc(sizeof( struct yy_buffer_state ));1219 1220 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1288 1221 if ( ! b ) 1289 1222 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); … … 1294 1227 * we need to put in 2 end-of-buffer characters. 1295 1228 */ 1296 b->yy_ch_buf = (char *) yy alloc(b->yy_buf_size + 2);1229 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 1297 1230 if ( ! b->yy_ch_buf ) 1298 1231 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); … … 1300 1233 b->yy_is_our_buffer = 1; 1301 1234 1302 yy_init_buffer( b,file );1235 yy_init_buffer( b, file ); 1303 1236 1304 1237 return b; 1305 } 1306 1307 /** Destroy the buffer. 1308 * @param b a buffer created with yy_create_buffer() 1309 * 1310 */ 1311 void yy_delete_buffer (YY_BUFFER_STATE b ) 1312 { 1313 1238 } 1239 1240 1241 #ifdef YY_USE_PROTOS 1242 void yy_delete_buffer( YY_BUFFER_STATE b ) 1243 #else 1244 void yy_delete_buffer( b ) 1245 YY_BUFFER_STATE b; 1246 #endif 1247 { 1314 1248 if ( ! b ) 1315 1249 return; 1316 1250 1317 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */1318 YY_CURRENT_BUFFER_LVALUE= (YY_BUFFER_STATE) 0;1251 if ( b == yy_current_buffer ) 1252 yy_current_buffer = (YY_BUFFER_STATE) 0; 1319 1253 1320 1254 if ( b->yy_is_our_buffer ) 1321 yyfree((void *) b->yy_ch_buf ); 1322 1323 yyfree((void *) b ); 1324 } 1325 1326 #ifndef __cplusplus 1327 extern int isatty (int ); 1328 #endif /* __cplusplus */ 1329 1330 /* Initializes or reinitializes a buffer. 1331 * This function is sometimes called more than once on the same buffer, 1332 * such as during a yyrestart() or at EOF. 1333 */ 1334 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 1335 1336 { 1337 int oerrno = errno; 1338 1339 yy_flush_buffer(b ); 1255 yy_flex_free( (void *) b->yy_ch_buf ); 1256 1257 yy_flex_free( (void *) b ); 1258 } 1259 1260 1261 #ifndef YY_ALWAYS_INTERACTIVE 1262 #ifndef YY_NEVER_INTERACTIVE 1263 extern int isatty YY_PROTO(( int )); 1264 #endif 1265 #endif 1266 1267 #ifdef YY_USE_PROTOS 1268 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 1269 #else 1270 void yy_init_buffer( b, file ) 1271 YY_BUFFER_STATE b; 1272 FILE *file; 1273 #endif 1274 1275 1276 { 1277 yy_flush_buffer( b ); 1340 1278 1341 1279 b->yy_input_file = file; 1342 1280 b->yy_fill_buffer = 1; 1343 1281 1344 /* If b is the current buffer, then yy_init_buffer was _probably_ 1345 * called from yyrestart() or through yy_get_next_buffer. 1346 * In that case, we don't want to reset the lineno or column. 1347 */ 1348 if (b != YY_CURRENT_BUFFER){ 1349 b->yy_bs_lineno = 1; 1350 b->yy_bs_column =0;1351 } 1352 1353 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1354 1355 errno = oerrno; 1356 } 1357 1358 /** Discard all buffered characters. On the next scan, YY_INPUT will be called. 1359 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 1360 * 1361 */ 1362 void yy_flush_buffer (YY_BUFFER_STATE b ) 1363 {1364 1282 #if YY_ALWAYS_INTERACTIVE 1283 b->yy_is_interactive = 1; 1284 #else 1285 #if YY_NEVER_INTERACTIVE 1286 b->yy_is_interactive = 0; 1287 #else 1288 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1289 #endif 1290 #endif 1291 } 1292 1293 1294 #ifdef YY_USE_PROTOS 1295 void yy_flush_buffer( YY_BUFFER_STATE b ) 1296 #else 1297 void yy_flush_buffer( b ) 1298 YY_BUFFER_STATE b; 1299 #endif 1300 1301 { 1302 if ( ! b ) 1365 1303 return; 1366 1304 … … 1379 1317 b->yy_buffer_status = YY_BUFFER_NEW; 1380 1318 1381 if ( b == YY_CURRENT_BUFFER ) 1382 yy_load_buffer_state( ); 1383 } 1384 1385 /** Pushes the new state onto the stack. The new state becomes 1386 * the current state. This function will allocate the stack 1387 * if necessary. 1388 * @param new_buffer The new state. 1389 * 1390 */ 1391 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 1392 { 1393 if (new_buffer == NULL) 1394 return; 1395 1396 yyensure_buffer_stack(); 1397 1398 /* This block is copied from yy_switch_to_buffer. */ 1399 if ( YY_CURRENT_BUFFER ) 1400 { 1401 /* Flush out information for old buffer. */ 1402 *(yy_c_buf_p) = (yy_hold_char); 1403 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1404 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1405 } 1406 1407 /* Only push if top exists. Otherwise, replace top. */ 1408 if (YY_CURRENT_BUFFER) 1409 (yy_buffer_stack_top)++; 1410 YY_CURRENT_BUFFER_LVALUE = new_buffer; 1411 1412 /* copied from yy_switch_to_buffer. */ 1413 yy_load_buffer_state( ); 1414 (yy_did_buffer_switch_on_eof) = 1; 1415 } 1416 1417 /** Removes and deletes the top of the stack, if present. 1418 * The next element becomes the new top. 1419 * 1420 */ 1421 void yypop_buffer_state (void) 1422 { 1423 if (!YY_CURRENT_BUFFER) 1424 return; 1425 1426 yy_delete_buffer(YY_CURRENT_BUFFER ); 1427 YY_CURRENT_BUFFER_LVALUE = NULL; 1428 if ((yy_buffer_stack_top) > 0) 1429 --(yy_buffer_stack_top); 1430 1431 if (YY_CURRENT_BUFFER) { 1432 yy_load_buffer_state( ); 1433 (yy_did_buffer_switch_on_eof) = 1; 1434 } 1435 } 1436 1437 /* Allocates the stack if it does not exist. 1438 * Guarantees space for at least one push. 1439 */ 1440 static void yyensure_buffer_stack (void) 1441 { 1442 yy_size_t num_to_alloc; 1443 1444 if (!(yy_buffer_stack)) { 1445 1446 /* First allocation is just for 2 elements, since we don't know if this 1447 * scanner will even need a stack. We use 2 instead of 1 to avoid an 1448 * immediate realloc on the next call. 1449 */ 1450 num_to_alloc = 1; 1451 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 1452 (num_to_alloc * sizeof(struct yy_buffer_state*) 1453 ); 1454 if ( ! (yy_buffer_stack) ) 1455 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 1456 1457 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 1458 1459 (yy_buffer_stack_max) = num_to_alloc; 1460 (yy_buffer_stack_top) = 0; 1461 return; 1462 } 1463 1464 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 1465 1466 /* Increase the buffer to prepare for a possible push. */ 1467 int grow_size = 8 /* arbitrary grow size */; 1468 1469 num_to_alloc = (yy_buffer_stack_max) + grow_size; 1470 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 1471 ((yy_buffer_stack), 1472 num_to_alloc * sizeof(struct yy_buffer_state*) 1473 ); 1474 if ( ! (yy_buffer_stack) ) 1475 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 1476 1477 /* zero only the new slots.*/ 1478 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 1479 (yy_buffer_stack_max) = num_to_alloc; 1480 } 1481 } 1482 1483 /** Setup the input buffer state to scan directly from a user-specified character buffer. 1484 * @param base the character buffer 1485 * @param size the size in bytes of the character buffer 1486 * 1487 * @return the newly allocated buffer state object. 1488 */ 1489 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) 1490 { 1319 if ( b == yy_current_buffer ) 1320 yy_load_buffer_state(); 1321 } 1322 1323 1324 #ifndef YY_NO_SCAN_BUFFER 1325 #ifdef YY_USE_PROTOS 1326 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 1327 #else 1328 YY_BUFFER_STATE yy_scan_buffer( base, size ) 1329 char *base; 1330 yy_size_t size; 1331 #endif 1332 { 1491 1333 YY_BUFFER_STATE b; 1492 1334 1493 1335 if ( size < 2 || 1494 1336 base[size-2] != YY_END_OF_BUFFER_CHAR || … … 1497 1339 return 0; 1498 1340 1499 b = (YY_BUFFER_STATE) yy alloc(sizeof( struct yy_buffer_state ));1341 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1500 1342 if ( ! b ) 1501 1343 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); … … 1511 1353 b->yy_buffer_status = YY_BUFFER_NEW; 1512 1354 1513 yy_switch_to_buffer( b);1355 yy_switch_to_buffer( b ); 1514 1356 1515 1357 return b; 1516 } 1517 1518 /** Setup the input buffer state to scan a string. The next call to yylex() will 1519 * scan from a @e copy of @a str. 1520 * @param yystr a NUL-terminated string to scan 1521 * 1522 * @return the newly allocated buffer state object. 1523 * @note If you want to scan bytes that may contain NUL values, then use 1524 * yy_scan_bytes() instead. 1525 */ 1526 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) 1527 { 1528 1529 return yy_scan_bytes(yystr,strlen(yystr) ); 1530 } 1531 1532 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 1533 * scan from a @e copy of @a bytes. 1534 * @param bytes the byte buffer to scan 1535 * @param len the number of bytes in the buffer pointed to by @a bytes. 1536 * 1537 * @return the newly allocated buffer state object. 1538 */ 1539 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) 1540 { 1358 } 1359 #endif 1360 1361 1362 #ifndef YY_NO_SCAN_STRING 1363 #ifdef YY_USE_PROTOS 1364 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 1365 #else 1366 YY_BUFFER_STATE yy_scan_string( yy_str ) 1367 yyconst char *yy_str; 1368 #endif 1369 { 1370 int len; 1371 for ( len = 0; yy_str[len]; ++len ) 1372 ; 1373 1374 return yy_scan_bytes( yy_str, len ); 1375 } 1376 #endif 1377 1378 1379 #ifndef YY_NO_SCAN_BYTES 1380 #ifdef YY_USE_PROTOS 1381 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 1382 #else 1383 YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 1384 yyconst char *bytes; 1385 int len; 1386 #endif 1387 { 1541 1388 YY_BUFFER_STATE b; 1542 1389 char *buf; 1543 yy_size_t n, i; 1544 1390 yy_size_t n; 1391 int i; 1392 1545 1393 /* Get memory for full buffer, including space for trailing EOB's. */ 1546 n = _yybytes_len + 2;1547 buf = (char *) yy alloc(n);1394 n = len + 2; 1395 buf = (char *) yy_flex_alloc( n ); 1548 1396 if ( ! buf ) 1549 1397 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 1550 1398 1551 for ( i = 0; i < _yybytes_len; ++i )1552 buf[i] = yybytes[i];1553 1554 buf[ _yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;1555 1556 b = yy_scan_buffer( buf,n );1399 for ( i = 0; i < len; ++i ) 1400 buf[i] = bytes[i]; 1401 1402 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 1403 1404 b = yy_scan_buffer( buf, n ); 1557 1405 if ( ! b ) 1558 1406 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); … … 1564 1412 1565 1413 return b; 1566 } 1414 } 1415 #endif 1416 1417 1418 #ifndef YY_NO_PUSH_STATE 1419 #ifdef YY_USE_PROTOS 1420 static void yy_push_state( int new_state ) 1421 #else 1422 static void yy_push_state( new_state ) 1423 int new_state; 1424 #endif 1425 { 1426 if ( yy_start_stack_ptr >= yy_start_stack_depth ) 1427 { 1428 yy_size_t new_size; 1429 1430 yy_start_stack_depth += YY_START_STACK_INCR; 1431 new_size = yy_start_stack_depth * sizeof( int ); 1432 1433 if ( ! yy_start_stack ) 1434 yy_start_stack = (int *) yy_flex_alloc( new_size ); 1435 1436 else 1437 yy_start_stack = (int *) yy_flex_realloc( 1438 (void *) yy_start_stack, new_size ); 1439 1440 if ( ! yy_start_stack ) 1441 YY_FATAL_ERROR( 1442 "out of memory expanding start-condition stack" ); 1443 } 1444 1445 yy_start_stack[yy_start_stack_ptr++] = YY_START; 1446 1447 BEGIN(new_state); 1448 } 1449 #endif 1450 1451 1452 #ifndef YY_NO_POP_STATE 1453 static void yy_pop_state() 1454 { 1455 if ( --yy_start_stack_ptr < 0 ) 1456 YY_FATAL_ERROR( "start-condition stack underflow" ); 1457 1458 BEGIN(yy_start_stack[yy_start_stack_ptr]); 1459 } 1460 #endif 1461 1462 1463 #ifndef YY_NO_TOP_STATE 1464 static int yy_top_state() 1465 { 1466 return yy_start_stack[yy_start_stack_ptr - 1]; 1467 } 1468 #endif 1567 1469 1568 1470 #ifndef YY_EXIT_FAILURE … … 1570 1472 #endif 1571 1473 1572 static void yy_fatal_error (yyconst char* msg ) 1573 { 1574 (void) fprintf( stderr, "%s\n", msg ); 1474 #ifdef YY_USE_PROTOS 1475 static void yy_fatal_error( yyconst char msg[] ) 1476 #else 1477 static void yy_fatal_error( msg ) 1478 char msg[]; 1479 #endif 1480 { 1481 (void) fprintf( stderr, "%s\n", msg ); 1575 1482 exit( YY_EXIT_FAILURE ); 1576 } 1483 } 1484 1485 1577 1486 1578 1487 /* Redefine yyless() so it works in section 3 code. */ … … 1583 1492 { \ 1584 1493 /* Undo effects of setting up yytext. */ \ 1585 int yyless_macro_arg = (n); \ 1586 YY_LESS_LINENO(yyless_macro_arg);\ 1587 yytext[yyleng] = (yy_hold_char); \ 1588 (yy_c_buf_p) = yytext + yyless_macro_arg; \ 1589 (yy_hold_char) = *(yy_c_buf_p); \ 1590 *(yy_c_buf_p) = '\0'; \ 1591 yyleng = yyless_macro_arg; \ 1494 yytext[yyleng] = yy_hold_char; \ 1495 yy_c_buf_p = yytext + n; \ 1496 yy_hold_char = *yy_c_buf_p; \ 1497 *yy_c_buf_p = '\0'; \ 1498 yyleng = n; \ 1592 1499 } \ 1593 1500 while ( 0 ) 1594 1501 1595 /* Accessor methods (get/set functions) to struct members. */ 1596 1597 /** Get the current line number. 1598 * 1599 */ 1600 int yyget_lineno (void) 1601 { 1602 1603 return yylineno; 1604 } 1605 1606 /** Get the input stream. 1607 * 1608 */ 1609 FILE *yyget_in (void) 1610 { 1611 return yyin; 1612 } 1613 1614 /** Get the output stream. 1615 * 1616 */ 1617 FILE *yyget_out (void) 1618 { 1619 return yyout; 1620 } 1621 1622 /** Get the length of the current token. 1623 * 1624 */ 1625 yy_size_t yyget_leng (void) 1626 { 1627 return yyleng; 1628 } 1629 1630 /** Get the current token. 1631 * 1632 */ 1633 1634 char *yyget_text (void) 1635 { 1636 return yytext; 1637 } 1638 1639 /** Set the current line number. 1640 * @param line_number 1641 * 1642 */ 1643 void yyset_lineno (int line_number ) 1644 { 1645 1646 yylineno = line_number; 1647 } 1648 1649 /** Set the input stream. This does not discard the current 1650 * input buffer. 1651 * @param in_str A readable stream. 1652 * 1653 * @see yy_switch_to_buffer 1654 */ 1655 void yyset_in (FILE * in_str ) 1656 { 1657 yyin = in_str ; 1658 } 1659 1660 void yyset_out (FILE * out_str ) 1661 { 1662 yyout = out_str ; 1663 } 1664 1665 int yyget_debug (void) 1666 { 1667 return yy_flex_debug; 1668 } 1669 1670 void yyset_debug (int bdebug ) 1671 { 1672 yy_flex_debug = bdebug ; 1673 } 1674 1675 static int yy_init_globals (void) 1676 { 1677 /* Initialization is the same as for the non-reentrant scanner. 1678 * This function is called from yylex_destroy(), so don't allocate here. 1679 */ 1680 1681 (yy_buffer_stack) = 0; 1682 (yy_buffer_stack_top) = 0; 1683 (yy_buffer_stack_max) = 0; 1684 (yy_c_buf_p) = (char *) 0; 1685 (yy_init) = 0; 1686 (yy_start) = 0; 1687 1688 /* Defined in main.c */ 1689 #ifdef YY_STDINIT 1690 yyin = stdin; 1691 yyout = stdout; 1692 #else 1693 yyin = (FILE *) 0; 1694 yyout = (FILE *) 0; 1695 #endif 1696 1697 /* For future reference: Set errno on error, since we are called by 1698 * yylex_init() 1699 */ 1700 return 0; 1701 } 1702 1703 /* yylex_destroy is for both reentrant and non-reentrant scanners. */ 1704 int yylex_destroy (void) 1705 { 1706 1707 /* Pop the buffer stack, destroying each element. */ 1708 while(YY_CURRENT_BUFFER){ 1709 yy_delete_buffer(YY_CURRENT_BUFFER ); 1710 YY_CURRENT_BUFFER_LVALUE = NULL; 1711 yypop_buffer_state(); 1712 } 1713 1714 /* Destroy the stack itself. */ 1715 yyfree((yy_buffer_stack) ); 1716 (yy_buffer_stack) = NULL; 1717 1718 /* Reset the globals. This is important in a non-reentrant scanner so the next time 1719 * yylex() is called, initialization will occur. */ 1720 yy_init_globals( ); 1721 1722 return 0; 1723 } 1724 1725 /* 1726 * Internal utility routines. 1727 */ 1502 1503 /* Internal utility routines. */ 1728 1504 1729 1505 #ifndef yytext_ptr 1730 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 1731 { 1506 #ifdef YY_USE_PROTOS 1507 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 1508 #else 1509 static void yy_flex_strncpy( s1, s2, n ) 1510 char *s1; 1511 yyconst char *s2; 1512 int n; 1513 #endif 1514 { 1732 1515 register int i; 1733 1516 for ( i = 0; i < n; ++i ) 1734 1517 s1[i] = s2[i]; 1735 }1518 } 1736 1519 #endif 1737 1520 1738 1521 #ifdef YY_NEED_STRLEN 1739 static int yy_flex_strlen (yyconst char * s ) 1740 { 1522 #ifdef YY_USE_PROTOS 1523 static int yy_flex_strlen( yyconst char *s ) 1524 #else 1525 static int yy_flex_strlen( s ) 1526 yyconst char *s; 1527 #endif 1528 { 1741 1529 register int n; 1742 1530 for ( n = 0; s[n]; ++n ) … … 1744 1532 1745 1533 return n; 1746 } 1747 #endif 1748 1749 void *yyalloc (yy_size_t size ) 1750 { 1534 } 1535 #endif 1536 1537 1538 #ifdef YY_USE_PROTOS 1539 static void *yy_flex_alloc( yy_size_t size ) 1540 #else 1541 static void *yy_flex_alloc( size ) 1542 yy_size_t size; 1543 #endif 1544 { 1751 1545 return (void *) malloc( size ); 1752 } 1753 1754 void *yyrealloc (void * ptr, yy_size_t size ) 1755 { 1546 } 1547 1548 #ifdef YY_USE_PROTOS 1549 static void *yy_flex_realloc( void *ptr, yy_size_t size ) 1550 #else 1551 static void *yy_flex_realloc( ptr, size ) 1552 void *ptr; 1553 yy_size_t size; 1554 #endif 1555 { 1756 1556 /* The cast to (char *) in the following accommodates both 1757 1557 * implementations that use char* generic pointers, and those … … 1762 1562 */ 1763 1563 return (void *) realloc( (char *) ptr, size ); 1764 } 1765 1766 void yyfree (void * ptr ) 1767 { 1768 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ 1769 } 1770 1771 #define YYTABLES_NAME "yytables" 1772 1564 } 1565 1566 #ifdef YY_USE_PROTOS 1567 static void yy_flex_free( void *ptr ) 1568 #else 1569 static void yy_flex_free( ptr ) 1570 void *ptr; 1571 #endif 1572 { 1573 free( ptr ); 1574 } 1575 1576 #if YY_MAIN 1577 int main() 1578 { 1579 yylex(); 1580 return 0; 1581 } 1582 #endif 1773 1583 #line 68 "slc-lex.l" 1774 1775 1584 1776 1585 … … 1866 1675 return 1; 1867 1676 } 1868 -
heimdal/trunk/lib/wind/Makefile.in
r1 r4 13 13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 14 14 # PARTICULAR PURPOSE. 15 16 OS2_LA_NAME=wind 17 OS2_DLL_NAME=wind 18 OS2_DLL_OBJ=$(libwind_la_OBJECTS:%.lo=%.o) 19 OS2_DLL_LIBS=$(LIBS) ../com_err/.libs/com_err.a 15 20 16 21 @SET_MAKE@ … … 539 544 wind_err.h 540 545 541 all: $(BUILT_SOURCES) 546 all: $(BUILT_SOURCES) $(OS2_DLL_NAME).dll 542 547 $(MAKE) $(AM_MAKEFLAGS) all-am 543 548 … … 1304 1309 # Otherwise a system limit (for SysV at least) may be exceeded. 1305 1310 .NOEXPORT: 1311 1312 $(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la 1313 cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a 1314 echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def 1315 echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def 1316 echo "EXPORTS" >> $(OS2_DLL_NAME).def 1317 emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def 1318 gcc -g -Zbin-files -Zhigh-mem -Zomf -Zmap -static-libgcc -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS) 1319 emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def 1320 emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def
Note:
See TracChangeset
for help on using the changeset viewer.