Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
kbuild: introduce ccflags-y, asflags-y and ldflags-y
kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
kbuild: enable use of AFLAGS and CFLAGS on commandline
kbuild: enable 'make AFLAGS=...' to add additional options to AS
kbuild: fix AFLAGS use in h8300 and m68knommu
kbuild: check for wrong use of CFLAGS
kbuild: enable 'make CFLAGS=...' to add additional options to CC
kbuild: fix up CFLAGS usage
kbuild: make modpost detect unterminated device id lists
kbuild: call export_report from the Makefile
kbuild: move Kai Germaschewski to CREDITS
kconfig/menuconfig: distinguish between selected-by-another options and comments
kconfig: tristate choices with mixed tristate and boolean values
include/linux/Kbuild: remove duplicate entries
kbuild: kill backward compatibility checks
kbuild: kill EXTRA_ARFLAGS
kbuild: fix documentation in makefiles.txt
kbuild: call make once for all targets when O=.. is used
kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
kbuild: update _shipped files for kconfig syntax cleanup
...

Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.

+4047 -2945
+6
CREDITS
··· 1165 1165 S: Carnegie, Pennsylvania 15106-4304 1166 1166 S: USA 1167 1167 1168 + N: Kai Germaschewski 1169 + E: kai@germaschewski.name 1170 + D: Major kbuild rework during the 2.5 cycle 1171 + D: ISDN Maintainer 1172 + S: USA 1173 + 1168 1174 N: Philip Gladstone 1169 1175 E: philip@gladstonefamily.net 1170 1176 D: Kernel / timekeeping stuff
+32 -30
Documentation/kbuild/makefiles.txt
··· 276 276 277 277 --- 3.7 Compilation flags 278 278 279 - EXTRA_CFLAGS, EXTRA_AFLAGS, EXTRA_LDFLAGS, EXTRA_ARFLAGS 279 + ccflags-y, asflags-y and ldflags-y 280 + The three flags listed above applies only to the kbuild makefile 281 + where they are assigned. They are used for all the normal 282 + cc, as and ld invocation happenign during a recursive build. 283 + Note: Flags with the same behaviour were previously named: 284 + EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS. 285 + They are yet supported but their use are deprecated. 280 286 281 - All the EXTRA_ variables apply only to the kbuild makefile 282 - where they are assigned. The EXTRA_ variables apply to all 283 - commands executed in the kbuild makefile. 284 - 285 - $(EXTRA_CFLAGS) specifies options for compiling C files with 286 - $(CC). 287 + ccflags-y specifies options for compiling C files with $(CC). 287 288 288 289 Example: 289 290 # drivers/sound/emu10k1/Makefile 290 - EXTRA_CFLAGS += -I$(obj) 291 - ifdef DEBUG 292 - EXTRA_CFLAGS += -DEMU10K1_DEBUG 293 - endif 291 + ccflags-y += -I$(obj) 292 + ccflags-$(DEBUG) += -DEMU10K1_DEBUG 294 293 295 294 296 295 This variable is necessary because the top Makefile owns the 297 - variable $(CFLAGS) and uses it for compilation flags for the 296 + variable $(KBUILD_CFLAGS) and uses it for compilation flags for the 298 297 entire tree. 299 298 300 - $(EXTRA_AFLAGS) is a similar string for per-directory options 299 + asflags-y is a similar string for per-directory options 301 300 when compiling assembly language source. 302 301 303 302 Example: 304 303 #arch/x86_64/kernel/Makefile 305 - EXTRA_AFLAGS := -traditional 304 + asflags-y := -traditional 306 305 307 306 308 - $(EXTRA_LDFLAGS) and $(EXTRA_ARFLAGS) are similar strings for 309 - per-directory options to $(LD) and $(AR). 307 + ldflags-y is a string for per-directory options to $(LD). 310 308 311 309 Example: 312 310 #arch/m68k/fpsp040/Makefile 313 - EXTRA_LDFLAGS := -x 311 + ldflags-y := -x 314 312 315 313 CFLAGS_$@, AFLAGS_$@ 316 314 ··· 423 425 as-instr checks if the assembler reports a specific instruction 424 426 and then outputs either option1 or option2 425 427 C escapes are supported in the test instruction 428 + Note: as-instr-option uses KBUILD_AFLAGS for $(AS) options 426 429 427 430 cc-option 428 431 cc-option is used to check if $(CC) supports a given option, and not ··· 437 438 -march=pentium-mmx if supported by $(CC), otherwise -march=i586. 438 439 The second argument to cc-option is optional, and if omitted, 439 440 cflags-y will be assigned no value if first option is not supported. 441 + Note: cc-option uses KBUILD_CFLAGS for $(CC) options 440 442 441 443 cc-option-yn 442 444 cc-option-yn is used to check if gcc supports a given option ··· 453 453 option. When $(biarch) equals 'y', the expanded variables $(aflags-y) 454 454 and $(cflags-y) will be assigned the values -a32 and -m32, 455 455 respectively. 456 + Note: cc-option-yn uses KBUILD_CFLAGS for $(CC) options 456 457 457 458 cc-option-align 458 459 gcc versions >= 3.0 changed the type of options used to specify ··· 465 464 cc-option-align = -falign 466 465 467 466 Example: 468 - CFLAGS += $(cc-option-align)-functions=4 467 + KBUILD_CFLAGS += $(cc-option-align)-functions=4 469 468 470 469 In the above example, the option -falign-functions=4 is used for 471 470 gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used. 471 + Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options 472 472 473 473 cc-version 474 474 cc-version returns a numerical version of the $(CC) compiler version. ··· 494 492 495 493 Example: 496 494 #fs/reiserfs/Makefile 497 - EXTRA_CFLAGS := $(call cc-ifversion, -lt, 0402, -O1) 495 + ccflags-y := $(call cc-ifversion, -lt, 0402, -O1) 498 496 499 - In this example, EXTRA_CFLAGS will be assigned the value -O1 if the 497 + In this example, ccflags-y will be assigned the value -O1 if the 500 498 $(CC) version is less than 4.2. 501 499 cc-ifversion takes all the shell operators: 502 500 -eq, -ne, -lt, -le, -gt, and -ge ··· 782 780 Example: 783 781 #arch/s390/Makefile 784 782 LDFLAGS := -m elf_s390 785 - Note: EXTRA_LDFLAGS and LDFLAGS_$@ can be used to further customise 786 - the flags used. See chapter 7. 783 + Note: ldflags-y can be used to further customise 784 + the flags used. See chapter 3.7. 787 785 788 786 LDFLAGS_MODULE Options for $(LD) when linking modules 789 787 ··· 819 817 In this example, the binary $(obj)/image is a binary version of 820 818 vmlinux. The usage of $(call if_changed,xxx) will be described later. 821 819 822 - AFLAGS $(AS) assembler flags 820 + KBUILD_AFLAGS $(AS) assembler flags 823 821 824 822 Default value - see top level Makefile 825 823 Append or modify as required per architecture. 826 824 827 825 Example: 828 826 #arch/sparc64/Makefile 829 - AFLAGS += -m64 -mcpu=ultrasparc 827 + KBUILD_AFLAGS += -m64 -mcpu=ultrasparc 830 828 831 - CFLAGS $(CC) compiler flags 829 + KBUILD_CFLAGS $(CC) compiler flags 832 830 833 831 Default value - see top level Makefile 834 832 Append or modify as required per architecture. 835 833 836 - Often, the CFLAGS variable depends on the configuration. 834 + Often, the KBUILD_CFLAGS variable depends on the configuration. 837 835 838 836 Example: 839 837 #arch/i386/Makefile 840 838 cflags-$(CONFIG_M386) += -march=i386 841 - CFLAGS += $(cflags-y) 839 + KBUILD_CFLAGS += $(cflags-y) 842 840 843 841 Many arch Makefiles dynamically run the target C compiler to 844 842 probe supported options: ··· 850 848 -march=pentium2,-march=i686) 851 849 ... 852 850 # Disable unit-at-a-time mode ... 853 - CFLAGS += $(call cc-option,-fno-unit-at-a-time) 851 + KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time) 854 852 ... 855 853 856 854 ··· 1098 1096 specified options when building the target vmlinux.lds. 1099 1097 1100 1098 When building the *.lds target, kbuild uses the variables: 1101 - CPPFLAGS : Set in top-level Makefile 1102 - EXTRA_CPPFLAGS : May be set in the kbuild makefile 1099 + KBUILD_CPPFLAGS : Set in top-level Makefile 1100 + cppflags-y : May be set in the kbuild makefile 1103 1101 CPPFLAGS_$(@F) : Target specific flags. 1104 1102 Note that the full filename is used in this 1105 1103 assignment.
-4
MAINTAINERS
··· 2138 2138 ISDN SUBSYSTEM 2139 2139 P: Karsten Keil 2140 2140 M: kkeil@suse.de 2141 - P: Kai Germaschewski 2142 - M: kai.germaschewski@gmx.de 2143 2141 L: isdn4linux@listserv.isdn4linux.de 2144 2142 W: http://www.isdn4linux.de 2145 2143 T: git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git ··· 2206 2208 S: Maintained 2207 2209 2208 2210 KERNEL BUILD (kbuild: Makefile, scripts/Makefile.*) 2209 - P: Kai Germaschewski 2210 - M: kai@germaschewski.name 2211 2211 P: Sam Ravnborg 2212 2212 M: sam@ravnborg.org 2213 2213 T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git
+38 -19
Makefile
··· 115 115 KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) 116 116 $(if $(KBUILD_OUTPUT),, \ 117 117 $(error output directory "$(saved-output)" does not exist)) 118 + # Check that OUTPUT directory is not the same as where we have kernel src 119 + $(if $(filter-out $(KBUILD_OUTPUT),$(shell /bin/pwd)),, \ 120 + $(error Output directory (O=...) specifies kernel src dir)) 118 121 119 - PHONY += $(MAKECMDGOALS) 122 + PHONY += $(MAKECMDGOALS) sub-make 120 123 121 - $(filter-out _all,$(MAKECMDGOALS)) _all: 124 + $(filter-out _all sub-make,$(MAKECMDGOALS)) _all: sub-make 125 + $(Q)@: 126 + 127 + sub-make: FORCE 122 128 $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ 123 129 KBUILD_SRC=$(CURDIR) \ 124 - KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@ 130 + KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \ 131 + $(filter-out _all sub-make,$(MAKECMDGOALS)) 125 132 126 133 # Leave processing to above invocation of make 127 134 skip-makefile := 1 ··· 318 311 $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \ 319 312 -include include/linux/autoconf.h 320 313 321 - CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) 314 + KBUILD_CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) 322 315 323 - CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 316 + KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 324 317 -fno-strict-aliasing -fno-common \ 325 318 -Werror-implicit-function-declaration 326 - AFLAGS := -D__ASSEMBLY__ 319 + KBUILD_AFLAGS := -D__ASSEMBLY__ 327 320 328 321 # Read KERNELRELEASE from include/config/kernel.release (if it exists) 329 322 KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) ··· 334 327 export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE 335 328 export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 336 329 337 - export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 338 - export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 339 - export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE 330 + export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 331 + export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 332 + export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE 340 333 341 334 # When compiling out-of-tree modules, put MODVERDIR in the module 342 335 # tree rather than in the kernel tree. The kernel tree might ··· 492 485 all: vmlinux 493 486 494 487 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 495 - CFLAGS += -Os 488 + KBUILD_CFLAGS += -Os 496 489 else 497 - CFLAGS += -O2 490 + KBUILD_CFLAGS += -O2 498 491 endif 499 492 500 493 include $(srctree)/arch/$(ARCH)/Makefile 501 494 502 495 ifdef CONFIG_FRAME_POINTER 503 - CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 496 + KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 504 497 else 505 - CFLAGS += -fomit-frame-pointer 498 + KBUILD_CFLAGS += -fomit-frame-pointer 506 499 endif 507 500 508 501 ifdef CONFIG_DEBUG_INFO 509 - CFLAGS += -g 502 + KBUILD_CFLAGS += -g 503 + KBUILD_AFLAGS += -gdwarf-2 510 504 endif 511 505 512 506 # Force gcc to behave correct even for buggy distributions 513 - CFLAGS += $(call cc-option, -fno-stack-protector) 507 + KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) 514 508 515 509 # arch Makefile may override CC so keep this after arch Makefile is included 516 510 NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) 517 511 CHECKFLAGS += $(NOSTDINC_FLAGS) 518 512 519 513 # warn about C99 declaration after statement 520 - CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) 514 + KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) 521 515 522 516 # disable pointer signed / unsigned warnings in gcc 4.0 523 - CFLAGS += $(call cc-option,-Wno-pointer-sign,) 517 + KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) 518 + 519 + # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments 520 + KBUILD_CPPFLAGS += $(CPPFLAGS) 521 + KBUILD_AFLAGS += $(AFLAGS) 522 + KBUILD_CFLAGS += $(CFLAGS) 524 523 525 524 # Use --build-id when available. 526 525 LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ ··· 1162 1149 @echo 'Static analysers' 1163 1150 @echo ' checkstack - Generate a list of stack hogs' 1164 1151 @echo ' namespacecheck - Name space analysis on compiled kernel' 1152 + @echo ' export_report - List the usages of all exported symbols' 1165 1153 @if [ -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \ 1166 1154 echo ' headers_check - Sanity check on exported headers'; \ 1167 1155 fi ··· 1269 1255 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1270 1256 1271 1257 clean: rm-dirs := $(MODVERDIR) 1258 + clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers 1272 1259 clean: $(clean-dirs) 1273 1260 $(call cmd,rmdirs) 1261 + $(call cmd,rmfiles) 1274 1262 @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ 1275 1263 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ 1276 1264 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ ··· 1427 1411 namespacecheck: 1428 1412 $(PERL) $(srctree)/scripts/namespace.pl 1429 1413 1414 + export_report: 1415 + $(PERL) $(srctree)/scripts/export_report.pl 1416 + 1430 1417 endif #ifeq ($(config-targets),1) 1431 1418 endif #ifeq ($(mixed-targets),1) 1432 1419 ··· 1507 1488 cmd_rmfiles = rm -f $(rm-files) 1508 1489 1509 1490 1510 - a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ 1511 - $(NOSTDINC_FLAGS) $(CPPFLAGS) \ 1491 + a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ 1492 + $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ 1512 1493 $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) 1513 1494 1514 1495 quiet_cmd_as_o_S = AS $@
+1 -1
arch/alpha/Makefile
··· 33 33 # For TSUNAMI, we must have the assembler not emulate our instructions. 34 34 # The same is true for IRONGATE, POLARIS, PYXIS. 35 35 # BWX is most important, but we don't really want any emulation ever. 36 - CFLAGS += $(cflags-y) -Wa,-mev6 36 + KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6 37 37 38 38 head-y := arch/alpha/kernel/head.o 39 39
+1 -1
arch/alpha/kernel/Makefile
··· 3 3 # 4 4 5 5 extra-y := head.o vmlinux.lds 6 - EXTRA_AFLAGS := $(CFLAGS) 6 + EXTRA_AFLAGS := $(KBUILD_CFLAGS) 7 7 EXTRA_CFLAGS := -Werror -Wno-sign-compare 8 8 9 9 obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
+1 -1
arch/alpha/lib/Makefile
··· 2 2 # Makefile for alpha-specific library files.. 3 3 # 4 4 5 - EXTRA_AFLAGS := $(CFLAGS) 5 + EXTRA_AFLAGS := $(KBUILD_CFLAGS) 6 6 EXTRA_CFLAGS := -Werror 7 7 8 8 # Many of these routines have implementations tuned for ev6.
+7 -7
arch/arm/Makefile
··· 14 14 CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) 15 15 OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 16 16 GZFLAGS :=-9 17 - #CFLAGS +=-pipe 17 + #KBUILD_CFLAGS +=-pipe 18 18 # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: 19 - CFLAGS +=$(call cc-option,-marm,) 19 + KBUILD_CFLAGS +=$(call cc-option,-marm,) 20 20 21 21 # Do not use arch/arm/defconfig - it's always outdated. 22 22 # Select a platform tht is kept up-to-date ··· 28 28 endif 29 29 30 30 ifeq ($(CONFIG_FRAME_POINTER),y) 31 - CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog 31 + KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog 32 32 endif 33 33 34 34 ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 35 - CPPFLAGS += -mbig-endian 35 + KBUILD_CPPFLAGS += -mbig-endian 36 36 AS += -EB 37 37 LD += -EB 38 38 else 39 - CPPFLAGS += -mlittle-endian 39 + KBUILD_CPPFLAGS += -mlittle-endian 40 40 AS += -EL 41 41 LD += -EL 42 42 endif ··· 85 85 endif 86 86 87 87 # Need -Uarm for gcc < 3.x 88 - CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 89 - AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 88 + KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 89 + KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 90 90 91 91 CHECKFLAGS += -D__arm__ 92 92
+1 -1
arch/arm/boot/compressed/Makefile
··· 87 87 LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) 88 88 endif 89 89 LDFLAGS_vmlinux += -p --no-undefined -X \ 90 - $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T 90 + $(shell $(CC) $(KBUILD_CFLAGS) --print-libgcc-file-name) -T 91 91 92 92 # Don't allow any static data in misc.o, which 93 93 # would otherwise mess up our GOT table
+1 -1
arch/arm/vfp/Makefile
··· 7 7 # EXTRA_CFLAGS := -DDEBUG 8 8 # EXTRA_AFLAGS := -DDEBUG 9 9 10 - AFLAGS :=$(AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) 10 + KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) 11 11 LDFLAGS +=--no-warn-mismatch 12 12 13 13 obj-y += vfp.o
+4 -4
arch/avr32/Makefile
··· 11 11 12 12 KBUILD_DEFCONFIG := atstk1002_defconfig 13 13 14 - CFLAGS += -pipe -fno-builtin -mno-pic 15 - AFLAGS += -mrelax -mno-pic 14 + KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic 15 + KBUILD_AFLAGS += -mrelax -mno-pic 16 16 CFLAGS_MODULE += -mno-relax 17 17 LDFLAGS_vmlinux += --relax 18 18 19 19 cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 20 20 21 - CFLAGS += $(cpuflags-y) 22 - AFLAGS += $(cpuflags-y) 21 + KBUILD_CFLAGS += $(cpuflags-y) 22 + KBUILD_AFLAGS += $(cpuflags-y) 23 23 24 24 CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN 25 25
+1 -1
arch/blackfin/Kconfig
··· 758 758 choice 759 759 prompt "Uncached SDRAM region" 760 760 default DMA_UNCACHED_1M 761 - depends BFIN_DMA_5XX 761 + depends on BFIN_DMA_5XX 762 762 config DMA_UNCACHED_2M 763 763 bool "Enable 2M DMA region" 764 764 config DMA_UNCACHED_1M
+2 -2
arch/blackfin/Makefile
··· 53 53 rev-$(CONFIG_BF_REV_NONE) := none 54 54 rev-$(CONFIG_BF_REV_ANY) := any 55 55 56 - CFLAGS += -mcpu=$(cpu-y)-$(rev-y) 57 - AFLAGS += -mcpu=$(cpu-y)-$(rev-y) 56 + KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y) 57 + KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y) 58 58 59 59 head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o 60 60
+5 -5
arch/cris/Makefile
··· 29 29 OBJCOPYFLAGS := -O binary -R .note -R .comment -S 30 30 31 31 CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) 32 - AFLAGS += -mlinux 32 + KBUILD_AFLAGS += -mlinux 33 33 34 - CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe 34 + KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe 35 35 36 36 ifdef CONFIG_FRAME_POINTER 37 - CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g 38 - CFLAGS += -fno-omit-frame-pointer 37 + KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g 38 + KBUILD_CFLAGS += -fno-omit-frame-pointer 39 39 endif 40 40 41 41 head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o 42 42 43 - LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a) 43 + LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) 44 44 45 45 core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ 46 46 core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/
+16 -16
arch/frv/Makefile
··· 39 39 ARCHMODFLAGS += -G0 -mlong-calls 40 40 41 41 ifdef CONFIG_GPREL_DATA_8 42 - CFLAGS += -G8 42 + KBUILD_CFLAGS += -G8 43 43 else 44 44 ifdef CONFIG_GPREL_DATA_4 45 - CFLAGS += -G4 45 + KBUILD_CFLAGS += -G4 46 46 else 47 47 ifdef CONFIG_GPREL_DATA_NONE 48 - CFLAGS += -G0 48 + KBUILD_CFLAGS += -G0 49 49 endif 50 50 endif 51 51 endif ··· 53 53 #LDFLAGS_vmlinux := -Map linkmap.txt 54 54 55 55 ifdef CONFIG_GC_SECTIONS 56 - CFLAGS += -ffunction-sections -fdata-sections 56 + KBUILD_CFLAGS += -ffunction-sections -fdata-sections 57 57 LINKFLAGS += --gc-sections 58 58 endif 59 59 60 60 ifndef CONFIG_FRAME_POINTER 61 - CFLAGS += -mno-linked-fp 61 + KBUILD_CFLAGS += -mno-linked-fp 62 62 endif 63 63 64 64 ifdef CONFIG_CPU_FR451_COMPILE 65 - CFLAGS += -mcpu=fr450 66 - AFLAGS += -mcpu=fr450 65 + KBUILD_CFLAGS += -mcpu=fr450 66 + KBUILD_AFLAGS += -mcpu=fr450 67 67 ASFLAGS += -mcpu=fr450 68 68 else 69 69 ifdef CONFIG_CPU_FR551_COMPILE 70 - CFLAGS += -mcpu=fr550 71 - AFLAGS += -mcpu=fr550 70 + KBUILD_CFLAGS += -mcpu=fr550 71 + KBUILD_AFLAGS += -mcpu=fr550 72 72 ASFLAGS += -mcpu=fr550 73 73 else 74 - CFLAGS += -mcpu=fr400 75 - AFLAGS += -mcpu=fr400 74 + KBUILD_CFLAGS += -mcpu=fr400 75 + KBUILD_AFLAGS += -mcpu=fr400 76 76 ASFLAGS += -mcpu=fr400 77 77 endif 78 78 endif ··· 80 80 # pretend the kernel is going to run on an FR400 with no media-fp unit 81 81 # - reserve CC3 for use with atomic ops 82 82 # - all the extra registers are dealt with only at context switch time 83 - CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media 84 - CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 85 - AFLAGS += -mno-fdpic 83 + KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media 84 + KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 85 + KBUILD_AFLAGS += -mno-fdpic 86 86 ASFLAGS += -mno-fdpic 87 87 88 88 # make sure the .S files get compiled with debug info 89 89 # and disable optimisations that are unhelpful whilst debugging 90 90 ifdef CONFIG_DEBUG_INFO 91 - #CFLAGS += -O1 92 - AFLAGS += -Wa,--gdwarf2 91 + #KBUILD_CFLAGS += -O1 92 + KBUILD_AFLAGS += -Wa,--gdwarf2 93 93 ASFLAGS += -Wa,--gdwarf2 94 94 endif 95 95
+7 -7
arch/h8300/Makefile
··· 30 30 cflags-$(CONFIG_CPU_H8S) := -ms 31 31 ldflags-$(CONFIG_CPU_H8S) := -mh8300self 32 32 33 - CFLAGS += $(cflags-y) 34 - CFLAGS += -mint32 -fno-builtin 35 - CFLAGS += -g 36 - CFLAGS += -D__linux__ 37 - CFLAGS += -DUTS_SYSNAME=\"uClinux\" 38 - AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) 33 + KBUILD_CFLAGS += $(cflags-y) 34 + KBUILD_CFLAGS += -mint32 -fno-builtin 35 + KBUILD_CFLAGS += -g 36 + KBUILD_CFLAGS += -D__linux__ 37 + KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" 38 + KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) 39 39 LDFLAGS += $(ldflags-y) 40 40 41 41 CROSS_COMPILE = h8300-elf- 42 - LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name) 42 + LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 43 43 44 44 head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o 45 45
-3
arch/h8300/lib/Makefile
··· 2 2 # Makefile for H8/300-specific library files.. 3 3 # 4 4 5 - .S.o: 6 - $(CC) $(AFLAGS) -D__ASSEMBLY__ -c $< -o $@ 7 - 8 5 lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o
+8 -8
arch/i386/Makefile
··· 34 34 endif 35 35 CHECKFLAGS += -D__i386__ 36 36 37 - CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return 37 + KBUILD_CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return 38 38 39 39 # prevent gcc from keeping the stack 16 byte aligned 40 - CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 40 + KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 41 41 42 42 # CPU-specific tuning. Anything which can be shared with UML should go here. 43 43 include $(srctree)/arch/i386/Makefile.cpu ··· 51 51 52 52 # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use 53 53 # a lot more stack due to the lack of sharing of stacklots: 54 - CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) 54 + KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) 55 55 56 56 # do binutils support CFI? 57 57 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 58 - AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 58 + KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 59 59 60 60 # is .cfi_signal_frame supported too? 61 61 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 62 - AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 62 + KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 63 63 64 - CFLAGS += $(cflags-y) 64 + KBUILD_CFLAGS += $(cflags-y) 65 65 66 66 # Default subarch .c files 67 67 mcore-y := arch/x86/mach-default ··· 116 116 drivers-$(CONFIG_PM) += arch/x86/power/ 117 117 drivers-$(CONFIG_FB) += arch/x86/video/ 118 118 119 - CFLAGS += $(mflags-y) 120 - AFLAGS += $(mflags-y) 119 + KBUILD_CFLAGS += $(mflags-y) 120 + KBUILD_AFLAGS += $(mflags-y) 121 121 122 122 boot := arch/x86/boot 123 123
+2 -2
arch/ia64/Makefile
··· 29 29 CFLAGS_KERNEL := -mconstant-gp 30 30 31 31 GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") 32 - CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") 32 + KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") 33 33 34 34 ifeq ($(GAS_STATUS),buggy) 35 35 $(error Sorry, you need a newer version of the assember, one that is built from \ ··· 44 44 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley 45 45 endif 46 46 47 - CFLAGS += $(cflags-y) 47 + KBUILD_CFLAGS += $(cflags-y) 48 48 head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o 49 49 50 50 libs-y += arch/ia64/lib/
+1 -1
arch/ia64/sn/kernel/Makefile
··· 7 7 # Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All Rights Reserved. 8 8 # 9 9 10 - CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 10 + EXTRA_CFLAGS += -Iarch/ia64/sn/include 11 11 12 12 obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ 13 13 huberror.o io_acpi_init.o io_common.o \
+1 -1
arch/ia64/sn/kernel/sn2/Makefile
··· 9 9 # sn2 specific kernel files 10 10 # 11 11 12 - CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 12 + EXTRA_CFLAGS += -Iarch/ia64/sn/include 13 13 14 14 obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ 15 15 prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o
+1 -1
arch/ia64/sn/pci/Makefile
··· 7 7 # 8 8 # Makefile for the sn pci general routines. 9 9 10 - CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 10 + EXTRA_CFLAGS += -Iarch/ia64/sn/include 11 11 12 12 obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/
+1 -1
arch/ia64/sn/pci/pcibr/Makefile
··· 7 7 # 8 8 # Makefile for the sn2 io routines. 9 9 10 - CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 10 + EXTRA_CFLAGS += -Iarch/ia64/sn/include 11 11 12 12 obj-y += pcibr_dma.o pcibr_reg.o \ 13 13 pcibr_ate.o pcibr_provider.o
+4 -4
arch/m32r/Makefile
··· 9 9 OBJCOPYFLAGS := -O binary -R .note -R .comment -S 10 10 LDFLAGS_vmlinux := 11 11 12 - CFLAGS += -pipe -fno-schedule-insns 12 + KBUILD_CFLAGS += -pipe -fno-schedule-insns 13 13 CFLAGS_KERNEL += -mmodel=medium 14 14 CFLAGS_MODULE += -mmodel=large 15 15 ··· 24 24 cflags-$(CONFIG_ISA_M32R) += -DNO_FPU 25 25 aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst 26 26 27 - CFLAGS += $(cflags-y) 28 - AFLAGS += $(aflags-y) 27 + KBUILD_CFLAGS += $(cflags-y) 28 + KBUILD_AFLAGS += $(aflags-y) 29 29 30 30 CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 31 31 32 32 head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o 33 33 34 - LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 34 + LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 35 35 36 36 libs-y += arch/m32r/lib/ $(LIBGCC) 37 37 core-y += arch/m32r/kernel/ \
+4 -4
arch/m68k/Makefile
··· 32 32 CHECKFLAGS += -D__mc68000__ 33 33 34 34 # without -fno-strength-reduce the 53c7xx.c driver fails ;-( 35 - CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 35 + KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 36 36 37 37 # enable processor switch if compiled only for a single cpu 38 38 ifndef CONFIG_M68020 39 39 ifndef CONFIG_M68030 40 40 41 41 ifndef CONFIG_M68060 42 - CFLAGS := $(CFLAGS) -m68040 42 + KBUILD_CFLAGS += -m68040 43 43 endif 44 44 45 45 ifndef CONFIG_M68040 46 - CFLAGS := $(CFLAGS) -m68060 46 + KBUILD_CFLAGS += -m68060 47 47 endif 48 48 49 49 endif ··· 52 52 ifdef CONFIG_KGDB 53 53 # If configured for kgdb support, include debugging infos and keep the 54 54 # frame pointer 55 - CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g 55 + KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g 56 56 endif 57 57 58 58 ifndef CONFIG_SUN3
+4 -4
arch/m68knommu/Makefile
··· 102 102 cflags-$(CONFIG_M68VZ328) := -m68000 103 103 cflags-$(CONFIG_M68360) := -m68332 104 104 105 - AFLAGS += $(cflags-y) 105 + KBUILD_AFLAGS += $(cflags-y) 106 106 107 - CFLAGS += $(cflags-y) 108 - CFLAGS += -D__linux__ 109 - CFLAGS += -DUTS_SYSNAME=\"uClinux\" 107 + KBUILD_CFLAGS += $(cflags-y) 108 + KBUILD_CFLAGS += -D__linux__ 109 + KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" 110 110 111 111 head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o 112 112
+1 -1
arch/m68knommu/platform/5206/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-y := config.o
+1 -1
arch/m68knommu/platform/5206e/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-y := config.o
+1 -1
arch/m68knommu/platform/520x/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-y := config.o
+1 -1
arch/m68knommu/platform/523x/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-y := config.o
+1 -1
arch/m68knommu/platform/5249/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-y := config.o
+1 -1
arch/m68knommu/platform/5272/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-y := config.o
+1 -1
arch/m68knommu/platform/527x/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-y := config.o
+1 -1
arch/m68knommu/platform/528x/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-y := config.o
+1 -1
arch/m68knommu/platform/5307/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-$(CONFIG_COLDFIRE) += entry.o vectors.o
+1 -1
arch/m68knommu/platform/532x/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 #obj-y := config.o usb-mcf532x.o spi-mcf532x.o
+1 -1
arch/m68knommu/platform/5407/Makefile
··· 13 13 # 14 14 15 15 ifdef CONFIG_FULLDEBUG 16 - AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16 + EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 17 17 endif 18 18 19 19 obj-y := config.o
+4 -4
arch/mips/Makefile
··· 608 608 endif 609 609 endif 610 610 611 - AFLAGS += $(cflags-y) 612 - CFLAGS += $(cflags-y) \ 611 + KBUILD_AFLAGS += $(cflags-y) 612 + KBUILD_CFLAGS += $(cflags-y) \ 613 613 -D"VMLINUX_LOAD_ADDRESS=$(load-y)" 614 614 615 615 LDFLAGS += -m $(ld-emul) 616 616 617 617 ifdef CONFIG_MIPS 618 - CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \ 618 + CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \ 619 619 egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ 620 620 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/") 621 621 ifdef CONFIG_64BIT ··· 632 632 # 633 633 634 634 CPPFLAGS_vmlinux.lds := \ 635 - $(CFLAGS) \ 635 + $(KBUILD_CFLAGS) \ 636 636 -D"LOADADDR=$(load-y)" \ 637 637 -D"JIFFIES=$(JIFFIES)" \ 638 638 -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
+1 -1
arch/mips/kernel/Makefile
··· 71 71 obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 72 72 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 73 73 74 - CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi) 74 + CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi) 75 75 76 76 obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o 77 77
+1 -1
arch/parisc/Makefile
··· 63 63 64 64 head-y := arch/parisc/kernel/head.o 65 65 66 - CFLAGS += $(cflags-y) 66 + KBUILD_CFLAGS += $(cflags-y) 67 67 68 68 kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o 69 69 kernel-$(CONFIG_HPUX) += hpux/
+1 -1
arch/parisc/math-emu/Makefile
··· 3 3 # 4 4 5 5 # See arch/parisc/math-emu/README 6 - CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \ 6 + EXTRA_CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \ 7 7 -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \ 8 8 -Wno-implicit-int 9 9
+3 -3
arch/powerpc/Kconfig.debug
··· 144 144 145 145 config BOOTX_TEXT 146 146 bool "Support for early boot text console (BootX or OpenFirmware only)" 147 - depends PPC_OF && PPC_MULTIPLATFORM 147 + depends on PPC_OF && PPC_MULTIPLATFORM 148 148 help 149 149 Say Y here to see progress messages from the boot firmware in text 150 150 mode. Requires either BootX or Open Firmware. ··· 234 234 235 235 config PPC_EARLY_DEBUG_44x_PHYSLOW 236 236 hex "Low 32 bits of early debug UART physical address" 237 - depends PPC_EARLY_DEBUG_44x 237 + depends on PPC_EARLY_DEBUG_44x 238 238 default "0x40000200" 239 239 240 240 config PPC_EARLY_DEBUG_44x_PHYSHIGH 241 241 hex "EPRN of early debug UART physical address" 242 - depends PPC_EARLY_DEBUG_44x 242 + depends on PPC_EARLY_DEBUG_44x 243 243 default "0x1" 244 244 245 245 config PPC_EARLY_DEBUG_CPM_ADDR
+15 -15
arch/powerpc/Makefile
··· 75 75 AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) 76 76 CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc 77 77 CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple 78 - CPPFLAGS += $(CPPFLAGS-y) 79 - AFLAGS += $(AFLAGS-y) 80 - CFLAGS += -msoft-float -pipe $(CFLAGS-y) 81 - CPP = $(CC) -E $(CFLAGS) 78 + KBUILD_CPPFLAGS += $(CPPFLAGS-y) 79 + KBUILD_AFLAGS += $(AFLAGS-y) 80 + KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y) 81 + CPP = $(CC) -E $(KBUILD_CFLAGS) 82 82 83 83 CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ 84 84 ··· 88 88 ifeq ($(CONFIG_POWER4_ONLY),y) 89 89 ifeq ($(CONFIG_ALTIVEC),y) 90 90 ifeq ($(GCC_BROKEN_VEC),y) 91 - CFLAGS += $(call cc-option,-mcpu=970) 91 + KBUILD_CFLAGS += $(call cc-option,-mcpu=970) 92 92 else 93 - CFLAGS += $(call cc-option,-mcpu=power4) 93 + KBUILD_CFLAGS += $(call cc-option,-mcpu=power4) 94 94 endif 95 95 else 96 - CFLAGS += $(call cc-option,-mcpu=power4) 96 + KBUILD_CFLAGS += $(call cc-option,-mcpu=power4) 97 97 endif 98 98 else 99 - CFLAGS += $(call cc-option,-mtune=power4) 99 + KBUILD_CFLAGS += $(call cc-option,-mtune=power4) 100 100 endif 101 101 endif 102 102 103 103 ifeq ($(CONFIG_TUNE_CELL),y) 104 - CFLAGS += $(call cc-option,-mtune=cell) 104 + KBUILD_CFLAGS += $(call cc-option,-mtune=cell) 105 105 endif 106 106 107 107 # No AltiVec instruction when building kernel 108 - CFLAGS += $(call cc-option,-mno-altivec) 108 + KBUILD_CFLAGS += $(call cc-option,-mno-altivec) 109 109 110 110 # Enable unit-at-a-time mode when possible. It shrinks the 111 111 # kernel considerably. 112 - CFLAGS += $(call cc-option,-funit-at-a-time) 112 + KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) 113 113 114 114 # Never use string load/store instructions as they are 115 115 # often slow when they are implemented at all 116 - CFLAGS += -mno-string 116 + KBUILD_CFLAGS += -mno-string 117 117 118 118 ifeq ($(CONFIG_6xx),y) 119 - CFLAGS += -mcpu=powerpc 119 + KBUILD_CFLAGS += -mcpu=powerpc 120 120 endif 121 121 122 122 cpu-as-$(CONFIG_4xx) += -Wa,-m405 ··· 125 125 cpu-as-$(CONFIG_E500) += -Wa,-me500 126 126 cpu-as-$(CONFIG_E200) += -Wa,-me200 127 127 128 - AFLAGS += $(cpu-as-y) 129 - CFLAGS += $(cpu-as-y) 128 + KBUILD_AFLAGS += $(cpu-as-y) 129 + KBUILD_CFLAGS += $(cpu-as-y) 130 130 131 131 head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o 132 132 head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
+1 -1
arch/powerpc/platforms/Kconfig
··· 117 117 118 118 config PPC_PMI 119 119 tristate "Support for PMI" 120 - depends PPC_IBM_CELL_BLADE 120 + depends on PPC_IBM_CELL_BLADE 121 121 help 122 122 PMI (Platform Management Interrupt) is a way to 123 123 communicate with the BMC (Baseboard Mangement Controller).
+8 -8
arch/ppc/Makefile
··· 22 22 23 23 LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic 24 24 # The -Iarch/$(ARCH)/include is temporary while we are merging 25 - CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include 26 - AFLAGS += -Iarch/$(ARCH) 27 - CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ 25 + KBUILD_CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include 26 + KBUILD_AFLAGS += -Iarch/$(ARCH) 27 + KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ 28 28 -ffixed-r2 -mmultiple 29 29 30 30 # No AltiVec instruction when building kernel 31 - CFLAGS += $(call cc-option, -mno-altivec) 31 + KBUILD_CFLAGS += $(call cc-option, -mno-altivec) 32 32 33 - CPP = $(CC) -E $(CFLAGS) 33 + CPP = $(CC) -E $(KBUILD_CFLAGS) 34 34 # Temporary hack until we have migrated to asm-powerpc 35 35 LINUXINCLUDE += -Iarch/$(ARCH)/include 36 36 37 37 CHECKFLAGS += -D__powerpc__ 38 38 39 39 ifndef CONFIG_FSL_BOOKE 40 - CFLAGS += -mstring 40 + KBUILD_CFLAGS += -mstring 41 41 endif 42 42 43 43 cpu-as-$(CONFIG_4xx) += -Wa,-m405 ··· 45 45 cpu-as-$(CONFIG_E500) += -Wa,-me500 46 46 cpu-as-$(CONFIG_E200) += -Wa,-me200 47 47 48 - AFLAGS += $(cpu-as-y) 49 - CFLAGS += $(cpu-as-y) 48 + KBUILD_AFLAGS += $(cpu-as-y) 49 + KBUILD_CFLAGS += $(cpu-as-y) 50 50 51 51 # Default to the common case. 52 52 KBUILD_DEFCONFIG := common_defconfig
-1
arch/ppc/boot/Makefile
··· 13 13 # modified by Cort (cort@cs.nmt.edu) 14 14 # 15 15 16 - CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include 17 16 HOSTCFLAGS += -Iarch/$(ARCH)/boot/include 18 17 19 18 BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
+7 -7
arch/s390/Makefile
··· 15 15 16 16 ifndef CONFIG_64BIT 17 17 LDFLAGS := -m elf_s390 18 - CFLAGS += -m31 19 - AFLAGS += -m31 18 + KBUILD_CFLAGS += -m31 19 + KBUILD_AFLAGS += -m31 20 20 UTS_MACHINE := s390 21 21 STACK_SIZE := 8192 22 22 CHECKFLAGS += -D__s390__ -msize-long 23 23 else 24 24 LDFLAGS := -m elf64_s390 25 25 MODFLAGS += -fpic -D__PIC__ 26 - CFLAGS += -m64 27 - AFLAGS += -m64 26 + KBUILD_CFLAGS += -m64 27 + KBUILD_AFLAGS += -m64 28 28 UTS_MACHINE := s390x 29 29 STACK_SIZE := 16384 30 30 CHECKFLAGS += -D__s390__ -D__s390x__ ··· 77 77 cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) 78 78 endif 79 79 80 - CFLAGS += -mbackchain -msoft-float $(cflags-y) 81 - CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare 82 - AFLAGS += $(aflags-y) 80 + KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) 81 + KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare 82 + KBUILD_AFLAGS += $(aflags-y) 83 83 84 84 OBJCOPYFLAGS := -O binary 85 85 LDFLAGS_vmlinux := -e start
+3 -3
arch/sh/Makefile
··· 91 91 LDFLAGS += -EB 92 92 endif 93 93 94 - CFLAGS += -pipe $(cflags-y) 95 - AFLAGS += $(cflags-y) 94 + KBUILD_CFLAGS += -pipe $(cflags-y) 95 + KBUILD_AFLAGS += $(cflags-y) 96 96 97 97 head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o 98 98 99 - LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 99 + LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 100 100 101 101 core-y += arch/sh/kernel/ arch/sh/mm/ 102 102 core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/
+1 -1
arch/sh/boot/compressed/Makefile
··· 21 21 $(CONFIG_MEMORY_START) + \ 22 22 $(CONFIG_BOOT_LINK_OFFSET)]') 23 23 24 - LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 24 + LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 25 25 26 26 LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds 27 27
+2 -2
arch/sh64/Makefile
··· 26 26 endif 27 27 28 28 # No requirements for endianess support from AFLAGS, 'as' always run through gcc 29 - CFLAGS += $(cpu-y) 29 + KBUILD_CFLAGS += $(cpu-y) 30 30 31 31 LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ 32 32 --defsym phys_stext_shmedia=phys_stext+1 \ ··· 58 58 core-y += arch/sh64/mach-$(machine-y)/ 59 59 endif 60 60 61 - LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 61 + LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 62 62 libs-y += arch/$(ARCH)/lib/ $(LIBGCC) 63 63 64 64 drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/
+4 -4
arch/sparc/Makefile
··· 8 8 # 9 9 10 10 # 11 - # Uncomment the first CFLAGS if you are doing kgdb source level 11 + # Uncomment the first KBUILD_CFLAGS if you are doing kgdb source level 12 12 # debugging of the kernel to get the proper debugging information. 13 13 14 14 AS := $(AS) -32 15 15 LDFLAGS := -m elf32_sparc 16 16 CHECKFLAGS += -D__sparc__ 17 17 18 - #CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7 19 - CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 20 - AFLAGS := $(AFLAGS) -m32 18 + #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 19 + KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 20 + KBUILD_AFLAGS += -m32 21 21 22 22 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 23 23 # Since 2.5.40, the first stage is left not btfix-ed.
+4 -4
arch/sparc64/Makefile
··· 39 39 endif 40 40 41 41 ifneq ($(NEW_GCC),y) 42 - CFLAGS := $(CFLAGS) -pipe -mno-fpu -mtune=ultrasparc -mmedlow \ 42 + KBUILD_CFLAGS += -pipe -mno-fpu -mtune=ultrasparc -mmedlow \ 43 43 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare 44 44 else 45 - CFLAGS := $(CFLAGS) -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ 45 + KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ 46 46 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ 47 47 $(CC_UNDECL) 48 - AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) 48 + KBUILD_AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) 49 49 endif 50 50 51 51 ifeq ($(CONFIG_MCOUNT),y) 52 - CFLAGS := $(CFLAGS) -pg 52 + KBUILD_CFLAGS += -pg 53 53 endif 54 54 55 55 head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o
+6 -6
arch/um/Makefile
··· 49 49 # 50 50 # These apply to USER_CFLAGS to. 51 51 52 - CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ 52 + KBUILD_CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ 53 53 $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ 54 54 -Din6addr_loopback=kernel_in6addr_loopback \ 55 55 -Din6addr_any=kernel_in6addr_any 56 56 57 - AFLAGS += $(ARCH_INCLUDE) 57 + KBUILD_AFLAGS += $(ARCH_INCLUDE) 58 58 59 59 USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ 60 - $(patsubst -I%,,$(CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ 60 + $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ 61 61 -D_FILE_OFFSET_BITS=64 62 62 63 63 include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) ··· 67 67 68 68 # -Derrno=kernel_errno - This turns all kernel references to errno into 69 69 # kernel_errno to separate them from the libc errno. This allows -fno-common 70 - # in CFLAGS. Otherwise, it would cause ld to complain about the two different 70 + # in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different 71 71 # errnos. 72 72 # These apply to kernelspace only. 73 73 74 74 KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ 75 75 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) 76 - CFLAGS += $(KERNEL_DEFINES) 77 - CFLAGS += $(call cc-option,-fno-unit-at-a-time,) 76 + KBUILD_CFLAGS += $(KERNEL_DEFINES) 77 + KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,) 78 78 79 79 # These are needed for clean and mrproper, since in that case .config is not 80 80 # included; the values here are meaningless
+3 -3
arch/um/Makefile-i386
··· 12 12 13 13 ifeq ("$(origin SUBARCH)", "command line") 14 14 ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") 15 - CFLAGS += $(call cc-option,-m32) 16 - AFLAGS += $(call cc-option,-m32) 15 + KBUILD_CFLAGS += $(call cc-option,-m32) 16 + KBUILD_AFLAGS += $(call cc-option,-m32) 17 17 LINK-y += $(call cc-option,-m32) 18 18 UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) 19 19 ··· 38 38 # an unresolved reference. 39 39 cflags-y += -ffreestanding 40 40 41 - CFLAGS += $(cflags-y) 41 + KBUILD_CFLAGS += $(cflags-y)
+1 -1
arch/um/Makefile-os-Linux
··· 5 5 6 6 # To get a definition of F_SETSIG 7 7 USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE 8 - CFLAGS += -D_LARGEFILE64_SOURCE 8 + KBUILD_CFLAGS += -D_LARGEFILE64_SOURCE
+3 -3
arch/um/Makefile-x86_64
··· 9 9 #We #undef __x86_64__ for kernelspace, not for userspace where 10 10 #it's needed for headers to work! 11 11 ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ 12 - CFLAGS += $(_extra_flags_) 12 + KBUILD_CFLAGS += $(_extra_flags_) 13 13 14 14 CHECKFLAGS += -m64 15 - AFLAGS += -m64 15 + KBUILD_AFLAGS += -m64 16 16 LDFLAGS += -m elf_x86_64 17 - CPPFLAGS += -m64 17 + KBUILD_CPPFLAGS += -m64 18 18 19 19 ELF_ARCH := i386:x86-64 20 20 ELF_FORMAT := elf64-x86-64
+1 -1
arch/um/drivers/Makefile
··· 17 17 port-objs := port_kern.o port_user.o 18 18 harddog-objs := harddog_kern.o harddog_user.o 19 19 20 - LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a) 20 + LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a) 21 21 22 22 LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a) 23 23
+3 -3
arch/um/sys-ppc/Makefile
··· 1 1 OBJ = built-in.o 2 2 3 3 .S.o: 4 - $(CC) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 4 + $(CC) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 5 5 6 6 OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \ 7 7 ptrace_user.o sysrq.o ··· 57 57 checksum.o: checksum.S 58 58 rm -f asm 59 59 ln -s $(TOPDIR)/include/asm-ppc asm 60 - $(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 60 + $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 61 61 rm -f asm 62 62 63 63 misc.o: misc.S ppc_defs.h 64 64 rm -f asm 65 65 ln -s $(TOPDIR)/include/asm-ppc asm 66 - $(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 66 + $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 67 67 rm -f asm 68 68 69 69 clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c
+4 -4
arch/v850/Makefile
··· 16 16 17 17 arch_dir = arch/v850 18 18 19 - CFLAGS += -mv850e 19 + KBUILD_CFLAGS += -mv850e 20 20 # r16 is a fixed pointer to the current task 21 - CFLAGS += -ffixed-r16 -mno-prolog-function 22 - CFLAGS += -fno-builtin 23 - CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" 21 + KBUILD_CFLAGS += -ffixed-r16 -mno-prolog-function 22 + KBUILD_CFLAGS += -fno-builtin 23 + KBUILD_CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" 24 24 25 25 # By default, build a kernel that runs on the gdb v850 simulator. 26 26 KBUILD_DEFCONFIG := sim_defconfig
+2 -2
arch/x86/boot/Makefile
··· 50 50 # that way we can complain to the user if the CPU is insufficient. 51 51 cflags-i386 := 52 52 cflags-x86_64 := -m32 53 - CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ 53 + KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ 54 54 $(cflags-$(ARCH)) \ 55 55 -Wall -Wstrict-prototypes \ 56 56 -march=i386 -mregparm=3 \ ··· 61 61 $(call cc-option, -fno-unit-at-a-time)) \ 62 62 $(call cc-option, -fno-stack-protector) \ 63 63 $(call cc-option, -mpreferred-stack-boundary=2) 64 - AFLAGS := $(CFLAGS) -D__ASSEMBLY__ 64 + KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 65 65 66 66 $(obj)/zImage: IMAGE_OFFSET := 0x1000 67 67 $(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK)
+1 -1
arch/x86/boot/compressed/Makefile_32
··· 11 11 LDFLAGS_vmlinux := -T 12 12 hostprogs-y := relocs 13 13 14 - CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ 14 + KBUILD_CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ 15 15 -fno-strict-aliasing -fPIC \ 16 16 $(call cc-option,-ffreestanding) \ 17 17 $(call cc-option,-fno-stack-protector)
+2 -2
arch/x86/boot/compressed/Makefile_64
··· 6 6 7 7 targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o 8 8 9 - CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \ 9 + KBUILD_CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \ 10 10 -fno-strict-aliasing -fPIC -mcmodel=small \ 11 11 $(call cc-option, -ffreestanding) \ 12 12 $(call cc-option, -fno-stack-protector) 13 - AFLAGS := $(CFLAGS) -D__ASSEMBLY__ 13 + KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 14 14 LDFLAGS := -m elf_x86_64 15 15 16 16 LDFLAGS_vmlinux := -T
+1 -2
arch/x86/math-emu/Makefile
··· 5 5 #DEBUG = -DDEBUGGING 6 6 DEBUG = 7 7 PARANOID = -DPARANOID 8 - CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) 9 - 8 + EXTRA_CFLAGS := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) 10 9 EXTRA_AFLAGS := $(PARANOID) 11 10 12 11 # From 'C' language sources:
+2 -2
arch/x86/vdso/Makefile
··· 34 34 35 35 CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64 36 36 37 - $(obj)/vclock_gettime.o: CFLAGS = $(CFL) 38 - $(obj)/vgetcpu.o: CFLAGS = $(CFL) 37 + $(obj)/vclock_gettime.o: KBUILD_CFLAGS = $(CFL) 38 + $(obj)/vgetcpu.o: KBUILD_CFLAGS = $(CFL) 39 39 40 40 # We also create a special relocatable object that should mirror the symbol 41 41 # table and layout of the linked DSO. With ld -R we can then refer to
+4 -4
arch/x86_64/Makefile
··· 61 61 62 62 # do binutils support CFI? 63 63 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 64 - AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 64 + KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 65 65 66 66 # is .cfi_signal_frame supported too? 67 67 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 68 - AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 68 + KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 69 69 70 70 cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) 71 71 cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) 72 72 73 - CFLAGS += $(cflags-y) 73 + KBUILD_CFLAGS += $(cflags-y) 74 74 CFLAGS_KERNEL += $(cflags-kernel-y) 75 - AFLAGS += -m64 75 + KBUILD_AFLAGS += -m64 76 76 77 77 head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o 78 78
+3 -5
arch/xtensa/Makefile
··· 28 28 export PLATFORM 29 29 30 30 # temporarily until string.h is fixed 31 - cflags-y += -ffreestanding 31 + KBUILD_CFLAGS += -ffreestanding 32 32 33 - cflags-y += -pipe -mlongcalls 34 - 35 - CFLAGS += $(cflags-y) 33 + KBUILD_CFLAGS += -pipe -mlongcalls 36 34 37 35 KBUILD_DEFCONFIG := iss_defconfig 38 36 ··· 54 56 55 57 # 56 58 57 - LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 59 + LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 58 60 59 61 head-y := arch/xtensa/kernel/head.o 60 62 core-y += arch/xtensa/kernel/ arch/xtensa/mm/
+2 -3
arch/xtensa/boot/Makefile
··· 8 8 # 9 9 10 10 11 - CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include 11 + EXTRA_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include 12 12 HOSTFLAGS += -Iarch/$(ARCH)/boot/include 13 13 14 14 BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") 15 15 16 - export CFLAGS 17 - export AFLAGS 16 + export EXTRA_CFLAGS 18 17 export BIG_ENDIAN 19 18 20 19 subdir-y := lib
+1 -1
arch/xtensa/boot/boot-redboot/Makefile
··· 19 19 OBJS := $(addprefix $(obj)/,$(boot-y)) 20 20 LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a 21 21 22 - LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 22 + LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 23 23 24 24 zImage: vmlinux $(OBJS) $(LIBS) 25 25 $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \
+1 -1
drivers/atm/Makefile
··· 41 41 # guess the target endianess to choose the right PCA-200E firmware image 42 42 ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y) 43 43 byteorder.h := include$(if $(patsubst $(srctree),,$(objtree)),2)/asm/byteorder.h 44 - CONFIG_ATM_FORE200E_PCA_FW := $(obj)/pca200e$(if $(shell $(CC) $(CPPFLAGS) -E -dM $(byteorder.h) | grep ' __LITTLE_ENDIAN '),.bin,_ecd.bin2) 44 + CONFIG_ATM_FORE200E_PCA_FW := $(obj)/pca200e$(if $(shell $(CC) $(KBUILD_CPPFLAGS) -E -dM $(byteorder.h) | grep ' __LITTLE_ENDIAN '),.bin,_ecd.bin2) 45 45 endif 46 46 endif 47 47
+1 -1
drivers/input/misc/Kconfig
··· 152 152 153 153 config INPUT_YEALINK 154 154 tristate "Yealink usb-p1k voip phone" 155 - depends EXPERIMENTAL 155 + depends on EXPERIMENTAL 156 156 depends on USB_ARCH_HAS_HCD 157 157 select USB 158 158 help
+1 -1
drivers/leds/Kconfig
··· 83 83 84 84 config LEDS_H1940 85 85 tristate "LED Support for iPAQ H1940 device" 86 - depends LEDS_CLASS && ARCH_H1940 86 + depends on LEDS_CLASS && ARCH_H1940 87 87 help 88 88 This option enables support for the LEDs on the h1940. 89 89
+1 -1
drivers/telephony/Kconfig
··· 19 19 20 20 config PHONE_IXJ 21 21 tristate "QuickNet Internet LineJack/PhoneJack support" 22 - depends ISA || PCI 22 + depends on ISA || PCI 23 23 ---help--- 24 24 Say M if you have a telephony card manufactured by Quicknet 25 25 Technologies, Inc. These include the Internet PhoneJACK and
-3
include/linux/Kbuild
··· 78 78 header-y += if_bonding.h 79 79 header-y += if_cablemodem.h 80 80 header-y += if_fc.h 81 - header-y += if_fddi.h 82 81 header-y += if.h 83 82 header-y += if_hippi.h 84 83 header-y += if_infiniband.h ··· 120 121 header-y += oom.h 121 122 header-y += param.h 122 123 header-y += pci_regs.h 123 - header-y += personality.h 124 124 header-y += pfkeyv2.h 125 125 header-y += pg.h 126 126 header-y += phantom.h ··· 157 159 header-y += video_encoder.h 158 160 header-y += videotext.h 159 161 header-y += vt.h 160 - header-y += wireless.h 161 162 header-y += x25.h 162 163 163 164 unifdef-y += acct.h
+1 -1
init/Makefile
··· 30 30 include/linux/compile.h: FORCE 31 31 @echo ' CHK $@' 32 32 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ 33 - "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)" 33 + "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)"
+4 -4
scripts/Kbuild.include
··· 75 75 # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) 76 76 77 77 as-option = $(call try-run,\ 78 - $(CC) $(CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2)) 78 + $(CC) $(KBUILD_CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2)) 79 79 80 80 # as-instr 81 81 # Usage: cflags-y += $(call as-instr,instr,option1,option2) 82 82 83 83 as-instr = $(call try-run,\ 84 - echo -e "$(1)" | $(CC) $(AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3)) 84 + echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3)) 85 85 86 86 # cc-option 87 87 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) 88 88 89 89 cc-option = $(call try-run,\ 90 - $(CC) $(CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",$(1),$(2)) 90 + $(CC) $(KBUILD_CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",$(1),$(2)) 91 91 92 92 # cc-option-yn 93 93 # Usage: flag := $(call cc-option-yn,-march=winchip-c6) 94 94 cc-option-yn = $(call try-run,\ 95 - $(CC) $(CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",y,n) 95 + $(CC) $(KBUILD_CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",y,n) 96 96 97 97 # cc-option-align 98 98 # Prefix align with either -falign or -malign
+16 -27
scripts/Makefile.build
··· 22 22 EXTRA_CFLAGS := 23 23 EXTRA_CPPFLAGS := 24 24 EXTRA_LDFLAGS := 25 + asflags-y := 26 + ccflags-y := 27 + cppflags-y := 28 + ldflags-y := 25 29 26 30 # Read .config if it exist, otherwise ignore 27 31 -include include/config/auto.conf 28 32 29 33 include scripts/Kbuild.include 30 34 35 + # For backward compatibility check that these variables does not change 36 + save-cflags := $(CFLAGS) 37 + 31 38 # The filename Kbuild has precedence over Makefile 32 39 kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) 33 - include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile) 40 + kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile) 41 + include $(kbuild-file) 34 42 43 + # If the save-* variables changed error out 44 + ifeq ($(KBUILD_NOPEDANTIC),) 45 + ifneq ("$(save-cflags)","$(CFLAGS)") 46 + $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS) 47 + endif 48 + endif 35 49 include scripts/Makefile.lib 36 50 37 51 ifdef host-progs ··· 67 53 # Create directories for object files if directory does not exist 68 54 # Needed when obj-y := dir/file.o syntax is used 69 55 _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) 70 - endif 71 - 72 - 73 - ifdef EXTRA_TARGETS 74 - $(warning kbuild: $(obj)/Makefile - Usage of EXTRA_TARGETS is obsolete in 2.6. Please fix!) 75 - endif 76 - 77 - ifdef build-targets 78 - $(warning kbuild: $(obj)/Makefile - Usage of build-targets is obsolete in 2.6. Please fix!) 79 - endif 80 - 81 - ifdef export-objs 82 - $(warning kbuild: $(obj)/Makefile - Usage of export-objs is obsolete in 2.6. Please fix!) 83 - endif 84 - 85 - ifdef O_TARGET 86 - $(warning kbuild: $(obj)/Makefile - Usage of O_TARGET := $(O_TARGET) is obsolete in 2.6. Please fix!) 87 - endif 88 - 89 - ifdef L_TARGET 90 - $(error kbuild: $(obj)/Makefile - Use of L_TARGET is replaced by lib-y in 2.6. Please fix!) 91 - endif 92 - 93 - ifdef list-multi 94 - $(warning kbuild: $(obj)/Makefile - list-multi := $(list-multi) is obsolete in 2.6. Please fix!) 95 56 endif 96 57 97 58 ifndef obj ··· 280 291 # 281 292 ifdef lib-target 282 293 quiet_cmd_link_l_target = AR $@ 283 - cmd_link_l_target = rm -f $@; $(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-y) 294 + cmd_link_l_target = rm -f $@; $(AR) rcs $@ $(lib-y) 284 295 285 296 $(lib-target): $(lib-y) FORCE 286 297 $(call if_changed,link_l_target)
+1 -1
scripts/Makefile.clean
··· 40 40 # build a list of files to remove, usually releative to the current 41 41 # directory 42 42 43 - __clean-files := $(extra-y) $(EXTRA_TARGETS) $(always) \ 43 + __clean-files := $(extra-y) $(always) \ 44 44 $(targets) $(clean-files) \ 45 45 $(host-progs) \ 46 46 $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
+17 -13
scripts/Makefile.lib
··· 1 - # Backward compatibility - to be removed... 2 - extra-y += $(EXTRA_TARGETS) 1 + # Backward compatibility 2 + asflags-y += $(EXTRA_AFLAGS) 3 + ccflags-y += $(EXTRA_CFLAGS) 4 + cppflags-y += $(EXTRA_CPPFLAGS) 5 + ldflags-y += $(EXTRA_LDFLAGS) 6 + 3 7 # Figure out what we need to build from the various variables 4 8 # =========================================================================== 5 9 ··· 48 44 multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y))) 49 45 multi-objs := $(multi-objs-y) $(multi-objs-m) 50 46 51 - # $(subdir-obj-y) is the list of objects in $(obj-y) which do not live 52 - # in the local directory 53 - subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o))) 47 + # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to 48 + # tell kbuild to descend 49 + subdir-obj-y := $(filter %/built-in.o, $(obj-y)) 54 50 55 51 # $(obj-dirs) is a list of directories that contain object files 56 52 obj-dirs := $(dir $(multi-objs) $(subdir-obj-y)) ··· 90 86 modname_flags = $(if $(filter 1,$(words $(modname))),\ 91 87 -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") 92 88 93 - _c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(basetarget).o) 94 - _a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) 95 - _cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F)) 89 + _c_flags = $(KBUILD_CFLAGS) $(ccflags-y) $(CFLAGS_$(basetarget).o) 90 + _a_flags = $(KBUILD_AFLAGS) $(asflags-y) $(AFLAGS_$(basetarget).o) 91 + _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) 96 92 97 93 # If building the kernel in a separate objtree expand all occurrences 98 94 # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). ··· 112 108 __cpp_flags = $(call flags,_cpp_flags) 113 109 endif 114 110 115 - c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ 111 + c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ 116 112 $(__c_flags) $(modkern_cflags) \ 117 113 -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) 118 114 119 - a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ 115 + a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ 120 116 $(__a_flags) $(modkern_aflags) 121 117 122 118 cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) 123 119 124 - ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) 120 + ld_flags = $(LDFLAGS) $(ldflags-y) 125 121 126 122 # Finds the multi-part object the current object will be linked into 127 123 modname-multi = $(sort $(foreach m,$(multi-used),\ ··· 144 140 # target: source(s) FORCE 145 141 # $(if_changed,ld/objcopy/gzip) 146 142 # 147 - # and add target to EXTRA_TARGETS so that we know we have to 143 + # and add target to extra-y so that we know we have to 148 144 # read in the saved command line 149 145 150 146 # Linking 151 147 # --------------------------------------------------------------------------- 152 148 153 149 quiet_cmd_ld = LD $@ 154 - cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \ 150 + cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \ 155 151 $(filter-out FORCE,$^) -o $@ 156 152 157 153 # Objcopy
+4 -4
scripts/basic/Makefile
··· 1 1 ### 2 - # Makefile.basic list the most basic programs used during the build process. 3 - # The programs listed herein is what is needed to do the basic stuff, 4 - # such as fix dependency file. 2 + # Makefile.basic lists the most basic programs used during the build process. 3 + # The programs listed herein are what are needed to do the basic stuff, 4 + # such as fix file dependencies. 5 5 # This initial step is needed to avoid files to be recompiled 6 6 # when kernel configuration changes (which is what happens when 7 7 # .config is included by main Makefile. 8 8 # --------------------------------------------------------------------------- 9 9 # fixdep: Used to generate dependency information during build process 10 - # docproc: Used in Documentation/docbook 10 + # docproc: Used in Documentation/DocBook 11 11 12 12 hostprogs-y := fixdep docproc 13 13 always := $(hostprogs-y)
+18 -16
scripts/basic/docproc.c
··· 10 10 * documentation-frontend 11 11 * Scans the template file and call kernel-doc for 12 12 * all occurrences of ![EIF]file 13 - * Beforehand each referenced file are scanned for 14 - * any exported sympols "EXPORT_SYMBOL()" statements. 13 + * Beforehand each referenced file is scanned for 14 + * any symbols that are exported via these macros: 15 + * EXPORT_SYMBOL(), EXPORT_SYMBOL_GPL(), & 16 + * EXPORT_SYMBOL_GPL_FUTURE() 15 17 * This is used to create proper -function and 16 18 * -nofunction arguments in calls to kernel-doc. 17 19 * Usage: docproc doc file.tmpl ··· 75 73 } 76 74 77 75 /* 78 - * Execute kernel-doc with parameters givin in svec 76 + * Execute kernel-doc with parameters given in svec 79 77 */ 80 78 void exec_kernel_doc(char **svec) 81 79 { ··· 84 82 char real_filename[PATH_MAX + 1]; 85 83 /* Make sure output generated so far are flushed */ 86 84 fflush(stdout); 87 - switch(pid=fork()) { 85 + switch (pid=fork()) { 88 86 case -1: 89 87 perror("fork"); 90 88 exit(1); ··· 135 133 symfilelist[symfilecnt++].filename = strdup(filename); 136 134 return &symfilelist[symfilecnt - 1]; 137 135 } 136 + 138 137 /* Check if file already are present in the list */ 139 138 struct symfile * filename_exist(char * filename) 140 139 { ··· 159 156 void printline(char * line) { printf("%s", line); } 160 157 161 158 /* 162 - * Find all symbols exported with EXPORT_SYMBOL and EXPORT_SYMBOL_GPL 163 - * in filename. 159 + * Find all symbols in filename that are exported with EXPORT_SYMBOL & 160 + * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly). 164 161 * All symbols located are stored in symfilelist. 165 162 */ 166 163 void find_export_symbols(char * filename) ··· 182 179 perror(real_filename); 183 180 exit(1); 184 181 } 185 - while(fgets(line, MAXLINESZ, fp)) { 182 + while (fgets(line, MAXLINESZ, fp)) { 186 183 char *p; 187 184 char *e; 188 - if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || 189 - ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { 185 + if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) || 186 + ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) { 190 187 /* Skip EXPORT_SYMBOL{_GPL} */ 191 188 while (isalnum(*p) || *p == '_') 192 189 p++; 193 - /* Remove paranteses and additional ws */ 190 + /* Remove parentheses & additional whitespace */ 194 191 while (isspace(*p)) 195 192 p++; 196 193 if (*p != '(') ··· 214 211 * Document all external or internal functions in a file. 215 212 * Call kernel-doc with following parameters: 216 213 * kernel-doc -docbook -nofunction function_name1 filename 217 - * function names are obtained from all the src files 214 + * Function names are obtained from all the src files 218 215 * by find_export_symbols. 219 216 * intfunc uses -nofunction 220 217 * extfunc uses -function ··· 265 262 vec[idx++] = KERNELDOC; 266 263 vec[idx++] = DOCBOOK; 267 264 268 - /* Split line up in individual parameters preceeded by FUNCTION */ 265 + /* Split line up in individual parameters preceded by FUNCTION */ 269 266 for (i=0; line[i]; i++) { 270 267 if (isspace(line[i])) { 271 268 line[i] = '\0'; ··· 295 292 { 296 293 char line[MAXLINESZ]; 297 294 char * s; 298 - while(fgets(line, MAXLINESZ, infile)) { 295 + while (fgets(line, MAXLINESZ, infile)) { 299 296 if (line[0] == '!') { 300 297 s = line + 2; 301 298 switch (line[1]) { ··· 354 351 { 355 352 /* Need to do this in two passes. 356 353 * First pass is used to collect all symbols exported 357 - * in the various files. 354 + * in the various files; 358 355 * Second pass generate the documentation. 359 - * This is required because function are declared 356 + * This is required because some functions are declared 360 357 * and exported in different files :-(( 361 358 */ 362 359 /* Collect symbols */ ··· 399 396 fflush(stdout); 400 397 return exitstatus; 401 398 } 402 -
+59
scripts/checkkconfigsymbols.sh
··· 1 + #!/bin/sh 2 + # Find Kconfig variables used in source code but never defined in Kconfig 3 + # Copyright (C) 2007, Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> 4 + 5 + # Tested with dash. 6 + paths="$@" 7 + [ -z "$paths" ] && paths=. 8 + 9 + # Doing this once at the beginning saves a lot of time, on a cache-hot tree. 10 + Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`" 11 + 12 + echo -e "File list \tundefined symbol used" 13 + find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i 14 + do 15 + # Output the bare Kconfig variable and the filename; the _MODULE part at 16 + # the end is not removed here (would need perl an not-hungry regexp for that). 17 + sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Z_]\+\).*!\2 '$i'!p' < $i 18 + done | \ 19 + # Smart "sort|uniq" implemented in awk and tuned to collect the names of all 20 + # files which use a given symbol 21 + awk '{map[$1, count[$1]++] = $2; } 22 + END { 23 + for (combIdx in map) { 24 + split(combIdx, separate, SUBSEP); 25 + # The value may have been removed. 26 + if (! ( (separate[1], separate[2]) in map ) ) 27 + continue; 28 + symb=separate[1]; 29 + printf "%s ", symb; 30 + #Use gawk extension to delete the names vector 31 + delete names; 32 + #Portably delete the names vector 33 + #split("", names); 34 + for (i=0; i < count[symb]; i++) { 35 + names[map[symb, i]] = 1; 36 + # Unfortunately, we may still encounter symb, i in the 37 + # outside iteration. 38 + delete map[symb, i]; 39 + } 40 + i=0; 41 + for (name in names) { 42 + if (i > 0) 43 + printf ", %s", name; 44 + else 45 + printf "%s", name; 46 + i++; 47 + } 48 + printf "\n"; 49 + } 50 + }' | 51 + while read symb files; do 52 + # Remove the _MODULE suffix when checking the variable name. This should 53 + # be done only on tristate symbols, actually, but Kconfig parsing is 54 + # beyond the purpose of this script. 55 + symb_bare=`echo $symb | sed -e 's/_MODULE//'` 56 + if ! grep -q "\<$symb_bare\>" $Kconfigs; then 57 + echo -e "$files: \t$symb" 58 + fi 59 + done|sort
+5 -5
scripts/export_report.pl
··· 103 103 my $state=0; 104 104 while ( <MODULE_MODULE> ) { 105 105 chomp; 106 - if ($state eq 0) { 106 + if ($state == 0) { 107 107 $state = 1 if ($_ =~ /static const struct modversion_info/); 108 108 next; 109 109 } 110 - if ($state eq 1) { 110 + if ($state == 1) { 111 111 $state = 2 if ($_ =~ /__attribute__\(\(section\("__versions"\)\)\)/); 112 112 next; 113 113 } 114 - if ($state eq 2) { 115 - if ( $_ !~ /0x[0-9a-f]{7,8},/ ) { 114 + if ($state == 2) { 115 + if ( $_ !~ /0x[0-9a-f]+,/ ) { 116 116 next; 117 117 } 118 118 my $sym = (split /([,"])/,)[4]; ··· 121 121 push(@{$MODULE{$thismod}} , $sym); 122 122 } 123 123 } 124 - if ($state ne 2) { 124 + if ($state != 2) { 125 125 print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n"; 126 126 } 127 127 close(MODULE_MODULE);
+7 -1
scripts/gcc-version.sh
··· 9 9 # gcc-2.95.3, `030301' for gcc-3.3.1, etc. 10 10 # 11 11 12 - if [ $1 = "-p" ] ; then with_patchlevel=1; shift; fi 12 + if [[ $1 = "-p" ]] ; then with_patchlevel=1; shift; fi 13 13 14 14 compiler="$*" 15 + 16 + if [ ${#compiler} -eq 0 ]; then 17 + echo "Error: No compiler specified." 18 + echo -e "Usage:\n\t$0 <gcc-command>" 19 + exit 1 20 + fi 15 21 16 22 MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1) 17 23 MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
+6 -2
scripts/genksyms/Makefile
··· 23 23 24 24 $(obj)/keywords.c: $(obj)/keywords.gperf FORCE 25 25 $(call if_changed,keywords.c) 26 + cp $@ $@_shipped 26 27 27 28 # flex 28 29 29 30 quiet_cmd_lex.c = FLEX $@ 30 - cmd_lex.c = flex -o$@ -d $(filter-out FORCE,$^) 31 + cmd_lex.c = flex -o$@ -d $< $(obj)/parse.h 31 32 32 - $(obj)/lex.c: $(obj)/lex.l $(obj)/parse.h FORCE 33 + $(obj)/lex.c: $(obj)/lex.l $(obj)/parse.h $(obj)/keywords.c FORCE 33 34 $(call if_changed,lex.c) 35 + cp $@ $@_shipped 34 36 35 37 # bison 36 38 ··· 41 39 42 40 $(obj)/parse.c: $(obj)/parse.y FORCE 43 41 $(call if_changed,parse.c) 42 + cp $@ $@_shipped 43 + cp $(@:.c=.h) $(@:.c=.h)_shipped 44 44 45 45 $(obj)/parse.h: $(obj)/parse.c ; 46 46
+96 -96
scripts/genksyms/keywords.c_shipped
··· 1 - /* ANSI-C code produced by gperf version 3.0.1 */ 1 + /* ANSI-C code produced by gperf version 3.0.2 */ 2 2 /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ 3 3 4 4 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ ··· 32 32 33 33 #line 3 "scripts/genksyms/keywords.gperf" 34 34 struct resword { const char *name; int token; }; 35 - /* maximum key range = 68, duplicates = 0 */ 35 + /* maximum key range = 62, duplicates = 0 */ 36 36 37 37 #ifdef __GNUC__ 38 38 __inline ··· 46 46 { 47 47 static const unsigned char asso_values[] = 48 48 { 49 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 50 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 51 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 52 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 53 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 54 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 55 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 0, 56 - 71, 71, 71, 71, 71, 71, 35, 71, 71, 71, 57 - 5, 71, 71, 71, 71, 71, 71, 71, 71, 71, 58 - 71, 71, 71, 71, 71, 0, 71, 0, 71, 5, 59 - 5, 0, 10, 20, 71, 25, 71, 71, 20, 0, 60 - 20, 30, 25, 71, 10, 5, 0, 20, 15, 71, 61 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 62 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 63 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 64 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 66 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 67 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 68 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 69 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 70 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 72 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 73 - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 74 - 71, 71, 71, 71, 71, 71 49 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 50 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 51 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 52 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 53 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 54 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 55 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 5, 56 + 65, 65, 65, 65, 65, 65, 35, 65, 65, 65, 57 + 0, 65, 65, 65, 65, 65, 65, 65, 65, 65, 58 + 65, 65, 65, 65, 65, 0, 65, 0, 65, 5, 59 + 20, 15, 10, 30, 65, 15, 65, 65, 20, 0, 60 + 10, 35, 20, 65, 10, 5, 0, 10, 5, 65, 61 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 62 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 63 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 64 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 67 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 68 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 69 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 70 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 71 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 72 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 73 + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 74 + 65, 65, 65, 65, 65, 65 75 75 }; 76 76 return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; 77 77 } ··· 84 84 { 85 85 enum 86 86 { 87 - TOTAL_KEYWORDS = 42, 87 + TOTAL_KEYWORDS = 43, 88 88 MIN_WORD_LENGTH = 3, 89 89 MAX_WORD_LENGTH = 24, 90 90 MIN_HASH_VALUE = 3, 91 - MAX_HASH_VALUE = 70 91 + MAX_HASH_VALUE = 64 92 92 }; 93 93 94 94 static const struct resword wordlist[] = 95 95 { 96 96 {""}, {""}, {""}, 97 - #line 25 "scripts/genksyms/keywords.gperf" 97 + #line 26 "scripts/genksyms/keywords.gperf" 98 98 {"asm", ASM_KEYW}, 99 99 {""}, 100 100 #line 8 "scripts/genksyms/keywords.gperf" ··· 102 102 {""}, 103 103 #line 9 "scripts/genksyms/keywords.gperf" 104 104 {"__asm__", ASM_KEYW}, 105 - {""}, 106 - #line 22 "scripts/genksyms/keywords.gperf" 107 - {"_restrict", RESTRICT_KEYW}, 108 - #line 51 "scripts/genksyms/keywords.gperf" 105 + {""}, {""}, 106 + #line 52 "scripts/genksyms/keywords.gperf" 109 107 {"__typeof__", TYPEOF_KEYW}, 110 - #line 10 "scripts/genksyms/keywords.gperf" 111 - {"__attribute", ATTRIBUTE_KEYW}, 108 + {""}, 112 109 #line 12 "scripts/genksyms/keywords.gperf" 113 110 {"__const", CONST_KEYW}, 114 111 #line 11 "scripts/genksyms/keywords.gperf" 115 112 {"__attribute__", ATTRIBUTE_KEYW}, 116 113 #line 13 "scripts/genksyms/keywords.gperf" 117 114 {"__const__", CONST_KEYW}, 118 - #line 17 "scripts/genksyms/keywords.gperf" 119 - {"__signed__", SIGNED_KEYW}, 120 - #line 43 "scripts/genksyms/keywords.gperf" 121 - {"static", STATIC_KEYW}, 122 - {""}, 123 - #line 16 "scripts/genksyms/keywords.gperf" 124 - {"__signed", SIGNED_KEYW}, 125 - #line 31 "scripts/genksyms/keywords.gperf" 126 - {"char", CHAR_KEYW}, 127 - {""}, 128 - #line 44 "scripts/genksyms/keywords.gperf" 129 - {"struct", STRUCT_KEYW}, 130 - #line 23 "scripts/genksyms/keywords.gperf" 131 - {"__restrict__", RESTRICT_KEYW}, 132 - #line 24 "scripts/genksyms/keywords.gperf" 133 - {"restrict", RESTRICT_KEYW}, 134 - #line 34 "scripts/genksyms/keywords.gperf" 135 - {"enum", ENUM_KEYW}, 136 115 #line 18 "scripts/genksyms/keywords.gperf" 137 - {"__volatile", VOLATILE_KEYW}, 138 - #line 35 "scripts/genksyms/keywords.gperf" 139 - {"extern", EXTERN_KEYW}, 140 - #line 19 "scripts/genksyms/keywords.gperf" 116 + {"__signed__", SIGNED_KEYW}, 117 + #line 44 "scripts/genksyms/keywords.gperf" 118 + {"static", STATIC_KEYW}, 119 + #line 20 "scripts/genksyms/keywords.gperf" 141 120 {"__volatile__", VOLATILE_KEYW}, 142 - #line 38 "scripts/genksyms/keywords.gperf" 121 + #line 39 "scripts/genksyms/keywords.gperf" 143 122 {"int", INT_KEYW}, 144 - #line 7 "scripts/genksyms/keywords.gperf" 145 - {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, 146 123 #line 32 "scripts/genksyms/keywords.gperf" 147 - {"const", CONST_KEYW}, 124 + {"char", CHAR_KEYW}, 148 125 #line 33 "scripts/genksyms/keywords.gperf" 149 - {"double", DOUBLE_KEYW}, 126 + {"const", CONST_KEYW}, 127 + #line 45 "scripts/genksyms/keywords.gperf" 128 + {"struct", STRUCT_KEYW}, 129 + #line 24 "scripts/genksyms/keywords.gperf" 130 + {"__restrict__", RESTRICT_KEYW}, 131 + #line 25 "scripts/genksyms/keywords.gperf" 132 + {"restrict", RESTRICT_KEYW}, 133 + #line 23 "scripts/genksyms/keywords.gperf" 134 + {"_restrict", RESTRICT_KEYW}, 135 + #line 16 "scripts/genksyms/keywords.gperf" 136 + {"__inline__", INLINE_KEYW}, 137 + #line 10 "scripts/genksyms/keywords.gperf" 138 + {"__attribute", ATTRIBUTE_KEYW}, 150 139 {""}, 151 140 #line 14 "scripts/genksyms/keywords.gperf" 152 - {"__inline", INLINE_KEYW}, 153 - #line 30 "scripts/genksyms/keywords.gperf" 154 - {"auto", AUTO_KEYW}, 155 - #line 15 "scripts/genksyms/keywords.gperf" 156 - {"__inline__", INLINE_KEYW}, 157 - #line 42 "scripts/genksyms/keywords.gperf" 158 - {"signed", SIGNED_KEYW}, 141 + {"__extension__", EXTENSION_KEYW}, 142 + #line 35 "scripts/genksyms/keywords.gperf" 143 + {"enum", ENUM_KEYW}, 144 + #line 19 "scripts/genksyms/keywords.gperf" 145 + {"__volatile", VOLATILE_KEYW}, 146 + #line 36 "scripts/genksyms/keywords.gperf" 147 + {"extern", EXTERN_KEYW}, 159 148 {""}, 160 - #line 47 "scripts/genksyms/keywords.gperf" 161 - {"unsigned", UNSIGNED_KEYW}, 149 + #line 17 "scripts/genksyms/keywords.gperf" 150 + {"__signed", SIGNED_KEYW}, 151 + #line 7 "scripts/genksyms/keywords.gperf" 152 + {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, 162 153 {""}, 163 - #line 41 "scripts/genksyms/keywords.gperf" 164 - {"short", SHORT_KEYW}, 165 - #line 50 "scripts/genksyms/keywords.gperf" 154 + #line 51 "scripts/genksyms/keywords.gperf" 166 155 {"typeof", TYPEOF_KEYW}, 167 - #line 45 "scripts/genksyms/keywords.gperf" 156 + #line 46 "scripts/genksyms/keywords.gperf" 168 157 {"typedef", TYPEDEF_KEYW}, 158 + #line 15 "scripts/genksyms/keywords.gperf" 159 + {"__inline", INLINE_KEYW}, 160 + #line 31 "scripts/genksyms/keywords.gperf" 161 + {"auto", AUTO_KEYW}, 162 + #line 47 "scripts/genksyms/keywords.gperf" 163 + {"union", UNION_KEYW}, 164 + {""}, {""}, 165 + #line 48 "scripts/genksyms/keywords.gperf" 166 + {"unsigned", UNSIGNED_KEYW}, 169 167 #line 49 "scripts/genksyms/keywords.gperf" 168 + {"void", VOID_KEYW}, 169 + #line 42 "scripts/genksyms/keywords.gperf" 170 + {"short", SHORT_KEYW}, 171 + {""}, {""}, 172 + #line 50 "scripts/genksyms/keywords.gperf" 170 173 {"volatile", VOLATILE_KEYW}, 171 174 {""}, 172 - #line 36 "scripts/genksyms/keywords.gperf" 173 - {"float", FLOAT_KEYW}, 174 - {""}, {""}, 175 - #line 40 "scripts/genksyms/keywords.gperf" 176 - {"register", REGISTER_KEYW}, 177 - #line 48 "scripts/genksyms/keywords.gperf" 178 - {"void", VOID_KEYW}, 179 - {""}, 180 175 #line 37 "scripts/genksyms/keywords.gperf" 181 - {"inline", INLINE_KEYW}, 176 + {"float", FLOAT_KEYW}, 177 + #line 34 "scripts/genksyms/keywords.gperf" 178 + {"double", DOUBLE_KEYW}, 182 179 {""}, 183 180 #line 5 "scripts/genksyms/keywords.gperf" 184 181 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, 185 - {""}, 186 - #line 21 "scripts/genksyms/keywords.gperf" 187 - {"_Bool", BOOL_KEYW}, 188 - {""}, 182 + {""}, {""}, 183 + #line 38 "scripts/genksyms/keywords.gperf" 184 + {"inline", INLINE_KEYW}, 189 185 #line 6 "scripts/genksyms/keywords.gperf" 190 186 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, 191 - {""}, {""}, {""}, {""}, {""}, {""}, 192 - #line 39 "scripts/genksyms/keywords.gperf" 193 - {"long", LONG_KEYW}, 194 - {""}, {""}, {""}, {""}, {""}, 195 - #line 46 "scripts/genksyms/keywords.gperf" 196 - {"union", UNION_KEYW} 187 + #line 41 "scripts/genksyms/keywords.gperf" 188 + {"register", REGISTER_KEYW}, 189 + {""}, 190 + #line 22 "scripts/genksyms/keywords.gperf" 191 + {"_Bool", BOOL_KEYW}, 192 + #line 43 "scripts/genksyms/keywords.gperf" 193 + {"signed", SIGNED_KEYW}, 194 + {""}, {""}, 195 + #line 40 "scripts/genksyms/keywords.gperf" 196 + {"long", LONG_KEYW} 197 197 }; 198 198 199 199 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+1
scripts/genksyms/keywords.gperf
··· 11 11 __attribute__, ATTRIBUTE_KEYW 12 12 __const, CONST_KEYW 13 13 __const__, CONST_KEYW 14 + __extension__, EXTENSION_KEYW 14 15 __inline, INLINE_KEYW 15 16 __inline__, INLINE_KEYW 16 17 __signed, SIGNED_KEYW
+1157 -653
scripts/genksyms/lex.c_shipped
··· 1 1 #line 2 "scripts/genksyms/lex.c" 2 - /* A lexical scanner generated by flex */ 3 2 4 - /* Scanner skeleton version: 5 - * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ 6 - */ 3 + #line 4 "scripts/genksyms/lex.c" 4 + 5 + #define YY_INT_ALIGNED short int 6 + 7 + /* A lexical scanner generated by flex */ 7 8 8 9 #define FLEX_SCANNER 9 10 #define YY_FLEX_MAJOR_VERSION 2 10 11 #define YY_FLEX_MINOR_VERSION 5 12 + #define YY_FLEX_SUBMINOR_VERSION 33 13 + #if YY_FLEX_SUBMINOR_VERSION > 0 14 + #define FLEX_BETA 15 + #endif 11 16 17 + /* %if-c++-only */ 18 + /* %endif */ 19 + 20 + /* %if-c-only */ 21 + 22 + /* %endif */ 23 + 24 + /* %if-c-only */ 25 + 26 + /* %endif */ 27 + 28 + /* First, we deal with platform-specific or compiler-specific issues. */ 29 + 30 + /* begin standard C headers. */ 31 + /* %if-c-only */ 12 32 #include <stdio.h> 13 - #include <unistd.h> 33 + #include <string.h> 34 + #include <errno.h> 35 + #include <stdlib.h> 36 + /* %endif */ 14 37 38 + /* %if-tables-serialization */ 39 + /* %endif */ 40 + /* end standard C headers. */ 15 41 16 - /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 17 - #ifdef c_plusplus 18 - #ifndef __cplusplus 19 - #define __cplusplus 42 + /* %if-c-or-c++ */ 43 + /* flex integer type definitions */ 44 + 45 + #ifndef FLEXINT_H 46 + #define FLEXINT_H 47 + 48 + /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 49 + 50 + #if __STDC_VERSION__ >= 199901L 51 + 52 + /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 53 + * if you want the limit (max/min) macros for int types. 54 + */ 55 + #ifndef __STDC_LIMIT_MACROS 56 + #define __STDC_LIMIT_MACROS 1 20 57 #endif 58 + 59 + #include <inttypes.h> 60 + typedef int8_t flex_int8_t; 61 + typedef uint8_t flex_uint8_t; 62 + typedef int16_t flex_int16_t; 63 + typedef uint16_t flex_uint16_t; 64 + typedef int32_t flex_int32_t; 65 + typedef uint32_t flex_uint32_t; 66 + #else 67 + typedef signed char flex_int8_t; 68 + typedef short int flex_int16_t; 69 + typedef int flex_int32_t; 70 + typedef unsigned char flex_uint8_t; 71 + typedef unsigned short int flex_uint16_t; 72 + typedef unsigned int flex_uint32_t; 73 + #endif /* ! C99 */ 74 + 75 + /* Limits of integral types. */ 76 + #ifndef INT8_MIN 77 + #define INT8_MIN (-128) 78 + #endif 79 + #ifndef INT16_MIN 80 + #define INT16_MIN (-32767-1) 81 + #endif 82 + #ifndef INT32_MIN 83 + #define INT32_MIN (-2147483647-1) 84 + #endif 85 + #ifndef INT8_MAX 86 + #define INT8_MAX (127) 87 + #endif 88 + #ifndef INT16_MAX 89 + #define INT16_MAX (32767) 90 + #endif 91 + #ifndef INT32_MAX 92 + #define INT32_MAX (2147483647) 93 + #endif 94 + #ifndef UINT8_MAX 95 + #define UINT8_MAX (255U) 96 + #endif 97 + #ifndef UINT16_MAX 98 + #define UINT16_MAX (65535U) 99 + #endif 100 + #ifndef UINT32_MAX 101 + #define UINT32_MAX (4294967295U) 21 102 #endif 22 103 104 + #endif /* ! FLEXINT_H */ 105 + 106 + /* %endif */ 107 + 108 + /* %if-c++-only */ 109 + /* %endif */ 23 110 24 111 #ifdef __cplusplus 25 - 26 - #include <stdlib.h> 27 - 28 - /* Use prototypes in function declarations. */ 29 - #define YY_USE_PROTOS 30 112 31 113 /* The "const" storage-class-modifier is valid. */ 32 114 #define YY_USE_CONST ··· 117 35 118 36 #if __STDC__ 119 37 120 - #define YY_USE_PROTOS 121 38 #define YY_USE_CONST 122 39 123 40 #endif /* __STDC__ */ 124 41 #endif /* ! __cplusplus */ 125 - 126 - #ifdef __TURBOC__ 127 - #pragma warn -rch 128 - #pragma warn -use 129 - #include <io.h> 130 - #include <stdlib.h> 131 - #define YY_USE_CONST 132 - #define YY_USE_PROTOS 133 - #endif 134 42 135 43 #ifdef YY_USE_CONST 136 44 #define yyconst const ··· 128 56 #define yyconst 129 57 #endif 130 58 131 - 132 - #ifdef YY_USE_PROTOS 133 - #define YY_PROTO(proto) proto 134 - #else 135 - #define YY_PROTO(proto) () 136 - #endif 59 + /* %not-for-header */ 137 60 138 61 /* Returned upon end-of-file. */ 139 62 #define YY_NULL 0 63 + /* %ok-for-header */ 64 + 65 + /* %not-for-header */ 140 66 141 67 /* Promotes a possibly negative, possibly signed char to an unsigned 142 68 * integer for use as an array index. If the signed char is negative, ··· 142 72 * double cast. 143 73 */ 144 74 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 75 + /* %ok-for-header */ 76 + 77 + /* %if-reentrant */ 78 + /* %endif */ 79 + 80 + /* %if-not-reentrant */ 81 + 82 + /* %endif */ 145 83 146 84 /* Enter a start condition. This macro really ought to take a parameter, 147 85 * but we do it the disgusting crufty way forced on us by the ()-less 148 86 * definition of BEGIN. 149 87 */ 150 - #define BEGIN yy_start = 1 + 2 * 88 + #define BEGIN (yy_start) = 1 + 2 * 151 89 152 90 /* Translate the current start state into a value that can be later handed 153 91 * to BEGIN to return to the state. The YYSTATE alias is for lex 154 92 * compatibility. 155 93 */ 156 - #define YY_START ((yy_start - 1) / 2) 94 + #define YY_START (((yy_start) - 1) / 2) 157 95 #define YYSTATE YY_START 158 96 159 97 /* Action number for EOF rule of a given start state. */ 160 98 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 161 99 162 100 /* Special action meaning "start processing a new file". */ 163 - #define YY_NEW_FILE yyrestart( yyin ) 101 + #define YY_NEW_FILE yyrestart(yyin ) 164 102 165 103 #define YY_END_OF_BUFFER_CHAR 0 166 104 167 105 /* Size of default input buffer. */ 106 + #ifndef YY_BUF_SIZE 168 107 #define YY_BUF_SIZE 16384 108 + #endif 169 109 110 + /* The state buf must be large enough to hold one state per character in the main buffer. 111 + */ 112 + #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 113 + 114 + #ifndef YY_TYPEDEF_YY_BUFFER_STATE 115 + #define YY_TYPEDEF_YY_BUFFER_STATE 170 116 typedef struct yy_buffer_state *YY_BUFFER_STATE; 117 + #endif 171 118 119 + /* %if-not-reentrant */ 172 120 extern int yyleng; 121 + /* %endif */ 122 + 123 + /* %if-c-only */ 124 + /* %if-not-reentrant */ 173 125 extern FILE *yyin, *yyout; 126 + /* %endif */ 127 + /* %endif */ 174 128 175 129 #define EOB_ACT_CONTINUE_SCAN 0 176 130 #define EOB_ACT_END_OF_FILE 1 177 131 #define EOB_ACT_LAST_MATCH 2 178 132 179 - /* The funky do-while in the following #define is used to turn the definition 180 - * int a single C statement (which needs a semi-colon terminator). This 181 - * avoids problems with code like: 182 - * 183 - * if ( condition_holds ) 184 - * yyless( 5 ); 185 - * else 186 - * do_something_else(); 187 - * 188 - * Prior to using the do-while the compiler would get upset at the 189 - * "else" because it interpreted the "if" statement as being all 190 - * done when it reached the ';' after the yyless() call. 191 - */ 192 - 193 - /* Return all but the first 'n' matched characters back to the input stream. */ 194 - 133 + #define YY_LESS_LINENO(n) 134 + 135 + /* Return all but the first "n" matched characters back to the input stream. */ 195 136 #define yyless(n) \ 196 137 do \ 197 138 { \ 198 139 /* Undo effects of setting up yytext. */ \ 199 - *yy_cp = yy_hold_char; \ 140 + int yyless_macro_arg = (n); \ 141 + YY_LESS_LINENO(yyless_macro_arg);\ 142 + *yy_cp = (yy_hold_char); \ 200 143 YY_RESTORE_YY_MORE_OFFSET \ 201 - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 144 + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 202 145 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 203 146 } \ 204 147 while ( 0 ) 205 148 206 - #define unput(c) yyunput( c, yytext_ptr ) 149 + #define unput(c) yyunput( c, (yytext_ptr) ) 207 150 208 151 /* The following is because we cannot portably get our hands on size_t 209 152 * (without autoconf's help, which isn't available because we want 210 153 * flex-generated scanners to compile on their own). 211 154 */ 155 + 156 + #ifndef YY_TYPEDEF_YY_SIZE_T 157 + #define YY_TYPEDEF_YY_SIZE_T 212 158 typedef unsigned int yy_size_t; 159 + #endif 213 160 214 - 161 + #ifndef YY_STRUCT_YY_BUFFER_STATE 162 + #define YY_STRUCT_YY_BUFFER_STATE 215 163 struct yy_buffer_state 216 164 { 165 + /* %if-c-only */ 217 166 FILE *yy_input_file; 167 + /* %endif */ 168 + 169 + /* %if-c++-only */ 170 + /* %endif */ 218 171 219 172 char *yy_ch_buf; /* input buffer */ 220 173 char *yy_buf_pos; /* current position in input buffer */ ··· 271 178 */ 272 179 int yy_at_bol; 273 180 181 + int yy_bs_lineno; /**< The line count. */ 182 + int yy_bs_column; /**< The column count. */ 183 + 274 184 /* Whether to try to fill the input buffer when we reach the 275 185 * end of it. 276 186 */ 277 187 int yy_fill_buffer; 278 188 279 189 int yy_buffer_status; 190 + 280 191 #define YY_BUFFER_NEW 0 281 192 #define YY_BUFFER_NORMAL 1 282 193 /* When an EOF's been seen but there's still some text to process ··· 294 197 * just pointing yyin at a new input file. 295 198 */ 296 199 #define YY_BUFFER_EOF_PENDING 2 297 - }; 298 200 299 - static YY_BUFFER_STATE yy_current_buffer = 0; 201 + }; 202 + #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 203 + 204 + /* %if-c-only Standard (non-C++) definition */ 205 + /* %not-for-header */ 206 + 207 + /* %if-not-reentrant */ 208 + 209 + /* Stack of input buffers. */ 210 + static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 211 + static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 212 + static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 213 + /* %endif */ 214 + /* %ok-for-header */ 215 + 216 + /* %endif */ 300 217 301 218 /* We provide macros for accessing buffer states in case in the 302 219 * future we want to put the buffer states in a more general 303 220 * "scanner state". 221 + * 222 + * Returns the top of the stack, or NULL. 304 223 */ 305 - #define YY_CURRENT_BUFFER yy_current_buffer 224 + #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 225 + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 226 + : NULL) 306 227 228 + /* Same as previous macro, but useful when we know that the buffer stack is not 229 + * NULL or when we need an lvalue. For internal use only. 230 + */ 231 + #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 232 + 233 + /* %if-c-only Standard (non-C++) definition */ 234 + 235 + /* %if-not-reentrant */ 236 + /* %not-for-header */ 307 237 308 238 /* yy_hold_char holds the character lost when yytext is formed. */ 309 239 static char yy_hold_char; 310 - 311 240 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 312 - 313 - 314 241 int yyleng; 315 242 316 243 /* Points to current character in buffer. */ 317 244 static char *yy_c_buf_p = (char *) 0; 318 - static int yy_init = 1; /* whether we need to initialize */ 245 + static int yy_init = 0; /* whether we need to initialize */ 319 246 static int yy_start = 0; /* start state number */ 320 247 321 248 /* Flag which is used to allow yywrap()'s to do buffer switches 322 249 * instead of setting up a fresh yyin. A bit of a hack ... 323 250 */ 324 251 static int yy_did_buffer_switch_on_eof; 252 + /* %ok-for-header */ 325 253 326 - void yyrestart YY_PROTO(( FILE *input_file )); 254 + /* %endif */ 327 255 328 - void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 329 - void yy_load_buffer_state YY_PROTO(( void )); 330 - YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 331 - void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 332 - void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 333 - void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 334 - #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 256 + void yyrestart (FILE *input_file ); 257 + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 258 + YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); 259 + void yy_delete_buffer (YY_BUFFER_STATE b ); 260 + void yy_flush_buffer (YY_BUFFER_STATE b ); 261 + void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); 262 + void yypop_buffer_state (void ); 335 263 336 - YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 337 - YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 338 - YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 264 + static void yyensure_buffer_stack (void ); 265 + static void yy_load_buffer_state (void ); 266 + static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 339 267 340 - static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 341 - static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 342 - static void yy_flex_free YY_PROTO(( void * )); 268 + #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 269 + 270 + YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); 271 + YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 272 + YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); 273 + 274 + /* %endif */ 275 + 276 + void *yyalloc (yy_size_t ); 277 + void *yyrealloc (void *,yy_size_t ); 278 + void yyfree (void * ); 343 279 344 280 #define yy_new_buffer yy_create_buffer 345 281 346 282 #define yy_set_interactive(is_interactive) \ 347 283 { \ 348 - if ( ! yy_current_buffer ) \ 349 - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 350 - yy_current_buffer->yy_is_interactive = is_interactive; \ 284 + if ( ! YY_CURRENT_BUFFER ){ \ 285 + yyensure_buffer_stack (); \ 286 + YY_CURRENT_BUFFER_LVALUE = \ 287 + yy_create_buffer(yyin,YY_BUF_SIZE ); \ 288 + } \ 289 + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 351 290 } 352 291 353 292 #define yy_set_bol(at_bol) \ 354 293 { \ 355 - if ( ! yy_current_buffer ) \ 356 - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 357 - yy_current_buffer->yy_at_bol = at_bol; \ 294 + if ( ! YY_CURRENT_BUFFER ){\ 295 + yyensure_buffer_stack (); \ 296 + YY_CURRENT_BUFFER_LVALUE = \ 297 + yy_create_buffer(yyin,YY_BUF_SIZE ); \ 298 + } \ 299 + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 358 300 } 359 301 360 - #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 302 + #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 361 303 304 + /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ 305 + /* Begin user sect3 */ 362 306 363 307 #define yywrap() 1 364 308 #define YY_SKIP_YYWRAP 365 309 366 310 #define FLEX_DEBUG 311 + 367 312 typedef unsigned char YY_CHAR; 313 + 368 314 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 315 + 369 316 typedef int yy_state_type; 370 317 371 - #define FLEX_DEBUG 318 + extern int yylineno; 319 + 320 + int yylineno = 1; 321 + 372 322 extern char *yytext; 373 323 #define yytext_ptr yytext 374 324 375 - static yy_state_type yy_get_previous_state YY_PROTO(( void )); 376 - static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 377 - static int yy_get_next_buffer YY_PROTO(( void )); 378 - static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 325 + /* %if-c-only Standard (non-C++) definition */ 326 + 327 + static yy_state_type yy_get_previous_state (void ); 328 + static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 329 + static int yy_get_next_buffer (void ); 330 + static void yy_fatal_error (yyconst char msg[] ); 331 + 332 + /* %endif */ 379 333 380 334 /* Done after the current pattern has been matched and before the 381 335 * corresponding action - sets up yytext. 382 336 */ 383 337 #define YY_DO_BEFORE_ACTION \ 384 - yytext_ptr = yy_bp; \ 385 - yyleng = (int) (yy_cp - yy_bp); \ 386 - yy_hold_char = *yy_cp; \ 338 + (yytext_ptr) = yy_bp; \ 339 + /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ 340 + yyleng = (size_t) (yy_cp - yy_bp); \ 341 + (yy_hold_char) = *yy_cp; \ 387 342 *yy_cp = '\0'; \ 388 - yy_c_buf_p = yy_cp; 343 + /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ 344 + (yy_c_buf_p) = yy_cp; 389 345 346 + /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ 390 347 #define YY_NUM_RULES 13 391 348 #define YY_END_OF_BUFFER 14 392 - static yyconst short int yy_accept[76] = 349 + /* This struct is not used in this scanner, 350 + but its presence is necessary. */ 351 + struct yy_trans_info 352 + { 353 + flex_int32_t yy_verify; 354 + flex_int32_t yy_nxt; 355 + }; 356 + static yyconst flex_int16_t yy_accept[76] = 393 357 { 0, 394 358 0, 0, 0, 0, 14, 12, 4, 3, 12, 7, 395 359 12, 12, 7, 12, 12, 12, 12, 12, 9, 9, ··· 462 304 0, 0, 0, 1, 0 463 305 } ; 464 306 465 - static yyconst int yy_ec[256] = 307 + static yyconst flex_int32_t yy_ec[256] = 466 308 { 0, 467 309 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 468 310 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, ··· 494 336 1, 1, 1, 1, 1 495 337 } ; 496 338 497 - static yyconst int yy_meta[29] = 339 + static yyconst flex_int32_t yy_meta[29] = 498 340 { 0, 499 341 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 500 342 4, 4, 5, 6, 6, 6, 1, 1, 1, 7, 501 343 8, 7, 3, 3, 3, 1, 3, 1 502 344 } ; 503 345 504 - static yyconst short int yy_base[88] = 346 + static yyconst flex_int16_t yy_base[88] = 505 347 { 0, 506 348 0, 147, 21, 140, 145, 284, 39, 284, 26, 0, 507 349 32, 126, 40, 44, 115, 35, 36, 46, 50, 53, ··· 514 356 246, 250, 255, 256, 261, 267, 275 515 357 } ; 516 358 517 - static yyconst short int yy_def[88] = 359 + static yyconst flex_int16_t yy_def[88] = 518 360 { 0, 519 361 75, 1, 1, 3, 75, 75, 75, 75, 76, 77, 520 362 78, 75, 77, 79, 75, 75, 75, 75, 75, 19, ··· 527 369 75, 75, 75, 75, 75, 75, 75 528 370 } ; 529 371 530 - static yyconst short int yy_nxt[313] = 372 + static yyconst flex_int16_t yy_nxt[313] = 531 373 { 0, 532 374 6, 7, 8, 7, 9, 6, 10, 6, 6, 11, 533 375 6, 6, 12, 6, 6, 6, 6, 6, 6, 10, ··· 566 408 75, 75 567 409 } ; 568 410 569 - static yyconst short int yy_chk[313] = 411 + static yyconst flex_int16_t yy_chk[313] = 570 412 { 0, 571 413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 572 414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ··· 611 453 extern int yy_flex_debug; 612 454 int yy_flex_debug = 1; 613 455 614 - static yyconst short int yy_rule_linenum[13] = 456 + static yyconst flex_int16_t yy_rule_linenum[13] = 615 457 { 0, 616 458 69, 70, 71, 74, 77, 78, 79, 85, 86, 87, 617 459 89, 92 ··· 626 468 #define YY_RESTORE_YY_MORE_OFFSET 627 469 char *yytext; 628 470 #line 1 "scripts/genksyms/lex.l" 629 - #define INITIAL 0 630 471 /* Lexical analysis for genksyms. 631 472 Copyright 1996, 1997 Linux International. 632 473 ··· 663 506 664 507 /* Version 2 checksumming does proper tokenization; version 1 wasn't 665 508 quite so pedantic. */ 666 - #define V2_TOKENS 1 667 509 668 510 /* We don't do multiple input files. */ 669 - #line 513 "scripts/genksyms/lex.c" 511 + #line 669 "scripts/genksyms/lex.c" 512 + 513 + #define INITIAL 0 514 + #define V2_TOKENS 1 515 + 516 + #ifndef YY_NO_UNISTD_H 517 + /* Special case for "unistd.h", since it is non-ANSI. We include it way 518 + * down here because we want the user's section 1 to have been scanned first. 519 + * The user has a chance to override it with an option. 520 + */ 521 + /* %if-c-only */ 522 + #include <unistd.h> 523 + /* %endif */ 524 + /* %if-c++-only */ 525 + /* %endif */ 526 + #endif 527 + 528 + #ifndef YY_EXTRA_TYPE 529 + #define YY_EXTRA_TYPE void * 530 + #endif 531 + 532 + /* %if-c-only Reentrant structure and macros (non-C++). */ 533 + /* %if-reentrant */ 534 + /* %if-c-only */ 535 + 536 + static int yy_init_globals (void ); 537 + 538 + /* %endif */ 539 + /* %if-reentrant */ 540 + /* %endif */ 541 + /* %if-bison-bridge */ 542 + /* %endif */ 543 + /* %endif End reentrant structures and macros. */ 670 544 671 545 /* Macros after this point can all be overridden by user definitions in 672 546 * section 1. ··· 705 517 706 518 #ifndef YY_SKIP_YYWRAP 707 519 #ifdef __cplusplus 708 - extern "C" int yywrap YY_PROTO(( void )); 520 + extern "C" int yywrap (void ); 709 521 #else 710 - extern int yywrap YY_PROTO(( void )); 522 + extern int yywrap (void ); 711 523 #endif 712 524 #endif 713 525 714 - #ifndef YY_NO_UNPUT 715 - static void yyunput YY_PROTO(( int c, char *buf_ptr )); 716 - #endif 526 + /* %not-for-header */ 527 + 528 + static void yyunput (int c,char *buf_ptr ); 529 + 530 + /* %ok-for-header */ 531 + 532 + /* %endif */ 717 533 718 534 #ifndef yytext_ptr 719 - static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 535 + static void yy_flex_strncpy (char *,yyconst char *,int ); 720 536 #endif 721 537 722 538 #ifdef YY_NEED_STRLEN 723 - static int yy_flex_strlen YY_PROTO(( yyconst char * )); 539 + static int yy_flex_strlen (yyconst char * ); 724 540 #endif 725 541 726 542 #ifndef YY_NO_INPUT 543 + /* %if-c-only Standard (non-C++) definition */ 544 + /* %not-for-header */ 545 + 727 546 #ifdef __cplusplus 728 - static int yyinput YY_PROTO(( void )); 547 + static int yyinput (void ); 729 548 #else 730 - static int input YY_PROTO(( void )); 549 + static int input (void ); 731 550 #endif 551 + /* %ok-for-header */ 552 + 553 + /* %endif */ 732 554 #endif 733 555 734 - #if YY_STACK_USED 735 - static int yy_start_stack_ptr = 0; 736 - static int yy_start_stack_depth = 0; 737 - static int *yy_start_stack = 0; 738 - #ifndef YY_NO_PUSH_STATE 739 - static void yy_push_state YY_PROTO(( int new_state )); 740 - #endif 741 - #ifndef YY_NO_POP_STATE 742 - static void yy_pop_state YY_PROTO(( void )); 743 - #endif 744 - #ifndef YY_NO_TOP_STATE 745 - static int yy_top_state YY_PROTO(( void )); 746 - #endif 556 + /* %if-c-only */ 747 557 748 - #else 749 - #define YY_NO_PUSH_STATE 1 750 - #define YY_NO_POP_STATE 1 751 - #define YY_NO_TOP_STATE 1 752 - #endif 753 - 754 - #ifdef YY_MALLOC_DECL 755 - YY_MALLOC_DECL 756 - #else 757 - #if __STDC__ 758 - #ifndef __cplusplus 759 - #include <stdlib.h> 760 - #endif 761 - #else 762 - /* Just try to get by without declaring the routines. This will fail 763 - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 764 - * or sizeof(void*) != sizeof(int). 765 - */ 766 - #endif 767 - #endif 558 + /* %endif */ 768 559 769 560 /* Amount of stuff to slurp up with each read. */ 770 561 #ifndef YY_READ_BUF_SIZE ··· 751 584 #endif 752 585 753 586 /* Copy whatever the last rule matched to the standard output. */ 754 - 755 587 #ifndef ECHO 588 + /* %if-c-only Standard (non-C++) definition */ 756 589 /* This used to be an fputs(), but since the string might contain NUL's, 757 590 * we now use fwrite(). 758 591 */ 759 592 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 593 + /* %endif */ 594 + /* %if-c++-only C++ definition */ 595 + /* %endif */ 760 596 #endif 761 597 762 598 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, ··· 767 597 */ 768 598 #ifndef YY_INPUT 769 599 #define YY_INPUT(buf,result,max_size) \ 770 - if ( yy_current_buffer->yy_is_interactive ) \ 600 + /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ 601 + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 771 602 { \ 772 - int c = '*', n; \ 603 + int c = '*'; \ 604 + size_t n; \ 773 605 for ( n = 0; n < max_size && \ 774 606 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 775 607 buf[n] = (char) c; \ ··· 781 609 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 782 610 result = n; \ 783 611 } \ 784 - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 785 - && ferror( yyin ) ) \ 786 - YY_FATAL_ERROR( "input in flex scanner failed" ); 612 + else \ 613 + { \ 614 + errno=0; \ 615 + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 616 + { \ 617 + if( errno != EINTR) \ 618 + { \ 619 + YY_FATAL_ERROR( "input in flex scanner failed" ); \ 620 + break; \ 621 + } \ 622 + errno=0; \ 623 + clearerr(yyin); \ 624 + } \ 625 + }\ 626 + \ 627 + /* %if-c++-only C++ definition \ */\ 628 + /* %endif */ 629 + 787 630 #endif 788 631 789 632 /* No semi-colon after return; correct usage is to write "yyterminate();" - ··· 816 629 817 630 /* Report a fatal error. */ 818 631 #ifndef YY_FATAL_ERROR 632 + /* %if-c-only */ 819 633 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 634 + /* %endif */ 635 + /* %if-c++-only */ 636 + /* %endif */ 820 637 #endif 638 + 639 + /* %if-tables-serialization structures and prototypes */ 640 + /* %not-for-header */ 641 + 642 + /* %ok-for-header */ 643 + 644 + /* %not-for-header */ 645 + 646 + /* %tables-yydmap generated elements */ 647 + /* %endif */ 648 + /* end tables serialization structures and prototypes */ 649 + 650 + /* %ok-for-header */ 821 651 822 652 /* Default declaration of generated scanner - a define so the user can 823 653 * easily add parameters. 824 654 */ 825 655 #ifndef YY_DECL 826 - #define YY_DECL int yylex YY_PROTO(( void )) 827 - #endif 656 + #define YY_DECL_IS_OURS 1 657 + /* %if-c-only Standard (non-C++) definition */ 658 + 659 + extern int yylex (void); 660 + 661 + #define YY_DECL int yylex (void) 662 + /* %endif */ 663 + /* %if-c++-only C++ definition */ 664 + /* %endif */ 665 + #endif /* !YY_DECL */ 828 666 829 667 /* Code executed at the beginning of each rule, after yytext and yyleng 830 668 * have been set up. ··· 863 651 #define YY_BREAK break; 864 652 #endif 865 653 654 + /* %% [6.0] YY_RULE_SETUP definition goes here */ 866 655 #define YY_RULE_SETUP \ 867 656 if ( yyleng > 0 ) \ 868 - yy_current_buffer->yy_at_bol = \ 657 + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ 869 658 (yytext[yyleng - 1] == '\n'); \ 870 659 YY_USER_ACTION 871 660 872 - YY_DECL 873 - { 874 - register yy_state_type yy_current_state; 875 - register char *yy_cp = NULL, *yy_bp = NULL; 876 - register int yy_act; 661 + /* %not-for-header */ 877 662 663 + /** The main scanner function which does all the work. 664 + */ 665 + YY_DECL 666 + { 667 + register yy_state_type yy_current_state; 668 + register char *yy_cp, *yy_bp; 669 + register int yy_act; 670 + 671 + /* %% [7.0] user's declarations go here */ 878 672 #line 65 "scripts/genksyms/lex.l" 879 673 880 674 881 675 882 676 /* Keep track of our location in the original source files. */ 883 - #line 672 "scripts/genksyms/lex.c" 677 + #line 890 "scripts/genksyms/lex.c" 884 678 885 - if ( yy_init ) 679 + if ( !(yy_init) ) 886 680 { 887 - yy_init = 0; 681 + (yy_init) = 1; 888 682 889 683 #ifdef YY_USER_INIT 890 684 YY_USER_INIT; 891 685 #endif 892 686 893 - if ( ! yy_start ) 894 - yy_start = 1; /* first start state */ 687 + if ( ! (yy_start) ) 688 + (yy_start) = 1; /* first start state */ 895 689 896 690 if ( ! yyin ) 691 + /* %if-c-only */ 897 692 yyin = stdin; 693 + /* %endif */ 694 + /* %if-c++-only */ 695 + /* %endif */ 898 696 899 697 if ( ! yyout ) 698 + /* %if-c-only */ 900 699 yyout = stdout; 700 + /* %endif */ 701 + /* %if-c++-only */ 702 + /* %endif */ 901 703 902 - if ( ! yy_current_buffer ) 903 - yy_current_buffer = 904 - yy_create_buffer( yyin, YY_BUF_SIZE ); 704 + if ( ! YY_CURRENT_BUFFER ) { 705 + yyensure_buffer_stack (); 706 + YY_CURRENT_BUFFER_LVALUE = 707 + yy_create_buffer(yyin,YY_BUF_SIZE ); 708 + } 905 709 906 - yy_load_buffer_state(); 710 + yy_load_buffer_state( ); 907 711 } 908 712 909 713 while ( 1 ) /* loops until end-of-file is reached */ 910 714 { 911 - yy_cp = yy_c_buf_p; 715 + /* %% [8.0] yymore()-related code goes here */ 716 + yy_cp = (yy_c_buf_p); 912 717 913 718 /* Support of yytext. */ 914 - *yy_cp = yy_hold_char; 719 + *yy_cp = (yy_hold_char); 915 720 916 721 /* yy_bp points to the position in yy_ch_buf of the start of 917 722 * the current run. 918 723 */ 919 724 yy_bp = yy_cp; 920 725 921 - yy_current_state = yy_start; 726 + /* %% [9.0] code to set up and find next match goes here */ 727 + yy_current_state = (yy_start); 922 728 yy_current_state += YY_AT_BOL(); 923 729 yy_match: 924 730 do ··· 944 714 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 945 715 if ( yy_accept[yy_current_state] ) 946 716 { 947 - yy_last_accepting_state = yy_current_state; 948 - yy_last_accepting_cpos = yy_cp; 717 + (yy_last_accepting_state) = yy_current_state; 718 + (yy_last_accepting_cpos) = yy_cp; 949 719 } 950 720 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 951 721 { ··· 959 729 while ( yy_base[yy_current_state] != 284 ); 960 730 961 731 yy_find_action: 732 + /* %% [10.0] code to find the action number goes here */ 962 733 yy_act = yy_accept[yy_current_state]; 963 734 if ( yy_act == 0 ) 964 735 { /* have to back up */ 965 - yy_cp = yy_last_accepting_cpos; 966 - yy_current_state = yy_last_accepting_state; 736 + yy_cp = (yy_last_accepting_cpos); 737 + yy_current_state = (yy_last_accepting_state); 967 738 yy_act = yy_accept[yy_current_state]; 968 739 } 969 740 970 741 YY_DO_BEFORE_ACTION; 971 742 743 + /* %% [11.0] code for yylineno update goes here */ 972 744 973 745 do_action: /* This label is used only to access EOF actions. */ 974 746 747 + /* %% [12.0] debug code goes here */ 975 748 if ( yy_flex_debug ) 976 749 { 977 750 if ( yy_act == 0 ) 978 751 fprintf( stderr, "--scanner backing up\n" ); 979 752 else if ( yy_act < 13 ) 980 - fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", 981 - yy_rule_linenum[yy_act], yytext ); 753 + fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", 754 + (long)yy_rule_linenum[yy_act], yytext ); 982 755 else if ( yy_act == 13 ) 983 756 fprintf( stderr, "--accepting default rule (\"%s\")\n", 984 757 yytext ); ··· 993 760 994 761 switch ( yy_act ) 995 762 { /* beginning of action switch */ 763 + /* %% [13.0] actions go here */ 996 764 case 0: /* must back up */ 997 765 /* undo the effects of YY_DO_BEFORE_ACTION */ 998 - *yy_cp = yy_hold_char; 999 - yy_cp = yy_last_accepting_cpos; 1000 - yy_current_state = yy_last_accepting_state; 766 + *yy_cp = (yy_hold_char); 767 + yy_cp = (yy_last_accepting_cpos); 768 + yy_current_state = (yy_last_accepting_state); 1001 769 goto yy_find_action; 1002 770 1003 771 case 1: 772 + /* rule 1 can match eol */ 1004 773 YY_RULE_SETUP 1005 774 #line 69 "scripts/genksyms/lex.l" 1006 775 return FILENAME; 1007 776 YY_BREAK 1008 777 case 2: 778 + /* rule 2 can match eol */ 1009 779 YY_RULE_SETUP 1010 780 #line 70 "scripts/genksyms/lex.l" 1011 781 cur_line++; 1012 782 YY_BREAK 1013 783 case 3: 784 + /* rule 3 can match eol */ 1014 785 YY_RULE_SETUP 1015 786 #line 71 "scripts/genksyms/lex.l" 1016 787 cur_line++; ··· 1026 789 ; 1027 790 YY_BREAK 1028 791 case 5: 792 + /* rule 5 can match eol */ 1029 793 YY_RULE_SETUP 1030 794 #line 77 "scripts/genksyms/lex.l" 1031 795 return STRING; 1032 796 YY_BREAK 1033 797 case 6: 798 + /* rule 6 can match eol */ 1034 799 YY_RULE_SETUP 1035 800 #line 78 "scripts/genksyms/lex.l" 1036 801 return CHAR; ··· 1077 838 #line 95 "scripts/genksyms/lex.l" 1078 839 ECHO; 1079 840 YY_BREAK 1080 - #line 842 "scripts/genksyms/lex.c" 841 + #line 1081 "scripts/genksyms/lex.c" 1081 842 case YY_STATE_EOF(INITIAL): 1082 843 case YY_STATE_EOF(V2_TOKENS): 1083 844 yyterminate(); ··· 1085 846 case YY_END_OF_BUFFER: 1086 847 { 1087 848 /* Amount of text matched not including the EOB char. */ 1088 - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 849 + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 1089 850 1090 851 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1091 - *yy_cp = yy_hold_char; 852 + *yy_cp = (yy_hold_char); 1092 853 YY_RESTORE_YY_MORE_OFFSET 1093 854 1094 - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 855 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 1095 856 { 1096 857 /* We're scanning a new file or input source. It's 1097 858 * possible that this happened because the user 1098 859 * just pointed yyin at a new source and called 1099 860 * yylex(). If so, then we have to assure 1100 - * consistency between yy_current_buffer and our 861 + * consistency between YY_CURRENT_BUFFER and our 1101 862 * globals. Here is the right place to do so, because 1102 863 * this is the first action (other than possibly a 1103 864 * back-up) that will match for the new input source. 1104 865 */ 1105 - yy_n_chars = yy_current_buffer->yy_n_chars; 1106 - yy_current_buffer->yy_input_file = yyin; 1107 - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 866 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 867 + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 868 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 1108 869 } 1109 870 1110 871 /* Note that here we test for yy_c_buf_p "<=" to the position ··· 1114 875 * end-of-buffer state). Contrast this with the test 1115 876 * in input(). 1116 877 */ 1117 - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 878 + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1118 879 { /* This was really a NUL. */ 1119 880 yy_state_type yy_next_state; 1120 881 1121 - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 882 + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 1122 883 1123 - yy_current_state = yy_get_previous_state(); 884 + yy_current_state = yy_get_previous_state( ); 1124 885 1125 886 /* Okay, we're now positioned to make the NUL 1126 887 * transition. We couldn't have ··· 1133 894 1134 895 yy_next_state = yy_try_NUL_trans( yy_current_state ); 1135 896 1136 - yy_bp = yytext_ptr + YY_MORE_ADJ; 897 + yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1137 898 1138 899 if ( yy_next_state ) 1139 900 { 1140 901 /* Consume the NUL. */ 1141 - yy_cp = ++yy_c_buf_p; 902 + yy_cp = ++(yy_c_buf_p); 1142 903 yy_current_state = yy_next_state; 1143 904 goto yy_match; 1144 905 } 1145 906 1146 907 else 1147 908 { 1148 - yy_cp = yy_c_buf_p; 909 + /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ 910 + yy_cp = (yy_c_buf_p); 1149 911 goto yy_find_action; 1150 912 } 1151 913 } 1152 914 1153 - else switch ( yy_get_next_buffer() ) 915 + else switch ( yy_get_next_buffer( ) ) 1154 916 { 1155 917 case EOB_ACT_END_OF_FILE: 1156 918 { 1157 - yy_did_buffer_switch_on_eof = 0; 919 + (yy_did_buffer_switch_on_eof) = 0; 1158 920 1159 - if ( yywrap() ) 921 + if ( yywrap( ) ) 1160 922 { 1161 923 /* Note: because we've taken care in 1162 924 * yy_get_next_buffer() to have set up ··· 1168 928 * YY_NULL, it'll still work - another 1169 929 * YY_NULL will get returned. 1170 930 */ 1171 - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 931 + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 1172 932 1173 933 yy_act = YY_STATE_EOF(YY_START); 1174 934 goto do_action; ··· 1176 936 1177 937 else 1178 938 { 1179 - if ( ! yy_did_buffer_switch_on_eof ) 939 + if ( ! (yy_did_buffer_switch_on_eof) ) 1180 940 YY_NEW_FILE; 1181 941 } 1182 942 break; 1183 943 } 1184 944 1185 945 case EOB_ACT_CONTINUE_SCAN: 1186 - yy_c_buf_p = 1187 - yytext_ptr + yy_amount_of_matched_text; 946 + (yy_c_buf_p) = 947 + (yytext_ptr) + yy_amount_of_matched_text; 1188 948 1189 - yy_current_state = yy_get_previous_state(); 949 + yy_current_state = yy_get_previous_state( ); 1190 950 1191 - yy_cp = yy_c_buf_p; 1192 - yy_bp = yytext_ptr + YY_MORE_ADJ; 951 + yy_cp = (yy_c_buf_p); 952 + yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1193 953 goto yy_match; 1194 954 1195 955 case EOB_ACT_LAST_MATCH: 1196 - yy_c_buf_p = 1197 - &yy_current_buffer->yy_ch_buf[yy_n_chars]; 956 + (yy_c_buf_p) = 957 + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 1198 958 1199 - yy_current_state = yy_get_previous_state(); 959 + yy_current_state = yy_get_previous_state( ); 1200 960 1201 - yy_cp = yy_c_buf_p; 1202 - yy_bp = yytext_ptr + YY_MORE_ADJ; 961 + yy_cp = (yy_c_buf_p); 962 + yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1203 963 goto yy_find_action; 1204 964 } 1205 965 break; ··· 1210 970 "fatal flex scanner internal error--no action found" ); 1211 971 } /* end of action switch */ 1212 972 } /* end of scanning one token */ 1213 - } /* end of yylex */ 973 + } /* end of yylex */ 974 + /* %ok-for-header */ 1214 975 976 + /* %if-c++-only */ 977 + /* %not-for-header */ 978 + 979 + /* %ok-for-header */ 980 + 981 + /* %endif */ 1215 982 1216 983 /* yy_get_next_buffer - try to read in a new buffer 1217 984 * ··· 1227 980 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 1228 981 * EOB_ACT_END_OF_FILE - end of file 1229 982 */ 1230 - 1231 - static int yy_get_next_buffer() 1232 - { 1233 - register char *dest = yy_current_buffer->yy_ch_buf; 1234 - register char *source = yytext_ptr; 983 + /* %if-c-only */ 984 + static int yy_get_next_buffer (void) 985 + /* %endif */ 986 + /* %if-c++-only */ 987 + /* %endif */ 988 + { 989 + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 990 + register char *source = (yytext_ptr); 1235 991 register int number_to_move, i; 1236 992 int ret_val; 1237 993 1238 - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 994 + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 1239 995 YY_FATAL_ERROR( 1240 996 "fatal flex scanner internal error--end of buffer missed" ); 1241 997 1242 - if ( yy_current_buffer->yy_fill_buffer == 0 ) 998 + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 1243 999 { /* Don't try to fill the buffer, so this is an EOF. */ 1244 - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 1000 + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 1245 1001 { 1246 1002 /* We matched a single character, the EOB, so 1247 1003 * treat this as a final EOF. ··· 1264 1014 /* Try to read more data. */ 1265 1015 1266 1016 /* First move last chars to start of buffer. */ 1267 - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 1017 + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 1268 1018 1269 1019 for ( i = 0; i < number_to_move; ++i ) 1270 1020 *(dest++) = *(source++); 1271 1021 1272 - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1022 + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1273 1023 /* don't do the read, it's not guaranteed to return an EOF, 1274 1024 * just force an EOF 1275 1025 */ 1276 - yy_current_buffer->yy_n_chars = yy_n_chars = 0; 1026 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 1277 1027 1278 1028 else 1279 1029 { 1280 - int num_to_read = 1281 - yy_current_buffer->yy_buf_size - number_to_move - 1; 1030 + int num_to_read = 1031 + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 1282 1032 1283 1033 while ( num_to_read <= 0 ) 1284 1034 { /* Not enough room in the buffer - grow it. */ 1285 - #ifdef YY_USES_REJECT 1286 - YY_FATAL_ERROR( 1287 - "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 1288 - #else 1289 1035 1290 1036 /* just a shorter name for the current buffer */ 1291 - YY_BUFFER_STATE b = yy_current_buffer; 1037 + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 1292 1038 1293 1039 int yy_c_buf_p_offset = 1294 - (int) (yy_c_buf_p - b->yy_ch_buf); 1040 + (int) ((yy_c_buf_p) - b->yy_ch_buf); 1295 1041 1296 1042 if ( b->yy_is_our_buffer ) 1297 1043 { ··· 1300 1054 1301 1055 b->yy_ch_buf = (char *) 1302 1056 /* Include room in for 2 EOB chars. */ 1303 - yy_flex_realloc( (void *) b->yy_ch_buf, 1304 - b->yy_buf_size + 2 ); 1057 + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 1305 1058 } 1306 1059 else 1307 1060 /* Can't grow it, we don't own it. */ ··· 1310 1065 YY_FATAL_ERROR( 1311 1066 "fatal error - scanner input buffer overflow" ); 1312 1067 1313 - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 1068 + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; 1314 1069 1315 - num_to_read = yy_current_buffer->yy_buf_size - 1070 + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 1316 1071 number_to_move - 1; 1317 - #endif 1072 + 1318 1073 } 1319 1074 1320 1075 if ( num_to_read > YY_READ_BUF_SIZE ) 1321 1076 num_to_read = YY_READ_BUF_SIZE; 1322 1077 1323 1078 /* Read in more data. */ 1324 - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 1325 - yy_n_chars, num_to_read ); 1079 + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 1080 + (yy_n_chars), (size_t) num_to_read ); 1326 1081 1327 - yy_current_buffer->yy_n_chars = yy_n_chars; 1082 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1328 1083 } 1329 1084 1330 - if ( yy_n_chars == 0 ) 1085 + if ( (yy_n_chars) == 0 ) 1331 1086 { 1332 1087 if ( number_to_move == YY_MORE_ADJ ) 1333 1088 { 1334 1089 ret_val = EOB_ACT_END_OF_FILE; 1335 - yyrestart( yyin ); 1090 + yyrestart(yyin ); 1336 1091 } 1337 1092 1338 1093 else 1339 1094 { 1340 1095 ret_val = EOB_ACT_LAST_MATCH; 1341 - yy_current_buffer->yy_buffer_status = 1096 + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 1342 1097 YY_BUFFER_EOF_PENDING; 1343 1098 } 1344 1099 } ··· 1346 1101 else 1347 1102 ret_val = EOB_ACT_CONTINUE_SCAN; 1348 1103 1349 - yy_n_chars += number_to_move; 1350 - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 1351 - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 1104 + (yy_n_chars) += number_to_move; 1105 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 1106 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 1352 1107 1353 - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 1108 + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 1354 1109 1355 1110 return ret_val; 1356 - } 1357 - 1111 + } 1358 1112 1359 1113 /* yy_get_previous_state - get the state just before the EOB char was reached */ 1360 1114 1361 - static yy_state_type yy_get_previous_state() 1362 - { 1115 + /* %if-c-only */ 1116 + /* %not-for-header */ 1117 + 1118 + static yy_state_type yy_get_previous_state (void) 1119 + /* %endif */ 1120 + /* %if-c++-only */ 1121 + /* %endif */ 1122 + { 1363 1123 register yy_state_type yy_current_state; 1364 1124 register char *yy_cp; 1365 - 1366 - yy_current_state = yy_start; 1125 + 1126 + /* %% [15.0] code to get the start state into yy_current_state goes here */ 1127 + yy_current_state = (yy_start); 1367 1128 yy_current_state += YY_AT_BOL(); 1368 1129 1369 - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 1130 + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 1370 1131 { 1132 + /* %% [16.0] code to find the next state goes here */ 1371 1133 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1372 1134 if ( yy_accept[yy_current_state] ) 1373 1135 { 1374 - yy_last_accepting_state = yy_current_state; 1375 - yy_last_accepting_cpos = yy_cp; 1136 + (yy_last_accepting_state) = yy_current_state; 1137 + (yy_last_accepting_cpos) = yy_cp; 1376 1138 } 1377 1139 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1378 1140 { ··· 1391 1139 } 1392 1140 1393 1141 return yy_current_state; 1394 - } 1395 - 1142 + } 1396 1143 1397 1144 /* yy_try_NUL_trans - try to make a transition on the NUL character 1398 1145 * 1399 1146 * synopsis 1400 1147 * next_state = yy_try_NUL_trans( current_state ); 1401 1148 */ 1402 - 1403 - #ifdef YY_USE_PROTOS 1404 - static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 1405 - #else 1406 - static yy_state_type yy_try_NUL_trans( yy_current_state ) 1407 - yy_state_type yy_current_state; 1408 - #endif 1409 - { 1149 + /* %if-c-only */ 1150 + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 1151 + /* %endif */ 1152 + /* %if-c++-only */ 1153 + /* %endif */ 1154 + { 1410 1155 register int yy_is_jam; 1411 - register char *yy_cp = yy_c_buf_p; 1156 + /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ 1157 + register char *yy_cp = (yy_c_buf_p); 1412 1158 1413 1159 register YY_CHAR yy_c = 1; 1414 1160 if ( yy_accept[yy_current_state] ) 1415 1161 { 1416 - yy_last_accepting_state = yy_current_state; 1417 - yy_last_accepting_cpos = yy_cp; 1162 + (yy_last_accepting_state) = yy_current_state; 1163 + (yy_last_accepting_cpos) = yy_cp; 1418 1164 } 1419 1165 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1420 1166 { ··· 1424 1174 yy_is_jam = (yy_current_state == 75); 1425 1175 1426 1176 return yy_is_jam ? 0 : yy_current_state; 1427 - } 1177 + } 1428 1178 1179 + /* %if-c-only */ 1429 1180 1430 - #ifndef YY_NO_UNPUT 1431 - #ifdef YY_USE_PROTOS 1432 - static void yyunput( int c, register char *yy_bp ) 1433 - #else 1434 - static void yyunput( c, yy_bp ) 1435 - int c; 1436 - register char *yy_bp; 1437 - #endif 1438 - { 1439 - register char *yy_cp = yy_c_buf_p; 1181 + static void yyunput (int c, register char * yy_bp ) 1182 + /* %endif */ 1183 + /* %if-c++-only */ 1184 + /* %endif */ 1185 + { 1186 + register char *yy_cp; 1187 + 1188 + yy_cp = (yy_c_buf_p); 1440 1189 1441 1190 /* undo effects of setting up yytext */ 1442 - *yy_cp = yy_hold_char; 1191 + *yy_cp = (yy_hold_char); 1443 1192 1444 - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1193 + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 1445 1194 { /* need to shift things up to make room */ 1446 1195 /* +2 for EOB chars. */ 1447 - register int number_to_move = yy_n_chars + 2; 1448 - register char *dest = &yy_current_buffer->yy_ch_buf[ 1449 - yy_current_buffer->yy_buf_size + 2]; 1196 + register int number_to_move = (yy_n_chars) + 2; 1197 + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 1198 + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 1450 1199 register char *source = 1451 - &yy_current_buffer->yy_ch_buf[number_to_move]; 1200 + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 1452 1201 1453 - while ( source > yy_current_buffer->yy_ch_buf ) 1202 + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1454 1203 *--dest = *--source; 1455 1204 1456 1205 yy_cp += (int) (dest - source); 1457 1206 yy_bp += (int) (dest - source); 1458 - yy_current_buffer->yy_n_chars = 1459 - yy_n_chars = yy_current_buffer->yy_buf_size; 1207 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 1208 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 1460 1209 1461 - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1210 + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 1462 1211 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1463 1212 } 1464 1213 1465 1214 *--yy_cp = (char) c; 1466 1215 1216 + /* %% [18.0] update yylineno here */ 1467 1217 1468 - yytext_ptr = yy_bp; 1469 - yy_hold_char = *yy_cp; 1470 - yy_c_buf_p = yy_cp; 1471 - } 1472 - #endif /* ifndef YY_NO_UNPUT */ 1218 + (yytext_ptr) = yy_bp; 1219 + (yy_hold_char) = *yy_cp; 1220 + (yy_c_buf_p) = yy_cp; 1221 + } 1222 + /* %if-c-only */ 1473 1223 1224 + /* %endif */ 1474 1225 1226 + /* %if-c-only */ 1227 + #ifndef YY_NO_INPUT 1475 1228 #ifdef __cplusplus 1476 - static int yyinput() 1229 + static int yyinput (void) 1477 1230 #else 1478 - static int input() 1231 + static int input (void) 1479 1232 #endif 1480 - { 1233 + 1234 + /* %endif */ 1235 + /* %if-c++-only */ 1236 + /* %endif */ 1237 + { 1481 1238 int c; 1239 + 1240 + *(yy_c_buf_p) = (yy_hold_char); 1482 1241 1483 - *yy_c_buf_p = yy_hold_char; 1484 - 1485 - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 1242 + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 1486 1243 { 1487 1244 /* yy_c_buf_p now points to the character we want to return. 1488 1245 * If this occurs *before* the EOB characters, then it's a 1489 1246 * valid NUL; if not, then we've hit the end of the buffer. 1490 1247 */ 1491 - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1248 + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1492 1249 /* This was really a NUL. */ 1493 - *yy_c_buf_p = '\0'; 1250 + *(yy_c_buf_p) = '\0'; 1494 1251 1495 1252 else 1496 1253 { /* need more input */ 1497 - int offset = yy_c_buf_p - yytext_ptr; 1498 - ++yy_c_buf_p; 1254 + int offset = (yy_c_buf_p) - (yytext_ptr); 1255 + ++(yy_c_buf_p); 1499 1256 1500 - switch ( yy_get_next_buffer() ) 1257 + switch ( yy_get_next_buffer( ) ) 1501 1258 { 1502 1259 case EOB_ACT_LAST_MATCH: 1503 1260 /* This happens because yy_g_n_b() ··· 1518 1261 */ 1519 1262 1520 1263 /* Reset buffer status. */ 1521 - yyrestart( yyin ); 1264 + yyrestart(yyin ); 1522 1265 1523 - /* fall through */ 1266 + /*FALLTHROUGH*/ 1524 1267 1525 1268 case EOB_ACT_END_OF_FILE: 1526 1269 { 1527 - if ( yywrap() ) 1270 + if ( yywrap( ) ) 1528 1271 return EOF; 1529 1272 1530 - if ( ! yy_did_buffer_switch_on_eof ) 1273 + if ( ! (yy_did_buffer_switch_on_eof) ) 1531 1274 YY_NEW_FILE; 1532 1275 #ifdef __cplusplus 1533 1276 return yyinput(); ··· 1537 1280 } 1538 1281 1539 1282 case EOB_ACT_CONTINUE_SCAN: 1540 - yy_c_buf_p = yytext_ptr + offset; 1283 + (yy_c_buf_p) = (yytext_ptr) + offset; 1541 1284 break; 1542 1285 } 1543 1286 } 1544 1287 } 1545 1288 1546 - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 1547 - *yy_c_buf_p = '\0'; /* preserve yytext */ 1548 - yy_hold_char = *++yy_c_buf_p; 1289 + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 1290 + *(yy_c_buf_p) = '\0'; /* preserve yytext */ 1291 + (yy_hold_char) = *++(yy_c_buf_p); 1549 1292 1550 - yy_current_buffer->yy_at_bol = (c == '\n'); 1293 + /* %% [19.0] update BOL and yylineno */ 1294 + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); 1551 1295 1552 1296 return c; 1297 + } 1298 + /* %if-c-only */ 1299 + #endif /* ifndef YY_NO_INPUT */ 1300 + /* %endif */ 1301 + 1302 + /** Immediately switch to a different input stream. 1303 + * @param input_file A readable stream. 1304 + * 1305 + * @note This function does not reset the start condition to @c INITIAL . 1306 + */ 1307 + /* %if-c-only */ 1308 + void yyrestart (FILE * input_file ) 1309 + /* %endif */ 1310 + /* %if-c++-only */ 1311 + /* %endif */ 1312 + { 1313 + 1314 + if ( ! YY_CURRENT_BUFFER ){ 1315 + yyensure_buffer_stack (); 1316 + YY_CURRENT_BUFFER_LVALUE = 1317 + yy_create_buffer(yyin,YY_BUF_SIZE ); 1553 1318 } 1554 1319 1320 + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 1321 + yy_load_buffer_state( ); 1322 + } 1555 1323 1556 - #ifdef YY_USE_PROTOS 1557 - void yyrestart( FILE *input_file ) 1558 - #else 1559 - void yyrestart( input_file ) 1560 - FILE *input_file; 1561 - #endif 1562 - { 1563 - if ( ! yy_current_buffer ) 1564 - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 1565 - 1566 - yy_init_buffer( yy_current_buffer, input_file ); 1567 - yy_load_buffer_state(); 1568 - } 1569 - 1570 - 1571 - #ifdef YY_USE_PROTOS 1572 - void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 1573 - #else 1574 - void yy_switch_to_buffer( new_buffer ) 1575 - YY_BUFFER_STATE new_buffer; 1576 - #endif 1577 - { 1578 - if ( yy_current_buffer == new_buffer ) 1324 + /** Switch to a different input buffer. 1325 + * @param new_buffer The new input buffer. 1326 + * 1327 + */ 1328 + /* %if-c-only */ 1329 + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 1330 + /* %endif */ 1331 + /* %if-c++-only */ 1332 + /* %endif */ 1333 + { 1334 + 1335 + /* TODO. We should be able to replace this entire function body 1336 + * with 1337 + * yypop_buffer_state(); 1338 + * yypush_buffer_state(new_buffer); 1339 + */ 1340 + yyensure_buffer_stack (); 1341 + if ( YY_CURRENT_BUFFER == new_buffer ) 1579 1342 return; 1580 1343 1581 - if ( yy_current_buffer ) 1344 + if ( YY_CURRENT_BUFFER ) 1582 1345 { 1583 1346 /* Flush out information for old buffer. */ 1584 - *yy_c_buf_p = yy_hold_char; 1585 - yy_current_buffer->yy_buf_pos = yy_c_buf_p; 1586 - yy_current_buffer->yy_n_chars = yy_n_chars; 1347 + *(yy_c_buf_p) = (yy_hold_char); 1348 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1349 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1587 1350 } 1588 1351 1589 - yy_current_buffer = new_buffer; 1590 - yy_load_buffer_state(); 1352 + YY_CURRENT_BUFFER_LVALUE = new_buffer; 1353 + yy_load_buffer_state( ); 1591 1354 1592 1355 /* We don't actually know whether we did this switch during 1593 1356 * EOF (yywrap()) processing, but the only time this flag 1594 1357 * is looked at is after yywrap() is called, so it's safe 1595 1358 * to go ahead and always set it. 1596 1359 */ 1597 - yy_did_buffer_switch_on_eof = 1; 1598 - } 1360 + (yy_did_buffer_switch_on_eof) = 1; 1361 + } 1599 1362 1363 + /* %if-c-only */ 1364 + static void yy_load_buffer_state (void) 1365 + /* %endif */ 1366 + /* %if-c++-only */ 1367 + /* %endif */ 1368 + { 1369 + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1370 + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 1371 + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 1372 + (yy_hold_char) = *(yy_c_buf_p); 1373 + } 1600 1374 1601 - #ifdef YY_USE_PROTOS 1602 - void yy_load_buffer_state( void ) 1603 - #else 1604 - void yy_load_buffer_state() 1605 - #endif 1606 - { 1607 - yy_n_chars = yy_current_buffer->yy_n_chars; 1608 - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 1609 - yyin = yy_current_buffer->yy_input_file; 1610 - yy_hold_char = *yy_c_buf_p; 1611 - } 1612 - 1613 - 1614 - #ifdef YY_USE_PROTOS 1615 - YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 1616 - #else 1617 - YY_BUFFER_STATE yy_create_buffer( file, size ) 1618 - FILE *file; 1619 - int size; 1620 - #endif 1621 - { 1375 + /** Allocate and initialize an input buffer state. 1376 + * @param file A readable stream. 1377 + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 1378 + * 1379 + * @return the allocated buffer state. 1380 + */ 1381 + /* %if-c-only */ 1382 + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) 1383 + /* %endif */ 1384 + /* %if-c++-only */ 1385 + /* %endif */ 1386 + { 1622 1387 YY_BUFFER_STATE b; 1623 - 1624 - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1388 + 1389 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 1625 1390 if ( ! b ) 1626 1391 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1627 1392 ··· 1652 1373 /* yy_ch_buf has to be 2 characters longer than the size given because 1653 1374 * we need to put in 2 end-of-buffer characters. 1654 1375 */ 1655 - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 1376 + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); 1656 1377 if ( ! b->yy_ch_buf ) 1657 1378 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1658 1379 1659 1380 b->yy_is_our_buffer = 1; 1660 1381 1661 - yy_init_buffer( b, file ); 1382 + yy_init_buffer(b,file ); 1662 1383 1663 1384 return b; 1664 - } 1385 + } 1665 1386 1666 - 1667 - #ifdef YY_USE_PROTOS 1668 - void yy_delete_buffer( YY_BUFFER_STATE b ) 1669 - #else 1670 - void yy_delete_buffer( b ) 1671 - YY_BUFFER_STATE b; 1672 - #endif 1673 - { 1387 + /** Destroy the buffer. 1388 + * @param b a buffer created with yy_create_buffer() 1389 + * 1390 + */ 1391 + /* %if-c-only */ 1392 + void yy_delete_buffer (YY_BUFFER_STATE b ) 1393 + /* %endif */ 1394 + /* %if-c++-only */ 1395 + /* %endif */ 1396 + { 1397 + 1674 1398 if ( ! b ) 1675 1399 return; 1676 1400 1677 - if ( b == yy_current_buffer ) 1678 - yy_current_buffer = (YY_BUFFER_STATE) 0; 1401 + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 1402 + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 1679 1403 1680 1404 if ( b->yy_is_our_buffer ) 1681 - yy_flex_free( (void *) b->yy_ch_buf ); 1405 + yyfree((void *) b->yy_ch_buf ); 1682 1406 1683 - yy_flex_free( (void *) b ); 1684 - } 1407 + yyfree((void *) b ); 1408 + } 1685 1409 1410 + /* %if-c-only */ 1686 1411 1412 + #ifndef __cplusplus 1413 + extern int isatty (int ); 1414 + #endif /* __cplusplus */ 1415 + 1416 + /* %endif */ 1687 1417 1688 - #ifdef YY_USE_PROTOS 1689 - void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 1690 - #else 1691 - void yy_init_buffer( b, file ) 1692 - YY_BUFFER_STATE b; 1693 - FILE *file; 1694 - #endif 1418 + /* %if-c++-only */ 1419 + /* %endif */ 1695 1420 1421 + /* Initializes or reinitializes a buffer. 1422 + * This function is sometimes called more than once on the same buffer, 1423 + * such as during a yyrestart() or at EOF. 1424 + */ 1425 + /* %if-c-only */ 1426 + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 1427 + /* %endif */ 1428 + /* %if-c++-only */ 1429 + /* %endif */ 1696 1430 1697 - { 1698 - yy_flush_buffer( b ); 1431 + { 1432 + int oerrno = errno; 1433 + 1434 + yy_flush_buffer(b ); 1699 1435 1700 1436 b->yy_input_file = file; 1701 1437 b->yy_fill_buffer = 1; 1702 1438 1703 - #if YY_ALWAYS_INTERACTIVE 1704 - b->yy_is_interactive = 1; 1705 - #else 1706 - #if YY_NEVER_INTERACTIVE 1707 - b->yy_is_interactive = 0; 1708 - #else 1709 - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1710 - #endif 1711 - #endif 1712 - } 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 + } 1713 1447 1448 + /* %if-c-only */ 1714 1449 1715 - #ifdef YY_USE_PROTOS 1716 - void yy_flush_buffer( YY_BUFFER_STATE b ) 1717 - #else 1718 - void yy_flush_buffer( b ) 1719 - YY_BUFFER_STATE b; 1720 - #endif 1450 + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1451 + 1452 + /* %endif */ 1453 + /* %if-c++-only */ 1454 + /* %endif */ 1455 + errno = oerrno; 1456 + } 1721 1457 1722 - { 1723 - if ( ! b ) 1458 + /** Discard all buffered characters. On the next scan, YY_INPUT will be called. 1459 + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 1460 + * 1461 + */ 1462 + /* %if-c-only */ 1463 + void yy_flush_buffer (YY_BUFFER_STATE b ) 1464 + /* %endif */ 1465 + /* %if-c++-only */ 1466 + /* %endif */ 1467 + { 1468 + if ( ! b ) 1724 1469 return; 1725 1470 1726 1471 b->yy_n_chars = 0; ··· 1761 1458 b->yy_at_bol = 1; 1762 1459 b->yy_buffer_status = YY_BUFFER_NEW; 1763 1460 1764 - if ( b == yy_current_buffer ) 1765 - yy_load_buffer_state(); 1461 + if ( b == YY_CURRENT_BUFFER ) 1462 + yy_load_buffer_state( ); 1463 + } 1464 + 1465 + /* %if-c-or-c++ */ 1466 + /** Pushes the new state onto the stack. The new state becomes 1467 + * the current state. This function will allocate the stack 1468 + * if necessary. 1469 + * @param new_buffer The new state. 1470 + * 1471 + */ 1472 + /* %if-c-only */ 1473 + void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 1474 + /* %endif */ 1475 + /* %if-c++-only */ 1476 + /* %endif */ 1477 + { 1478 + if (new_buffer == NULL) 1479 + return; 1480 + 1481 + yyensure_buffer_stack(); 1482 + 1483 + /* This block is copied from yy_switch_to_buffer. */ 1484 + if ( YY_CURRENT_BUFFER ) 1485 + { 1486 + /* Flush out information for old buffer. */ 1487 + *(yy_c_buf_p) = (yy_hold_char); 1488 + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1489 + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1490 + } 1491 + 1492 + /* Only push if top exists. Otherwise, replace top. */ 1493 + if (YY_CURRENT_BUFFER) 1494 + (yy_buffer_stack_top)++; 1495 + YY_CURRENT_BUFFER_LVALUE = new_buffer; 1496 + 1497 + /* copied from yy_switch_to_buffer. */ 1498 + yy_load_buffer_state( ); 1499 + (yy_did_buffer_switch_on_eof) = 1; 1500 + } 1501 + /* %endif */ 1502 + 1503 + /* %if-c-or-c++ */ 1504 + /** Removes and deletes the top of the stack, if present. 1505 + * The next element becomes the new top. 1506 + * 1507 + */ 1508 + /* %if-c-only */ 1509 + void yypop_buffer_state (void) 1510 + /* %endif */ 1511 + /* %if-c++-only */ 1512 + /* %endif */ 1513 + { 1514 + if (!YY_CURRENT_BUFFER) 1515 + return; 1516 + 1517 + yy_delete_buffer(YY_CURRENT_BUFFER ); 1518 + YY_CURRENT_BUFFER_LVALUE = NULL; 1519 + if ((yy_buffer_stack_top) > 0) 1520 + --(yy_buffer_stack_top); 1521 + 1522 + if (YY_CURRENT_BUFFER) { 1523 + yy_load_buffer_state( ); 1524 + (yy_did_buffer_switch_on_eof) = 1; 1525 + } 1526 + } 1527 + /* %endif */ 1528 + 1529 + /* %if-c-or-c++ */ 1530 + /* Allocates the stack if it does not exist. 1531 + * Guarantees space for at least one push. 1532 + */ 1533 + /* %if-c-only */ 1534 + static void yyensure_buffer_stack (void) 1535 + /* %endif */ 1536 + /* %if-c++-only */ 1537 + /* %endif */ 1538 + { 1539 + int num_to_alloc; 1540 + 1541 + if (!(yy_buffer_stack)) { 1542 + 1543 + /* First allocation is just for 2 elements, since we don't know if this 1544 + * scanner will even need a stack. We use 2 instead of 1 to avoid an 1545 + * immediate realloc on the next call. 1546 + */ 1547 + num_to_alloc = 1; 1548 + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 1549 + (num_to_alloc * sizeof(struct yy_buffer_state*) 1550 + ); 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; 1766 1557 } 1767 1558 1559 + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 1768 1560 1769 - #ifndef YY_NO_SCAN_BUFFER 1770 - #ifdef YY_USE_PROTOS 1771 - YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 1772 - #else 1773 - YY_BUFFER_STATE yy_scan_buffer( base, size ) 1774 - char *base; 1775 - yy_size_t size; 1776 - #endif 1777 - { 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 + 1570 + /* zero only the new slots.*/ 1571 + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 1572 + (yy_buffer_stack_max) = num_to_alloc; 1573 + } 1574 + } 1575 + /* %endif */ 1576 + 1577 + /* %if-c-only */ 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 + { 1778 1586 YY_BUFFER_STATE b; 1779 - 1587 + 1780 1588 if ( size < 2 || 1781 1589 base[size-2] != YY_END_OF_BUFFER_CHAR || 1782 1590 base[size-1] != YY_END_OF_BUFFER_CHAR ) 1783 1591 /* They forgot to leave room for the EOB's. */ 1784 1592 return 0; 1785 1593 1786 - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1594 + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 1787 1595 if ( ! b ) 1788 1596 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 1789 1597 ··· 1908 1494 b->yy_fill_buffer = 0; 1909 1495 b->yy_buffer_status = YY_BUFFER_NEW; 1910 1496 1911 - yy_switch_to_buffer( b ); 1497 + yy_switch_to_buffer(b ); 1912 1498 1913 1499 return b; 1914 - } 1915 - #endif 1500 + } 1501 + /* %endif */ 1916 1502 1503 + /* %if-c-only */ 1504 + /** Setup the input buffer state to scan a string. The next call to yylex() will 1505 + * scan from a @e copy of @a str. 1506 + * @param yystr a NUL-terminated string to scan 1507 + * 1508 + * @return the newly allocated buffer state object. 1509 + * @note If you want to scan bytes that may contain NUL values, then use 1510 + * yy_scan_bytes() instead. 1511 + */ 1512 + YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) 1513 + { 1514 + 1515 + return yy_scan_bytes(yystr,strlen(yystr) ); 1516 + } 1517 + /* %endif */ 1917 1518 1918 - #ifndef YY_NO_SCAN_STRING 1919 - #ifdef YY_USE_PROTOS 1920 - YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 1921 - #else 1922 - YY_BUFFER_STATE yy_scan_string( yy_str ) 1923 - yyconst char *yy_str; 1924 - #endif 1925 - { 1926 - int len; 1927 - for ( len = 0; yy_str[len]; ++len ) 1928 - ; 1929 - 1930 - return yy_scan_bytes( yy_str, len ); 1931 - } 1932 - #endif 1933 - 1934 - 1935 - #ifndef YY_NO_SCAN_BYTES 1936 - #ifdef YY_USE_PROTOS 1937 - YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 1938 - #else 1939 - YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 1940 - yyconst char *bytes; 1941 - int len; 1942 - #endif 1943 - { 1519 + /* %if-c-only */ 1520 + /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 1521 + * scan from a @e copy of @a bytes. 1522 + * @param bytes the byte buffer to scan 1523 + * @param len the number of bytes in the buffer pointed to by @a bytes. 1524 + * 1525 + * @return the newly allocated buffer state object. 1526 + */ 1527 + YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) 1528 + { 1944 1529 YY_BUFFER_STATE b; 1945 1530 char *buf; 1946 1531 yy_size_t n; 1947 1532 int i; 1948 - 1533 + 1949 1534 /* Get memory for full buffer, including space for trailing EOB's. */ 1950 - n = len + 2; 1951 - buf = (char *) yy_flex_alloc( n ); 1535 + n = _yybytes_len + 2; 1536 + buf = (char *) yyalloc(n ); 1952 1537 if ( ! buf ) 1953 1538 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 1954 1539 1955 - for ( i = 0; i < len; ++i ) 1956 - buf[i] = bytes[i]; 1540 + for ( i = 0; i < _yybytes_len; ++i ) 1541 + buf[i] = yybytes[i]; 1957 1542 1958 - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 1543 + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 1959 1544 1960 - b = yy_scan_buffer( buf, n ); 1545 + b = yy_scan_buffer(buf,n ); 1961 1546 if ( ! b ) 1962 1547 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 1963 1548 ··· 1966 1553 b->yy_is_our_buffer = 1; 1967 1554 1968 1555 return b; 1969 - } 1970 - #endif 1971 - 1972 - 1973 - #ifndef YY_NO_PUSH_STATE 1974 - #ifdef YY_USE_PROTOS 1975 - static void yy_push_state( int new_state ) 1976 - #else 1977 - static void yy_push_state( new_state ) 1978 - int new_state; 1979 - #endif 1980 - { 1981 - if ( yy_start_stack_ptr >= yy_start_stack_depth ) 1982 - { 1983 - yy_size_t new_size; 1984 - 1985 - yy_start_stack_depth += YY_START_STACK_INCR; 1986 - new_size = yy_start_stack_depth * sizeof( int ); 1987 - 1988 - if ( ! yy_start_stack ) 1989 - yy_start_stack = (int *) yy_flex_alloc( new_size ); 1990 - 1991 - else 1992 - yy_start_stack = (int *) yy_flex_realloc( 1993 - (void *) yy_start_stack, new_size ); 1994 - 1995 - if ( ! yy_start_stack ) 1996 - YY_FATAL_ERROR( 1997 - "out of memory expanding start-condition stack" ); 1998 - } 1999 - 2000 - yy_start_stack[yy_start_stack_ptr++] = YY_START; 2001 - 2002 - BEGIN(new_state); 2003 - } 2004 - #endif 2005 - 2006 - 2007 - #ifndef YY_NO_POP_STATE 2008 - static void yy_pop_state() 2009 - { 2010 - if ( --yy_start_stack_ptr < 0 ) 2011 - YY_FATAL_ERROR( "start-condition stack underflow" ); 2012 - 2013 - BEGIN(yy_start_stack[yy_start_stack_ptr]); 2014 - } 2015 - #endif 2016 - 2017 - 2018 - #ifndef YY_NO_TOP_STATE 2019 - static int yy_top_state() 2020 - { 2021 - return yy_start_stack[yy_start_stack_ptr - 1]; 2022 - } 2023 - #endif 1556 + } 1557 + /* %endif */ 2024 1558 2025 1559 #ifndef YY_EXIT_FAILURE 2026 1560 #define YY_EXIT_FAILURE 2 2027 1561 #endif 2028 1562 2029 - #ifdef YY_USE_PROTOS 2030 - static void yy_fatal_error( yyconst char msg[] ) 2031 - #else 2032 - static void yy_fatal_error( msg ) 2033 - char msg[]; 2034 - #endif 2035 - { 2036 - (void) fprintf( stderr, "%s\n", msg ); 1563 + /* %if-c-only */ 1564 + static void yy_fatal_error (yyconst char* msg ) 1565 + { 1566 + (void) fprintf( stderr, "%s\n", msg ); 2037 1567 exit( YY_EXIT_FAILURE ); 2038 - } 2039 - 2040 - 1568 + } 1569 + /* %endif */ 1570 + /* %if-c++-only */ 1571 + /* %endif */ 2041 1572 2042 1573 /* Redefine yyless() so it works in section 3 code. */ 2043 1574 ··· 1990 1633 do \ 1991 1634 { \ 1992 1635 /* Undo effects of setting up yytext. */ \ 1993 - yytext[yyleng] = yy_hold_char; \ 1994 - yy_c_buf_p = yytext + n; \ 1995 - yy_hold_char = *yy_c_buf_p; \ 1996 - *yy_c_buf_p = '\0'; \ 1997 - yyleng = n; \ 1636 + int yyless_macro_arg = (n); \ 1637 + YY_LESS_LINENO(yyless_macro_arg);\ 1638 + yytext[yyleng] = (yy_hold_char); \ 1639 + (yy_c_buf_p) = yytext + yyless_macro_arg; \ 1640 + (yy_hold_char) = *(yy_c_buf_p); \ 1641 + *(yy_c_buf_p) = '\0'; \ 1642 + yyleng = yyless_macro_arg; \ 1998 1643 } \ 1999 1644 while ( 0 ) 2000 1645 1646 + /* Accessor methods (get/set functions) to struct members. */ 2001 1647 2002 - /* Internal utility routines. */ 1648 + /* %if-c-only */ 1649 + /* %if-reentrant */ 1650 + /* %endif */ 1651 + 1652 + /** Get the current line number. 1653 + * 1654 + */ 1655 + int yyget_lineno (void) 1656 + { 1657 + 1658 + return yylineno; 1659 + } 1660 + 1661 + /** Get the input stream. 1662 + * 1663 + */ 1664 + FILE *yyget_in (void) 1665 + { 1666 + return yyin; 1667 + } 1668 + 1669 + /** Get the output stream. 1670 + * 1671 + */ 1672 + FILE *yyget_out (void) 1673 + { 1674 + return yyout; 1675 + } 1676 + 1677 + /** Get the length of the current token. 1678 + * 1679 + */ 1680 + int yyget_leng (void) 1681 + { 1682 + return yyleng; 1683 + } 1684 + 1685 + /** Get the current token. 1686 + * 1687 + */ 1688 + 1689 + char *yyget_text (void) 1690 + { 1691 + return yytext; 1692 + } 1693 + 1694 + /* %if-reentrant */ 1695 + /* %endif */ 1696 + 1697 + /** Set the current line number. 1698 + * @param line_number 1699 + * 1700 + */ 1701 + void yyset_lineno (int line_number ) 1702 + { 1703 + 1704 + yylineno = line_number; 1705 + } 1706 + 1707 + /** Set the input stream. This does not discard the current 1708 + * input buffer. 1709 + * @param in_str A readable stream. 1710 + * 1711 + * @see yy_switch_to_buffer 1712 + */ 1713 + void yyset_in (FILE * in_str ) 1714 + { 1715 + yyin = in_str ; 1716 + } 1717 + 1718 + void yyset_out (FILE * out_str ) 1719 + { 1720 + yyout = out_str ; 1721 + } 1722 + 1723 + int yyget_debug (void) 1724 + { 1725 + return yy_flex_debug; 1726 + } 1727 + 1728 + void yyset_debug (int bdebug ) 1729 + { 1730 + yy_flex_debug = bdebug ; 1731 + } 1732 + 1733 + /* %endif */ 1734 + 1735 + /* %if-reentrant */ 1736 + /* %if-bison-bridge */ 1737 + /* %endif */ 1738 + /* %endif */ 1739 + 1740 + /* %if-c-only */ 1741 + static int yy_init_globals (void) 1742 + { 1743 + /* Initialization is the same as for the non-reentrant scanner. 1744 + * This function is called from yylex_destroy(), so don't allocate here. 1745 + */ 1746 + 1747 + (yy_buffer_stack) = 0; 1748 + (yy_buffer_stack_top) = 0; 1749 + (yy_buffer_stack_max) = 0; 1750 + (yy_c_buf_p) = (char *) 0; 1751 + (yy_init) = 0; 1752 + (yy_start) = 0; 1753 + 1754 + /* Defined in main.c */ 1755 + #ifdef YY_STDINIT 1756 + yyin = stdin; 1757 + yyout = stdout; 1758 + #else 1759 + yyin = (FILE *) 0; 1760 + yyout = (FILE *) 0; 1761 + #endif 1762 + 1763 + /* For future reference: Set errno on error, since we are called by 1764 + * yylex_init() 1765 + */ 1766 + return 0; 1767 + } 1768 + /* %endif */ 1769 + 1770 + /* %if-c-or-c++ */ 1771 + /* %if-c-only */ 1772 + /* yylex_destroy is for both reentrant and non-reentrant scanners. */ 1773 + int yylex_destroy (void) 1774 + /* %endif */ 1775 + /* %if-c++-only */ 1776 + /* %endif */ 1777 + { 1778 + 1779 + /* Pop the buffer stack, destroying each element. */ 1780 + while(YY_CURRENT_BUFFER){ 1781 + yy_delete_buffer(YY_CURRENT_BUFFER ); 1782 + YY_CURRENT_BUFFER_LVALUE = NULL; 1783 + yypop_buffer_state(); 1784 + } 1785 + 1786 + /* Destroy the stack itself. */ 1787 + yyfree((yy_buffer_stack) ); 1788 + (yy_buffer_stack) = NULL; 1789 + 1790 + /* %if-c++-only */ 1791 + /* %endif */ 1792 + 1793 + /* %if-c-only */ 1794 + 1795 + /* Reset the globals. This is important in a non-reentrant scanner so the next time 1796 + * yylex() is called, initialization will occur. */ 1797 + yy_init_globals( ); 1798 + 1799 + /* %if-reentrant */ 1800 + /* %endif */ 1801 + return 0; 1802 + /* %endif */ 1803 + } 1804 + /* %endif */ 1805 + 1806 + /* 1807 + * Internal utility routines. 1808 + */ 2003 1809 2004 1810 #ifndef yytext_ptr 2005 - #ifdef YY_USE_PROTOS 2006 - static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 2007 - #else 2008 - static void yy_flex_strncpy( s1, s2, n ) 2009 - char *s1; 2010 - yyconst char *s2; 2011 - int n; 2012 - #endif 2013 - { 1811 + static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 1812 + { 2014 1813 register int i; 2015 1814 for ( i = 0; i < n; ++i ) 2016 1815 s1[i] = s2[i]; 2017 - } 1816 + } 2018 1817 #endif 2019 1818 2020 1819 #ifdef YY_NEED_STRLEN 2021 - #ifdef YY_USE_PROTOS 2022 - static int yy_flex_strlen( yyconst char *s ) 2023 - #else 2024 - static int yy_flex_strlen( s ) 2025 - yyconst char *s; 2026 - #endif 2027 - { 1820 + static int yy_flex_strlen (yyconst char * s ) 1821 + { 2028 1822 register int n; 2029 1823 for ( n = 0; s[n]; ++n ) 2030 1824 ; 2031 1825 2032 1826 return n; 2033 - } 1827 + } 2034 1828 #endif 2035 1829 2036 - 2037 - #ifdef YY_USE_PROTOS 2038 - static void *yy_flex_alloc( yy_size_t size ) 2039 - #else 2040 - static void *yy_flex_alloc( size ) 2041 - yy_size_t size; 2042 - #endif 2043 - { 1830 + void *yyalloc (yy_size_t size ) 1831 + { 2044 1832 return (void *) malloc( size ); 2045 - } 1833 + } 2046 1834 2047 - #ifdef YY_USE_PROTOS 2048 - static void *yy_flex_realloc( void *ptr, yy_size_t size ) 2049 - #else 2050 - static void *yy_flex_realloc( ptr, size ) 2051 - void *ptr; 2052 - yy_size_t size; 2053 - #endif 2054 - { 1835 + void *yyrealloc (void * ptr, yy_size_t size ) 1836 + { 2055 1837 /* The cast to (char *) in the following accommodates both 2056 1838 * implementations that use char* generic pointers, and those 2057 1839 * that use void* generic pointers. It works with the latter ··· 2199 1703 * as though doing an assignment. 2200 1704 */ 2201 1705 return (void *) realloc( (char *) ptr, size ); 2202 - } 1706 + } 2203 1707 2204 - #ifdef YY_USE_PROTOS 2205 - static void yy_flex_free( void *ptr ) 2206 - #else 2207 - static void yy_flex_free( ptr ) 2208 - void *ptr; 2209 - #endif 2210 - { 2211 - free( ptr ); 2212 - } 1708 + void yyfree (void * ptr ) 1709 + { 1710 + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ 1711 + } 2213 1712 2214 - #if YY_MAIN 2215 - int main() 2216 - { 2217 - yylex(); 2218 - return 0; 2219 - } 2220 - #endif 1713 + /* %if-tables-serialization definitions */ 1714 + /* %define-yytables The name for this specific scanner's tables. */ 1715 + #define YYTABLES_NAME "yytables" 1716 + /* %endif */ 1717 + 1718 + /* %ok-for-header */ 1719 + 2221 1720 #line 95 "scripts/genksyms/lex.l" 1721 + 2222 1722 2223 1723 2224 1724 /* Bring in the keyword recognizer. */ ··· 2528 2036 2529 2037 return token; 2530 2038 } 2531 - /* A Bison parser, made by GNU Bison 2.0. */ 2039 + /* A Bison parser, made by GNU Bison 2.3. */ 2532 2040 2533 - /* Skeleton parser for Yacc-like parsing with Bison, 2534 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 2041 + /* Skeleton interface for Bison's Yacc-like parsers in C 2042 + 2043 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 2044 + Free Software Foundation, Inc. 2535 2045 2536 2046 This program is free software; you can redistribute it and/or modify 2537 2047 it under the terms of the GNU General Public License as published by ··· 2547 2053 2548 2054 You should have received a copy of the GNU General Public License 2549 2055 along with this program; if not, write to the Free Software 2550 - Foundation, Inc., 59 Temple Place - Suite 330, 2551 - Boston, MA 02111-1307, USA. */ 2056 + Foundation, Inc., 51 Franklin Street, Fifth Floor, 2057 + Boston, MA 02110-1301, USA. */ 2552 2058 2553 - /* As a special exception, when this file is copied by Bison into a 2554 - Bison output file, you may use that output file without restriction. 2555 - This special exception was added by the Free Software Foundation 2556 - in version 1.24 of Bison. */ 2059 + /* As a special exception, you may create a larger work that contains 2060 + part or all of the Bison parser skeleton and distribute that work 2061 + under terms of your choice, so long as that work isn't itself a 2062 + parser generator using the skeleton or a modified version thereof 2063 + as a parser skeleton. Alternatively, if you modify or redistribute 2064 + the parser skeleton itself, you may (at your option) remove this 2065 + special exception, which will cause the skeleton and the resulting 2066 + Bison output files to be licensed under the GNU General Public 2067 + License without this special exception. 2068 + 2069 + This special exception was added by the Free Software Foundation in 2070 + version 2.2 of Bison. */ 2557 2071 2558 2072 /* Tokens. */ 2559 2073 #ifndef YYTOKENTYPE ··· 2578 2076 DOUBLE_KEYW = 264, 2579 2077 ENUM_KEYW = 265, 2580 2078 EXTERN_KEYW = 266, 2581 - FLOAT_KEYW = 267, 2582 - INLINE_KEYW = 268, 2583 - INT_KEYW = 269, 2584 - LONG_KEYW = 270, 2585 - REGISTER_KEYW = 271, 2586 - RESTRICT_KEYW = 272, 2587 - SHORT_KEYW = 273, 2588 - SIGNED_KEYW = 274, 2589 - STATIC_KEYW = 275, 2590 - STRUCT_KEYW = 276, 2591 - TYPEDEF_KEYW = 277, 2592 - UNION_KEYW = 278, 2593 - UNSIGNED_KEYW = 279, 2594 - VOID_KEYW = 280, 2595 - VOLATILE_KEYW = 281, 2596 - TYPEOF_KEYW = 282, 2597 - EXPORT_SYMBOL_KEYW = 283, 2598 - ASM_PHRASE = 284, 2599 - ATTRIBUTE_PHRASE = 285, 2600 - BRACE_PHRASE = 286, 2601 - BRACKET_PHRASE = 287, 2602 - EXPRESSION_PHRASE = 288, 2603 - CHAR = 289, 2604 - DOTS = 290, 2605 - IDENT = 291, 2606 - INT = 292, 2607 - REAL = 293, 2608 - STRING = 294, 2609 - TYPE = 295, 2610 - OTHER = 296, 2611 - FILENAME = 297 2079 + EXTENSION_KEYW = 267, 2080 + FLOAT_KEYW = 268, 2081 + INLINE_KEYW = 269, 2082 + INT_KEYW = 270, 2083 + LONG_KEYW = 271, 2084 + REGISTER_KEYW = 272, 2085 + RESTRICT_KEYW = 273, 2086 + SHORT_KEYW = 274, 2087 + SIGNED_KEYW = 275, 2088 + STATIC_KEYW = 276, 2089 + STRUCT_KEYW = 277, 2090 + TYPEDEF_KEYW = 278, 2091 + UNION_KEYW = 279, 2092 + UNSIGNED_KEYW = 280, 2093 + VOID_KEYW = 281, 2094 + VOLATILE_KEYW = 282, 2095 + TYPEOF_KEYW = 283, 2096 + EXPORT_SYMBOL_KEYW = 284, 2097 + ASM_PHRASE = 285, 2098 + ATTRIBUTE_PHRASE = 286, 2099 + BRACE_PHRASE = 287, 2100 + BRACKET_PHRASE = 288, 2101 + EXPRESSION_PHRASE = 289, 2102 + CHAR = 290, 2103 + DOTS = 291, 2104 + IDENT = 292, 2105 + INT = 293, 2106 + REAL = 294, 2107 + STRING = 295, 2108 + TYPE = 296, 2109 + OTHER = 297, 2110 + FILENAME = 298 2612 2111 }; 2613 2112 #endif 2113 + /* Tokens. */ 2614 2114 #define ASM_KEYW 258 2615 2115 #define ATTRIBUTE_KEYW 259 2616 2116 #define AUTO_KEYW 260 ··· 2622 2118 #define DOUBLE_KEYW 264 2623 2119 #define ENUM_KEYW 265 2624 2120 #define EXTERN_KEYW 266 2625 - #define FLOAT_KEYW 267 2626 - #define INLINE_KEYW 268 2627 - #define INT_KEYW 269 2628 - #define LONG_KEYW 270 2629 - #define REGISTER_KEYW 271 2630 - #define RESTRICT_KEYW 272 2631 - #define SHORT_KEYW 273 2632 - #define SIGNED_KEYW 274 2633 - #define STATIC_KEYW 275 2634 - #define STRUCT_KEYW 276 2635 - #define TYPEDEF_KEYW 277 2636 - #define UNION_KEYW 278 2637 - #define UNSIGNED_KEYW 279 2638 - #define VOID_KEYW 280 2639 - #define VOLATILE_KEYW 281 2640 - #define TYPEOF_KEYW 282 2641 - #define EXPORT_SYMBOL_KEYW 283 2642 - #define ASM_PHRASE 284 2643 - #define ATTRIBUTE_PHRASE 285 2644 - #define BRACE_PHRASE 286 2645 - #define BRACKET_PHRASE 287 2646 - #define EXPRESSION_PHRASE 288 2647 - #define CHAR 289 2648 - #define DOTS 290 2649 - #define IDENT 291 2650 - #define INT 292 2651 - #define REAL 293 2652 - #define STRING 294 2653 - #define TYPE 295 2654 - #define OTHER 296 2655 - #define FILENAME 297 2121 + #define EXTENSION_KEYW 267 2122 + #define FLOAT_KEYW 268 2123 + #define INLINE_KEYW 269 2124 + #define INT_KEYW 270 2125 + #define LONG_KEYW 271 2126 + #define REGISTER_KEYW 272 2127 + #define RESTRICT_KEYW 273 2128 + #define SHORT_KEYW 274 2129 + #define SIGNED_KEYW 275 2130 + #define STATIC_KEYW 276 2131 + #define STRUCT_KEYW 277 2132 + #define TYPEDEF_KEYW 278 2133 + #define UNION_KEYW 279 2134 + #define UNSIGNED_KEYW 280 2135 + #define VOID_KEYW 281 2136 + #define VOLATILE_KEYW 282 2137 + #define TYPEOF_KEYW 283 2138 + #define EXPORT_SYMBOL_KEYW 284 2139 + #define ASM_PHRASE 285 2140 + #define ATTRIBUTE_PHRASE 286 2141 + #define BRACE_PHRASE 287 2142 + #define BRACKET_PHRASE 288 2143 + #define EXPRESSION_PHRASE 289 2144 + #define CHAR 290 2145 + #define DOTS 291 2146 + #define IDENT 292 2147 + #define INT 293 2148 + #define REAL 294 2149 + #define STRING 295 2150 + #define TYPE 296 2151 + #define OTHER 297 2152 + #define FILENAME 298 2656 2153 2657 2154 2658 2155 2659 2156 2660 - #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 2157 + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 2661 2158 typedef int YYSTYPE; 2662 2159 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 2663 2160 # define YYSTYPE_IS_DECLARED 1 ··· 2666 2161 #endif 2667 2162 2668 2163 extern YYSTYPE yylval; 2669 - 2670 2164 2671 2165
+1263 -961
scripts/genksyms/parse.c_shipped
··· 1 - /* A Bison parser, made by GNU Bison 2.0. */ 1 + /* A Bison parser, made by GNU Bison 2.3. */ 2 2 3 - /* Skeleton parser for Yacc-like parsing with Bison, 4 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 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. 5 7 6 8 This program is free software; you can redistribute it and/or modify 7 9 it under the terms of the GNU General Public License as published by ··· 17 15 18 16 You should have received a copy of the GNU General Public License 19 17 along with this program; if not, write to the Free Software 20 - Foundation, Inc., 59 Temple Place - Suite 330, 21 - Boston, MA 02111-1307, USA. */ 18 + Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 + Boston, MA 02110-1301, USA. */ 22 20 23 - /* As a special exception, when this file is copied by Bison into a 24 - Bison output file, you may use that output file without restriction. 25 - This special exception was added by the Free Software Foundation 26 - in version 1.24 of Bison. */ 21 + /* As a special exception, you may create a larger work that contains 22 + part or all of the Bison parser skeleton and distribute that work 23 + under terms of your choice, so long as that work isn't itself a 24 + parser generator using the skeleton or a modified version thereof 25 + as a parser skeleton. Alternatively, if you modify or redistribute 26 + the parser skeleton itself, you may (at your option) remove this 27 + special exception, which will cause the skeleton and the resulting 28 + Bison output files to be licensed under the GNU General Public 29 + License without this special exception. 27 30 28 - /* Written by Richard Stallman by simplifying the original so called 29 - ``semantic'' parser. */ 31 + This special exception was added by the Free Software Foundation in 32 + version 2.2 of Bison. */ 33 + 34 + /* C LALR(1) parser skeleton written by Richard Stallman, by 35 + simplifying the original so-called "semantic" parser. */ 30 36 31 37 /* All symbols defined below should begin with yy or YY, to avoid 32 38 infringing on user name space. This should be done even for local ··· 45 35 46 36 /* Identify Bison output. */ 47 37 #define YYBISON 1 38 + 39 + /* Bison version. */ 40 + #define YYBISON_VERSION "2.3" 48 41 49 42 /* Skeleton name. */ 50 43 #define YYSKELETON_NAME "yacc.c" ··· 75 62 DOUBLE_KEYW = 264, 76 63 ENUM_KEYW = 265, 77 64 EXTERN_KEYW = 266, 78 - FLOAT_KEYW = 267, 79 - INLINE_KEYW = 268, 80 - INT_KEYW = 269, 81 - LONG_KEYW = 270, 82 - REGISTER_KEYW = 271, 83 - RESTRICT_KEYW = 272, 84 - SHORT_KEYW = 273, 85 - SIGNED_KEYW = 274, 86 - STATIC_KEYW = 275, 87 - STRUCT_KEYW = 276, 88 - TYPEDEF_KEYW = 277, 89 - UNION_KEYW = 278, 90 - UNSIGNED_KEYW = 279, 91 - VOID_KEYW = 280, 92 - VOLATILE_KEYW = 281, 93 - TYPEOF_KEYW = 282, 94 - EXPORT_SYMBOL_KEYW = 283, 95 - ASM_PHRASE = 284, 96 - ATTRIBUTE_PHRASE = 285, 97 - BRACE_PHRASE = 286, 98 - BRACKET_PHRASE = 287, 99 - EXPRESSION_PHRASE = 288, 100 - CHAR = 289, 101 - DOTS = 290, 102 - IDENT = 291, 103 - INT = 292, 104 - REAL = 293, 105 - STRING = 294, 106 - TYPE = 295, 107 - OTHER = 296, 108 - FILENAME = 297 65 + EXTENSION_KEYW = 267, 66 + FLOAT_KEYW = 268, 67 + INLINE_KEYW = 269, 68 + INT_KEYW = 270, 69 + LONG_KEYW = 271, 70 + REGISTER_KEYW = 272, 71 + RESTRICT_KEYW = 273, 72 + SHORT_KEYW = 274, 73 + SIGNED_KEYW = 275, 74 + STATIC_KEYW = 276, 75 + STRUCT_KEYW = 277, 76 + TYPEDEF_KEYW = 278, 77 + UNION_KEYW = 279, 78 + UNSIGNED_KEYW = 280, 79 + VOID_KEYW = 281, 80 + VOLATILE_KEYW = 282, 81 + TYPEOF_KEYW = 283, 82 + EXPORT_SYMBOL_KEYW = 284, 83 + ASM_PHRASE = 285, 84 + ATTRIBUTE_PHRASE = 286, 85 + BRACE_PHRASE = 287, 86 + BRACKET_PHRASE = 288, 87 + EXPRESSION_PHRASE = 289, 88 + CHAR = 290, 89 + DOTS = 291, 90 + IDENT = 292, 91 + INT = 293, 92 + REAL = 294, 93 + STRING = 295, 94 + TYPE = 296, 95 + OTHER = 297, 96 + FILENAME = 298 109 97 }; 110 98 #endif 99 + /* Tokens. */ 111 100 #define ASM_KEYW 258 112 101 #define ATTRIBUTE_KEYW 259 113 102 #define AUTO_KEYW 260 ··· 119 104 #define DOUBLE_KEYW 264 120 105 #define ENUM_KEYW 265 121 106 #define EXTERN_KEYW 266 122 - #define FLOAT_KEYW 267 123 - #define INLINE_KEYW 268 124 - #define INT_KEYW 269 125 - #define LONG_KEYW 270 126 - #define REGISTER_KEYW 271 127 - #define RESTRICT_KEYW 272 128 - #define SHORT_KEYW 273 129 - #define SIGNED_KEYW 274 130 - #define STATIC_KEYW 275 131 - #define STRUCT_KEYW 276 132 - #define TYPEDEF_KEYW 277 133 - #define UNION_KEYW 278 134 - #define UNSIGNED_KEYW 279 135 - #define VOID_KEYW 280 136 - #define VOLATILE_KEYW 281 137 - #define TYPEOF_KEYW 282 138 - #define EXPORT_SYMBOL_KEYW 283 139 - #define ASM_PHRASE 284 140 - #define ATTRIBUTE_PHRASE 285 141 - #define BRACE_PHRASE 286 142 - #define BRACKET_PHRASE 287 143 - #define EXPRESSION_PHRASE 288 144 - #define CHAR 289 145 - #define DOTS 290 146 - #define IDENT 291 147 - #define INT 292 148 - #define REAL 293 149 - #define STRING 294 150 - #define TYPE 295 151 - #define OTHER 296 152 - #define FILENAME 297 107 + #define EXTENSION_KEYW 267 108 + #define FLOAT_KEYW 268 109 + #define INLINE_KEYW 269 110 + #define INT_KEYW 270 111 + #define LONG_KEYW 271 112 + #define REGISTER_KEYW 272 113 + #define RESTRICT_KEYW 273 114 + #define SHORT_KEYW 274 115 + #define SIGNED_KEYW 275 116 + #define STATIC_KEYW 276 117 + #define STRUCT_KEYW 277 118 + #define TYPEDEF_KEYW 278 119 + #define UNION_KEYW 279 120 + #define UNSIGNED_KEYW 280 121 + #define VOID_KEYW 281 122 + #define VOLATILE_KEYW 282 123 + #define TYPEOF_KEYW 283 124 + #define EXPORT_SYMBOL_KEYW 284 125 + #define ASM_PHRASE 285 126 + #define ATTRIBUTE_PHRASE 286 127 + #define BRACE_PHRASE 287 128 + #define BRACKET_PHRASE 288 129 + #define EXPRESSION_PHRASE 289 130 + #define CHAR 290 131 + #define DOTS 291 132 + #define IDENT 292 133 + #define INT 293 134 + #define REAL 294 135 + #define STRING 295 136 + #define TYPE 296 137 + #define OTHER 297 138 + #define FILENAME 298 153 139 154 140 155 141 ··· 201 185 # define YYERROR_VERBOSE 0 202 186 #endif 203 187 204 - #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 188 + /* Enabling the token table. */ 189 + #ifndef YYTOKEN_TABLE 190 + # define YYTOKEN_TABLE 0 191 + #endif 192 + 193 + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 205 194 typedef int YYSTYPE; 206 195 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 207 196 # define YYSTYPE_IS_DECLARED 1 ··· 218 197 /* Copy the second part of user declarations. */ 219 198 220 199 221 - /* Line 213 of yacc.c. */ 222 - #line 202 "scripts/genksyms/parse.c" 200 + /* Line 216 of yacc.c. */ 201 + #line 223 "scripts/genksyms/parse.c" 223 202 224 - #if ! defined (yyoverflow) || YYERROR_VERBOSE 203 + #ifdef short 204 + # undef short 205 + #endif 225 206 226 - # ifndef YYFREE 227 - # define YYFREE free 207 + #ifdef YYTYPE_UINT8 208 + typedef YYTYPE_UINT8 yytype_uint8; 209 + #else 210 + typedef unsigned char yytype_uint8; 211 + #endif 212 + 213 + #ifdef YYTYPE_INT8 214 + typedef YYTYPE_INT8 yytype_int8; 215 + #elif (defined __STDC__ || defined __C99__FUNC__ \ 216 + || defined __cplusplus || defined _MSC_VER) 217 + typedef signed char yytype_int8; 218 + #else 219 + typedef short int yytype_int8; 220 + #endif 221 + 222 + #ifdef YYTYPE_UINT16 223 + typedef YYTYPE_UINT16 yytype_uint16; 224 + #else 225 + typedef unsigned short int yytype_uint16; 226 + #endif 227 + 228 + #ifdef YYTYPE_INT16 229 + typedef YYTYPE_INT16 yytype_int16; 230 + #else 231 + typedef short int yytype_int16; 232 + #endif 233 + 234 + #ifndef YYSIZE_T 235 + # ifdef __SIZE_TYPE__ 236 + # define YYSIZE_T __SIZE_TYPE__ 237 + # elif defined size_t 238 + # define YYSIZE_T size_t 239 + # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 240 + || defined __cplusplus || defined _MSC_VER) 241 + # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 242 + # define YYSIZE_T size_t 243 + # else 244 + # define YYSIZE_T unsigned int 228 245 # endif 229 - # ifndef YYMALLOC 230 - # define YYMALLOC malloc 246 + #endif 247 + 248 + #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 249 + 250 + #ifndef YY_ 251 + # if YYENABLE_NLS 252 + # if ENABLE_NLS 253 + # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 254 + # define YY_(msgid) dgettext ("bison-runtime", msgid) 255 + # endif 231 256 # endif 257 + # ifndef YY_ 258 + # define YY_(msgid) msgid 259 + # endif 260 + #endif 261 + 262 + /* Suppress unused-variable warnings by "using" E. */ 263 + #if ! defined lint || defined __GNUC__ 264 + # define YYUSE(e) ((void) (e)) 265 + #else 266 + # define YYUSE(e) /* empty */ 267 + #endif 268 + 269 + /* Identity function, used to suppress warnings about constant conditions. */ 270 + #ifndef lint 271 + # define YYID(n) (n) 272 + #else 273 + #if (defined __STDC__ || defined __C99__FUNC__ \ 274 + || defined __cplusplus || defined _MSC_VER) 275 + static int 276 + YYID (int i) 277 + #else 278 + static int 279 + YYID (i) 280 + int i; 281 + #endif 282 + { 283 + return i; 284 + } 285 + #endif 286 + 287 + #if ! defined yyoverflow || YYERROR_VERBOSE 232 288 233 289 /* The parser invokes alloca or malloc; define the necessary symbols. */ 234 290 ··· 313 215 # if YYSTACK_USE_ALLOCA 314 216 # ifdef __GNUC__ 315 217 # define YYSTACK_ALLOC __builtin_alloca 218 + # elif defined __BUILTIN_VA_ARG_INCR 219 + # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 220 + # elif defined _AIX 221 + # define YYSTACK_ALLOC __alloca 222 + # elif defined _MSC_VER 223 + # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 224 + # define alloca _alloca 316 225 # else 317 226 # define YYSTACK_ALLOC alloca 227 + # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 228 + || defined __cplusplus || defined _MSC_VER) 229 + # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 230 + # ifndef _STDLIB_H 231 + # define _STDLIB_H 1 232 + # endif 233 + # endif 318 234 # endif 319 235 # endif 320 236 # endif 321 237 322 238 # ifdef YYSTACK_ALLOC 323 - /* Pacify GCC's `empty if-body' warning. */ 324 - # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 325 - # else 326 - # if defined (__STDC__) || defined (__cplusplus) 327 - # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 328 - # define YYSIZE_T size_t 239 + /* Pacify GCC's `empty if-body' warning. */ 240 + # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 241 + # ifndef YYSTACK_ALLOC_MAXIMUM 242 + /* The OS might guarantee only one guard page at the bottom of the stack, 243 + and a page size can be as small as 4096 bytes. So we cannot safely 244 + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 245 + to allow for a few compiler-allocated temporary stack slots. */ 246 + # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 329 247 # endif 248 + # else 330 249 # define YYSTACK_ALLOC YYMALLOC 331 250 # define YYSTACK_FREE YYFREE 251 + # ifndef YYSTACK_ALLOC_MAXIMUM 252 + # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 253 + # endif 254 + # if (defined __cplusplus && ! defined _STDLIB_H \ 255 + && ! ((defined YYMALLOC || defined malloc) \ 256 + && (defined YYFREE || defined free))) 257 + # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 258 + # ifndef _STDLIB_H 259 + # define _STDLIB_H 1 260 + # endif 261 + # endif 262 + # ifndef YYMALLOC 263 + # define YYMALLOC malloc 264 + # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 265 + || defined __cplusplus || defined _MSC_VER) 266 + void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 267 + # endif 268 + # endif 269 + # ifndef YYFREE 270 + # define YYFREE free 271 + # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 272 + || defined __cplusplus || defined _MSC_VER) 273 + void free (void *); /* INFRINGES ON USER NAME SPACE */ 274 + # endif 275 + # endif 332 276 # endif 333 - #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ 277 + #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 334 278 335 279 336 - #if (! defined (yyoverflow) \ 337 - && (! defined (__cplusplus) \ 338 - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) 280 + #if (! defined yyoverflow \ 281 + && (! defined __cplusplus \ 282 + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 339 283 340 284 /* A type that is properly aligned for any stack member. */ 341 285 union yyalloc 342 286 { 343 - short int yyss; 287 + yytype_int16 yyss; 344 288 YYSTYPE yyvs; 345 289 }; 346 290 ··· 392 252 /* The size of an array large to enough to hold all stacks, each with 393 253 N elements. */ 394 254 # define YYSTACK_BYTES(N) \ 395 - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ 255 + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 396 256 + YYSTACK_GAP_MAXIMUM) 397 257 398 258 /* Copy COUNT objects from FROM to TO. The source and destination do 399 259 not overlap. */ 400 260 # ifndef YYCOPY 401 - # if defined (__GNUC__) && 1 < __GNUC__ 261 + # if defined __GNUC__ && 1 < __GNUC__ 402 262 # define YYCOPY(To, From, Count) \ 403 263 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 404 264 # else 405 265 # define YYCOPY(To, From, Count) \ 406 266 do \ 407 267 { \ 408 - register YYSIZE_T yyi; \ 268 + YYSIZE_T yyi; \ 409 269 for (yyi = 0; yyi < (Count); yyi++) \ 410 270 (To)[yyi] = (From)[yyi]; \ 411 271 } \ 412 - while (0) 272 + while (YYID (0)) 413 273 # endif 414 274 # endif 415 275 ··· 427 287 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 428 288 yyptr += yynewbytes / sizeof (*yyptr); \ 429 289 } \ 430 - while (0) 290 + while (YYID (0)) 431 291 432 292 #endif 433 293 434 - #if defined (__STDC__) || defined (__cplusplus) 435 - typedef signed char yysigned_char; 436 - #else 437 - typedef short int yysigned_char; 438 - #endif 439 - 440 - /* YYFINAL -- State number of the termination state. */ 294 + /* YYFINAL -- State number of the termination state. */ 441 295 #define YYFINAL 4 442 296 /* YYLAST -- Last index in YYTABLE. */ 443 - #define YYLAST 535 297 + #define YYLAST 523 444 298 445 - /* YYNTOKENS -- Number of terminals. */ 446 - #define YYNTOKENS 52 447 - /* YYNNTS -- Number of nonterminals. */ 448 - #define YYNNTS 45 449 - /* YYNRULES -- Number of rules. */ 450 - #define YYNRULES 124 451 - /* YYNRULES -- Number of states. */ 452 - #define YYNSTATES 174 299 + /* YYNTOKENS -- Number of terminals. */ 300 + #define YYNTOKENS 53 301 + /* YYNNTS -- Number of nonterminals. */ 302 + #define YYNNTS 46 303 + /* YYNRULES -- Number of rules. */ 304 + #define YYNRULES 126 305 + /* YYNRULES -- Number of states. */ 306 + #define YYNSTATES 178 453 307 454 308 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 455 309 #define YYUNDEFTOK 2 456 - #define YYMAXUTOK 297 310 + #define YYMAXUTOK 298 457 311 458 - #define YYTRANSLATE(YYX) \ 312 + #define YYTRANSLATE(YYX) \ 459 313 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 460 314 461 315 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 462 - static const unsigned char yytranslate[] = 316 + static const yytype_uint8 yytranslate[] = 463 317 { 464 318 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 465 319 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 466 320 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 467 321 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 468 - 46, 48, 47, 2, 45, 2, 2, 2, 2, 2, 469 - 2, 2, 2, 2, 2, 2, 2, 2, 51, 43, 470 - 2, 49, 2, 2, 2, 2, 2, 2, 2, 2, 322 + 47, 49, 48, 2, 46, 2, 2, 2, 2, 2, 323 + 2, 2, 2, 2, 2, 2, 2, 2, 52, 44, 324 + 2, 50, 2, 2, 2, 2, 2, 2, 2, 2, 471 325 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 472 326 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 473 327 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 474 328 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 475 329 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 476 - 2, 2, 2, 50, 2, 44, 2, 2, 2, 2, 330 + 2, 2, 2, 51, 2, 45, 2, 2, 2, 2, 477 331 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 478 332 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 479 333 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ··· 484 350 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 485 351 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 486 352 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 487 - 35, 36, 37, 38, 39, 40, 41, 42 353 + 35, 36, 37, 38, 39, 40, 41, 42, 43 488 354 }; 489 355 490 356 #if YYDEBUG 491 357 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 492 358 YYRHS. */ 493 - static const unsigned short int yyprhs[] = 359 + static const yytype_uint16 yyprhs[] = 494 360 { 495 - 0, 0, 3, 5, 8, 9, 12, 13, 17, 19, 496 - 21, 23, 25, 28, 31, 35, 36, 38, 40, 44, 497 - 49, 50, 52, 54, 57, 59, 61, 63, 65, 67, 498 - 69, 71, 73, 75, 81, 86, 89, 92, 95, 99, 499 - 103, 107, 110, 113, 116, 118, 120, 122, 124, 126, 500 - 128, 130, 132, 134, 136, 138, 141, 142, 144, 146, 501 - 149, 151, 153, 155, 157, 160, 162, 164, 169, 174, 502 - 177, 181, 185, 188, 190, 192, 194, 199, 204, 207, 503 - 211, 215, 218, 220, 224, 225, 227, 229, 233, 236, 504 - 239, 241, 242, 244, 246, 251, 256, 259, 263, 267, 505 - 271, 272, 274, 277, 281, 285, 286, 288, 290, 293, 506 - 297, 300, 301, 303, 305, 309, 312, 315, 317, 320, 507 - 321, 323, 326, 327, 329 361 + 0, 0, 3, 5, 8, 9, 12, 13, 18, 19, 362 + 23, 25, 27, 29, 31, 34, 37, 41, 42, 44, 363 + 46, 50, 55, 56, 58, 60, 63, 65, 67, 69, 364 + 71, 73, 75, 77, 79, 81, 87, 92, 95, 98, 365 + 101, 105, 109, 113, 116, 119, 122, 124, 126, 128, 366 + 130, 132, 134, 136, 138, 140, 142, 144, 147, 148, 367 + 150, 152, 155, 157, 159, 161, 163, 166, 168, 170, 368 + 175, 180, 183, 187, 191, 194, 196, 198, 200, 205, 369 + 210, 213, 217, 221, 224, 226, 230, 231, 233, 235, 370 + 239, 242, 245, 247, 248, 250, 252, 257, 262, 265, 371 + 269, 273, 277, 278, 280, 283, 287, 291, 292, 294, 372 + 296, 299, 303, 306, 307, 309, 311, 315, 318, 321, 373 + 323, 326, 327, 329, 332, 333, 335 508 374 }; 509 375 510 - /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 511 - static const yysigned_char yyrhs[] = 376 + /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 377 + static const yytype_int8 yyrhs[] = 512 378 { 513 - 53, 0, -1, 54, -1, 53, 54, -1, -1, 55, 514 - 56, -1, -1, 22, 57, 58, -1, 58, -1, 82, 515 - -1, 94, -1, 96, -1, 1, 43, -1, 1, 44, 516 - -1, 62, 59, 43, -1, -1, 60, -1, 61, -1, 517 - 60, 45, 61, -1, 72, 95, 93, 83, -1, -1, 518 - 63, -1, 64, -1, 63, 64, -1, 65, -1, 66, 519 - -1, 5, -1, 16, -1, 20, -1, 11, -1, 13, 520 - -1, 67, -1, 71, -1, 27, 46, 63, 47, 48, 521 - -1, 27, 46, 63, 48, -1, 21, 36, -1, 23, 522 - 36, -1, 10, 36, -1, 21, 36, 85, -1, 23, 523 - 36, 85, -1, 10, 36, 31, -1, 10, 31, -1, 524 - 21, 85, -1, 23, 85, -1, 7, -1, 18, -1, 525 - 14, -1, 15, -1, 19, -1, 24, -1, 12, -1, 526 - 9, -1, 25, -1, 6, -1, 40, -1, 47, 69, 527 - -1, -1, 70, -1, 71, -1, 70, 71, -1, 8, 528 - -1, 26, -1, 30, -1, 17, -1, 68, 72, -1, 529 - 73, -1, 36, -1, 73, 46, 76, 48, -1, 73, 530 - 46, 1, 48, -1, 73, 32, -1, 46, 72, 48, 531 - -1, 46, 1, 48, -1, 68, 74, -1, 75, -1, 532 - 36, -1, 40, -1, 75, 46, 76, 48, -1, 75, 533 - 46, 1, 48, -1, 75, 32, -1, 46, 74, 48, 534 - -1, 46, 1, 48, -1, 77, 35, -1, 77, -1, 535 - 78, 45, 35, -1, -1, 78, -1, 79, -1, 78, 536 - 45, 79, -1, 63, 80, -1, 68, 80, -1, 81, 537 - -1, -1, 36, -1, 40, -1, 81, 46, 76, 48, 538 - -1, 81, 46, 1, 48, -1, 81, 32, -1, 46, 539 - 80, 48, -1, 46, 1, 48, -1, 62, 72, 31, 540 - -1, -1, 84, -1, 49, 33, -1, 50, 86, 44, 541 - -1, 50, 1, 44, -1, -1, 87, -1, 88, -1, 542 - 87, 88, -1, 62, 89, 43, -1, 1, 43, -1, 543 - -1, 90, -1, 91, -1, 90, 45, 91, -1, 74, 544 - 93, -1, 36, 92, -1, 92, -1, 51, 33, -1, 545 - -1, 30, -1, 29, 43, -1, -1, 29, -1, 28, 546 - 46, 36, 48, 43, -1 379 + 54, 0, -1, 55, -1, 54, 55, -1, -1, 56, 380 + 57, -1, -1, 12, 23, 58, 60, -1, -1, 23, 381 + 59, 60, -1, 60, -1, 84, -1, 96, -1, 98, 382 + -1, 1, 44, -1, 1, 45, -1, 64, 61, 44, 383 + -1, -1, 62, -1, 63, -1, 62, 46, 63, -1, 384 + 74, 97, 95, 85, -1, -1, 65, -1, 66, -1, 385 + 65, 66, -1, 67, -1, 68, -1, 5, -1, 17, 386 + -1, 21, -1, 11, -1, 14, -1, 69, -1, 73, 387 + -1, 28, 47, 65, 48, 49, -1, 28, 47, 65, 388 + 49, -1, 22, 37, -1, 24, 37, -1, 10, 37, 389 + -1, 22, 37, 87, -1, 24, 37, 87, -1, 10, 390 + 37, 32, -1, 10, 32, -1, 22, 87, -1, 24, 391 + 87, -1, 7, -1, 19, -1, 15, -1, 16, -1, 392 + 20, -1, 25, -1, 13, -1, 9, -1, 26, -1, 393 + 6, -1, 41, -1, 48, 71, -1, -1, 72, -1, 394 + 73, -1, 72, 73, -1, 8, -1, 27, -1, 31, 395 + -1, 18, -1, 70, 74, -1, 75, -1, 37, -1, 396 + 75, 47, 78, 49, -1, 75, 47, 1, 49, -1, 397 + 75, 33, -1, 47, 74, 49, -1, 47, 1, 49, 398 + -1, 70, 76, -1, 77, -1, 37, -1, 41, -1, 399 + 77, 47, 78, 49, -1, 77, 47, 1, 49, -1, 400 + 77, 33, -1, 47, 76, 49, -1, 47, 1, 49, 401 + -1, 79, 36, -1, 79, -1, 80, 46, 36, -1, 402 + -1, 80, -1, 81, -1, 80, 46, 81, -1, 65, 403 + 82, -1, 70, 82, -1, 83, -1, -1, 37, -1, 404 + 41, -1, 83, 47, 78, 49, -1, 83, 47, 1, 405 + 49, -1, 83, 33, -1, 47, 82, 49, -1, 47, 406 + 1, 49, -1, 64, 74, 32, -1, -1, 86, -1, 407 + 50, 34, -1, 51, 88, 45, -1, 51, 1, 45, 408 + -1, -1, 89, -1, 90, -1, 89, 90, -1, 64, 409 + 91, 44, -1, 1, 44, -1, -1, 92, -1, 93, 410 + -1, 92, 46, 93, -1, 76, 95, -1, 37, 94, 411 + -1, 94, -1, 52, 34, -1, -1, 31, -1, 30, 412 + 44, -1, -1, 30, -1, 29, 47, 37, 49, 44, 413 + -1 547 414 }; 548 415 549 416 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 550 - static const unsigned short int yyrline[] = 417 + static const yytype_uint16 yyrline[] = 551 418 { 552 - 0, 102, 102, 103, 107, 107, 113, 113, 115, 116, 553 - 117, 118, 119, 120, 124, 138, 139, 143, 151, 164, 554 - 170, 171, 175, 176, 180, 186, 190, 191, 192, 193, 555 - 194, 198, 199, 200, 201, 205, 207, 209, 213, 220, 556 - 227, 236, 237, 238, 242, 243, 244, 245, 246, 247, 557 - 248, 249, 250, 251, 252, 256, 261, 262, 266, 267, 558 - 271, 271, 271, 272, 280, 281, 285, 294, 296, 298, 559 - 300, 302, 309, 310, 314, 315, 316, 318, 320, 322, 560 - 324, 329, 330, 331, 335, 336, 340, 341, 346, 351, 561 - 353, 357, 358, 366, 370, 372, 374, 376, 378, 383, 562 - 392, 393, 398, 403, 404, 408, 409, 413, 414, 418, 563 - 420, 425, 426, 430, 431, 435, 436, 437, 441, 445, 564 - 446, 450, 454, 455, 459 419 + 0, 103, 103, 104, 108, 108, 114, 114, 116, 116, 420 + 118, 119, 120, 121, 122, 123, 127, 141, 142, 146, 421 + 154, 167, 173, 174, 178, 179, 183, 189, 193, 194, 422 + 195, 196, 197, 201, 202, 203, 204, 208, 210, 212, 423 + 216, 223, 230, 239, 240, 241, 245, 246, 247, 248, 424 + 249, 250, 251, 252, 253, 254, 255, 259, 264, 265, 425 + 269, 270, 274, 274, 274, 275, 283, 284, 288, 297, 426 + 299, 301, 303, 305, 312, 313, 317, 318, 319, 321, 427 + 323, 325, 327, 332, 333, 334, 338, 339, 343, 344, 428 + 349, 354, 356, 360, 361, 369, 373, 375, 377, 379, 429 + 381, 386, 395, 396, 401, 406, 407, 411, 412, 416, 430 + 417, 421, 423, 428, 429, 433, 434, 438, 439, 440, 431 + 444, 448, 449, 453, 457, 458, 462 565 432 }; 566 433 #endif 567 434 568 - #if YYDEBUG || YYERROR_VERBOSE 569 - /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 570 - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 435 + #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 436 + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 437 + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 571 438 static const char *const yytname[] = 572 439 { 573 440 "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW", 574 441 "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW", 575 - "ENUM_KEYW", "EXTERN_KEYW", "FLOAT_KEYW", "INLINE_KEYW", "INT_KEYW", 576 - "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW", "SHORT_KEYW", 577 - "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", "TYPEDEF_KEYW", 578 - "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", "VOLATILE_KEYW", 579 - "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", "ATTRIBUTE_PHRASE", 580 - "BRACE_PHRASE", "BRACKET_PHRASE", "EXPRESSION_PHRASE", "CHAR", "DOTS", 581 - "IDENT", "INT", "REAL", "STRING", "TYPE", "OTHER", "FILENAME", "';'", 582 - "'}'", "','", "'('", "'*'", "')'", "'='", "'{'", "':'", "$accept", 583 - "declaration_seq", "declaration", "@1", "declaration1", "@2", 584 - "simple_declaration", "init_declarator_list_opt", "init_declarator_list", 585 - "init_declarator", "decl_specifier_seq_opt", "decl_specifier_seq", 586 - "decl_specifier", "storage_class_specifier", "type_specifier", 587 - "simple_type_specifier", "ptr_operator", "cvar_qualifier_seq_opt", 588 - "cvar_qualifier_seq", "cvar_qualifier", "declarator", 589 - "direct_declarator", "nested_declarator", "direct_nested_declarator", 590 - "parameter_declaration_clause", "parameter_declaration_list_opt", 591 - "parameter_declaration_list", "parameter_declaration", 592 - "m_abstract_declarator", "direct_m_abstract_declarator", 593 - "function_definition", "initializer_opt", "initializer", "class_body", 594 - "member_specification_opt", "member_specification", "member_declaration", 442 + "ENUM_KEYW", "EXTERN_KEYW", "EXTENSION_KEYW", "FLOAT_KEYW", 443 + "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW", 444 + "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", 445 + "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", 446 + "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", 447 + "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE", 448 + "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING", 449 + "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'", 450 + "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "@1", 451 + "declaration1", "@2", "@3", "simple_declaration", 452 + "init_declarator_list_opt", "init_declarator_list", "init_declarator", 453 + "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier", 454 + "storage_class_specifier", "type_specifier", "simple_type_specifier", 455 + "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq", 456 + "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator", 457 + "direct_nested_declarator", "parameter_declaration_clause", 458 + "parameter_declaration_list_opt", "parameter_declaration_list", 459 + "parameter_declaration", "m_abstract_declarator", 460 + "direct_m_abstract_declarator", "function_definition", "initializer_opt", 461 + "initializer", "class_body", "member_specification_opt", 462 + "member_specification", "member_declaration", 595 463 "member_declarator_list_opt", "member_declarator_list", 596 464 "member_declarator", "member_bitfield_declarator", "attribute_opt", 597 465 "asm_definition", "asm_phrase_opt", "export_definition", 0 ··· 603 467 # ifdef YYPRINT 604 468 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 605 469 token YYLEX-NUM. */ 606 - static const unsigned short int yytoknum[] = 470 + static const yytype_uint16 yytoknum[] = 607 471 { 608 472 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 609 473 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 610 474 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 611 475 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 612 - 295, 296, 297, 59, 125, 44, 40, 42, 41, 61, 613 - 123, 58 476 + 295, 296, 297, 298, 59, 125, 44, 40, 42, 41, 477 + 61, 123, 58 614 478 }; 615 479 # endif 616 480 617 481 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 618 - static const unsigned char yyr1[] = 482 + static const yytype_uint8 yyr1[] = 619 483 { 620 - 0, 52, 53, 53, 55, 54, 57, 56, 56, 56, 621 - 56, 56, 56, 56, 58, 59, 59, 60, 60, 61, 622 - 62, 62, 63, 63, 64, 64, 65, 65, 65, 65, 623 - 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 624 - 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 625 - 67, 67, 67, 67, 67, 68, 69, 69, 70, 70, 626 - 71, 71, 71, 71, 72, 72, 73, 73, 73, 73, 627 - 73, 73, 74, 74, 75, 75, 75, 75, 75, 75, 628 - 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 629 - 80, 81, 81, 81, 81, 81, 81, 81, 81, 82, 630 - 83, 83, 84, 85, 85, 86, 86, 87, 87, 88, 631 - 88, 89, 89, 90, 90, 91, 91, 91, 92, 93, 632 - 93, 94, 95, 95, 96 484 + 0, 53, 54, 54, 56, 55, 58, 57, 59, 57, 485 + 57, 57, 57, 57, 57, 57, 60, 61, 61, 62, 486 + 62, 63, 64, 64, 65, 65, 66, 66, 67, 67, 487 + 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, 488 + 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 489 + 69, 69, 69, 69, 69, 69, 69, 70, 71, 71, 490 + 72, 72, 73, 73, 73, 73, 74, 74, 75, 75, 491 + 75, 75, 75, 75, 76, 76, 77, 77, 77, 77, 492 + 77, 77, 77, 78, 78, 78, 79, 79, 80, 80, 493 + 81, 82, 82, 83, 83, 83, 83, 83, 83, 83, 494 + 83, 84, 85, 85, 86, 87, 87, 88, 88, 89, 495 + 89, 90, 90, 91, 91, 92, 92, 93, 93, 93, 496 + 94, 95, 95, 96, 97, 97, 98 633 497 }; 634 498 635 499 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 636 - static const unsigned char yyr2[] = 500 + static const yytype_uint8 yyr2[] = 637 501 { 638 - 0, 2, 1, 2, 0, 2, 0, 3, 1, 1, 639 - 1, 1, 2, 2, 3, 0, 1, 1, 3, 4, 640 - 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 641 - 1, 1, 1, 5, 4, 2, 2, 2, 3, 3, 642 - 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 643 - 1, 1, 1, 1, 1, 2, 0, 1, 1, 2, 644 - 1, 1, 1, 1, 2, 1, 1, 4, 4, 2, 645 - 3, 3, 2, 1, 1, 1, 4, 4, 2, 3, 646 - 3, 2, 1, 3, 0, 1, 1, 3, 2, 2, 647 - 1, 0, 1, 1, 4, 4, 2, 3, 3, 3, 648 - 0, 1, 2, 3, 3, 0, 1, 1, 2, 3, 649 - 2, 0, 1, 1, 3, 2, 2, 1, 2, 0, 650 - 1, 2, 0, 1, 5 502 + 0, 2, 1, 2, 0, 2, 0, 4, 0, 3, 503 + 1, 1, 1, 1, 2, 2, 3, 0, 1, 1, 504 + 3, 4, 0, 1, 1, 2, 1, 1, 1, 1, 505 + 1, 1, 1, 1, 1, 5, 4, 2, 2, 2, 506 + 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 507 + 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 508 + 1, 2, 1, 1, 1, 1, 2, 1, 1, 4, 509 + 4, 2, 3, 3, 2, 1, 1, 1, 4, 4, 510 + 2, 3, 3, 2, 1, 3, 0, 1, 1, 3, 511 + 2, 2, 1, 0, 1, 1, 4, 4, 2, 3, 512 + 3, 3, 0, 1, 2, 3, 3, 0, 1, 1, 513 + 2, 3, 2, 0, 1, 1, 3, 2, 2, 1, 514 + 2, 0, 1, 2, 0, 1, 5 651 515 }; 652 516 653 517 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 654 518 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 655 519 means the default is an error. */ 656 - static const unsigned char yydefact[] = 520 + static const yytype_uint8 yydefact[] = 657 521 { 658 - 4, 4, 2, 0, 1, 3, 0, 26, 53, 44, 659 - 60, 51, 0, 29, 50, 30, 46, 47, 27, 63, 660 - 45, 48, 28, 0, 6, 0, 49, 52, 61, 0, 661 - 0, 0, 62, 54, 5, 8, 15, 21, 22, 24, 662 - 25, 31, 32, 9, 10, 11, 12, 13, 41, 37, 663 - 35, 0, 42, 20, 36, 43, 0, 0, 121, 66, 664 - 0, 56, 0, 16, 17, 0, 122, 65, 23, 40, 665 - 38, 0, 111, 0, 0, 107, 7, 15, 39, 0, 666 - 0, 0, 0, 55, 57, 58, 14, 0, 64, 123, 667 - 99, 119, 69, 0, 110, 104, 74, 75, 0, 0, 668 - 0, 119, 73, 0, 112, 113, 117, 103, 0, 108, 669 - 122, 0, 34, 0, 71, 70, 59, 18, 120, 100, 670 - 0, 91, 0, 82, 85, 86, 116, 0, 74, 0, 671 - 118, 72, 115, 78, 0, 109, 0, 33, 124, 0, 672 - 19, 101, 68, 92, 54, 0, 91, 88, 90, 67, 673 - 81, 0, 80, 79, 0, 0, 114, 102, 0, 93, 674 - 0, 89, 96, 0, 83, 87, 77, 76, 98, 97, 675 - 0, 0, 95, 94 522 + 4, 4, 2, 0, 1, 3, 0, 28, 55, 46, 523 + 62, 53, 0, 31, 0, 52, 32, 48, 49, 29, 524 + 65, 47, 50, 30, 0, 8, 0, 51, 54, 63, 525 + 0, 0, 0, 64, 56, 5, 10, 17, 23, 24, 526 + 26, 27, 33, 34, 11, 12, 13, 14, 15, 43, 527 + 39, 6, 37, 0, 44, 22, 38, 45, 0, 0, 528 + 123, 68, 0, 58, 0, 18, 19, 0, 124, 67, 529 + 25, 42, 22, 40, 0, 113, 0, 0, 109, 9, 530 + 17, 41, 0, 0, 0, 0, 57, 59, 60, 16, 531 + 0, 66, 125, 101, 121, 71, 0, 7, 112, 106, 532 + 76, 77, 0, 0, 0, 121, 75, 0, 114, 115, 533 + 119, 105, 0, 110, 124, 0, 36, 0, 73, 72, 534 + 61, 20, 122, 102, 0, 93, 0, 84, 87, 88, 535 + 118, 0, 76, 0, 120, 74, 117, 80, 0, 111, 536 + 0, 35, 126, 0, 21, 103, 70, 94, 56, 0, 537 + 93, 90, 92, 69, 83, 0, 82, 81, 0, 0, 538 + 116, 104, 0, 95, 0, 91, 98, 0, 85, 89, 539 + 79, 78, 100, 99, 0, 0, 97, 96 676 540 }; 677 541 678 - /* YYDEFGOTO[NTERM-NUM]. */ 679 - static const short int yydefgoto[] = 542 + /* YYDEFGOTO[NTERM-NUM]. */ 543 + static const yytype_int16 yydefgoto[] = 680 544 { 681 - -1, 1, 2, 3, 34, 53, 35, 62, 63, 64, 682 - 72, 37, 38, 39, 40, 41, 65, 83, 84, 42, 683 - 110, 67, 101, 102, 122, 123, 124, 125, 147, 148, 684 - 43, 140, 141, 52, 73, 74, 75, 103, 104, 105, 685 - 106, 119, 44, 91, 45 545 + -1, 1, 2, 3, 35, 72, 55, 36, 64, 65, 546 + 66, 75, 38, 39, 40, 41, 42, 67, 86, 87, 547 + 43, 114, 69, 105, 106, 126, 127, 128, 129, 151, 548 + 152, 44, 144, 145, 54, 76, 77, 78, 107, 108, 549 + 109, 110, 123, 45, 94, 46 686 550 }; 687 551 688 552 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 689 553 STATE-NUM. */ 690 - #define YYPACT_NINF -128 691 - static const short int yypact[] = 554 + #define YYPACT_NINF -135 555 + static const yytype_int16 yypact[] = 692 556 { 693 - -128, 13, -128, 329, -128, -128, 36, -128, -128, -128, 694 - -128, -128, -16, -128, -128, -128, -128, -128, -128, -128, 695 - -128, -128, -128, -25, -128, -24, -128, -128, -128, -29, 696 - -4, -22, -128, -128, -128, -128, -28, 495, -128, -128, 697 - -128, -128, -128, -128, -128, -128, -128, -128, -128, 16, 698 - -23, 103, -128, 495, -23, -128, 495, 35, -128, -128, 699 - 3, 15, 9, 17, -128, -28, -15, -8, -128, -128, 700 - -128, 47, 23, 44, 150, -128, -128, -28, -128, 372, 701 - 33, 48, 49, -128, 15, -128, -128, -28, -128, -128, 702 - -128, 64, -128, 197, -128, -128, 50, -128, 21, 65, 703 - 37, 64, 14, 56, 55, -128, -128, -128, 59, -128, 704 - 74, 57, -128, 63, -128, -128, -128, -128, -128, 76, 705 - 83, 416, 84, 99, 90, -128, -128, 88, -128, 89, 706 - -128, -128, -128, -128, 241, -128, 23, -128, -128, 105, 707 - -128, -128, -128, -128, -128, 8, 46, -128, 26, -128, 708 - -128, 459, -128, -128, 92, 93, -128, -128, 94, -128, 709 - 96, -128, -128, 285, -128, -128, -128, -128, -128, -128, 710 - 97, 100, -128, -128 557 + -135, 11, -135, 312, -135, -135, 24, -135, -135, -135, 558 + -135, -135, -23, -135, -2, -135, -135, -135, -135, -135, 559 + -135, -135, -135, -135, -17, -135, -11, -135, -135, -135, 560 + -3, 16, 26, -135, -135, -135, -135, 34, 482, -135, 561 + -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 562 + -8, -135, 22, 97, -135, 482, 22, -135, 482, 56, 563 + -135, -135, 12, 10, 50, 49, -135, 34, -13, 15, 564 + -135, -135, 482, -135, 47, -25, 51, 145, -135, -135, 565 + 34, -135, 356, 52, 71, 77, -135, 10, -135, -135, 566 + 34, -135, -135, -135, 68, -135, 193, -135, -135, -135, 567 + 48, -135, 6, 93, 37, 68, 18, 85, 84, -135, 568 + -135, -135, 87, -135, 102, 86, -135, 89, -135, -135, 569 + -135, -135, -135, 90, 88, 401, 94, 100, 101, -135, 570 + -135, 99, -135, 108, -135, -135, -135, -135, 230, -135, 571 + -25, -135, -135, 105, -135, -135, -135, -135, -135, 9, 572 + 42, -135, 28, -135, -135, 445, -135, -135, 119, 125, 573 + -135, -135, 126, -135, 128, -135, -135, 267, -135, -135, 574 + -135, -135, -135, -135, 129, 130, -135, -135 711 575 }; 712 576 713 577 /* YYPGOTO[NTERM-NUM]. */ 714 - static const short int yypgoto[] = 578 + static const yytype_int16 yypgoto[] = 715 579 { 716 - -128, -128, 151, -128, -128, -128, 119, -128, -128, 66, 717 - 0, -56, -36, -128, -128, -128, -70, -128, -128, -51, 718 - -31, -128, -11, -128, -127, -128, -128, 27, -81, -128, 719 - -128, -128, -128, -19, -128, -128, 107, -128, -128, 43, 720 - 86, 82, -128, -128, -128 580 + -135, -135, 179, -135, -135, -135, -135, -47, -135, -135, 581 + 91, 0, -58, -37, -135, -135, -135, -73, -135, -135, 582 + -48, -32, -135, -38, -135, -134, -135, -135, 29, -63, 583 + -135, -135, -135, -135, -20, -135, -135, 106, -135, -135, 584 + 45, 95, 82, -135, -135, -135 721 585 }; 722 586 723 587 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 724 588 positive, shift that token. If negative, reduce the rule which 725 589 number is the opposite. If zero, do what YYDEFACT says. 726 590 If YYTABLE_NINF, syntax error. */ 727 - #define YYTABLE_NINF -107 728 - static const short int yytable[] = 591 + #define YYTABLE_NINF -109 592 + static const yytype_int16 yytable[] = 729 593 { 730 - 79, 68, 100, 36, 81, 66, 55, 155, 59, 158, 731 - 85, 50, 54, 4, 89, 48, 90, 56, 60, 61, 732 - 49, 58, 127, 10, 92, 51, 51, 51, 100, 82, 733 - 100, 70, 19, 116, 88, 78, 171, 121, 93, 59, 734 - -91, 28, 57, 68, 143, 32, 133, 69, 159, 60, 735 - 61, 146, 86, 77, 145, 61, -91, 128, 162, 96, 736 - 134, 97, 87, 97, 160, 161, 100, 98, 61, 98, 737 - 61, 80, 163, 128, 99, 146, 146, 97, 121, 46, 738 - 47, 113, 143, 98, 61, 68, 159, 129, 107, 131, 739 - 94, 95, 145, 61, 118, 121, 114, 115, 130, 135, 740 - 136, 99, 94, 89, 71, 137, 138, 121, 7, 8, 741 - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 742 - 19, 20, 21, 22, 23, 139, 25, 26, 27, 28, 743 - 29, 142, 149, 32, 150, 151, 152, 153, 157, -20, 744 - 166, 167, 168, 33, 169, 172, -20, -105, 173, -20, 745 - -20, 108, 5, 117, -20, 7, 8, 9, 10, 11, 746 - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 747 - 22, 23, 76, 25, 26, 27, 28, 29, 165, 156, 748 - 32, 109, 126, 132, 0, 0, -20, 0, 0, 0, 749 - 33, 0, 0, -20, -106, 0, -20, -20, 120, 0, 750 - 0, -20, 7, 8, 9, 10, 11, 12, 13, 14, 751 - 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 752 - 25, 26, 27, 28, 29, 0, 0, 32, 0, 0, 753 - 0, 0, -84, 0, 0, 0, 0, 33, 0, 0, 754 - 0, 0, 154, 0, 0, -84, 7, 8, 9, 10, 755 - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 756 - 21, 22, 23, 0, 25, 26, 27, 28, 29, 0, 757 - 0, 32, 0, 0, 0, 0, -84, 0, 0, 0, 758 - 0, 33, 0, 0, 0, 0, 170, 0, 0, -84, 759 - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 760 - 17, 18, 19, 20, 21, 22, 23, 0, 25, 26, 761 - 27, 28, 29, 0, 0, 32, 0, 0, 0, 0, 762 - -84, 0, 0, 0, 0, 33, 0, 0, 0, 0, 763 - 6, 0, 0, -84, 7, 8, 9, 10, 11, 12, 764 - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 765 - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 766 - 0, 0, 0, 0, 0, -20, 0, 0, 0, 33, 767 - 0, 0, -20, 0, 0, -20, -20, 7, 8, 9, 594 + 82, 70, 104, 37, 159, 68, 57, 131, 79, 49, 595 + 162, 4, 100, 84, 50, 88, 101, 92, 10, 93, 596 + 52, 51, 102, 63, 71, 97, 56, 103, 20, 104, 597 + 85, 104, 73, 175, 53, 91, 81, 29, 125, 120, 598 + 53, 33, -93, 132, 58, 70, 147, 101, 95, 61, 599 + 163, 137, 150, 102, 63, 80, 149, 63, -93, 62, 600 + 63, 166, 96, 59, 133, 138, 135, 104, 47, 48, 601 + 60, 61, 80, 53, 132, 167, 150, 150, 101, 147, 602 + 125, 62, 63, 163, 102, 63, 164, 165, 70, 149, 603 + 63, 98, 99, 83, 89, 90, 111, 125, 74, 122, 604 + 103, 117, 7, 8, 9, 10, 11, 12, 13, 125, 605 + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 606 + 118, 26, 27, 28, 29, 30, 119, 134, 33, 139, 607 + 140, 98, 92, 142, -22, 141, 154, 146, 34, 161, 608 + 143, -22, -107, 153, -22, -22, 112, 155, 156, -22, 609 + 7, 8, 9, 10, 11, 12, 13, 157, 15, 16, 610 + 17, 18, 19, 20, 21, 22, 23, 24, 170, 26, 611 + 27, 28, 29, 30, 171, 172, 33, 173, 176, 177, 612 + 5, 121, -22, 113, 169, 160, 34, 136, 0, -22, 613 + -108, 0, -22, -22, 124, 130, 0, -22, 7, 8, 614 + 9, 10, 11, 12, 13, 0, 15, 16, 17, 18, 615 + 19, 20, 21, 22, 23, 24, 0, 26, 27, 28, 616 + 29, 30, 0, 0, 33, 0, 0, 0, 0, -86, 617 + 0, 158, 0, 0, 34, 7, 8, 9, 10, 11, 618 + 12, 13, -86, 15, 16, 17, 18, 19, 20, 21, 619 + 22, 23, 24, 0, 26, 27, 28, 29, 30, 0, 620 + 0, 33, 0, 0, 0, 0, -86, 0, 174, 0, 621 + 0, 34, 7, 8, 9, 10, 11, 12, 13, -86, 622 + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 623 + 0, 26, 27, 28, 29, 30, 0, 0, 33, 0, 624 + 0, 0, 0, -86, 0, 0, 0, 0, 34, 0, 625 + 0, 0, 0, 6, 0, 0, -86, 7, 8, 9, 768 626 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 769 - 20, 21, 22, 23, 0, 25, 26, 27, 28, 29, 770 - 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 771 - 0, 0, 33, 0, 0, 0, 0, 0, 0, 111, 772 - 112, 7, 8, 9, 10, 11, 12, 13, 14, 15, 773 - 16, 17, 18, 19, 20, 21, 22, 23, 0, 25, 774 - 26, 27, 28, 29, 0, 0, 32, 0, 0, 0, 775 - 0, 0, 143, 0, 0, 0, 144, 0, 0, 0, 776 - 0, 0, 145, 61, 7, 8, 9, 10, 11, 12, 777 - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 778 - 23, 0, 25, 26, 27, 28, 29, 0, 0, 32, 779 - 0, 0, 0, 0, 164, 0, 0, 0, 0, 33, 780 - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 781 - 17, 18, 19, 20, 21, 22, 23, 0, 25, 26, 782 - 27, 28, 29, 0, 0, 32, 0, 0, 0, 0, 783 - 0, 0, 0, 0, 0, 33 627 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 628 + 30, 31, 32, 33, 0, 0, 0, 0, 0, -22, 629 + 0, 0, 0, 34, 0, 0, -22, 0, 0, -22, 630 + -22, 7, 8, 9, 10, 11, 12, 13, 0, 15, 631 + 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 632 + 26, 27, 28, 29, 30, 0, 0, 33, 0, 0, 633 + 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 634 + 0, 0, 0, 0, 115, 116, 7, 8, 9, 10, 635 + 11, 12, 13, 0, 15, 16, 17, 18, 19, 20, 636 + 21, 22, 23, 24, 0, 26, 27, 28, 29, 30, 637 + 0, 0, 33, 0, 0, 0, 0, 0, 147, 0, 638 + 0, 0, 148, 0, 0, 0, 0, 0, 149, 63, 639 + 7, 8, 9, 10, 11, 12, 13, 0, 15, 16, 640 + 17, 18, 19, 20, 21, 22, 23, 24, 0, 26, 641 + 27, 28, 29, 30, 0, 0, 33, 0, 0, 0, 642 + 0, 168, 0, 0, 0, 0, 34, 7, 8, 9, 643 + 10, 11, 12, 13, 0, 15, 16, 17, 18, 19, 644 + 20, 21, 22, 23, 24, 0, 26, 27, 28, 29, 645 + 30, 0, 0, 33, 0, 0, 0, 0, 0, 0, 646 + 0, 0, 0, 34 784 647 }; 785 648 786 - static const short int yycheck[] = 649 + static const yytype_int16 yycheck[] = 787 650 { 788 - 56, 37, 72, 3, 1, 36, 25, 134, 36, 1, 789 - 61, 36, 36, 0, 29, 31, 31, 46, 46, 47, 790 - 36, 43, 1, 8, 32, 50, 50, 50, 98, 60, 791 - 100, 50, 17, 84, 65, 54, 163, 93, 46, 36, 792 - 32, 26, 46, 79, 36, 30, 32, 31, 40, 46, 793 - 47, 121, 43, 53, 46, 47, 48, 36, 32, 36, 794 - 46, 40, 45, 40, 145, 146, 136, 46, 47, 46, 795 - 47, 36, 46, 36, 51, 145, 146, 40, 134, 43, 796 - 44, 48, 36, 46, 47, 121, 40, 98, 44, 100, 797 - 43, 44, 46, 47, 30, 151, 48, 48, 33, 43, 798 - 45, 51, 43, 29, 1, 48, 43, 163, 5, 6, 799 - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 800 - 17, 18, 19, 20, 21, 49, 23, 24, 25, 26, 801 - 27, 48, 48, 30, 35, 45, 48, 48, 33, 36, 802 - 48, 48, 48, 40, 48, 48, 43, 44, 48, 46, 803 - 47, 1, 1, 87, 51, 5, 6, 7, 8, 9, 804 - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 805 - 20, 21, 53, 23, 24, 25, 26, 27, 151, 136, 806 - 30, 74, 96, 101, -1, -1, 36, -1, -1, -1, 807 - 40, -1, -1, 43, 44, -1, 46, 47, 1, -1, 808 - -1, 51, 5, 6, 7, 8, 9, 10, 11, 12, 809 - 13, 14, 15, 16, 17, 18, 19, 20, 21, -1, 810 - 23, 24, 25, 26, 27, -1, -1, 30, -1, -1, 811 - -1, -1, 35, -1, -1, -1, -1, 40, -1, -1, 812 - -1, -1, 1, -1, -1, 48, 5, 6, 7, 8, 813 - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 814 - 19, 20, 21, -1, 23, 24, 25, 26, 27, -1, 815 - -1, 30, -1, -1, -1, -1, 35, -1, -1, -1, 816 - -1, 40, -1, -1, -1, -1, 1, -1, -1, 48, 817 - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 818 - 15, 16, 17, 18, 19, 20, 21, -1, 23, 24, 819 - 25, 26, 27, -1, -1, 30, -1, -1, -1, -1, 820 - 35, -1, -1, -1, -1, 40, -1, -1, -1, -1, 821 - 1, -1, -1, 48, 5, 6, 7, 8, 9, 10, 822 - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 823 - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 824 - -1, -1, -1, -1, -1, 36, -1, -1, -1, 40, 825 - -1, -1, 43, -1, -1, 46, 47, 5, 6, 7, 651 + 58, 38, 75, 3, 138, 37, 26, 1, 55, 32, 652 + 1, 0, 37, 1, 37, 63, 41, 30, 8, 32, 653 + 37, 23, 47, 48, 32, 72, 37, 52, 18, 102, 654 + 62, 104, 52, 167, 51, 67, 56, 27, 96, 87, 655 + 51, 31, 33, 37, 47, 82, 37, 41, 33, 37, 656 + 41, 33, 125, 47, 48, 55, 47, 48, 49, 47, 657 + 48, 33, 47, 47, 102, 47, 104, 140, 44, 45, 658 + 44, 37, 72, 51, 37, 47, 149, 150, 41, 37, 659 + 138, 47, 48, 41, 47, 48, 149, 150, 125, 47, 660 + 48, 44, 45, 37, 44, 46, 45, 155, 1, 31, 661 + 52, 49, 5, 6, 7, 8, 9, 10, 11, 167, 662 + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 663 + 49, 24, 25, 26, 27, 28, 49, 34, 31, 44, 664 + 46, 44, 30, 44, 37, 49, 36, 49, 41, 34, 665 + 50, 44, 45, 49, 47, 48, 1, 46, 49, 52, 666 + 5, 6, 7, 8, 9, 10, 11, 49, 13, 14, 667 + 15, 16, 17, 18, 19, 20, 21, 22, 49, 24, 668 + 25, 26, 27, 28, 49, 49, 31, 49, 49, 49, 669 + 1, 90, 37, 77, 155, 140, 41, 105, -1, 44, 670 + 45, -1, 47, 48, 1, 100, -1, 52, 5, 6, 671 + 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, 672 + 17, 18, 19, 20, 21, 22, -1, 24, 25, 26, 673 + 27, 28, -1, -1, 31, -1, -1, -1, -1, 36, 674 + -1, 1, -1, -1, 41, 5, 6, 7, 8, 9, 675 + 10, 11, 49, 13, 14, 15, 16, 17, 18, 19, 676 + 20, 21, 22, -1, 24, 25, 26, 27, 28, -1, 677 + -1, 31, -1, -1, -1, -1, 36, -1, 1, -1, 678 + -1, 41, 5, 6, 7, 8, 9, 10, 11, 49, 679 + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 680 + -1, 24, 25, 26, 27, 28, -1, -1, 31, -1, 681 + -1, -1, -1, 36, -1, -1, -1, -1, 41, -1, 682 + -1, -1, -1, 1, -1, -1, 49, 5, 6, 7, 826 683 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 827 - 18, 19, 20, 21, -1, 23, 24, 25, 26, 27, 828 - -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, 829 - -1, -1, 40, -1, -1, -1, -1, -1, -1, 47, 830 - 48, 5, 6, 7, 8, 9, 10, 11, 12, 13, 831 - 14, 15, 16, 17, 18, 19, 20, 21, -1, 23, 832 - 24, 25, 26, 27, -1, -1, 30, -1, -1, -1, 833 - -1, -1, 36, -1, -1, -1, 40, -1, -1, -1, 834 - -1, -1, 46, 47, 5, 6, 7, 8, 9, 10, 835 - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 836 - 21, -1, 23, 24, 25, 26, 27, -1, -1, 30, 837 - -1, -1, -1, -1, 35, -1, -1, -1, -1, 40, 838 - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 839 - 15, 16, 17, 18, 19, 20, 21, -1, 23, 24, 840 - 25, 26, 27, -1, -1, 30, -1, -1, -1, -1, 841 - -1, -1, -1, -1, -1, 40 684 + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 685 + 28, 29, 30, 31, -1, -1, -1, -1, -1, 37, 686 + -1, -1, -1, 41, -1, -1, 44, -1, -1, 47, 687 + 48, 5, 6, 7, 8, 9, 10, 11, -1, 13, 688 + 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 689 + 24, 25, 26, 27, 28, -1, -1, 31, -1, -1, 690 + -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 691 + -1, -1, -1, -1, 48, 49, 5, 6, 7, 8, 692 + 9, 10, 11, -1, 13, 14, 15, 16, 17, 18, 693 + 19, 20, 21, 22, -1, 24, 25, 26, 27, 28, 694 + -1, -1, 31, -1, -1, -1, -1, -1, 37, -1, 695 + -1, -1, 41, -1, -1, -1, -1, -1, 47, 48, 696 + 5, 6, 7, 8, 9, 10, 11, -1, 13, 14, 697 + 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, 698 + 25, 26, 27, 28, -1, -1, 31, -1, -1, -1, 699 + -1, 36, -1, -1, -1, -1, 41, 5, 6, 7, 700 + 8, 9, 10, 11, -1, 13, 14, 15, 16, 17, 701 + 18, 19, 20, 21, 22, -1, 24, 25, 26, 27, 702 + 28, -1, -1, 31, -1, -1, -1, -1, -1, -1, 703 + -1, -1, -1, 41 842 704 }; 843 705 844 706 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 845 707 symbol of state STATE-NUM. */ 846 - static const unsigned char yystos[] = 708 + static const yytype_uint8 yystos[] = 847 709 { 848 - 0, 53, 54, 55, 0, 54, 1, 5, 6, 7, 710 + 0, 54, 55, 56, 0, 55, 1, 5, 6, 7, 849 711 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 850 712 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 851 - 28, 29, 30, 40, 56, 58, 62, 63, 64, 65, 852 - 66, 67, 71, 82, 94, 96, 43, 44, 31, 36, 853 - 36, 50, 85, 57, 36, 85, 46, 46, 43, 36, 854 - 46, 47, 59, 60, 61, 68, 72, 73, 64, 31, 855 - 85, 1, 62, 86, 87, 88, 58, 62, 85, 63, 856 - 36, 1, 72, 69, 70, 71, 43, 45, 72, 29, 857 - 31, 95, 32, 46, 43, 44, 36, 40, 46, 51, 858 - 68, 74, 75, 89, 90, 91, 92, 44, 1, 88, 859 - 72, 47, 48, 48, 48, 48, 71, 61, 30, 93, 860 - 1, 63, 76, 77, 78, 79, 92, 1, 36, 74, 861 - 33, 74, 93, 32, 46, 43, 45, 48, 43, 49, 862 - 83, 84, 48, 36, 40, 46, 68, 80, 81, 48, 863 - 35, 45, 48, 48, 1, 76, 91, 33, 1, 40, 864 - 80, 80, 32, 46, 35, 79, 48, 48, 48, 48, 865 - 1, 76, 48, 48 713 + 28, 29, 30, 31, 41, 57, 60, 64, 65, 66, 714 + 67, 68, 69, 73, 84, 96, 98, 44, 45, 32, 715 + 37, 23, 37, 51, 87, 59, 37, 87, 47, 47, 716 + 44, 37, 47, 48, 61, 62, 63, 70, 74, 75, 717 + 66, 32, 58, 87, 1, 64, 88, 89, 90, 60, 718 + 64, 87, 65, 37, 1, 74, 71, 72, 73, 44, 719 + 46, 74, 30, 32, 97, 33, 47, 60, 44, 45, 720 + 37, 41, 47, 52, 70, 76, 77, 91, 92, 93, 721 + 94, 45, 1, 90, 74, 48, 49, 49, 49, 49, 722 + 73, 63, 31, 95, 1, 65, 78, 79, 80, 81, 723 + 94, 1, 37, 76, 34, 76, 95, 33, 47, 44, 724 + 46, 49, 44, 50, 85, 86, 49, 37, 41, 47, 725 + 70, 82, 83, 49, 36, 46, 49, 49, 1, 78, 726 + 93, 34, 1, 41, 82, 82, 33, 47, 36, 81, 727 + 49, 49, 49, 49, 1, 78, 49, 49 866 728 }; 867 - 868 - #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) 869 - # define YYSIZE_T __SIZE_TYPE__ 870 - #endif 871 - #if ! defined (YYSIZE_T) && defined (size_t) 872 - # define YYSIZE_T size_t 873 - #endif 874 - #if ! defined (YYSIZE_T) 875 - # if defined (__STDC__) || defined (__cplusplus) 876 - # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 877 - # define YYSIZE_T size_t 878 - # endif 879 - #endif 880 - #if ! defined (YYSIZE_T) 881 - # define YYSIZE_T unsigned int 882 - #endif 883 729 884 730 #define yyerrok (yyerrstatus = 0) 885 731 #define yyclearin (yychar = YYEMPTY) ··· 888 770 yychar = (Token); \ 889 771 yylval = (Value); \ 890 772 yytoken = YYTRANSLATE (yychar); \ 891 - YYPOPSTACK; \ 773 + YYPOPSTACK (1); \ 892 774 goto yybackup; \ 893 775 } \ 894 776 else \ 895 - { \ 896 - yyerror ("syntax error: cannot back up");\ 777 + { \ 778 + yyerror (YY_("syntax error: cannot back up")); \ 897 779 YYERROR; \ 898 780 } \ 899 - while (0) 781 + while (YYID (0)) 900 782 901 783 902 784 #define YYTERROR 1 ··· 911 793 #ifndef YYLLOC_DEFAULT 912 794 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 913 795 do \ 914 - if (N) \ 796 + if (YYID (N)) \ 915 797 { \ 916 798 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 917 799 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ ··· 925 807 (Current).first_column = (Current).last_column = \ 926 808 YYRHSLOC (Rhs, 0).last_column; \ 927 809 } \ 928 - while (0) 810 + while (YYID (0)) 929 811 #endif 930 812 931 813 ··· 937 819 # if YYLTYPE_IS_TRIVIAL 938 820 # define YY_LOCATION_PRINT(File, Loc) \ 939 821 fprintf (File, "%d.%d-%d.%d", \ 940 - (Loc).first_line, (Loc).first_column, \ 941 - (Loc).last_line, (Loc).last_column) 822 + (Loc).first_line, (Loc).first_column, \ 823 + (Loc).last_line, (Loc).last_column) 942 824 # else 943 825 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 944 826 # endif ··· 965 847 do { \ 966 848 if (yydebug) \ 967 849 YYFPRINTF Args; \ 968 - } while (0) 850 + } while (YYID (0)) 969 851 970 - # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 971 - do { \ 972 - if (yydebug) \ 973 - { \ 974 - YYFPRINTF (stderr, "%s ", Title); \ 975 - yysymprint (stderr, \ 976 - Type, Value); \ 977 - YYFPRINTF (stderr, "\n"); \ 978 - } \ 979 - } while (0) 852 + # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 853 + do { \ 854 + if (yydebug) \ 855 + { \ 856 + YYFPRINTF (stderr, "%s ", Title); \ 857 + yy_symbol_print (stderr, \ 858 + Type, Value); \ 859 + YYFPRINTF (stderr, "\n"); \ 860 + } \ 861 + } while (YYID (0)) 862 + 863 + 864 + /*--------------------------------. 865 + | Print this symbol on YYOUTPUT. | 866 + `--------------------------------*/ 867 + 868 + /*ARGSUSED*/ 869 + #if (defined __STDC__ || defined __C99__FUNC__ \ 870 + || defined __cplusplus || defined _MSC_VER) 871 + static void 872 + yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 873 + #else 874 + static void 875 + yy_symbol_value_print (yyoutput, yytype, yyvaluep) 876 + FILE *yyoutput; 877 + int yytype; 878 + YYSTYPE const * const yyvaluep; 879 + #endif 880 + { 881 + if (!yyvaluep) 882 + return; 883 + # ifdef YYPRINT 884 + if (yytype < YYNTOKENS) 885 + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 886 + # else 887 + YYUSE (yyoutput); 888 + # endif 889 + switch (yytype) 890 + { 891 + default: 892 + break; 893 + } 894 + } 895 + 896 + 897 + /*--------------------------------. 898 + | Print this symbol on YYOUTPUT. | 899 + `--------------------------------*/ 900 + 901 + #if (defined __STDC__ || defined __C99__FUNC__ \ 902 + || defined __cplusplus || defined _MSC_VER) 903 + static void 904 + yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 905 + #else 906 + static void 907 + yy_symbol_print (yyoutput, yytype, yyvaluep) 908 + FILE *yyoutput; 909 + int yytype; 910 + YYSTYPE const * const yyvaluep; 911 + #endif 912 + { 913 + if (yytype < YYNTOKENS) 914 + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 915 + else 916 + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 917 + 918 + yy_symbol_value_print (yyoutput, yytype, yyvaluep); 919 + YYFPRINTF (yyoutput, ")"); 920 + } 980 921 981 922 /*------------------------------------------------------------------. 982 923 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 983 924 | TOP (included). | 984 925 `------------------------------------------------------------------*/ 985 926 986 - #if defined (__STDC__) || defined (__cplusplus) 927 + #if (defined __STDC__ || defined __C99__FUNC__ \ 928 + || defined __cplusplus || defined _MSC_VER) 987 929 static void 988 - yy_stack_print (short int *bottom, short int *top) 930 + yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 989 931 #else 990 932 static void 991 933 yy_stack_print (bottom, top) 992 - short int *bottom; 993 - short int *top; 934 + yytype_int16 *bottom; 935 + yytype_int16 *top; 994 936 #endif 995 937 { 996 938 YYFPRINTF (stderr, "Stack now"); 997 - for (/* Nothing. */; bottom <= top; ++bottom) 939 + for (; bottom <= top; ++bottom) 998 940 YYFPRINTF (stderr, " %d", *bottom); 999 941 YYFPRINTF (stderr, "\n"); 1000 942 } ··· 1063 885 do { \ 1064 886 if (yydebug) \ 1065 887 yy_stack_print ((Bottom), (Top)); \ 1066 - } while (0) 888 + } while (YYID (0)) 1067 889 1068 890 1069 891 /*------------------------------------------------. 1070 892 | Report that the YYRULE is going to be reduced. | 1071 893 `------------------------------------------------*/ 1072 894 1073 - #if defined (__STDC__) || defined (__cplusplus) 895 + #if (defined __STDC__ || defined __C99__FUNC__ \ 896 + || defined __cplusplus || defined _MSC_VER) 1074 897 static void 1075 - yy_reduce_print (int yyrule) 898 + yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 1076 899 #else 1077 900 static void 1078 - yy_reduce_print (yyrule) 901 + yy_reduce_print (yyvsp, yyrule) 902 + YYSTYPE *yyvsp; 1079 903 int yyrule; 1080 904 #endif 1081 905 { 906 + int yynrhs = yyr2[yyrule]; 1082 907 int yyi; 1083 - unsigned int yylno = yyrline[yyrule]; 1084 - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", 1085 - yyrule - 1, yylno); 1086 - /* Print the symbols being reduced, and their result. */ 1087 - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) 1088 - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); 1089 - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); 908 + unsigned long int yylno = yyrline[yyrule]; 909 + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 910 + yyrule - 1, yylno); 911 + /* The symbols being reduced. */ 912 + for (yyi = 0; yyi < yynrhs; yyi++) 913 + { 914 + fprintf (stderr, " $%d = ", yyi + 1); 915 + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 916 + &(yyvsp[(yyi + 1) - (yynrhs)]) 917 + ); 918 + fprintf (stderr, "\n"); 919 + } 1090 920 } 1091 921 1092 922 # define YY_REDUCE_PRINT(Rule) \ 1093 923 do { \ 1094 924 if (yydebug) \ 1095 - yy_reduce_print (Rule); \ 1096 - } while (0) 925 + yy_reduce_print (yyvsp, Rule); \ 926 + } while (YYID (0)) 1097 927 1098 928 /* Nonzero means print parse trace. It is left uninitialized so that 1099 929 multiple parsers can coexist. */ ··· 1123 937 if the built-in stack extension method is used). 1124 938 1125 939 Do not make this value too large; the results are undefined if 1126 - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) 940 + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1127 941 evaluated with infinite-precision integer arithmetic. */ 1128 942 1129 943 #ifndef YYMAXDEPTH ··· 1135 949 #if YYERROR_VERBOSE 1136 950 1137 951 # ifndef yystrlen 1138 - # if defined (__GLIBC__) && defined (_STRING_H) 952 + # if defined __GLIBC__ && defined _STRING_H 1139 953 # define yystrlen strlen 1140 954 # else 1141 955 /* Return the length of YYSTR. */ 956 + #if (defined __STDC__ || defined __C99__FUNC__ \ 957 + || defined __cplusplus || defined _MSC_VER) 1142 958 static YYSIZE_T 1143 - # if defined (__STDC__) || defined (__cplusplus) 1144 959 yystrlen (const char *yystr) 1145 - # else 960 + #else 961 + static YYSIZE_T 1146 962 yystrlen (yystr) 1147 - const char *yystr; 1148 - # endif 963 + const char *yystr; 964 + #endif 1149 965 { 1150 - register const char *yys = yystr; 1151 - 1152 - while (*yys++ != '\0') 966 + YYSIZE_T yylen; 967 + for (yylen = 0; yystr[yylen]; yylen++) 1153 968 continue; 1154 - 1155 - return yys - yystr - 1; 969 + return yylen; 1156 970 } 1157 971 # endif 1158 972 # endif 1159 973 1160 974 # ifndef yystpcpy 1161 - # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) 975 + # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1162 976 # define yystpcpy stpcpy 1163 977 # else 1164 978 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1165 979 YYDEST. */ 980 + #if (defined __STDC__ || defined __C99__FUNC__ \ 981 + || defined __cplusplus || defined _MSC_VER) 1166 982 static char * 1167 - # if defined (__STDC__) || defined (__cplusplus) 1168 983 yystpcpy (char *yydest, const char *yysrc) 1169 - # else 984 + #else 985 + static char * 1170 986 yystpcpy (yydest, yysrc) 1171 - char *yydest; 1172 - const char *yysrc; 1173 - # endif 987 + char *yydest; 988 + const char *yysrc; 989 + #endif 1174 990 { 1175 - register char *yyd = yydest; 1176 - register const char *yys = yysrc; 991 + char *yyd = yydest; 992 + const char *yys = yysrc; 1177 993 1178 994 while ((*yyd++ = *yys++) != '\0') 1179 995 continue; ··· 1185 997 # endif 1186 998 # endif 1187 999 1188 - #endif /* !YYERROR_VERBOSE */ 1000 + # ifndef yytnamerr 1001 + /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1002 + quotes and backslashes, so that it's suitable for yyerror. The 1003 + heuristic is that double-quoting is unnecessary unless the string 1004 + contains an apostrophe, a comma, or backslash (other than 1005 + backslash-backslash). YYSTR is taken from yytname. If YYRES is 1006 + null, do not copy; instead, return the length of what the result 1007 + would have been. */ 1008 + static YYSIZE_T 1009 + yytnamerr (char *yyres, const char *yystr) 1010 + { 1011 + if (*yystr == '"') 1012 + { 1013 + YYSIZE_T yyn = 0; 1014 + char const *yyp = yystr; 1189 1015 1016 + for (;;) 1017 + switch (*++yyp) 1018 + { 1019 + case '\'': 1020 + case ',': 1021 + goto do_not_strip_quotes; 1022 + 1023 + case '\\': 1024 + if (*++yyp != '\\') 1025 + goto do_not_strip_quotes; 1026 + /* Fall through. */ 1027 + default: 1028 + if (yyres) 1029 + yyres[yyn] = *yyp; 1030 + yyn++; 1031 + break; 1032 + 1033 + case '"': 1034 + if (yyres) 1035 + yyres[yyn] = '\0'; 1036 + return yyn; 1037 + } 1038 + do_not_strip_quotes: ; 1039 + } 1040 + 1041 + if (! yyres) 1042 + return yystrlen (yystr); 1043 + 1044 + return yystpcpy (yyres, yystr) - yyres; 1045 + } 1046 + # endif 1047 + 1048 + /* Copy into YYRESULT an error message about the unexpected token 1049 + YYCHAR while in state YYSTATE. Return the number of bytes copied, 1050 + including the terminating null byte. If YYRESULT is null, do not 1051 + copy anything; just return the number of bytes that would be 1052 + copied. As a special case, return 0 if an ordinary "syntax error" 1053 + message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1054 + size calculation. */ 1055 + static YYSIZE_T 1056 + yysyntax_error (char *yyresult, int yystate, int yychar) 1057 + { 1058 + int yyn = yypact[yystate]; 1059 + 1060 + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1061 + return 0; 1062 + else 1063 + { 1064 + int yytype = YYTRANSLATE (yychar); 1065 + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1066 + YYSIZE_T yysize = yysize0; 1067 + YYSIZE_T yysize1; 1068 + int yysize_overflow = 0; 1069 + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1070 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1071 + int yyx; 1072 + 1073 + # if 0 1074 + /* This is so xgettext sees the translatable formats that are 1075 + constructed on the fly. */ 1076 + YY_("syntax error, unexpected %s"); 1077 + YY_("syntax error, unexpected %s, expecting %s"); 1078 + YY_("syntax error, unexpected %s, expecting %s or %s"); 1079 + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1080 + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1081 + # endif 1082 + char *yyfmt; 1083 + char const *yyf; 1084 + static char const yyunexpected[] = "syntax error, unexpected %s"; 1085 + static char const yyexpecting[] = ", expecting %s"; 1086 + static char const yyor[] = " or %s"; 1087 + char yyformat[sizeof yyunexpected 1088 + + sizeof yyexpecting - 1 1089 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1090 + * (sizeof yyor - 1))]; 1091 + char const *yyprefix = yyexpecting; 1092 + 1093 + /* Start YYX at -YYN if negative to avoid negative indexes in 1094 + YYCHECK. */ 1095 + int yyxbegin = yyn < 0 ? -yyn : 0; 1096 + 1097 + /* Stay within bounds of both yycheck and yytname. */ 1098 + int yychecklim = YYLAST - yyn + 1; 1099 + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1100 + int yycount = 1; 1101 + 1102 + yyarg[0] = yytname[yytype]; 1103 + yyfmt = yystpcpy (yyformat, yyunexpected); 1104 + 1105 + for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1106 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1107 + { 1108 + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1109 + { 1110 + yycount = 1; 1111 + yysize = yysize0; 1112 + yyformat[sizeof yyunexpected - 1] = '\0'; 1113 + break; 1114 + } 1115 + yyarg[yycount++] = yytname[yyx]; 1116 + yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1117 + yysize_overflow |= (yysize1 < yysize); 1118 + yysize = yysize1; 1119 + yyfmt = yystpcpy (yyfmt, yyprefix); 1120 + yyprefix = yyor; 1121 + } 1122 + 1123 + yyf = YY_(yyformat); 1124 + yysize1 = yysize + yystrlen (yyf); 1125 + yysize_overflow |= (yysize1 < yysize); 1126 + yysize = yysize1; 1127 + 1128 + if (yysize_overflow) 1129 + return YYSIZE_MAXIMUM; 1130 + 1131 + if (yyresult) 1132 + { 1133 + /* Avoid sprintf, as that infringes on the user's name space. 1134 + Don't have undefined behavior even if the translation 1135 + produced a string with the wrong number of "%s"s. */ 1136 + char *yyp = yyresult; 1137 + int yyi = 0; 1138 + while ((*yyp = *yyf) != '\0') 1139 + { 1140 + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1141 + { 1142 + yyp += yytnamerr (yyp, yyarg[yyi++]); 1143 + yyf += 2; 1144 + } 1145 + else 1146 + { 1147 + yyp++; 1148 + yyf++; 1149 + } 1150 + } 1151 + } 1152 + return yysize; 1153 + } 1154 + } 1155 + #endif /* YYERROR_VERBOSE */ 1190 1156 1191 1157 1192 - #if YYDEBUG 1193 - /*--------------------------------. 1194 - | Print this symbol on YYOUTPUT. | 1195 - `--------------------------------*/ 1196 - 1197 - #if defined (__STDC__) || defined (__cplusplus) 1198 - static void 1199 - yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) 1200 - #else 1201 - static void 1202 - yysymprint (yyoutput, yytype, yyvaluep) 1203 - FILE *yyoutput; 1204 - int yytype; 1205 - YYSTYPE *yyvaluep; 1206 - #endif 1207 - { 1208 - /* Pacify ``unused variable'' warnings. */ 1209 - (void) yyvaluep; 1210 - 1211 - if (yytype < YYNTOKENS) 1212 - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1213 - else 1214 - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 1215 - 1216 - 1217 - # ifdef YYPRINT 1218 - if (yytype < YYNTOKENS) 1219 - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1220 - # endif 1221 - switch (yytype) 1222 - { 1223 - default: 1224 - break; 1225 - } 1226 - YYFPRINTF (yyoutput, ")"); 1227 - } 1228 - 1229 - #endif /* ! YYDEBUG */ 1230 1158 /*-----------------------------------------------. 1231 1159 | Release the memory associated to this symbol. | 1232 1160 `-----------------------------------------------*/ 1233 1161 1234 - #if defined (__STDC__) || defined (__cplusplus) 1162 + /*ARGSUSED*/ 1163 + #if (defined __STDC__ || defined __C99__FUNC__ \ 1164 + || defined __cplusplus || defined _MSC_VER) 1235 1165 static void 1236 1166 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1237 1167 #else ··· 1360 1054 YYSTYPE *yyvaluep; 1361 1055 #endif 1362 1056 { 1363 - /* Pacify ``unused variable'' warnings. */ 1364 - (void) yyvaluep; 1057 + YYUSE (yyvaluep); 1365 1058 1366 1059 if (!yymsg) 1367 1060 yymsg = "Deleting"; ··· 1370 1065 { 1371 1066 1372 1067 default: 1373 - break; 1068 + break; 1374 1069 } 1375 1070 } 1376 1071 ··· 1378 1073 /* Prevent warnings from -Wmissing-prototypes. */ 1379 1074 1380 1075 #ifdef YYPARSE_PARAM 1381 - # if defined (__STDC__) || defined (__cplusplus) 1076 + #if defined __STDC__ || defined __cplusplus 1382 1077 int yyparse (void *YYPARSE_PARAM); 1383 - # else 1078 + #else 1384 1079 int yyparse (); 1385 - # endif 1080 + #endif 1386 1081 #else /* ! YYPARSE_PARAM */ 1387 - #if defined (__STDC__) || defined (__cplusplus) 1082 + #if defined __STDC__ || defined __cplusplus 1388 1083 int yyparse (void); 1389 1084 #else 1390 1085 int yyparse (); ··· 1409 1104 `----------*/ 1410 1105 1411 1106 #ifdef YYPARSE_PARAM 1412 - # if defined (__STDC__) || defined (__cplusplus) 1413 - int yyparse (void *YYPARSE_PARAM) 1414 - # else 1415 - int yyparse (YYPARSE_PARAM) 1416 - void *YYPARSE_PARAM; 1417 - # endif 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 1418 1116 #else /* ! YYPARSE_PARAM */ 1419 - #if defined (__STDC__) || defined (__cplusplus) 1117 + #if (defined __STDC__ || defined __C99__FUNC__ \ 1118 + || defined __cplusplus || defined _MSC_VER) 1420 1119 int 1421 1120 yyparse (void) 1422 1121 #else ··· 1431 1122 #endif 1432 1123 { 1433 1124 1434 - register int yystate; 1435 - register int yyn; 1125 + int yystate; 1126 + int yyn; 1436 1127 int yyresult; 1437 1128 /* Number of tokens to shift before error messages enabled. */ 1438 1129 int yyerrstatus; 1439 1130 /* Look-ahead token as an internal (translated) token number. */ 1440 1131 int yytoken = 0; 1132 + #if YYERROR_VERBOSE 1133 + /* Buffer for error messages, and its allocated size. */ 1134 + char yymsgbuf[128]; 1135 + char *yymsg = yymsgbuf; 1136 + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1137 + #endif 1441 1138 1442 1139 /* Three stacks and their tools: 1443 1140 `yyss': related to states, ··· 1454 1139 to reallocate them elsewhere. */ 1455 1140 1456 1141 /* The state stack. */ 1457 - short int yyssa[YYINITDEPTH]; 1458 - short int *yyss = yyssa; 1459 - register short int *yyssp; 1142 + yytype_int16 yyssa[YYINITDEPTH]; 1143 + yytype_int16 *yyss = yyssa; 1144 + yytype_int16 *yyssp; 1460 1145 1461 1146 /* The semantic value stack. */ 1462 1147 YYSTYPE yyvsa[YYINITDEPTH]; 1463 1148 YYSTYPE *yyvs = yyvsa; 1464 - register YYSTYPE *yyvsp; 1149 + YYSTYPE *yyvsp; 1465 1150 1466 1151 1467 1152 1468 - #define YYPOPSTACK (yyvsp--, yyssp--) 1153 + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1469 1154 1470 1155 YYSIZE_T yystacksize = YYINITDEPTH; 1471 1156 ··· 1474 1159 YYSTYPE yyval; 1475 1160 1476 1161 1477 - /* When reducing, the number of symbols on the RHS of the reduced 1478 - rule. */ 1479 - int yylen; 1162 + /* The number of symbols on the RHS of the reduced rule. 1163 + Keep to zero when no symbol should be popped. */ 1164 + int yylen = 0; 1480 1165 1481 1166 YYDPRINTF ((stderr, "Starting parse\n")); 1482 1167 ··· 1493 1178 yyssp = yyss; 1494 1179 yyvsp = yyvs; 1495 1180 1496 - 1497 - yyvsp[0] = yylval; 1498 - 1499 1181 goto yysetstate; 1500 1182 1501 1183 /*------------------------------------------------------------. ··· 1500 1188 `------------------------------------------------------------*/ 1501 1189 yynewstate: 1502 1190 /* In all cases, when you get here, the value and location stacks 1503 - have just been pushed. so pushing a state here evens the stacks. 1504 - */ 1191 + have just been pushed. So pushing a state here evens the stacks. */ 1505 1192 yyssp++; 1506 1193 1507 1194 yysetstate: ··· 1513 1202 1514 1203 #ifdef yyoverflow 1515 1204 { 1516 - /* Give user a chance to reallocate the stack. Use copies of 1205 + /* Give user a chance to reallocate the stack. Use copies of 1517 1206 these so that the &'s don't force the real ones into 1518 1207 memory. */ 1519 1208 YYSTYPE *yyvs1 = yyvs; 1520 - short int *yyss1 = yyss; 1209 + yytype_int16 *yyss1 = yyss; 1521 1210 1522 1211 1523 1212 /* Each stack pointer address is followed by the size of the 1524 1213 data in use in that stack, in bytes. This used to be a 1525 1214 conditional around just the two extra args, but that might 1526 1215 be undefined if yyoverflow is a macro. */ 1527 - yyoverflow ("parser stack overflow", 1216 + yyoverflow (YY_("memory exhausted"), 1528 1217 &yyss1, yysize * sizeof (*yyssp), 1529 1218 &yyvs1, yysize * sizeof (*yyvsp), 1530 1219 ··· 1535 1224 } 1536 1225 #else /* no yyoverflow */ 1537 1226 # ifndef YYSTACK_RELOCATE 1538 - goto yyoverflowlab; 1227 + goto yyexhaustedlab; 1539 1228 # else 1540 1229 /* Extend the stack our own way. */ 1541 1230 if (YYMAXDEPTH <= yystacksize) 1542 - goto yyoverflowlab; 1231 + goto yyexhaustedlab; 1543 1232 yystacksize *= 2; 1544 1233 if (YYMAXDEPTH < yystacksize) 1545 1234 yystacksize = YYMAXDEPTH; 1546 1235 1547 1236 { 1548 - short int *yyss1 = yyss; 1237 + yytype_int16 *yyss1 = yyss; 1549 1238 union yyalloc *yyptr = 1550 1239 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1551 1240 if (! yyptr) 1552 - goto yyoverflowlab; 1241 + goto yyexhaustedlab; 1553 1242 YYSTACK_RELOCATE (yyss); 1554 1243 YYSTACK_RELOCATE (yyvs); 1555 1244 ··· 1580 1269 `-----------*/ 1581 1270 yybackup: 1582 1271 1583 - /* Do appropriate processing given the current state. */ 1584 - /* Read a look-ahead token if we need one and don't already have one. */ 1585 - /* yyresume: */ 1272 + /* Do appropriate processing given the current state. Read a 1273 + look-ahead token if we need one and don't already have one. */ 1586 1274 1587 1275 /* First try to decide what to do without reference to look-ahead token. */ 1588 - 1589 1276 yyn = yypact[yystate]; 1590 1277 if (yyn == YYPACT_NINF) 1591 1278 goto yydefault; ··· 1625 1316 if (yyn == YYFINAL) 1626 1317 YYACCEPT; 1627 1318 1628 - /* Shift the look-ahead token. */ 1629 - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1630 - 1631 - /* Discard the token being shifted unless it is eof. */ 1632 - if (yychar != YYEOF) 1633 - yychar = YYEMPTY; 1634 - 1635 - *++yyvsp = yylval; 1636 - 1637 - 1638 1319 /* Count tokens shifted since error; after three, turn off error 1639 1320 status. */ 1640 1321 if (yyerrstatus) 1641 1322 yyerrstatus--; 1642 1323 1324 + /* Shift the look-ahead token. */ 1325 + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1326 + 1327 + /* Discard the shifted token unless it is eof. */ 1328 + if (yychar != YYEOF) 1329 + yychar = YYEMPTY; 1330 + 1643 1331 yystate = yyn; 1332 + *++yyvsp = yylval; 1333 + 1644 1334 goto yynewstate; 1645 1335 1646 1336 ··· 1675 1367 switch (yyn) 1676 1368 { 1677 1369 case 4: 1678 - #line 107 "scripts/genksyms/parse.y" 1370 + #line 108 "scripts/genksyms/parse.y" 1679 1371 { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;} 1680 1372 break; 1681 1373 1682 1374 case 5: 1683 - #line 109 "scripts/genksyms/parse.y" 1684 - { free_list(*(yyvsp[0]), NULL); *(yyvsp[0]) = NULL; ;} 1375 + #line 110 "scripts/genksyms/parse.y" 1376 + { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;} 1685 1377 break; 1686 1378 1687 1379 case 6: 1688 - #line 113 "scripts/genksyms/parse.y" 1380 + #line 114 "scripts/genksyms/parse.y" 1689 1381 { is_typedef = 1; ;} 1690 1382 break; 1691 1383 1692 1384 case 7: 1693 - #line 114 "scripts/genksyms/parse.y" 1694 - { (yyval) = (yyvsp[0]); ;} 1385 + #line 115 "scripts/genksyms/parse.y" 1386 + { (yyval) = (yyvsp[(4) - (4)]); ;} 1695 1387 break; 1696 1388 1697 - case 12: 1698 - #line 119 "scripts/genksyms/parse.y" 1699 - { (yyval) = (yyvsp[0]); ;} 1389 + case 8: 1390 + #line 116 "scripts/genksyms/parse.y" 1391 + { is_typedef = 1; ;} 1700 1392 break; 1701 1393 1702 - case 13: 1703 - #line 120 "scripts/genksyms/parse.y" 1704 - { (yyval) = (yyvsp[0]); ;} 1394 + case 9: 1395 + #line 117 "scripts/genksyms/parse.y" 1396 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1705 1397 break; 1706 1398 1707 1399 case 14: 1708 - #line 125 "scripts/genksyms/parse.y" 1400 + #line 122 "scripts/genksyms/parse.y" 1401 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1402 + break; 1403 + 1404 + case 15: 1405 + #line 123 "scripts/genksyms/parse.y" 1406 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1407 + break; 1408 + 1409 + case 16: 1410 + #line 128 "scripts/genksyms/parse.y" 1709 1411 { if (current_name) { 1710 - struct string_list *decl = (*(yyvsp[0]))->next; 1711 - (*(yyvsp[0]))->next = NULL; 1412 + struct string_list *decl = (*(yyvsp[(3) - (3)]))->next; 1413 + (*(yyvsp[(3) - (3)]))->next = NULL; 1712 1414 add_symbol(current_name, 1713 1415 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, 1714 1416 decl, is_extern); 1715 1417 current_name = NULL; 1716 1418 } 1717 - (yyval) = (yyvsp[0]); 1419 + (yyval) = (yyvsp[(3) - (3)]); 1718 1420 ;} 1719 - break; 1720 - 1721 - case 15: 1722 - #line 138 "scripts/genksyms/parse.y" 1723 - { (yyval) = NULL; ;} 1724 1421 break; 1725 1422 1726 1423 case 17: 1727 - #line 144 "scripts/genksyms/parse.y" 1728 - { struct string_list *decl = *(yyvsp[0]); 1729 - *(yyvsp[0]) = NULL; 1730 - add_symbol(current_name, 1731 - is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); 1732 - current_name = NULL; 1733 - (yyval) = (yyvsp[0]); 1734 - ;} 1735 - break; 1736 - 1737 - case 18: 1738 - #line 152 "scripts/genksyms/parse.y" 1739 - { struct string_list *decl = *(yyvsp[0]); 1740 - *(yyvsp[0]) = NULL; 1741 - free_list(*(yyvsp[-1]), NULL); 1742 - *(yyvsp[-1]) = decl_spec; 1743 - add_symbol(current_name, 1744 - is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); 1745 - current_name = NULL; 1746 - (yyval) = (yyvsp[0]); 1747 - ;} 1424 + #line 141 "scripts/genksyms/parse.y" 1425 + { (yyval) = NULL; ;} 1748 1426 break; 1749 1427 1750 1428 case 19: 1751 - #line 165 "scripts/genksyms/parse.y" 1752 - { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]) ? (yyvsp[-1]) : (yyvsp[-2]) ? (yyvsp[-2]) : (yyvsp[-3]); ;} 1429 + #line 147 "scripts/genksyms/parse.y" 1430 + { struct string_list *decl = *(yyvsp[(1) - (1)]); 1431 + *(yyvsp[(1) - (1)]) = NULL; 1432 + add_symbol(current_name, 1433 + is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); 1434 + current_name = NULL; 1435 + (yyval) = (yyvsp[(1) - (1)]); 1436 + ;} 1753 1437 break; 1754 1438 1755 1439 case 20: 1756 - #line 170 "scripts/genksyms/parse.y" 1757 - { decl_spec = NULL; ;} 1440 + #line 155 "scripts/genksyms/parse.y" 1441 + { struct string_list *decl = *(yyvsp[(3) - (3)]); 1442 + *(yyvsp[(3) - (3)]) = NULL; 1443 + free_list(*(yyvsp[(2) - (3)]), NULL); 1444 + *(yyvsp[(2) - (3)]) = decl_spec; 1445 + add_symbol(current_name, 1446 + is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); 1447 + current_name = NULL; 1448 + (yyval) = (yyvsp[(3) - (3)]); 1449 + ;} 1450 + break; 1451 + 1452 + case 21: 1453 + #line 168 "scripts/genksyms/parse.y" 1454 + { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;} 1758 1455 break; 1759 1456 1760 1457 case 22: 1761 - #line 175 "scripts/genksyms/parse.y" 1762 - { decl_spec = *(yyvsp[0]); ;} 1763 - break; 1764 - 1765 - case 23: 1766 - #line 176 "scripts/genksyms/parse.y" 1767 - { decl_spec = *(yyvsp[0]); ;} 1458 + #line 173 "scripts/genksyms/parse.y" 1459 + { decl_spec = NULL; ;} 1768 1460 break; 1769 1461 1770 1462 case 24: 1771 - #line 181 "scripts/genksyms/parse.y" 1463 + #line 178 "scripts/genksyms/parse.y" 1464 + { decl_spec = *(yyvsp[(1) - (1)]); ;} 1465 + break; 1466 + 1467 + case 25: 1468 + #line 179 "scripts/genksyms/parse.y" 1469 + { decl_spec = *(yyvsp[(2) - (2)]); ;} 1470 + break; 1471 + 1472 + case 26: 1473 + #line 184 "scripts/genksyms/parse.y" 1772 1474 { /* Version 2 checksumming ignores storage class, as that 1773 1475 is really irrelevant to the linkage. */ 1774 - remove_node((yyvsp[0])); 1775 - (yyval) = (yyvsp[0]); 1476 + remove_node((yyvsp[(1) - (1)])); 1477 + (yyval) = (yyvsp[(1) - (1)]); 1776 1478 ;} 1777 1479 break; 1778 1480 1779 - case 29: 1780 - #line 193 "scripts/genksyms/parse.y" 1781 - { is_extern = 1; (yyval) = (yyvsp[0]); ;} 1481 + case 31: 1482 + #line 196 "scripts/genksyms/parse.y" 1483 + { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;} 1782 1484 break; 1783 1485 1784 - case 30: 1785 - #line 194 "scripts/genksyms/parse.y" 1786 - { is_extern = 0; (yyval) = (yyvsp[0]); ;} 1787 - break; 1788 - 1789 - case 35: 1790 - #line 206 "scripts/genksyms/parse.y" 1791 - { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_STRUCT; (yyval) = (yyvsp[0]); ;} 1792 - break; 1793 - 1794 - case 36: 1795 - #line 208 "scripts/genksyms/parse.y" 1796 - { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_UNION; (yyval) = (yyvsp[0]); ;} 1486 + case 32: 1487 + #line 197 "scripts/genksyms/parse.y" 1488 + { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;} 1797 1489 break; 1798 1490 1799 1491 case 37: 1800 - #line 210 "scripts/genksyms/parse.y" 1801 - { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_ENUM; (yyval) = (yyvsp[0]); ;} 1492 + #line 209 "scripts/genksyms/parse.y" 1493 + { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;} 1802 1494 break; 1803 1495 1804 1496 case 38: 1805 - #line 214 "scripts/genksyms/parse.y" 1806 - { struct string_list *s = *(yyvsp[0]), *i = *(yyvsp[-1]), *r; 1807 - r = copy_node(i); r->tag = SYM_STRUCT; 1808 - r->next = (*(yyvsp[-2]))->next; *(yyvsp[0]) = r; (*(yyvsp[-2]))->next = NULL; 1809 - add_symbol(i->string, SYM_STRUCT, s, is_extern); 1810 - (yyval) = (yyvsp[0]); 1811 - ;} 1497 + #line 211 "scripts/genksyms/parse.y" 1498 + { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;} 1812 1499 break; 1813 1500 1814 1501 case 39: 1815 - #line 221 "scripts/genksyms/parse.y" 1816 - { struct string_list *s = *(yyvsp[0]), *i = *(yyvsp[-1]), *r; 1817 - r = copy_node(i); r->tag = SYM_UNION; 1818 - r->next = (*(yyvsp[-2]))->next; *(yyvsp[0]) = r; (*(yyvsp[-2]))->next = NULL; 1819 - add_symbol(i->string, SYM_UNION, s, is_extern); 1820 - (yyval) = (yyvsp[0]); 1821 - ;} 1502 + #line 213 "scripts/genksyms/parse.y" 1503 + { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;} 1822 1504 break; 1823 1505 1824 1506 case 40: 1825 - #line 228 "scripts/genksyms/parse.y" 1826 - { struct string_list *s = *(yyvsp[0]), *i = *(yyvsp[-1]), *r; 1827 - r = copy_node(i); r->tag = SYM_ENUM; 1828 - r->next = (*(yyvsp[-2]))->next; *(yyvsp[0]) = r; (*(yyvsp[-2]))->next = NULL; 1829 - add_symbol(i->string, SYM_ENUM, s, is_extern); 1830 - (yyval) = (yyvsp[0]); 1507 + #line 217 "scripts/genksyms/parse.y" 1508 + { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r; 1509 + r = copy_node(i); r->tag = SYM_STRUCT; 1510 + r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL; 1511 + add_symbol(i->string, SYM_STRUCT, s, is_extern); 1512 + (yyval) = (yyvsp[(3) - (3)]); 1831 1513 ;} 1832 1514 break; 1833 1515 1834 1516 case 41: 1835 - #line 236 "scripts/genksyms/parse.y" 1836 - { (yyval) = (yyvsp[0]); ;} 1837 - break; 1838 - 1839 - case 42: 1840 - #line 237 "scripts/genksyms/parse.y" 1841 - { (yyval) = (yyvsp[0]); ;} 1842 - break; 1843 - 1844 - case 43: 1845 - #line 238 "scripts/genksyms/parse.y" 1846 - { (yyval) = (yyvsp[0]); ;} 1847 - break; 1848 - 1849 - case 54: 1850 - #line 252 "scripts/genksyms/parse.y" 1851 - { (*(yyvsp[0]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[0]); ;} 1852 - break; 1853 - 1854 - case 55: 1855 - #line 257 "scripts/genksyms/parse.y" 1856 - { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;} 1857 - break; 1858 - 1859 - case 56: 1860 - #line 261 "scripts/genksyms/parse.y" 1861 - { (yyval) = NULL; ;} 1862 - break; 1863 - 1864 - case 59: 1865 - #line 267 "scripts/genksyms/parse.y" 1866 - { (yyval) = (yyvsp[0]); ;} 1867 - break; 1868 - 1869 - case 63: 1870 - #line 273 "scripts/genksyms/parse.y" 1871 - { /* restrict has no effect in prototypes so ignore it */ 1872 - remove_node((yyvsp[0])); 1873 - (yyval) = (yyvsp[0]); 1517 + #line 224 "scripts/genksyms/parse.y" 1518 + { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r; 1519 + r = copy_node(i); r->tag = SYM_UNION; 1520 + r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL; 1521 + add_symbol(i->string, SYM_UNION, s, is_extern); 1522 + (yyval) = (yyvsp[(3) - (3)]); 1874 1523 ;} 1875 1524 break; 1876 1525 1877 - case 64: 1878 - #line 280 "scripts/genksyms/parse.y" 1879 - { (yyval) = (yyvsp[0]); ;} 1526 + case 42: 1527 + #line 231 "scripts/genksyms/parse.y" 1528 + { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r; 1529 + r = copy_node(i); r->tag = SYM_ENUM; 1530 + r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL; 1531 + add_symbol(i->string, SYM_ENUM, s, is_extern); 1532 + (yyval) = (yyvsp[(3) - (3)]); 1533 + ;} 1534 + break; 1535 + 1536 + case 43: 1537 + #line 239 "scripts/genksyms/parse.y" 1538 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1539 + break; 1540 + 1541 + case 44: 1542 + #line 240 "scripts/genksyms/parse.y" 1543 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1544 + break; 1545 + 1546 + case 45: 1547 + #line 241 "scripts/genksyms/parse.y" 1548 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1549 + break; 1550 + 1551 + case 56: 1552 + #line 255 "scripts/genksyms/parse.y" 1553 + { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;} 1554 + break; 1555 + 1556 + case 57: 1557 + #line 260 "scripts/genksyms/parse.y" 1558 + { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} 1559 + break; 1560 + 1561 + case 58: 1562 + #line 264 "scripts/genksyms/parse.y" 1563 + { (yyval) = NULL; ;} 1564 + break; 1565 + 1566 + case 61: 1567 + #line 270 "scripts/genksyms/parse.y" 1568 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1569 + break; 1570 + 1571 + case 65: 1572 + #line 276 "scripts/genksyms/parse.y" 1573 + { /* restrict has no effect in prototypes so ignore it */ 1574 + remove_node((yyvsp[(1) - (1)])); 1575 + (yyval) = (yyvsp[(1) - (1)]); 1576 + ;} 1880 1577 break; 1881 1578 1882 1579 case 66: 1883 - #line 286 "scripts/genksyms/parse.y" 1580 + #line 283 "scripts/genksyms/parse.y" 1581 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1582 + break; 1583 + 1584 + case 68: 1585 + #line 289 "scripts/genksyms/parse.y" 1884 1586 { if (current_name != NULL) { 1885 1587 error_with_pos("unexpected second declaration name"); 1886 1588 YYERROR; 1887 1589 } else { 1888 - current_name = (*(yyvsp[0]))->string; 1889 - (yyval) = (yyvsp[0]); 1590 + current_name = (*(yyvsp[(1) - (1)]))->string; 1591 + (yyval) = (yyvsp[(1) - (1)]); 1890 1592 } 1891 1593 ;} 1892 1594 break; 1893 1595 1894 - case 67: 1895 - #line 295 "scripts/genksyms/parse.y" 1896 - { (yyval) = (yyvsp[0]); ;} 1897 - break; 1898 - 1899 - case 68: 1900 - #line 297 "scripts/genksyms/parse.y" 1901 - { (yyval) = (yyvsp[0]); ;} 1902 - break; 1903 - 1904 1596 case 69: 1905 - #line 299 "scripts/genksyms/parse.y" 1906 - { (yyval) = (yyvsp[0]); ;} 1597 + #line 298 "scripts/genksyms/parse.y" 1598 + { (yyval) = (yyvsp[(4) - (4)]); ;} 1907 1599 break; 1908 1600 1909 1601 case 70: 1910 - #line 301 "scripts/genksyms/parse.y" 1911 - { (yyval) = (yyvsp[0]); ;} 1602 + #line 300 "scripts/genksyms/parse.y" 1603 + { (yyval) = (yyvsp[(4) - (4)]); ;} 1912 1604 break; 1913 1605 1914 1606 case 71: 1915 - #line 303 "scripts/genksyms/parse.y" 1916 - { (yyval) = (yyvsp[0]); ;} 1607 + #line 302 "scripts/genksyms/parse.y" 1608 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1917 1609 break; 1918 1610 1919 1611 case 72: 1920 - #line 309 "scripts/genksyms/parse.y" 1921 - { (yyval) = (yyvsp[0]); ;} 1612 + #line 304 "scripts/genksyms/parse.y" 1613 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1922 1614 break; 1923 1615 1924 - case 76: 1925 - #line 317 "scripts/genksyms/parse.y" 1926 - { (yyval) = (yyvsp[0]); ;} 1616 + case 73: 1617 + #line 306 "scripts/genksyms/parse.y" 1618 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1927 1619 break; 1928 1620 1929 - case 77: 1930 - #line 319 "scripts/genksyms/parse.y" 1931 - { (yyval) = (yyvsp[0]); ;} 1621 + case 74: 1622 + #line 312 "scripts/genksyms/parse.y" 1623 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1932 1624 break; 1933 1625 1934 1626 case 78: 1935 - #line 321 "scripts/genksyms/parse.y" 1936 - { (yyval) = (yyvsp[0]); ;} 1627 + #line 320 "scripts/genksyms/parse.y" 1628 + { (yyval) = (yyvsp[(4) - (4)]); ;} 1937 1629 break; 1938 1630 1939 1631 case 79: 1940 - #line 323 "scripts/genksyms/parse.y" 1941 - { (yyval) = (yyvsp[0]); ;} 1632 + #line 322 "scripts/genksyms/parse.y" 1633 + { (yyval) = (yyvsp[(4) - (4)]); ;} 1942 1634 break; 1943 1635 1944 1636 case 80: 1945 - #line 325 "scripts/genksyms/parse.y" 1946 - { (yyval) = (yyvsp[0]); ;} 1637 + #line 324 "scripts/genksyms/parse.y" 1638 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1947 1639 break; 1948 1640 1949 1641 case 81: 1950 - #line 329 "scripts/genksyms/parse.y" 1951 - { (yyval) = (yyvsp[0]); ;} 1642 + #line 326 "scripts/genksyms/parse.y" 1643 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1644 + break; 1645 + 1646 + case 82: 1647 + #line 328 "scripts/genksyms/parse.y" 1648 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1952 1649 break; 1953 1650 1954 1651 case 83: 1955 - #line 331 "scripts/genksyms/parse.y" 1956 - { (yyval) = (yyvsp[0]); ;} 1652 + #line 332 "scripts/genksyms/parse.y" 1653 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1957 1654 break; 1958 1655 1959 - case 84: 1960 - #line 335 "scripts/genksyms/parse.y" 1656 + case 85: 1657 + #line 334 "scripts/genksyms/parse.y" 1658 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1659 + break; 1660 + 1661 + case 86: 1662 + #line 338 "scripts/genksyms/parse.y" 1961 1663 { (yyval) = NULL; ;} 1962 - break; 1963 - 1964 - case 87: 1965 - #line 342 "scripts/genksyms/parse.y" 1966 - { (yyval) = (yyvsp[0]); ;} 1967 - break; 1968 - 1969 - case 88: 1970 - #line 347 "scripts/genksyms/parse.y" 1971 - { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;} 1972 1664 break; 1973 1665 1974 1666 case 89: 1975 - #line 352 "scripts/genksyms/parse.y" 1976 - { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;} 1667 + #line 345 "scripts/genksyms/parse.y" 1668 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1669 + break; 1670 + 1671 + case 90: 1672 + #line 350 "scripts/genksyms/parse.y" 1673 + { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} 1977 1674 break; 1978 1675 1979 1676 case 91: 1980 - #line 357 "scripts/genksyms/parse.y" 1981 - { (yyval) = NULL; ;} 1982 - break; 1983 - 1984 - case 92: 1985 - #line 359 "scripts/genksyms/parse.y" 1986 - { /* For version 2 checksums, we don't want to remember 1987 - private parameter names. */ 1988 - remove_node((yyvsp[0])); 1989 - (yyval) = (yyvsp[0]); 1990 - ;} 1677 + #line 355 "scripts/genksyms/parse.y" 1678 + { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} 1991 1679 break; 1992 1680 1993 1681 case 93: 1994 - #line 367 "scripts/genksyms/parse.y" 1995 - { remove_node((yyvsp[0])); 1996 - (yyval) = (yyvsp[0]); 1997 - ;} 1682 + #line 360 "scripts/genksyms/parse.y" 1683 + { (yyval) = NULL; ;} 1998 1684 break; 1999 1685 2000 1686 case 94: 2001 - #line 371 "scripts/genksyms/parse.y" 2002 - { (yyval) = (yyvsp[0]); ;} 2003 - break; 2004 - 2005 - case 95: 2006 - #line 373 "scripts/genksyms/parse.y" 2007 - { (yyval) = (yyvsp[0]); ;} 2008 - break; 2009 - 2010 - case 96: 2011 - #line 375 "scripts/genksyms/parse.y" 2012 - { (yyval) = (yyvsp[0]); ;} 2013 - break; 2014 - 2015 - case 97: 2016 - #line 377 "scripts/genksyms/parse.y" 2017 - { (yyval) = (yyvsp[0]); ;} 2018 - break; 2019 - 2020 - case 98: 2021 - #line 379 "scripts/genksyms/parse.y" 2022 - { (yyval) = (yyvsp[0]); ;} 2023 - break; 2024 - 2025 - case 99: 2026 - #line 384 "scripts/genksyms/parse.y" 2027 - { struct string_list *decl = *(yyvsp[-1]); 2028 - *(yyvsp[-1]) = NULL; 2029 - add_symbol(current_name, SYM_NORMAL, decl, is_extern); 2030 - (yyval) = (yyvsp[0]); 1687 + #line 362 "scripts/genksyms/parse.y" 1688 + { /* For version 2 checksums, we don't want to remember 1689 + private parameter names. */ 1690 + remove_node((yyvsp[(1) - (1)])); 1691 + (yyval) = (yyvsp[(1) - (1)]); 2031 1692 ;} 2032 1693 break; 2033 1694 1695 + case 95: 1696 + #line 370 "scripts/genksyms/parse.y" 1697 + { remove_node((yyvsp[(1) - (1)])); 1698 + (yyval) = (yyvsp[(1) - (1)]); 1699 + ;} 1700 + break; 1701 + 1702 + case 96: 1703 + #line 374 "scripts/genksyms/parse.y" 1704 + { (yyval) = (yyvsp[(4) - (4)]); ;} 1705 + break; 1706 + 1707 + case 97: 1708 + #line 376 "scripts/genksyms/parse.y" 1709 + { (yyval) = (yyvsp[(4) - (4)]); ;} 1710 + break; 1711 + 1712 + case 98: 1713 + #line 378 "scripts/genksyms/parse.y" 1714 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1715 + break; 1716 + 1717 + case 99: 1718 + #line 380 "scripts/genksyms/parse.y" 1719 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1720 + break; 1721 + 2034 1722 case 100: 2035 - #line 392 "scripts/genksyms/parse.y" 2036 - { (yyval) = NULL; ;} 1723 + #line 382 "scripts/genksyms/parse.y" 1724 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1725 + break; 1726 + 1727 + case 101: 1728 + #line 387 "scripts/genksyms/parse.y" 1729 + { struct string_list *decl = *(yyvsp[(2) - (3)]); 1730 + *(yyvsp[(2) - (3)]) = NULL; 1731 + add_symbol(current_name, SYM_NORMAL, decl, is_extern); 1732 + (yyval) = (yyvsp[(3) - (3)]); 1733 + ;} 2037 1734 break; 2038 1735 2039 1736 case 102: 2040 - #line 399 "scripts/genksyms/parse.y" 2041 - { remove_list((yyvsp[0]), &(*(yyvsp[-1]))->next); (yyval) = (yyvsp[0]); ;} 2042 - break; 2043 - 2044 - case 103: 2045 - #line 403 "scripts/genksyms/parse.y" 2046 - { (yyval) = (yyvsp[0]); ;} 1737 + #line 395 "scripts/genksyms/parse.y" 1738 + { (yyval) = NULL; ;} 2047 1739 break; 2048 1740 2049 1741 case 104: 2050 - #line 404 "scripts/genksyms/parse.y" 2051 - { (yyval) = (yyvsp[0]); ;} 1742 + #line 402 "scripts/genksyms/parse.y" 1743 + { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;} 2052 1744 break; 2053 1745 2054 1746 case 105: 2055 - #line 408 "scripts/genksyms/parse.y" 1747 + #line 406 "scripts/genksyms/parse.y" 1748 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1749 + break; 1750 + 1751 + case 106: 1752 + #line 407 "scripts/genksyms/parse.y" 1753 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1754 + break; 1755 + 1756 + case 107: 1757 + #line 411 "scripts/genksyms/parse.y" 2056 1758 { (yyval) = NULL; ;} 2057 - break; 2058 - 2059 - case 108: 2060 - #line 414 "scripts/genksyms/parse.y" 2061 - { (yyval) = (yyvsp[0]); ;} 2062 - break; 2063 - 2064 - case 109: 2065 - #line 419 "scripts/genksyms/parse.y" 2066 - { (yyval) = (yyvsp[0]); ;} 2067 1759 break; 2068 1760 2069 1761 case 110: 2070 - #line 421 "scripts/genksyms/parse.y" 2071 - { (yyval) = (yyvsp[0]); ;} 1762 + #line 417 "scripts/genksyms/parse.y" 1763 + { (yyval) = (yyvsp[(2) - (2)]); ;} 2072 1764 break; 2073 1765 2074 1766 case 111: 2075 - #line 425 "scripts/genksyms/parse.y" 1767 + #line 422 "scripts/genksyms/parse.y" 1768 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1769 + break; 1770 + 1771 + case 112: 1772 + #line 424 "scripts/genksyms/parse.y" 1773 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1774 + break; 1775 + 1776 + case 113: 1777 + #line 428 "scripts/genksyms/parse.y" 2076 1778 { (yyval) = NULL; ;} 2077 - break; 2078 - 2079 - case 114: 2080 - #line 431 "scripts/genksyms/parse.y" 2081 - { (yyval) = (yyvsp[0]); ;} 2082 - break; 2083 - 2084 - case 115: 2085 - #line 435 "scripts/genksyms/parse.y" 2086 - { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;} 2087 1779 break; 2088 1780 2089 1781 case 116: 2090 - #line 436 "scripts/genksyms/parse.y" 2091 - { (yyval) = (yyvsp[0]); ;} 1782 + #line 434 "scripts/genksyms/parse.y" 1783 + { (yyval) = (yyvsp[(3) - (3)]); ;} 1784 + break; 1785 + 1786 + case 117: 1787 + #line 438 "scripts/genksyms/parse.y" 1788 + { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;} 2092 1789 break; 2093 1790 2094 1791 case 118: 2095 - #line 441 "scripts/genksyms/parse.y" 2096 - { (yyval) = (yyvsp[0]); ;} 1792 + #line 439 "scripts/genksyms/parse.y" 1793 + { (yyval) = (yyvsp[(2) - (2)]); ;} 2097 1794 break; 2098 1795 2099 - case 119: 2100 - #line 445 "scripts/genksyms/parse.y" 2101 - { (yyval) = NULL; ;} 1796 + case 120: 1797 + #line 444 "scripts/genksyms/parse.y" 1798 + { (yyval) = (yyvsp[(2) - (2)]); ;} 2102 1799 break; 2103 1800 2104 1801 case 121: 2105 - #line 450 "scripts/genksyms/parse.y" 2106 - { (yyval) = (yyvsp[0]); ;} 2107 - break; 2108 - 2109 - case 122: 2110 - #line 454 "scripts/genksyms/parse.y" 1802 + #line 448 "scripts/genksyms/parse.y" 2111 1803 { (yyval) = NULL; ;} 2112 1804 break; 2113 1805 1806 + case 123: 1807 + #line 453 "scripts/genksyms/parse.y" 1808 + { (yyval) = (yyvsp[(2) - (2)]); ;} 1809 + break; 1810 + 2114 1811 case 124: 2115 - #line 460 "scripts/genksyms/parse.y" 2116 - { export_symbol((*(yyvsp[-2]))->string); (yyval) = (yyvsp[0]); ;} 1812 + #line 457 "scripts/genksyms/parse.y" 1813 + { (yyval) = NULL; ;} 1814 + break; 1815 + 1816 + case 126: 1817 + #line 463 "scripts/genksyms/parse.y" 1818 + { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;} 2117 1819 break; 2118 1820 2119 1821 1822 + /* Line 1267 of yacc.c. */ 1823 + #line 2132 "scripts/genksyms/parse.c" 1824 + default: break; 2120 1825 } 1826 + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 2121 1827 2122 - /* Line 1037 of yacc.c. */ 2123 - #line 1816 "scripts/genksyms/parse.c" 2124 - 2125 - yyvsp -= yylen; 2126 - yyssp -= yylen; 2127 - 2128 - 1828 + YYPOPSTACK (yylen); 1829 + yylen = 0; 2129 1830 YY_STACK_PRINT (yyss, yyssp); 2130 1831 2131 1832 *++yyvsp = yyval; ··· 2163 1846 if (!yyerrstatus) 2164 1847 { 2165 1848 ++yynerrs; 2166 - #if YYERROR_VERBOSE 2167 - yyn = yypact[yystate]; 2168 - 2169 - if (YYPACT_NINF < yyn && yyn < YYLAST) 2170 - { 2171 - YYSIZE_T yysize = 0; 2172 - int yytype = YYTRANSLATE (yychar); 2173 - const char* yyprefix; 2174 - char *yymsg; 2175 - int yyx; 2176 - 2177 - /* Start YYX at -YYN if negative to avoid negative indexes in 2178 - YYCHECK. */ 2179 - int yyxbegin = yyn < 0 ? -yyn : 0; 2180 - 2181 - /* Stay within bounds of both yycheck and yytname. */ 2182 - int yychecklim = YYLAST - yyn; 2183 - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 2184 - int yycount = 0; 2185 - 2186 - yyprefix = ", expecting "; 2187 - for (yyx = yyxbegin; yyx < yyxend; ++yyx) 2188 - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 2189 - { 2190 - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); 2191 - yycount += 1; 2192 - if (yycount == 5) 2193 - { 2194 - yysize = 0; 2195 - break; 2196 - } 2197 - } 2198 - yysize += (sizeof ("syntax error, unexpected ") 2199 - + yystrlen (yytname[yytype])); 2200 - yymsg = (char *) YYSTACK_ALLOC (yysize); 2201 - if (yymsg != 0) 2202 - { 2203 - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); 2204 - yyp = yystpcpy (yyp, yytname[yytype]); 2205 - 2206 - if (yycount < 5) 2207 - { 2208 - yyprefix = ", expecting "; 2209 - for (yyx = yyxbegin; yyx < yyxend; ++yyx) 2210 - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 2211 - { 2212 - yyp = yystpcpy (yyp, yyprefix); 2213 - yyp = yystpcpy (yyp, yytname[yyx]); 2214 - yyprefix = " or "; 2215 - } 2216 - } 2217 - yyerror (yymsg); 1849 + #if ! YYERROR_VERBOSE 1850 + yyerror (YY_("syntax error")); 1851 + #else 1852 + { 1853 + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 1854 + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 1855 + { 1856 + YYSIZE_T yyalloc = 2 * yysize; 1857 + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 1858 + yyalloc = YYSTACK_ALLOC_MAXIMUM; 1859 + if (yymsg != yymsgbuf) 2218 1860 YYSTACK_FREE (yymsg); 2219 - } 2220 - else 2221 - yyerror ("syntax error; also virtual memory exhausted"); 2222 - } 2223 - else 2224 - #endif /* YYERROR_VERBOSE */ 2225 - yyerror ("syntax error"); 1861 + yymsg = (char *) YYSTACK_ALLOC (yyalloc); 1862 + if (yymsg) 1863 + yymsg_alloc = yyalloc; 1864 + else 1865 + { 1866 + yymsg = yymsgbuf; 1867 + yymsg_alloc = sizeof yymsgbuf; 1868 + } 1869 + } 1870 + 1871 + if (0 < yysize && yysize <= yymsg_alloc) 1872 + { 1873 + (void) yysyntax_error (yymsg, yystate, yychar); 1874 + yyerror (yymsg); 1875 + } 1876 + else 1877 + { 1878 + yyerror (YY_("syntax error")); 1879 + if (yysize != 0) 1880 + goto yyexhaustedlab; 1881 + } 1882 + } 1883 + #endif 2226 1884 } 2227 1885 2228 1886 ··· 2208 1916 error, discard it. */ 2209 1917 2210 1918 if (yychar <= YYEOF) 2211 - { 2212 - /* If at end of input, pop the error token, 2213 - then the rest of the stack, then return failure. */ 1919 + { 1920 + /* Return failure if at end of input. */ 2214 1921 if (yychar == YYEOF) 2215 - for (;;) 2216 - { 2217 - 2218 - YYPOPSTACK; 2219 - if (yyssp == yyss) 2220 - YYABORT; 2221 - yydestruct ("Error: popping", 2222 - yystos[*yyssp], yyvsp); 2223 - } 2224 - } 1922 + YYABORT; 1923 + } 2225 1924 else 2226 1925 { 2227 - yydestruct ("Error: discarding", yytoken, &yylval); 1926 + yydestruct ("Error: discarding", 1927 + yytoken, &yylval); 2228 1928 yychar = YYEMPTY; 2229 1929 } 2230 1930 } ··· 2231 1947 `---------------------------------------------------*/ 2232 1948 yyerrorlab: 2233 1949 2234 - #ifdef __GNUC__ 2235 - /* Pacify GCC when the user code never invokes YYERROR and the label 2236 - yyerrorlab therefore never appears in user code. */ 2237 - if (0) 1950 + /* Pacify compilers like GCC when the user code never invokes 1951 + YYERROR and the label yyerrorlab therefore never appears in user 1952 + code. */ 1953 + if (/*CONSTCOND*/ 0) 2238 1954 goto yyerrorlab; 2239 - #endif 2240 1955 2241 - yyvsp -= yylen; 2242 - yyssp -= yylen; 1956 + /* Do not reclaim the symbols of the rule which action triggered 1957 + this YYERROR. */ 1958 + YYPOPSTACK (yylen); 1959 + yylen = 0; 1960 + YY_STACK_PRINT (yyss, yyssp); 2243 1961 yystate = *yyssp; 2244 1962 goto yyerrlab1; 2245 1963 ··· 2271 1985 YYABORT; 2272 1986 2273 1987 2274 - yydestruct ("Error: popping", yystos[yystate], yyvsp); 2275 - YYPOPSTACK; 1988 + yydestruct ("Error: popping", 1989 + yystos[yystate], yyvsp); 1990 + YYPOPSTACK (1); 2276 1991 yystate = *yyssp; 2277 1992 YY_STACK_PRINT (yyss, yyssp); 2278 1993 } ··· 2284 1997 *++yyvsp = yylval; 2285 1998 2286 1999 2287 - /* Shift the error token. */ 2000 + /* Shift the error token. */ 2288 2001 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 2289 2002 2290 2003 yystate = yyn; ··· 2302 2015 | yyabortlab -- YYABORT comes here. | 2303 2016 `-----------------------------------*/ 2304 2017 yyabortlab: 2305 - yydestruct ("Error: discarding lookahead", 2306 - yytoken, &yylval); 2307 - yychar = YYEMPTY; 2308 2018 yyresult = 1; 2309 2019 goto yyreturn; 2310 2020 2311 2021 #ifndef yyoverflow 2312 - /*----------------------------------------------. 2313 - | yyoverflowlab -- parser overflow comes here. | 2314 - `----------------------------------------------*/ 2315 - yyoverflowlab: 2316 - yyerror ("parser stack overflow"); 2022 + /*-------------------------------------------------. 2023 + | yyexhaustedlab -- memory exhaustion comes here. | 2024 + `-------------------------------------------------*/ 2025 + yyexhaustedlab: 2026 + yyerror (YY_("memory exhausted")); 2317 2027 yyresult = 2; 2318 2028 /* Fall through. */ 2319 2029 #endif 2320 2030 2321 2031 yyreturn: 2032 + if (yychar != YYEOF && yychar != YYEMPTY) 2033 + yydestruct ("Cleanup: discarding lookahead", 2034 + yytoken, &yylval); 2035 + /* Do not reclaim the symbols of the rule which action triggered 2036 + this YYABORT or YYACCEPT. */ 2037 + YYPOPSTACK (yylen); 2038 + YY_STACK_PRINT (yyss, yyssp); 2039 + while (yyssp != yyss) 2040 + { 2041 + yydestruct ("Cleanup: popping", 2042 + yystos[*yyssp], yyvsp); 2043 + YYPOPSTACK (1); 2044 + } 2322 2045 #ifndef yyoverflow 2323 2046 if (yyss != yyssa) 2324 2047 YYSTACK_FREE (yyss); 2325 2048 #endif 2326 - return yyresult; 2049 + #if YYERROR_VERBOSE 2050 + if (yymsg != yymsgbuf) 2051 + YYSTACK_FREE (yymsg); 2052 + #endif 2053 + /* Make sure YYID is used. */ 2054 + return YYID (yyresult); 2327 2055 } 2328 2056 2329 2057 2330 - #line 464 "scripts/genksyms/parse.y" 2058 + #line 467 "scripts/genksyms/parse.y" 2331 2059 2332 2060 2333 2061 static void
+85 -74
scripts/genksyms/parse.h_shipped
··· 1 - /* A Bison parser, made by GNU Bison 2.0. */ 1 + /* A Bison parser, made by GNU Bison 2.3. */ 2 2 3 - /* Skeleton parser for Yacc-like parsing with Bison, 4 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 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. 5 7 6 8 This program is free software; you can redistribute it and/or modify 7 9 it under the terms of the GNU General Public License as published by ··· 17 15 18 16 You should have received a copy of the GNU General Public License 19 17 along with this program; if not, write to the Free Software 20 - Foundation, Inc., 59 Temple Place - Suite 330, 21 - Boston, MA 02111-1307, USA. */ 18 + Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 + Boston, MA 02110-1301, USA. */ 22 20 23 - /* As a special exception, when this file is copied by Bison into a 24 - Bison output file, you may use that output file without restriction. 25 - This special exception was added by the Free Software Foundation 26 - in version 1.24 of Bison. */ 21 + /* As a special exception, you may create a larger work that contains 22 + part or all of the Bison parser skeleton and distribute that work 23 + under terms of your choice, so long as that work isn't itself a 24 + parser generator using the skeleton or a modified version thereof 25 + as a parser skeleton. Alternatively, if you modify or redistribute 26 + the parser skeleton itself, you may (at your option) remove this 27 + special exception, which will cause the skeleton and the resulting 28 + Bison output files to be licensed under the GNU General Public 29 + License without this special exception. 30 + 31 + This special exception was added by the Free Software Foundation in 32 + version 2.2 of Bison. */ 27 33 28 34 /* Tokens. */ 29 35 #ifndef YYTOKENTYPE ··· 48 38 DOUBLE_KEYW = 264, 49 39 ENUM_KEYW = 265, 50 40 EXTERN_KEYW = 266, 51 - FLOAT_KEYW = 267, 52 - INLINE_KEYW = 268, 53 - INT_KEYW = 269, 54 - LONG_KEYW = 270, 55 - REGISTER_KEYW = 271, 56 - RESTRICT_KEYW = 272, 57 - SHORT_KEYW = 273, 58 - SIGNED_KEYW = 274, 59 - STATIC_KEYW = 275, 60 - STRUCT_KEYW = 276, 61 - TYPEDEF_KEYW = 277, 62 - UNION_KEYW = 278, 63 - UNSIGNED_KEYW = 279, 64 - VOID_KEYW = 280, 65 - VOLATILE_KEYW = 281, 66 - TYPEOF_KEYW = 282, 67 - EXPORT_SYMBOL_KEYW = 283, 68 - ASM_PHRASE = 284, 69 - ATTRIBUTE_PHRASE = 285, 70 - BRACE_PHRASE = 286, 71 - BRACKET_PHRASE = 287, 72 - EXPRESSION_PHRASE = 288, 73 - CHAR = 289, 74 - DOTS = 290, 75 - IDENT = 291, 76 - INT = 292, 77 - REAL = 293, 78 - STRING = 294, 79 - TYPE = 295, 80 - OTHER = 296, 81 - FILENAME = 297 41 + EXTENSION_KEYW = 267, 42 + FLOAT_KEYW = 268, 43 + INLINE_KEYW = 269, 44 + INT_KEYW = 270, 45 + LONG_KEYW = 271, 46 + REGISTER_KEYW = 272, 47 + RESTRICT_KEYW = 273, 48 + SHORT_KEYW = 274, 49 + SIGNED_KEYW = 275, 50 + STATIC_KEYW = 276, 51 + STRUCT_KEYW = 277, 52 + TYPEDEF_KEYW = 278, 53 + UNION_KEYW = 279, 54 + UNSIGNED_KEYW = 280, 55 + VOID_KEYW = 281, 56 + VOLATILE_KEYW = 282, 57 + TYPEOF_KEYW = 283, 58 + EXPORT_SYMBOL_KEYW = 284, 59 + ASM_PHRASE = 285, 60 + ATTRIBUTE_PHRASE = 286, 61 + BRACE_PHRASE = 287, 62 + BRACKET_PHRASE = 288, 63 + EXPRESSION_PHRASE = 289, 64 + CHAR = 290, 65 + DOTS = 291, 66 + IDENT = 292, 67 + INT = 293, 68 + REAL = 294, 69 + STRING = 295, 70 + TYPE = 296, 71 + OTHER = 297, 72 + FILENAME = 298 82 73 }; 83 74 #endif 75 + /* Tokens. */ 84 76 #define ASM_KEYW 258 85 77 #define ATTRIBUTE_KEYW 259 86 78 #define AUTO_KEYW 260 ··· 92 80 #define DOUBLE_KEYW 264 93 81 #define ENUM_KEYW 265 94 82 #define EXTERN_KEYW 266 95 - #define FLOAT_KEYW 267 96 - #define INLINE_KEYW 268 97 - #define INT_KEYW 269 98 - #define LONG_KEYW 270 99 - #define REGISTER_KEYW 271 100 - #define RESTRICT_KEYW 272 101 - #define SHORT_KEYW 273 102 - #define SIGNED_KEYW 274 103 - #define STATIC_KEYW 275 104 - #define STRUCT_KEYW 276 105 - #define TYPEDEF_KEYW 277 106 - #define UNION_KEYW 278 107 - #define UNSIGNED_KEYW 279 108 - #define VOID_KEYW 280 109 - #define VOLATILE_KEYW 281 110 - #define TYPEOF_KEYW 282 111 - #define EXPORT_SYMBOL_KEYW 283 112 - #define ASM_PHRASE 284 113 - #define ATTRIBUTE_PHRASE 285 114 - #define BRACE_PHRASE 286 115 - #define BRACKET_PHRASE 287 116 - #define EXPRESSION_PHRASE 288 117 - #define CHAR 289 118 - #define DOTS 290 119 - #define IDENT 291 120 - #define INT 292 121 - #define REAL 293 122 - #define STRING 294 123 - #define TYPE 295 124 - #define OTHER 296 125 - #define FILENAME 297 83 + #define EXTENSION_KEYW 267 84 + #define FLOAT_KEYW 268 85 + #define INLINE_KEYW 269 86 + #define INT_KEYW 270 87 + #define LONG_KEYW 271 88 + #define REGISTER_KEYW 272 89 + #define RESTRICT_KEYW 273 90 + #define SHORT_KEYW 274 91 + #define SIGNED_KEYW 275 92 + #define STATIC_KEYW 276 93 + #define STRUCT_KEYW 277 94 + #define TYPEDEF_KEYW 278 95 + #define UNION_KEYW 279 96 + #define UNSIGNED_KEYW 280 97 + #define VOID_KEYW 281 98 + #define VOLATILE_KEYW 282 99 + #define TYPEOF_KEYW 283 100 + #define EXPORT_SYMBOL_KEYW 284 101 + #define ASM_PHRASE 285 102 + #define ATTRIBUTE_PHRASE 286 103 + #define BRACE_PHRASE 287 104 + #define BRACKET_PHRASE 288 105 + #define EXPRESSION_PHRASE 289 106 + #define CHAR 290 107 + #define DOTS 291 108 + #define IDENT 292 109 + #define INT 293 110 + #define REAL 294 111 + #define STRING 295 112 + #define TYPE 296 113 + #define OTHER 297 114 + #define FILENAME 298 126 115 127 116 128 117 129 118 130 - #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 119 + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 131 120 typedef int YYSTYPE; 132 121 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 133 122 # define YYSTYPE_IS_DECLARED 1 ··· 136 123 #endif 137 124 138 125 extern YYSTYPE yylval; 139 - 140 - 141 126
+4 -1
scripts/genksyms/parse.y
··· 61 61 %token DOUBLE_KEYW 62 62 %token ENUM_KEYW 63 63 %token EXTERN_KEYW 64 + %token EXTENSION_KEYW 64 65 %token FLOAT_KEYW 65 66 %token INLINE_KEYW 66 67 %token INT_KEYW ··· 111 110 ; 112 111 113 112 declaration1: 114 - TYPEDEF_KEYW { is_typedef = 1; } simple_declaration 113 + EXTENSION_KEYW TYPEDEF_KEYW { is_typedef = 1; } simple_declaration 114 + { $$ = $4; } 115 + | TYPEDEF_KEYW { is_typedef = 1; } simple_declaration 115 116 { $$ = $3; } 116 117 | simple_declaration 117 118 | function_definition
+2 -8
scripts/kconfig/Makefile
··· 143 143 .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c 144 144 clean-files += mconf qconf gconf 145 145 146 - # Needed for systems without gettext 147 - KBUILD_HAVE_NLS := $(shell \ 148 - if echo "\#include <libintl.h>" | $(HOSTCC) $(HOSTCFLAGS) -E - > /dev/null 2>&1 ; \ 149 - then echo yes ; \ 150 - else echo no ; fi) 151 - ifeq ($(KBUILD_HAVE_NLS),no) 152 - HOSTCFLAGS += -DKBUILD_NO_NLS 153 - endif 146 + # Add environment specific flags 147 + HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) 154 148 155 149 # generated files seem to need this to find local include files 156 150 HOSTCFLAGS_lex.zconf.o := -I$(src)
+14
scripts/kconfig/check.sh
··· 1 + #!/bin/sh 2 + # Needed for systems without gettext 3 + $* -xc -o /dev/null - > /dev/null 2>&1 << EOF 4 + #include <libintl.h> 5 + int main() 6 + { 7 + gettext(""); 8 + return 0; 9 + } 10 + EOF 11 + if [ ! "$?" -eq "0" ]; then 12 + echo -DKBUILD_NO_NLS; 13 + fi 14 +
+22 -3
scripts/kconfig/lex.zconf.c_shipped
··· 5 5 6 6 /* A lexical scanner generated by flex */ 7 7 8 + #define yy_create_buffer zconf_create_buffer 9 + #define yy_delete_buffer zconf_delete_buffer 10 + #define yy_flex_debug zconf_flex_debug 11 + #define yy_init_buffer zconf_init_buffer 12 + #define yy_flush_buffer zconf_flush_buffer 13 + #define yy_load_buffer_state zconf_load_buffer_state 14 + #define yy_switch_to_buffer zconf_switch_to_buffer 15 + #define yyin zconfin 16 + #define yyleng zconfleng 17 + #define yylex zconflex 18 + #define yylineno zconflineno 19 + #define yyout zconfout 20 + #define yyrestart zconfrestart 21 + #define yytext zconftext 22 + #define yywrap zconfwrap 23 + #define yyalloc zconfalloc 24 + #define yyrealloc zconfrealloc 25 + #define yyfree zconffree 26 + 8 27 #define FLEX_SCANNER 9 28 #define YY_FLEX_MAJOR_VERSION 2 10 29 #define YY_FLEX_MINOR_VERSION 5 ··· 52 33 #if __STDC_VERSION__ >= 199901L 53 34 54 35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 55 - * if you want the limit (max/min) macros for int types. 36 + * if you want the limit (max/min) macros for int types. 56 37 */ 57 38 #ifndef __STDC_LIMIT_MACROS 58 39 #define __STDC_LIMIT_MACROS 1 ··· 354 335 355 336 /* Begin user sect3 */ 356 337 357 - #define zconfwrap() 1 338 + #define zconfwrap(n) 1 358 339 #define YY_SKIP_YYWRAP 359 340 360 341 typedef unsigned char YY_CHAR; ··· 2002 1983 2003 1984 /** Setup the input buffer state to scan a string. The next call to zconflex() will 2004 1985 * scan from a @e copy of @a str. 2005 - * @param yystr a NUL-terminated string to scan 1986 + * @param str a NUL-terminated string to scan 2006 1987 * 2007 1988 * @return the newly allocated buffer state object. 2008 1989 * @note If you want to scan bytes that may contain NUL values, then use
+26 -10
scripts/kconfig/mconf.c
··· 35 35 "kernel parameters which are not really features, but must be\n" 36 36 "entered in as decimal or hexadecimal numbers or possibly text.\n" 37 37 "\n" 38 - "Menu items beginning with [*], <M> or [ ] represent features\n" 39 - "configured to be built in, modularized or removed respectively.\n" 40 - "Pointed brackets <> represent module capable features.\n" 38 + "Menu items beginning with following braces represent features that\n" 39 + " [ ] can be built in or removed\n" 40 + " < > can be built in, modularized or removed\n" 41 + " { } can be built in or modularized (selected by other feature)\n" 42 + " - - are selected by other feature,\n" 43 + "while *, M or whitespace inside braces means to build in, build as\n" 44 + "a module or to exclude the feature respectively.\n" 41 45 "\n" 42 46 "To change any of these features, highlight it with the cursor\n" 43 47 "keys and press <Y> to build it in, <M> to make it a module or\n" ··· 361 357 bool hit; 362 358 struct property *prop; 363 359 364 - str_printf(r, "Symbol: %s [=%s]\n", sym->name, 365 - sym_get_string_value(sym)); 360 + if (sym && sym->name) 361 + str_printf(r, "Symbol: %s [=%s]\n", sym->name, 362 + sym_get_string_value(sym)); 366 363 for_all_prompts(sym, prop) 367 364 get_prompt_str(r, prop); 368 365 hit = false; ··· 486 481 if (single_menu_mode && menu->data) 487 482 goto conf_childs; 488 483 return; 484 + case P_COMMENT: 485 + if (prompt) { 486 + child_count++; 487 + item_make(" %*c*** %s ***", indent + 1, ' ', prompt); 488 + item_set_tag(':'); 489 + item_set_data(menu); 490 + } 491 + break; 489 492 default: 490 493 if (prompt) { 491 494 child_count++; ··· 573 560 if (sym_is_changable(sym)) 574 561 item_make("[%c]", val == no ? ' ' : '*'); 575 562 else 576 - item_make("---"); 563 + item_make("-%c-", val == no ? ' ' : '*'); 577 564 item_set_tag('t'); 578 565 item_set_data(menu); 579 566 break; ··· 583 570 case mod: ch = 'M'; break; 584 571 default: ch = ' '; break; 585 572 } 586 - if (sym_is_changable(sym)) 587 - item_make("<%c>", ch); 588 - else 589 - item_make("---"); 573 + if (sym_is_changable(sym)) { 574 + if (sym->rev_dep.tri == mod) 575 + item_make("{%c}", ch); 576 + else 577 + item_make("<%c>", ch); 578 + } else 579 + item_make("-%c-", ch); 590 580 item_set_tag('t'); 591 581 item_set_data(menu); 592 582 break;
+26 -9
scripts/kconfig/menu.c
··· 235 235 sym = parent->sym; 236 236 if (parent->list) { 237 237 if (sym && sym_is_choice(sym)) { 238 - /* find the first choice value and find out choice type */ 238 + /* find out choice type */ 239 + enum symbol_type type = S_UNKNOWN; 240 + 239 241 for (menu = parent->list; menu; menu = menu->next) { 240 - if (menu->sym) { 241 - current_entry = parent; 242 - menu_set_type(menu->sym->type); 243 - current_entry = menu; 244 - menu_set_type(sym->type); 245 - break; 242 + if (menu->sym && menu->sym->type != S_UNKNOWN) { 243 + if (type == S_UNKNOWN) 244 + type = menu->sym->type; 245 + if (type != S_BOOLEAN) 246 + break; 247 + if (menu->sym->type == S_TRISTATE) { 248 + type = S_TRISTATE; 249 + break; 250 + } 246 251 } 247 252 } 253 + current_entry = parent; 254 + menu_set_type(type); 248 255 parentdep = expr_alloc_symbol(sym); 249 256 } else if (parent->prompt) 250 257 parentdep = parent->prompt->visible.expr; ··· 260 253 261 254 for (menu = parent->list; menu; menu = menu->next) { 262 255 basedep = expr_transform(menu->dep); 263 - basedep = expr_alloc_and(expr_copy(parentdep), basedep); 256 + dep = parentdep; 257 + if (sym && sym_is_choice(sym) && menu->sym) { 258 + enum symbol_type type = menu->sym->type; 259 + 260 + if (type == S_UNKNOWN) 261 + type = sym->type; 262 + if (type != S_TRISTATE) 263 + dep = expr_alloc_comp(E_EQUAL, sym, &symbol_yes); 264 + } 265 + basedep = expr_alloc_and(expr_copy(dep), basedep); 264 266 basedep = expr_eliminate_dups(basedep); 265 267 menu->dep = basedep; 266 268 if (menu->sym) ··· 342 326 "values not supported"); 343 327 } 344 328 current_entry = menu; 345 - menu_set_type(sym->type); 329 + if (menu->sym->type == S_UNKNOWN) 330 + menu_set_type(sym->type); 346 331 menu_add_symbol(P_CHOICE, sym, NULL); 347 332 prop = sym_get_choice_prop(sym); 348 333 for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr)
+8 -5
scripts/kconfig/util.c
··· 84 84 /* Append to growable string */ 85 85 void str_append(struct gstr *gs, const char *s) 86 86 { 87 - size_t l = strlen(gs->s) + strlen(s) + 1; 88 - if (l > gs->len) { 89 - gs->s = realloc(gs->s, l); 90 - gs->len = l; 87 + size_t l; 88 + if (s) { 89 + l = strlen(gs->s) + strlen(s) + 1; 90 + if (l > gs->len) { 91 + gs->s = realloc(gs->s, l); 92 + gs->len = l; 93 + } 94 + strcat(gs->s, s); 91 95 } 92 - strcat(gs->s, s); 93 96 } 94 97 95 98 /* Append printf formatted string to growable string */
-2
scripts/kconfig/zconf.gperf
··· 23 23 if, T_IF, TF_COMMAND|TF_PARAM 24 24 endif, T_ENDIF, TF_COMMAND 25 25 depends, T_DEPENDS, TF_COMMAND 26 - requires, T_REQUIRES, TF_COMMAND 27 26 optional, T_OPTIONAL, TF_COMMAND 28 27 default, T_DEFAULT, TF_COMMAND, S_UNKNOWN 29 28 prompt, T_PROMPT, TF_COMMAND ··· 31 32 bool, T_TYPE, TF_COMMAND, S_BOOLEAN 32 33 boolean, T_TYPE, TF_COMMAND, S_BOOLEAN 33 34 def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN 34 - def_boolean, T_DEFAULT, TF_COMMAND, S_BOOLEAN 35 35 int, T_TYPE, TF_COMMAND, S_INT 36 36 hex, T_TYPE, TF_COMMAND, S_HEX 37 37 string, T_TYPE, TF_COMMAND, S_STRING
+110 -118
scripts/kconfig/zconf.hash.c_shipped
··· 1 - /* ANSI-C code produced by gperf version 3.0.1 */ 1 + /* ANSI-C code produced by gperf version 3.0.2 */ 2 2 /* Command-line: gperf */ 3 3 /* Computed positions: -k'1,3' */ 4 4 ··· 30 30 #endif 31 31 32 32 struct kconf_id; 33 - /* maximum key range = 45, duplicates = 0 */ 33 + /* maximum key range = 47, duplicates = 0 */ 34 34 35 35 #ifdef __GNUC__ 36 36 __inline ··· 44 44 { 45 45 static unsigned char asso_values[] = 46 46 { 47 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 49 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 50 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 51 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 52 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 53 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 54 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 55 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 56 - 47, 47, 47, 47, 47, 47, 47, 25, 30, 15, 57 - 0, 15, 0, 47, 5, 15, 47, 47, 30, 20, 58 - 5, 0, 25, 15, 0, 0, 10, 35, 47, 47, 59 - 5, 47, 47, 47, 47, 47, 47, 47, 47, 47, 60 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 61 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 62 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 63 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 64 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 65 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 66 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 67 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 68 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 69 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 70 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 71 - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 72 - 47, 47, 47, 47, 47, 47 47 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 51 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 54 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 55 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 56 + 49, 49, 49, 49, 49, 49, 49, 18, 11, 5, 57 + 0, 0, 5, 49, 5, 20, 49, 49, 5, 20, 58 + 5, 0, 30, 49, 0, 15, 0, 10, 49, 49, 59 + 25, 49, 49, 49, 49, 49, 49, 49, 49, 49, 60 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 61 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 62 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 63 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 64 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 65 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 66 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 67 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 68 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 69 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 70 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 71 + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 72 + 49, 49, 49, 49, 49, 49 73 73 }; 74 74 register int hval = len; 75 75 ··· 89 89 struct kconf_id_strings_t 90 90 { 91 91 char kconf_id_strings_str2[sizeof("on")]; 92 - char kconf_id_strings_str6[sizeof("string")]; 93 - char kconf_id_strings_str7[sizeof("default")]; 94 - char kconf_id_strings_str8[sizeof("def_bool")]; 92 + char kconf_id_strings_str5[sizeof("endif")]; 93 + char kconf_id_strings_str6[sizeof("option")]; 94 + char kconf_id_strings_str7[sizeof("endmenu")]; 95 + char kconf_id_strings_str8[sizeof("optional")]; 96 + char kconf_id_strings_str9[sizeof("endchoice")]; 95 97 char kconf_id_strings_str10[sizeof("range")]; 96 - char kconf_id_strings_str11[sizeof("def_boolean")]; 97 - char kconf_id_strings_str12[sizeof("def_tristate")]; 98 - char kconf_id_strings_str13[sizeof("hex")]; 99 - char kconf_id_strings_str14[sizeof("defconfig_list")]; 100 - char kconf_id_strings_str16[sizeof("option")]; 101 - char kconf_id_strings_str17[sizeof("if")]; 102 - char kconf_id_strings_str18[sizeof("optional")]; 103 - char kconf_id_strings_str20[sizeof("endif")]; 104 - char kconf_id_strings_str21[sizeof("choice")]; 105 - char kconf_id_strings_str22[sizeof("endmenu")]; 106 - char kconf_id_strings_str23[sizeof("requires")]; 107 - char kconf_id_strings_str24[sizeof("endchoice")]; 108 - char kconf_id_strings_str26[sizeof("config")]; 98 + char kconf_id_strings_str11[sizeof("choice")]; 99 + char kconf_id_strings_str12[sizeof("default")]; 100 + char kconf_id_strings_str13[sizeof("def_bool")]; 101 + char kconf_id_strings_str14[sizeof("help")]; 102 + char kconf_id_strings_str15[sizeof("bool")]; 103 + char kconf_id_strings_str16[sizeof("config")]; 104 + char kconf_id_strings_str17[sizeof("def_tristate")]; 105 + char kconf_id_strings_str18[sizeof("boolean")]; 106 + char kconf_id_strings_str19[sizeof("defconfig_list")]; 107 + char kconf_id_strings_str21[sizeof("string")]; 108 + char kconf_id_strings_str22[sizeof("if")]; 109 + char kconf_id_strings_str23[sizeof("int")]; 110 + char kconf_id_strings_str24[sizeof("enable")]; 111 + char kconf_id_strings_str26[sizeof("select")]; 109 112 char kconf_id_strings_str27[sizeof("modules")]; 110 - char kconf_id_strings_str28[sizeof("int")]; 113 + char kconf_id_strings_str28[sizeof("tristate")]; 111 114 char kconf_id_strings_str29[sizeof("menu")]; 112 - char kconf_id_strings_str31[sizeof("prompt")]; 113 - char kconf_id_strings_str32[sizeof("depends")]; 114 - char kconf_id_strings_str33[sizeof("tristate")]; 115 - char kconf_id_strings_str34[sizeof("bool")]; 115 + char kconf_id_strings_str31[sizeof("source")]; 116 + char kconf_id_strings_str32[sizeof("comment")]; 117 + char kconf_id_strings_str33[sizeof("hex")]; 116 118 char kconf_id_strings_str35[sizeof("menuconfig")]; 117 - char kconf_id_strings_str36[sizeof("select")]; 118 - char kconf_id_strings_str37[sizeof("boolean")]; 119 - char kconf_id_strings_str39[sizeof("help")]; 120 - char kconf_id_strings_str41[sizeof("source")]; 121 - char kconf_id_strings_str42[sizeof("comment")]; 122 - char kconf_id_strings_str43[sizeof("mainmenu")]; 123 - char kconf_id_strings_str46[sizeof("enable")]; 119 + char kconf_id_strings_str36[sizeof("prompt")]; 120 + char kconf_id_strings_str37[sizeof("depends")]; 121 + char kconf_id_strings_str48[sizeof("mainmenu")]; 124 122 }; 125 123 static struct kconf_id_strings_t kconf_id_strings_contents = 126 124 { 127 125 "on", 128 - "string", 126 + "endif", 127 + "option", 128 + "endmenu", 129 + "optional", 130 + "endchoice", 131 + "range", 132 + "choice", 129 133 "default", 130 134 "def_bool", 131 - "range", 132 - "def_boolean", 133 - "def_tristate", 134 - "hex", 135 - "defconfig_list", 136 - "option", 137 - "if", 138 - "optional", 139 - "endif", 140 - "choice", 141 - "endmenu", 142 - "requires", 143 - "endchoice", 144 - "config", 145 - "modules", 146 - "int", 147 - "menu", 148 - "prompt", 149 - "depends", 150 - "tristate", 151 - "bool", 152 - "menuconfig", 153 - "select", 154 - "boolean", 155 135 "help", 136 + "bool", 137 + "config", 138 + "def_tristate", 139 + "boolean", 140 + "defconfig_list", 141 + "string", 142 + "if", 143 + "int", 144 + "enable", 145 + "select", 146 + "modules", 147 + "tristate", 148 + "menu", 156 149 "source", 157 150 "comment", 158 - "mainmenu", 159 - "enable" 151 + "hex", 152 + "menuconfig", 153 + "prompt", 154 + "depends", 155 + "mainmenu" 160 156 }; 161 157 #define kconf_id_strings ((const char *) &kconf_id_strings_contents) 162 158 #ifdef __GNUC__ ··· 163 167 { 164 168 enum 165 169 { 166 - TOTAL_KEYWORDS = 33, 170 + TOTAL_KEYWORDS = 31, 167 171 MIN_WORD_LENGTH = 2, 168 172 MAX_WORD_LENGTH = 14, 169 173 MIN_HASH_VALUE = 2, 170 - MAX_HASH_VALUE = 46 174 + MAX_HASH_VALUE = 48 171 175 }; 172 176 173 177 static struct kconf_id wordlist[] = 174 178 { 175 179 {-1}, {-1}, 176 180 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM}, 177 - {-1}, {-1}, {-1}, 178 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_TYPE, TF_COMMAND, S_STRING}, 179 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, 180 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, 181 - {-1}, 181 + {-1}, {-1}, 182 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, 183 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_OPTION, TF_COMMAND}, 184 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND}, 185 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_OPTIONAL, TF_COMMAND}, 186 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND}, 182 187 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND}, 183 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, 184 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE}, 185 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_TYPE, TF_COMMAND, S_HEX}, 186 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION}, 188 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_CHOICE, TF_COMMAND}, 189 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, 190 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, 191 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND}, 192 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str15, T_TYPE, TF_COMMAND, S_BOOLEAN}, 193 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND}, 194 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE}, 195 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_BOOLEAN}, 196 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION}, 187 197 {-1}, 188 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_OPTION, TF_COMMAND}, 189 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_IF, TF_COMMAND|TF_PARAM}, 190 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND}, 198 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_TYPE, TF_COMMAND, S_STRING}, 199 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM}, 200 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT}, 201 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str24, T_SELECT, TF_COMMAND}, 191 202 {-1}, 192 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_ENDIF, TF_COMMAND}, 193 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CHOICE, TF_COMMAND}, 194 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND}, 195 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_REQUIRES, TF_COMMAND}, 196 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str24, T_ENDCHOICE, TF_COMMAND}, 197 - {-1}, 198 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_CONFIG, TF_COMMAND}, 203 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SELECT, TF_COMMAND}, 199 204 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, 200 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_INT}, 205 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE}, 201 206 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, 202 207 {-1}, 203 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_PROMPT, TF_COMMAND}, 204 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_DEPENDS, TF_COMMAND}, 205 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_TRISTATE}, 206 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34, T_TYPE, TF_COMMAND, S_BOOLEAN}, 208 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SOURCE, TF_COMMAND}, 209 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, 210 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_HEX}, 211 + {-1}, 207 212 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND}, 208 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_SELECT, TF_COMMAND}, 209 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN}, 213 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_PROMPT, TF_COMMAND}, 214 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_DEPENDS, TF_COMMAND}, 215 + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, 210 216 {-1}, 211 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_HELP, TF_COMMAND}, 212 - {-1}, 213 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND}, 214 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_COMMENT, TF_COMMAND}, 215 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_MAINMENU, TF_COMMAND}, 216 - {-1}, {-1}, 217 - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND} 217 + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND} 218 218 }; 219 219 220 220 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+786 -654
scripts/kconfig/zconf.tab.c_shipped
··· 1 - /* A Bison parser, made by GNU Bison 2.1. */ 1 + /* A Bison parser, made by GNU Bison 2.3. */ 2 2 3 - /* Skeleton parser for Yacc-like parsing with Bison, 4 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 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. 5 7 6 8 This program is free software; you can redistribute it and/or modify 7 9 it under the terms of the GNU General Public License as published by ··· 20 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 19 Boston, MA 02110-1301, USA. */ 22 20 23 - /* As a special exception, when this file is copied by Bison into a 24 - Bison output file, you may use that output file without restriction. 25 - This special exception was added by the Free Software Foundation 26 - in version 1.24 of Bison. */ 21 + /* As a special exception, you may create a larger work that contains 22 + part or all of the Bison parser skeleton and distribute that work 23 + under terms of your choice, so long as that work isn't itself a 24 + parser generator using the skeleton or a modified version thereof 25 + as a parser skeleton. Alternatively, if you modify or redistribute 26 + the parser skeleton itself, you may (at your option) remove this 27 + special exception, which will cause the skeleton and the resulting 28 + Bison output files to be licensed under the GNU General Public 29 + License without this special exception. 27 30 28 - /* Written by Richard Stallman by simplifying the original so called 29 - ``semantic'' parser. */ 31 + This special exception was added by the Free Software Foundation in 32 + version 2.2 of Bison. */ 33 + 34 + /* C LALR(1) parser skeleton written by Richard Stallman, by 35 + simplifying the original so-called "semantic" parser. */ 30 36 31 37 /* All symbols defined below should begin with yy or YY, to avoid 32 38 infringing on user name space. This should be done even for local ··· 47 37 #define YYBISON 1 48 38 49 39 /* Bison version. */ 50 - #define YYBISON_VERSION "2.1" 40 + #define YYBISON_VERSION "2.3" 51 41 52 42 /* Skeleton name. */ 53 43 #define YYSKELETON_NAME "yacc.c" ··· 88 78 T_IF = 269, 89 79 T_ENDIF = 270, 90 80 T_DEPENDS = 271, 91 - T_REQUIRES = 272, 92 - T_OPTIONAL = 273, 93 - T_PROMPT = 274, 94 - T_TYPE = 275, 95 - T_DEFAULT = 276, 96 - T_SELECT = 277, 97 - T_RANGE = 278, 98 - T_OPTION = 279, 99 - T_ON = 280, 100 - T_WORD = 281, 101 - T_WORD_QUOTE = 282, 102 - T_UNEQUAL = 283, 103 - T_CLOSE_PAREN = 284, 104 - T_OPEN_PAREN = 285, 105 - T_EOL = 286, 106 - T_OR = 287, 107 - T_AND = 288, 108 - T_EQUAL = 289, 109 - T_NOT = 290 81 + T_OPTIONAL = 272, 82 + T_PROMPT = 273, 83 + T_TYPE = 274, 84 + T_DEFAULT = 275, 85 + T_SELECT = 276, 86 + T_RANGE = 277, 87 + T_OPTION = 278, 88 + T_ON = 279, 89 + T_WORD = 280, 90 + T_WORD_QUOTE = 281, 91 + T_UNEQUAL = 282, 92 + T_CLOSE_PAREN = 283, 93 + T_OPEN_PAREN = 284, 94 + T_EOL = 285, 95 + T_OR = 286, 96 + T_AND = 287, 97 + T_EQUAL = 288, 98 + T_NOT = 289 110 99 }; 111 100 #endif 112 101 /* Tokens. */ ··· 123 114 #define T_IF 269 124 115 #define T_ENDIF 270 125 116 #define T_DEPENDS 271 126 - #define T_REQUIRES 272 127 - #define T_OPTIONAL 273 128 - #define T_PROMPT 274 129 - #define T_TYPE 275 130 - #define T_DEFAULT 276 131 - #define T_SELECT 277 132 - #define T_RANGE 278 133 - #define T_OPTION 279 134 - #define T_ON 280 135 - #define T_WORD 281 136 - #define T_WORD_QUOTE 282 137 - #define T_UNEQUAL 283 138 - #define T_CLOSE_PAREN 284 139 - #define T_OPEN_PAREN 285 140 - #define T_EOL 286 141 - #define T_OR 287 142 - #define T_AND 288 143 - #define T_EQUAL 289 144 - #define T_NOT 290 117 + #define T_OPTIONAL 272 118 + #define T_PROMPT 273 119 + #define T_TYPE 274 120 + #define T_DEFAULT 275 121 + #define T_SELECT 276 122 + #define T_RANGE 277 123 + #define T_OPTION 278 124 + #define T_ON 279 125 + #define T_WORD 280 126 + #define T_WORD_QUOTE 281 127 + #define T_UNEQUAL 282 128 + #define T_CLOSE_PAREN 283 129 + #define T_OPEN_PAREN 284 130 + #define T_EOL 285 131 + #define T_OR 286 132 + #define T_AND 287 133 + #define T_EQUAL 288 134 + #define T_NOT 289 145 135 146 136 147 137 ··· 206 198 # define YYTOKEN_TABLE 0 207 199 #endif 208 200 209 - #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 201 + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 202 + typedef union YYSTYPE 210 203 211 - typedef union YYSTYPE { 204 + { 212 205 char *string; 213 206 struct file *file; 214 207 struct symbol *symbol; 215 208 struct expr *expr; 216 209 struct menu *menu; 217 210 struct kconf_id *id; 218 - } YYSTYPE; 219 - /* Line 196 of yacc.c. */ 211 + } 212 + /* Line 187 of yacc.c. */ 220 213 214 + YYSTYPE; 221 215 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 222 216 # define YYSTYPE_IS_DECLARED 1 223 217 # define YYSTYPE_IS_TRIVIAL 1 ··· 230 220 /* Copy the second part of user declarations. */ 231 221 232 222 233 - /* Line 219 of yacc.c. */ 223 + /* Line 216 of yacc.c. */ 234 224 235 225 236 - #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) 237 - # define YYSIZE_T __SIZE_TYPE__ 226 + #ifdef short 227 + # undef short 238 228 #endif 239 - #if ! defined (YYSIZE_T) && defined (size_t) 240 - # define YYSIZE_T size_t 229 + 230 + #ifdef YYTYPE_UINT8 231 + typedef YYTYPE_UINT8 yytype_uint8; 232 + #else 233 + typedef unsigned char yytype_uint8; 241 234 #endif 242 - #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) 243 - # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 244 - # define YYSIZE_T size_t 235 + 236 + #ifdef YYTYPE_INT8 237 + typedef YYTYPE_INT8 yytype_int8; 238 + #elif (defined __STDC__ || defined __C99__FUNC__ \ 239 + || defined __cplusplus || defined _MSC_VER) 240 + typedef signed char yytype_int8; 241 + #else 242 + typedef short int yytype_int8; 245 243 #endif 246 - #if ! defined (YYSIZE_T) 247 - # define YYSIZE_T unsigned int 244 + 245 + #ifdef YYTYPE_UINT16 246 + typedef YYTYPE_UINT16 yytype_uint16; 247 + #else 248 + typedef unsigned short int yytype_uint16; 248 249 #endif 250 + 251 + #ifdef YYTYPE_INT16 252 + typedef YYTYPE_INT16 yytype_int16; 253 + #else 254 + typedef short int yytype_int16; 255 + #endif 256 + 257 + #ifndef YYSIZE_T 258 + # ifdef __SIZE_TYPE__ 259 + # define YYSIZE_T __SIZE_TYPE__ 260 + # elif defined size_t 261 + # define YYSIZE_T size_t 262 + # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 263 + || defined __cplusplus || defined _MSC_VER) 264 + # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 265 + # define YYSIZE_T size_t 266 + # else 267 + # define YYSIZE_T unsigned int 268 + # endif 269 + #endif 270 + 271 + #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 249 272 250 273 #ifndef YY_ 251 274 # if YYENABLE_NLS ··· 292 249 # endif 293 250 #endif 294 251 295 - #if ! defined (yyoverflow) || YYERROR_VERBOSE 252 + /* Suppress unused-variable warnings by "using" E. */ 253 + #if ! defined lint || defined __GNUC__ 254 + # define YYUSE(e) ((void) (e)) 255 + #else 256 + # define YYUSE(e) /* empty */ 257 + #endif 258 + 259 + /* Identity function, used to suppress warnings about constant conditions. */ 260 + #ifndef lint 261 + # define YYID(n) (n) 262 + #else 263 + #if (defined __STDC__ || defined __C99__FUNC__ \ 264 + || defined __cplusplus || defined _MSC_VER) 265 + static int 266 + YYID (int i) 267 + #else 268 + static int 269 + YYID (i) 270 + int i; 271 + #endif 272 + { 273 + return i; 274 + } 275 + #endif 276 + 277 + #if ! defined yyoverflow || YYERROR_VERBOSE 296 278 297 279 /* The parser invokes alloca or malloc; define the necessary symbols. */ 298 280 ··· 325 257 # if YYSTACK_USE_ALLOCA 326 258 # ifdef __GNUC__ 327 259 # define YYSTACK_ALLOC __builtin_alloca 260 + # elif defined __BUILTIN_VA_ARG_INCR 261 + # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 262 + # elif defined _AIX 263 + # define YYSTACK_ALLOC __alloca 264 + # elif defined _MSC_VER 265 + # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 266 + # define alloca _alloca 328 267 # else 329 268 # define YYSTACK_ALLOC alloca 330 - # if defined (__STDC__) || defined (__cplusplus) 269 + # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 270 + || defined __cplusplus || defined _MSC_VER) 331 271 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 332 - # define YYINCLUDED_STDLIB_H 272 + # ifndef _STDLIB_H 273 + # define _STDLIB_H 1 274 + # endif 333 275 # endif 334 276 # endif 335 277 # endif 336 278 # endif 337 279 338 280 # ifdef YYSTACK_ALLOC 339 - /* Pacify GCC's `empty if-body' warning. */ 340 - # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 281 + /* Pacify GCC's `empty if-body' warning. */ 282 + # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 341 283 # ifndef YYSTACK_ALLOC_MAXIMUM 342 284 /* The OS might guarantee only one guard page at the bottom of the stack, 343 285 and a page size can be as small as 4096 bytes. So we cannot safely 344 286 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 345 287 to allow for a few compiler-allocated temporary stack slots. */ 346 - # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ 288 + # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 347 289 # endif 348 290 # else 349 291 # define YYSTACK_ALLOC YYMALLOC 350 292 # define YYSTACK_FREE YYFREE 351 293 # ifndef YYSTACK_ALLOC_MAXIMUM 352 - # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) 294 + # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 353 295 # endif 354 - # ifdef __cplusplus 355 - extern "C" { 296 + # if (defined __cplusplus && ! defined _STDLIB_H \ 297 + && ! ((defined YYMALLOC || defined malloc) \ 298 + && (defined YYFREE || defined free))) 299 + # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 300 + # ifndef _STDLIB_H 301 + # define _STDLIB_H 1 302 + # endif 356 303 # endif 357 304 # ifndef YYMALLOC 358 305 # define YYMALLOC malloc 359 - # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ 360 - && (defined (__STDC__) || defined (__cplusplus))) 306 + # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 307 + || defined __cplusplus || defined _MSC_VER) 361 308 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 362 309 # endif 363 310 # endif 364 311 # ifndef YYFREE 365 312 # define YYFREE free 366 - # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ 367 - && (defined (__STDC__) || defined (__cplusplus))) 313 + # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 314 + || defined __cplusplus || defined _MSC_VER) 368 315 void free (void *); /* INFRINGES ON USER NAME SPACE */ 369 316 # endif 370 317 # endif 371 - # ifdef __cplusplus 372 - } 373 - # endif 374 318 # endif 375 - #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ 319 + #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 376 320 377 321 378 - #if (! defined (yyoverflow) \ 379 - && (! defined (__cplusplus) \ 380 - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) 322 + #if (! defined yyoverflow \ 323 + && (! defined __cplusplus \ 324 + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 381 325 382 326 /* A type that is properly aligned for any stack member. */ 383 327 union yyalloc 384 328 { 385 - short int yyss; 329 + yytype_int16 yyss; 386 330 YYSTYPE yyvs; 387 331 }; 388 332 ··· 404 324 /* The size of an array large to enough to hold all stacks, each with 405 325 N elements. */ 406 326 # define YYSTACK_BYTES(N) \ 407 - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ 327 + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 408 328 + YYSTACK_GAP_MAXIMUM) 409 329 410 330 /* Copy COUNT objects from FROM to TO. The source and destination do 411 331 not overlap. */ 412 332 # ifndef YYCOPY 413 - # if defined (__GNUC__) && 1 < __GNUC__ 333 + # if defined __GNUC__ && 1 < __GNUC__ 414 334 # define YYCOPY(To, From, Count) \ 415 335 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 416 336 # else ··· 421 341 for (yyi = 0; yyi < (Count); yyi++) \ 422 342 (To)[yyi] = (From)[yyi]; \ 423 343 } \ 424 - while (0) 344 + while (YYID (0)) 425 345 # endif 426 346 # endif 427 347 ··· 439 359 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 440 360 yyptr += yynewbytes / sizeof (*yyptr); \ 441 361 } \ 442 - while (0) 362 + while (YYID (0)) 443 363 444 364 #endif 445 365 446 - #if defined (__STDC__) || defined (__cplusplus) 447 - typedef signed char yysigned_char; 448 - #else 449 - typedef short int yysigned_char; 450 - #endif 451 - 452 - /* YYFINAL -- State number of the termination state. */ 366 + /* YYFINAL -- State number of the termination state. */ 453 367 #define YYFINAL 3 454 368 /* YYLAST -- Last index in YYTABLE. */ 455 - #define YYLAST 275 369 + #define YYLAST 258 456 370 457 - /* YYNTOKENS -- Number of terminals. */ 458 - #define YYNTOKENS 36 459 - /* YYNNTS -- Number of nonterminals. */ 371 + /* YYNTOKENS -- Number of terminals. */ 372 + #define YYNTOKENS 35 373 + /* YYNNTS -- Number of nonterminals. */ 460 374 #define YYNNTS 45 461 - /* YYNRULES -- Number of rules. */ 462 - #define YYNRULES 110 463 - /* YYNRULES -- Number of states. */ 464 - #define YYNSTATES 183 375 + /* YYNRULES -- Number of rules. */ 376 + #define YYNRULES 108 377 + /* YYNRULES -- Number of states. */ 378 + #define YYNSTATES 178 465 379 466 380 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 467 381 #define YYUNDEFTOK 2 468 - #define YYMAXUTOK 290 382 + #define YYMAXUTOK 289 469 383 470 384 #define YYTRANSLATE(YYX) \ 471 385 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 472 386 473 387 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 474 - static const unsigned char yytranslate[] = 388 + static const yytype_uint8 yytranslate[] = 475 389 { 476 390 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 477 391 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ··· 495 421 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 496 422 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 497 423 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 498 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 499 - 35 424 + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 500 425 }; 501 426 502 427 #if YYDEBUG 503 428 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 504 429 YYRHS. */ 505 - static const unsigned short int yyprhs[] = 430 + static const yytype_uint16 yyprhs[] = 506 431 { 507 432 0, 0, 3, 5, 6, 9, 12, 15, 20, 23, 508 433 28, 33, 37, 39, 41, 43, 45, 47, 49, 51, ··· 512 439 178, 181, 186, 187, 190, 194, 196, 200, 201, 204, 513 440 207, 210, 214, 217, 219, 223, 224, 227, 230, 233, 514 441 237, 241, 244, 247, 250, 251, 254, 257, 260, 265, 515 - 269, 273, 274, 277, 279, 281, 284, 287, 290, 292, 516 - 295, 296, 299, 301, 305, 309, 313, 316, 320, 324, 517 - 326 442 + 266, 269, 271, 273, 276, 279, 282, 284, 287, 288, 443 + 291, 293, 297, 301, 305, 308, 312, 316, 318 518 444 }; 519 445 520 - /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 521 - static const yysigned_char yyrhs[] = 446 + /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 447 + static const yytype_int8 yyrhs[] = 522 448 { 523 - 37, 0, -1, 38, -1, -1, 38, 40, -1, 38, 524 - 54, -1, 38, 65, -1, 38, 3, 75, 77, -1, 525 - 38, 76, -1, 38, 26, 1, 31, -1, 38, 39, 526 - 1, 31, -1, 38, 1, 31, -1, 16, -1, 19, 527 - -1, 20, -1, 22, -1, 18, -1, 23, -1, 21, 528 - -1, 31, -1, 60, -1, 69, -1, 43, -1, 45, 529 - -1, 67, -1, 26, 1, 31, -1, 1, 31, -1, 530 - 10, 26, 31, -1, 42, 46, -1, 11, 26, 31, 531 - -1, 44, 46, -1, -1, 46, 47, -1, 46, 48, 532 - -1, 46, 73, -1, 46, 71, -1, 46, 41, -1, 533 - 46, 31, -1, 20, 74, 31, -1, 19, 75, 78, 534 - 31, -1, 21, 79, 78, 31, -1, 22, 26, 78, 535 - 31, -1, 23, 80, 80, 78, 31, -1, 24, 49, 536 - 31, -1, -1, 49, 26, 50, -1, -1, 34, 75, 537 - -1, 7, 31, -1, 51, 55, -1, 76, -1, 52, 538 - 57, 53, -1, -1, 55, 56, -1, 55, 73, -1, 539 - 55, 71, -1, 55, 31, -1, 55, 41, -1, 19, 540 - 75, 78, 31, -1, 20, 74, 31, -1, 18, 31, 541 - -1, 21, 26, 78, 31, -1, -1, 57, 40, -1, 542 - 14, 79, 77, -1, 76, -1, 58, 61, 59, -1, 543 - -1, 61, 40, -1, 61, 65, -1, 61, 54, -1, 544 - 4, 75, 31, -1, 62, 72, -1, 76, -1, 63, 545 - 66, 64, -1, -1, 66, 40, -1, 66, 65, -1, 546 - 66, 54, -1, 6, 75, 31, -1, 9, 75, 31, 547 - -1, 68, 72, -1, 12, 31, -1, 70, 13, -1, 548 - -1, 72, 73, -1, 72, 31, -1, 72, 41, -1, 549 - 16, 25, 79, 31, -1, 16, 79, 31, -1, 17, 550 - 79, 31, -1, -1, 75, 78, -1, 26, -1, 27, 551 - -1, 5, 31, -1, 8, 31, -1, 15, 31, -1, 552 - 31, -1, 77, 31, -1, -1, 14, 79, -1, 80, 553 - -1, 80, 34, 80, -1, 80, 28, 80, -1, 30, 554 - 79, 29, -1, 35, 79, -1, 79, 32, 79, -1, 555 - 79, 33, 79, -1, 26, -1, 27, -1 449 + 36, 0, -1, 37, -1, -1, 37, 39, -1, 37, 450 + 53, -1, 37, 64, -1, 37, 3, 74, 76, -1, 451 + 37, 75, -1, 37, 25, 1, 30, -1, 37, 38, 452 + 1, 30, -1, 37, 1, 30, -1, 16, -1, 18, 453 + -1, 19, -1, 21, -1, 17, -1, 22, -1, 20, 454 + -1, 30, -1, 59, -1, 68, -1, 42, -1, 44, 455 + -1, 66, -1, 25, 1, 30, -1, 1, 30, -1, 456 + 10, 25, 30, -1, 41, 45, -1, 11, 25, 30, 457 + -1, 43, 45, -1, -1, 45, 46, -1, 45, 47, 458 + -1, 45, 72, -1, 45, 70, -1, 45, 40, -1, 459 + 45, 30, -1, 19, 73, 30, -1, 18, 74, 77, 460 + 30, -1, 20, 78, 77, 30, -1, 21, 25, 77, 461 + 30, -1, 22, 79, 79, 77, 30, -1, 23, 48, 462 + 30, -1, -1, 48, 25, 49, -1, -1, 33, 74, 463 + -1, 7, 30, -1, 50, 54, -1, 75, -1, 51, 464 + 56, 52, -1, -1, 54, 55, -1, 54, 72, -1, 465 + 54, 70, -1, 54, 30, -1, 54, 40, -1, 18, 466 + 74, 77, 30, -1, 19, 73, 30, -1, 17, 30, 467 + -1, 20, 25, 77, 30, -1, -1, 56, 39, -1, 468 + 14, 78, 76, -1, 75, -1, 57, 60, 58, -1, 469 + -1, 60, 39, -1, 60, 64, -1, 60, 53, -1, 470 + 4, 74, 30, -1, 61, 71, -1, 75, -1, 62, 471 + 65, 63, -1, -1, 65, 39, -1, 65, 64, -1, 472 + 65, 53, -1, 6, 74, 30, -1, 9, 74, 30, 473 + -1, 67, 71, -1, 12, 30, -1, 69, 13, -1, 474 + -1, 71, 72, -1, 71, 30, -1, 71, 40, -1, 475 + 16, 24, 78, 30, -1, -1, 74, 77, -1, 25, 476 + -1, 26, -1, 5, 30, -1, 8, 30, -1, 15, 477 + 30, -1, 30, -1, 76, 30, -1, -1, 14, 78, 478 + -1, 79, -1, 79, 33, 79, -1, 79, 27, 79, 479 + -1, 29, 78, 28, -1, 34, 78, -1, 78, 31, 480 + 78, -1, 78, 32, 78, -1, 25, -1, 26, -1 556 481 }; 557 482 558 483 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 559 - static const unsigned short int yyrline[] = 484 + static const yytype_uint16 yyrline[] = 560 485 { 561 - 0, 105, 105, 107, 109, 110, 111, 112, 113, 114, 562 - 115, 119, 123, 123, 123, 123, 123, 123, 123, 127, 563 - 128, 129, 130, 131, 132, 136, 137, 143, 151, 157, 564 - 165, 175, 177, 178, 179, 180, 181, 182, 185, 193, 565 - 199, 209, 215, 221, 224, 226, 237, 238, 243, 252, 566 - 257, 265, 268, 270, 271, 272, 273, 274, 277, 283, 567 - 294, 300, 310, 312, 317, 325, 333, 336, 338, 339, 568 - 340, 345, 352, 357, 365, 368, 370, 371, 372, 375, 569 - 383, 390, 397, 403, 410, 412, 413, 414, 417, 422, 570 - 427, 435, 437, 442, 443, 446, 447, 448, 452, 453, 571 - 456, 457, 460, 461, 462, 463, 464, 465, 466, 469, 572 - 470 486 + 0, 104, 104, 106, 108, 109, 110, 111, 112, 113, 487 + 114, 118, 122, 122, 122, 122, 122, 122, 122, 126, 488 + 127, 128, 129, 130, 131, 135, 136, 142, 150, 156, 489 + 164, 174, 176, 177, 178, 179, 180, 181, 184, 192, 490 + 198, 208, 214, 220, 223, 225, 236, 237, 242, 251, 491 + 256, 264, 267, 269, 270, 271, 272, 273, 276, 282, 492 + 293, 299, 309, 311, 316, 324, 332, 335, 337, 338, 493 + 339, 344, 351, 356, 364, 367, 369, 370, 371, 374, 494 + 382, 389, 396, 402, 409, 411, 412, 413, 416, 424, 495 + 426, 431, 432, 435, 436, 437, 441, 442, 445, 446, 496 + 449, 450, 451, 452, 453, 454, 455, 458, 459 573 497 }; 574 498 #endif 575 499 576 500 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 577 501 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 578 - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 502 + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 579 503 static const char *const yytname[] = 580 504 { 581 505 "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", 582 506 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 583 507 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", 584 - "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", 585 - "T_SELECT", "T_RANGE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", 586 - "T_UNEQUAL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", 587 - "T_EQUAL", "T_NOT", "$accept", "input", "stmt_list", "option_name", 588 - "common_stmt", "option_error", "config_entry_start", "config_stmt", 508 + "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE", 509 + "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", 510 + "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", 511 + "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt", 512 + "option_error", "config_entry_start", "config_stmt", 589 513 "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", 590 514 "config_option", "symbol_option", "symbol_option_list", 591 515 "symbol_option_arg", "choice", "choice_entry", "choice_end", ··· 597 527 # ifdef YYPRINT 598 528 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 599 529 token YYLEX-NUM. */ 600 - static const unsigned short int yytoknum[] = 530 + static const yytype_uint16 yytoknum[] = 601 531 { 602 532 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 603 533 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 604 534 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 605 - 285, 286, 287, 288, 289, 290 535 + 285, 286, 287, 288, 289 606 536 }; 607 537 # endif 608 538 609 539 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 610 - static const unsigned char yyr1[] = 540 + static const yytype_uint8 yyr1[] = 611 541 { 612 - 0, 36, 37, 38, 38, 38, 38, 38, 38, 38, 613 - 38, 38, 39, 39, 39, 39, 39, 39, 39, 40, 614 - 40, 40, 40, 40, 40, 41, 41, 42, 43, 44, 615 - 45, 46, 46, 46, 46, 46, 46, 46, 47, 47, 616 - 47, 47, 47, 48, 49, 49, 50, 50, 51, 52, 617 - 53, 54, 55, 55, 55, 55, 55, 55, 56, 56, 618 - 56, 56, 57, 57, 58, 59, 60, 61, 61, 61, 619 - 61, 62, 63, 64, 65, 66, 66, 66, 66, 67, 620 - 68, 69, 70, 71, 72, 72, 72, 72, 73, 73, 621 - 73, 74, 74, 75, 75, 76, 76, 76, 77, 77, 622 - 78, 78, 79, 79, 79, 79, 79, 79, 79, 80, 623 - 80 542 + 0, 35, 36, 37, 37, 37, 37, 37, 37, 37, 543 + 37, 37, 38, 38, 38, 38, 38, 38, 38, 39, 544 + 39, 39, 39, 39, 39, 40, 40, 41, 42, 43, 545 + 44, 45, 45, 45, 45, 45, 45, 45, 46, 46, 546 + 46, 46, 46, 47, 48, 48, 49, 49, 50, 51, 547 + 52, 53, 54, 54, 54, 54, 54, 54, 55, 55, 548 + 55, 55, 56, 56, 57, 58, 59, 60, 60, 60, 549 + 60, 61, 62, 63, 64, 65, 65, 65, 65, 66, 550 + 67, 68, 69, 70, 71, 71, 71, 71, 72, 73, 551 + 73, 74, 74, 75, 75, 75, 76, 76, 77, 77, 552 + 78, 78, 78, 78, 78, 78, 78, 79, 79 624 553 }; 625 554 626 555 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 627 - static const unsigned char yyr2[] = 556 + static const yytype_uint8 yyr2[] = 628 557 { 629 558 0, 2, 1, 0, 2, 2, 2, 4, 2, 4, 630 559 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, ··· 633 564 1, 3, 0, 2, 2, 2, 2, 2, 4, 3, 634 565 2, 4, 0, 2, 3, 1, 3, 0, 2, 2, 635 566 2, 3, 2, 1, 3, 0, 2, 2, 2, 3, 636 - 3, 2, 2, 2, 0, 2, 2, 2, 4, 3, 637 - 3, 0, 2, 1, 1, 2, 2, 2, 1, 2, 638 - 0, 2, 1, 3, 3, 3, 2, 3, 3, 1, 639 - 1 567 + 3, 2, 2, 2, 0, 2, 2, 2, 4, 0, 568 + 2, 1, 1, 2, 2, 2, 1, 2, 0, 2, 569 + 1, 3, 3, 3, 2, 3, 3, 1, 1 640 570 }; 641 571 642 572 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 643 573 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 644 574 means the default is an error. */ 645 - static const unsigned char yydefact[] = 575 + static const yytype_uint8 yydefact[] = 646 576 { 647 577 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 648 578 0, 0, 0, 0, 0, 0, 12, 16, 13, 14, 649 579 18, 15, 17, 0, 19, 0, 4, 31, 22, 31, 650 580 23, 52, 62, 5, 67, 20, 84, 75, 6, 24, 651 - 84, 21, 8, 11, 93, 94, 0, 0, 95, 0, 652 - 48, 96, 0, 0, 0, 109, 110, 0, 0, 0, 653 - 102, 97, 0, 0, 0, 0, 0, 0, 0, 0, 654 - 0, 0, 98, 7, 71, 79, 80, 27, 29, 0, 655 - 106, 0, 0, 64, 0, 0, 9, 10, 0, 0, 656 - 0, 0, 0, 91, 0, 0, 0, 44, 0, 37, 657 - 36, 32, 33, 0, 35, 34, 0, 0, 91, 0, 658 - 56, 57, 53, 55, 54, 63, 51, 50, 68, 70, 659 - 66, 69, 65, 86, 87, 85, 76, 78, 74, 77, 660 - 73, 99, 105, 107, 108, 104, 103, 26, 82, 0, 661 - 0, 0, 100, 0, 100, 100, 100, 0, 0, 0, 662 - 83, 60, 100, 0, 100, 0, 89, 90, 0, 0, 663 - 38, 92, 0, 0, 100, 46, 43, 25, 0, 59, 664 - 0, 88, 101, 39, 40, 41, 0, 0, 45, 58, 665 - 61, 42, 47 581 + 84, 21, 8, 11, 91, 92, 0, 0, 93, 0, 582 + 48, 94, 0, 0, 0, 107, 108, 0, 0, 0, 583 + 100, 95, 0, 0, 0, 0, 0, 0, 0, 0, 584 + 0, 0, 96, 7, 71, 79, 80, 27, 29, 0, 585 + 104, 0, 0, 64, 0, 0, 9, 10, 0, 0, 586 + 0, 0, 89, 0, 0, 0, 44, 0, 37, 36, 587 + 32, 33, 0, 35, 34, 0, 0, 89, 0, 56, 588 + 57, 53, 55, 54, 63, 51, 50, 68, 70, 66, 589 + 69, 65, 86, 87, 85, 76, 78, 74, 77, 73, 590 + 97, 103, 105, 106, 102, 101, 26, 82, 0, 98, 591 + 0, 98, 98, 98, 0, 0, 0, 83, 60, 98, 592 + 0, 98, 0, 0, 0, 38, 90, 0, 0, 98, 593 + 46, 43, 25, 0, 59, 0, 88, 99, 39, 40, 594 + 41, 0, 0, 45, 58, 61, 42, 47 666 595 }; 667 596 668 - /* YYDEFGOTO[NTERM-NUM]. */ 669 - static const short int yydefgoto[] = 597 + /* YYDEFGOTO[NTERM-NUM]. */ 598 + static const yytype_int16 yydefgoto[] = 670 599 { 671 - -1, 1, 2, 25, 26, 100, 27, 28, 29, 30, 672 - 64, 101, 102, 148, 178, 31, 32, 116, 33, 66, 673 - 112, 67, 34, 120, 35, 68, 36, 37, 128, 38, 674 - 70, 39, 40, 41, 103, 104, 69, 105, 143, 144, 675 - 42, 73, 159, 59, 60 600 + -1, 1, 2, 25, 26, 99, 27, 28, 29, 30, 601 + 64, 100, 101, 145, 173, 31, 32, 115, 33, 66, 602 + 111, 67, 34, 119, 35, 68, 36, 37, 127, 38, 603 + 70, 39, 40, 41, 102, 103, 69, 104, 140, 141, 604 + 42, 73, 154, 59, 60 676 605 }; 677 606 678 607 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 679 608 STATE-NUM. */ 680 - #define YYPACT_NINF -135 681 - static const short int yypact[] = 609 + #define YYPACT_NINF -78 610 + static const yytype_int16 yypact[] = 682 611 { 683 - -135, 2, 170, -135, -14, 56, 56, -8, 56, 24, 684 - 67, 56, 7, 14, 62, 97, -135, -135, -135, -135, 685 - -135, -135, -135, 156, -135, 166, -135, -135, -135, -135, 686 - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 687 - -135, -135, -135, -135, -135, -135, 138, 151, -135, 152, 688 - -135, -135, 163, 167, 176, -135, -135, 62, 62, 185, 689 - -19, -135, 188, 190, 42, 103, 194, 85, 70, 222, 690 - 70, 132, -135, 191, -135, -135, -135, -135, -135, 127, 691 - -135, 62, 62, 191, 104, 104, -135, -135, 193, 203, 692 - 9, 62, 56, 56, 62, 161, 104, -135, 196, -135, 693 - -135, -135, -135, 233, -135, -135, 204, 56, 56, 221, 694 - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 695 - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 696 - -135, -135, -135, 219, -135, -135, -135, -135, -135, 62, 697 - 209, 212, 240, 224, 240, -1, 240, 104, 41, 225, 698 - -135, -135, 240, 226, 240, 218, -135, -135, 62, 227, 699 - -135, -135, 228, 229, 240, 230, -135, -135, 231, -135, 700 - 232, -135, 112, -135, -135, -135, 234, 56, -135, -135, 701 - -135, -135, -135 612 + -78, 33, 130, -78, -28, 73, 73, 7, 73, 36, 613 + 41, 73, 26, 52, -4, 58, -78, -78, -78, -78, 614 + -78, -78, -78, 90, -78, 94, -78, -78, -78, -78, 615 + -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 616 + -78, -78, -78, -78, -78, -78, 74, 85, -78, 96, 617 + -78, -78, 131, 134, 147, -78, -78, -4, -4, 193, 618 + -10, -78, 162, 164, 38, 102, 64, 148, 5, 192, 619 + 5, 165, -78, 174, -78, -78, -78, -78, -78, 65, 620 + -78, -4, -4, 174, 103, 103, -78, -78, 175, 185, 621 + 197, 73, 73, -4, 194, 103, -78, 231, -78, -78, 622 + -78, -78, 220, -78, -78, 204, 73, 73, 210, -78, 623 + -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 624 + -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, 625 + -78, -78, 205, -78, -78, -78, -78, -78, -4, 222, 626 + 208, 222, 195, 222, 103, 2, 209, -78, -78, 222, 627 + 211, 222, 199, -4, 212, -78, -78, 213, 214, 222, 628 + 207, -78, -78, 215, -78, 216, -78, 111, -78, -78, 629 + -78, 217, 73, -78, -78, -78, -78, -78 702 630 }; 703 631 704 632 /* YYPGOTO[NTERM-NUM]. */ 705 - static const short int yypgoto[] = 633 + static const yytype_int16 yypgoto[] = 706 634 { 707 - -135, -135, -135, -135, 94, -45, -135, -135, -135, -135, 708 - 237, -135, -135, -135, -135, -135, -135, -135, -54, -135, 709 - -135, -135, -135, -135, -135, -135, -135, -135, -135, 1, 710 - -135, -135, -135, -135, -135, 195, 235, -44, 159, -5, 711 - 98, 210, -134, -53, -77 635 + -78, -78, -78, -78, 121, -35, -78, -78, -78, -78, 636 + 219, -78, -78, -78, -78, -78, -78, -78, -44, -78, 637 + -78, -78, -78, -78, -78, -78, -78, -78, -78, -6, 638 + -78, -78, -78, -78, -78, 183, 218, 21, 143, -5, 639 + 146, 196, 69, -53, -77 712 640 }; 713 641 714 642 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If ··· 713 647 number is the opposite. If zero, do what YYDEFACT says. 714 648 If YYTABLE_NINF, syntax error. */ 715 649 #define YYTABLE_NINF -82 716 - static const short int yytable[] = 650 + static const yytype_int16 yytable[] = 717 651 { 718 - 46, 47, 3, 49, 79, 80, 52, 135, 136, 84, 719 - 161, 162, 163, 158, 119, 85, 127, 43, 168, 147, 720 - 170, 111, 114, 48, 124, 125, 124, 125, 133, 134, 721 - 176, 81, 82, 53, 139, 55, 56, 140, 141, 57, 722 - 54, 145, -28, 88, 58, -28, -28, -28, -28, -28, 723 - -28, -28, -28, -28, 89, 50, -28, -28, 90, 91, 724 - -28, 92, 93, 94, 95, 96, 97, 165, 98, 121, 725 - 164, 129, 166, 99, 6, 7, 8, 9, 10, 11, 726 - 12, 13, 44, 45, 14, 15, 155, 142, 55, 56, 727 - 7, 8, 57, 10, 11, 12, 13, 58, 51, 14, 728 - 15, 24, 152, -30, 88, 172, -30, -30, -30, -30, 729 - -30, -30, -30, -30, -30, 89, 24, -30, -30, 90, 730 - 91, -30, 92, 93, 94, 95, 96, 97, 61, 98, 731 - 55, 56, -81, 88, 99, -81, -81, -81, -81, -81, 732 - -81, -81, -81, -81, 81, 82, -81, -81, 90, 91, 733 - -81, -81, -81, -81, -81, -81, 132, 62, 98, 81, 734 - 82, 115, 118, 123, 126, 117, 122, 63, 130, 72, 735 - -2, 4, 182, 5, 6, 7, 8, 9, 10, 11, 736 - 12, 13, 74, 75, 14, 15, 16, 146, 17, 18, 737 - 19, 20, 21, 22, 76, 88, 23, 149, 77, -49, 738 - -49, 24, -49, -49, -49, -49, 89, 78, -49, -49, 739 - 90, 91, 106, 107, 108, 109, 72, 81, 82, 86, 740 - 98, 87, 131, 88, 137, 110, -72, -72, -72, -72, 741 - -72, -72, -72, -72, 138, 151, -72, -72, 90, 91, 742 - 156, 81, 82, 157, 81, 82, 150, 154, 98, 171, 743 - 81, 82, 82, 123, 158, 160, 167, 169, 173, 174, 744 - 175, 113, 179, 180, 177, 181, 65, 153, 0, 83, 745 - 0, 0, 0, 0, 0, 71 652 + 46, 47, 43, 49, 79, 80, 52, 134, 135, 6, 653 + 7, 8, 9, 10, 11, 12, 13, 84, 144, 14, 654 + 15, 55, 56, 85, 118, 57, 126, 160, 132, 133, 655 + 58, 110, 161, 3, 123, 24, 123, 48, -28, 88, 656 + 142, -28, -28, -28, -28, -28, -28, -28, -28, -28, 657 + 89, 53, -28, -28, 90, -28, 91, 92, 93, 94, 658 + 95, 96, 120, 97, 128, 88, 50, 159, 98, -49, 659 + -49, 51, -49, -49, -49, -49, 89, 54, -49, -49, 660 + 90, 105, 106, 107, 108, 152, 139, 113, 61, 97, 661 + 124, 62, 124, 131, 109, 63, 81, 82, 44, 45, 662 + 167, 149, -30, 88, 72, -30, -30, -30, -30, -30, 663 + -30, -30, -30, -30, 89, 74, -30, -30, 90, -30, 664 + 91, 92, 93, 94, 95, 96, 75, 97, 55, 56, 665 + -2, 4, 98, 5, 6, 7, 8, 9, 10, 11, 666 + 12, 13, 81, 82, 14, 15, 16, 17, 18, 19, 667 + 20, 21, 22, 7, 8, 23, 10, 11, 12, 13, 668 + 24, 76, 14, 15, 77, -81, 88, 177, -81, -81, 669 + -81, -81, -81, -81, -81, -81, -81, 78, 24, -81, 670 + -81, 90, -81, -81, -81, -81, -81, -81, 114, 117, 671 + 97, 125, 86, 88, 87, 122, -72, -72, -72, -72, 672 + -72, -72, -72, -72, 130, 136, -72, -72, 90, 153, 673 + 156, 157, 158, 116, 121, 137, 129, 97, 163, 143, 674 + 165, 138, 122, 72, 81, 82, 81, 82, 171, 166, 675 + 81, 82, 146, 147, 148, 151, 153, 82, 155, 162, 676 + 172, 164, 168, 169, 170, 174, 175, 176, 65, 112, 677 + 150, 0, 0, 0, 0, 83, 0, 0, 71 746 678 }; 747 679 748 - static const short int yycheck[] = 680 + static const yytype_int16 yycheck[] = 749 681 { 750 - 5, 6, 0, 8, 57, 58, 11, 84, 85, 28, 751 - 144, 145, 146, 14, 68, 34, 70, 31, 152, 96, 752 - 154, 66, 66, 31, 69, 69, 71, 71, 81, 82, 753 - 164, 32, 33, 26, 25, 26, 27, 90, 91, 30, 754 - 26, 94, 0, 1, 35, 3, 4, 5, 6, 7, 755 - 8, 9, 10, 11, 12, 31, 14, 15, 16, 17, 756 - 18, 19, 20, 21, 22, 23, 24, 26, 26, 68, 757 - 147, 70, 31, 31, 4, 5, 6, 7, 8, 9, 758 - 10, 11, 26, 27, 14, 15, 139, 92, 26, 27, 759 - 5, 6, 30, 8, 9, 10, 11, 35, 31, 14, 760 - 15, 31, 107, 0, 1, 158, 3, 4, 5, 6, 761 - 7, 8, 9, 10, 11, 12, 31, 14, 15, 16, 762 - 17, 18, 19, 20, 21, 22, 23, 24, 31, 26, 763 - 26, 27, 0, 1, 31, 3, 4, 5, 6, 7, 764 - 8, 9, 10, 11, 32, 33, 14, 15, 16, 17, 765 - 18, 19, 20, 21, 22, 23, 29, 1, 26, 32, 766 - 33, 67, 68, 31, 70, 67, 68, 1, 70, 31, 767 - 0, 1, 177, 3, 4, 5, 6, 7, 8, 9, 768 - 10, 11, 31, 31, 14, 15, 16, 26, 18, 19, 769 - 20, 21, 22, 23, 31, 1, 26, 1, 31, 5, 770 - 6, 31, 8, 9, 10, 11, 12, 31, 14, 15, 771 - 16, 17, 18, 19, 20, 21, 31, 32, 33, 31, 772 - 26, 31, 31, 1, 31, 31, 4, 5, 6, 7, 773 - 8, 9, 10, 11, 31, 31, 14, 15, 16, 17, 774 - 31, 32, 33, 31, 32, 33, 13, 26, 26, 31, 775 - 32, 33, 33, 31, 14, 31, 31, 31, 31, 31, 776 - 31, 66, 31, 31, 34, 31, 29, 108, -1, 59, 777 - -1, -1, -1, -1, -1, 40 682 + 5, 6, 30, 8, 57, 58, 11, 84, 85, 4, 683 + 5, 6, 7, 8, 9, 10, 11, 27, 95, 14, 684 + 15, 25, 26, 33, 68, 29, 70, 25, 81, 82, 685 + 34, 66, 30, 0, 69, 30, 71, 30, 0, 1, 686 + 93, 3, 4, 5, 6, 7, 8, 9, 10, 11, 687 + 12, 25, 14, 15, 16, 17, 18, 19, 20, 21, 688 + 22, 23, 68, 25, 70, 1, 30, 144, 30, 5, 689 + 6, 30, 8, 9, 10, 11, 12, 25, 14, 15, 690 + 16, 17, 18, 19, 20, 138, 91, 66, 30, 25, 691 + 69, 1, 71, 28, 30, 1, 31, 32, 25, 26, 692 + 153, 106, 0, 1, 30, 3, 4, 5, 6, 7, 693 + 8, 9, 10, 11, 12, 30, 14, 15, 16, 17, 694 + 18, 19, 20, 21, 22, 23, 30, 25, 25, 26, 695 + 0, 1, 30, 3, 4, 5, 6, 7, 8, 9, 696 + 10, 11, 31, 32, 14, 15, 16, 17, 18, 19, 697 + 20, 21, 22, 5, 6, 25, 8, 9, 10, 11, 698 + 30, 30, 14, 15, 30, 0, 1, 172, 3, 4, 699 + 5, 6, 7, 8, 9, 10, 11, 30, 30, 14, 700 + 15, 16, 17, 18, 19, 20, 21, 22, 67, 68, 701 + 25, 70, 30, 1, 30, 30, 4, 5, 6, 7, 702 + 8, 9, 10, 11, 30, 30, 14, 15, 16, 14, 703 + 141, 142, 143, 67, 68, 30, 70, 25, 149, 25, 704 + 151, 24, 30, 30, 31, 32, 31, 32, 159, 30, 705 + 31, 32, 1, 13, 30, 25, 14, 32, 30, 30, 706 + 33, 30, 30, 30, 30, 30, 30, 30, 29, 66, 707 + 107, -1, -1, -1, -1, 59, -1, -1, 40 778 708 }; 779 709 780 710 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 781 711 symbol of state STATE-NUM. */ 782 - static const unsigned char yystos[] = 712 + static const yytype_uint8 yystos[] = 783 713 { 784 - 0, 37, 38, 0, 1, 3, 4, 5, 6, 7, 785 - 8, 9, 10, 11, 14, 15, 16, 18, 19, 20, 786 - 21, 22, 23, 26, 31, 39, 40, 42, 43, 44, 787 - 45, 51, 52, 54, 58, 60, 62, 63, 65, 67, 788 - 68, 69, 76, 31, 26, 27, 75, 75, 31, 75, 789 - 31, 31, 75, 26, 26, 26, 27, 30, 35, 79, 790 - 80, 31, 1, 1, 46, 46, 55, 57, 61, 72, 791 - 66, 72, 31, 77, 31, 31, 31, 31, 31, 79, 792 - 79, 32, 33, 77, 28, 34, 31, 31, 1, 12, 793 - 16, 17, 19, 20, 21, 22, 23, 24, 26, 31, 794 - 41, 47, 48, 70, 71, 73, 18, 19, 20, 21, 795 - 31, 41, 56, 71, 73, 40, 53, 76, 40, 54, 796 - 59, 65, 76, 31, 41, 73, 40, 54, 64, 65, 797 - 76, 31, 29, 79, 79, 80, 80, 31, 31, 25, 798 - 79, 79, 75, 74, 75, 79, 26, 80, 49, 1, 799 - 13, 31, 75, 74, 26, 79, 31, 31, 14, 78, 800 - 31, 78, 78, 78, 80, 26, 31, 31, 78, 31, 801 - 78, 31, 79, 31, 31, 31, 78, 34, 50, 31, 802 - 31, 31, 75 714 + 0, 36, 37, 0, 1, 3, 4, 5, 6, 7, 715 + 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 716 + 20, 21, 22, 25, 30, 38, 39, 41, 42, 43, 717 + 44, 50, 51, 53, 57, 59, 61, 62, 64, 66, 718 + 67, 68, 75, 30, 25, 26, 74, 74, 30, 74, 719 + 30, 30, 74, 25, 25, 25, 26, 29, 34, 78, 720 + 79, 30, 1, 1, 45, 45, 54, 56, 60, 71, 721 + 65, 71, 30, 76, 30, 30, 30, 30, 30, 78, 722 + 78, 31, 32, 76, 27, 33, 30, 30, 1, 12, 723 + 16, 18, 19, 20, 21, 22, 23, 25, 30, 40, 724 + 46, 47, 69, 70, 72, 17, 18, 19, 20, 30, 725 + 40, 55, 70, 72, 39, 52, 75, 39, 53, 58, 726 + 64, 75, 30, 40, 72, 39, 53, 63, 64, 75, 727 + 30, 28, 78, 78, 79, 79, 30, 30, 24, 74, 728 + 73, 74, 78, 25, 79, 48, 1, 13, 30, 74, 729 + 73, 25, 78, 14, 77, 30, 77, 77, 77, 79, 730 + 25, 30, 30, 77, 30, 77, 30, 78, 30, 30, 731 + 30, 77, 33, 49, 30, 30, 30, 74 803 732 }; 804 733 805 734 #define yyerrok (yyerrstatus = 0) ··· 822 761 yychar = (Token); \ 823 762 yylval = (Value); \ 824 763 yytoken = YYTRANSLATE (yychar); \ 825 - YYPOPSTACK; \ 764 + YYPOPSTACK (1); \ 826 765 goto yybackup; \ 827 766 } \ 828 767 else \ ··· 830 769 yyerror (YY_("syntax error: cannot back up")); \ 831 770 YYERROR; \ 832 771 } \ 833 - while (0) 772 + while (YYID (0)) 834 773 835 774 836 775 #define YYTERROR 1 ··· 845 784 #ifndef YYLLOC_DEFAULT 846 785 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 847 786 do \ 848 - if (N) \ 787 + if (YYID (N)) \ 849 788 { \ 850 789 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 851 790 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ ··· 859 798 (Current).first_column = (Current).last_column = \ 860 799 YYRHSLOC (Rhs, 0).last_column; \ 861 800 } \ 862 - while (0) 801 + while (YYID (0)) 863 802 #endif 864 803 865 804 ··· 871 810 # if YYLTYPE_IS_TRIVIAL 872 811 # define YY_LOCATION_PRINT(File, Loc) \ 873 812 fprintf (File, "%d.%d-%d.%d", \ 874 - (Loc).first_line, (Loc).first_column, \ 875 - (Loc).last_line, (Loc).last_column) 813 + (Loc).first_line, (Loc).first_column, \ 814 + (Loc).last_line, (Loc).last_column) 876 815 # else 877 816 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 878 817 # endif ··· 899 838 do { \ 900 839 if (yydebug) \ 901 840 YYFPRINTF Args; \ 902 - } while (0) 841 + } while (YYID (0)) 903 842 904 - # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 905 - do { \ 906 - if (yydebug) \ 907 - { \ 908 - YYFPRINTF (stderr, "%s ", Title); \ 909 - yysymprint (stderr, \ 910 - Type, Value); \ 911 - YYFPRINTF (stderr, "\n"); \ 912 - } \ 913 - } while (0) 843 + # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 844 + do { \ 845 + if (yydebug) \ 846 + { \ 847 + YYFPRINTF (stderr, "%s ", Title); \ 848 + yy_symbol_print (stderr, \ 849 + Type, Value); \ 850 + YYFPRINTF (stderr, "\n"); \ 851 + } \ 852 + } while (YYID (0)) 853 + 854 + 855 + /*--------------------------------. 856 + | Print this symbol on YYOUTPUT. | 857 + `--------------------------------*/ 858 + 859 + /*ARGSUSED*/ 860 + #if (defined __STDC__ || defined __C99__FUNC__ \ 861 + || defined __cplusplus || defined _MSC_VER) 862 + static void 863 + yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 864 + #else 865 + static void 866 + yy_symbol_value_print (yyoutput, yytype, yyvaluep) 867 + FILE *yyoutput; 868 + int yytype; 869 + YYSTYPE const * const yyvaluep; 870 + #endif 871 + { 872 + if (!yyvaluep) 873 + return; 874 + # ifdef YYPRINT 875 + if (yytype < YYNTOKENS) 876 + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 877 + # else 878 + YYUSE (yyoutput); 879 + # endif 880 + switch (yytype) 881 + { 882 + default: 883 + break; 884 + } 885 + } 886 + 887 + 888 + /*--------------------------------. 889 + | Print this symbol on YYOUTPUT. | 890 + `--------------------------------*/ 891 + 892 + #if (defined __STDC__ || defined __C99__FUNC__ \ 893 + || defined __cplusplus || defined _MSC_VER) 894 + static void 895 + yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 896 + #else 897 + static void 898 + yy_symbol_print (yyoutput, yytype, yyvaluep) 899 + FILE *yyoutput; 900 + int yytype; 901 + YYSTYPE const * const yyvaluep; 902 + #endif 903 + { 904 + if (yytype < YYNTOKENS) 905 + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 906 + else 907 + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 908 + 909 + yy_symbol_value_print (yyoutput, yytype, yyvaluep); 910 + YYFPRINTF (yyoutput, ")"); 911 + } 914 912 915 913 /*------------------------------------------------------------------. 916 914 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 917 915 | TOP (included). | 918 916 `------------------------------------------------------------------*/ 919 917 920 - #if defined (__STDC__) || defined (__cplusplus) 918 + #if (defined __STDC__ || defined __C99__FUNC__ \ 919 + || defined __cplusplus || defined _MSC_VER) 921 920 static void 922 - yy_stack_print (short int *bottom, short int *top) 921 + yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 923 922 #else 924 923 static void 925 924 yy_stack_print (bottom, top) 926 - short int *bottom; 927 - short int *top; 925 + yytype_int16 *bottom; 926 + yytype_int16 *top; 928 927 #endif 929 928 { 930 929 YYFPRINTF (stderr, "Stack now"); 931 - for (/* Nothing. */; bottom <= top; ++bottom) 930 + for (; bottom <= top; ++bottom) 932 931 YYFPRINTF (stderr, " %d", *bottom); 933 932 YYFPRINTF (stderr, "\n"); 934 933 } ··· 997 876 do { \ 998 877 if (yydebug) \ 999 878 yy_stack_print ((Bottom), (Top)); \ 1000 - } while (0) 879 + } while (YYID (0)) 1001 880 1002 881 1003 882 /*------------------------------------------------. 1004 883 | Report that the YYRULE is going to be reduced. | 1005 884 `------------------------------------------------*/ 1006 885 1007 - #if defined (__STDC__) || defined (__cplusplus) 886 + #if (defined __STDC__ || defined __C99__FUNC__ \ 887 + || defined __cplusplus || defined _MSC_VER) 1008 888 static void 1009 - yy_reduce_print (int yyrule) 889 + yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 1010 890 #else 1011 891 static void 1012 - yy_reduce_print (yyrule) 892 + yy_reduce_print (yyvsp, yyrule) 893 + YYSTYPE *yyvsp; 1013 894 int yyrule; 1014 895 #endif 1015 896 { 897 + int yynrhs = yyr2[yyrule]; 1016 898 int yyi; 1017 899 unsigned long int yylno = yyrline[yyrule]; 1018 - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", 1019 - yyrule - 1, yylno); 1020 - /* Print the symbols being reduced, and their result. */ 1021 - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) 1022 - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); 1023 - YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); 900 + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 901 + yyrule - 1, yylno); 902 + /* The symbols being reduced. */ 903 + for (yyi = 0; yyi < yynrhs; yyi++) 904 + { 905 + fprintf (stderr, " $%d = ", yyi + 1); 906 + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 907 + &(yyvsp[(yyi + 1) - (yynrhs)]) 908 + ); 909 + fprintf (stderr, "\n"); 910 + } 1024 911 } 1025 912 1026 913 # define YY_REDUCE_PRINT(Rule) \ 1027 914 do { \ 1028 915 if (yydebug) \ 1029 - yy_reduce_print (Rule); \ 1030 - } while (0) 916 + yy_reduce_print (yyvsp, Rule); \ 917 + } while (YYID (0)) 1031 918 1032 919 /* Nonzero means print parse trace. It is left uninitialized so that 1033 920 multiple parsers can coexist. */ ··· 1069 940 #if YYERROR_VERBOSE 1070 941 1071 942 # ifndef yystrlen 1072 - # if defined (__GLIBC__) && defined (_STRING_H) 943 + # if defined __GLIBC__ && defined _STRING_H 1073 944 # define yystrlen strlen 1074 945 # else 1075 946 /* Return the length of YYSTR. */ 947 + #if (defined __STDC__ || defined __C99__FUNC__ \ 948 + || defined __cplusplus || defined _MSC_VER) 1076 949 static YYSIZE_T 1077 - # if defined (__STDC__) || defined (__cplusplus) 1078 950 yystrlen (const char *yystr) 1079 - # else 951 + #else 952 + static YYSIZE_T 1080 953 yystrlen (yystr) 1081 - const char *yystr; 1082 - # endif 954 + const char *yystr; 955 + #endif 1083 956 { 1084 - const char *yys = yystr; 1085 - 1086 - while (*yys++ != '\0') 957 + YYSIZE_T yylen; 958 + for (yylen = 0; yystr[yylen]; yylen++) 1087 959 continue; 1088 - 1089 - return yys - yystr - 1; 960 + return yylen; 1090 961 } 1091 962 # endif 1092 963 # endif 1093 964 1094 965 # ifndef yystpcpy 1095 - # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) 966 + # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1096 967 # define yystpcpy stpcpy 1097 968 # else 1098 969 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1099 970 YYDEST. */ 971 + #if (defined __STDC__ || defined __C99__FUNC__ \ 972 + || defined __cplusplus || defined _MSC_VER) 1100 973 static char * 1101 - # if defined (__STDC__) || defined (__cplusplus) 1102 974 yystpcpy (char *yydest, const char *yysrc) 1103 - # else 975 + #else 976 + static char * 1104 977 yystpcpy (yydest, yysrc) 1105 - char *yydest; 1106 - const char *yysrc; 1107 - # endif 978 + char *yydest; 979 + const char *yysrc; 980 + #endif 1108 981 { 1109 982 char *yyd = yydest; 1110 983 const char *yys = yysrc; ··· 1132 1001 { 1133 1002 if (*yystr == '"') 1134 1003 { 1135 - size_t yyn = 0; 1004 + YYSIZE_T yyn = 0; 1136 1005 char const *yyp = yystr; 1137 1006 1138 1007 for (;;) ··· 1167 1036 } 1168 1037 # endif 1169 1038 1170 - #endif /* YYERROR_VERBOSE */ 1039 + /* Copy into YYRESULT an error message about the unexpected token 1040 + YYCHAR while in state YYSTATE. Return the number of bytes copied, 1041 + including the terminating null byte. If YYRESULT is null, do not 1042 + copy anything; just return the number of bytes that would be 1043 + copied. As a special case, return 0 if an ordinary "syntax error" 1044 + message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1045 + size calculation. */ 1046 + static YYSIZE_T 1047 + yysyntax_error (char *yyresult, int yystate, int yychar) 1048 + { 1049 + int yyn = yypact[yystate]; 1171 1050 1051 + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1052 + return 0; 1053 + else 1054 + { 1055 + int yytype = YYTRANSLATE (yychar); 1056 + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1057 + YYSIZE_T yysize = yysize0; 1058 + YYSIZE_T yysize1; 1059 + int yysize_overflow = 0; 1060 + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1061 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1062 + int yyx; 1063 + 1064 + # if 0 1065 + /* This is so xgettext sees the translatable formats that are 1066 + constructed on the fly. */ 1067 + YY_("syntax error, unexpected %s"); 1068 + YY_("syntax error, unexpected %s, expecting %s"); 1069 + YY_("syntax error, unexpected %s, expecting %s or %s"); 1070 + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1071 + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1072 + # endif 1073 + char *yyfmt; 1074 + char const *yyf; 1075 + static char const yyunexpected[] = "syntax error, unexpected %s"; 1076 + static char const yyexpecting[] = ", expecting %s"; 1077 + static char const yyor[] = " or %s"; 1078 + char yyformat[sizeof yyunexpected 1079 + + sizeof yyexpecting - 1 1080 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1081 + * (sizeof yyor - 1))]; 1082 + char const *yyprefix = yyexpecting; 1083 + 1084 + /* Start YYX at -YYN if negative to avoid negative indexes in 1085 + YYCHECK. */ 1086 + int yyxbegin = yyn < 0 ? -yyn : 0; 1087 + 1088 + /* Stay within bounds of both yycheck and yytname. */ 1089 + int yychecklim = YYLAST - yyn + 1; 1090 + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1091 + int yycount = 1; 1092 + 1093 + yyarg[0] = yytname[yytype]; 1094 + yyfmt = yystpcpy (yyformat, yyunexpected); 1095 + 1096 + for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1097 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1098 + { 1099 + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1100 + { 1101 + yycount = 1; 1102 + yysize = yysize0; 1103 + yyformat[sizeof yyunexpected - 1] = '\0'; 1104 + break; 1105 + } 1106 + yyarg[yycount++] = yytname[yyx]; 1107 + yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1108 + yysize_overflow |= (yysize1 < yysize); 1109 + yysize = yysize1; 1110 + yyfmt = yystpcpy (yyfmt, yyprefix); 1111 + yyprefix = yyor; 1112 + } 1113 + 1114 + yyf = YY_(yyformat); 1115 + yysize1 = yysize + yystrlen (yyf); 1116 + yysize_overflow |= (yysize1 < yysize); 1117 + yysize = yysize1; 1118 + 1119 + if (yysize_overflow) 1120 + return YYSIZE_MAXIMUM; 1121 + 1122 + if (yyresult) 1123 + { 1124 + /* Avoid sprintf, as that infringes on the user's name space. 1125 + Don't have undefined behavior even if the translation 1126 + produced a string with the wrong number of "%s"s. */ 1127 + char *yyp = yyresult; 1128 + int yyi = 0; 1129 + while ((*yyp = *yyf) != '\0') 1130 + { 1131 + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1132 + { 1133 + yyp += yytnamerr (yyp, yyarg[yyi++]); 1134 + yyf += 2; 1135 + } 1136 + else 1137 + { 1138 + yyp++; 1139 + yyf++; 1140 + } 1141 + } 1142 + } 1143 + return yysize; 1144 + } 1145 + } 1146 + #endif /* YYERROR_VERBOSE */ 1172 1147 1173 1148 1174 - #if YYDEBUG 1175 - /*--------------------------------. 1176 - | Print this symbol on YYOUTPUT. | 1177 - `--------------------------------*/ 1178 - 1179 - #if defined (__STDC__) || defined (__cplusplus) 1180 - static void 1181 - yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) 1182 - #else 1183 - static void 1184 - yysymprint (yyoutput, yytype, yyvaluep) 1185 - FILE *yyoutput; 1186 - int yytype; 1187 - YYSTYPE *yyvaluep; 1188 - #endif 1189 - { 1190 - /* Pacify ``unused variable'' warnings. */ 1191 - (void) yyvaluep; 1192 - 1193 - if (yytype < YYNTOKENS) 1194 - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1195 - else 1196 - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 1197 - 1198 - 1199 - # ifdef YYPRINT 1200 - if (yytype < YYNTOKENS) 1201 - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1202 - # endif 1203 - switch (yytype) 1204 - { 1205 - default: 1206 - break; 1207 - } 1208 - YYFPRINTF (yyoutput, ")"); 1209 - } 1210 - 1211 - #endif /* ! YYDEBUG */ 1212 1149 /*-----------------------------------------------. 1213 1150 | Release the memory associated to this symbol. | 1214 1151 `-----------------------------------------------*/ 1215 1152 1216 - #if defined (__STDC__) || defined (__cplusplus) 1153 + /*ARGSUSED*/ 1154 + #if (defined __STDC__ || defined __C99__FUNC__ \ 1155 + || defined __cplusplus || defined _MSC_VER) 1217 1156 static void 1218 1157 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1219 1158 #else ··· 1294 1093 YYSTYPE *yyvaluep; 1295 1094 #endif 1296 1095 { 1297 - /* Pacify ``unused variable'' warnings. */ 1298 - (void) yyvaluep; 1096 + YYUSE (yyvaluep); 1299 1097 1300 1098 if (!yymsg) 1301 1099 yymsg = "Deleting"; ··· 1302 1102 1303 1103 switch (yytype) 1304 1104 { 1305 - case 52: /* "choice_entry" */ 1105 + case 51: /* "choice_entry" */ 1306 1106 1307 - { 1107 + { 1308 1108 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1309 1109 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 1310 1110 if (current_menu == (yyvaluep->menu)) 1311 1111 menu_end_menu(); 1312 1112 }; 1313 1113 1314 - break; 1315 - case 58: /* "if_entry" */ 1114 + break; 1115 + case 57: /* "if_entry" */ 1316 1116 1317 - { 1117 + { 1318 1118 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1319 1119 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 1320 1120 if (current_menu == (yyvaluep->menu)) 1321 1121 menu_end_menu(); 1322 1122 }; 1323 1123 1324 - break; 1325 - case 63: /* "menu_entry" */ 1124 + break; 1125 + case 62: /* "menu_entry" */ 1326 1126 1327 - { 1127 + { 1328 1128 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1329 1129 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 1330 1130 if (current_menu == (yyvaluep->menu)) 1331 1131 menu_end_menu(); 1332 1132 }; 1333 1133 1334 - break; 1134 + break; 1335 1135 1336 1136 default: 1337 - break; 1137 + break; 1338 1138 } 1339 1139 } 1340 1140 ··· 1342 1142 /* Prevent warnings from -Wmissing-prototypes. */ 1343 1143 1344 1144 #ifdef YYPARSE_PARAM 1345 - # if defined (__STDC__) || defined (__cplusplus) 1145 + #if defined __STDC__ || defined __cplusplus 1346 1146 int yyparse (void *YYPARSE_PARAM); 1347 - # else 1147 + #else 1348 1148 int yyparse (); 1349 - # endif 1149 + #endif 1350 1150 #else /* ! YYPARSE_PARAM */ 1351 - #if defined (__STDC__) || defined (__cplusplus) 1151 + #if defined __STDC__ || defined __cplusplus 1352 1152 int yyparse (void); 1353 1153 #else 1354 1154 int yyparse (); ··· 1373 1173 `----------*/ 1374 1174 1375 1175 #ifdef YYPARSE_PARAM 1376 - # if defined (__STDC__) || defined (__cplusplus) 1377 - int yyparse (void *YYPARSE_PARAM) 1378 - # else 1379 - int yyparse (YYPARSE_PARAM) 1380 - void *YYPARSE_PARAM; 1381 - # endif 1176 + #if (defined __STDC__ || defined __C99__FUNC__ \ 1177 + || defined __cplusplus || defined _MSC_VER) 1178 + int 1179 + yyparse (void *YYPARSE_PARAM) 1180 + #else 1181 + int 1182 + yyparse (YYPARSE_PARAM) 1183 + void *YYPARSE_PARAM; 1184 + #endif 1382 1185 #else /* ! YYPARSE_PARAM */ 1383 - #if defined (__STDC__) || defined (__cplusplus) 1186 + #if (defined __STDC__ || defined __C99__FUNC__ \ 1187 + || defined __cplusplus || defined _MSC_VER) 1384 1188 int 1385 1189 yyparse (void) 1386 1190 #else 1387 1191 int 1388 1192 yyparse () 1389 - ; 1193 + 1390 1194 #endif 1391 1195 #endif 1392 1196 { ··· 1402 1198 int yyerrstatus; 1403 1199 /* Look-ahead token as an internal (translated) token number. */ 1404 1200 int yytoken = 0; 1201 + #if YYERROR_VERBOSE 1202 + /* Buffer for error messages, and its allocated size. */ 1203 + char yymsgbuf[128]; 1204 + char *yymsg = yymsgbuf; 1205 + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1206 + #endif 1405 1207 1406 1208 /* Three stacks and their tools: 1407 1209 `yyss': related to states, ··· 1418 1208 to reallocate them elsewhere. */ 1419 1209 1420 1210 /* The state stack. */ 1421 - short int yyssa[YYINITDEPTH]; 1422 - short int *yyss = yyssa; 1423 - short int *yyssp; 1211 + yytype_int16 yyssa[YYINITDEPTH]; 1212 + yytype_int16 *yyss = yyssa; 1213 + yytype_int16 *yyssp; 1424 1214 1425 1215 /* The semantic value stack. */ 1426 1216 YYSTYPE yyvsa[YYINITDEPTH]; ··· 1429 1219 1430 1220 1431 1221 1432 - #define YYPOPSTACK (yyvsp--, yyssp--) 1222 + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1433 1223 1434 1224 YYSIZE_T yystacksize = YYINITDEPTH; 1435 1225 ··· 1438 1228 YYSTYPE yyval; 1439 1229 1440 1230 1441 - /* When reducing, the number of symbols on the RHS of the reduced 1442 - rule. */ 1443 - int yylen; 1231 + /* The number of symbols on the RHS of the reduced rule. 1232 + Keep to zero when no symbol should be popped. */ 1233 + int yylen = 0; 1444 1234 1445 1235 YYDPRINTF ((stderr, "Starting parse\n")); 1446 1236 ··· 1464 1254 `------------------------------------------------------------*/ 1465 1255 yynewstate: 1466 1256 /* In all cases, when you get here, the value and location stacks 1467 - have just been pushed. so pushing a state here evens the stacks. 1468 - */ 1257 + have just been pushed. So pushing a state here evens the stacks. */ 1469 1258 yyssp++; 1470 1259 1471 1260 yysetstate: ··· 1477 1268 1478 1269 #ifdef yyoverflow 1479 1270 { 1480 - /* Give user a chance to reallocate the stack. Use copies of 1271 + /* Give user a chance to reallocate the stack. Use copies of 1481 1272 these so that the &'s don't force the real ones into 1482 1273 memory. */ 1483 1274 YYSTYPE *yyvs1 = yyvs; 1484 - short int *yyss1 = yyss; 1275 + yytype_int16 *yyss1 = yyss; 1485 1276 1486 1277 1487 1278 /* Each stack pointer address is followed by the size of the ··· 1509 1300 yystacksize = YYMAXDEPTH; 1510 1301 1511 1302 { 1512 - short int *yyss1 = yyss; 1303 + yytype_int16 *yyss1 = yyss; 1513 1304 union yyalloc *yyptr = 1514 1305 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1515 1306 if (! yyptr) ··· 1544 1335 `-----------*/ 1545 1336 yybackup: 1546 1337 1547 - /* Do appropriate processing given the current state. */ 1548 - /* Read a look-ahead token if we need one and don't already have one. */ 1549 - /* yyresume: */ 1338 + /* Do appropriate processing given the current state. Read a 1339 + look-ahead token if we need one and don't already have one. */ 1550 1340 1551 1341 /* First try to decide what to do without reference to look-ahead token. */ 1552 - 1553 1342 yyn = yypact[yystate]; 1554 1343 if (yyn == YYPACT_NINF) 1555 1344 goto yydefault; ··· 1589 1382 if (yyn == YYFINAL) 1590 1383 YYACCEPT; 1591 1384 1592 - /* Shift the look-ahead token. */ 1593 - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1594 - 1595 - /* Discard the token being shifted unless it is eof. */ 1596 - if (yychar != YYEOF) 1597 - yychar = YYEMPTY; 1598 - 1599 - *++yyvsp = yylval; 1600 - 1601 - 1602 1385 /* Count tokens shifted since error; after three, turn off error 1603 1386 status. */ 1604 1387 if (yyerrstatus) 1605 1388 yyerrstatus--; 1606 1389 1390 + /* Shift the look-ahead token. */ 1391 + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1392 + 1393 + /* Discard the shifted token unless it is eof. */ 1394 + if (yychar != YYEOF) 1395 + yychar = YYEMPTY; 1396 + 1607 1397 yystate = yyn; 1398 + *++yyvsp = yylval; 1399 + 1608 1400 goto yynewstate; 1609 1401 1610 1402 ··· 1645 1439 1646 1440 case 9: 1647 1441 1648 - { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); ;} 1442 + { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); ;} 1649 1443 break; 1650 1444 1651 1445 case 10: 1652 1446 1653 1447 { 1654 - zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[-2].id)->name); 1448 + zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name); 1655 1449 ;} 1656 1450 break; 1657 1451 ··· 1662 1456 1663 1457 case 25: 1664 1458 1665 - { zconf_error("unknown option \"%s\"", (yyvsp[-2].string)); ;} 1459 + { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;} 1666 1460 break; 1667 1461 1668 1462 case 26: ··· 1673 1467 case 27: 1674 1468 1675 1469 { 1676 - struct symbol *sym = sym_lookup((yyvsp[-1].string), 0); 1470 + struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); 1677 1471 sym->flags |= SYMBOL_OPTIONAL; 1678 1472 menu_add_entry(sym); 1679 - printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 1473 + printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1680 1474 ;} 1681 1475 break; 1682 1476 ··· 1691 1485 case 29: 1692 1486 1693 1487 { 1694 - struct symbol *sym = sym_lookup((yyvsp[-1].string), 0); 1488 + struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); 1695 1489 sym->flags |= SYMBOL_OPTIONAL; 1696 1490 menu_add_entry(sym); 1697 - printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 1491 + printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1698 1492 ;} 1699 1493 break; 1700 1494 ··· 1713 1507 case 38: 1714 1508 1715 1509 { 1716 - menu_set_type((yyvsp[-2].id)->stype); 1510 + menu_set_type((yyvsp[(1) - (3)].id)->stype); 1717 1511 printd(DEBUG_PARSE, "%s:%d:type(%u)\n", 1718 1512 zconf_curname(), zconf_lineno(), 1719 - (yyvsp[-2].id)->stype); 1513 + (yyvsp[(1) - (3)].id)->stype); 1720 1514 ;} 1721 1515 break; 1722 1516 1723 1517 case 39: 1724 1518 1725 1519 { 1726 - menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); 1520 + menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); 1727 1521 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1728 1522 ;} 1729 1523 break; ··· 1731 1525 case 40: 1732 1526 1733 1527 { 1734 - menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr)); 1735 - if ((yyvsp[-3].id)->stype != S_UNKNOWN) 1736 - menu_set_type((yyvsp[-3].id)->stype); 1528 + menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); 1529 + if ((yyvsp[(1) - (4)].id)->stype != S_UNKNOWN) 1530 + menu_set_type((yyvsp[(1) - (4)].id)->stype); 1737 1531 printd(DEBUG_PARSE, "%s:%d:default(%u)\n", 1738 1532 zconf_curname(), zconf_lineno(), 1739 - (yyvsp[-3].id)->stype); 1533 + (yyvsp[(1) - (4)].id)->stype); 1740 1534 ;} 1741 1535 break; 1742 1536 1743 1537 case 41: 1744 1538 1745 1539 { 1746 - menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); 1540 + menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); 1747 1541 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); 1748 1542 ;} 1749 1543 break; ··· 1751 1545 case 42: 1752 1546 1753 1547 { 1754 - menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr)); 1548 + menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr)); 1755 1549 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); 1756 1550 ;} 1757 1551 break; ··· 1759 1553 case 45: 1760 1554 1761 1555 { 1762 - struct kconf_id *id = kconf_id_lookup((yyvsp[-1].string), strlen((yyvsp[-1].string))); 1556 + struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); 1763 1557 if (id && id->flags & TF_OPTION) 1764 - menu_add_option(id->token, (yyvsp[0].string)); 1558 + menu_add_option(id->token, (yyvsp[(3) - (3)].string)); 1765 1559 else 1766 - zconfprint("warning: ignoring unknown option %s", (yyvsp[-1].string)); 1767 - free((yyvsp[-1].string)); 1560 + zconfprint("warning: ignoring unknown option %s", (yyvsp[(2) - (3)].string)); 1561 + free((yyvsp[(2) - (3)].string)); 1768 1562 ;} 1769 1563 break; 1770 1564 ··· 1775 1569 1776 1570 case 47: 1777 1571 1778 - { (yyval.string) = (yyvsp[0].string); ;} 1572 + { (yyval.string) = (yyvsp[(2) - (2)].string); ;} 1779 1573 break; 1780 1574 1781 1575 case 48: ··· 1799 1593 case 50: 1800 1594 1801 1595 { 1802 - if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) { 1596 + if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) { 1803 1597 menu_end_menu(); 1804 1598 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); 1805 1599 } ··· 1809 1603 case 58: 1810 1604 1811 1605 { 1812 - menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); 1606 + menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); 1813 1607 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1814 1608 ;} 1815 1609 break; ··· 1817 1611 case 59: 1818 1612 1819 1613 { 1820 - if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) { 1821 - menu_set_type((yyvsp[-2].id)->stype); 1614 + if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) { 1615 + menu_set_type((yyvsp[(1) - (3)].id)->stype); 1822 1616 printd(DEBUG_PARSE, "%s:%d:type(%u)\n", 1823 1617 zconf_curname(), zconf_lineno(), 1824 - (yyvsp[-2].id)->stype); 1618 + (yyvsp[(1) - (3)].id)->stype); 1825 1619 } else 1826 1620 YYERROR; 1827 1621 ;} ··· 1838 1632 case 61: 1839 1633 1840 1634 { 1841 - if ((yyvsp[-3].id)->stype == S_UNKNOWN) { 1842 - menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); 1635 + if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) { 1636 + menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); 1843 1637 printd(DEBUG_PARSE, "%s:%d:default\n", 1844 1638 zconf_curname(), zconf_lineno()); 1845 1639 } else ··· 1852 1646 { 1853 1647 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); 1854 1648 menu_add_entry(NULL); 1855 - menu_add_dep((yyvsp[-1].expr)); 1649 + menu_add_dep((yyvsp[(2) - (3)].expr)); 1856 1650 (yyval.menu) = menu_add_menu(); 1857 1651 ;} 1858 1652 break; ··· 1860 1654 case 65: 1861 1655 1862 1656 { 1863 - if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) { 1657 + if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) { 1864 1658 menu_end_menu(); 1865 1659 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); 1866 1660 } ··· 1871 1665 1872 1666 { 1873 1667 menu_add_entry(NULL); 1874 - menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); 1668 + menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL); 1875 1669 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 1876 1670 ;} 1877 1671 break; ··· 1886 1680 case 73: 1887 1681 1888 1682 { 1889 - if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) { 1683 + if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) { 1890 1684 menu_end_menu(); 1891 1685 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); 1892 1686 } ··· 1896 1690 case 79: 1897 1691 1898 1692 { 1899 - printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 1900 - zconf_nextfile((yyvsp[-1].string)); 1693 + printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1694 + zconf_nextfile((yyvsp[(2) - (3)].string)); 1901 1695 ;} 1902 1696 break; 1903 1697 ··· 1905 1699 1906 1700 { 1907 1701 menu_add_entry(NULL); 1908 - menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL); 1702 + menu_add_prompt(P_COMMENT, (yyvsp[(2) - (3)].string), NULL); 1909 1703 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 1910 1704 ;} 1911 1705 break; ··· 1928 1722 case 83: 1929 1723 1930 1724 { 1931 - current_entry->help = (yyvsp[0].string); 1725 + current_entry->help = (yyvsp[(2) - (2)].string); 1932 1726 ;} 1933 1727 break; 1934 1728 1935 1729 case 88: 1936 1730 1937 1731 { 1938 - menu_add_dep((yyvsp[-1].expr)); 1732 + menu_add_dep((yyvsp[(3) - (4)].expr)); 1939 1733 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); 1940 - ;} 1941 - break; 1942 - 1943 - case 89: 1944 - 1945 - { 1946 - menu_add_dep((yyvsp[-1].expr)); 1947 - printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); 1948 1734 ;} 1949 1735 break; 1950 1736 1951 1737 case 90: 1952 1738 1953 1739 { 1954 - menu_add_dep((yyvsp[-1].expr)); 1955 - printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); 1740 + menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr)); 1956 1741 ;} 1957 1742 break; 1958 1743 1959 - case 92: 1744 + case 93: 1960 1745 1961 - { 1962 - menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr)); 1963 - ;} 1746 + { (yyval.id) = (yyvsp[(1) - (2)].id); ;} 1747 + break; 1748 + 1749 + case 94: 1750 + 1751 + { (yyval.id) = (yyvsp[(1) - (2)].id); ;} 1964 1752 break; 1965 1753 1966 1754 case 95: 1967 1755 1968 - { (yyval.id) = (yyvsp[-1].id); ;} 1756 + { (yyval.id) = (yyvsp[(1) - (2)].id); ;} 1969 1757 break; 1970 1758 1971 - case 96: 1972 - 1973 - { (yyval.id) = (yyvsp[-1].id); ;} 1974 - break; 1975 - 1976 - case 97: 1977 - 1978 - { (yyval.id) = (yyvsp[-1].id); ;} 1979 - break; 1980 - 1981 - case 100: 1759 + case 98: 1982 1760 1983 1761 { (yyval.expr) = NULL; ;} 1984 1762 break; 1985 1763 1764 + case 99: 1765 + 1766 + { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;} 1767 + break; 1768 + 1769 + case 100: 1770 + 1771 + { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;} 1772 + break; 1773 + 1986 1774 case 101: 1987 1775 1988 - { (yyval.expr) = (yyvsp[0].expr); ;} 1776 + { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} 1989 1777 break; 1990 1778 1991 1779 case 102: 1992 1780 1993 - { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); ;} 1781 + { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} 1994 1782 break; 1995 1783 1996 1784 case 103: 1997 1785 1998 - { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} 1786 + { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} 1999 1787 break; 2000 1788 2001 1789 case 104: 2002 1790 2003 - { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} 1791 + { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;} 2004 1792 break; 2005 1793 2006 1794 case 105: 2007 1795 2008 - { (yyval.expr) = (yyvsp[-1].expr); ;} 1796 + { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 2009 1797 break; 2010 1798 2011 1799 case 106: 2012 1800 2013 - { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); ;} 1801 + { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 2014 1802 break; 2015 1803 2016 1804 case 107: 2017 1805 2018 - { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} 1806 + { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;} 2019 1807 break; 2020 1808 2021 1809 case 108: 2022 1810 2023 - { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} 1811 + { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 1); free((yyvsp[(1) - (1)].string)); ;} 2024 1812 break; 2025 1813 2026 - case 109: 2027 1814 2028 - { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); ;} 2029 - break; 2030 - 2031 - case 110: 2032 - 2033 - { (yyval.symbol) = sym_lookup((yyvsp[0].string), 1); free((yyvsp[0].string)); ;} 2034 - break; 2035 - 1815 + /* Line 1267 of yacc.c. */ 2036 1816 2037 1817 default: break; 2038 1818 } 1819 + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 2039 1820 2040 - /* Line 1126 of yacc.c. */ 2041 - 2042 - 2043 - yyvsp -= yylen; 2044 - yyssp -= yylen; 2045 - 2046 - 1821 + YYPOPSTACK (yylen); 1822 + yylen = 0; 2047 1823 YY_STACK_PRINT (yyss, yyssp); 2048 1824 2049 1825 *++yyvsp = yyval; ··· 2054 1866 if (!yyerrstatus) 2055 1867 { 2056 1868 ++yynerrs; 2057 - #if YYERROR_VERBOSE 2058 - yyn = yypact[yystate]; 2059 - 2060 - if (YYPACT_NINF < yyn && yyn < YYLAST) 2061 - { 2062 - int yytype = YYTRANSLATE (yychar); 2063 - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 2064 - YYSIZE_T yysize = yysize0; 2065 - YYSIZE_T yysize1; 2066 - int yysize_overflow = 0; 2067 - char *yymsg = 0; 2068 - # define YYERROR_VERBOSE_ARGS_MAXIMUM 5 2069 - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 2070 - int yyx; 2071 - 2072 - #if 0 2073 - /* This is so xgettext sees the translatable formats that are 2074 - constructed on the fly. */ 2075 - YY_("syntax error, unexpected %s"); 2076 - YY_("syntax error, unexpected %s, expecting %s"); 2077 - YY_("syntax error, unexpected %s, expecting %s or %s"); 2078 - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 2079 - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 2080 - #endif 2081 - char *yyfmt; 2082 - char const *yyf; 2083 - static char const yyunexpected[] = "syntax error, unexpected %s"; 2084 - static char const yyexpecting[] = ", expecting %s"; 2085 - static char const yyor[] = " or %s"; 2086 - char yyformat[sizeof yyunexpected 2087 - + sizeof yyexpecting - 1 2088 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 2089 - * (sizeof yyor - 1))]; 2090 - char const *yyprefix = yyexpecting; 2091 - 2092 - /* Start YYX at -YYN if negative to avoid negative indexes in 2093 - YYCHECK. */ 2094 - int yyxbegin = yyn < 0 ? -yyn : 0; 2095 - 2096 - /* Stay within bounds of both yycheck and yytname. */ 2097 - int yychecklim = YYLAST - yyn; 2098 - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 2099 - int yycount = 1; 2100 - 2101 - yyarg[0] = yytname[yytype]; 2102 - yyfmt = yystpcpy (yyformat, yyunexpected); 2103 - 2104 - for (yyx = yyxbegin; yyx < yyxend; ++yyx) 2105 - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 2106 - { 2107 - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 2108 - { 2109 - yycount = 1; 2110 - yysize = yysize0; 2111 - yyformat[sizeof yyunexpected - 1] = '\0'; 2112 - break; 2113 - } 2114 - yyarg[yycount++] = yytname[yyx]; 2115 - yysize1 = yysize + yytnamerr (0, yytname[yyx]); 2116 - yysize_overflow |= yysize1 < yysize; 2117 - yysize = yysize1; 2118 - yyfmt = yystpcpy (yyfmt, yyprefix); 2119 - yyprefix = yyor; 2120 - } 2121 - 2122 - yyf = YY_(yyformat); 2123 - yysize1 = yysize + yystrlen (yyf); 2124 - yysize_overflow |= yysize1 < yysize; 2125 - yysize = yysize1; 2126 - 2127 - if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) 2128 - yymsg = (char *) YYSTACK_ALLOC (yysize); 2129 - if (yymsg) 2130 - { 2131 - /* Avoid sprintf, as that infringes on the user's name space. 2132 - Don't have undefined behavior even if the translation 2133 - produced a string with the wrong number of "%s"s. */ 2134 - char *yyp = yymsg; 2135 - int yyi = 0; 2136 - while ((*yyp = *yyf)) 2137 - { 2138 - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 2139 - { 2140 - yyp += yytnamerr (yyp, yyarg[yyi++]); 2141 - yyf += 2; 2142 - } 2143 - else 2144 - { 2145 - yyp++; 2146 - yyf++; 2147 - } 2148 - } 2149 - yyerror (yymsg); 1869 + #if ! YYERROR_VERBOSE 1870 + yyerror (YY_("syntax error")); 1871 + #else 1872 + { 1873 + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 1874 + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 1875 + { 1876 + YYSIZE_T yyalloc = 2 * yysize; 1877 + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 1878 + yyalloc = YYSTACK_ALLOC_MAXIMUM; 1879 + if (yymsg != yymsgbuf) 2150 1880 YYSTACK_FREE (yymsg); 2151 - } 2152 - else 2153 - { 2154 - yyerror (YY_("syntax error")); 1881 + yymsg = (char *) YYSTACK_ALLOC (yyalloc); 1882 + if (yymsg) 1883 + yymsg_alloc = yyalloc; 1884 + else 1885 + { 1886 + yymsg = yymsgbuf; 1887 + yymsg_alloc = sizeof yymsgbuf; 1888 + } 1889 + } 1890 + 1891 + if (0 < yysize && yysize <= yymsg_alloc) 1892 + { 1893 + (void) yysyntax_error (yymsg, yystate, yychar); 1894 + yyerror (yymsg); 1895 + } 1896 + else 1897 + { 1898 + yyerror (YY_("syntax error")); 1899 + if (yysize != 0) 2155 1900 goto yyexhaustedlab; 2156 - } 2157 - } 2158 - else 2159 - #endif /* YYERROR_VERBOSE */ 2160 - yyerror (YY_("syntax error")); 1901 + } 1902 + } 1903 + #endif 2161 1904 } 2162 1905 2163 1906 ··· 2099 1980 error, discard it. */ 2100 1981 2101 1982 if (yychar <= YYEOF) 2102 - { 1983 + { 2103 1984 /* Return failure if at end of input. */ 2104 1985 if (yychar == YYEOF) 2105 1986 YYABORT; 2106 - } 1987 + } 2107 1988 else 2108 1989 { 2109 - yydestruct ("Error: discarding", yytoken, &yylval); 1990 + yydestruct ("Error: discarding", 1991 + yytoken, &yylval); 2110 1992 yychar = YYEMPTY; 2111 1993 } 2112 1994 } ··· 2125 2005 /* Pacify compilers like GCC when the user code never invokes 2126 2006 YYERROR and the label yyerrorlab therefore never appears in user 2127 2007 code. */ 2128 - if (0) 2008 + if (/*CONSTCOND*/ 0) 2129 2009 goto yyerrorlab; 2130 2010 2131 - yyvsp -= yylen; 2132 - yyssp -= yylen; 2011 + /* Do not reclaim the symbols of the rule which action triggered 2012 + this YYERROR. */ 2013 + YYPOPSTACK (yylen); 2014 + yylen = 0; 2015 + YY_STACK_PRINT (yyss, yyssp); 2133 2016 yystate = *yyssp; 2134 2017 goto yyerrlab1; 2135 2018 ··· 2162 2039 YYABORT; 2163 2040 2164 2041 2165 - yydestruct ("Error: popping", yystos[yystate], yyvsp); 2166 - YYPOPSTACK; 2042 + yydestruct ("Error: popping", 2043 + yystos[yystate], yyvsp); 2044 + YYPOPSTACK (1); 2167 2045 yystate = *yyssp; 2168 2046 YY_STACK_PRINT (yyss, yyssp); 2169 2047 } ··· 2175 2051 *++yyvsp = yylval; 2176 2052 2177 2053 2178 - /* Shift the error token. */ 2054 + /* Shift the error token. */ 2179 2055 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 2180 2056 2181 2057 yystate = yyn; ··· 2210 2086 if (yychar != YYEOF && yychar != YYEMPTY) 2211 2087 yydestruct ("Cleanup: discarding lookahead", 2212 2088 yytoken, &yylval); 2089 + /* Do not reclaim the symbols of the rule which action triggered 2090 + this YYABORT or YYACCEPT. */ 2091 + YYPOPSTACK (yylen); 2092 + YY_STACK_PRINT (yyss, yyssp); 2213 2093 while (yyssp != yyss) 2214 2094 { 2215 2095 yydestruct ("Cleanup: popping", 2216 2096 yystos[*yyssp], yyvsp); 2217 - YYPOPSTACK; 2097 + YYPOPSTACK (1); 2218 2098 } 2219 2099 #ifndef yyoverflow 2220 2100 if (yyss != yyssa) 2221 2101 YYSTACK_FREE (yyss); 2222 2102 #endif 2223 - return yyresult; 2103 + #if YYERROR_VERBOSE 2104 + if (yymsg != yymsgbuf) 2105 + YYSTACK_FREE (yymsg); 2106 + #endif 2107 + /* Make sure YYID is used. */ 2108 + return YYID (yyresult); 2224 2109 } 2225 2110 2226 2111 ··· 2476 2343 #include "expr.c" 2477 2344 #include "symbol.c" 2478 2345 #include "menu.c" 2479 - 2480 2346
-11
scripts/kconfig/zconf.y
··· 64 64 %token <id>T_IF 65 65 %token <id>T_ENDIF 66 66 %token <id>T_DEPENDS 67 - %token <id>T_REQUIRES 68 67 %token <id>T_OPTIONAL 69 68 %token <id>T_PROMPT 70 69 %token <id>T_TYPE ··· 417 418 { 418 419 menu_add_dep($3); 419 420 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); 420 - } 421 - | T_DEPENDS expr T_EOL 422 - { 423 - menu_add_dep($2); 424 - printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); 425 - } 426 - | T_REQUIRES expr T_EOL 427 - { 428 - menu_add_dep($2); 429 - printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); 430 421 }; 431 422 432 423 /* prompt statement */
+2 -2
scripts/makelst
··· 3 3 # with correct relocations from System.map 4 4 # Requires the following lines in makefile: 5 5 #%.lst: %.c 6 - # $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -g -c -o $*.o $< 7 - # $(srctree)/scripts/makelst $*.o $(objtree)/System.map $(OBJDUMP) 6 + # $(CC) $(c_flags) -g -c -o $*.o $< && 7 + # $(srctree)/scripts/makelst $*.o System.map $(OBJDUMP) > $@ 8 8 # 9 9 # Copyright (C) 2000 IBM Corporation 10 10 # Author(s): DJ Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
+5 -3
scripts/mkmakefile
··· 26 26 27 27 .PHONY: all \$(MAKECMDGOALS) 28 28 29 + all := \$(filter-out all Makefile,\$(MAKECMDGOALS)) 30 + 29 31 all: 30 - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) 32 + \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$(all) 31 33 32 34 Makefile:; 33 35 34 - \$(filter-out all Makefile,\$(MAKECMDGOALS)) %/: 35 - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@ 36 + \$(all) %/: all 37 + @: 36 38 EOF
+33 -7
scripts/mod/file2alias.c
··· 55 55 * Check that sizeof(device_id type) are consistent with size of section 56 56 * in .o file. If in-consistent then userspace and kernel does not agree 57 57 * on actual size which is a bug. 58 + * Also verify that the final entry in the table is all zeros. 58 59 **/ 59 - static void device_id_size_check(const char *modname, const char *device_id, 60 - unsigned long size, unsigned long id_size) 60 + static void device_id_check(const char *modname, const char *device_id, 61 + unsigned long size, unsigned long id_size, 62 + void *symval) 61 63 { 64 + int i; 65 + 62 66 if (size % id_size || size < id_size) { 63 67 fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo " 64 68 "of the size of section __mod_%s_device_table=%lu.\n" 65 69 "Fix definition of struct %s_device_id " 66 70 "in mod_devicetable.h\n", 67 71 modname, device_id, id_size, device_id, size, device_id); 72 + } 73 + /* Verify last one is a terminator */ 74 + for (i = 0; i < id_size; i++ ) { 75 + if (*(uint8_t*)(symval+size-id_size+i)) { 76 + fprintf(stderr,"%s: struct %s_device_id is %lu bytes. " 77 + "The last of %lu is:\n", 78 + modname, device_id, id_size, size / id_size); 79 + for (i = 0; i < id_size; i++ ) 80 + fprintf(stderr,"0x%02x ", 81 + *(uint8_t*)(symval+size-id_size+i) ); 82 + fprintf(stderr,"\n"); 83 + fatal("%s: struct %s_device_id is not terminated " 84 + "with a NULL entry!\n", modname, device_id); 85 + } 68 86 } 69 87 } 70 88 ··· 186 168 unsigned int i; 187 169 const unsigned long id_size = sizeof(struct usb_device_id); 188 170 189 - device_id_size_check(mod->name, "usb", size, id_size); 171 + device_id_check(mod->name, "usb", size, id_size, symval); 190 172 191 173 /* Leave last one: it's the terminator. */ 192 174 size -= id_size; ··· 546 528 char alias[500]; 547 529 int (*do_entry)(const char *, void *entry, char *alias) = function; 548 530 549 - device_id_size_check(mod->name, device_id, size, id_size); 531 + device_id_check(mod->name, device_id, size, id_size, symval); 550 532 /* Leave last one: it's the terminator. */ 551 533 size -= id_size; 552 534 ··· 568 550 Elf_Sym *sym, const char *symname) 569 551 { 570 552 void *symval; 553 + char *zeros = NULL; 571 554 572 555 /* We're looking for a section relative symbol */ 573 556 if (!sym->st_shndx || sym->st_shndx >= info->hdr->e_shnum) 574 557 return; 575 558 576 - symval = (void *)info->hdr 577 - + info->sechdrs[sym->st_shndx].sh_offset 578 - + sym->st_value; 559 + /* Handle all-NULL symbols allocated into .bss */ 560 + if (info->sechdrs[sym->st_shndx].sh_type & SHT_NOBITS) { 561 + zeros = calloc(1, sym->st_size); 562 + symval = zeros; 563 + } else { 564 + symval = (void *)info->hdr 565 + + info->sechdrs[sym->st_shndx].sh_offset 566 + + sym->st_value; 567 + } 579 568 580 569 if (sym_is(symname, "__mod_pci_device_table")) 581 570 do_table(symval, sym->st_size, ··· 651 626 do_table(symval, sym->st_size, 652 627 sizeof(struct ssb_device_id), "ssb", 653 628 do_ssb_entry, mod); 629 + free(zeros); 654 630 } 655 631 656 632 /* Now add out buffered information to the generated C source */
+6
scripts/mod/modpost.c
··· 381 381 sechdrs = (void *)hdr + hdr->e_shoff; 382 382 info->sechdrs = sechdrs; 383 383 384 + /* Check if file offset is correct */ 385 + if (hdr->e_shoff > info->size) { 386 + fatal("section header offset=%u in file '%s' is bigger then filesize=%lu\n", hdr->e_shoff, filename, info->size); 387 + return 0; 388 + } 389 + 384 390 /* Fix endianness in section headers */ 385 391 for (i = 0; i < hdr->e_shnum; i++) { 386 392 sechdrs[i].sh_type = TO_NATIVE(sechdrs[i].sh_type);
+2 -2
scripts/mod/modpost.h
··· 17 17 #define Elf_Shdr Elf32_Shdr 18 18 #define Elf_Sym Elf32_Sym 19 19 #define Elf_Addr Elf32_Addr 20 - #define Elf_Section Elf32_Section 20 + #define Elf_Section Elf32_Half 21 21 #define ELF_ST_BIND ELF32_ST_BIND 22 22 #define ELF_ST_TYPE ELF32_ST_TYPE 23 23 ··· 31 31 #define Elf_Shdr Elf64_Shdr 32 32 #define Elf_Sym Elf64_Sym 33 33 #define Elf_Addr Elf64_Addr 34 - #define Elf_Section Elf64_Section 34 + #define Elf_Section Elf64_Half 35 35 #define ELF_ST_BIND ELF64_ST_BIND 36 36 #define ELF_ST_TYPE ELF64_ST_TYPE 37 37
+3 -6
scripts/ver_linux
··· 21 21 make --version 2>&1 | awk -F, '{print $1}' | awk \ 22 22 '/GNU Make/{print "Gnu make ",$NF}' 23 23 24 - ld -v | awk -F\) '{print $1}' | awk \ 25 - '/BFD/{print "binutils ",$NF} \ 26 - /^GNU/{print "binutils ",$4}' 24 + echo "binutils $(ld -v | egrep -o '[0-9]+\.[0-9\.]+')" 27 25 28 26 echo -n "util-linux " 29 27 fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$// ··· 63 65 showmount --version 2>&1 | grep nfs-utils | awk \ 64 66 'NR==1{print "nfs-utils ", $NF}' 65 67 66 - ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \ 67 - -e 's/\.so$//' | sed -e 's/>//' | \ 68 - awk -F'[.-]' '{print "Linux C Library "$(NF-1)"."$NF}' 68 + echo -n "Linux C Library " 69 + sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps 69 70 70 71 ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \ 71 72 'NR==1{print "Dynamic linker (ldd) ", $NF}'