aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CREDITS6
-rw-r--r--Documentation/kbuild/makefiles.txt62
-rw-r--r--MAINTAINERS4
-rw-r--r--Makefile57
-rw-r--r--arch/alpha/Makefile2
-rw-r--r--arch/alpha/kernel/Makefile2
-rw-r--r--arch/alpha/lib/Makefile2
-rw-r--r--arch/arm/Makefile14
-rw-r--r--arch/arm/boot/compressed/Makefile2
-rw-r--r--arch/arm/vfp/Makefile2
-rw-r--r--arch/avr32/Makefile8
-rw-r--r--arch/blackfin/Kconfig2
-rw-r--r--arch/blackfin/Makefile4
-rw-r--r--arch/cris/Makefile10
-rw-r--r--arch/frv/Makefile32
-rw-r--r--arch/h8300/Makefile14
-rw-r--r--arch/h8300/lib/Makefile3
-rw-r--r--arch/i386/Makefile16
-rw-r--r--arch/ia64/Makefile4
-rw-r--r--arch/ia64/sn/kernel/Makefile2
-rw-r--r--arch/ia64/sn/kernel/sn2/Makefile2
-rw-r--r--arch/ia64/sn/pci/Makefile2
-rw-r--r--arch/ia64/sn/pci/pcibr/Makefile2
-rw-r--r--arch/m32r/Makefile8
-rw-r--r--arch/m68k/Makefile8
-rw-r--r--arch/m68knommu/Makefile8
-rw-r--r--arch/m68knommu/platform/5206/Makefile2
-rw-r--r--arch/m68knommu/platform/5206e/Makefile2
-rw-r--r--arch/m68knommu/platform/520x/Makefile2
-rw-r--r--arch/m68knommu/platform/523x/Makefile2
-rw-r--r--arch/m68knommu/platform/5249/Makefile2
-rw-r--r--arch/m68knommu/platform/5272/Makefile2
-rw-r--r--arch/m68knommu/platform/527x/Makefile2
-rw-r--r--arch/m68knommu/platform/528x/Makefile2
-rw-r--r--arch/m68knommu/platform/5307/Makefile2
-rw-r--r--arch/m68knommu/platform/532x/Makefile2
-rw-r--r--arch/m68knommu/platform/5407/Makefile2
-rw-r--r--arch/mips/Makefile8
-rw-r--r--arch/mips/kernel/Makefile2
-rw-r--r--arch/parisc/Makefile2
-rw-r--r--arch/parisc/math-emu/Makefile2
-rw-r--r--arch/powerpc/Kconfig.debug6
-rw-r--r--arch/powerpc/Makefile30
-rw-r--r--arch/powerpc/platforms/Kconfig2
-rw-r--r--arch/ppc/Makefile16
-rw-r--r--arch/ppc/boot/Makefile1
-rw-r--r--arch/s390/Makefile14
-rw-r--r--arch/sh/Makefile6
-rw-r--r--arch/sh/boot/compressed/Makefile2
-rw-r--r--arch/sh64/Makefile4
-rw-r--r--arch/sparc/Makefile8
-rw-r--r--arch/sparc64/Makefile8
-rw-r--r--arch/um/Makefile12
-rw-r--r--arch/um/Makefile-i3866
-rw-r--r--arch/um/Makefile-os-Linux2
-rw-r--r--arch/um/Makefile-x86_646
-rw-r--r--arch/um/drivers/Makefile2
-rw-r--r--arch/um/sys-ppc/Makefile6
-rw-r--r--arch/v850/Makefile8
-rw-r--r--arch/x86/boot/Makefile4
-rw-r--r--arch/x86/boot/compressed/Makefile_322
-rw-r--r--arch/x86/boot/compressed/Makefile_644
-rw-r--r--arch/x86/math-emu/Makefile3
-rw-r--r--arch/x86/vdso/Makefile4
-rw-r--r--arch/x86_64/Makefile8
-rw-r--r--arch/xtensa/Makefile8
-rw-r--r--arch/xtensa/boot/Makefile5
-rw-r--r--arch/xtensa/boot/boot-redboot/Makefile2
-rw-r--r--drivers/atm/Makefile2
-rw-r--r--drivers/input/misc/Kconfig2
-rw-r--r--drivers/leds/Kconfig2
-rw-r--r--drivers/telephony/Kconfig2
-rw-r--r--include/linux/Kbuild3
-rw-r--r--init/Makefile2
-rw-r--r--scripts/Kbuild.include8
-rw-r--r--scripts/Makefile.build45
-rw-r--r--scripts/Makefile.clean2
-rw-r--r--scripts/Makefile.lib30
-rw-r--r--scripts/basic/Makefile8
-rw-r--r--scripts/basic/docproc.c34
-rwxr-xr-xscripts/checkkconfigsymbols.sh59
-rw-r--r--scripts/export_report.pl10
-rw-r--r--scripts/gcc-version.sh8
-rw-r--r--scripts/genksyms/Makefile8
-rw-r--r--scripts/genksyms/keywords.c_shipped180
-rw-r--r--scripts/genksyms/keywords.gperf1
-rw-r--r--scripts/genksyms/lex.c_shipped1802
-rw-r--r--scripts/genksyms/parse.c_shipped2088
-rw-r--r--scripts/genksyms/parse.h_shipped159
-rw-r--r--scripts/genksyms/parse.y5
-rw-r--r--scripts/kconfig/Makefile10
-rwxr-xr-xscripts/kconfig/check.sh14
-rw-r--r--scripts/kconfig/lex.zconf.c_shipped25
-rw-r--r--scripts/kconfig/mconf.c36
-rw-r--r--scripts/kconfig/menu.c35
-rw-r--r--scripts/kconfig/util.c13
-rw-r--r--scripts/kconfig/zconf.gperf2
-rw-r--r--scripts/kconfig/zconf.hash.c_shipped220
-rw-r--r--scripts/kconfig/zconf.tab.c_shipped1406
-rw-r--r--scripts/kconfig/zconf.y11
-rwxr-xr-xscripts/makelst4
-rw-r--r--scripts/mkmakefile8
-rw-r--r--scripts/mod/file2alias.c40
-rw-r--r--scripts/mod/modpost.c6
-rw-r--r--scripts/mod/modpost.h4
-rwxr-xr-xscripts/ver_linux9
106 files changed, 3949 insertions, 2847 deletions
diff --git a/CREDITS b/CREDITS
index 08feda2667d0..99566b1a6eeb 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1165,6 +1165,12 @@ S: 600 North Bell Avenue, Suite 160
1165S: Carnegie, Pennsylvania 15106-4304 1165S: Carnegie, Pennsylvania 15106-4304
1166S: USA 1166S: USA
1167 1167
1168N: Kai Germaschewski
1169E: kai@germaschewski.name
1170D: Major kbuild rework during the 2.5 cycle
1171D: ISDN Maintainer
1172S: USA
1173
1168N: Philip Gladstone 1174N: Philip Gladstone
1169E: philip@gladstonefamily.net 1175E: philip@gladstonefamily.net
1170D: Kernel / timekeeping stuff 1176D: Kernel / timekeeping stuff
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index e08ef8759a07..f099b814d383 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -276,41 +276,39 @@ more details, with real examples.
276 276
277--- 3.7 Compilation flags 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 287 ccflags-y specifies options for compiling C files with $(CC).
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 288
288 Example: 289 Example:
289 # drivers/sound/emu10k1/Makefile 290 # drivers/sound/emu10k1/Makefile
290 EXTRA_CFLAGS += -I$(obj) 291 ccflags-y += -I$(obj)
291 ifdef DEBUG 292 ccflags-$(DEBUG) += -DEMU10K1_DEBUG
292 EXTRA_CFLAGS += -DEMU10K1_DEBUG
293 endif
294 293
295 294
296 This variable is necessary because the top Makefile owns the 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 entire tree. 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 when compiling assembly language source. 300 when compiling assembly language source.
302 301
303 Example: 302 Example:
304 #arch/x86_64/kernel/Makefile 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 307 ldflags-y is a string for per-directory options to $(LD).
309 per-directory options to $(LD) and $(AR).
310 308
311 Example: 309 Example:
312 #arch/m68k/fpsp040/Makefile 310 #arch/m68k/fpsp040/Makefile
313 EXTRA_LDFLAGS := -x 311 ldflags-y := -x
314 312
315 CFLAGS_$@, AFLAGS_$@ 313 CFLAGS_$@, AFLAGS_$@
316 314
@@ -425,6 +423,7 @@ more details, with real examples.
425 as-instr checks if the assembler reports a specific instruction 423 as-instr checks if the assembler reports a specific instruction
426 and then outputs either option1 or option2 424 and then outputs either option1 or option2
427 C escapes are supported in the test instruction 425 C escapes are supported in the test instruction
426 Note: as-instr-option uses KBUILD_AFLAGS for $(AS) options
428 427
429 cc-option 428 cc-option
430 cc-option is used to check if $(CC) supports a given option, and not 429 cc-option is used to check if $(CC) supports a given option, and not
@@ -438,6 +437,7 @@ more details, with real examples.
438 -march=pentium-mmx if supported by $(CC), otherwise -march=i586. 437 -march=pentium-mmx if supported by $(CC), otherwise -march=i586.
439 The second argument to cc-option is optional, and if omitted, 438 The second argument to cc-option is optional, and if omitted,
440 cflags-y will be assigned no value if first option is not supported. 439 cflags-y will be assigned no value if first option is not supported.
440 Note: cc-option uses KBUILD_CFLAGS for $(CC) options
441 441
442 cc-option-yn 442 cc-option-yn
443 cc-option-yn is used to check if gcc supports a given option 443 cc-option-yn is used to check if gcc supports a given option
@@ -453,6 +453,7 @@ more details, with real examples.
453 option. When $(biarch) equals 'y', the expanded variables $(aflags-y) 453 option. When $(biarch) equals 'y', the expanded variables $(aflags-y)
454 and $(cflags-y) will be assigned the values -a32 and -m32, 454 and $(cflags-y) will be assigned the values -a32 and -m32,
455 respectively. 455 respectively.
456 Note: cc-option-yn uses KBUILD_CFLAGS for $(CC) options
456 457
457 cc-option-align 458 cc-option-align
458 gcc versions >= 3.0 changed the type of options used to specify 459 gcc versions >= 3.0 changed the type of options used to specify
@@ -464,10 +465,11 @@ more details, with real examples.
464 cc-option-align = -falign 465 cc-option-align = -falign
465 466
466 Example: 467 Example:
467 CFLAGS += $(cc-option-align)-functions=4 468 KBUILD_CFLAGS += $(cc-option-align)-functions=4
468 469
469 In the above example, the option -falign-functions=4 is used for 470 In the above example, the option -falign-functions=4 is used for
470 gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used. 471 gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used.
472 Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options
471 473
472 cc-version 474 cc-version
473 cc-version returns a numerical version of the $(CC) compiler version. 475 cc-version returns a numerical version of the $(CC) compiler version.
@@ -492,9 +494,9 @@ more details, with real examples.
492 494
493 Example: 495 Example:
494 #fs/reiserfs/Makefile 496 #fs/reiserfs/Makefile
495 EXTRA_CFLAGS := $(call cc-ifversion, -lt, 0402, -O1) 497 ccflags-y := $(call cc-ifversion, -lt, 0402, -O1)
496 498
497 In this example, EXTRA_CFLAGS will be assigned the value -O1 if the 499 In this example, ccflags-y will be assigned the value -O1 if the
498 $(CC) version is less than 4.2. 500 $(CC) version is less than 4.2.
499 cc-ifversion takes all the shell operators: 501 cc-ifversion takes all the shell operators:
500 -eq, -ne, -lt, -le, -gt, and -ge 502 -eq, -ne, -lt, -le, -gt, and -ge
@@ -780,8 +782,8 @@ When kbuild executes, the following steps are followed (roughly):
780 Example: 782 Example:
781 #arch/s390/Makefile 783 #arch/s390/Makefile
782 LDFLAGS := -m elf_s390 784 LDFLAGS := -m elf_s390
783 Note: EXTRA_LDFLAGS and LDFLAGS_$@ can be used to further customise 785 Note: ldflags-y can be used to further customise
784 the flags used. See chapter 7. 786 the flags used. See chapter 3.7.
785 787
786 LDFLAGS_MODULE Options for $(LD) when linking modules 788 LDFLAGS_MODULE Options for $(LD) when linking modules
787 789
@@ -817,26 +819,26 @@ When kbuild executes, the following steps are followed (roughly):
817 In this example, the binary $(obj)/image is a binary version of 819 In this example, the binary $(obj)/image is a binary version of
818 vmlinux. The usage of $(call if_changed,xxx) will be described later. 820 vmlinux. The usage of $(call if_changed,xxx) will be described later.
819 821
820 AFLAGS $(AS) assembler flags 822 KBUILD_AFLAGS $(AS) assembler flags
821 823
822 Default value - see top level Makefile 824 Default value - see top level Makefile
823 Append or modify as required per architecture. 825 Append or modify as required per architecture.
824 826
825 Example: 827 Example:
826 #arch/sparc64/Makefile 828 #arch/sparc64/Makefile
827 AFLAGS += -m64 -mcpu=ultrasparc 829 KBUILD_AFLAGS += -m64 -mcpu=ultrasparc
828 830
829 CFLAGS $(CC) compiler flags 831 KBUILD_CFLAGS $(CC) compiler flags
830 832
831 Default value - see top level Makefile 833 Default value - see top level Makefile
832 Append or modify as required per architecture. 834 Append or modify as required per architecture.
833 835
834 Often, the CFLAGS variable depends on the configuration. 836 Often, the KBUILD_CFLAGS variable depends on the configuration.
835 837
836 Example: 838 Example:
837 #arch/i386/Makefile 839 #arch/i386/Makefile
838 cflags-$(CONFIG_M386) += -march=i386 840 cflags-$(CONFIG_M386) += -march=i386
839 CFLAGS += $(cflags-y) 841 KBUILD_CFLAGS += $(cflags-y)
840 842
841 Many arch Makefiles dynamically run the target C compiler to 843 Many arch Makefiles dynamically run the target C compiler to
842 probe supported options: 844 probe supported options:
@@ -848,7 +850,7 @@ When kbuild executes, the following steps are followed (roughly):
848 -march=pentium2,-march=i686) 850 -march=pentium2,-march=i686)
849 ... 851 ...
850 # Disable unit-at-a-time mode ... 852 # Disable unit-at-a-time mode ...
851 CFLAGS += $(call cc-option,-fno-unit-at-a-time) 853 KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time)
852 ... 854 ...
853 855
854 856
@@ -1096,8 +1098,8 @@ When kbuild executes, the following steps are followed (roughly):
1096 specified options when building the target vmlinux.lds. 1098 specified options when building the target vmlinux.lds.
1097 1099
1098 When building the *.lds target, kbuild uses the variables: 1100 When building the *.lds target, kbuild uses the variables:
1099 CPPFLAGS : Set in top-level Makefile 1101 KBUILD_CPPFLAGS : Set in top-level Makefile
1100 EXTRA_CPPFLAGS : May be set in the kbuild makefile 1102 cppflags-y : May be set in the kbuild makefile
1101 CPPFLAGS_$(@F) : Target specific flags. 1103 CPPFLAGS_$(@F) : Target specific flags.
1102 Note that the full filename is used in this 1104 Note that the full filename is used in this
1103 assignment. 1105 assignment.
diff --git a/MAINTAINERS b/MAINTAINERS
index 1315cca8fc5f..cc3b233ccaca 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2138,8 +2138,6 @@ S: Maintained
2138ISDN SUBSYSTEM 2138ISDN SUBSYSTEM
2139P: Karsten Keil 2139P: Karsten Keil
2140M: kkeil@suse.de 2140M: kkeil@suse.de
2141P: Kai Germaschewski
2142M: kai.germaschewski@gmx.de
2143L: isdn4linux@listserv.isdn4linux.de 2141L: isdn4linux@listserv.isdn4linux.de
2144W: http://www.isdn4linux.de 2142W: http://www.isdn4linux.de
2145T: git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git 2143T: git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git
@@ -2208,8 +2206,6 @@ L: autofs@linux.kernel.org
2208S: Maintained 2206S: Maintained
2209 2207
2210KERNEL BUILD (kbuild: Makefile, scripts/Makefile.*) 2208KERNEL BUILD (kbuild: Makefile, scripts/Makefile.*)
2211P: Kai Germaschewski
2212M: kai@germaschewski.name
2213P: Sam Ravnborg 2209P: Sam Ravnborg
2214M: sam@ravnborg.org 2210M: sam@ravnborg.org
2215T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git 2211T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git
diff --git a/Makefile b/Makefile
index 1274084c9090..ed65de7078c7 100644
--- a/Makefile
+++ b/Makefile
@@ -115,13 +115,20 @@ saved-output := $(KBUILD_OUTPUT)
115KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) 115KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
116$(if $(KBUILD_OUTPUT),, \ 116$(if $(KBUILD_OUTPUT),, \
117 $(error output directory "$(saved-output)" does not exist)) 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
119PHONY += $(MAKECMDGOALS) 122PHONY += $(MAKECMDGOALS) sub-make
120 123
121$(filter-out _all,$(MAKECMDGOALS)) _all: 124$(filter-out _all sub-make,$(MAKECMDGOALS)) _all: sub-make
125 $(Q)@:
126
127sub-make: FORCE
122 $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ 128 $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
123 KBUILD_SRC=$(CURDIR) \ 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# Leave processing to above invocation of make 133# Leave processing to above invocation of make
127skip-makefile := 1 134skip-makefile := 1
@@ -311,12 +318,12 @@ LINUXINCLUDE := -Iinclude \
311 $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \ 318 $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
312 -include include/linux/autoconf.h 319 -include include/linux/autoconf.h
313 320
314CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) 321KBUILD_CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
315 322
316CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 323KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
317 -fno-strict-aliasing -fno-common \ 324 -fno-strict-aliasing -fno-common \
318 -Werror-implicit-function-declaration 325 -Werror-implicit-function-declaration
319AFLAGS := -D__ASSEMBLY__ 326KBUILD_AFLAGS := -D__ASSEMBLY__
320 327
321# Read KERNELRELEASE from include/config/kernel.release (if it exists) 328# Read KERNELRELEASE from include/config/kernel.release (if it exists)
322KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) 329KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
@@ -327,9 +334,9 @@ export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
327export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE 334export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
328export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 335export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
329 336
330export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 337export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
331export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 338export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
332export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE 339export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
333 340
334# When compiling out-of-tree modules, put MODVERDIR in the module 341# When compiling out-of-tree modules, put MODVERDIR in the module
335# tree rather than in the kernel tree. The kernel tree might 342# tree rather than in the kernel tree. The kernel tree might
@@ -485,35 +492,41 @@ endif # $(dot-config)
485all: vmlinux 492all: vmlinux
486 493
487ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 494ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
488CFLAGS += -Os 495KBUILD_CFLAGS += -Os
489else 496else
490CFLAGS += -O2 497KBUILD_CFLAGS += -O2
491endif 498endif
492 499
493include $(srctree)/arch/$(ARCH)/Makefile 500include $(srctree)/arch/$(ARCH)/Makefile
494 501
495ifdef CONFIG_FRAME_POINTER 502ifdef CONFIG_FRAME_POINTER
496CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 503KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
497else 504else
498CFLAGS += -fomit-frame-pointer 505KBUILD_CFLAGS += -fomit-frame-pointer
499endif 506endif
500 507
501ifdef CONFIG_DEBUG_INFO 508ifdef CONFIG_DEBUG_INFO
502CFLAGS += -g 509KBUILD_CFLAGS += -g
510KBUILD_AFLAGS += -gdwarf-2
503endif 511endif
504 512
505# Force gcc to behave correct even for buggy distributions 513# Force gcc to behave correct even for buggy distributions
506CFLAGS += $(call cc-option, -fno-stack-protector) 514KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
507 515
508# arch Makefile may override CC so keep this after arch Makefile is included 516# arch Makefile may override CC so keep this after arch Makefile is included
509NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) 517NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
510CHECKFLAGS += $(NOSTDINC_FLAGS) 518CHECKFLAGS += $(NOSTDINC_FLAGS)
511 519
512# warn about C99 declaration after statement 520# warn about C99 declaration after statement
513CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) 521KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
514 522
515# disable pointer signed / unsigned warnings in gcc 4.0 523# disable pointer signed / unsigned warnings in gcc 4.0
516CFLAGS += $(call cc-option,-Wno-pointer-sign,) 524KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
525
526# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
527KBUILD_CPPFLAGS += $(CPPFLAGS)
528KBUILD_AFLAGS += $(AFLAGS)
529KBUILD_CFLAGS += $(CFLAGS)
517 530
518# Use --build-id when available. 531# Use --build-id when available.
519LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ 532LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
@@ -1149,6 +1162,7 @@ help:
1149 @echo 'Static analysers' 1162 @echo 'Static analysers'
1150 @echo ' checkstack - Generate a list of stack hogs' 1163 @echo ' checkstack - Generate a list of stack hogs'
1151 @echo ' namespacecheck - Name space analysis on compiled kernel' 1164 @echo ' namespacecheck - Name space analysis on compiled kernel'
1165 @echo ' export_report - List the usages of all exported symbols'
1152 @if [ -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \ 1166 @if [ -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \
1153 echo ' headers_check - Sanity check on exported headers'; \ 1167 echo ' headers_check - Sanity check on exported headers'; \
1154 fi 1168 fi
@@ -1255,8 +1269,10 @@ $(clean-dirs):
1255 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1269 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1256 1270
1257clean: rm-dirs := $(MODVERDIR) 1271clean: rm-dirs := $(MODVERDIR)
1272clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
1258clean: $(clean-dirs) 1273clean: $(clean-dirs)
1259 $(call cmd,rmdirs) 1274 $(call cmd,rmdirs)
1275 $(call cmd,rmfiles)
1260 @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ 1276 @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
1261 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ 1277 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1262 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ 1278 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
@@ -1411,6 +1427,9 @@ versioncheck:
1411namespacecheck: 1427namespacecheck:
1412 $(PERL) $(srctree)/scripts/namespace.pl 1428 $(PERL) $(srctree)/scripts/namespace.pl
1413 1429
1430export_report:
1431 $(PERL) $(srctree)/scripts/export_report.pl
1432
1414endif #ifeq ($(config-targets),1) 1433endif #ifeq ($(config-targets),1)
1415endif #ifeq ($(mixed-targets),1) 1434endif #ifeq ($(mixed-targets),1)
1416 1435
@@ -1488,8 +1507,8 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))
1488 cmd_rmfiles = rm -f $(rm-files) 1507 cmd_rmfiles = rm -f $(rm-files)
1489 1508
1490 1509
1491a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ 1510a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \
1492 $(NOSTDINC_FLAGS) $(CPPFLAGS) \ 1511 $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
1493 $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) 1512 $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o)
1494 1513
1495quiet_cmd_as_o_S = AS $@ 1514quiet_cmd_as_o_S = AS $@
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile
index d1004b4d942f..63104ebd1806 100644
--- a/arch/alpha/Makefile
+++ b/arch/alpha/Makefile
@@ -33,7 +33,7 @@ cflags-y += $(cpuflags-y)
33# For TSUNAMI, we must have the assembler not emulate our instructions. 33# For TSUNAMI, we must have the assembler not emulate our instructions.
34# The same is true for IRONGATE, POLARIS, PYXIS. 34# The same is true for IRONGATE, POLARIS, PYXIS.
35# BWX is most important, but we don't really want any emulation ever. 35# BWX is most important, but we don't really want any emulation ever.
36CFLAGS += $(cflags-y) -Wa,-mev6 36KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6
37 37
38head-y := arch/alpha/kernel/head.o 38head-y := arch/alpha/kernel/head.o
39 39
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index ab6fa54b3860..dccf05245d4d 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5extra-y := head.o vmlinux.lds 5extra-y := head.o vmlinux.lds
6EXTRA_AFLAGS := $(CFLAGS) 6EXTRA_AFLAGS := $(KBUILD_CFLAGS)
7EXTRA_CFLAGS := -Werror -Wno-sign-compare 7EXTRA_CFLAGS := -Werror -Wno-sign-compare
8 8
9obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ 9obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile
index 266f78e13076..9b72c59c95be 100644
--- a/arch/alpha/lib/Makefile
+++ b/arch/alpha/lib/Makefile
@@ -2,7 +2,7 @@
2# Makefile for alpha-specific library files.. 2# Makefile for alpha-specific library files..
3# 3#
4 4
5EXTRA_AFLAGS := $(CFLAGS) 5EXTRA_AFLAGS := $(KBUILD_CFLAGS)
6EXTRA_CFLAGS := -Werror 6EXTRA_CFLAGS := -Werror
7 7
8# Many of these routines have implementations tuned for ev6. 8# Many of these routines have implementations tuned for ev6.
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 6c2d539cd22b..35e56c99ad1d 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -14,9 +14,9 @@ LDFLAGS_vmlinux :=-p --no-undefined -X
14CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) 14CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
15OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 15OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
16GZFLAGS :=-9 16GZFLAGS :=-9
17#CFLAGS +=-pipe 17#KBUILD_CFLAGS +=-pipe
18# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: 18# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
19CFLAGS +=$(call cc-option,-marm,) 19KBUILD_CFLAGS +=$(call cc-option,-marm,)
20 20
21# Do not use arch/arm/defconfig - it's always outdated. 21# Do not use arch/arm/defconfig - it's always outdated.
22# Select a platform tht is kept up-to-date 22# Select a platform tht is kept up-to-date
@@ -28,15 +28,15 @@ MMUEXT := -nommu
28endif 28endif
29 29
30ifeq ($(CONFIG_FRAME_POINTER),y) 30ifeq ($(CONFIG_FRAME_POINTER),y)
31CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog 31KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
32endif 32endif
33 33
34ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 34ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
35CPPFLAGS += -mbig-endian 35KBUILD_CPPFLAGS += -mbig-endian
36AS += -EB 36AS += -EB
37LD += -EB 37LD += -EB
38else 38else
39CPPFLAGS += -mlittle-endian 39KBUILD_CPPFLAGS += -mlittle-endian
40AS += -EL 40AS += -EL
41LD += -EL 41LD += -EL
42endif 42endif
@@ -85,8 +85,8 @@ CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-th
85endif 85endif
86 86
87# Need -Uarm for gcc < 3.x 87# Need -Uarm for gcc < 3.x
88CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 88KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
89AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 89KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float
90 90
91CHECKFLAGS += -D__arm__ 91CHECKFLAGS += -D__arm__
92 92
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 6b8cbd69f249..5fde99f9d9f9 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -87,7 +87,7 @@ ifneq ($(PARAMS_PHYS),)
87LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) 87LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS)
88endif 88endif
89LDFLAGS_vmlinux += -p --no-undefined -X \ 89LDFLAGS_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# Don't allow any static data in misc.o, which 92# Don't allow any static data in misc.o, which
93# would otherwise mess up our GOT table 93# would otherwise mess up our GOT table
diff --git a/arch/arm/vfp/Makefile b/arch/arm/vfp/Makefile
index 7e136e77971a..39f6d8e1af73 100644
--- a/arch/arm/vfp/Makefile
+++ b/arch/arm/vfp/Makefile
@@ -7,7 +7,7 @@
7# EXTRA_CFLAGS := -DDEBUG 7# EXTRA_CFLAGS := -DDEBUG
8# EXTRA_AFLAGS := -DDEBUG 8# EXTRA_AFLAGS := -DDEBUG
9 9
10AFLAGS :=$(AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) 10KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp)
11LDFLAGS +=--no-warn-mismatch 11LDFLAGS +=--no-warn-mismatch
12 12
13obj-y += vfp.o 13obj-y += vfp.o
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile
index dc6bc01f232c..87918647be6d 100644
--- a/arch/avr32/Makefile
+++ b/arch/avr32/Makefile
@@ -11,15 +11,15 @@ all: uImage vmlinux.elf
11 11
12KBUILD_DEFCONFIG := atstk1002_defconfig 12KBUILD_DEFCONFIG := atstk1002_defconfig
13 13
14CFLAGS += -pipe -fno-builtin -mno-pic 14KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
15AFLAGS += -mrelax -mno-pic 15KBUILD_AFLAGS += -mrelax -mno-pic
16CFLAGS_MODULE += -mno-relax 16CFLAGS_MODULE += -mno-relax
17LDFLAGS_vmlinux += --relax 17LDFLAGS_vmlinux += --relax
18 18
19cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 19cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000
20 20
21CFLAGS += $(cpuflags-y) 21KBUILD_CFLAGS += $(cpuflags-y)
22AFLAGS += $(cpuflags-y) 22KBUILD_AFLAGS += $(cpuflags-y)
23 23
24CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN 24CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN
25 25
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index b24f4535ffe0..aa9db3073312 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -758,7 +758,7 @@ config BFIN_DMA_5XX
758choice 758choice
759 prompt "Uncached SDRAM region" 759 prompt "Uncached SDRAM region"
760 default DMA_UNCACHED_1M 760 default DMA_UNCACHED_1M
761 depends BFIN_DMA_5XX 761 depends on BFIN_DMA_5XX
762config DMA_UNCACHED_2M 762config DMA_UNCACHED_2M
763 bool "Enable 2M DMA region" 763 bool "Enable 2M DMA region"
764config DMA_UNCACHED_1M 764config DMA_UNCACHED_1M
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 20841663270f..368933760d28 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -53,8 +53,8 @@ rev-$(CONFIG_BF_REV_0_5) := 0.5
53rev-$(CONFIG_BF_REV_NONE) := none 53rev-$(CONFIG_BF_REV_NONE) := none
54rev-$(CONFIG_BF_REV_ANY) := any 54rev-$(CONFIG_BF_REV_ANY) := any
55 55
56CFLAGS += -mcpu=$(cpu-y)-$(rev-y) 56KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
57AFLAGS += -mcpu=$(cpu-y)-$(rev-y) 57KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
58 58
59head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o 59head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
60 60
diff --git a/arch/cris/Makefile b/arch/cris/Makefile
index ee114699ef8e..e6bf00c262e0 100644
--- a/arch/cris/Makefile
+++ b/arch/cris/Makefile
@@ -29,18 +29,18 @@ LD = $(CROSS_COMPILE)ld -mcrislinux
29OBJCOPYFLAGS := -O binary -R .note -R .comment -S 29OBJCOPYFLAGS := -O binary -R .note -R .comment -S
30 30
31CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) 31CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
32AFLAGS += -mlinux 32KBUILD_AFLAGS += -mlinux
33 33
34CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe 34KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe
35 35
36ifdef CONFIG_FRAME_POINTER 36ifdef CONFIG_FRAME_POINTER
37CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g 37KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
38CFLAGS += -fno-omit-frame-pointer 38KBUILD_CFLAGS += -fno-omit-frame-pointer
39endif 39endif
40 40
41head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o 41head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o
42 42
43LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a) 43LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a)
44 44
45core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ 45core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
46core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ 46core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/
diff --git a/arch/frv/Makefile b/arch/frv/Makefile
index 9bf7345c5cc9..310c47a663f8 100644
--- a/arch/frv/Makefile
+++ b/arch/frv/Makefile
@@ -39,13 +39,13 @@ endif
39ARCHMODFLAGS += -G0 -mlong-calls 39ARCHMODFLAGS += -G0 -mlong-calls
40 40
41ifdef CONFIG_GPREL_DATA_8 41ifdef CONFIG_GPREL_DATA_8
42CFLAGS += -G8 42KBUILD_CFLAGS += -G8
43else 43else
44ifdef CONFIG_GPREL_DATA_4 44ifdef CONFIG_GPREL_DATA_4
45CFLAGS += -G4 45KBUILD_CFLAGS += -G4
46else 46else
47ifdef CONFIG_GPREL_DATA_NONE 47ifdef CONFIG_GPREL_DATA_NONE
48CFLAGS += -G0 48KBUILD_CFLAGS += -G0
49endif 49endif
50endif 50endif
51endif 51endif
@@ -53,26 +53,26 @@ endif
53#LDFLAGS_vmlinux := -Map linkmap.txt 53#LDFLAGS_vmlinux := -Map linkmap.txt
54 54
55ifdef CONFIG_GC_SECTIONS 55ifdef CONFIG_GC_SECTIONS
56CFLAGS += -ffunction-sections -fdata-sections 56KBUILD_CFLAGS += -ffunction-sections -fdata-sections
57LINKFLAGS += --gc-sections 57LINKFLAGS += --gc-sections
58endif 58endif
59 59
60ifndef CONFIG_FRAME_POINTER 60ifndef CONFIG_FRAME_POINTER
61CFLAGS += -mno-linked-fp 61KBUILD_CFLAGS += -mno-linked-fp
62endif 62endif
63 63
64ifdef CONFIG_CPU_FR451_COMPILE 64ifdef CONFIG_CPU_FR451_COMPILE
65CFLAGS += -mcpu=fr450 65KBUILD_CFLAGS += -mcpu=fr450
66AFLAGS += -mcpu=fr450 66KBUILD_AFLAGS += -mcpu=fr450
67ASFLAGS += -mcpu=fr450 67ASFLAGS += -mcpu=fr450
68else 68else
69ifdef CONFIG_CPU_FR551_COMPILE 69ifdef CONFIG_CPU_FR551_COMPILE
70CFLAGS += -mcpu=fr550 70KBUILD_CFLAGS += -mcpu=fr550
71AFLAGS += -mcpu=fr550 71KBUILD_AFLAGS += -mcpu=fr550
72ASFLAGS += -mcpu=fr550 72ASFLAGS += -mcpu=fr550
73else 73else
74CFLAGS += -mcpu=fr400 74KBUILD_CFLAGS += -mcpu=fr400
75AFLAGS += -mcpu=fr400 75KBUILD_AFLAGS += -mcpu=fr400
76ASFLAGS += -mcpu=fr400 76ASFLAGS += -mcpu=fr400
77endif 77endif
78endif 78endif
@@ -80,16 +80,16 @@ endif
80# pretend the kernel is going to run on an FR400 with no media-fp unit 80# pretend the kernel is going to run on an FR400 with no media-fp unit
81# - reserve CC3 for use with atomic ops 81# - reserve CC3 for use with atomic ops
82# - all the extra registers are dealt with only at context switch time 82# - all the extra registers are dealt with only at context switch time
83CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media 83KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media
84CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 84KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2
85AFLAGS += -mno-fdpic 85KBUILD_AFLAGS += -mno-fdpic
86ASFLAGS += -mno-fdpic 86ASFLAGS += -mno-fdpic
87 87
88# make sure the .S files get compiled with debug info 88# make sure the .S files get compiled with debug info
89# and disable optimisations that are unhelpful whilst debugging 89# and disable optimisations that are unhelpful whilst debugging
90ifdef CONFIG_DEBUG_INFO 90ifdef CONFIG_DEBUG_INFO
91#CFLAGS += -O1 91#KBUILD_CFLAGS += -O1
92AFLAGS += -Wa,--gdwarf2 92KBUILD_AFLAGS += -Wa,--gdwarf2
93ASFLAGS += -Wa,--gdwarf2 93ASFLAGS += -Wa,--gdwarf2
94endif 94endif
95 95
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index 53b5c1edf596..a556447877b4 100644
--- a/arch/h8300/Makefile
+++ b/arch/h8300/Makefile
@@ -30,16 +30,16 @@ ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf
30cflags-$(CONFIG_CPU_H8S) := -ms 30cflags-$(CONFIG_CPU_H8S) := -ms
31ldflags-$(CONFIG_CPU_H8S) := -mh8300self 31ldflags-$(CONFIG_CPU_H8S) := -mh8300self
32 32
33CFLAGS += $(cflags-y) 33KBUILD_CFLAGS += $(cflags-y)
34CFLAGS += -mint32 -fno-builtin 34KBUILD_CFLAGS += -mint32 -fno-builtin
35CFLAGS += -g 35KBUILD_CFLAGS += -g
36CFLAGS += -D__linux__ 36KBUILD_CFLAGS += -D__linux__
37CFLAGS += -DUTS_SYSNAME=\"uClinux\" 37KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
38AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) 38KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y)
39LDFLAGS += $(ldflags-y) 39LDFLAGS += $(ldflags-y)
40 40
41CROSS_COMPILE = h8300-elf- 41CROSS_COMPILE = h8300-elf-
42LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name) 42LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
43 43
44head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o 44head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o
45 45
diff --git a/arch/h8300/lib/Makefile b/arch/h8300/lib/Makefile
index 98272b66f4e5..1577f5075b10 100644
--- a/arch/h8300/lib/Makefile
+++ b/arch/h8300/lib/Makefile
@@ -2,7 +2,4 @@
2# Makefile for H8/300-specific library files.. 2# Makefile for H8/300-specific library files..
3# 3#
4 4
5.S.o:
6 $(CC) $(AFLAGS) -D__ASSEMBLY__ -c $< -o $@
7
8lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o 5lib-y = ashrdi3.o checksum.o memcpy.o memset.o abs.o romfs.o
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index 5e50dbf00f3e..f036d2dee3de 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -34,10 +34,10 @@ LDFLAGS_vmlinux := --emit-relocs
34endif 34endif
35CHECKFLAGS += -D__i386__ 35CHECKFLAGS += -D__i386__
36 36
37CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return 37KBUILD_CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return
38 38
39# prevent gcc from keeping the stack 16 byte aligned 39# prevent gcc from keeping the stack 16 byte aligned
40CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 40KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
41 41
42# CPU-specific tuning. Anything which can be shared with UML should go here. 42# CPU-specific tuning. Anything which can be shared with UML should go here.
43include $(srctree)/arch/i386/Makefile.cpu 43include $(srctree)/arch/i386/Makefile.cpu
@@ -51,17 +51,17 @@ cflags-y += -maccumulate-outgoing-args
51 51
52# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use 52# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
53# a lot more stack due to the lack of sharing of stacklots: 53# a lot more stack due to the lack of sharing of stacklots:
54CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) 54KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
55 55
56# do binutils support CFI? 56# do binutils support CFI?
57cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 57cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
58AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 58KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
59 59
60# is .cfi_signal_frame supported too? 60# is .cfi_signal_frame supported too?
61cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 61cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
62AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 62KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
63 63
64CFLAGS += $(cflags-y) 64KBUILD_CFLAGS += $(cflags-y)
65 65
66# Default subarch .c files 66# Default subarch .c files
67mcore-y := arch/x86/mach-default 67mcore-y := arch/x86/mach-default
@@ -116,8 +116,8 @@ drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/
116drivers-$(CONFIG_PM) += arch/x86/power/ 116drivers-$(CONFIG_PM) += arch/x86/power/
117drivers-$(CONFIG_FB) += arch/x86/video/ 117drivers-$(CONFIG_FB) += arch/x86/video/
118 118
119CFLAGS += $(mflags-y) 119KBUILD_CFLAGS += $(mflags-y)
120AFLAGS += $(mflags-y) 120KBUILD_AFLAGS += $(mflags-y)
121 121
122boot := arch/x86/boot 122boot := arch/x86/boot
123 123
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 21033ed83307..34951aa2370b 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -29,7 +29,7 @@ cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
29CFLAGS_KERNEL := -mconstant-gp 29CFLAGS_KERNEL := -mconstant-gp
30 30
31GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") 31GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
32CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") 32KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
33 33
34ifeq ($(GAS_STATUS),buggy) 34ifeq ($(GAS_STATUS),buggy)
35$(error Sorry, you need a newer version of the assember, one that is built from \ 35$(error Sorry, you need a newer version of the assember, one that is built from \
@@ -44,7 +44,7 @@ ifeq ($(call cc-version),0304)
44 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley 44 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
45endif 45endif
46 46
47CFLAGS += $(cflags-y) 47KBUILD_CFLAGS += $(cflags-y)
48head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o 48head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
49 49
50libs-y += arch/ia64/lib/ 50libs-y += arch/ia64/lib/
diff --git a/arch/ia64/sn/kernel/Makefile b/arch/ia64/sn/kernel/Makefile
index 0a59371d3475..688a3c27e0f6 100644
--- a/arch/ia64/sn/kernel/Makefile
+++ b/arch/ia64/sn/kernel/Makefile
@@ -7,7 +7,7 @@
7# Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All Rights Reserved. 7# Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All Rights Reserved.
8# 8#
9 9
10CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 10EXTRA_CFLAGS += -Iarch/ia64/sn/include
11 11
12obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ 12obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \
13 huberror.o io_acpi_init.o io_common.o \ 13 huberror.o io_acpi_init.o io_common.o \
diff --git a/arch/ia64/sn/kernel/sn2/Makefile b/arch/ia64/sn/kernel/sn2/Makefile
index 99e177693234..08e6565dc908 100644
--- a/arch/ia64/sn/kernel/sn2/Makefile
+++ b/arch/ia64/sn/kernel/sn2/Makefile
@@ -9,7 +9,7 @@
9# sn2 specific kernel files 9# sn2 specific kernel files
10# 10#
11 11
12CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 12EXTRA_CFLAGS += -Iarch/ia64/sn/include
13 13
14obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ 14obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \
15 prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o 15 prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o
diff --git a/arch/ia64/sn/pci/Makefile b/arch/ia64/sn/pci/Makefile
index c6946784a6a8..ad4ef34dfe26 100644
--- a/arch/ia64/sn/pci/Makefile
+++ b/arch/ia64/sn/pci/Makefile
@@ -7,6 +7,6 @@
7# 7#
8# Makefile for the sn pci general routines. 8# Makefile for the sn pci general routines.
9 9
10CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 10EXTRA_CFLAGS += -Iarch/ia64/sn/include
11 11
12obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ 12obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/
diff --git a/arch/ia64/sn/pci/pcibr/Makefile b/arch/ia64/sn/pci/pcibr/Makefile
index 3b403ea456f9..01192d3247dd 100644
--- a/arch/ia64/sn/pci/pcibr/Makefile
+++ b/arch/ia64/sn/pci/pcibr/Makefile
@@ -7,7 +7,7 @@
7# 7#
8# Makefile for the sn2 io routines. 8# Makefile for the sn2 io routines.
9 9
10CPPFLAGS += -I$(srctree)/arch/ia64/sn/include 10EXTRA_CFLAGS += -Iarch/ia64/sn/include
11 11
12obj-y += pcibr_dma.o pcibr_reg.o \ 12obj-y += pcibr_dma.o pcibr_reg.o \
13 pcibr_ate.o pcibr_provider.o 13 pcibr_ate.o pcibr_provider.o
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile
index 60e12f312654..4072a07ebf8e 100644
--- a/arch/m32r/Makefile
+++ b/arch/m32r/Makefile
@@ -9,7 +9,7 @@ LDFLAGS :=
9OBJCOPYFLAGS := -O binary -R .note -R .comment -S 9OBJCOPYFLAGS := -O binary -R .note -R .comment -S
10LDFLAGS_vmlinux := 10LDFLAGS_vmlinux :=
11 11
12CFLAGS += -pipe -fno-schedule-insns 12KBUILD_CFLAGS += -pipe -fno-schedule-insns
13CFLAGS_KERNEL += -mmodel=medium 13CFLAGS_KERNEL += -mmodel=medium
14CFLAGS_MODULE += -mmodel=large 14CFLAGS_MODULE += -mmodel=large
15 15
@@ -24,14 +24,14 @@ endif
24cflags-$(CONFIG_ISA_M32R) += -DNO_FPU 24cflags-$(CONFIG_ISA_M32R) += -DNO_FPU
25aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst 25aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst
26 26
27CFLAGS += $(cflags-y) 27KBUILD_CFLAGS += $(cflags-y)
28AFLAGS += $(aflags-y) 28KBUILD_AFLAGS += $(aflags-y)
29 29
30CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 30CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1
31 31
32head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o 32head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
33 33
34LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 34LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
35 35
36libs-y += arch/m32r/lib/ $(LIBGCC) 36libs-y += arch/m32r/lib/ $(LIBGCC)
37core-y += arch/m32r/kernel/ \ 37core-y += arch/m32r/kernel/ \
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index aa383a5ea7ac..4a1bd44ff162 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -32,18 +32,18 @@ endif
32CHECKFLAGS += -D__mc68000__ 32CHECKFLAGS += -D__mc68000__
33 33
34# without -fno-strength-reduce the 53c7xx.c driver fails ;-( 34# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
35CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 35KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
36 36
37# enable processor switch if compiled only for a single cpu 37# enable processor switch if compiled only for a single cpu
38ifndef CONFIG_M68020 38ifndef CONFIG_M68020
39ifndef CONFIG_M68030 39ifndef CONFIG_M68030
40 40
41ifndef CONFIG_M68060 41ifndef CONFIG_M68060
42CFLAGS := $(CFLAGS) -m68040 42KBUILD_CFLAGS += -m68040
43endif 43endif
44 44
45ifndef CONFIG_M68040 45ifndef CONFIG_M68040
46CFLAGS := $(CFLAGS) -m68060 46KBUILD_CFLAGS += -m68060
47endif 47endif
48 48
49endif 49endif
@@ -52,7 +52,7 @@ endif
52ifdef CONFIG_KGDB 52ifdef CONFIG_KGDB
53# If configured for kgdb support, include debugging infos and keep the 53# If configured for kgdb support, include debugging infos and keep the
54# frame pointer 54# frame pointer
55CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g 55KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
56endif 56endif
57 57
58ifndef CONFIG_SUN3 58ifndef CONFIG_SUN3
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index 1305cc980023..92227aaaa26e 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -102,11 +102,11 @@ cflags-$(CONFIG_M68EZ328) := -m68000
102cflags-$(CONFIG_M68VZ328) := -m68000 102cflags-$(CONFIG_M68VZ328) := -m68000
103cflags-$(CONFIG_M68360) := -m68332 103cflags-$(CONFIG_M68360) := -m68332
104 104
105AFLAGS += $(cflags-y) 105KBUILD_AFLAGS += $(cflags-y)
106 106
107CFLAGS += $(cflags-y) 107KBUILD_CFLAGS += $(cflags-y)
108CFLAGS += -D__linux__ 108KBUILD_CFLAGS += -D__linux__
109CFLAGS += -DUTS_SYSNAME=\"uClinux\" 109KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
110 110
111head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o 111head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o
112 112
diff --git a/arch/m68knommu/platform/5206/Makefile b/arch/m68knommu/platform/5206/Makefile
index 701b7abe019d..c7bb0cef31a0 100644
--- a/arch/m68knommu/platform/5206/Makefile
+++ b/arch/m68knommu/platform/5206/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/5206e/Makefile b/arch/m68knommu/platform/5206e/Makefile
index 701b7abe019d..c7bb0cef31a0 100644
--- a/arch/m68knommu/platform/5206e/Makefile
+++ b/arch/m68knommu/platform/5206e/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/520x/Makefile b/arch/m68knommu/platform/520x/Makefile
index e861b05106bc..31b4eb51739d 100644
--- a/arch/m68knommu/platform/520x/Makefile
+++ b/arch/m68knommu/platform/520x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/523x/Makefile b/arch/m68knommu/platform/523x/Makefile
index c1578b016160..ac9fbece8a4f 100644
--- a/arch/m68knommu/platform/523x/Makefile
+++ b/arch/m68knommu/platform/523x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/5249/Makefile b/arch/m68knommu/platform/5249/Makefile
index 701b7abe019d..c7bb0cef31a0 100644
--- a/arch/m68knommu/platform/5249/Makefile
+++ b/arch/m68knommu/platform/5249/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/5272/Makefile b/arch/m68knommu/platform/5272/Makefile
index 0871a29dd589..7475c38c3b4e 100644
--- a/arch/m68knommu/platform/5272/Makefile
+++ b/arch/m68knommu/platform/5272/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/527x/Makefile b/arch/m68knommu/platform/527x/Makefile
index 0871a29dd589..7475c38c3b4e 100644
--- a/arch/m68knommu/platform/527x/Makefile
+++ b/arch/m68knommu/platform/527x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/528x/Makefile b/arch/m68knommu/platform/528x/Makefile
index 0871a29dd589..7475c38c3b4e 100644
--- a/arch/m68knommu/platform/528x/Makefile
+++ b/arch/m68knommu/platform/528x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile
index 719a313494bc..5b600530c8d2 100644
--- a/arch/m68knommu/platform/5307/Makefile
+++ b/arch/m68knommu/platform/5307/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-$(CONFIG_COLDFIRE) += entry.o vectors.o 19obj-$(CONFIG_COLDFIRE) += entry.o vectors.o
diff --git a/arch/m68knommu/platform/532x/Makefile b/arch/m68knommu/platform/532x/Makefile
index 12301803b9eb..475b92866a9b 100644
--- a/arch/m68knommu/platform/532x/Makefile
+++ b/arch/m68knommu/platform/532x/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19#obj-y := config.o usb-mcf532x.o spi-mcf532x.o 19#obj-y := config.o usb-mcf532x.o spi-mcf532x.o
diff --git a/arch/m68knommu/platform/5407/Makefile b/arch/m68knommu/platform/5407/Makefile
index 91b2f495dd39..68633b27df51 100644
--- a/arch/m68knommu/platform/5407/Makefile
+++ b/arch/m68knommu/platform/5407/Makefile
@@ -13,7 +13,7 @@
13# 13#
14 14
15ifdef CONFIG_FULLDEBUG 15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 16EXTRA_AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif 17endif
18 18
19obj-y := config.o 19obj-y := config.o
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index ebd5d02a7d78..6b663bec4752 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -608,14 +608,14 @@ ifdef CONFIG_64BIT
608 endif 608 endif
609endif 609endif
610 610
611AFLAGS += $(cflags-y) 611KBUILD_AFLAGS += $(cflags-y)
612CFLAGS += $(cflags-y) \ 612KBUILD_CFLAGS += $(cflags-y) \
613 -D"VMLINUX_LOAD_ADDRESS=$(load-y)" 613 -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
614 614
615LDFLAGS += -m $(ld-emul) 615LDFLAGS += -m $(ld-emul)
616 616
617ifdef CONFIG_MIPS 617ifdef CONFIG_MIPS
618CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \ 618CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \
619 egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ 619 egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
620 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/") 620 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
621ifdef CONFIG_64BIT 621ifdef CONFIG_64BIT
@@ -632,7 +632,7 @@ OBJCOPYFLAGS += --remove-section=.reginfo
632# 632#
633 633
634CPPFLAGS_vmlinux.lds := \ 634CPPFLAGS_vmlinux.lds := \
635 $(CFLAGS) \ 635 $(KBUILD_CFLAGS) \
636 -D"LOADADDR=$(load-y)" \ 636 -D"LOADADDR=$(load-y)" \
637 -D"JIFFIES=$(JIFFIES)" \ 637 -D"JIFFIES=$(JIFFIES)" \
638 -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)" 638 -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index a2689f93c160..95a356ef3910 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -71,7 +71,7 @@ obj-$(CONFIG_PCSPEAKER) += pcspeaker.o
71obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 71obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
72obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 72obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
73 73
74CFLAGS_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) 74CFLAGS_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
76obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o 76obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o
77 77
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 760567a9ba16..f3d0d7c70977 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -63,7 +63,7 @@ cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000
63 63
64head-y := arch/parisc/kernel/head.o 64head-y := arch/parisc/kernel/head.o
65 65
66CFLAGS += $(cflags-y) 66KBUILD_CFLAGS += $(cflags-y)
67 67
68kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o 68kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o
69kernel-$(CONFIG_HPUX) += hpux/ 69kernel-$(CONFIG_HPUX) += hpux/
diff --git a/arch/parisc/math-emu/Makefile b/arch/parisc/math-emu/Makefile
index affd4c80e3b7..1f3f225897f5 100644
--- a/arch/parisc/math-emu/Makefile
+++ b/arch/parisc/math-emu/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# See arch/parisc/math-emu/README 5# See arch/parisc/math-emu/README
6CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \ 6EXTRA_CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \
7 -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \ 7 -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \
8 -Wno-implicit-int 8 -Wno-implicit-int
9 9
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 464f9b4b3169..c939fe86a9e0 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -144,7 +144,7 @@ config BDI_SWITCH
144 144
145config BOOTX_TEXT 145config BOOTX_TEXT
146 bool "Support for early boot text console (BootX or OpenFirmware only)" 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 help 148 help
149 Say Y here to see progress messages from the boot firmware in text 149 Say Y here to see progress messages from the boot firmware in text
150 mode. Requires either BootX or Open Firmware. 150 mode. Requires either BootX or Open Firmware.
@@ -234,12 +234,12 @@ endchoice
234 234
235config PPC_EARLY_DEBUG_44x_PHYSLOW 235config PPC_EARLY_DEBUG_44x_PHYSLOW
236 hex "Low 32 bits of early debug UART physical address" 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 default "0x40000200" 238 default "0x40000200"
239 239
240config PPC_EARLY_DEBUG_44x_PHYSHIGH 240config PPC_EARLY_DEBUG_44x_PHYSHIGH
241 hex "EPRN of early debug UART physical address" 241 hex "EPRN of early debug UART physical address"
242 depends PPC_EARLY_DEBUG_44x 242 depends on PPC_EARLY_DEBUG_44x
243 default "0x1" 243 default "0x1"
244 244
245config PPC_EARLY_DEBUG_CPM_ADDR 245config PPC_EARLY_DEBUG_CPM_ADDR
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 643839a3f5d8..4e165342210a 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -75,10 +75,10 @@ CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
75AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) 75AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
76CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc 76CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
77CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple 77CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
78CPPFLAGS += $(CPPFLAGS-y) 78KBUILD_CPPFLAGS += $(CPPFLAGS-y)
79AFLAGS += $(AFLAGS-y) 79KBUILD_AFLAGS += $(AFLAGS-y)
80CFLAGS += -msoft-float -pipe $(CFLAGS-y) 80KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y)
81CPP = $(CC) -E $(CFLAGS) 81CPP = $(CC) -E $(KBUILD_CFLAGS)
82 82
83CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ 83CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
84 84
@@ -88,35 +88,35 @@ GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi
88ifeq ($(CONFIG_POWER4_ONLY),y) 88ifeq ($(CONFIG_POWER4_ONLY),y)
89ifeq ($(CONFIG_ALTIVEC),y) 89ifeq ($(CONFIG_ALTIVEC),y)
90ifeq ($(GCC_BROKEN_VEC),y) 90ifeq ($(GCC_BROKEN_VEC),y)
91 CFLAGS += $(call cc-option,-mcpu=970) 91 KBUILD_CFLAGS += $(call cc-option,-mcpu=970)
92else 92else
93 CFLAGS += $(call cc-option,-mcpu=power4) 93 KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
94endif 94endif
95else 95else
96 CFLAGS += $(call cc-option,-mcpu=power4) 96 KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
97endif 97endif
98else 98else
99 CFLAGS += $(call cc-option,-mtune=power4) 99 KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
100endif 100endif
101endif 101endif
102 102
103ifeq ($(CONFIG_TUNE_CELL),y) 103ifeq ($(CONFIG_TUNE_CELL),y)
104 CFLAGS += $(call cc-option,-mtune=cell) 104 KBUILD_CFLAGS += $(call cc-option,-mtune=cell)
105endif 105endif
106 106
107# No AltiVec instruction when building kernel 107# No AltiVec instruction when building kernel
108CFLAGS += $(call cc-option,-mno-altivec) 108KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
109 109
110# Enable unit-at-a-time mode when possible. It shrinks the 110# Enable unit-at-a-time mode when possible. It shrinks the
111# kernel considerably. 111# kernel considerably.
112CFLAGS += $(call cc-option,-funit-at-a-time) 112KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
113 113
114# Never use string load/store instructions as they are 114# Never use string load/store instructions as they are
115# often slow when they are implemented at all 115# often slow when they are implemented at all
116CFLAGS += -mno-string 116KBUILD_CFLAGS += -mno-string
117 117
118ifeq ($(CONFIG_6xx),y) 118ifeq ($(CONFIG_6xx),y)
119CFLAGS += -mcpu=powerpc 119KBUILD_CFLAGS += -mcpu=powerpc
120endif 120endif
121 121
122cpu-as-$(CONFIG_4xx) += -Wa,-m405 122cpu-as-$(CONFIG_4xx) += -Wa,-m405
@@ -125,8 +125,8 @@ cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
125cpu-as-$(CONFIG_E500) += -Wa,-me500 125cpu-as-$(CONFIG_E500) += -Wa,-me500
126cpu-as-$(CONFIG_E200) += -Wa,-me200 126cpu-as-$(CONFIG_E200) += -Wa,-me200
127 127
128AFLAGS += $(cpu-as-y) 128KBUILD_AFLAGS += $(cpu-as-y)
129CFLAGS += $(cpu-as-y) 129KBUILD_CFLAGS += $(cpu-as-y)
130 130
131head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o 131head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o
132head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o 132head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index cc6013ffc29a..186397f283bb 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -117,7 +117,7 @@ config RTAS_FLASH
117 117
118config PPC_PMI 118config PPC_PMI
119 tristate "Support for PMI" 119 tristate "Support for PMI"
120 depends PPC_IBM_CELL_BLADE 120 depends on PPC_IBM_CELL_BLADE
121 help 121 help
122 PMI (Platform Management Interrupt) is a way to 122 PMI (Platform Management Interrupt) is a way to
123 communicate with the BMC (Baseboard Mangement Controller). 123 communicate with the BMC (Baseboard Mangement Controller).
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index eee6264e8a04..95894ef7beaa 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -22,22 +22,22 @@ endif
22 22
23LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic 23LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic
24# The -Iarch/$(ARCH)/include is temporary while we are merging 24# The -Iarch/$(ARCH)/include is temporary while we are merging
25CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include 25KBUILD_CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include
26AFLAGS += -Iarch/$(ARCH) 26KBUILD_AFLAGS += -Iarch/$(ARCH)
27CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ 27KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \
28 -ffixed-r2 -mmultiple 28 -ffixed-r2 -mmultiple
29 29
30# No AltiVec instruction when building kernel 30# No AltiVec instruction when building kernel
31CFLAGS += $(call cc-option, -mno-altivec) 31KBUILD_CFLAGS += $(call cc-option, -mno-altivec)
32 32
33CPP = $(CC) -E $(CFLAGS) 33CPP = $(CC) -E $(KBUILD_CFLAGS)
34# Temporary hack until we have migrated to asm-powerpc 34# Temporary hack until we have migrated to asm-powerpc
35LINUXINCLUDE += -Iarch/$(ARCH)/include 35LINUXINCLUDE += -Iarch/$(ARCH)/include
36 36
37CHECKFLAGS += -D__powerpc__ 37CHECKFLAGS += -D__powerpc__
38 38
39ifndef CONFIG_FSL_BOOKE 39ifndef CONFIG_FSL_BOOKE
40CFLAGS += -mstring 40KBUILD_CFLAGS += -mstring
41endif 41endif
42 42
43cpu-as-$(CONFIG_4xx) += -Wa,-m405 43cpu-as-$(CONFIG_4xx) += -Wa,-m405
@@ -45,8 +45,8 @@ cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
45cpu-as-$(CONFIG_E500) += -Wa,-me500 45cpu-as-$(CONFIG_E500) += -Wa,-me500
46cpu-as-$(CONFIG_E200) += -Wa,-me200 46cpu-as-$(CONFIG_E200) += -Wa,-me200
47 47
48AFLAGS += $(cpu-as-y) 48KBUILD_AFLAGS += $(cpu-as-y)
49CFLAGS += $(cpu-as-y) 49KBUILD_CFLAGS += $(cpu-as-y)
50 50
51# Default to the common case. 51# Default to the common case.
52KBUILD_DEFCONFIG := common_defconfig 52KBUILD_DEFCONFIG := common_defconfig
diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile
index b739e25d4728..487dc66dcc74 100644
--- a/arch/ppc/boot/Makefile
+++ b/arch/ppc/boot/Makefile
@@ -13,7 +13,6 @@
13# modified by Cort (cort@cs.nmt.edu) 13# modified by Cort (cort@cs.nmt.edu)
14# 14#
15 15
16CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
17HOSTCFLAGS += -Iarch/$(ARCH)/boot/include 16HOSTCFLAGS += -Iarch/$(ARCH)/boot/include
18 17
19BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd 18BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 143ed8e154af..f708be367b03 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -15,16 +15,16 @@
15 15
16ifndef CONFIG_64BIT 16ifndef CONFIG_64BIT
17LDFLAGS := -m elf_s390 17LDFLAGS := -m elf_s390
18CFLAGS += -m31 18KBUILD_CFLAGS += -m31
19AFLAGS += -m31 19KBUILD_AFLAGS += -m31
20UTS_MACHINE := s390 20UTS_MACHINE := s390
21STACK_SIZE := 8192 21STACK_SIZE := 8192
22CHECKFLAGS += -D__s390__ -msize-long 22CHECKFLAGS += -D__s390__ -msize-long
23else 23else
24LDFLAGS := -m elf64_s390 24LDFLAGS := -m elf64_s390
25MODFLAGS += -fpic -D__PIC__ 25MODFLAGS += -fpic -D__PIC__
26CFLAGS += -m64 26KBUILD_CFLAGS += -m64
27AFLAGS += -m64 27KBUILD_AFLAGS += -m64
28UTS_MACHINE := s390x 28UTS_MACHINE := s390x
29STACK_SIZE := 16384 29STACK_SIZE := 16384
30CHECKFLAGS += -D__s390__ -D__s390x__ 30CHECKFLAGS += -D__s390__ -D__s390x__
@@ -77,9 +77,9 @@ cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack
77cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) 77cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE)
78endif 78endif
79 79
80CFLAGS += -mbackchain -msoft-float $(cflags-y) 80KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y)
81CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare 81KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
82AFLAGS += $(aflags-y) 82KBUILD_AFLAGS += $(aflags-y)
83 83
84OBJCOPYFLAGS := -O binary 84OBJCOPYFLAGS := -O binary
85LDFLAGS_vmlinux := -e start 85LDFLAGS_vmlinux := -e start
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index a0a2083aad3e..408342b175c8 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -91,12 +91,12 @@ LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4'
91LDFLAGS += -EB 91LDFLAGS += -EB
92endif 92endif
93 93
94CFLAGS += -pipe $(cflags-y) 94KBUILD_CFLAGS += -pipe $(cflags-y)
95AFLAGS += $(cflags-y) 95KBUILD_AFLAGS += $(cflags-y)
96 96
97head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o 97head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o
98 98
99LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 99LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
100 100
101core-y += arch/sh/kernel/ arch/sh/mm/ 101core-y += arch/sh/kernel/ arch/sh/mm/
102core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ 102core-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index 013504ae1122..906a13f82fe0 100644
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -21,7 +21,7 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
21 $(CONFIG_MEMORY_START) + \ 21 $(CONFIG_MEMORY_START) + \
22 $(CONFIG_BOOT_LINK_OFFSET)]') 22 $(CONFIG_BOOT_LINK_OFFSET)]')
23 23
24LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 24LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
25 25
26LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds 26LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
27 27
diff --git a/arch/sh64/Makefile b/arch/sh64/Makefile
index 8290c6380d7d..8dac7e1a2be6 100644
--- a/arch/sh64/Makefile
+++ b/arch/sh64/Makefile
@@ -26,7 +26,7 @@ LDFLAGS += -EB -mshelf32_linux
26endif 26endif
27 27
28# No requirements for endianess support from AFLAGS, 'as' always run through gcc 28# No requirements for endianess support from AFLAGS, 'as' always run through gcc
29CFLAGS += $(cpu-y) 29KBUILD_CFLAGS += $(cpu-y)
30 30
31LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ 31LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \
32 --defsym phys_stext_shmedia=phys_stext+1 \ 32 --defsym phys_stext_shmedia=phys_stext+1 \
@@ -58,7 +58,7 @@ ifneq ($(machine-y),)
58core-y += arch/sh64/mach-$(machine-y)/ 58core-y += arch/sh64/mach-$(machine-y)/
59endif 59endif
60 60
61LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 61LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
62libs-y += arch/$(ARCH)/lib/ $(LIBGCC) 62libs-y += arch/$(ARCH)/lib/ $(LIBGCC)
63 63
64drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/ 64drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index f33c3817f014..fef28e267a52 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -8,16 +8,16 @@
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# debugging of the kernel to get the proper debugging information. 12# debugging of the kernel to get the proper debugging information.
13 13
14AS := $(AS) -32 14AS := $(AS) -32
15LDFLAGS := -m elf32_sparc 15LDFLAGS := -m elf32_sparc
16CHECKFLAGS += -D__sparc__ 16CHECKFLAGS += -D__sparc__
17 17
18#CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7 18#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
19CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 19KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
20AFLAGS := $(AFLAGS) -m32 20KBUILD_AFLAGS += -m32
21 21
22#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 22#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
23# Since 2.5.40, the first stage is left not btfix-ed. 23# Since 2.5.40, the first stage is left not btfix-ed.
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
index cad10c5b83d3..6c92a42efe76 100644
--- a/arch/sparc64/Makefile
+++ b/arch/sparc64/Makefile
@@ -39,17 +39,17 @@ AS := $(AS) --undeclared-regs
39endif 39endif
40 40
41ifneq ($(NEW_GCC),y) 41ifneq ($(NEW_GCC),y)
42 CFLAGS := $(CFLAGS) -pipe -mno-fpu -mtune=ultrasparc -mmedlow \ 42 KBUILD_CFLAGS += -pipe -mno-fpu -mtune=ultrasparc -mmedlow \
43 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare 43 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare
44else 44else
45 CFLAGS := $(CFLAGS) -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ 45 KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
46 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ 46 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
47 $(CC_UNDECL) 47 $(CC_UNDECL)
48 AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) 48 KBUILD_AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
49endif 49endif
50 50
51ifeq ($(CONFIG_MCOUNT),y) 51ifeq ($(CONFIG_MCOUNT),y)
52 CFLAGS := $(CFLAGS) -pg 52 KBUILD_CFLAGS += -pg
53endif 53endif
54 54
55head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o 55head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o
diff --git a/arch/um/Makefile b/arch/um/Makefile
index ab22fdeedf29..82c2ac48040d 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -49,15 +49,15 @@ SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH)
49# 49#
50# These apply to USER_CFLAGS to. 50# These apply to USER_CFLAGS to.
51 51
52CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ 52KBUILD_CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
53 $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ 53 $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \
54 -Din6addr_loopback=kernel_in6addr_loopback \ 54 -Din6addr_loopback=kernel_in6addr_loopback \
55 -Din6addr_any=kernel_in6addr_any 55 -Din6addr_any=kernel_in6addr_any
56 56
57AFLAGS += $(ARCH_INCLUDE) 57KBUILD_AFLAGS += $(ARCH_INCLUDE)
58 58
59USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ 59USER_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 -D_FILE_OFFSET_BITS=64 61 -D_FILE_OFFSET_BITS=64
62 62
63include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) 63include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
@@ -67,14 +67,14 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
67 67
68# -Derrno=kernel_errno - This turns all kernel references to errno into 68# -Derrno=kernel_errno - This turns all kernel references to errno into
69# kernel_errno to separate them from the libc errno. This allows -fno-common 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# errnos. 71# errnos.
72# These apply to kernelspace only. 72# These apply to kernelspace only.
73 73
74KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ 74KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
75 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) 75 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)
76CFLAGS += $(KERNEL_DEFINES) 76KBUILD_CFLAGS += $(KERNEL_DEFINES)
77CFLAGS += $(call cc-option,-fno-unit-at-a-time,) 77KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
78 78
79# These are needed for clean and mrproper, since in that case .config is not 79# These are needed for clean and mrproper, since in that case .config is not
80# included; the values here are meaningless 80# included; the values here are meaningless
diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386
index ae61e3c271e2..0178df306939 100644
--- a/arch/um/Makefile-i386
+++ b/arch/um/Makefile-i386
@@ -12,8 +12,8 @@ HEADER_ARCH := x86
12 12
13ifeq ("$(origin SUBARCH)", "command line") 13ifeq ("$(origin SUBARCH)", "command line")
14ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") 14ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)")
15CFLAGS += $(call cc-option,-m32) 15KBUILD_CFLAGS += $(call cc-option,-m32)
16AFLAGS += $(call cc-option,-m32) 16KBUILD_AFLAGS += $(call cc-option,-m32)
17LINK-y += $(call cc-option,-m32) 17LINK-y += $(call cc-option,-m32)
18UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) 18UML_OBJCOPYFLAGS += -F $(ELF_FORMAT)
19 19
@@ -38,4 +38,4 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
38# an unresolved reference. 38# an unresolved reference.
39cflags-y += -ffreestanding 39cflags-y += -ffreestanding
40 40
41CFLAGS += $(cflags-y) 41KBUILD_CFLAGS += $(cflags-y)
diff --git a/arch/um/Makefile-os-Linux b/arch/um/Makefile-os-Linux
index 0c0f9a1cbbad..52859487c95d 100644
--- a/arch/um/Makefile-os-Linux
+++ b/arch/um/Makefile-os-Linux
@@ -5,4 +5,4 @@
5 5
6# To get a definition of F_SETSIG 6# To get a definition of F_SETSIG
7USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE 7USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
8CFLAGS += -D_LARGEFILE64_SOURCE 8KBUILD_CFLAGS += -D_LARGEFILE64_SOURCE
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64
index 8a00e5f6934c..fe5316f0c6a5 100644
--- a/arch/um/Makefile-x86_64
+++ b/arch/um/Makefile-x86_64
@@ -9,12 +9,12 @@ _extra_flags_ = -fno-builtin -m64
9#We #undef __x86_64__ for kernelspace, not for userspace where 9#We #undef __x86_64__ for kernelspace, not for userspace where
10#it's needed for headers to work! 10#it's needed for headers to work!
11ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ 11ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__
12CFLAGS += $(_extra_flags_) 12KBUILD_CFLAGS += $(_extra_flags_)
13 13
14CHECKFLAGS += -m64 14CHECKFLAGS += -m64
15AFLAGS += -m64 15KBUILD_AFLAGS += -m64
16LDFLAGS += -m elf_x86_64 16LDFLAGS += -m elf_x86_64
17CPPFLAGS += -m64 17KBUILD_CPPFLAGS += -m64
18 18
19ELF_ARCH := i386:x86-64 19ELF_ARCH := i386:x86-64
20ELF_FORMAT := elf64-x86-64 20ELF_FORMAT := elf64-x86-64
diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
index 634968150bd6..d283e7b022a0 100644
--- a/arch/um/drivers/Makefile
+++ b/arch/um/drivers/Makefile
@@ -17,7 +17,7 @@ ubd-objs := ubd_kern.o ubd_user.o
17port-objs := port_kern.o port_user.o 17port-objs := port_kern.o port_user.o
18harddog-objs := harddog_kern.o harddog_user.o 18harddog-objs := harddog_kern.o harddog_user.o
19 19
20LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a) 20LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
21 21
22LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a) 22LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
23 23
diff --git a/arch/um/sys-ppc/Makefile b/arch/um/sys-ppc/Makefile
index af200268fddb..a9814a7ae60e 100644
--- a/arch/um/sys-ppc/Makefile
+++ b/arch/um/sys-ppc/Makefile
@@ -1,7 +1,7 @@
1OBJ = built-in.o 1OBJ = built-in.o
2 2
3.S.o: 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
6OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \ 6OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \
7 ptrace_user.o sysrq.o 7 ptrace_user.o sysrq.o
@@ -57,13 +57,13 @@ ppc_defs.h: mk_defs.c ppc_defs.head \
57checksum.o: checksum.S 57checksum.o: checksum.S
58 rm -f asm 58 rm -f asm
59 ln -s $(TOPDIR)/include/asm-ppc asm 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 rm -f asm 61 rm -f asm
62 62
63misc.o: misc.S ppc_defs.h 63misc.o: misc.S ppc_defs.h
64 rm -f asm 64 rm -f asm
65 ln -s $(TOPDIR)/include/asm-ppc asm 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 rm -f asm 67 rm -f asm
68 68
69clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c 69clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c
diff --git a/arch/v850/Makefile b/arch/v850/Makefile
index 8be9aacb20a7..8b629df0029a 100644
--- a/arch/v850/Makefile
+++ b/arch/v850/Makefile
@@ -16,11 +16,11 @@
16 16
17arch_dir = arch/v850 17arch_dir = arch/v850
18 18
19CFLAGS += -mv850e 19KBUILD_CFLAGS += -mv850e
20# r16 is a fixed pointer to the current task 20# r16 is a fixed pointer to the current task
21CFLAGS += -ffixed-r16 -mno-prolog-function 21KBUILD_CFLAGS += -ffixed-r16 -mno-prolog-function
22CFLAGS += -fno-builtin 22KBUILD_CFLAGS += -fno-builtin
23CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" 23KBUILD_CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\"
24 24
25# By default, build a kernel that runs on the gdb v850 simulator. 25# By default, build a kernel that runs on the gdb v850 simulator.
26KBUILD_DEFCONFIG := sim_defconfig 26KBUILD_DEFCONFIG := sim_defconfig
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index cb1035f2b7e9..d6ed8e5e1ccc 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -50,7 +50,7 @@ HOSTCFLAGS_build.o := $(LINUXINCLUDE)
50# that way we can complain to the user if the CPU is insufficient. 50# that way we can complain to the user if the CPU is insufficient.
51cflags-i386 := 51cflags-i386 :=
52cflags-x86_64 := -m32 52cflags-x86_64 := -m32
53CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ 53KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
54 $(cflags-$(ARCH)) \ 54 $(cflags-$(ARCH)) \
55 -Wall -Wstrict-prototypes \ 55 -Wall -Wstrict-prototypes \
56 -march=i386 -mregparm=3 \ 56 -march=i386 -mregparm=3 \
@@ -61,7 +61,7 @@ CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
61 $(call cc-option, -fno-unit-at-a-time)) \ 61 $(call cc-option, -fno-unit-at-a-time)) \
62 $(call cc-option, -fno-stack-protector) \ 62 $(call cc-option, -fno-stack-protector) \
63 $(call cc-option, -mpreferred-stack-boundary=2) 63 $(call cc-option, -mpreferred-stack-boundary=2)
64AFLAGS := $(CFLAGS) -D__ASSEMBLY__ 64KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
65 65
66$(obj)/zImage: IMAGE_OFFSET := 0x1000 66$(obj)/zImage: IMAGE_OFFSET := 0x1000
67$(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK) 67$(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK)
diff --git a/arch/x86/boot/compressed/Makefile_32 b/arch/x86/boot/compressed/Makefile_32
index 22613c652d22..e43ff7c56e6e 100644
--- a/arch/x86/boot/compressed/Makefile_32
+++ b/arch/x86/boot/compressed/Makefile_32
@@ -11,7 +11,7 @@ EXTRA_AFLAGS := -traditional
11LDFLAGS_vmlinux := -T 11LDFLAGS_vmlinux := -T
12hostprogs-y := relocs 12hostprogs-y := relocs
13 13
14CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ 14KBUILD_CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
15 -fno-strict-aliasing -fPIC \ 15 -fno-strict-aliasing -fPIC \
16 $(call cc-option,-ffreestanding) \ 16 $(call cc-option,-ffreestanding) \
17 $(call cc-option,-fno-stack-protector) 17 $(call cc-option,-fno-stack-protector)
diff --git a/arch/x86/boot/compressed/Makefile_64 b/arch/x86/boot/compressed/Makefile_64
index dc6b3380cc45..7801e8dd90b2 100644
--- a/arch/x86/boot/compressed/Makefile_64
+++ b/arch/x86/boot/compressed/Makefile_64
@@ -6,11 +6,11 @@
6 6
7targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o 7targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o
8 8
9CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \ 9KBUILD_CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \
10 -fno-strict-aliasing -fPIC -mcmodel=small \ 10 -fno-strict-aliasing -fPIC -mcmodel=small \
11 $(call cc-option, -ffreestanding) \ 11 $(call cc-option, -ffreestanding) \
12 $(call cc-option, -fno-stack-protector) 12 $(call cc-option, -fno-stack-protector)
13AFLAGS := $(CFLAGS) -D__ASSEMBLY__ 13KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
14LDFLAGS := -m elf_x86_64 14LDFLAGS := -m elf_x86_64
15 15
16LDFLAGS_vmlinux := -T 16LDFLAGS_vmlinux := -T
diff --git a/arch/x86/math-emu/Makefile b/arch/x86/math-emu/Makefile
index 9c943fa6ce6b..9b0c63b60302 100644
--- a/arch/x86/math-emu/Makefile
+++ b/arch/x86/math-emu/Makefile
@@ -5,8 +5,7 @@
5#DEBUG = -DDEBUGGING 5#DEBUG = -DDEBUGGING
6DEBUG = 6DEBUG =
7PARANOID = -DPARANOID 7PARANOID = -DPARANOID
8CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) 8EXTRA_CFLAGS := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
9
10EXTRA_AFLAGS := $(PARANOID) 9EXTRA_AFLAGS := $(PARANOID)
11 10
12# From 'C' language sources: 11# From 'C' language sources:
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 8d03de029d9b..dcd6bb9e0bb3 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -34,8 +34,8 @@ $(obj)/vdso.so: $(src)/vdso.lds $(vobjs) FORCE
34 34
35CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64 35CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64
36 36
37$(obj)/vclock_gettime.o: CFLAGS = $(CFL) 37$(obj)/vclock_gettime.o: KBUILD_CFLAGS = $(CFL)
38$(obj)/vgetcpu.o: CFLAGS = $(CFL) 38$(obj)/vgetcpu.o: KBUILD_CFLAGS = $(CFL)
39 39
40# We also create a special relocatable object that should mirror the symbol 40# We also create a special relocatable object that should mirror the symbol
41# table and layout of the linked DSO. With ld -R we can then refer to 41# table and layout of the linked DSO. With ld -R we can then refer to
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index 8bffb94c71b5..9daa32d1d2a1 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -61,18 +61,18 @@ cflags-y += -maccumulate-outgoing-args
61 61
62# do binutils support CFI? 62# do binutils support CFI?
63cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 63cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
64AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 64KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
65 65
66# is .cfi_signal_frame supported too? 66# is .cfi_signal_frame supported too?
67cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 67cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
68AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 68KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
69 69
70cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) 70cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector )
71cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) 71cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all )
72 72
73CFLAGS += $(cflags-y) 73KBUILD_CFLAGS += $(cflags-y)
74CFLAGS_KERNEL += $(cflags-kernel-y) 74CFLAGS_KERNEL += $(cflags-kernel-y)
75AFLAGS += -m64 75KBUILD_AFLAGS += -m64
76 76
77head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o 77head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o
78 78
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index acf05be24929..56685a883347 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -28,11 +28,9 @@ PLATFORM = $(platform-y)
28export PLATFORM 28export PLATFORM
29 29
30# temporarily until string.h is fixed 30# temporarily until string.h is fixed
31cflags-y += -ffreestanding 31KBUILD_CFLAGS += -ffreestanding
32 32
33cflags-y += -pipe -mlongcalls 33KBUILD_CFLAGS += -pipe -mlongcalls
34
35CFLAGS += $(cflags-y)
36 34
37KBUILD_DEFCONFIG := iss_defconfig 35KBUILD_DEFCONFIG := iss_defconfig
38 36
@@ -56,7 +54,7 @@ endif
56 54
57# 55#
58 56
59LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 57LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
60 58
61head-y := arch/xtensa/kernel/head.o 59head-y := arch/xtensa/kernel/head.o
62core-y += arch/xtensa/kernel/ arch/xtensa/mm/ 60core-y += arch/xtensa/kernel/ arch/xtensa/mm/
diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
index 820b31d10ae4..9c5185f605b6 100644
--- a/arch/xtensa/boot/Makefile
+++ b/arch/xtensa/boot/Makefile
@@ -8,13 +8,12 @@
8# 8#
9 9
10 10
11CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include 11EXTRA_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
12HOSTFLAGS += -Iarch/$(ARCH)/boot/include 12HOSTFLAGS += -Iarch/$(ARCH)/boot/include
13 13
14BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") 14BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
15 15
16export CFLAGS 16export EXTRA_CFLAGS
17export AFLAGS
18export BIG_ENDIAN 17export BIG_ENDIAN
19 18
20subdir-y := lib 19subdir-y := lib
diff --git a/arch/xtensa/boot/boot-redboot/Makefile b/arch/xtensa/boot/boot-redboot/Makefile
index f53262c2e1f3..74d15d08077b 100644
--- a/arch/xtensa/boot/boot-redboot/Makefile
+++ b/arch/xtensa/boot/boot-redboot/Makefile
@@ -19,7 +19,7 @@ boot-y := bootstrap.o
19OBJS := $(addprefix $(obj)/,$(boot-y)) 19OBJS := $(addprefix $(obj)/,$(boot-y))
20LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a 20LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
21 21
22LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 22LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
23 23
24zImage: vmlinux $(OBJS) $(LIBS) 24zImage: vmlinux $(OBJS) $(LIBS)
25 $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ 25 $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \
diff --git a/drivers/atm/Makefile b/drivers/atm/Makefile
index 1b16f8166b09..e4fa99658699 100644
--- a/drivers/atm/Makefile
+++ b/drivers/atm/Makefile
@@ -41,7 +41,7 @@ ifeq ($(CONFIG_ATM_FORE200E_PCA),y)
41 # guess the target endianess to choose the right PCA-200E firmware image 41 # guess the target endianess to choose the right PCA-200E firmware image
42 ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y) 42 ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
43 byteorder.h := include$(if $(patsubst $(srctree),,$(objtree)),2)/asm/byteorder.h 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 endif 45 endif
46endif 46endif
47 47
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index d602b8fa7d46..7acc6351bb44 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -152,7 +152,7 @@ config INPUT_POWERMATE
152 152
153config INPUT_YEALINK 153config INPUT_YEALINK
154 tristate "Yealink usb-p1k voip phone" 154 tristate "Yealink usb-p1k voip phone"
155 depends EXPERIMENTAL 155 depends on EXPERIMENTAL
156 depends on USB_ARCH_HAS_HCD 156 depends on USB_ARCH_HAS_HCD
157 select USB 157 select USB
158 help 158 help
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 257b44094e4c..ec568fa1c6cc 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -83,7 +83,7 @@ config LEDS_WRAP
83 83
84config LEDS_H1940 84config LEDS_H1940
85 tristate "LED Support for iPAQ H1940 device" 85 tristate "LED Support for iPAQ H1940 device"
86 depends LEDS_CLASS && ARCH_H1940 86 depends on LEDS_CLASS && ARCH_H1940
87 help 87 help
88 This option enables support for the LEDs on the h1940. 88 This option enables support for the LEDs on the h1940.
89 89
diff --git a/drivers/telephony/Kconfig b/drivers/telephony/Kconfig
index 5f98f673f1b6..b5f78b6ed2bd 100644
--- a/drivers/telephony/Kconfig
+++ b/drivers/telephony/Kconfig
@@ -19,7 +19,7 @@ if PHONE
19 19
20config PHONE_IXJ 20config PHONE_IXJ
21 tristate "QuickNet Internet LineJack/PhoneJack support" 21 tristate "QuickNet Internet LineJack/PhoneJack support"
22 depends ISA || PCI 22 depends on ISA || PCI
23 ---help--- 23 ---help---
24 Say M if you have a telephony card manufactured by Quicknet 24 Say M if you have a telephony card manufactured by Quicknet
25 Technologies, Inc. These include the Internet PhoneJACK and 25 Technologies, Inc. These include the Internet PhoneJACK and
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 818cc3a50e6b..025af706d114 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -78,7 +78,6 @@ header-y += if_arcnet.h
78header-y += if_bonding.h 78header-y += if_bonding.h
79header-y += if_cablemodem.h 79header-y += if_cablemodem.h
80header-y += if_fc.h 80header-y += if_fc.h
81header-y += if_fddi.h
82header-y += if.h 81header-y += if.h
83header-y += if_hippi.h 82header-y += if_hippi.h
84header-y += if_infiniband.h 83header-y += if_infiniband.h
@@ -121,7 +120,6 @@ header-y += nl80211.h
121header-y += oom.h 120header-y += oom.h
122header-y += param.h 121header-y += param.h
123header-y += pci_regs.h 122header-y += pci_regs.h
124header-y += personality.h
125header-y += pfkeyv2.h 123header-y += pfkeyv2.h
126header-y += pg.h 124header-y += pg.h
127header-y += phantom.h 125header-y += phantom.h
@@ -159,7 +157,6 @@ header-y += video_decoder.h
159header-y += video_encoder.h 157header-y += video_encoder.h
160header-y += videotext.h 158header-y += videotext.h
161header-y += vt.h 159header-y += vt.h
162header-y += wireless.h
163header-y += x25.h 160header-y += x25.h
164 161
165unifdef-y += acct.h 162unifdef-y += acct.h
diff --git a/init/Makefile b/init/Makefile
index 0154aea1e52d..633392f5cdee 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -30,4 +30,4 @@ $(obj)/version.o: include/linux/compile.h
30include/linux/compile.h: FORCE 30include/linux/compile.h: FORCE
31 @echo ' CHK $@' 31 @echo ' CHK $@'
32 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ 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)"
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 677bc6c175cb..de7bb284c611 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -75,24 +75,24 @@ try-run = $(shell set -e; \
75# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) 75# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
76 76
77as-option = $(call try-run,\ 77as-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# as-instr 80# as-instr
81# Usage: cflags-y += $(call as-instr,instr,option1,option2) 81# Usage: cflags-y += $(call as-instr,instr,option1,option2)
82 82
83as-instr = $(call try-run,\ 83as-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# cc-option 86# cc-option
87# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) 87# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
88 88
89cc-option = $(call try-run,\ 89cc-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# cc-option-yn 92# cc-option-yn
93# Usage: flag := $(call cc-option-yn,-march=winchip-c6) 93# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
94cc-option-yn = $(call try-run,\ 94cc-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# cc-option-align 97# cc-option-align
98# Prefix align with either -falign or -malign 98# Prefix align with either -falign or -malign
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 7fd6055bedfd..de9836eee8bb 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -22,16 +22,30 @@ EXTRA_AFLAGS :=
22EXTRA_CFLAGS := 22EXTRA_CFLAGS :=
23EXTRA_CPPFLAGS := 23EXTRA_CPPFLAGS :=
24EXTRA_LDFLAGS := 24EXTRA_LDFLAGS :=
25asflags-y :=
26ccflags-y :=
27cppflags-y :=
28ldflags-y :=
25 29
26# Read .config if it exist, otherwise ignore 30# Read .config if it exist, otherwise ignore
27-include include/config/auto.conf 31-include include/config/auto.conf
28 32
29include scripts/Kbuild.include 33include scripts/Kbuild.include
30 34
35# For backward compatibility check that these variables does not change
36save-cflags := $(CFLAGS)
37
31# The filename Kbuild has precedence over Makefile 38# The filename Kbuild has precedence over Makefile
32kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) 39kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
33include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile) 40kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
34 41include $(kbuild-file)
42
43# If the save-* variables changed error out
44ifeq ($(KBUILD_NOPEDANTIC),)
45 ifneq ("$(save-cflags)","$(CFLAGS)")
46 $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS)
47 endif
48endif
35include scripts/Makefile.lib 49include scripts/Makefile.lib
36 50
37ifdef host-progs 51ifdef host-progs
@@ -55,31 +69,6 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
55_dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) 69_dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d)))
56endif 70endif
57 71
58
59ifdef EXTRA_TARGETS
60$(warning kbuild: $(obj)/Makefile - Usage of EXTRA_TARGETS is obsolete in 2.6. Please fix!)
61endif
62
63ifdef build-targets
64$(warning kbuild: $(obj)/Makefile - Usage of build-targets is obsolete in 2.6. Please fix!)
65endif
66
67ifdef export-objs
68$(warning kbuild: $(obj)/Makefile - Usage of export-objs is obsolete in 2.6. Please fix!)
69endif
70
71ifdef O_TARGET
72$(warning kbuild: $(obj)/Makefile - Usage of O_TARGET := $(O_TARGET) is obsolete in 2.6. Please fix!)
73endif
74
75ifdef L_TARGET
76$(error kbuild: $(obj)/Makefile - Use of L_TARGET is replaced by lib-y in 2.6. Please fix!)
77endif
78
79ifdef list-multi
80$(warning kbuild: $(obj)/Makefile - list-multi := $(list-multi) is obsolete in 2.6. Please fix!)
81endif
82
83ifndef obj 72ifndef obj
84$(warning kbuild: Makefile.build is included improperly) 73$(warning kbuild: Makefile.build is included improperly)
85endif 74endif
@@ -291,7 +280,7 @@ endif # builtin-target
291# 280#
292ifdef lib-target 281ifdef lib-target
293quiet_cmd_link_l_target = AR $@ 282quiet_cmd_link_l_target = AR $@
294cmd_link_l_target = rm -f $@; $(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-y) 283cmd_link_l_target = rm -f $@; $(AR) rcs $@ $(lib-y)
295 284
296$(lib-target): $(lib-y) FORCE 285$(lib-target): $(lib-y) FORCE
297 $(call if_changed,link_l_target) 286 $(call if_changed,link_l_target)
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index cff33498fa16..2c647107c9cc 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -40,7 +40,7 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
40# build a list of files to remove, usually releative to the current 40# build a list of files to remove, usually releative to the current
41# directory 41# directory
42 42
43__clean-files := $(extra-y) $(EXTRA_TARGETS) $(always) \ 43__clean-files := $(extra-y) $(always) \
44 $(targets) $(clean-files) \ 44 $(targets) $(clean-files) \
45 $(host-progs) \ 45 $(host-progs) \
46 $(hostprogs-y) $(hostprogs-m) $(hostprogs-) 46 $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index fc498fee68ed..3c5e88bfecf1 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -1,5 +1,9 @@
1# Backward compatibility - to be removed... 1# Backward compatibility
2extra-y += $(EXTRA_TARGETS) 2asflags-y += $(EXTRA_AFLAGS)
3ccflags-y += $(EXTRA_CFLAGS)
4cppflags-y += $(EXTRA_CPPFLAGS)
5ldflags-y += $(EXTRA_LDFLAGS)
6
3# Figure out what we need to build from the various variables 7# Figure out what we need to build from the various variables
4# =========================================================================== 8# ===========================================================================
5 9
@@ -44,9 +48,9 @@ multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y)))
44multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y))) 48multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y)))
45multi-objs := $(multi-objs-y) $(multi-objs-m) 49multi-objs := $(multi-objs-y) $(multi-objs-m)
46 50
47# $(subdir-obj-y) is the list of objects in $(obj-y) which do not live 51# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to
48# in the local directory 52# tell kbuild to descend
49subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o))) 53subdir-obj-y := $(filter %/built-in.o, $(obj-y))
50 54
51# $(obj-dirs) is a list of directories that contain object files 55# $(obj-dirs) is a list of directories that contain object files
52obj-dirs := $(dir $(multi-objs) $(subdir-obj-y)) 56obj-dirs := $(dir $(multi-objs) $(subdir-obj-y))
@@ -86,9 +90,9 @@ basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
86modname_flags = $(if $(filter 1,$(words $(modname))),\ 90modname_flags = $(if $(filter 1,$(words $(modname))),\
87 -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") 91 -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
88 92
89_c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(basetarget).o) 93_c_flags = $(KBUILD_CFLAGS) $(ccflags-y) $(CFLAGS_$(basetarget).o)
90_a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) 94_a_flags = $(KBUILD_AFLAGS) $(asflags-y) $(AFLAGS_$(basetarget).o)
91_cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F)) 95_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
92 96
93# If building the kernel in a separate objtree expand all occurrences 97# If building the kernel in a separate objtree expand all occurrences
94# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). 98# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
@@ -108,16 +112,16 @@ __a_flags = $(call flags,_a_flags)
108__cpp_flags = $(call flags,_cpp_flags) 112__cpp_flags = $(call flags,_cpp_flags)
109endif 113endif
110 114
111c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ 115c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
112 $(__c_flags) $(modkern_cflags) \ 116 $(__c_flags) $(modkern_cflags) \
113 -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) 117 -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
114 118
115a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ 119a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
116 $(__a_flags) $(modkern_aflags) 120 $(__a_flags) $(modkern_aflags)
117 121
118cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) 122cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
119 123
120ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) 124ld_flags = $(LDFLAGS) $(ldflags-y)
121 125
122# Finds the multi-part object the current object will be linked into 126# Finds the multi-part object the current object will be linked into
123modname-multi = $(sort $(foreach m,$(multi-used),\ 127modname-multi = $(sort $(foreach m,$(multi-used),\
@@ -140,14 +144,14 @@ $(obj)/%:: $(src)/%_shipped
140# target: source(s) FORCE 144# target: source(s) FORCE
141# $(if_changed,ld/objcopy/gzip) 145# $(if_changed,ld/objcopy/gzip)
142# 146#
143# and add target to EXTRA_TARGETS so that we know we have to 147# and add target to extra-y so that we know we have to
144# read in the saved command line 148# read in the saved command line
145 149
146# Linking 150# Linking
147# --------------------------------------------------------------------------- 151# ---------------------------------------------------------------------------
148 152
149quiet_cmd_ld = LD $@ 153quiet_cmd_ld = LD $@
150cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \ 154cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \
151 $(filter-out FORCE,$^) -o $@ 155 $(filter-out FORCE,$^) -o $@
152 156
153# Objcopy 157# Objcopy
diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile
index 2f60070f9733..4c324a1f1e0e 100644
--- a/scripts/basic/Makefile
+++ b/scripts/basic/Makefile
@@ -1,13 +1,13 @@
1### 1###
2# Makefile.basic list the most basic programs used during the build process. 2# Makefile.basic lists the most basic programs used during the build process.
3# The programs listed herein is what is needed to do the basic stuff, 3# The programs listed herein are what are needed to do the basic stuff,
4# such as fix dependency file. 4# such as fix file dependencies.
5# This initial step is needed to avoid files to be recompiled 5# This initial step is needed to avoid files to be recompiled
6# when kernel configuration changes (which is what happens when 6# when kernel configuration changes (which is what happens when
7# .config is included by main Makefile. 7# .config is included by main Makefile.
8# --------------------------------------------------------------------------- 8# ---------------------------------------------------------------------------
9# fixdep: Used to generate dependency information during build process 9# fixdep: Used to generate dependency information during build process
10# docproc: Used in Documentation/docbook 10# docproc: Used in Documentation/DocBook
11 11
12hostprogs-y := fixdep docproc 12hostprogs-y := fixdep docproc
13always := $(hostprogs-y) 13always := $(hostprogs-y)
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
index f4d2f68452ba..e5c6ac7bde9b 100644
--- a/scripts/basic/docproc.c
+++ b/scripts/basic/docproc.c
@@ -10,8 +10,10 @@
10 * documentation-frontend 10 * documentation-frontend
11 * Scans the template file and call kernel-doc for 11 * Scans the template file and call kernel-doc for
12 * all occurrences of ![EIF]file 12 * all occurrences of ![EIF]file
13 * Beforehand each referenced file are scanned for 13 * Beforehand each referenced file is scanned for
14 * any exported sympols "EXPORT_SYMBOL()" statements. 14 * any symbols that are exported via these macros:
15 * EXPORT_SYMBOL(), EXPORT_SYMBOL_GPL(), &
16 * EXPORT_SYMBOL_GPL_FUTURE()
15 * This is used to create proper -function and 17 * This is used to create proper -function and
16 * -nofunction arguments in calls to kernel-doc. 18 * -nofunction arguments in calls to kernel-doc.
17 * Usage: docproc doc file.tmpl 19 * Usage: docproc doc file.tmpl
@@ -73,7 +75,7 @@ void usage (void)
73} 75}
74 76
75/* 77/*
76 * Execute kernel-doc with parameters givin in svec 78 * Execute kernel-doc with parameters given in svec
77 */ 79 */
78void exec_kernel_doc(char **svec) 80void exec_kernel_doc(char **svec)
79{ 81{
@@ -82,7 +84,7 @@ void exec_kernel_doc(char **svec)
82 char real_filename[PATH_MAX + 1]; 84 char real_filename[PATH_MAX + 1];
83 /* Make sure output generated so far are flushed */ 85 /* Make sure output generated so far are flushed */
84 fflush(stdout); 86 fflush(stdout);
85 switch(pid=fork()) { 87 switch (pid=fork()) {
86 case -1: 88 case -1:
87 perror("fork"); 89 perror("fork");
88 exit(1); 90 exit(1);
@@ -133,6 +135,7 @@ struct symfile * add_new_file(char * filename)
133 symfilelist[symfilecnt++].filename = strdup(filename); 135 symfilelist[symfilecnt++].filename = strdup(filename);
134 return &symfilelist[symfilecnt - 1]; 136 return &symfilelist[symfilecnt - 1];
135} 137}
138
136/* Check if file already are present in the list */ 139/* Check if file already are present in the list */
137struct symfile * filename_exist(char * filename) 140struct symfile * filename_exist(char * filename)
138{ 141{
@@ -156,8 +159,8 @@ void noaction2(char * file, char * line) { file = file; line = line; }
156void printline(char * line) { printf("%s", line); } 159void printline(char * line) { printf("%s", line); }
157 160
158/* 161/*
159 * Find all symbols exported with EXPORT_SYMBOL and EXPORT_SYMBOL_GPL 162 * Find all symbols in filename that are exported with EXPORT_SYMBOL &
160 * in filename. 163 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
161 * All symbols located are stored in symfilelist. 164 * All symbols located are stored in symfilelist.
162 */ 165 */
163void find_export_symbols(char * filename) 166void find_export_symbols(char * filename)
@@ -179,15 +182,15 @@ void find_export_symbols(char * filename)
179 perror(real_filename); 182 perror(real_filename);
180 exit(1); 183 exit(1);
181 } 184 }
182 while(fgets(line, MAXLINESZ, fp)) { 185 while (fgets(line, MAXLINESZ, fp)) {
183 char *p; 186 char *p;
184 char *e; 187 char *e;
185 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || 188 if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) ||
186 ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { 189 ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) {
187 /* Skip EXPORT_SYMBOL{_GPL} */ 190 /* Skip EXPORT_SYMBOL{_GPL} */
188 while (isalnum(*p) || *p == '_') 191 while (isalnum(*p) || *p == '_')
189 p++; 192 p++;
190 /* Remove paranteses and additional ws */ 193 /* Remove parentheses & additional whitespace */
191 while (isspace(*p)) 194 while (isspace(*p))
192 p++; 195 p++;
193 if (*p != '(') 196 if (*p != '(')
@@ -211,7 +214,7 @@ void find_export_symbols(char * filename)
211 * Document all external or internal functions in a file. 214 * Document all external or internal functions in a file.
212 * Call kernel-doc with following parameters: 215 * Call kernel-doc with following parameters:
213 * kernel-doc -docbook -nofunction function_name1 filename 216 * kernel-doc -docbook -nofunction function_name1 filename
214 * function names are obtained from all the src files 217 * Function names are obtained from all the src files
215 * by find_export_symbols. 218 * by find_export_symbols.
216 * intfunc uses -nofunction 219 * intfunc uses -nofunction
217 * extfunc uses -function 220 * extfunc uses -function
@@ -262,7 +265,7 @@ void singfunc(char * filename, char * line)
262 vec[idx++] = KERNELDOC; 265 vec[idx++] = KERNELDOC;
263 vec[idx++] = DOCBOOK; 266 vec[idx++] = DOCBOOK;
264 267
265 /* Split line up in individual parameters preceeded by FUNCTION */ 268 /* Split line up in individual parameters preceded by FUNCTION */
266 for (i=0; line[i]; i++) { 269 for (i=0; line[i]; i++) {
267 if (isspace(line[i])) { 270 if (isspace(line[i])) {
268 line[i] = '\0'; 271 line[i] = '\0';
@@ -292,7 +295,7 @@ void parse_file(FILE *infile)
292{ 295{
293 char line[MAXLINESZ]; 296 char line[MAXLINESZ];
294 char * s; 297 char * s;
295 while(fgets(line, MAXLINESZ, infile)) { 298 while (fgets(line, MAXLINESZ, infile)) {
296 if (line[0] == '!') { 299 if (line[0] == '!') {
297 s = line + 2; 300 s = line + 2;
298 switch (line[1]) { 301 switch (line[1]) {
@@ -351,9 +354,9 @@ int main(int argc, char *argv[])
351 { 354 {
352 /* Need to do this in two passes. 355 /* Need to do this in two passes.
353 * First pass is used to collect all symbols exported 356 * First pass is used to collect all symbols exported
354 * in the various files. 357 * in the various files;
355 * Second pass generate the documentation. 358 * Second pass generate the documentation.
356 * This is required because function are declared 359 * This is required because some functions are declared
357 * and exported in different files :-(( 360 * and exported in different files :-((
358 */ 361 */
359 /* Collect symbols */ 362 /* Collect symbols */
@@ -396,4 +399,3 @@ int main(int argc, char *argv[])
396 fflush(stdout); 399 fflush(stdout);
397 return exitstatus; 400 return exitstatus;
398} 401}
399
diff --git a/scripts/checkkconfigsymbols.sh b/scripts/checkkconfigsymbols.sh
new file mode 100755
index 000000000000..39677c82747a
--- /dev/null
+++ b/scripts/checkkconfigsymbols.sh
@@ -0,0 +1,59 @@
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.
6paths="$@"
7[ -z "$paths" ] && paths=.
8
9# Doing this once at the beginning saves a lot of time, on a cache-hot tree.
10Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`"
11
12echo -e "File list \tundefined symbol used"
13find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i
14do
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
18done | \
19# Smart "sort|uniq" implemented in awk and tuned to collect the names of all
20# files which use a given symbol
21awk '{map[$1, count[$1]++] = $2; }
22END {
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}' |
51while 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
59done|sort
diff --git a/scripts/export_report.pl b/scripts/export_report.pl
index 9ed00d9bb0a7..705b5ba7c152 100644
--- a/scripts/export_report.pl
+++ b/scripts/export_report.pl
@@ -103,16 +103,16 @@ foreach my $thismod (@allcfiles) {
103 my $state=0; 103 my $state=0;
104 while ( <MODULE_MODULE> ) { 104 while ( <MODULE_MODULE> ) {
105 chomp; 105 chomp;
106 if ($state eq 0) { 106 if ($state == 0) {
107 $state = 1 if ($_ =~ /static const struct modversion_info/); 107 $state = 1 if ($_ =~ /static const struct modversion_info/);
108 next; 108 next;
109 } 109 }
110 if ($state eq 1) { 110 if ($state == 1) {
111 $state = 2 if ($_ =~ /__attribute__\(\(section\("__versions"\)\)\)/); 111 $state = 2 if ($_ =~ /__attribute__\(\(section\("__versions"\)\)\)/);
112 next; 112 next;
113 } 113 }
114 if ($state eq 2) { 114 if ($state == 2) {
115 if ( $_ !~ /0x[0-9a-f]{7,8},/ ) { 115 if ( $_ !~ /0x[0-9a-f]+,/ ) {
116 next; 116 next;
117 } 117 }
118 my $sym = (split /([,"])/,)[4]; 118 my $sym = (split /([,"])/,)[4];
@@ -121,7 +121,7 @@ foreach my $thismod (@allcfiles) {
121 push(@{$MODULE{$thismod}} , $sym); 121 push(@{$MODULE{$thismod}} , $sym);
122 } 122 }
123 } 123 }
124 if ($state ne 2) { 124 if ($state != 2) {
125 print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n"; 125 print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n";
126 } 126 }
127 close(MODULE_MODULE); 127 close(MODULE_MODULE);
diff --git a/scripts/gcc-version.sh b/scripts/gcc-version.sh
index 8a1d1879c7ad..a5121a6d8949 100644
--- a/scripts/gcc-version.sh
+++ b/scripts/gcc-version.sh
@@ -9,10 +9,16 @@
9# gcc-2.95.3, `030301' for gcc-3.3.1, etc. 9# gcc-2.95.3, `030301' for gcc-3.3.1, etc.
10# 10#
11 11
12if [ $1 = "-p" ] ; then with_patchlevel=1; shift; fi 12if [[ $1 = "-p" ]] ; then with_patchlevel=1; shift; fi
13 13
14compiler="$*" 14compiler="$*"
15 15
16if [ ${#compiler} -eq 0 ]; then
17 echo "Error: No compiler specified."
18 echo -e "Usage:\n\t$0 <gcc-command>"
19 exit 1
20fi
21
16MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1) 22MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1)
17MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1) 23MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
18if [ "x$with_patchlevel" != "x" ] ; then 24if [ "x$with_patchlevel" != "x" ] ; then
diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile
index 5875f29a8602..e420fe440019 100644
--- a/scripts/genksyms/Makefile
+++ b/scripts/genksyms/Makefile
@@ -23,14 +23,16 @@ quiet_cmd_keywords.c = GPERF $@
23 23
24$(obj)/keywords.c: $(obj)/keywords.gperf FORCE 24$(obj)/keywords.c: $(obj)/keywords.gperf FORCE
25 $(call if_changed,keywords.c) 25 $(call if_changed,keywords.c)
26 cp $@ $@_shipped
26 27
27# flex 28# flex
28 29
29quiet_cmd_lex.c = FLEX $@ 30quiet_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 $(call if_changed,lex.c) 34 $(call if_changed,lex.c)
35 cp $@ $@_shipped
34 36
35# bison 37# bison
36 38
@@ -39,6 +41,8 @@ quiet_cmd_parse.c = BISON $@
39 41
40$(obj)/parse.c: $(obj)/parse.y FORCE 42$(obj)/parse.c: $(obj)/parse.y FORCE
41 $(call if_changed,parse.c) 43 $(call if_changed,parse.c)
44 cp $@ $@_shipped
45 cp $(@:.c=.h) $(@:.c=.h)_shipped
42 46
43$(obj)/parse.h: $(obj)/parse.c ; 47$(obj)/parse.h: $(obj)/parse.c ;
44 48
diff --git a/scripts/genksyms/keywords.c_shipped b/scripts/genksyms/keywords.c_shipped
index d8153f572e40..971e0113ae7a 100644
--- a/scripts/genksyms/keywords.c_shipped
+++ b/scripts/genksyms/keywords.c_shipped
@@ -1,4 +1,4 @@
1/* ANSI-C code produced by gperf version 3.0.1 */ 1/* ANSI-C code produced by gperf version 3.0.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 */ 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#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ 4#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -32,7 +32,7 @@
32 32
33#line 3 "scripts/genksyms/keywords.gperf" 33#line 3 "scripts/genksyms/keywords.gperf"
34struct resword { const char *name; int token; }; 34struct resword { const char *name; int token; };
35/* maximum key range = 68, duplicates = 0 */ 35/* maximum key range = 62, duplicates = 0 */
36 36
37#ifdef __GNUC__ 37#ifdef __GNUC__
38__inline 38__inline
@@ -46,32 +46,32 @@ is_reserved_hash (register const char *str, register unsigned int len)
46{ 46{
47 static const unsigned char asso_values[] = 47 static const unsigned char asso_values[] =
48 { 48 {
49 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 49 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
50 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 50 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
51 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 51 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
52 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 52 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
53 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 53 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
54 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 54 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
55 71, 71, 71, 71, 71, 71, 71, 71, 71, 0, 55 65, 65, 65, 65, 65, 65, 65, 65, 65, 5,
56 71, 71, 71, 71, 71, 71, 35, 71, 71, 71, 56 65, 65, 65, 65, 65, 65, 35, 65, 65, 65,
57 5, 71, 71, 71, 71, 71, 71, 71, 71, 71, 57 0, 65, 65, 65, 65, 65, 65, 65, 65, 65,
58 71, 71, 71, 71, 71, 0, 71, 0, 71, 5, 58 65, 65, 65, 65, 65, 0, 65, 0, 65, 5,
59 5, 0, 10, 20, 71, 25, 71, 71, 20, 0, 59 20, 15, 10, 30, 65, 15, 65, 65, 20, 0,
60 20, 30, 25, 71, 10, 5, 0, 20, 15, 71, 60 10, 35, 20, 65, 10, 5, 0, 10, 5, 65,
61 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 61 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
62 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 62 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
63 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 63 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
64 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 64 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
65 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 65 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
66 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 66 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
67 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 67 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
68 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 68 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
69 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 69 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
70 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 70 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
71 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
72 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 72 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
73 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 73 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
74 71, 71, 71, 71, 71, 71 74 65, 65, 65, 65, 65, 65
75 }; 75 };
76 return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; 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,17 +84,17 @@ is_reserved_word (register const char *str, register unsigned int len)
84{ 84{
85 enum 85 enum
86 { 86 {
87 TOTAL_KEYWORDS = 42, 87 TOTAL_KEYWORDS = 43,
88 MIN_WORD_LENGTH = 3, 88 MIN_WORD_LENGTH = 3,
89 MAX_WORD_LENGTH = 24, 89 MAX_WORD_LENGTH = 24,
90 MIN_HASH_VALUE = 3, 90 MIN_HASH_VALUE = 3,
91 MAX_HASH_VALUE = 70 91 MAX_HASH_VALUE = 64
92 }; 92 };
93 93
94 static const struct resword wordlist[] = 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 {"asm", ASM_KEYW}, 98 {"asm", ASM_KEYW},
99 {""}, 99 {""},
100#line 8 "scripts/genksyms/keywords.gperf" 100#line 8 "scripts/genksyms/keywords.gperf"
@@ -102,98 +102,98 @@ is_reserved_word (register const char *str, register unsigned int len)
102 {""}, 102 {""},
103#line 9 "scripts/genksyms/keywords.gperf" 103#line 9 "scripts/genksyms/keywords.gperf"
104 {"__asm__", ASM_KEYW}, 104 {"__asm__", ASM_KEYW},
105 {""}, 105 {""}, {""},
106#line 22 "scripts/genksyms/keywords.gperf" 106#line 52 "scripts/genksyms/keywords.gperf"
107 {"_restrict", RESTRICT_KEYW},
108#line 51 "scripts/genksyms/keywords.gperf"
109 {"__typeof__", TYPEOF_KEYW}, 107 {"__typeof__", TYPEOF_KEYW},
110#line 10 "scripts/genksyms/keywords.gperf" 108 {""},
111 {"__attribute", ATTRIBUTE_KEYW},
112#line 12 "scripts/genksyms/keywords.gperf" 109#line 12 "scripts/genksyms/keywords.gperf"
113 {"__const", CONST_KEYW}, 110 {"__const", CONST_KEYW},
114#line 11 "scripts/genksyms/keywords.gperf" 111#line 11 "scripts/genksyms/keywords.gperf"
115 {"__attribute__", ATTRIBUTE_KEYW}, 112 {"__attribute__", ATTRIBUTE_KEYW},
116#line 13 "scripts/genksyms/keywords.gperf" 113#line 13 "scripts/genksyms/keywords.gperf"
117 {"__const__", CONST_KEYW}, 114 {"__const__", CONST_KEYW},
118#line 17 "scripts/genksyms/keywords.gperf" 115#line 18 "scripts/genksyms/keywords.gperf"
119 {"__signed__", SIGNED_KEYW}, 116 {"__signed__", SIGNED_KEYW},
120#line 43 "scripts/genksyms/keywords.gperf" 117#line 44 "scripts/genksyms/keywords.gperf"
121 {"static", STATIC_KEYW}, 118 {"static", STATIC_KEYW},
122 {""}, 119#line 20 "scripts/genksyms/keywords.gperf"
123#line 16 "scripts/genksyms/keywords.gperf" 120 {"__volatile__", VOLATILE_KEYW},
124 {"__signed", SIGNED_KEYW}, 121#line 39 "scripts/genksyms/keywords.gperf"
125#line 31 "scripts/genksyms/keywords.gperf" 122 {"int", INT_KEYW},
123#line 32 "scripts/genksyms/keywords.gperf"
126 {"char", CHAR_KEYW}, 124 {"char", CHAR_KEYW},
127 {""}, 125#line 33 "scripts/genksyms/keywords.gperf"
128#line 44 "scripts/genksyms/keywords.gperf" 126 {"const", CONST_KEYW},
127#line 45 "scripts/genksyms/keywords.gperf"
129 {"struct", STRUCT_KEYW}, 128 {"struct", STRUCT_KEYW},
130#line 23 "scripts/genksyms/keywords.gperf"
131 {"__restrict__", RESTRICT_KEYW},
132#line 24 "scripts/genksyms/keywords.gperf" 129#line 24 "scripts/genksyms/keywords.gperf"
130 {"__restrict__", RESTRICT_KEYW},
131#line 25 "scripts/genksyms/keywords.gperf"
133 {"restrict", RESTRICT_KEYW}, 132 {"restrict", RESTRICT_KEYW},
134#line 34 "scripts/genksyms/keywords.gperf" 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},
139 {""},
140#line 14 "scripts/genksyms/keywords.gperf"
141 {"__extension__", EXTENSION_KEYW},
142#line 35 "scripts/genksyms/keywords.gperf"
135 {"enum", ENUM_KEYW}, 143 {"enum", ENUM_KEYW},
136#line 18 "scripts/genksyms/keywords.gperf" 144#line 19 "scripts/genksyms/keywords.gperf"
137 {"__volatile", VOLATILE_KEYW}, 145 {"__volatile", VOLATILE_KEYW},
138#line 35 "scripts/genksyms/keywords.gperf" 146#line 36 "scripts/genksyms/keywords.gperf"
139 {"extern", EXTERN_KEYW}, 147 {"extern", EXTERN_KEYW},
140#line 19 "scripts/genksyms/keywords.gperf" 148 {""},
141 {"__volatile__", VOLATILE_KEYW}, 149#line 17 "scripts/genksyms/keywords.gperf"
142#line 38 "scripts/genksyms/keywords.gperf" 150 {"__signed", SIGNED_KEYW},
143 {"int", INT_KEYW},
144#line 7 "scripts/genksyms/keywords.gperf" 151#line 7 "scripts/genksyms/keywords.gperf"
145 {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, 152 {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW},
146#line 32 "scripts/genksyms/keywords.gperf"
147 {"const", CONST_KEYW},
148#line 33 "scripts/genksyms/keywords.gperf"
149 {"double", DOUBLE_KEYW},
150 {""}, 153 {""},
151#line 14 "scripts/genksyms/keywords.gperf" 154#line 51 "scripts/genksyms/keywords.gperf"
155 {"typeof", TYPEOF_KEYW},
156#line 46 "scripts/genksyms/keywords.gperf"
157 {"typedef", TYPEDEF_KEYW},
158#line 15 "scripts/genksyms/keywords.gperf"
152 {"__inline", INLINE_KEYW}, 159 {"__inline", INLINE_KEYW},
153#line 30 "scripts/genksyms/keywords.gperf" 160#line 31 "scripts/genksyms/keywords.gperf"
154 {"auto", AUTO_KEYW}, 161 {"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},
159 {""},
160#line 47 "scripts/genksyms/keywords.gperf" 162#line 47 "scripts/genksyms/keywords.gperf"
163 {"union", UNION_KEYW},
164 {""}, {""},
165#line 48 "scripts/genksyms/keywords.gperf"
161 {"unsigned", UNSIGNED_KEYW}, 166 {"unsigned", UNSIGNED_KEYW},
162 {""}, 167#line 49 "scripts/genksyms/keywords.gperf"
163#line 41 "scripts/genksyms/keywords.gperf" 168 {"void", VOID_KEYW},
169#line 42 "scripts/genksyms/keywords.gperf"
164 {"short", SHORT_KEYW}, 170 {"short", SHORT_KEYW},
171 {""}, {""},
165#line 50 "scripts/genksyms/keywords.gperf" 172#line 50 "scripts/genksyms/keywords.gperf"
166 {"typeof", TYPEOF_KEYW},
167#line 45 "scripts/genksyms/keywords.gperf"
168 {"typedef", TYPEDEF_KEYW},
169#line 49 "scripts/genksyms/keywords.gperf"
170 {"volatile", VOLATILE_KEYW}, 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#line 37 "scripts/genksyms/keywords.gperf" 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#line 5 "scripts/genksyms/keywords.gperf" 180#line 5 "scripts/genksyms/keywords.gperf"
184 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, 181 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW},
185 {""}, 182 {""}, {""},
186#line 21 "scripts/genksyms/keywords.gperf" 183#line 38 "scripts/genksyms/keywords.gperf"
187 {"_Bool", BOOL_KEYW}, 184 {"inline", INLINE_KEYW},
188 {""},
189#line 6 "scripts/genksyms/keywords.gperf" 185#line 6 "scripts/genksyms/keywords.gperf"
190 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, 186 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
191 {""}, {""}, {""}, {""}, {""}, {""}, 187#line 41 "scripts/genksyms/keywords.gperf"
192#line 39 "scripts/genksyms/keywords.gperf" 188 {"register", REGISTER_KEYW},
193 {"long", LONG_KEYW}, 189 {""},
194 {""}, {""}, {""}, {""}, {""}, 190#line 22 "scripts/genksyms/keywords.gperf"
195#line 46 "scripts/genksyms/keywords.gperf" 191 {"_Bool", BOOL_KEYW},
196 {"union", UNION_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 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) 199 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
diff --git a/scripts/genksyms/keywords.gperf b/scripts/genksyms/keywords.gperf
index c75e0c8d8f0c..5ef3733225fb 100644
--- a/scripts/genksyms/keywords.gperf
+++ b/scripts/genksyms/keywords.gperf
@@ -11,6 +11,7 @@ __attribute, ATTRIBUTE_KEYW
11__attribute__, ATTRIBUTE_KEYW 11__attribute__, ATTRIBUTE_KEYW
12__const, CONST_KEYW 12__const, CONST_KEYW
13__const__, CONST_KEYW 13__const__, CONST_KEYW
14__extension__, EXTENSION_KEYW
14__inline, INLINE_KEYW 15__inline, INLINE_KEYW
15__inline__, INLINE_KEYW 16__inline__, INLINE_KEYW
16__signed, SIGNED_KEYW 17__signed, SIGNED_KEYW
diff --git a/scripts/genksyms/lex.c_shipped b/scripts/genksyms/lex.c_shipped
index 37ba98241b96..2a176988d468 100644
--- a/scripts/genksyms/lex.c_shipped
+++ b/scripts/genksyms/lex.c_shipped
@@ -1,32 +1,114 @@
1#line 2 "scripts/genksyms/lex.c" 1#line 2 "scripts/genksyms/lex.c"
2/* A lexical scanner generated by flex */
3 2
4/* Scanner skeleton version: 3#line 4 "scripts/genksyms/lex.c"
5 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ 4
6 */ 5#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
7 8
8#define FLEX_SCANNER 9#define FLEX_SCANNER
9#define YY_FLEX_MAJOR_VERSION 2 10#define YY_FLEX_MAJOR_VERSION 2
10#define YY_FLEX_MINOR_VERSION 5 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
16
17/* %if-c++-only */
18/* %endif */
11 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#include <stdio.h> 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" */ 42/* %if-c-or-c++ */
17#ifdef c_plusplus 43/* flex integer type definitions */
18#ifndef __cplusplus 44
19#define __cplusplus 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
57#endif
58
59#include <inttypes.h>
60typedef int8_t flex_int8_t;
61typedef uint8_t flex_uint8_t;
62typedef int16_t flex_int16_t;
63typedef uint16_t flex_uint16_t;
64typedef int32_t flex_int32_t;
65typedef uint32_t flex_uint32_t;
66#else
67typedef signed char flex_int8_t;
68typedef short int flex_int16_t;
69typedef int flex_int32_t;
70typedef unsigned char flex_uint8_t;
71typedef unsigned short int flex_uint16_t;
72typedef 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)
20#endif 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#endif 102#endif
22 103
104#endif /* ! FLEXINT_H */
23 105
24#ifdef __cplusplus 106/* %endif */
25 107
26#include <stdlib.h> 108/* %if-c++-only */
109/* %endif */
27 110
28/* Use prototypes in function declarations. */ 111#ifdef __cplusplus
29#define YY_USE_PROTOS
30 112
31/* The "const" storage-class-modifier is valid. */ 113/* The "const" storage-class-modifier is valid. */
32#define YY_USE_CONST 114#define YY_USE_CONST
@@ -35,36 +117,24 @@
35 117
36#if __STDC__ 118#if __STDC__
37 119
38#define YY_USE_PROTOS
39#define YY_USE_CONST 120#define YY_USE_CONST
40 121
41#endif /* __STDC__ */ 122#endif /* __STDC__ */
42#endif /* ! __cplusplus */ 123#endif /* ! __cplusplus */
43 124
44#ifdef __TURBOC__
45 #pragma warn -rch
46 #pragma warn -use
47#include <io.h>
48#include <stdlib.h>
49#define YY_USE_CONST
50#define YY_USE_PROTOS
51#endif
52
53#ifdef YY_USE_CONST 125#ifdef YY_USE_CONST
54#define yyconst const 126#define yyconst const
55#else 127#else
56#define yyconst 128#define yyconst
57#endif 129#endif
58 130
59 131/* %not-for-header */
60#ifdef YY_USE_PROTOS
61#define YY_PROTO(proto) proto
62#else
63#define YY_PROTO(proto) ()
64#endif
65 132
66/* Returned upon end-of-file. */ 133/* Returned upon end-of-file. */
67#define YY_NULL 0 134#define YY_NULL 0
135/* %ok-for-header */
136
137/* %not-for-header */
68 138
69/* Promotes a possibly negative, possibly signed char to an unsigned 139/* Promotes a possibly negative, possibly signed char to an unsigned
70 * integer for use as an array index. If the signed char is negative, 140 * integer for use as an array index. If the signed char is negative,
@@ -72,79 +142,102 @@
72 * double cast. 142 * double cast.
73 */ 143 */
74#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 144#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
145/* %ok-for-header */
146
147/* %if-reentrant */
148/* %endif */
149
150/* %if-not-reentrant */
151
152/* %endif */
75 153
76/* Enter a start condition. This macro really ought to take a parameter, 154/* Enter a start condition. This macro really ought to take a parameter,
77 * but we do it the disgusting crufty way forced on us by the ()-less 155 * but we do it the disgusting crufty way forced on us by the ()-less
78 * definition of BEGIN. 156 * definition of BEGIN.
79 */ 157 */
80#define BEGIN yy_start = 1 + 2 * 158#define BEGIN (yy_start) = 1 + 2 *
81 159
82/* Translate the current start state into a value that can be later handed 160/* Translate the current start state into a value that can be later handed
83 * to BEGIN to return to the state. The YYSTATE alias is for lex 161 * to BEGIN to return to the state. The YYSTATE alias is for lex
84 * compatibility. 162 * compatibility.
85 */ 163 */
86#define YY_START ((yy_start - 1) / 2) 164#define YY_START (((yy_start) - 1) / 2)
87#define YYSTATE YY_START 165#define YYSTATE YY_START
88 166
89/* Action number for EOF rule of a given start state. */ 167/* Action number for EOF rule of a given start state. */
90#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 168#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91 169
92/* Special action meaning "start processing a new file". */ 170/* Special action meaning "start processing a new file". */
93#define YY_NEW_FILE yyrestart( yyin ) 171#define YY_NEW_FILE yyrestart(yyin )
94 172
95#define YY_END_OF_BUFFER_CHAR 0 173#define YY_END_OF_BUFFER_CHAR 0
96 174
97/* Size of default input buffer. */ 175/* Size of default input buffer. */
176#ifndef YY_BUF_SIZE
98#define YY_BUF_SIZE 16384 177#define YY_BUF_SIZE 16384
178#endif
99 179
180/* The state buf must be large enough to hold one state per character in the main buffer.
181 */
182#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
183
184#ifndef YY_TYPEDEF_YY_BUFFER_STATE
185#define YY_TYPEDEF_YY_BUFFER_STATE
100typedef struct yy_buffer_state *YY_BUFFER_STATE; 186typedef struct yy_buffer_state *YY_BUFFER_STATE;
187#endif
101 188
189/* %if-not-reentrant */
102extern int yyleng; 190extern int yyleng;
191/* %endif */
192
193/* %if-c-only */
194/* %if-not-reentrant */
103extern FILE *yyin, *yyout; 195extern FILE *yyin, *yyout;
196/* %endif */
197/* %endif */
104 198
105#define EOB_ACT_CONTINUE_SCAN 0 199#define EOB_ACT_CONTINUE_SCAN 0
106#define EOB_ACT_END_OF_FILE 1 200#define EOB_ACT_END_OF_FILE 1
107#define EOB_ACT_LAST_MATCH 2 201#define EOB_ACT_LAST_MATCH 2
108 202
109/* The funky do-while in the following #define is used to turn the definition 203 #define YY_LESS_LINENO(n)
110 * int a single C statement (which needs a semi-colon terminator). This 204
111 * avoids problems with code like: 205/* Return all but the first "n" matched characters back to the input stream. */
112 *
113 * if ( condition_holds )
114 * yyless( 5 );
115 * else
116 * do_something_else();
117 *
118 * Prior to using the do-while the compiler would get upset at the
119 * "else" because it interpreted the "if" statement as being all
120 * done when it reached the ';' after the yyless() call.
121 */
122
123/* Return all but the first 'n' matched characters back to the input stream. */
124
125#define yyless(n) \ 206#define yyless(n) \
126 do \ 207 do \
127 { \ 208 { \
128 /* Undo effects of setting up yytext. */ \ 209 /* Undo effects of setting up yytext. */ \
129 *yy_cp = yy_hold_char; \ 210 int yyless_macro_arg = (n); \
211 YY_LESS_LINENO(yyless_macro_arg);\
212 *yy_cp = (yy_hold_char); \
130 YY_RESTORE_YY_MORE_OFFSET \ 213 YY_RESTORE_YY_MORE_OFFSET \
131 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 214 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
132 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 215 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
133 } \ 216 } \
134 while ( 0 ) 217 while ( 0 )
135 218
136#define unput(c) yyunput( c, yytext_ptr ) 219#define unput(c) yyunput( c, (yytext_ptr) )
137 220
138/* The following is because we cannot portably get our hands on size_t 221/* The following is because we cannot portably get our hands on size_t
139 * (without autoconf's help, which isn't available because we want 222 * (without autoconf's help, which isn't available because we want
140 * flex-generated scanners to compile on their own). 223 * flex-generated scanners to compile on their own).
141 */ 224 */
142typedef unsigned int yy_size_t;
143 225
226#ifndef YY_TYPEDEF_YY_SIZE_T
227#define YY_TYPEDEF_YY_SIZE_T
228typedef unsigned int yy_size_t;
229#endif
144 230
231#ifndef YY_STRUCT_YY_BUFFER_STATE
232#define YY_STRUCT_YY_BUFFER_STATE
145struct yy_buffer_state 233struct yy_buffer_state
146 { 234 {
235/* %if-c-only */
147 FILE *yy_input_file; 236 FILE *yy_input_file;
237/* %endif */
238
239/* %if-c++-only */
240/* %endif */
148 241
149 char *yy_ch_buf; /* input buffer */ 242 char *yy_ch_buf; /* input buffer */
150 char *yy_buf_pos; /* current position in input buffer */ 243 char *yy_buf_pos; /* current position in input buffer */
@@ -178,12 +271,16 @@ struct yy_buffer_state
178 */ 271 */
179 int yy_at_bol; 272 int yy_at_bol;
180 273
274 int yy_bs_lineno; /**< The line count. */
275 int yy_bs_column; /**< The column count. */
276
181 /* Whether to try to fill the input buffer when we reach the 277 /* Whether to try to fill the input buffer when we reach the
182 * end of it. 278 * end of it.
183 */ 279 */
184 int yy_fill_buffer; 280 int yy_fill_buffer;
185 281
186 int yy_buffer_status; 282 int yy_buffer_status;
283
187#define YY_BUFFER_NEW 0 284#define YY_BUFFER_NEW 0
188#define YY_BUFFER_NORMAL 1 285#define YY_BUFFER_NORMAL 1
189 /* When an EOF's been seen but there's still some text to process 286 /* When an EOF's been seen but there's still some text to process
@@ -197,102 +294,163 @@ struct yy_buffer_state
197 * just pointing yyin at a new input file. 294 * just pointing yyin at a new input file.
198 */ 295 */
199#define YY_BUFFER_EOF_PENDING 2 296#define YY_BUFFER_EOF_PENDING 2
297
200 }; 298 };
299#endif /* !YY_STRUCT_YY_BUFFER_STATE */
300
301/* %if-c-only Standard (non-C++) definition */
302/* %not-for-header */
201 303
202static YY_BUFFER_STATE yy_current_buffer = 0; 304/* %if-not-reentrant */
305
306/* Stack of input buffers. */
307static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
308static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
309static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
310/* %endif */
311/* %ok-for-header */
312
313/* %endif */
203 314
204/* We provide macros for accessing buffer states in case in the 315/* We provide macros for accessing buffer states in case in the
205 * future we want to put the buffer states in a more general 316 * future we want to put the buffer states in a more general
206 * "scanner state". 317 * "scanner state".
318 *
319 * Returns the top of the stack, or NULL.
207 */ 320 */
208#define YY_CURRENT_BUFFER yy_current_buffer 321#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
322 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
323 : NULL)
209 324
325/* Same as previous macro, but useful when we know that the buffer stack is not
326 * NULL or when we need an lvalue. For internal use only.
327 */
328#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
329
330/* %if-c-only Standard (non-C++) definition */
331
332/* %if-not-reentrant */
333/* %not-for-header */
210 334
211/* yy_hold_char holds the character lost when yytext is formed. */ 335/* yy_hold_char holds the character lost when yytext is formed. */
212static char yy_hold_char; 336static char yy_hold_char;
213
214static int yy_n_chars; /* number of characters read into yy_ch_buf */ 337static int yy_n_chars; /* number of characters read into yy_ch_buf */
215
216
217int yyleng; 338int yyleng;
218 339
219/* Points to current character in buffer. */ 340/* Points to current character in buffer. */
220static char *yy_c_buf_p = (char *) 0; 341static char *yy_c_buf_p = (char *) 0;
221static int yy_init = 1; /* whether we need to initialize */ 342static int yy_init = 0; /* whether we need to initialize */
222static int yy_start = 0; /* start state number */ 343static int yy_start = 0; /* start state number */
223 344
224/* Flag which is used to allow yywrap()'s to do buffer switches 345/* Flag which is used to allow yywrap()'s to do buffer switches
225 * instead of setting up a fresh yyin. A bit of a hack ... 346 * instead of setting up a fresh yyin. A bit of a hack ...
226 */ 347 */
227static int yy_did_buffer_switch_on_eof; 348static int yy_did_buffer_switch_on_eof;
349/* %ok-for-header */
350
351/* %endif */
228 352
229void yyrestart YY_PROTO(( FILE *input_file )); 353void yyrestart (FILE *input_file );
354void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
355YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
356void yy_delete_buffer (YY_BUFFER_STATE b );
357void yy_flush_buffer (YY_BUFFER_STATE b );
358void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
359void yypop_buffer_state (void );
230 360
231void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 361static void yyensure_buffer_stack (void );
232void yy_load_buffer_state YY_PROTO(( void )); 362static void yy_load_buffer_state (void );
233YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 363static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
234void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
235void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
236void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
237#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238 364
239YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 365#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
240YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
241YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
242 366
243static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 367YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
244static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 368YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
245static void yy_flex_free YY_PROTO(( void * )); 369YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
370
371/* %endif */
372
373void *yyalloc (yy_size_t );
374void *yyrealloc (void *,yy_size_t );
375void yyfree (void * );
246 376
247#define yy_new_buffer yy_create_buffer 377#define yy_new_buffer yy_create_buffer
248 378
249#define yy_set_interactive(is_interactive) \ 379#define yy_set_interactive(is_interactive) \
250 { \ 380 { \
251 if ( ! yy_current_buffer ) \ 381 if ( ! YY_CURRENT_BUFFER ){ \
252 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 382 yyensure_buffer_stack (); \
253 yy_current_buffer->yy_is_interactive = is_interactive; \ 383 YY_CURRENT_BUFFER_LVALUE = \
384 yy_create_buffer(yyin,YY_BUF_SIZE ); \
385 } \
386 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
254 } 387 }
255 388
256#define yy_set_bol(at_bol) \ 389#define yy_set_bol(at_bol) \
257 { \ 390 { \
258 if ( ! yy_current_buffer ) \ 391 if ( ! YY_CURRENT_BUFFER ){\
259 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 392 yyensure_buffer_stack (); \
260 yy_current_buffer->yy_at_bol = at_bol; \ 393 YY_CURRENT_BUFFER_LVALUE = \
394 yy_create_buffer(yyin,YY_BUF_SIZE ); \
395 } \
396 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
261 } 397 }
262 398
263#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 399#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
264 400
401/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
402/* Begin user sect3 */
265 403
266#define yywrap() 1 404#define yywrap() 1
267#define YY_SKIP_YYWRAP 405#define YY_SKIP_YYWRAP
268 406
269#define FLEX_DEBUG 407#define FLEX_DEBUG
408
270typedef unsigned char YY_CHAR; 409typedef unsigned char YY_CHAR;
410
271FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 411FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
412
272typedef int yy_state_type; 413typedef int yy_state_type;
273 414
274#define FLEX_DEBUG 415extern int yylineno;
416
417int yylineno = 1;
418
275extern char *yytext; 419extern char *yytext;
276#define yytext_ptr yytext 420#define yytext_ptr yytext
277 421
278static yy_state_type yy_get_previous_state YY_PROTO(( void )); 422/* %if-c-only Standard (non-C++) definition */
279static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 423
280static int yy_get_next_buffer YY_PROTO(( void )); 424static yy_state_type yy_get_previous_state (void );
281static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 425static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
426static int yy_get_next_buffer (void );
427static void yy_fatal_error (yyconst char msg[] );
428
429/* %endif */
282 430
283/* Done after the current pattern has been matched and before the 431/* Done after the current pattern has been matched and before the
284 * corresponding action - sets up yytext. 432 * corresponding action - sets up yytext.
285 */ 433 */
286#define YY_DO_BEFORE_ACTION \ 434#define YY_DO_BEFORE_ACTION \
287 yytext_ptr = yy_bp; \ 435 (yytext_ptr) = yy_bp; \
288 yyleng = (int) (yy_cp - yy_bp); \ 436/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
289 yy_hold_char = *yy_cp; \ 437 yyleng = (size_t) (yy_cp - yy_bp); \
438 (yy_hold_char) = *yy_cp; \
290 *yy_cp = '\0'; \ 439 *yy_cp = '\0'; \
291 yy_c_buf_p = yy_cp; 440/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
441 (yy_c_buf_p) = yy_cp;
292 442
443/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
293#define YY_NUM_RULES 13 444#define YY_NUM_RULES 13
294#define YY_END_OF_BUFFER 14 445#define YY_END_OF_BUFFER 14
295static yyconst short int yy_accept[76] = 446/* This struct is not used in this scanner,
447 but its presence is necessary. */
448struct yy_trans_info
449 {
450 flex_int32_t yy_verify;
451 flex_int32_t yy_nxt;
452 };
453static yyconst flex_int16_t yy_accept[76] =
296 { 0, 454 { 0,
297 0, 0, 0, 0, 14, 12, 4, 3, 12, 7, 455 0, 0, 0, 0, 14, 12, 4, 3, 12, 7,
298 12, 12, 7, 12, 12, 12, 12, 12, 9, 9, 456 12, 12, 7, 12, 12, 12, 12, 12, 9, 9,
@@ -304,7 +462,7 @@ static yyconst short int yy_accept[76] =
304 0, 0, 0, 1, 0 462 0, 0, 0, 1, 0
305 } ; 463 } ;
306 464
307static yyconst int yy_ec[256] = 465static yyconst flex_int32_t yy_ec[256] =
308 { 0, 466 { 0,
309 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 467 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
310 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 468 4, 4, 4, 1, 1, 1, 1, 1, 1, 1,
@@ -336,14 +494,14 @@ static yyconst int yy_ec[256] =
336 1, 1, 1, 1, 1 494 1, 1, 1, 1, 1
337 } ; 495 } ;
338 496
339static yyconst int yy_meta[29] = 497static yyconst flex_int32_t yy_meta[29] =
340 { 0, 498 { 0,
341 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 499 1, 1, 2, 1, 1, 1, 3, 1, 1, 1,
342 4, 4, 5, 6, 6, 6, 1, 1, 1, 7, 500 4, 4, 5, 6, 6, 6, 1, 1, 1, 7,
343 8, 7, 3, 3, 3, 1, 3, 1 501 8, 7, 3, 3, 3, 1, 3, 1
344 } ; 502 } ;
345 503
346static yyconst short int yy_base[88] = 504static yyconst flex_int16_t yy_base[88] =
347 { 0, 505 { 0,
348 0, 147, 21, 140, 145, 284, 39, 284, 26, 0, 506 0, 147, 21, 140, 145, 284, 39, 284, 26, 0,
349 32, 126, 40, 44, 115, 35, 36, 46, 50, 53, 507 32, 126, 40, 44, 115, 35, 36, 46, 50, 53,
@@ -356,7 +514,7 @@ static yyconst short int yy_base[88] =
356 246, 250, 255, 256, 261, 267, 275 514 246, 250, 255, 256, 261, 267, 275
357 } ; 515 } ;
358 516
359static yyconst short int yy_def[88] = 517static yyconst flex_int16_t yy_def[88] =
360 { 0, 518 { 0,
361 75, 1, 1, 3, 75, 75, 75, 75, 76, 77, 519 75, 1, 1, 3, 75, 75, 75, 75, 76, 77,
362 78, 75, 77, 79, 75, 75, 75, 75, 75, 19, 520 78, 75, 77, 79, 75, 75, 75, 75, 75, 19,
@@ -369,7 +527,7 @@ static yyconst short int yy_def[88] =
369 75, 75, 75, 75, 75, 75, 75 527 75, 75, 75, 75, 75, 75, 75
370 } ; 528 } ;
371 529
372static yyconst short int yy_nxt[313] = 530static yyconst flex_int16_t yy_nxt[313] =
373 { 0, 531 { 0,
374 6, 7, 8, 7, 9, 6, 10, 6, 6, 11, 532 6, 7, 8, 7, 9, 6, 10, 6, 6, 11,
375 6, 6, 12, 6, 6, 6, 6, 6, 6, 10, 533 6, 6, 12, 6, 6, 6, 6, 6, 6, 10,
@@ -408,7 +566,7 @@ static yyconst short int yy_nxt[313] =
408 75, 75 566 75, 75
409 } ; 567 } ;
410 568
411static yyconst short int yy_chk[313] = 569static yyconst flex_int16_t yy_chk[313] =
412 { 0, 570 { 0,
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 571 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 572 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -453,7 +611,7 @@ static char *yy_last_accepting_cpos;
453extern int yy_flex_debug; 611extern int yy_flex_debug;
454int yy_flex_debug = 1; 612int yy_flex_debug = 1;
455 613
456static yyconst short int yy_rule_linenum[13] = 614static yyconst flex_int16_t yy_rule_linenum[13] =
457 { 0, 615 { 0,
458 69, 70, 71, 74, 77, 78, 79, 85, 86, 87, 616 69, 70, 71, 74, 77, 78, 79, 85, 86, 87,
459 89, 92 617 89, 92
@@ -468,7 +626,6 @@ static yyconst short int yy_rule_linenum[13] =
468#define YY_RESTORE_YY_MORE_OFFSET 626#define YY_RESTORE_YY_MORE_OFFSET
469char *yytext; 627char *yytext;
470#line 1 "scripts/genksyms/lex.l" 628#line 1 "scripts/genksyms/lex.l"
471#define INITIAL 0
472/* Lexical analysis for genksyms. 629/* Lexical analysis for genksyms.
473 Copyright 1996, 1997 Linux International. 630 Copyright 1996, 1997 Linux International.
474 631
@@ -506,10 +663,41 @@ char *yytext;
506 663
507/* Version 2 checksumming does proper tokenization; version 1 wasn't 664/* Version 2 checksumming does proper tokenization; version 1 wasn't
508 quite so pedantic. */ 665 quite so pedantic. */
509#define V2_TOKENS 1
510 666
511/* We don't do multiple input files. */ 667/* We don't do multiple input files. */
512#line 513 "scripts/genksyms/lex.c" 668#line 669 "scripts/genksyms/lex.c"
669
670#define INITIAL 0
671#define V2_TOKENS 1
672
673#ifndef YY_NO_UNISTD_H
674/* Special case for "unistd.h", since it is non-ANSI. We include it way
675 * down here because we want the user's section 1 to have been scanned first.
676 * The user has a chance to override it with an option.
677 */
678/* %if-c-only */
679#include <unistd.h>
680/* %endif */
681/* %if-c++-only */
682/* %endif */
683#endif
684
685#ifndef YY_EXTRA_TYPE
686#define YY_EXTRA_TYPE void *
687#endif
688
689/* %if-c-only Reentrant structure and macros (non-C++). */
690/* %if-reentrant */
691/* %if-c-only */
692
693static int yy_init_globals (void );
694
695/* %endif */
696/* %if-reentrant */
697/* %endif */
698/* %if-bison-bridge */
699/* %endif */
700/* %endif End reentrant structures and macros. */
513 701
514/* Macros after this point can all be overridden by user definitions in 702/* Macros after this point can all be overridden by user definitions in
515 * section 1. 703 * section 1.
@@ -517,66 +705,45 @@ char *yytext;
517 705
518#ifndef YY_SKIP_YYWRAP 706#ifndef YY_SKIP_YYWRAP
519#ifdef __cplusplus 707#ifdef __cplusplus
520extern "C" int yywrap YY_PROTO(( void )); 708extern "C" int yywrap (void );
521#else 709#else
522extern int yywrap YY_PROTO(( void )); 710extern int yywrap (void );
523#endif 711#endif
524#endif 712#endif
525 713
526#ifndef YY_NO_UNPUT 714/* %not-for-header */
527static void yyunput YY_PROTO(( int c, char *buf_ptr )); 715
528#endif 716 static void yyunput (int c,char *buf_ptr );
717
718/* %ok-for-header */
719
720/* %endif */
529 721
530#ifndef yytext_ptr 722#ifndef yytext_ptr
531static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 723static void yy_flex_strncpy (char *,yyconst char *,int );
532#endif 724#endif
533 725
534#ifdef YY_NEED_STRLEN 726#ifdef YY_NEED_STRLEN
535static int yy_flex_strlen YY_PROTO(( yyconst char * )); 727static int yy_flex_strlen (yyconst char * );
536#endif 728#endif
537 729
538#ifndef YY_NO_INPUT 730#ifndef YY_NO_INPUT
731/* %if-c-only Standard (non-C++) definition */
732/* %not-for-header */
733
539#ifdef __cplusplus 734#ifdef __cplusplus
540static int yyinput YY_PROTO(( void )); 735static int yyinput (void );
541#else 736#else
542static int input YY_PROTO(( void )); 737static int input (void );
543#endif
544#endif 738#endif
739/* %ok-for-header */
545 740
546#if YY_STACK_USED 741/* %endif */
547static int yy_start_stack_ptr = 0;
548static int yy_start_stack_depth = 0;
549static int *yy_start_stack = 0;
550#ifndef YY_NO_PUSH_STATE
551static void yy_push_state YY_PROTO(( int new_state ));
552#endif
553#ifndef YY_NO_POP_STATE
554static void yy_pop_state YY_PROTO(( void ));
555#endif
556#ifndef YY_NO_TOP_STATE
557static int yy_top_state YY_PROTO(( void ));
558#endif 742#endif
559 743
560#else 744/* %if-c-only */
561#define YY_NO_PUSH_STATE 1
562#define YY_NO_POP_STATE 1
563#define YY_NO_TOP_STATE 1
564#endif
565 745
566#ifdef YY_MALLOC_DECL 746/* %endif */
567YY_MALLOC_DECL
568#else
569#if __STDC__
570#ifndef __cplusplus
571#include <stdlib.h>
572#endif
573#else
574/* Just try to get by without declaring the routines. This will fail
575 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
576 * or sizeof(void*) != sizeof(int).
577 */
578#endif
579#endif
580 747
581/* Amount of stuff to slurp up with each read. */ 748/* Amount of stuff to slurp up with each read. */
582#ifndef YY_READ_BUF_SIZE 749#ifndef YY_READ_BUF_SIZE
@@ -584,12 +751,15 @@ YY_MALLOC_DECL
584#endif 751#endif
585 752
586/* Copy whatever the last rule matched to the standard output. */ 753/* Copy whatever the last rule matched to the standard output. */
587
588#ifndef ECHO 754#ifndef ECHO
755/* %if-c-only Standard (non-C++) definition */
589/* This used to be an fputs(), but since the string might contain NUL's, 756/* This used to be an fputs(), but since the string might contain NUL's,
590 * we now use fwrite(). 757 * we now use fwrite().
591 */ 758 */
592#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 759#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
760/* %endif */
761/* %if-c++-only C++ definition */
762/* %endif */
593#endif 763#endif
594 764
595/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 765/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -597,9 +767,11 @@ YY_MALLOC_DECL
597 */ 767 */
598#ifndef YY_INPUT 768#ifndef YY_INPUT
599#define YY_INPUT(buf,result,max_size) \ 769#define YY_INPUT(buf,result,max_size) \
600 if ( yy_current_buffer->yy_is_interactive ) \ 770/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
771 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
601 { \ 772 { \
602 int c = '*', n; \ 773 int c = '*'; \
774 size_t n; \
603 for ( n = 0; n < max_size && \ 775 for ( n = 0; n < max_size && \
604 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 776 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
605 buf[n] = (char) c; \ 777 buf[n] = (char) c; \
@@ -609,9 +781,24 @@ YY_MALLOC_DECL
609 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 781 YY_FATAL_ERROR( "input in flex scanner failed" ); \
610 result = n; \ 782 result = n; \
611 } \ 783 } \
612 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 784 else \
613 && ferror( yyin ) ) \ 785 { \
614 YY_FATAL_ERROR( "input in flex scanner failed" ); 786 errno=0; \
787 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
788 { \
789 if( errno != EINTR) \
790 { \
791 YY_FATAL_ERROR( "input in flex scanner failed" ); \
792 break; \
793 } \
794 errno=0; \
795 clearerr(yyin); \
796 } \
797 }\
798\
799/* %if-c++-only C++ definition \ */\
800/* %endif */
801
615#endif 802#endif
616 803
617/* No semi-colon after return; correct usage is to write "yyterminate();" - 804/* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -629,15 +816,40 @@ YY_MALLOC_DECL
629 816
630/* Report a fatal error. */ 817/* Report a fatal error. */
631#ifndef YY_FATAL_ERROR 818#ifndef YY_FATAL_ERROR
819/* %if-c-only */
632#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 820#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
821/* %endif */
822/* %if-c++-only */
823/* %endif */
633#endif 824#endif
634 825
826/* %if-tables-serialization structures and prototypes */
827/* %not-for-header */
828
829/* %ok-for-header */
830
831/* %not-for-header */
832
833/* %tables-yydmap generated elements */
834/* %endif */
835/* end tables serialization structures and prototypes */
836
837/* %ok-for-header */
838
635/* Default declaration of generated scanner - a define so the user can 839/* Default declaration of generated scanner - a define so the user can
636 * easily add parameters. 840 * easily add parameters.
637 */ 841 */
638#ifndef YY_DECL 842#ifndef YY_DECL
639#define YY_DECL int yylex YY_PROTO(( void )) 843#define YY_DECL_IS_OURS 1
640#endif 844/* %if-c-only Standard (non-C++) definition */
845
846extern int yylex (void);
847
848#define YY_DECL int yylex (void)
849/* %endif */
850/* %if-c++-only C++ definition */
851/* %endif */
852#endif /* !YY_DECL */
641 853
642/* Code executed at the beginning of each rule, after yytext and yyleng 854/* Code executed at the beginning of each rule, after yytext and yyleng
643 * have been set up. 855 * have been set up.
@@ -651,62 +863,80 @@ YY_MALLOC_DECL
651#define YY_BREAK break; 863#define YY_BREAK break;
652#endif 864#endif
653 865
866/* %% [6.0] YY_RULE_SETUP definition goes here */
654#define YY_RULE_SETUP \ 867#define YY_RULE_SETUP \
655 if ( yyleng > 0 ) \ 868 if ( yyleng > 0 ) \
656 yy_current_buffer->yy_at_bol = \ 869 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
657 (yytext[yyleng - 1] == '\n'); \ 870 (yytext[yyleng - 1] == '\n'); \
658 YY_USER_ACTION 871 YY_USER_ACTION
659 872
873/* %not-for-header */
874
875/** The main scanner function which does all the work.
876 */
660YY_DECL 877YY_DECL
661 { 878{
662 register yy_state_type yy_current_state; 879 register yy_state_type yy_current_state;
663 register char *yy_cp = NULL, *yy_bp = NULL; 880 register char *yy_cp, *yy_bp;
664 register int yy_act; 881 register int yy_act;
665 882
883/* %% [7.0] user's declarations go here */
666#line 65 "scripts/genksyms/lex.l" 884#line 65 "scripts/genksyms/lex.l"
667 885
668 886
669 887
670 /* Keep track of our location in the original source files. */ 888 /* Keep track of our location in the original source files. */
671#line 672 "scripts/genksyms/lex.c" 889#line 890 "scripts/genksyms/lex.c"
672 890
673 if ( yy_init ) 891 if ( !(yy_init) )
674 { 892 {
675 yy_init = 0; 893 (yy_init) = 1;
676 894
677#ifdef YY_USER_INIT 895#ifdef YY_USER_INIT
678 YY_USER_INIT; 896 YY_USER_INIT;
679#endif 897#endif
680 898
681 if ( ! yy_start ) 899 if ( ! (yy_start) )
682 yy_start = 1; /* first start state */ 900 (yy_start) = 1; /* first start state */
683 901
684 if ( ! yyin ) 902 if ( ! yyin )
903/* %if-c-only */
685 yyin = stdin; 904 yyin = stdin;
905/* %endif */
906/* %if-c++-only */
907/* %endif */
686 908
687 if ( ! yyout ) 909 if ( ! yyout )
910/* %if-c-only */
688 yyout = stdout; 911 yyout = stdout;
912/* %endif */
913/* %if-c++-only */
914/* %endif */
915
916 if ( ! YY_CURRENT_BUFFER ) {
917 yyensure_buffer_stack ();
918 YY_CURRENT_BUFFER_LVALUE =
919 yy_create_buffer(yyin,YY_BUF_SIZE );
920 }
689 921
690 if ( ! yy_current_buffer ) 922 yy_load_buffer_state( );
691 yy_current_buffer =
692 yy_create_buffer( yyin, YY_BUF_SIZE );
693
694 yy_load_buffer_state();
695 } 923 }
696 924
697 while ( 1 ) /* loops until end-of-file is reached */ 925 while ( 1 ) /* loops until end-of-file is reached */
698 { 926 {
699 yy_cp = yy_c_buf_p; 927/* %% [8.0] yymore()-related code goes here */
928 yy_cp = (yy_c_buf_p);
700 929
701 /* Support of yytext. */ 930 /* Support of yytext. */
702 *yy_cp = yy_hold_char; 931 *yy_cp = (yy_hold_char);
703 932
704 /* yy_bp points to the position in yy_ch_buf of the start of 933 /* yy_bp points to the position in yy_ch_buf of the start of
705 * the current run. 934 * the current run.
706 */ 935 */
707 yy_bp = yy_cp; 936 yy_bp = yy_cp;
708 937
709 yy_current_state = yy_start; 938/* %% [9.0] code to set up and find next match goes here */
939 yy_current_state = (yy_start);
710 yy_current_state += YY_AT_BOL(); 940 yy_current_state += YY_AT_BOL();
711yy_match: 941yy_match:
712 do 942 do
@@ -714,8 +944,8 @@ yy_match:
714 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 944 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
715 if ( yy_accept[yy_current_state] ) 945 if ( yy_accept[yy_current_state] )
716 { 946 {
717 yy_last_accepting_state = yy_current_state; 947 (yy_last_accepting_state) = yy_current_state;
718 yy_last_accepting_cpos = yy_cp; 948 (yy_last_accepting_cpos) = yy_cp;
719 } 949 }
720 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 950 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
721 { 951 {
@@ -729,26 +959,29 @@ yy_match:
729 while ( yy_base[yy_current_state] != 284 ); 959 while ( yy_base[yy_current_state] != 284 );
730 960
731yy_find_action: 961yy_find_action:
962/* %% [10.0] code to find the action number goes here */
732 yy_act = yy_accept[yy_current_state]; 963 yy_act = yy_accept[yy_current_state];
733 if ( yy_act == 0 ) 964 if ( yy_act == 0 )
734 { /* have to back up */ 965 { /* have to back up */
735 yy_cp = yy_last_accepting_cpos; 966 yy_cp = (yy_last_accepting_cpos);
736 yy_current_state = yy_last_accepting_state; 967 yy_current_state = (yy_last_accepting_state);
737 yy_act = yy_accept[yy_current_state]; 968 yy_act = yy_accept[yy_current_state];
738 } 969 }
739 970
740 YY_DO_BEFORE_ACTION; 971 YY_DO_BEFORE_ACTION;
741 972
973/* %% [11.0] code for yylineno update goes here */
742 974
743do_action: /* This label is used only to access EOF actions. */ 975do_action: /* This label is used only to access EOF actions. */
744 976
977/* %% [12.0] debug code goes here */
745 if ( yy_flex_debug ) 978 if ( yy_flex_debug )
746 { 979 {
747 if ( yy_act == 0 ) 980 if ( yy_act == 0 )
748 fprintf( stderr, "--scanner backing up\n" ); 981 fprintf( stderr, "--scanner backing up\n" );
749 else if ( yy_act < 13 ) 982 else if ( yy_act < 13 )
750 fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", 983 fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
751 yy_rule_linenum[yy_act], yytext ); 984 (long)yy_rule_linenum[yy_act], yytext );
752 else if ( yy_act == 13 ) 985 else if ( yy_act == 13 )
753 fprintf( stderr, "--accepting default rule (\"%s\")\n", 986 fprintf( stderr, "--accepting default rule (\"%s\")\n",
754 yytext ); 987 yytext );
@@ -760,24 +993,28 @@ do_action: /* This label is used only to access EOF actions. */
760 993
761 switch ( yy_act ) 994 switch ( yy_act )
762 { /* beginning of action switch */ 995 { /* beginning of action switch */
996/* %% [13.0] actions go here */
763 case 0: /* must back up */ 997 case 0: /* must back up */
764 /* undo the effects of YY_DO_BEFORE_ACTION */ 998 /* undo the effects of YY_DO_BEFORE_ACTION */
765 *yy_cp = yy_hold_char; 999 *yy_cp = (yy_hold_char);
766 yy_cp = yy_last_accepting_cpos; 1000 yy_cp = (yy_last_accepting_cpos);
767 yy_current_state = yy_last_accepting_state; 1001 yy_current_state = (yy_last_accepting_state);
768 goto yy_find_action; 1002 goto yy_find_action;
769 1003
770case 1: 1004case 1:
1005/* rule 1 can match eol */
771YY_RULE_SETUP 1006YY_RULE_SETUP
772#line 69 "scripts/genksyms/lex.l" 1007#line 69 "scripts/genksyms/lex.l"
773return FILENAME; 1008return FILENAME;
774 YY_BREAK 1009 YY_BREAK
775case 2: 1010case 2:
1011/* rule 2 can match eol */
776YY_RULE_SETUP 1012YY_RULE_SETUP
777#line 70 "scripts/genksyms/lex.l" 1013#line 70 "scripts/genksyms/lex.l"
778cur_line++; 1014cur_line++;
779 YY_BREAK 1015 YY_BREAK
780case 3: 1016case 3:
1017/* rule 3 can match eol */
781YY_RULE_SETUP 1018YY_RULE_SETUP
782#line 71 "scripts/genksyms/lex.l" 1019#line 71 "scripts/genksyms/lex.l"
783cur_line++; 1020cur_line++;
@@ -789,11 +1026,13 @@ YY_RULE_SETUP
789; 1026;
790 YY_BREAK 1027 YY_BREAK
791case 5: 1028case 5:
1029/* rule 5 can match eol */
792YY_RULE_SETUP 1030YY_RULE_SETUP
793#line 77 "scripts/genksyms/lex.l" 1031#line 77 "scripts/genksyms/lex.l"
794return STRING; 1032return STRING;
795 YY_BREAK 1033 YY_BREAK
796case 6: 1034case 6:
1035/* rule 6 can match eol */
797YY_RULE_SETUP 1036YY_RULE_SETUP
798#line 78 "scripts/genksyms/lex.l" 1037#line 78 "scripts/genksyms/lex.l"
799return CHAR; 1038return CHAR;
@@ -838,7 +1077,7 @@ YY_RULE_SETUP
838#line 95 "scripts/genksyms/lex.l" 1077#line 95 "scripts/genksyms/lex.l"
839ECHO; 1078ECHO;
840 YY_BREAK 1079 YY_BREAK
841#line 842 "scripts/genksyms/lex.c" 1080#line 1081 "scripts/genksyms/lex.c"
842case YY_STATE_EOF(INITIAL): 1081case YY_STATE_EOF(INITIAL):
843case YY_STATE_EOF(V2_TOKENS): 1082case YY_STATE_EOF(V2_TOKENS):
844 yyterminate(); 1083 yyterminate();
@@ -846,26 +1085,26 @@ case YY_STATE_EOF(V2_TOKENS):
846 case YY_END_OF_BUFFER: 1085 case YY_END_OF_BUFFER:
847 { 1086 {
848 /* Amount of text matched not including the EOB char. */ 1087 /* Amount of text matched not including the EOB char. */
849 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 1088 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
850 1089
851 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1090 /* Undo the effects of YY_DO_BEFORE_ACTION. */
852 *yy_cp = yy_hold_char; 1091 *yy_cp = (yy_hold_char);
853 YY_RESTORE_YY_MORE_OFFSET 1092 YY_RESTORE_YY_MORE_OFFSET
854 1093
855 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 1094 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
856 { 1095 {
857 /* We're scanning a new file or input source. It's 1096 /* We're scanning a new file or input source. It's
858 * possible that this happened because the user 1097 * possible that this happened because the user
859 * just pointed yyin at a new source and called 1098 * just pointed yyin at a new source and called
860 * yylex(). If so, then we have to assure 1099 * yylex(). If so, then we have to assure
861 * consistency between yy_current_buffer and our 1100 * consistency between YY_CURRENT_BUFFER and our
862 * globals. Here is the right place to do so, because 1101 * globals. Here is the right place to do so, because
863 * this is the first action (other than possibly a 1102 * this is the first action (other than possibly a
864 * back-up) that will match for the new input source. 1103 * back-up) that will match for the new input source.
865 */ 1104 */
866 yy_n_chars = yy_current_buffer->yy_n_chars; 1105 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
867 yy_current_buffer->yy_input_file = yyin; 1106 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
868 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 1107 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
869 } 1108 }
870 1109
871 /* Note that here we test for yy_c_buf_p "<=" to the position 1110 /* Note that here we test for yy_c_buf_p "<=" to the position
@@ -875,13 +1114,13 @@ case YY_STATE_EOF(V2_TOKENS):
875 * end-of-buffer state). Contrast this with the test 1114 * end-of-buffer state). Contrast this with the test
876 * in input(). 1115 * in input().
877 */ 1116 */
878 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1117 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
879 { /* This was really a NUL. */ 1118 { /* This was really a NUL. */
880 yy_state_type yy_next_state; 1119 yy_state_type yy_next_state;
881 1120
882 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 1121 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
883 1122
884 yy_current_state = yy_get_previous_state(); 1123 yy_current_state = yy_get_previous_state( );
885 1124
886 /* Okay, we're now positioned to make the NUL 1125 /* Okay, we're now positioned to make the NUL
887 * transition. We couldn't have 1126 * transition. We couldn't have
@@ -894,30 +1133,31 @@ case YY_STATE_EOF(V2_TOKENS):
894 1133
895 yy_next_state = yy_try_NUL_trans( yy_current_state ); 1134 yy_next_state = yy_try_NUL_trans( yy_current_state );
896 1135
897 yy_bp = yytext_ptr + YY_MORE_ADJ; 1136 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
898 1137
899 if ( yy_next_state ) 1138 if ( yy_next_state )
900 { 1139 {
901 /* Consume the NUL. */ 1140 /* Consume the NUL. */
902 yy_cp = ++yy_c_buf_p; 1141 yy_cp = ++(yy_c_buf_p);
903 yy_current_state = yy_next_state; 1142 yy_current_state = yy_next_state;
904 goto yy_match; 1143 goto yy_match;
905 } 1144 }
906 1145
907 else 1146 else
908 { 1147 {
909 yy_cp = yy_c_buf_p; 1148/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1149 yy_cp = (yy_c_buf_p);
910 goto yy_find_action; 1150 goto yy_find_action;
911 } 1151 }
912 } 1152 }
913 1153
914 else switch ( yy_get_next_buffer() ) 1154 else switch ( yy_get_next_buffer( ) )
915 { 1155 {
916 case EOB_ACT_END_OF_FILE: 1156 case EOB_ACT_END_OF_FILE:
917 { 1157 {
918 yy_did_buffer_switch_on_eof = 0; 1158 (yy_did_buffer_switch_on_eof) = 0;
919 1159
920 if ( yywrap() ) 1160 if ( yywrap( ) )
921 { 1161 {
922 /* Note: because we've taken care in 1162 /* Note: because we've taken care in
923 * yy_get_next_buffer() to have set up 1163 * yy_get_next_buffer() to have set up
@@ -928,7 +1168,7 @@ case YY_STATE_EOF(V2_TOKENS):
928 * YY_NULL, it'll still work - another 1168 * YY_NULL, it'll still work - another
929 * YY_NULL will get returned. 1169 * YY_NULL will get returned.
930 */ 1170 */
931 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 1171 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
932 1172
933 yy_act = YY_STATE_EOF(YY_START); 1173 yy_act = YY_STATE_EOF(YY_START);
934 goto do_action; 1174 goto do_action;
@@ -936,30 +1176,30 @@ case YY_STATE_EOF(V2_TOKENS):
936 1176
937 else 1177 else
938 { 1178 {
939 if ( ! yy_did_buffer_switch_on_eof ) 1179 if ( ! (yy_did_buffer_switch_on_eof) )
940 YY_NEW_FILE; 1180 YY_NEW_FILE;
941 } 1181 }
942 break; 1182 break;
943 } 1183 }
944 1184
945 case EOB_ACT_CONTINUE_SCAN: 1185 case EOB_ACT_CONTINUE_SCAN:
946 yy_c_buf_p = 1186 (yy_c_buf_p) =
947 yytext_ptr + yy_amount_of_matched_text; 1187 (yytext_ptr) + yy_amount_of_matched_text;
948 1188
949 yy_current_state = yy_get_previous_state(); 1189 yy_current_state = yy_get_previous_state( );
950 1190
951 yy_cp = yy_c_buf_p; 1191 yy_cp = (yy_c_buf_p);
952 yy_bp = yytext_ptr + YY_MORE_ADJ; 1192 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
953 goto yy_match; 1193 goto yy_match;
954 1194
955 case EOB_ACT_LAST_MATCH: 1195 case EOB_ACT_LAST_MATCH:
956 yy_c_buf_p = 1196 (yy_c_buf_p) =
957 &yy_current_buffer->yy_ch_buf[yy_n_chars]; 1197 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
958 1198
959 yy_current_state = yy_get_previous_state(); 1199 yy_current_state = yy_get_previous_state( );
960 1200
961 yy_cp = yy_c_buf_p; 1201 yy_cp = (yy_c_buf_p);
962 yy_bp = yytext_ptr + YY_MORE_ADJ; 1202 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
963 goto yy_find_action; 1203 goto yy_find_action;
964 } 1204 }
965 break; 1205 break;
@@ -970,8 +1210,15 @@ case YY_STATE_EOF(V2_TOKENS):
970 "fatal flex scanner internal error--no action found" ); 1210 "fatal flex scanner internal error--no action found" );
971 } /* end of action switch */ 1211 } /* end of action switch */
972 } /* end of scanning one token */ 1212 } /* end of scanning one token */
973 } /* end of yylex */ 1213} /* end of yylex */
1214/* %ok-for-header */
974 1215
1216/* %if-c++-only */
1217/* %not-for-header */
1218
1219/* %ok-for-header */
1220
1221/* %endif */
975 1222
976/* yy_get_next_buffer - try to read in a new buffer 1223/* yy_get_next_buffer - try to read in a new buffer
977 * 1224 *
@@ -980,21 +1227,24 @@ case YY_STATE_EOF(V2_TOKENS):
980 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 1227 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
981 * EOB_ACT_END_OF_FILE - end of file 1228 * EOB_ACT_END_OF_FILE - end of file
982 */ 1229 */
983 1230/* %if-c-only */
984static int yy_get_next_buffer() 1231static int yy_get_next_buffer (void)
985 { 1232/* %endif */
986 register char *dest = yy_current_buffer->yy_ch_buf; 1233/* %if-c++-only */
987 register char *source = yytext_ptr; 1234/* %endif */
1235{
1236 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1237 register char *source = (yytext_ptr);
988 register int number_to_move, i; 1238 register int number_to_move, i;
989 int ret_val; 1239 int ret_val;
990 1240
991 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 1241 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
992 YY_FATAL_ERROR( 1242 YY_FATAL_ERROR(
993 "fatal flex scanner internal error--end of buffer missed" ); 1243 "fatal flex scanner internal error--end of buffer missed" );
994 1244
995 if ( yy_current_buffer->yy_fill_buffer == 0 ) 1245 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
996 { /* Don't try to fill the buffer, so this is an EOF. */ 1246 { /* Don't try to fill the buffer, so this is an EOF. */
997 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 1247 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
998 { 1248 {
999 /* We matched a single character, the EOB, so 1249 /* We matched a single character, the EOB, so
1000 * treat this as a final EOF. 1250 * treat this as a final EOF.
@@ -1014,34 +1264,30 @@ static int yy_get_next_buffer()
1014 /* Try to read more data. */ 1264 /* Try to read more data. */
1015 1265
1016 /* First move last chars to start of buffer. */ 1266 /* First move last chars to start of buffer. */
1017 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 1267 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1018 1268
1019 for ( i = 0; i < number_to_move; ++i ) 1269 for ( i = 0; i < number_to_move; ++i )
1020 *(dest++) = *(source++); 1270 *(dest++) = *(source++);
1021 1271
1022 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1272 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1023 /* don't do the read, it's not guaranteed to return an EOF, 1273 /* don't do the read, it's not guaranteed to return an EOF,
1024 * just force an EOF 1274 * just force an EOF
1025 */ 1275 */
1026 yy_current_buffer->yy_n_chars = yy_n_chars = 0; 1276 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1027 1277
1028 else 1278 else
1029 { 1279 {
1030 int num_to_read = 1280 int num_to_read =
1031 yy_current_buffer->yy_buf_size - number_to_move - 1; 1281 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1032 1282
1033 while ( num_to_read <= 0 ) 1283 while ( num_to_read <= 0 )
1034 { /* Not enough room in the buffer - grow it. */ 1284 { /* Not enough room in the buffer - grow it. */
1035#ifdef YY_USES_REJECT
1036 YY_FATAL_ERROR(
1037"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1038#else
1039 1285
1040 /* just a shorter name for the current buffer */ 1286 /* just a shorter name for the current buffer */
1041 YY_BUFFER_STATE b = yy_current_buffer; 1287 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1042 1288
1043 int yy_c_buf_p_offset = 1289 int yy_c_buf_p_offset =
1044 (int) (yy_c_buf_p - b->yy_ch_buf); 1290 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1045 1291
1046 if ( b->yy_is_our_buffer ) 1292 if ( b->yy_is_our_buffer )
1047 { 1293 {
@@ -1054,8 +1300,7 @@ static int yy_get_next_buffer()
1054 1300
1055 b->yy_ch_buf = (char *) 1301 b->yy_ch_buf = (char *)
1056 /* Include room in for 2 EOB chars. */ 1302 /* Include room in for 2 EOB chars. */
1057 yy_flex_realloc( (void *) b->yy_ch_buf, 1303 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1058 b->yy_buf_size + 2 );
1059 } 1304 }
1060 else 1305 else
1061 /* Can't grow it, we don't own it. */ 1306 /* Can't grow it, we don't own it. */
@@ -1065,35 +1310,35 @@ static int yy_get_next_buffer()
1065 YY_FATAL_ERROR( 1310 YY_FATAL_ERROR(
1066 "fatal error - scanner input buffer overflow" ); 1311 "fatal error - scanner input buffer overflow" );
1067 1312
1068 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 1313 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1069 1314
1070 num_to_read = yy_current_buffer->yy_buf_size - 1315 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1071 number_to_move - 1; 1316 number_to_move - 1;
1072#endif 1317
1073 } 1318 }
1074 1319
1075 if ( num_to_read > YY_READ_BUF_SIZE ) 1320 if ( num_to_read > YY_READ_BUF_SIZE )
1076 num_to_read = YY_READ_BUF_SIZE; 1321 num_to_read = YY_READ_BUF_SIZE;
1077 1322
1078 /* Read in more data. */ 1323 /* Read in more data. */
1079 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 1324 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1080 yy_n_chars, num_to_read ); 1325 (yy_n_chars), (size_t) num_to_read );
1081 1326
1082 yy_current_buffer->yy_n_chars = yy_n_chars; 1327 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1083 } 1328 }
1084 1329
1085 if ( yy_n_chars == 0 ) 1330 if ( (yy_n_chars) == 0 )
1086 { 1331 {
1087 if ( number_to_move == YY_MORE_ADJ ) 1332 if ( number_to_move == YY_MORE_ADJ )
1088 { 1333 {
1089 ret_val = EOB_ACT_END_OF_FILE; 1334 ret_val = EOB_ACT_END_OF_FILE;
1090 yyrestart( yyin ); 1335 yyrestart(yyin );
1091 } 1336 }
1092 1337
1093 else 1338 else
1094 { 1339 {
1095 ret_val = EOB_ACT_LAST_MATCH; 1340 ret_val = EOB_ACT_LAST_MATCH;
1096 yy_current_buffer->yy_buffer_status = 1341 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1097 YY_BUFFER_EOF_PENDING; 1342 YY_BUFFER_EOF_PENDING;
1098 } 1343 }
1099 } 1344 }
@@ -1101,33 +1346,40 @@ static int yy_get_next_buffer()
1101 else 1346 else
1102 ret_val = EOB_ACT_CONTINUE_SCAN; 1347 ret_val = EOB_ACT_CONTINUE_SCAN;
1103 1348
1104 yy_n_chars += number_to_move; 1349 (yy_n_chars) += number_to_move;
1105 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 1350 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1106 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 1351 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1107 1352
1108 yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 1353 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1109 1354
1110 return ret_val; 1355 return ret_val;
1111 } 1356}
1112
1113 1357
1114/* yy_get_previous_state - get the state just before the EOB char was reached */ 1358/* yy_get_previous_state - get the state just before the EOB char was reached */
1115 1359
1116static yy_state_type yy_get_previous_state() 1360/* %if-c-only */
1117 { 1361/* %not-for-header */
1362
1363 static yy_state_type yy_get_previous_state (void)
1364/* %endif */
1365/* %if-c++-only */
1366/* %endif */
1367{
1118 register yy_state_type yy_current_state; 1368 register yy_state_type yy_current_state;
1119 register char *yy_cp; 1369 register char *yy_cp;
1120 1370
1121 yy_current_state = yy_start; 1371/* %% [15.0] code to get the start state into yy_current_state goes here */
1372 yy_current_state = (yy_start);
1122 yy_current_state += YY_AT_BOL(); 1373 yy_current_state += YY_AT_BOL();
1123 1374
1124 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 1375 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1125 { 1376 {
1377/* %% [16.0] code to find the next state goes here */
1126 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1378 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1127 if ( yy_accept[yy_current_state] ) 1379 if ( yy_accept[yy_current_state] )
1128 { 1380 {
1129 yy_last_accepting_state = yy_current_state; 1381 (yy_last_accepting_state) = yy_current_state;
1130 yy_last_accepting_cpos = yy_cp; 1382 (yy_last_accepting_cpos) = yy_cp;
1131 } 1383 }
1132 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1384 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1133 { 1385 {
@@ -1139,30 +1391,28 @@ static yy_state_type yy_get_previous_state()
1139 } 1391 }
1140 1392
1141 return yy_current_state; 1393 return yy_current_state;
1142 } 1394}
1143
1144 1395
1145/* yy_try_NUL_trans - try to make a transition on the NUL character 1396/* yy_try_NUL_trans - try to make a transition on the NUL character
1146 * 1397 *
1147 * synopsis 1398 * synopsis
1148 * next_state = yy_try_NUL_trans( current_state ); 1399 * next_state = yy_try_NUL_trans( current_state );
1149 */ 1400 */
1150 1401/* %if-c-only */
1151#ifdef YY_USE_PROTOS 1402 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1152static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 1403/* %endif */
1153#else 1404/* %if-c++-only */
1154static yy_state_type yy_try_NUL_trans( yy_current_state ) 1405/* %endif */
1155yy_state_type yy_current_state; 1406{
1156#endif
1157 {
1158 register int yy_is_jam; 1407 register int yy_is_jam;
1159 register char *yy_cp = yy_c_buf_p; 1408 /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
1409 register char *yy_cp = (yy_c_buf_p);
1160 1410
1161 register YY_CHAR yy_c = 1; 1411 register YY_CHAR yy_c = 1;
1162 if ( yy_accept[yy_current_state] ) 1412 if ( yy_accept[yy_current_state] )
1163 { 1413 {
1164 yy_last_accepting_state = yy_current_state; 1414 (yy_last_accepting_state) = yy_current_state;
1165 yy_last_accepting_cpos = yy_cp; 1415 (yy_last_accepting_cpos) = yy_cp;
1166 } 1416 }
1167 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1417 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1168 { 1418 {
@@ -1174,80 +1424,87 @@ yy_state_type yy_current_state;
1174 yy_is_jam = (yy_current_state == 75); 1424 yy_is_jam = (yy_current_state == 75);
1175 1425
1176 return yy_is_jam ? 0 : yy_current_state; 1426 return yy_is_jam ? 0 : yy_current_state;
1177 } 1427}
1178 1428
1429/* %if-c-only */
1179 1430
1180#ifndef YY_NO_UNPUT 1431 static void yyunput (int c, register char * yy_bp )
1181#ifdef YY_USE_PROTOS 1432/* %endif */
1182static void yyunput( int c, register char *yy_bp ) 1433/* %if-c++-only */
1183#else 1434/* %endif */
1184static void yyunput( c, yy_bp ) 1435{
1185int c; 1436 register char *yy_cp;
1186register char *yy_bp; 1437
1187#endif 1438 yy_cp = (yy_c_buf_p);
1188 {
1189 register char *yy_cp = yy_c_buf_p;
1190 1439
1191 /* undo effects of setting up yytext */ 1440 /* undo effects of setting up yytext */
1192 *yy_cp = yy_hold_char; 1441 *yy_cp = (yy_hold_char);
1193 1442
1194 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1443 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1195 { /* need to shift things up to make room */ 1444 { /* need to shift things up to make room */
1196 /* +2 for EOB chars. */ 1445 /* +2 for EOB chars. */
1197 register int number_to_move = yy_n_chars + 2; 1446 register int number_to_move = (yy_n_chars) + 2;
1198 register char *dest = &yy_current_buffer->yy_ch_buf[ 1447 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1199 yy_current_buffer->yy_buf_size + 2]; 1448 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1200 register char *source = 1449 register char *source =
1201 &yy_current_buffer->yy_ch_buf[number_to_move]; 1450 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1202 1451
1203 while ( source > yy_current_buffer->yy_ch_buf ) 1452 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1204 *--dest = *--source; 1453 *--dest = *--source;
1205 1454
1206 yy_cp += (int) (dest - source); 1455 yy_cp += (int) (dest - source);
1207 yy_bp += (int) (dest - source); 1456 yy_bp += (int) (dest - source);
1208 yy_current_buffer->yy_n_chars = 1457 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1209 yy_n_chars = yy_current_buffer->yy_buf_size; 1458 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1210 1459
1211 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1460 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1212 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1461 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1213 } 1462 }
1214 1463
1215 *--yy_cp = (char) c; 1464 *--yy_cp = (char) c;
1216 1465
1466/* %% [18.0] update yylineno here */
1217 1467
1218 yytext_ptr = yy_bp; 1468 (yytext_ptr) = yy_bp;
1219 yy_hold_char = *yy_cp; 1469 (yy_hold_char) = *yy_cp;
1220 yy_c_buf_p = yy_cp; 1470 (yy_c_buf_p) = yy_cp;
1221 } 1471}
1222#endif /* ifndef YY_NO_UNPUT */ 1472/* %if-c-only */
1223 1473
1474/* %endif */
1224 1475
1476/* %if-c-only */
1477#ifndef YY_NO_INPUT
1225#ifdef __cplusplus 1478#ifdef __cplusplus
1226static int yyinput() 1479 static int yyinput (void)
1227#else 1480#else
1228static int input() 1481 static int input (void)
1229#endif 1482#endif
1230 {
1231 int c;
1232 1483
1233 *yy_c_buf_p = yy_hold_char; 1484/* %endif */
1485/* %if-c++-only */
1486/* %endif */
1487{
1488 int c;
1489
1490 *(yy_c_buf_p) = (yy_hold_char);
1234 1491
1235 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 1492 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1236 { 1493 {
1237 /* yy_c_buf_p now points to the character we want to return. 1494 /* yy_c_buf_p now points to the character we want to return.
1238 * If this occurs *before* the EOB characters, then it's a 1495 * If this occurs *before* the EOB characters, then it's a
1239 * valid NUL; if not, then we've hit the end of the buffer. 1496 * valid NUL; if not, then we've hit the end of the buffer.
1240 */ 1497 */
1241 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1498 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1242 /* This was really a NUL. */ 1499 /* This was really a NUL. */
1243 *yy_c_buf_p = '\0'; 1500 *(yy_c_buf_p) = '\0';
1244 1501
1245 else 1502 else
1246 { /* need more input */ 1503 { /* need more input */
1247 int offset = yy_c_buf_p - yytext_ptr; 1504 int offset = (yy_c_buf_p) - (yytext_ptr);
1248 ++yy_c_buf_p; 1505 ++(yy_c_buf_p);
1249 1506
1250 switch ( yy_get_next_buffer() ) 1507 switch ( yy_get_next_buffer( ) )
1251 { 1508 {
1252 case EOB_ACT_LAST_MATCH: 1509 case EOB_ACT_LAST_MATCH:
1253 /* This happens because yy_g_n_b() 1510 /* This happens because yy_g_n_b()
@@ -1261,16 +1518,16 @@ static int input()
1261 */ 1518 */
1262 1519
1263 /* Reset buffer status. */ 1520 /* Reset buffer status. */
1264 yyrestart( yyin ); 1521 yyrestart(yyin );
1265 1522
1266 /* fall through */ 1523 /*FALLTHROUGH*/
1267 1524
1268 case EOB_ACT_END_OF_FILE: 1525 case EOB_ACT_END_OF_FILE:
1269 { 1526 {
1270 if ( yywrap() ) 1527 if ( yywrap( ) )
1271 return EOF; 1528 return EOF;
1272 1529
1273 if ( ! yy_did_buffer_switch_on_eof ) 1530 if ( ! (yy_did_buffer_switch_on_eof) )
1274 YY_NEW_FILE; 1531 YY_NEW_FILE;
1275#ifdef __cplusplus 1532#ifdef __cplusplus
1276 return yyinput(); 1533 return yyinput();
@@ -1280,91 +1537,113 @@ static int input()
1280 } 1537 }
1281 1538
1282 case EOB_ACT_CONTINUE_SCAN: 1539 case EOB_ACT_CONTINUE_SCAN:
1283 yy_c_buf_p = yytext_ptr + offset; 1540 (yy_c_buf_p) = (yytext_ptr) + offset;
1284 break; 1541 break;
1285 } 1542 }
1286 } 1543 }
1287 } 1544 }
1288 1545
1289 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 1546 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1290 *yy_c_buf_p = '\0'; /* preserve yytext */ 1547 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1291 yy_hold_char = *++yy_c_buf_p; 1548 (yy_hold_char) = *++(yy_c_buf_p);
1292 1549
1293 yy_current_buffer->yy_at_bol = (c == '\n'); 1550/* %% [19.0] update BOL and yylineno */
1551 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1294 1552
1295 return c; 1553 return c;
1554}
1555/* %if-c-only */
1556#endif /* ifndef YY_NO_INPUT */
1557/* %endif */
1558
1559/** Immediately switch to a different input stream.
1560 * @param input_file A readable stream.
1561 *
1562 * @note This function does not reset the start condition to @c INITIAL .
1563 */
1564/* %if-c-only */
1565 void yyrestart (FILE * input_file )
1566/* %endif */
1567/* %if-c++-only */
1568/* %endif */
1569{
1570
1571 if ( ! YY_CURRENT_BUFFER ){
1572 yyensure_buffer_stack ();
1573 YY_CURRENT_BUFFER_LVALUE =
1574 yy_create_buffer(yyin,YY_BUF_SIZE );
1296 } 1575 }
1297 1576
1577 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1578 yy_load_buffer_state( );
1579}
1298 1580
1299#ifdef YY_USE_PROTOS 1581/** Switch to a different input buffer.
1300void yyrestart( FILE *input_file ) 1582 * @param new_buffer The new input buffer.
1301#else 1583 *
1302void yyrestart( input_file ) 1584 */
1303FILE *input_file; 1585/* %if-c-only */
1304#endif 1586 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1305 { 1587/* %endif */
1306 if ( ! yy_current_buffer ) 1588/* %if-c++-only */
1307 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 1589/* %endif */
1308 1590{
1309 yy_init_buffer( yy_current_buffer, input_file ); 1591
1310 yy_load_buffer_state(); 1592 /* TODO. We should be able to replace this entire function body
1311 } 1593 * with
1312 1594 * yypop_buffer_state();
1313 1595 * yypush_buffer_state(new_buffer);
1314#ifdef YY_USE_PROTOS 1596 */
1315void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 1597 yyensure_buffer_stack ();
1316#else 1598 if ( YY_CURRENT_BUFFER == new_buffer )
1317void yy_switch_to_buffer( new_buffer )
1318YY_BUFFER_STATE new_buffer;
1319#endif
1320 {
1321 if ( yy_current_buffer == new_buffer )
1322 return; 1599 return;
1323 1600
1324 if ( yy_current_buffer ) 1601 if ( YY_CURRENT_BUFFER )
1325 { 1602 {
1326 /* Flush out information for old buffer. */ 1603 /* Flush out information for old buffer. */
1327 *yy_c_buf_p = yy_hold_char; 1604 *(yy_c_buf_p) = (yy_hold_char);
1328 yy_current_buffer->yy_buf_pos = yy_c_buf_p; 1605 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1329 yy_current_buffer->yy_n_chars = yy_n_chars; 1606 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1330 } 1607 }
1331 1608
1332 yy_current_buffer = new_buffer; 1609 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1333 yy_load_buffer_state(); 1610 yy_load_buffer_state( );
1334 1611
1335 /* We don't actually know whether we did this switch during 1612 /* We don't actually know whether we did this switch during
1336 * EOF (yywrap()) processing, but the only time this flag 1613 * EOF (yywrap()) processing, but the only time this flag
1337 * is looked at is after yywrap() is called, so it's safe 1614 * is looked at is after yywrap() is called, so it's safe
1338 * to go ahead and always set it. 1615 * to go ahead and always set it.
1339 */ 1616 */
1340 yy_did_buffer_switch_on_eof = 1; 1617 (yy_did_buffer_switch_on_eof) = 1;
1341 } 1618}
1342
1343
1344#ifdef YY_USE_PROTOS
1345void yy_load_buffer_state( void )
1346#else
1347void yy_load_buffer_state()
1348#endif
1349 {
1350 yy_n_chars = yy_current_buffer->yy_n_chars;
1351 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1352 yyin = yy_current_buffer->yy_input_file;
1353 yy_hold_char = *yy_c_buf_p;
1354 }
1355 1619
1620/* %if-c-only */
1621static void yy_load_buffer_state (void)
1622/* %endif */
1623/* %if-c++-only */
1624/* %endif */
1625{
1626 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1627 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1628 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1629 (yy_hold_char) = *(yy_c_buf_p);
1630}
1356 1631
1357#ifdef YY_USE_PROTOS 1632/** Allocate and initialize an input buffer state.
1358YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 1633 * @param file A readable stream.
1359#else 1634 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1360YY_BUFFER_STATE yy_create_buffer( file, size ) 1635 *
1361FILE *file; 1636 * @return the allocated buffer state.
1362int size; 1637 */
1363#endif 1638/* %if-c-only */
1364 { 1639 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1640/* %endif */
1641/* %if-c++-only */
1642/* %endif */
1643{
1365 YY_BUFFER_STATE b; 1644 YY_BUFFER_STATE b;
1366 1645
1367 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1646 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1368 if ( ! b ) 1647 if ( ! b )
1369 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1648 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1370 1649
@@ -1373,75 +1652,99 @@ int size;
1373 /* yy_ch_buf has to be 2 characters longer than the size given because 1652 /* yy_ch_buf has to be 2 characters longer than the size given because
1374 * we need to put in 2 end-of-buffer characters. 1653 * we need to put in 2 end-of-buffer characters.
1375 */ 1654 */
1376 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 1655 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1377 if ( ! b->yy_ch_buf ) 1656 if ( ! b->yy_ch_buf )
1378 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1657 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1379 1658
1380 b->yy_is_our_buffer = 1; 1659 b->yy_is_our_buffer = 1;
1381 1660
1382 yy_init_buffer( b, file ); 1661 yy_init_buffer(b,file );
1383 1662
1384 return b; 1663 return b;
1385 } 1664}
1386
1387 1665
1388#ifdef YY_USE_PROTOS 1666/** Destroy the buffer.
1389void yy_delete_buffer( YY_BUFFER_STATE b ) 1667 * @param b a buffer created with yy_create_buffer()
1390#else 1668 *
1391void yy_delete_buffer( b ) 1669 */
1392YY_BUFFER_STATE b; 1670/* %if-c-only */
1393#endif 1671 void yy_delete_buffer (YY_BUFFER_STATE b )
1394 { 1672/* %endif */
1673/* %if-c++-only */
1674/* %endif */
1675{
1676
1395 if ( ! b ) 1677 if ( ! b )
1396 return; 1678 return;
1397 1679
1398 if ( b == yy_current_buffer ) 1680 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1399 yy_current_buffer = (YY_BUFFER_STATE) 0; 1681 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1400 1682
1401 if ( b->yy_is_our_buffer ) 1683 if ( b->yy_is_our_buffer )
1402 yy_flex_free( (void *) b->yy_ch_buf ); 1684 yyfree((void *) b->yy_ch_buf );
1403 1685
1404 yy_flex_free( (void *) b ); 1686 yyfree((void *) b );
1405 } 1687}
1406 1688
1689/* %if-c-only */
1407 1690
1691#ifndef __cplusplus
1692extern int isatty (int );
1693#endif /* __cplusplus */
1694
1695/* %endif */
1408 1696
1409#ifdef YY_USE_PROTOS 1697/* %if-c++-only */
1410void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 1698/* %endif */
1411#else
1412void yy_init_buffer( b, file )
1413YY_BUFFER_STATE b;
1414FILE *file;
1415#endif
1416 1699
1700/* Initializes or reinitializes a buffer.
1701 * This function is sometimes called more than once on the same buffer,
1702 * such as during a yyrestart() or at EOF.
1703 */
1704/* %if-c-only */
1705 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1706/* %endif */
1707/* %if-c++-only */
1708/* %endif */
1417 1709
1418 { 1710{
1419 yy_flush_buffer( b ); 1711 int oerrno = errno;
1712
1713 yy_flush_buffer(b );
1420 1714
1421 b->yy_input_file = file; 1715 b->yy_input_file = file;
1422 b->yy_fill_buffer = 1; 1716 b->yy_fill_buffer = 1;
1423 1717
1424#if YY_ALWAYS_INTERACTIVE 1718 /* If b is the current buffer, then yy_init_buffer was _probably_
1425 b->yy_is_interactive = 1; 1719 * called from yyrestart() or through yy_get_next_buffer.
1426#else 1720 * In that case, we don't want to reset the lineno or column.
1427#if YY_NEVER_INTERACTIVE 1721 */
1428 b->yy_is_interactive = 0; 1722 if (b != YY_CURRENT_BUFFER){
1429#else 1723 b->yy_bs_lineno = 1;
1430 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1724 b->yy_bs_column = 0;
1431#endif 1725 }
1432#endif
1433 }
1434 1726
1727/* %if-c-only */
1435 1728
1436#ifdef YY_USE_PROTOS 1729 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1437void yy_flush_buffer( YY_BUFFER_STATE b ) 1730
1438#else 1731/* %endif */
1439void yy_flush_buffer( b ) 1732/* %if-c++-only */
1440YY_BUFFER_STATE b; 1733/* %endif */
1441#endif 1734 errno = oerrno;
1735}
1442 1736
1443 { 1737/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1444 if ( ! b ) 1738 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1739 *
1740 */
1741/* %if-c-only */
1742 void yy_flush_buffer (YY_BUFFER_STATE b )
1743/* %endif */
1744/* %if-c++-only */
1745/* %endif */
1746{
1747 if ( ! b )
1445 return; 1748 return;
1446 1749
1447 b->yy_n_chars = 0; 1750 b->yy_n_chars = 0;
@@ -1458,29 +1761,140 @@ YY_BUFFER_STATE b;
1458 b->yy_at_bol = 1; 1761 b->yy_at_bol = 1;
1459 b->yy_buffer_status = YY_BUFFER_NEW; 1762 b->yy_buffer_status = YY_BUFFER_NEW;
1460 1763
1461 if ( b == yy_current_buffer ) 1764 if ( b == YY_CURRENT_BUFFER )
1462 yy_load_buffer_state(); 1765 yy_load_buffer_state( );
1766}
1767
1768/* %if-c-or-c++ */
1769/** Pushes the new state onto the stack. The new state becomes
1770 * the current state. This function will allocate the stack
1771 * if necessary.
1772 * @param new_buffer The new state.
1773 *
1774 */
1775/* %if-c-only */
1776void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1777/* %endif */
1778/* %if-c++-only */
1779/* %endif */
1780{
1781 if (new_buffer == NULL)
1782 return;
1783
1784 yyensure_buffer_stack();
1785
1786 /* This block is copied from yy_switch_to_buffer. */
1787 if ( YY_CURRENT_BUFFER )
1788 {
1789 /* Flush out information for old buffer. */
1790 *(yy_c_buf_p) = (yy_hold_char);
1791 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1792 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1793 }
1794
1795 /* Only push if top exists. Otherwise, replace top. */
1796 if (YY_CURRENT_BUFFER)
1797 (yy_buffer_stack_top)++;
1798 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1799
1800 /* copied from yy_switch_to_buffer. */
1801 yy_load_buffer_state( );
1802 (yy_did_buffer_switch_on_eof) = 1;
1803}
1804/* %endif */
1805
1806/* %if-c-or-c++ */
1807/** Removes and deletes the top of the stack, if present.
1808 * The next element becomes the new top.
1809 *
1810 */
1811/* %if-c-only */
1812void yypop_buffer_state (void)
1813/* %endif */
1814/* %if-c++-only */
1815/* %endif */
1816{
1817 if (!YY_CURRENT_BUFFER)
1818 return;
1819
1820 yy_delete_buffer(YY_CURRENT_BUFFER );
1821 YY_CURRENT_BUFFER_LVALUE = NULL;
1822 if ((yy_buffer_stack_top) > 0)
1823 --(yy_buffer_stack_top);
1824
1825 if (YY_CURRENT_BUFFER) {
1826 yy_load_buffer_state( );
1827 (yy_did_buffer_switch_on_eof) = 1;
1463 } 1828 }
1829}
1830/* %endif */
1464 1831
1832/* %if-c-or-c++ */
1833/* Allocates the stack if it does not exist.
1834 * Guarantees space for at least one push.
1835 */
1836/* %if-c-only */
1837static void yyensure_buffer_stack (void)
1838/* %endif */
1839/* %if-c++-only */
1840/* %endif */
1841{
1842 int num_to_alloc;
1843
1844 if (!(yy_buffer_stack)) {
1845
1846 /* First allocation is just for 2 elements, since we don't know if this
1847 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1848 * immediate realloc on the next call.
1849 */
1850 num_to_alloc = 1;
1851 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1852 (num_to_alloc * sizeof(struct yy_buffer_state*)
1853 );
1854
1855 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1856
1857 (yy_buffer_stack_max) = num_to_alloc;
1858 (yy_buffer_stack_top) = 0;
1859 return;
1860 }
1465 1861
1466#ifndef YY_NO_SCAN_BUFFER 1862 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1467#ifdef YY_USE_PROTOS 1863
1468YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 1864 /* Increase the buffer to prepare for a possible push. */
1469#else 1865 int grow_size = 8 /* arbitrary grow size */;
1470YY_BUFFER_STATE yy_scan_buffer( base, size )
1471char *base;
1472yy_size_t size;
1473#endif
1474 {
1475 YY_BUFFER_STATE b;
1476 1866
1867 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1868 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1869 ((yy_buffer_stack),
1870 num_to_alloc * sizeof(struct yy_buffer_state*)
1871 );
1872
1873 /* zero only the new slots.*/
1874 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1875 (yy_buffer_stack_max) = num_to_alloc;
1876 }
1877}
1878/* %endif */
1879
1880/* %if-c-only */
1881/** Setup the input buffer state to scan directly from a user-specified character buffer.
1882 * @param base the character buffer
1883 * @param size the size in bytes of the character buffer
1884 *
1885 * @return the newly allocated buffer state object.
1886 */
1887YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1888{
1889 YY_BUFFER_STATE b;
1890
1477 if ( size < 2 || 1891 if ( size < 2 ||
1478 base[size-2] != YY_END_OF_BUFFER_CHAR || 1892 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1479 base[size-1] != YY_END_OF_BUFFER_CHAR ) 1893 base[size-1] != YY_END_OF_BUFFER_CHAR )
1480 /* They forgot to leave room for the EOB's. */ 1894 /* They forgot to leave room for the EOB's. */
1481 return 0; 1895 return 0;
1482 1896
1483 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1897 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1484 if ( ! b ) 1898 if ( ! b )
1485 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 1899 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1486 1900
@@ -1494,56 +1908,55 @@ yy_size_t size;
1494 b->yy_fill_buffer = 0; 1908 b->yy_fill_buffer = 0;
1495 b->yy_buffer_status = YY_BUFFER_NEW; 1909 b->yy_buffer_status = YY_BUFFER_NEW;
1496 1910
1497 yy_switch_to_buffer( b ); 1911 yy_switch_to_buffer(b );
1498 1912
1499 return b; 1913 return b;
1500 } 1914}
1501#endif 1915/* %endif */
1502 1916
1503 1917/* %if-c-only */
1504#ifndef YY_NO_SCAN_STRING 1918/** Setup the input buffer state to scan a string. The next call to yylex() will
1505#ifdef YY_USE_PROTOS 1919 * scan from a @e copy of @a str.
1506YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 1920 * @param yystr a NUL-terminated string to scan
1507#else 1921 *
1508YY_BUFFER_STATE yy_scan_string( yy_str ) 1922 * @return the newly allocated buffer state object.
1509yyconst char *yy_str; 1923 * @note If you want to scan bytes that may contain NUL values, then use
1510#endif 1924 * yy_scan_bytes() instead.
1511 { 1925 */
1512 int len; 1926YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1513 for ( len = 0; yy_str[len]; ++len ) 1927{
1514 ; 1928
1515 1929 return yy_scan_bytes(yystr,strlen(yystr) );
1516 return yy_scan_bytes( yy_str, len ); 1930}
1517 } 1931/* %endif */
1518#endif 1932
1519 1933/* %if-c-only */
1520 1934/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1521#ifndef YY_NO_SCAN_BYTES 1935 * scan from a @e copy of @a bytes.
1522#ifdef YY_USE_PROTOS 1936 * @param bytes the byte buffer to scan
1523YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 1937 * @param len the number of bytes in the buffer pointed to by @a bytes.
1524#else 1938 *
1525YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 1939 * @return the newly allocated buffer state object.
1526yyconst char *bytes; 1940 */
1527int len; 1941YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1528#endif 1942{
1529 {
1530 YY_BUFFER_STATE b; 1943 YY_BUFFER_STATE b;
1531 char *buf; 1944 char *buf;
1532 yy_size_t n; 1945 yy_size_t n;
1533 int i; 1946 int i;
1534 1947
1535 /* Get memory for full buffer, including space for trailing EOB's. */ 1948 /* Get memory for full buffer, including space for trailing EOB's. */
1536 n = len + 2; 1949 n = _yybytes_len + 2;
1537 buf = (char *) yy_flex_alloc( n ); 1950 buf = (char *) yyalloc(n );
1538 if ( ! buf ) 1951 if ( ! buf )
1539 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 1952 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1540 1953
1541 for ( i = 0; i < len; ++i ) 1954 for ( i = 0; i < _yybytes_len; ++i )
1542 buf[i] = bytes[i]; 1955 buf[i] = yybytes[i];
1543 1956
1544 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 1957 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1545 1958
1546 b = yy_scan_buffer( buf, n ); 1959 b = yy_scan_buffer(buf,n );
1547 if ( ! b ) 1960 if ( ! b )
1548 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 1961 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1549 1962
@@ -1553,148 +1966,231 @@ int len;
1553 b->yy_is_our_buffer = 1; 1966 b->yy_is_our_buffer = 1;
1554 1967
1555 return b; 1968 return b;
1556 } 1969}
1970/* %endif */
1971
1972#ifndef YY_EXIT_FAILURE
1973#define YY_EXIT_FAILURE 2
1557#endif 1974#endif
1558 1975
1976/* %if-c-only */
1977static void yy_fatal_error (yyconst char* msg )
1978{
1979 (void) fprintf( stderr, "%s\n", msg );
1980 exit( YY_EXIT_FAILURE );
1981}
1982/* %endif */
1983/* %if-c++-only */
1984/* %endif */
1559 1985
1560#ifndef YY_NO_PUSH_STATE 1986/* Redefine yyless() so it works in section 3 code. */
1561#ifdef YY_USE_PROTOS
1562static void yy_push_state( int new_state )
1563#else
1564static void yy_push_state( new_state )
1565int new_state;
1566#endif
1567 {
1568 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1569 {
1570 yy_size_t new_size;
1571 1987
1572 yy_start_stack_depth += YY_START_STACK_INCR; 1988#undef yyless
1573 new_size = yy_start_stack_depth * sizeof( int ); 1989#define yyless(n) \
1990 do \
1991 { \
1992 /* Undo effects of setting up yytext. */ \
1993 int yyless_macro_arg = (n); \
1994 YY_LESS_LINENO(yyless_macro_arg);\
1995 yytext[yyleng] = (yy_hold_char); \
1996 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1997 (yy_hold_char) = *(yy_c_buf_p); \
1998 *(yy_c_buf_p) = '\0'; \
1999 yyleng = yyless_macro_arg; \
2000 } \
2001 while ( 0 )
1574 2002
1575 if ( ! yy_start_stack ) 2003/* Accessor methods (get/set functions) to struct members. */
1576 yy_start_stack = (int *) yy_flex_alloc( new_size );
1577 2004
1578 else 2005/* %if-c-only */
1579 yy_start_stack = (int *) yy_flex_realloc( 2006/* %if-reentrant */
1580 (void *) yy_start_stack, new_size ); 2007/* %endif */
1581 2008
1582 if ( ! yy_start_stack ) 2009/** Get the current line number.
1583 YY_FATAL_ERROR( 2010 *
1584 "out of memory expanding start-condition stack" ); 2011 */
1585 } 2012int yyget_lineno (void)
2013{
2014
2015 return yylineno;
2016}
1586 2017
1587 yy_start_stack[yy_start_stack_ptr++] = YY_START; 2018/** Get the input stream.
2019 *
2020 */
2021FILE *yyget_in (void)
2022{
2023 return yyin;
2024}
1588 2025
1589 BEGIN(new_state); 2026/** Get the output stream.
1590 } 2027 *
1591#endif 2028 */
2029FILE *yyget_out (void)
2030{
2031 return yyout;
2032}
1592 2033
2034/** Get the length of the current token.
2035 *
2036 */
2037int yyget_leng (void)
2038{
2039 return yyleng;
2040}
1593 2041
1594#ifndef YY_NO_POP_STATE 2042/** Get the current token.
1595static void yy_pop_state() 2043 *
1596 { 2044 */
1597 if ( --yy_start_stack_ptr < 0 )
1598 YY_FATAL_ERROR( "start-condition stack underflow" );
1599 2045
1600 BEGIN(yy_start_stack[yy_start_stack_ptr]); 2046char *yyget_text (void)
1601 } 2047{
1602#endif 2048 return yytext;
2049}
1603 2050
2051/* %if-reentrant */
2052/* %endif */
1604 2053
1605#ifndef YY_NO_TOP_STATE 2054/** Set the current line number.
1606static int yy_top_state() 2055 * @param line_number
1607 { 2056 *
1608 return yy_start_stack[yy_start_stack_ptr - 1]; 2057 */
1609 } 2058void yyset_lineno (int line_number )
1610#endif 2059{
2060
2061 yylineno = line_number;
2062}
1611 2063
1612#ifndef YY_EXIT_FAILURE 2064/** Set the input stream. This does not discard the current
1613#define YY_EXIT_FAILURE 2 2065 * input buffer.
1614#endif 2066 * @param in_str A readable stream.
2067 *
2068 * @see yy_switch_to_buffer
2069 */
2070void yyset_in (FILE * in_str )
2071{
2072 yyin = in_str ;
2073}
2074
2075void yyset_out (FILE * out_str )
2076{
2077 yyout = out_str ;
2078}
2079
2080int yyget_debug (void)
2081{
2082 return yy_flex_debug;
2083}
1615 2084
1616#ifdef YY_USE_PROTOS 2085void yyset_debug (int bdebug )
1617static void yy_fatal_error( yyconst char msg[] ) 2086{
2087 yy_flex_debug = bdebug ;
2088}
2089
2090/* %endif */
2091
2092/* %if-reentrant */
2093/* %if-bison-bridge */
2094/* %endif */
2095/* %endif */
2096
2097/* %if-c-only */
2098static int yy_init_globals (void)
2099{
2100 /* Initialization is the same as for the non-reentrant scanner.
2101 * This function is called from yylex_destroy(), so don't allocate here.
2102 */
2103
2104 (yy_buffer_stack) = 0;
2105 (yy_buffer_stack_top) = 0;
2106 (yy_buffer_stack_max) = 0;
2107 (yy_c_buf_p) = (char *) 0;
2108 (yy_init) = 0;
2109 (yy_start) = 0;
2110
2111/* Defined in main.c */
2112#ifdef YY_STDINIT
2113 yyin = stdin;
2114 yyout = stdout;
1618#else 2115#else
1619static void yy_fatal_error( msg ) 2116 yyin = (FILE *) 0;
1620char msg[]; 2117 yyout = (FILE *) 0;
1621#endif 2118#endif
1622 { 2119
1623 (void) fprintf( stderr, "%s\n", msg ); 2120 /* For future reference: Set errno on error, since we are called by
1624 exit( YY_EXIT_FAILURE ); 2121 * yylex_init()
2122 */
2123 return 0;
2124}
2125/* %endif */
2126
2127/* %if-c-or-c++ */
2128/* %if-c-only */
2129/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2130int yylex_destroy (void)
2131/* %endif */
2132/* %if-c++-only */
2133/* %endif */
2134{
2135
2136 /* Pop the buffer stack, destroying each element. */
2137 while(YY_CURRENT_BUFFER){
2138 yy_delete_buffer(YY_CURRENT_BUFFER );
2139 YY_CURRENT_BUFFER_LVALUE = NULL;
2140 yypop_buffer_state();
1625 } 2141 }
1626 2142
2143 /* Destroy the stack itself. */
2144 yyfree((yy_buffer_stack) );
2145 (yy_buffer_stack) = NULL;
1627 2146
2147/* %if-c++-only */
2148/* %endif */
1628 2149
1629/* Redefine yyless() so it works in section 3 code. */ 2150/* %if-c-only */
1630 2151
1631#undef yyless 2152 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1632#define yyless(n) \ 2153 * yylex() is called, initialization will occur. */
1633 do \ 2154 yy_init_globals( );
1634 { \
1635 /* Undo effects of setting up yytext. */ \
1636 yytext[yyleng] = yy_hold_char; \
1637 yy_c_buf_p = yytext + n; \
1638 yy_hold_char = *yy_c_buf_p; \
1639 *yy_c_buf_p = '\0'; \
1640 yyleng = n; \
1641 } \
1642 while ( 0 )
1643 2155
2156/* %if-reentrant */
2157/* %endif */
2158 return 0;
2159/* %endif */
2160}
2161/* %endif */
1644 2162
1645/* Internal utility routines. */ 2163/*
2164 * Internal utility routines.
2165 */
1646 2166
1647#ifndef yytext_ptr 2167#ifndef yytext_ptr
1648#ifdef YY_USE_PROTOS 2168static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1649static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 2169{
1650#else
1651static void yy_flex_strncpy( s1, s2, n )
1652char *s1;
1653yyconst char *s2;
1654int n;
1655#endif
1656 {
1657 register int i; 2170 register int i;
1658 for ( i = 0; i < n; ++i ) 2171 for ( i = 0; i < n; ++i )
1659 s1[i] = s2[i]; 2172 s1[i] = s2[i];
1660 } 2173}
1661#endif 2174#endif
1662 2175
1663#ifdef YY_NEED_STRLEN 2176#ifdef YY_NEED_STRLEN
1664#ifdef YY_USE_PROTOS 2177static int yy_flex_strlen (yyconst char * s )
1665static int yy_flex_strlen( yyconst char *s ) 2178{
1666#else
1667static int yy_flex_strlen( s )
1668yyconst char *s;
1669#endif
1670 {
1671 register int n; 2179 register int n;
1672 for ( n = 0; s[n]; ++n ) 2180 for ( n = 0; s[n]; ++n )
1673 ; 2181 ;
1674 2182
1675 return n; 2183 return n;
1676 } 2184}
1677#endif 2185#endif
1678 2186
1679 2187void *yyalloc (yy_size_t size )
1680#ifdef YY_USE_PROTOS 2188{
1681static void *yy_flex_alloc( yy_size_t size )
1682#else
1683static void *yy_flex_alloc( size )
1684yy_size_t size;
1685#endif
1686 {
1687 return (void *) malloc( size ); 2189 return (void *) malloc( size );
1688 } 2190}
1689 2191
1690#ifdef YY_USE_PROTOS 2192void *yyrealloc (void * ptr, yy_size_t size )
1691static void *yy_flex_realloc( void *ptr, yy_size_t size ) 2193{
1692#else
1693static void *yy_flex_realloc( ptr, size )
1694void *ptr;
1695yy_size_t size;
1696#endif
1697 {
1698 /* The cast to (char *) in the following accommodates both 2194 /* The cast to (char *) in the following accommodates both
1699 * implementations that use char* generic pointers, and those 2195 * implementations that use char* generic pointers, and those
1700 * that use void* generic pointers. It works with the latter 2196 * that use void* generic pointers. It works with the latter
@@ -1703,28 +2199,24 @@ yy_size_t size;
1703 * as though doing an assignment. 2199 * as though doing an assignment.
1704 */ 2200 */
1705 return (void *) realloc( (char *) ptr, size ); 2201 return (void *) realloc( (char *) ptr, size );
1706 } 2202}
1707 2203
1708#ifdef YY_USE_PROTOS 2204void yyfree (void * ptr )
1709static void yy_flex_free( void *ptr ) 2205{
1710#else 2206 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1711static void yy_flex_free( ptr ) 2207}
1712void *ptr; 2208
1713#endif 2209/* %if-tables-serialization definitions */
1714 { 2210/* %define-yytables The name for this specific scanner's tables. */
1715 free( ptr ); 2211#define YYTABLES_NAME "yytables"
1716 } 2212/* %endif */
2213
2214/* %ok-for-header */
1717 2215
1718#if YY_MAIN
1719int main()
1720 {
1721 yylex();
1722 return 0;
1723 }
1724#endif
1725#line 95 "scripts/genksyms/lex.l" 2216#line 95 "scripts/genksyms/lex.l"
1726 2217
1727 2218
2219
1728/* Bring in the keyword recognizer. */ 2220/* Bring in the keyword recognizer. */
1729 2221
1730#include "keywords.c" 2222#include "keywords.c"
@@ -2036,10 +2528,12 @@ fini:
2036 2528
2037 return token; 2529 return token;
2038} 2530}
2039/* A Bison parser, made by GNU Bison 2.0. */ 2531/* A Bison parser, made by GNU Bison 2.3. */
2532
2533/* Skeleton interface for Bison's Yacc-like parsers in C
2040 2534
2041/* Skeleton parser for Yacc-like parsing with Bison, 2535 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
2042 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 2536 Free Software Foundation, Inc.
2043 2537
2044 This program is free software; you can redistribute it and/or modify 2538 This program is free software; you can redistribute it and/or modify
2045 it under the terms of the GNU General Public License as published by 2539 it under the terms of the GNU General Public License as published by
@@ -2053,13 +2547,21 @@ fini:
2053 2547
2054 You should have received a copy of the GNU General Public License 2548 You should have received a copy of the GNU General Public License
2055 along with this program; if not, write to the Free Software 2549 along with this program; if not, write to the Free Software
2056 Foundation, Inc., 59 Temple Place - Suite 330, 2550 Foundation, Inc., 51 Franklin Street, Fifth Floor,
2057 Boston, MA 02111-1307, USA. */ 2551 Boston, MA 02110-1301, USA. */
2058 2552
2059/* As a special exception, when this file is copied by Bison into a 2553/* As a special exception, you may create a larger work that contains
2060 Bison output file, you may use that output file without restriction. 2554 part or all of the Bison parser skeleton and distribute that work
2061 This special exception was added by the Free Software Foundation 2555 under terms of your choice, so long as that work isn't itself a
2062 in version 1.24 of Bison. */ 2556 parser generator using the skeleton or a modified version thereof
2557 as a parser skeleton. Alternatively, if you modify or redistribute
2558 the parser skeleton itself, you may (at your option) remove this
2559 special exception, which will cause the skeleton and the resulting
2560 Bison output files to be licensed under the GNU General Public
2561 License without this special exception.
2562
2563 This special exception was added by the Free Software Foundation in
2564 version 2.2 of Bison. */
2063 2565
2064/* Tokens. */ 2566/* Tokens. */
2065#ifndef YYTOKENTYPE 2567#ifndef YYTOKENTYPE
@@ -2076,39 +2578,41 @@ fini:
2076 DOUBLE_KEYW = 264, 2578 DOUBLE_KEYW = 264,
2077 ENUM_KEYW = 265, 2579 ENUM_KEYW = 265,
2078 EXTERN_KEYW = 266, 2580 EXTERN_KEYW = 266,
2079 FLOAT_KEYW = 267, 2581 EXTENSION_KEYW = 267,
2080 INLINE_KEYW = 268, 2582 FLOAT_KEYW = 268,
2081 INT_KEYW = 269, 2583 INLINE_KEYW = 269,
2082 LONG_KEYW = 270, 2584 INT_KEYW = 270,
2083 REGISTER_KEYW = 271, 2585 LONG_KEYW = 271,
2084 RESTRICT_KEYW = 272, 2586 REGISTER_KEYW = 272,
2085 SHORT_KEYW = 273, 2587 RESTRICT_KEYW = 273,
2086 SIGNED_KEYW = 274, 2588 SHORT_KEYW = 274,
2087 STATIC_KEYW = 275, 2589 SIGNED_KEYW = 275,
2088 STRUCT_KEYW = 276, 2590 STATIC_KEYW = 276,
2089 TYPEDEF_KEYW = 277, 2591 STRUCT_KEYW = 277,
2090 UNION_KEYW = 278, 2592 TYPEDEF_KEYW = 278,
2091 UNSIGNED_KEYW = 279, 2593 UNION_KEYW = 279,
2092 VOID_KEYW = 280, 2594 UNSIGNED_KEYW = 280,
2093 VOLATILE_KEYW = 281, 2595 VOID_KEYW = 281,
2094 TYPEOF_KEYW = 282, 2596 VOLATILE_KEYW = 282,
2095 EXPORT_SYMBOL_KEYW = 283, 2597 TYPEOF_KEYW = 283,
2096 ASM_PHRASE = 284, 2598 EXPORT_SYMBOL_KEYW = 284,
2097 ATTRIBUTE_PHRASE = 285, 2599 ASM_PHRASE = 285,
2098 BRACE_PHRASE = 286, 2600 ATTRIBUTE_PHRASE = 286,
2099 BRACKET_PHRASE = 287, 2601 BRACE_PHRASE = 287,
2100 EXPRESSION_PHRASE = 288, 2602 BRACKET_PHRASE = 288,
2101 CHAR = 289, 2603 EXPRESSION_PHRASE = 289,
2102 DOTS = 290, 2604 CHAR = 290,
2103 IDENT = 291, 2605 DOTS = 291,
2104 INT = 292, 2606 IDENT = 292,
2105 REAL = 293, 2607 INT = 293,
2106 STRING = 294, 2608 REAL = 294,
2107 TYPE = 295, 2609 STRING = 295,
2108 OTHER = 296, 2610 TYPE = 296,
2109 FILENAME = 297 2611 OTHER = 297,
2612 FILENAME = 298
2110 }; 2613 };
2111#endif 2614#endif
2615/* Tokens. */
2112#define ASM_KEYW 258 2616#define ASM_KEYW 258
2113#define ATTRIBUTE_KEYW 259 2617#define ATTRIBUTE_KEYW 259
2114#define AUTO_KEYW 260 2618#define AUTO_KEYW 260
@@ -2118,42 +2622,43 @@ fini:
2118#define DOUBLE_KEYW 264 2622#define DOUBLE_KEYW 264
2119#define ENUM_KEYW 265 2623#define ENUM_KEYW 265
2120#define EXTERN_KEYW 266 2624#define EXTERN_KEYW 266
2121#define FLOAT_KEYW 267 2625#define EXTENSION_KEYW 267
2122#define INLINE_KEYW 268 2626#define FLOAT_KEYW 268
2123#define INT_KEYW 269 2627#define INLINE_KEYW 269
2124#define LONG_KEYW 270 2628#define INT_KEYW 270
2125#define REGISTER_KEYW 271 2629#define LONG_KEYW 271
2126#define RESTRICT_KEYW 272 2630#define REGISTER_KEYW 272
2127#define SHORT_KEYW 273 2631#define RESTRICT_KEYW 273
2128#define SIGNED_KEYW 274 2632#define SHORT_KEYW 274
2129#define STATIC_KEYW 275 2633#define SIGNED_KEYW 275
2130#define STRUCT_KEYW 276 2634#define STATIC_KEYW 276
2131#define TYPEDEF_KEYW 277 2635#define STRUCT_KEYW 277
2132#define UNION_KEYW 278 2636#define TYPEDEF_KEYW 278
2133#define UNSIGNED_KEYW 279 2637#define UNION_KEYW 279
2134#define VOID_KEYW 280 2638#define UNSIGNED_KEYW 280
2135#define VOLATILE_KEYW 281 2639#define VOID_KEYW 281
2136#define TYPEOF_KEYW 282 2640#define VOLATILE_KEYW 282
2137#define EXPORT_SYMBOL_KEYW 283 2641#define TYPEOF_KEYW 283
2138#define ASM_PHRASE 284 2642#define EXPORT_SYMBOL_KEYW 284
2139#define ATTRIBUTE_PHRASE 285 2643#define ASM_PHRASE 285
2140#define BRACE_PHRASE 286 2644#define ATTRIBUTE_PHRASE 286
2141#define BRACKET_PHRASE 287 2645#define BRACE_PHRASE 287
2142#define EXPRESSION_PHRASE 288 2646#define BRACKET_PHRASE 288
2143#define CHAR 289 2647#define EXPRESSION_PHRASE 289
2144#define DOTS 290 2648#define CHAR 290
2145#define IDENT 291 2649#define DOTS 291
2146#define INT 292 2650#define IDENT 292
2147#define REAL 293 2651#define INT 293
2148#define STRING 294 2652#define REAL 294
2149#define TYPE 295 2653#define STRING 295
2150#define OTHER 296 2654#define TYPE 296
2151#define FILENAME 297 2655#define OTHER 297
2152 2656#define FILENAME 298
2153 2657
2154 2658
2155 2659
2156#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 2660
2661#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
2157typedef int YYSTYPE; 2662typedef int YYSTYPE;
2158# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 2663# define yystype YYSTYPE /* obsolescent; will be withdrawn */
2159# define YYSTYPE_IS_DECLARED 1 2664# define YYSTYPE_IS_DECLARED 1
@@ -2163,4 +2668,3 @@ typedef int YYSTYPE;
2163extern YYSTYPE yylval; 2668extern YYSTYPE yylval;
2164 2669
2165 2670
2166
diff --git a/scripts/genksyms/parse.c_shipped b/scripts/genksyms/parse.c_shipped
index 99d7c258696d..3e6079f36b9f 100644
--- a/scripts/genksyms/parse.c_shipped
+++ b/scripts/genksyms/parse.c_shipped
@@ -1,7 +1,9 @@
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, 3/* Skeleton implementation for Bison's Yacc-like parsers in C
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
5 7
6 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
@@ -15,16 +17,24 @@
15 17
16 You should have received a copy of the GNU General Public License 18 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 19 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, 20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02111-1307, USA. */ 21 Boston, MA 02110-1301, USA. */
22
23/* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
20 32
21/* As a special exception, when this file is copied by Bison into a 33 This special exception was added by the Free Software Foundation in
22 Bison output file, you may use that output file without restriction. 34 version 2.2 of Bison. */
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
25 35
26/* Written by Richard Stallman by simplifying the original so called 36/* C LALR(1) parser skeleton written by Richard Stallman, by
27 ``semantic'' parser. */ 37 simplifying the original so-called "semantic" parser. */
28 38
29/* All symbols defined below should begin with yy or YY, to avoid 39/* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local 40 infringing on user name space. This should be done even for local
@@ -36,6 +46,9 @@
36/* Identify Bison output. */ 46/* Identify Bison output. */
37#define YYBISON 1 47#define YYBISON 1
38 48
49/* Bison version. */
50#define YYBISON_VERSION "2.3"
51
39/* Skeleton name. */ 52/* Skeleton name. */
40#define YYSKELETON_NAME "yacc.c" 53#define YYSKELETON_NAME "yacc.c"
41 54
@@ -62,39 +75,41 @@
62 DOUBLE_KEYW = 264, 75 DOUBLE_KEYW = 264,
63 ENUM_KEYW = 265, 76 ENUM_KEYW = 265,
64 EXTERN_KEYW = 266, 77 EXTERN_KEYW = 266,
65 FLOAT_KEYW = 267, 78 EXTENSION_KEYW = 267,
66 INLINE_KEYW = 268, 79 FLOAT_KEYW = 268,
67 INT_KEYW = 269, 80 INLINE_KEYW = 269,
68 LONG_KEYW = 270, 81 INT_KEYW = 270,
69 REGISTER_KEYW = 271, 82 LONG_KEYW = 271,
70 RESTRICT_KEYW = 272, 83 REGISTER_KEYW = 272,
71 SHORT_KEYW = 273, 84 RESTRICT_KEYW = 273,
72 SIGNED_KEYW = 274, 85 SHORT_KEYW = 274,
73 STATIC_KEYW = 275, 86 SIGNED_KEYW = 275,
74 STRUCT_KEYW = 276, 87 STATIC_KEYW = 276,
75 TYPEDEF_KEYW = 277, 88 STRUCT_KEYW = 277,
76 UNION_KEYW = 278, 89 TYPEDEF_KEYW = 278,
77 UNSIGNED_KEYW = 279, 90 UNION_KEYW = 279,
78 VOID_KEYW = 280, 91 UNSIGNED_KEYW = 280,
79 VOLATILE_KEYW = 281, 92 VOID_KEYW = 281,
80 TYPEOF_KEYW = 282, 93 VOLATILE_KEYW = 282,
81 EXPORT_SYMBOL_KEYW = 283, 94 TYPEOF_KEYW = 283,
82 ASM_PHRASE = 284, 95 EXPORT_SYMBOL_KEYW = 284,
83 ATTRIBUTE_PHRASE = 285, 96 ASM_PHRASE = 285,
84 BRACE_PHRASE = 286, 97 ATTRIBUTE_PHRASE = 286,
85 BRACKET_PHRASE = 287, 98 BRACE_PHRASE = 287,
86 EXPRESSION_PHRASE = 288, 99 BRACKET_PHRASE = 288,
87 CHAR = 289, 100 EXPRESSION_PHRASE = 289,
88 DOTS = 290, 101 CHAR = 290,
89 IDENT = 291, 102 DOTS = 291,
90 INT = 292, 103 IDENT = 292,
91 REAL = 293, 104 INT = 293,
92 STRING = 294, 105 REAL = 294,
93 TYPE = 295, 106 STRING = 295,
94 OTHER = 296, 107 TYPE = 296,
95 FILENAME = 297 108 OTHER = 297,
109 FILENAME = 298
96 }; 110 };
97#endif 111#endif
112/* Tokens. */
98#define ASM_KEYW 258 113#define ASM_KEYW 258
99#define ATTRIBUTE_KEYW 259 114#define ATTRIBUTE_KEYW 259
100#define AUTO_KEYW 260 115#define AUTO_KEYW 260
@@ -104,37 +119,38 @@
104#define DOUBLE_KEYW 264 119#define DOUBLE_KEYW 264
105#define ENUM_KEYW 265 120#define ENUM_KEYW 265
106#define EXTERN_KEYW 266 121#define EXTERN_KEYW 266
107#define FLOAT_KEYW 267 122#define EXTENSION_KEYW 267
108#define INLINE_KEYW 268 123#define FLOAT_KEYW 268
109#define INT_KEYW 269 124#define INLINE_KEYW 269
110#define LONG_KEYW 270 125#define INT_KEYW 270
111#define REGISTER_KEYW 271 126#define LONG_KEYW 271
112#define RESTRICT_KEYW 272 127#define REGISTER_KEYW 272
113#define SHORT_KEYW 273 128#define RESTRICT_KEYW 273
114#define SIGNED_KEYW 274 129#define SHORT_KEYW 274
115#define STATIC_KEYW 275 130#define SIGNED_KEYW 275
116#define STRUCT_KEYW 276 131#define STATIC_KEYW 276
117#define TYPEDEF_KEYW 277 132#define STRUCT_KEYW 277
118#define UNION_KEYW 278 133#define TYPEDEF_KEYW 278
119#define UNSIGNED_KEYW 279 134#define UNION_KEYW 279
120#define VOID_KEYW 280 135#define UNSIGNED_KEYW 280
121#define VOLATILE_KEYW 281 136#define VOID_KEYW 281
122#define TYPEOF_KEYW 282 137#define VOLATILE_KEYW 282
123#define EXPORT_SYMBOL_KEYW 283 138#define TYPEOF_KEYW 283
124#define ASM_PHRASE 284 139#define EXPORT_SYMBOL_KEYW 284
125#define ATTRIBUTE_PHRASE 285 140#define ASM_PHRASE 285
126#define BRACE_PHRASE 286 141#define ATTRIBUTE_PHRASE 286
127#define BRACKET_PHRASE 287 142#define BRACE_PHRASE 287
128#define EXPRESSION_PHRASE 288 143#define BRACKET_PHRASE 288
129#define CHAR 289 144#define EXPRESSION_PHRASE 289
130#define DOTS 290 145#define CHAR 290
131#define IDENT 291 146#define DOTS 291
132#define INT 292 147#define IDENT 292
133#define REAL 293 148#define INT 293
134#define STRING 294 149#define REAL 294
135#define TYPE 295 150#define STRING 295
136#define OTHER 296 151#define TYPE 296
137#define FILENAME 297 152#define OTHER 297
153#define FILENAME 298
138 154
139 155
140 156
@@ -185,7 +201,12 @@ remove_list(struct string_list **pb, struct string_list **pe)
185# define YYERROR_VERBOSE 0 201# define YYERROR_VERBOSE 0
186#endif 202#endif
187 203
188#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 204/* Enabling the token table. */
205#ifndef YYTOKEN_TABLE
206# define YYTOKEN_TABLE 0
207#endif
208
209#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
189typedef int YYSTYPE; 210typedef int YYSTYPE;
190# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 211# define yystype YYSTYPE /* obsolescent; will be withdrawn */
191# define YYSTYPE_IS_DECLARED 1 212# define YYSTYPE_IS_DECLARED 1
@@ -197,17 +218,94 @@ typedef int YYSTYPE;
197/* Copy the second part of user declarations. */ 218/* Copy the second part of user declarations. */
198 219
199 220
200/* Line 213 of yacc.c. */ 221/* Line 216 of yacc.c. */
201#line 202 "scripts/genksyms/parse.c" 222#line 223 "scripts/genksyms/parse.c"
223
224#ifdef short
225# undef short
226#endif
227
228#ifdef YYTYPE_UINT8
229typedef YYTYPE_UINT8 yytype_uint8;
230#else
231typedef unsigned char yytype_uint8;
232#endif
233
234#ifdef YYTYPE_INT8
235typedef YYTYPE_INT8 yytype_int8;
236#elif (defined __STDC__ || defined __C99__FUNC__ \
237 || defined __cplusplus || defined _MSC_VER)
238typedef signed char yytype_int8;
239#else
240typedef short int yytype_int8;
241#endif
242
243#ifdef YYTYPE_UINT16
244typedef YYTYPE_UINT16 yytype_uint16;
245#else
246typedef unsigned short int yytype_uint16;
247#endif
248
249#ifdef YYTYPE_INT16
250typedef YYTYPE_INT16 yytype_int16;
251#else
252typedef short int yytype_int16;
253#endif
254
255#ifndef YYSIZE_T
256# ifdef __SIZE_TYPE__
257# define YYSIZE_T __SIZE_TYPE__
258# elif defined size_t
259# define YYSIZE_T size_t
260# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
261 || defined __cplusplus || defined _MSC_VER)
262# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
263# define YYSIZE_T size_t
264# else
265# define YYSIZE_T unsigned int
266# endif
267#endif
202 268
203#if ! defined (yyoverflow) || YYERROR_VERBOSE 269#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
204 270
205# ifndef YYFREE 271#ifndef YY_
206# define YYFREE free 272# if YYENABLE_NLS
273# if ENABLE_NLS
274# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
275# define YY_(msgid) dgettext ("bison-runtime", msgid)
276# endif
207# endif 277# endif
208# ifndef YYMALLOC 278# ifndef YY_
209# define YYMALLOC malloc 279# define YY_(msgid) msgid
210# endif 280# endif
281#endif
282
283/* Suppress unused-variable warnings by "using" E. */
284#if ! defined lint || defined __GNUC__
285# define YYUSE(e) ((void) (e))
286#else
287# define YYUSE(e) /* empty */
288#endif
289
290/* Identity function, used to suppress warnings about constant conditions. */
291#ifndef lint
292# define YYID(n) (n)
293#else
294#if (defined __STDC__ || defined __C99__FUNC__ \
295 || defined __cplusplus || defined _MSC_VER)
296static int
297YYID (int i)
298#else
299static int
300YYID (i)
301 int i;
302#endif
303{
304 return i;
305}
306#endif
307
308#if ! defined yyoverflow || YYERROR_VERBOSE
211 309
212/* The parser invokes alloca or malloc; define the necessary symbols. */ 310/* The parser invokes alloca or malloc; define the necessary symbols. */
213 311
@@ -215,34 +313,76 @@ typedef int YYSTYPE;
215# if YYSTACK_USE_ALLOCA 313# if YYSTACK_USE_ALLOCA
216# ifdef __GNUC__ 314# ifdef __GNUC__
217# define YYSTACK_ALLOC __builtin_alloca 315# define YYSTACK_ALLOC __builtin_alloca
316# elif defined __BUILTIN_VA_ARG_INCR
317# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
318# elif defined _AIX
319# define YYSTACK_ALLOC __alloca
320# elif defined _MSC_VER
321# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
322# define alloca _alloca
218# else 323# else
219# define YYSTACK_ALLOC alloca 324# define YYSTACK_ALLOC alloca
325# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
326 || defined __cplusplus || defined _MSC_VER)
327# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
328# ifndef _STDLIB_H
329# define _STDLIB_H 1
330# endif
331# endif
220# endif 332# endif
221# endif 333# endif
222# endif 334# endif
223 335
224# ifdef YYSTACK_ALLOC 336# ifdef YYSTACK_ALLOC
225 /* Pacify GCC's `empty if-body' warning. */ 337 /* Pacify GCC's `empty if-body' warning. */
226# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 338# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
227# else 339# ifndef YYSTACK_ALLOC_MAXIMUM
228# if defined (__STDC__) || defined (__cplusplus) 340 /* The OS might guarantee only one guard page at the bottom of the stack,
229# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 341 and a page size can be as small as 4096 bytes. So we cannot safely
230# define YYSIZE_T size_t 342 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
343 to allow for a few compiler-allocated temporary stack slots. */
344# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
231# endif 345# endif
346# else
232# define YYSTACK_ALLOC YYMALLOC 347# define YYSTACK_ALLOC YYMALLOC
233# define YYSTACK_FREE YYFREE 348# define YYSTACK_FREE YYFREE
349# ifndef YYSTACK_ALLOC_MAXIMUM
350# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
351# endif
352# if (defined __cplusplus && ! defined _STDLIB_H \
353 && ! ((defined YYMALLOC || defined malloc) \
354 && (defined YYFREE || defined free)))
355# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
356# ifndef _STDLIB_H
357# define _STDLIB_H 1
358# endif
359# endif
360# ifndef YYMALLOC
361# define YYMALLOC malloc
362# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
363 || defined __cplusplus || defined _MSC_VER)
364void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
365# endif
366# endif
367# ifndef YYFREE
368# define YYFREE free
369# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
370 || defined __cplusplus || defined _MSC_VER)
371void free (void *); /* INFRINGES ON USER NAME SPACE */
372# endif
373# endif
234# endif 374# endif
235#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ 375#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
236 376
237 377
238#if (! defined (yyoverflow) \ 378#if (! defined yyoverflow \
239 && (! defined (__cplusplus) \ 379 && (! defined __cplusplus \
240 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) 380 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
241 381
242/* A type that is properly aligned for any stack member. */ 382/* A type that is properly aligned for any stack member. */
243union yyalloc 383union yyalloc
244{ 384{
245 short int yyss; 385 yytype_int16 yyss;
246 YYSTYPE yyvs; 386 YYSTYPE yyvs;
247 }; 387 };
248 388
@@ -252,24 +392,24 @@ union yyalloc
252/* The size of an array large to enough to hold all stacks, each with 392/* The size of an array large to enough to hold all stacks, each with
253 N elements. */ 393 N elements. */
254# define YYSTACK_BYTES(N) \ 394# define YYSTACK_BYTES(N) \
255 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ 395 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
256 + YYSTACK_GAP_MAXIMUM) 396 + YYSTACK_GAP_MAXIMUM)
257 397
258/* Copy COUNT objects from FROM to TO. The source and destination do 398/* Copy COUNT objects from FROM to TO. The source and destination do
259 not overlap. */ 399 not overlap. */
260# ifndef YYCOPY 400# ifndef YYCOPY
261# if defined (__GNUC__) && 1 < __GNUC__ 401# if defined __GNUC__ && 1 < __GNUC__
262# define YYCOPY(To, From, Count) \ 402# define YYCOPY(To, From, Count) \
263 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 403 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
264# else 404# else
265# define YYCOPY(To, From, Count) \ 405# define YYCOPY(To, From, Count) \
266 do \ 406 do \
267 { \ 407 { \
268 register YYSIZE_T yyi; \ 408 YYSIZE_T yyi; \
269 for (yyi = 0; yyi < (Count); yyi++) \ 409 for (yyi = 0; yyi < (Count); yyi++) \
270 (To)[yyi] = (From)[yyi]; \ 410 (To)[yyi] = (From)[yyi]; \
271 } \ 411 } \
272 while (0) 412 while (YYID (0))
273# endif 413# endif
274# endif 414# endif
275 415
@@ -287,53 +427,47 @@ union yyalloc
287 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 427 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
288 yyptr += yynewbytes / sizeof (*yyptr); \ 428 yyptr += yynewbytes / sizeof (*yyptr); \
289 } \ 429 } \
290 while (0) 430 while (YYID (0))
291 431
292#endif 432#endif
293 433
294#if defined (__STDC__) || defined (__cplusplus) 434/* YYFINAL -- State number of the termination state. */
295 typedef signed char yysigned_char;
296#else
297 typedef short int yysigned_char;
298#endif
299
300/* YYFINAL -- State number of the termination state. */
301#define YYFINAL 4 435#define YYFINAL 4
302/* YYLAST -- Last index in YYTABLE. */ 436/* YYLAST -- Last index in YYTABLE. */
303#define YYLAST 535 437#define YYLAST 523
304 438
305/* YYNTOKENS -- Number of terminals. */ 439/* YYNTOKENS -- Number of terminals. */
306#define YYNTOKENS 52 440#define YYNTOKENS 53
307/* YYNNTS -- Number of nonterminals. */ 441/* YYNNTS -- Number of nonterminals. */
308#define YYNNTS 45 442#define YYNNTS 46
309/* YYNRULES -- Number of rules. */ 443/* YYNRULES -- Number of rules. */
310#define YYNRULES 124 444#define YYNRULES 126
311/* YYNRULES -- Number of states. */ 445/* YYNRULES -- Number of states. */
312#define YYNSTATES 174 446#define YYNSTATES 178
313 447
314/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 448/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
315#define YYUNDEFTOK 2 449#define YYUNDEFTOK 2
316#define YYMAXUTOK 297 450#define YYMAXUTOK 298
317 451
318#define YYTRANSLATE(YYX) \ 452#define YYTRANSLATE(YYX) \
319 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 453 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
320 454
321/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 455/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
322static const unsigned char yytranslate[] = 456static const yytype_uint8 yytranslate[] =
323{ 457{
324 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 458 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
325 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
326 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
327 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
328 46, 48, 47, 2, 45, 2, 2, 2, 2, 2, 462 47, 49, 48, 2, 46, 2, 2, 2, 2, 2,
329 2, 2, 2, 2, 2, 2, 2, 2, 51, 43, 463 2, 2, 2, 2, 2, 2, 2, 2, 52, 44,
330 2, 49, 2, 2, 2, 2, 2, 2, 2, 2, 464 2, 50, 2, 2, 2, 2, 2, 2, 2, 2,
331 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
332 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
333 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
334 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
335 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
336 2, 2, 2, 50, 2, 44, 2, 2, 2, 2, 470 2, 2, 2, 51, 2, 45, 2, 2, 2, 2,
337 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
338 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -350,114 +484,116 @@ static const unsigned char yytranslate[] =
350 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 484 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
351 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 485 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
352 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 486 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
353 35, 36, 37, 38, 39, 40, 41, 42 487 35, 36, 37, 38, 39, 40, 41, 42, 43
354}; 488};
355 489
356#if YYDEBUG 490#if YYDEBUG
357/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 491/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
358 YYRHS. */ 492 YYRHS. */
359static const unsigned short int yyprhs[] = 493static const yytype_uint16 yyprhs[] =
360{ 494{
361 0, 0, 3, 5, 8, 9, 12, 13, 17, 19, 495 0, 0, 3, 5, 8, 9, 12, 13, 18, 19,
362 21, 23, 25, 28, 31, 35, 36, 38, 40, 44, 496 23, 25, 27, 29, 31, 34, 37, 41, 42, 44,
363 49, 50, 52, 54, 57, 59, 61, 63, 65, 67, 497 46, 50, 55, 56, 58, 60, 63, 65, 67, 69,
364 69, 71, 73, 75, 81, 86, 89, 92, 95, 99, 498 71, 73, 75, 77, 79, 81, 87, 92, 95, 98,
365 103, 107, 110, 113, 116, 118, 120, 122, 124, 126, 499 101, 105, 109, 113, 116, 119, 122, 124, 126, 128,
366 128, 130, 132, 134, 136, 138, 141, 142, 144, 146, 500 130, 132, 134, 136, 138, 140, 142, 144, 147, 148,
367 149, 151, 153, 155, 157, 160, 162, 164, 169, 174, 501 150, 152, 155, 157, 159, 161, 163, 166, 168, 170,
368 177, 181, 185, 188, 190, 192, 194, 199, 204, 207, 502 175, 180, 183, 187, 191, 194, 196, 198, 200, 205,
369 211, 215, 218, 220, 224, 225, 227, 229, 233, 236, 503 210, 213, 217, 221, 224, 226, 230, 231, 233, 235,
370 239, 241, 242, 244, 246, 251, 256, 259, 263, 267, 504 239, 242, 245, 247, 248, 250, 252, 257, 262, 265,
371 271, 272, 274, 277, 281, 285, 286, 288, 290, 293, 505 269, 273, 277, 278, 280, 283, 287, 291, 292, 294,
372 297, 300, 301, 303, 305, 309, 312, 315, 317, 320, 506 296, 299, 303, 306, 307, 309, 311, 315, 318, 321,
373 321, 323, 326, 327, 329 507 323, 326, 327, 329, 332, 333, 335
374}; 508};
375 509
376/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 510/* YYRHS -- A `-1'-separated list of the rules' RHS. */
377static const yysigned_char yyrhs[] = 511static const yytype_int8 yyrhs[] =
378{ 512{
379 53, 0, -1, 54, -1, 53, 54, -1, -1, 55, 513 54, 0, -1, 55, -1, 54, 55, -1, -1, 56,
380 56, -1, -1, 22, 57, 58, -1, 58, -1, 82, 514 57, -1, -1, 12, 23, 58, 60, -1, -1, 23,
381 -1, 94, -1, 96, -1, 1, 43, -1, 1, 44, 515 59, 60, -1, 60, -1, 84, -1, 96, -1, 98,
382 -1, 62, 59, 43, -1, -1, 60, -1, 61, -1, 516 -1, 1, 44, -1, 1, 45, -1, 64, 61, 44,
383 60, 45, 61, -1, 72, 95, 93, 83, -1, -1, 517 -1, -1, 62, -1, 63, -1, 62, 46, 63, -1,
384 63, -1, 64, -1, 63, 64, -1, 65, -1, 66, 518 74, 97, 95, 85, -1, -1, 65, -1, 66, -1,
385 -1, 5, -1, 16, -1, 20, -1, 11, -1, 13, 519 65, 66, -1, 67, -1, 68, -1, 5, -1, 17,
386 -1, 67, -1, 71, -1, 27, 46, 63, 47, 48, 520 -1, 21, -1, 11, -1, 14, -1, 69, -1, 73,
387 -1, 27, 46, 63, 48, -1, 21, 36, -1, 23, 521 -1, 28, 47, 65, 48, 49, -1, 28, 47, 65,
388 36, -1, 10, 36, -1, 21, 36, 85, -1, 23, 522 49, -1, 22, 37, -1, 24, 37, -1, 10, 37,
389 36, 85, -1, 10, 36, 31, -1, 10, 31, -1, 523 -1, 22, 37, 87, -1, 24, 37, 87, -1, 10,
390 21, 85, -1, 23, 85, -1, 7, -1, 18, -1, 524 37, 32, -1, 10, 32, -1, 22, 87, -1, 24,
391 14, -1, 15, -1, 19, -1, 24, -1, 12, -1, 525 87, -1, 7, -1, 19, -1, 15, -1, 16, -1,
392 9, -1, 25, -1, 6, -1, 40, -1, 47, 69, 526 20, -1, 25, -1, 13, -1, 9, -1, 26, -1,
393 -1, -1, 70, -1, 71, -1, 70, 71, -1, 8, 527 6, -1, 41, -1, 48, 71, -1, -1, 72, -1,
394 -1, 26, -1, 30, -1, 17, -1, 68, 72, -1, 528 73, -1, 72, 73, -1, 8, -1, 27, -1, 31,
395 73, -1, 36, -1, 73, 46, 76, 48, -1, 73, 529 -1, 18, -1, 70, 74, -1, 75, -1, 37, -1,
396 46, 1, 48, -1, 73, 32, -1, 46, 72, 48, 530 75, 47, 78, 49, -1, 75, 47, 1, 49, -1,
397 -1, 46, 1, 48, -1, 68, 74, -1, 75, -1, 531 75, 33, -1, 47, 74, 49, -1, 47, 1, 49,
398 36, -1, 40, -1, 75, 46, 76, 48, -1, 75, 532 -1, 70, 76, -1, 77, -1, 37, -1, 41, -1,
399 46, 1, 48, -1, 75, 32, -1, 46, 74, 48, 533 77, 47, 78, 49, -1, 77, 47, 1, 49, -1,
400 -1, 46, 1, 48, -1, 77, 35, -1, 77, -1, 534 77, 33, -1, 47, 76, 49, -1, 47, 1, 49,
401 78, 45, 35, -1, -1, 78, -1, 79, -1, 78, 535 -1, 79, 36, -1, 79, -1, 80, 46, 36, -1,
402 45, 79, -1, 63, 80, -1, 68, 80, -1, 81, 536 -1, 80, -1, 81, -1, 80, 46, 81, -1, 65,
403 -1, -1, 36, -1, 40, -1, 81, 46, 76, 48, 537 82, -1, 70, 82, -1, 83, -1, -1, 37, -1,
404 -1, 81, 46, 1, 48, -1, 81, 32, -1, 46, 538 41, -1, 83, 47, 78, 49, -1, 83, 47, 1,
405 80, 48, -1, 46, 1, 48, -1, 62, 72, 31, 539 49, -1, 83, 33, -1, 47, 82, 49, -1, 47,
406 -1, -1, 84, -1, 49, 33, -1, 50, 86, 44, 540 1, 49, -1, 64, 74, 32, -1, -1, 86, -1,
407 -1, 50, 1, 44, -1, -1, 87, -1, 88, -1, 541 50, 34, -1, 51, 88, 45, -1, 51, 1, 45,
408 87, 88, -1, 62, 89, 43, -1, 1, 43, -1, 542 -1, -1, 89, -1, 90, -1, 89, 90, -1, 64,
409 -1, 90, -1, 91, -1, 90, 45, 91, -1, 74, 543 91, 44, -1, 1, 44, -1, -1, 92, -1, 93,
410 93, -1, 36, 92, -1, 92, -1, 51, 33, -1, 544 -1, 92, 46, 93, -1, 76, 95, -1, 37, 94,
411 -1, 30, -1, 29, 43, -1, -1, 29, -1, 28, 545 -1, 94, -1, 52, 34, -1, -1, 31, -1, 30,
412 46, 36, 48, 43, -1 546 44, -1, -1, 30, -1, 29, 47, 37, 49, 44,
547 -1
413}; 548};
414 549
415/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 550/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
416static const unsigned short int yyrline[] = 551static const yytype_uint16 yyrline[] =
417{ 552{
418 0, 102, 102, 103, 107, 107, 113, 113, 115, 116, 553 0, 103, 103, 104, 108, 108, 114, 114, 116, 116,
419 117, 118, 119, 120, 124, 138, 139, 143, 151, 164, 554 118, 119, 120, 121, 122, 123, 127, 141, 142, 146,
420 170, 171, 175, 176, 180, 186, 190, 191, 192, 193, 555 154, 167, 173, 174, 178, 179, 183, 189, 193, 194,
421 194, 198, 199, 200, 201, 205, 207, 209, 213, 220, 556 195, 196, 197, 201, 202, 203, 204, 208, 210, 212,
422 227, 236, 237, 238, 242, 243, 244, 245, 246, 247, 557 216, 223, 230, 239, 240, 241, 245, 246, 247, 248,
423 248, 249, 250, 251, 252, 256, 261, 262, 266, 267, 558 249, 250, 251, 252, 253, 254, 255, 259, 264, 265,
424 271, 271, 271, 272, 280, 281, 285, 294, 296, 298, 559 269, 270, 274, 274, 274, 275, 283, 284, 288, 297,
425 300, 302, 309, 310, 314, 315, 316, 318, 320, 322, 560 299, 301, 303, 305, 312, 313, 317, 318, 319, 321,
426 324, 329, 330, 331, 335, 336, 340, 341, 346, 351, 561 323, 325, 327, 332, 333, 334, 338, 339, 343, 344,
427 353, 357, 358, 366, 370, 372, 374, 376, 378, 383, 562 349, 354, 356, 360, 361, 369, 373, 375, 377, 379,
428 392, 393, 398, 403, 404, 408, 409, 413, 414, 418, 563 381, 386, 395, 396, 401, 406, 407, 411, 412, 416,
429 420, 425, 426, 430, 431, 435, 436, 437, 441, 445, 564 417, 421, 423, 428, 429, 433, 434, 438, 439, 440,
430 446, 450, 454, 455, 459 565 444, 448, 449, 453, 457, 458, 462
431}; 566};
432#endif 567#endif
433 568
434#if YYDEBUG || YYERROR_VERBOSE 569#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
435/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 570/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
436 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 571 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
437static const char *const yytname[] = 572static const char *const yytname[] =
438{ 573{
439 "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW", 574 "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW",
440 "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW", 575 "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW",
441 "ENUM_KEYW", "EXTERN_KEYW", "FLOAT_KEYW", "INLINE_KEYW", "INT_KEYW", 576 "ENUM_KEYW", "EXTERN_KEYW", "EXTENSION_KEYW", "FLOAT_KEYW",
442 "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW", "SHORT_KEYW", 577 "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW",
443 "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", "TYPEDEF_KEYW", 578 "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW",
444 "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", "VOLATILE_KEYW", 579 "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW",
445 "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", "ATTRIBUTE_PHRASE", 580 "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE",
446 "BRACE_PHRASE", "BRACKET_PHRASE", "EXPRESSION_PHRASE", "CHAR", "DOTS", 581 "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE",
447 "IDENT", "INT", "REAL", "STRING", "TYPE", "OTHER", "FILENAME", "';'", 582 "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING",
448 "'}'", "','", "'('", "'*'", "')'", "'='", "'{'", "':'", "$accept", 583 "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'",
449 "declaration_seq", "declaration", "@1", "declaration1", "@2", 584 "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "@1",
450 "simple_declaration", "init_declarator_list_opt", "init_declarator_list", 585 "declaration1", "@2", "@3", "simple_declaration",
451 "init_declarator", "decl_specifier_seq_opt", "decl_specifier_seq", 586 "init_declarator_list_opt", "init_declarator_list", "init_declarator",
452 "decl_specifier", "storage_class_specifier", "type_specifier", 587 "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier",
453 "simple_type_specifier", "ptr_operator", "cvar_qualifier_seq_opt", 588 "storage_class_specifier", "type_specifier", "simple_type_specifier",
454 "cvar_qualifier_seq", "cvar_qualifier", "declarator", 589 "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq",
455 "direct_declarator", "nested_declarator", "direct_nested_declarator", 590 "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator",
456 "parameter_declaration_clause", "parameter_declaration_list_opt", 591 "direct_nested_declarator", "parameter_declaration_clause",
457 "parameter_declaration_list", "parameter_declaration", 592 "parameter_declaration_list_opt", "parameter_declaration_list",
458 "m_abstract_declarator", "direct_m_abstract_declarator", 593 "parameter_declaration", "m_abstract_declarator",
459 "function_definition", "initializer_opt", "initializer", "class_body", 594 "direct_m_abstract_declarator", "function_definition", "initializer_opt",
460 "member_specification_opt", "member_specification", "member_declaration", 595 "initializer", "class_body", "member_specification_opt",
596 "member_specification", "member_declaration",
461 "member_declarator_list_opt", "member_declarator_list", 597 "member_declarator_list_opt", "member_declarator_list",
462 "member_declarator", "member_bitfield_declarator", "attribute_opt", 598 "member_declarator", "member_bitfield_declarator", "attribute_opt",
463 "asm_definition", "asm_phrase_opt", "export_definition", 0 599 "asm_definition", "asm_phrase_opt", "export_definition", 0
@@ -467,284 +603,266 @@ static const char *const yytname[] =
467# ifdef YYPRINT 603# ifdef YYPRINT
468/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 604/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
469 token YYLEX-NUM. */ 605 token YYLEX-NUM. */
470static const unsigned short int yytoknum[] = 606static const yytype_uint16 yytoknum[] =
471{ 607{
472 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 608 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
473 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 609 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
474 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 610 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
475 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 611 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
476 295, 296, 297, 59, 125, 44, 40, 42, 41, 61, 612 295, 296, 297, 298, 59, 125, 44, 40, 42, 41,
477 123, 58 613 61, 123, 58
478}; 614};
479# endif 615# endif
480 616
481/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 617/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
482static const unsigned char yyr1[] = 618static const yytype_uint8 yyr1[] =
483{ 619{
484 0, 52, 53, 53, 55, 54, 57, 56, 56, 56, 620 0, 53, 54, 54, 56, 55, 58, 57, 59, 57,
485 56, 56, 56, 56, 58, 59, 59, 60, 60, 61, 621 57, 57, 57, 57, 57, 57, 60, 61, 61, 62,
486 62, 62, 63, 63, 64, 64, 65, 65, 65, 65, 622 62, 63, 64, 64, 65, 65, 66, 66, 67, 67,
487 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 623 67, 67, 67, 68, 68, 68, 68, 68, 68, 68,
488 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 624 68, 68, 68, 68, 68, 68, 69, 69, 69, 69,
489 67, 67, 67, 67, 67, 68, 69, 69, 70, 70, 625 69, 69, 69, 69, 69, 69, 69, 70, 71, 71,
490 71, 71, 71, 71, 72, 72, 73, 73, 73, 73, 626 72, 72, 73, 73, 73, 73, 74, 74, 75, 75,
491 73, 73, 74, 74, 75, 75, 75, 75, 75, 75, 627 75, 75, 75, 75, 76, 76, 77, 77, 77, 77,
492 75, 76, 76, 76, 77, 77, 78, 78, 79, 80, 628 77, 77, 77, 78, 78, 78, 79, 79, 80, 80,
493 80, 81, 81, 81, 81, 81, 81, 81, 81, 82, 629 81, 82, 82, 83, 83, 83, 83, 83, 83, 83,
494 83, 83, 84, 85, 85, 86, 86, 87, 87, 88, 630 83, 84, 85, 85, 86, 87, 87, 88, 88, 89,
495 88, 89, 89, 90, 90, 91, 91, 91, 92, 93, 631 89, 90, 90, 91, 91, 92, 92, 93, 93, 93,
496 93, 94, 95, 95, 96 632 94, 95, 95, 96, 97, 97, 98
497}; 633};
498 634
499/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 635/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
500static const unsigned char yyr2[] = 636static const yytype_uint8 yyr2[] =
501{ 637{
502 0, 2, 1, 2, 0, 2, 0, 3, 1, 1, 638 0, 2, 1, 2, 0, 2, 0, 4, 0, 3,
503 1, 1, 2, 2, 3, 0, 1, 1, 3, 4, 639 1, 1, 1, 1, 2, 2, 3, 0, 1, 1,
504 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 640 3, 4, 0, 1, 1, 2, 1, 1, 1, 1,
505 1, 1, 1, 5, 4, 2, 2, 2, 3, 3, 641 1, 1, 1, 1, 1, 5, 4, 2, 2, 2,
506 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 642 3, 3, 3, 2, 2, 2, 1, 1, 1, 1,
507 1, 1, 1, 1, 1, 2, 0, 1, 1, 2, 643 1, 1, 1, 1, 1, 1, 1, 2, 0, 1,
508 1, 1, 1, 1, 2, 1, 1, 4, 4, 2, 644 1, 2, 1, 1, 1, 1, 2, 1, 1, 4,
509 3, 3, 2, 1, 1, 1, 4, 4, 2, 3, 645 4, 2, 3, 3, 2, 1, 1, 1, 4, 4,
510 3, 2, 1, 3, 0, 1, 1, 3, 2, 2, 646 2, 3, 3, 2, 1, 3, 0, 1, 1, 3,
511 1, 0, 1, 1, 4, 4, 2, 3, 3, 3, 647 2, 2, 1, 0, 1, 1, 4, 4, 2, 3,
512 0, 1, 2, 3, 3, 0, 1, 1, 2, 3, 648 3, 3, 0, 1, 2, 3, 3, 0, 1, 1,
513 2, 0, 1, 1, 3, 2, 2, 1, 2, 0, 649 2, 3, 2, 0, 1, 1, 3, 2, 2, 1,
514 1, 2, 0, 1, 5 650 2, 0, 1, 2, 0, 1, 5
515}; 651};
516 652
517/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 653/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
518 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 654 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
519 means the default is an error. */ 655 means the default is an error. */
520static const unsigned char yydefact[] = 656static const yytype_uint8 yydefact[] =
521{ 657{
522 4, 4, 2, 0, 1, 3, 0, 26, 53, 44, 658 4, 4, 2, 0, 1, 3, 0, 28, 55, 46,
523 60, 51, 0, 29, 50, 30, 46, 47, 27, 63, 659 62, 53, 0, 31, 0, 52, 32, 48, 49, 29,
524 45, 48, 28, 0, 6, 0, 49, 52, 61, 0, 660 65, 47, 50, 30, 0, 8, 0, 51, 54, 63,
525 0, 0, 62, 54, 5, 8, 15, 21, 22, 24, 661 0, 0, 0, 64, 56, 5, 10, 17, 23, 24,
526 25, 31, 32, 9, 10, 11, 12, 13, 41, 37, 662 26, 27, 33, 34, 11, 12, 13, 14, 15, 43,
527 35, 0, 42, 20, 36, 43, 0, 0, 121, 66, 663 39, 6, 37, 0, 44, 22, 38, 45, 0, 0,
528 0, 56, 0, 16, 17, 0, 122, 65, 23, 40, 664 123, 68, 0, 58, 0, 18, 19, 0, 124, 67,
529 38, 0, 111, 0, 0, 107, 7, 15, 39, 0, 665 25, 42, 22, 40, 0, 113, 0, 0, 109, 9,
530 0, 0, 0, 55, 57, 58, 14, 0, 64, 123, 666 17, 41, 0, 0, 0, 0, 57, 59, 60, 16,
531 99, 119, 69, 0, 110, 104, 74, 75, 0, 0, 667 0, 66, 125, 101, 121, 71, 0, 7, 112, 106,
532 0, 119, 73, 0, 112, 113, 117, 103, 0, 108, 668 76, 77, 0, 0, 0, 121, 75, 0, 114, 115,
533 122, 0, 34, 0, 71, 70, 59, 18, 120, 100, 669 119, 105, 0, 110, 124, 0, 36, 0, 73, 72,
534 0, 91, 0, 82, 85, 86, 116, 0, 74, 0, 670 61, 20, 122, 102, 0, 93, 0, 84, 87, 88,
535 118, 72, 115, 78, 0, 109, 0, 33, 124, 0, 671 118, 0, 76, 0, 120, 74, 117, 80, 0, 111,
536 19, 101, 68, 92, 54, 0, 91, 88, 90, 67, 672 0, 35, 126, 0, 21, 103, 70, 94, 56, 0,
537 81, 0, 80, 79, 0, 0, 114, 102, 0, 93, 673 93, 90, 92, 69, 83, 0, 82, 81, 0, 0,
538 0, 89, 96, 0, 83, 87, 77, 76, 98, 97, 674 116, 104, 0, 95, 0, 91, 98, 0, 85, 89,
539 0, 0, 95, 94 675 79, 78, 100, 99, 0, 0, 97, 96
540}; 676};
541 677
542/* YYDEFGOTO[NTERM-NUM]. */ 678/* YYDEFGOTO[NTERM-NUM]. */
543static const short int yydefgoto[] = 679static const yytype_int16 yydefgoto[] =
544{ 680{
545 -1, 1, 2, 3, 34, 53, 35, 62, 63, 64, 681 -1, 1, 2, 3, 35, 72, 55, 36, 64, 65,
546 72, 37, 38, 39, 40, 41, 65, 83, 84, 42, 682 66, 75, 38, 39, 40, 41, 42, 67, 86, 87,
547 110, 67, 101, 102, 122, 123, 124, 125, 147, 148, 683 43, 114, 69, 105, 106, 126, 127, 128, 129, 151,
548 43, 140, 141, 52, 73, 74, 75, 103, 104, 105, 684 152, 44, 144, 145, 54, 76, 77, 78, 107, 108,
549 106, 119, 44, 91, 45 685 109, 110, 123, 45, 94, 46
550}; 686};
551 687
552/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 688/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
553 STATE-NUM. */ 689 STATE-NUM. */
554#define YYPACT_NINF -128 690#define YYPACT_NINF -135
555static const short int yypact[] = 691static const yytype_int16 yypact[] =
556{ 692{
557 -128, 13, -128, 329, -128, -128, 36, -128, -128, -128, 693 -135, 11, -135, 312, -135, -135, 24, -135, -135, -135,
558 -128, -128, -16, -128, -128, -128, -128, -128, -128, -128, 694 -135, -135, -23, -135, -2, -135, -135, -135, -135, -135,
559 -128, -128, -128, -25, -128, -24, -128, -128, -128, -29, 695 -135, -135, -135, -135, -17, -135, -11, -135, -135, -135,
560 -4, -22, -128, -128, -128, -128, -28, 495, -128, -128, 696 -3, 16, 26, -135, -135, -135, -135, 34, 482, -135,
561 -128, -128, -128, -128, -128, -128, -128, -128, -128, 16, 697 -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
562 -23, 103, -128, 495, -23, -128, 495, 35, -128, -128, 698 -8, -135, 22, 97, -135, 482, 22, -135, 482, 56,
563 3, 15, 9, 17, -128, -28, -15, -8, -128, -128, 699 -135, -135, 12, 10, 50, 49, -135, 34, -13, 15,
564 -128, 47, 23, 44, 150, -128, -128, -28, -128, 372, 700 -135, -135, 482, -135, 47, -25, 51, 145, -135, -135,
565 33, 48, 49, -128, 15, -128, -128, -28, -128, -128, 701 34, -135, 356, 52, 71, 77, -135, 10, -135, -135,
566 -128, 64, -128, 197, -128, -128, 50, -128, 21, 65, 702 34, -135, -135, -135, 68, -135, 193, -135, -135, -135,
567 37, 64, 14, 56, 55, -128, -128, -128, 59, -128, 703 48, -135, 6, 93, 37, 68, 18, 85, 84, -135,
568 74, 57, -128, 63, -128, -128, -128, -128, -128, 76, 704 -135, -135, 87, -135, 102, 86, -135, 89, -135, -135,
569 83, 416, 84, 99, 90, -128, -128, 88, -128, 89, 705 -135, -135, -135, 90, 88, 401, 94, 100, 101, -135,
570 -128, -128, -128, -128, 241, -128, 23, -128, -128, 105, 706 -135, 99, -135, 108, -135, -135, -135, -135, 230, -135,
571 -128, -128, -128, -128, -128, 8, 46, -128, 26, -128, 707 -25, -135, -135, 105, -135, -135, -135, -135, -135, 9,
572 -128, 459, -128, -128, 92, 93, -128, -128, 94, -128, 708 42, -135, 28, -135, -135, 445, -135, -135, 119, 125,
573 96, -128, -128, 285, -128, -128, -128, -128, -128, -128, 709 -135, -135, 126, -135, 128, -135, -135, 267, -135, -135,
574 97, 100, -128, -128 710 -135, -135, -135, -135, 129, 130, -135, -135
575}; 711};
576 712
577/* YYPGOTO[NTERM-NUM]. */ 713/* YYPGOTO[NTERM-NUM]. */
578static const short int yypgoto[] = 714static const yytype_int16 yypgoto[] =
579{ 715{
580 -128, -128, 151, -128, -128, -128, 119, -128, -128, 66, 716 -135, -135, 179, -135, -135, -135, -135, -47, -135, -135,
581 0, -56, -36, -128, -128, -128, -70, -128, -128, -51, 717 91, 0, -58, -37, -135, -135, -135, -73, -135, -135,
582 -31, -128, -11, -128, -127, -128, -128, 27, -81, -128, 718 -48, -32, -135, -38, -135, -134, -135, -135, 29, -63,
583 -128, -128, -128, -19, -128, -128, 107, -128, -128, 43, 719 -135, -135, -135, -135, -20, -135, -135, 106, -135, -135,
584 86, 82, -128, -128, -128 720 45, 95, 82, -135, -135, -135
585}; 721};
586 722
587/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 723/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
588 positive, shift that token. If negative, reduce the rule which 724 positive, shift that token. If negative, reduce the rule which
589 number is the opposite. If zero, do what YYDEFACT says. 725 number is the opposite. If zero, do what YYDEFACT says.
590 If YYTABLE_NINF, syntax error. */ 726 If YYTABLE_NINF, syntax error. */
591#define YYTABLE_NINF -107 727#define YYTABLE_NINF -109
592static const short int yytable[] = 728static const yytype_int16 yytable[] =
593{ 729{
594 79, 68, 100, 36, 81, 66, 55, 155, 59, 158, 730 82, 70, 104, 37, 159, 68, 57, 131, 79, 49,
595 85, 50, 54, 4, 89, 48, 90, 56, 60, 61, 731 162, 4, 100, 84, 50, 88, 101, 92, 10, 93,
596 49, 58, 127, 10, 92, 51, 51, 51, 100, 82, 732 52, 51, 102, 63, 71, 97, 56, 103, 20, 104,
597 100, 70, 19, 116, 88, 78, 171, 121, 93, 59, 733 85, 104, 73, 175, 53, 91, 81, 29, 125, 120,
598 -91, 28, 57, 68, 143, 32, 133, 69, 159, 60, 734 53, 33, -93, 132, 58, 70, 147, 101, 95, 61,
599 61, 146, 86, 77, 145, 61, -91, 128, 162, 96, 735 163, 137, 150, 102, 63, 80, 149, 63, -93, 62,
600 134, 97, 87, 97, 160, 161, 100, 98, 61, 98, 736 63, 166, 96, 59, 133, 138, 135, 104, 47, 48,
601 61, 80, 163, 128, 99, 146, 146, 97, 121, 46, 737 60, 61, 80, 53, 132, 167, 150, 150, 101, 147,
602 47, 113, 143, 98, 61, 68, 159, 129, 107, 131, 738 125, 62, 63, 163, 102, 63, 164, 165, 70, 149,
603 94, 95, 145, 61, 118, 121, 114, 115, 130, 135, 739 63, 98, 99, 83, 89, 90, 111, 125, 74, 122,
604 136, 99, 94, 89, 71, 137, 138, 121, 7, 8, 740 103, 117, 7, 8, 9, 10, 11, 12, 13, 125,
605 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 741 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
606 19, 20, 21, 22, 23, 139, 25, 26, 27, 28, 742 118, 26, 27, 28, 29, 30, 119, 134, 33, 139,
607 29, 142, 149, 32, 150, 151, 152, 153, 157, -20, 743 140, 98, 92, 142, -22, 141, 154, 146, 34, 161,
608 166, 167, 168, 33, 169, 172, -20, -105, 173, -20, 744 143, -22, -107, 153, -22, -22, 112, 155, 156, -22,
609 -20, 108, 5, 117, -20, 7, 8, 9, 10, 11, 745 7, 8, 9, 10, 11, 12, 13, 157, 15, 16,
610 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 746 17, 18, 19, 20, 21, 22, 23, 24, 170, 26,
611 22, 23, 76, 25, 26, 27, 28, 29, 165, 156, 747 27, 28, 29, 30, 171, 172, 33, 173, 176, 177,
612 32, 109, 126, 132, 0, 0, -20, 0, 0, 0, 748 5, 121, -22, 113, 169, 160, 34, 136, 0, -22,
613 33, 0, 0, -20, -106, 0, -20, -20, 120, 0, 749 -108, 0, -22, -22, 124, 130, 0, -22, 7, 8,
614 0, -20, 7, 8, 9, 10, 11, 12, 13, 14, 750 9, 10, 11, 12, 13, 0, 15, 16, 17, 18,
615 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 751 19, 20, 21, 22, 23, 24, 0, 26, 27, 28,
616 25, 26, 27, 28, 29, 0, 0, 32, 0, 0, 752 29, 30, 0, 0, 33, 0, 0, 0, 0, -86,
617 0, 0, -84, 0, 0, 0, 0, 33, 0, 0, 753 0, 158, 0, 0, 34, 7, 8, 9, 10, 11,
618 0, 0, 154, 0, 0, -84, 7, 8, 9, 10, 754 12, 13, -86, 15, 16, 17, 18, 19, 20, 21,
619 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 755 22, 23, 24, 0, 26, 27, 28, 29, 30, 0,
620 21, 22, 23, 0, 25, 26, 27, 28, 29, 0, 756 0, 33, 0, 0, 0, 0, -86, 0, 174, 0,
621 0, 32, 0, 0, 0, 0, -84, 0, 0, 0, 757 0, 34, 7, 8, 9, 10, 11, 12, 13, -86,
622 0, 33, 0, 0, 0, 0, 170, 0, 0, -84, 758 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
623 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 759 0, 26, 27, 28, 29, 30, 0, 0, 33, 0,
624 17, 18, 19, 20, 21, 22, 23, 0, 25, 26, 760 0, 0, 0, -86, 0, 0, 0, 0, 34, 0,
625 27, 28, 29, 0, 0, 32, 0, 0, 0, 0, 761 0, 0, 0, 6, 0, 0, -86, 7, 8, 9,
626 -84, 0, 0, 0, 0, 33, 0, 0, 0, 0,
627 6, 0, 0, -84, 7, 8, 9, 10, 11, 12,
628 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
629 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
630 0, 0, 0, 0, 0, -20, 0, 0, 0, 33,
631 0, 0, -20, 0, 0, -20, -20, 7, 8, 9,
632 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 762 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
633 20, 21, 22, 23, 0, 25, 26, 27, 28, 29, 763 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
634 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 764 30, 31, 32, 33, 0, 0, 0, 0, 0, -22,
635 0, 0, 33, 0, 0, 0, 0, 0, 0, 111, 765 0, 0, 0, 34, 0, 0, -22, 0, 0, -22,
636 112, 7, 8, 9, 10, 11, 12, 13, 14, 15, 766 -22, 7, 8, 9, 10, 11, 12, 13, 0, 15,
637 16, 17, 18, 19, 20, 21, 22, 23, 0, 25, 767 16, 17, 18, 19, 20, 21, 22, 23, 24, 0,
638 26, 27, 28, 29, 0, 0, 32, 0, 0, 0, 768 26, 27, 28, 29, 30, 0, 0, 33, 0, 0,
639 0, 0, 143, 0, 0, 0, 144, 0, 0, 0, 769 0, 0, 0, 0, 0, 0, 0, 34, 0, 0,
640 0, 0, 145, 61, 7, 8, 9, 10, 11, 12, 770 0, 0, 0, 0, 115, 116, 7, 8, 9, 10,
641 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 771 11, 12, 13, 0, 15, 16, 17, 18, 19, 20,
642 23, 0, 25, 26, 27, 28, 29, 0, 0, 32, 772 21, 22, 23, 24, 0, 26, 27, 28, 29, 30,
643 0, 0, 0, 0, 164, 0, 0, 0, 0, 33, 773 0, 0, 33, 0, 0, 0, 0, 0, 147, 0,
644 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 774 0, 0, 148, 0, 0, 0, 0, 0, 149, 63,
645 17, 18, 19, 20, 21, 22, 23, 0, 25, 26, 775 7, 8, 9, 10, 11, 12, 13, 0, 15, 16,
646 27, 28, 29, 0, 0, 32, 0, 0, 0, 0, 776 17, 18, 19, 20, 21, 22, 23, 24, 0, 26,
647 0, 0, 0, 0, 0, 33 777 27, 28, 29, 30, 0, 0, 33, 0, 0, 0,
778 0, 168, 0, 0, 0, 0, 34, 7, 8, 9,
779 10, 11, 12, 13, 0, 15, 16, 17, 18, 19,
780 20, 21, 22, 23, 24, 0, 26, 27, 28, 29,
781 30, 0, 0, 33, 0, 0, 0, 0, 0, 0,
782 0, 0, 0, 34
648}; 783};
649 784
650static const short int yycheck[] = 785static const yytype_int16 yycheck[] =
651{ 786{
652 56, 37, 72, 3, 1, 36, 25, 134, 36, 1, 787 58, 38, 75, 3, 138, 37, 26, 1, 55, 32,
653 61, 36, 36, 0, 29, 31, 31, 46, 46, 47, 788 1, 0, 37, 1, 37, 63, 41, 30, 8, 32,
654 36, 43, 1, 8, 32, 50, 50, 50, 98, 60, 789 37, 23, 47, 48, 32, 72, 37, 52, 18, 102,
655 100, 50, 17, 84, 65, 54, 163, 93, 46, 36, 790 62, 104, 52, 167, 51, 67, 56, 27, 96, 87,
656 32, 26, 46, 79, 36, 30, 32, 31, 40, 46, 791 51, 31, 33, 37, 47, 82, 37, 41, 33, 37,
657 47, 121, 43, 53, 46, 47, 48, 36, 32, 36, 792 41, 33, 125, 47, 48, 55, 47, 48, 49, 47,
658 46, 40, 45, 40, 145, 146, 136, 46, 47, 46, 793 48, 33, 47, 47, 102, 47, 104, 140, 44, 45,
659 47, 36, 46, 36, 51, 145, 146, 40, 134, 43, 794 44, 37, 72, 51, 37, 47, 149, 150, 41, 37,
660 44, 48, 36, 46, 47, 121, 40, 98, 44, 100, 795 138, 47, 48, 41, 47, 48, 149, 150, 125, 47,
661 43, 44, 46, 47, 30, 151, 48, 48, 33, 43, 796 48, 44, 45, 37, 44, 46, 45, 155, 1, 31,
662 45, 51, 43, 29, 1, 48, 43, 163, 5, 6, 797 52, 49, 5, 6, 7, 8, 9, 10, 11, 167,
663 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 798 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
664 17, 18, 19, 20, 21, 49, 23, 24, 25, 26, 799 49, 24, 25, 26, 27, 28, 49, 34, 31, 44,
665 27, 48, 48, 30, 35, 45, 48, 48, 33, 36, 800 46, 44, 30, 44, 37, 49, 36, 49, 41, 34,
666 48, 48, 48, 40, 48, 48, 43, 44, 48, 46, 801 50, 44, 45, 49, 47, 48, 1, 46, 49, 52,
667 47, 1, 1, 87, 51, 5, 6, 7, 8, 9, 802 5, 6, 7, 8, 9, 10, 11, 49, 13, 14,
668 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 803 15, 16, 17, 18, 19, 20, 21, 22, 49, 24,
669 20, 21, 53, 23, 24, 25, 26, 27, 151, 136, 804 25, 26, 27, 28, 49, 49, 31, 49, 49, 49,
670 30, 74, 96, 101, -1, -1, 36, -1, -1, -1, 805 1, 90, 37, 77, 155, 140, 41, 105, -1, 44,
671 40, -1, -1, 43, 44, -1, 46, 47, 1, -1, 806 45, -1, 47, 48, 1, 100, -1, 52, 5, 6,
672 -1, 51, 5, 6, 7, 8, 9, 10, 11, 12, 807 7, 8, 9, 10, 11, -1, 13, 14, 15, 16,
673 13, 14, 15, 16, 17, 18, 19, 20, 21, -1, 808 17, 18, 19, 20, 21, 22, -1, 24, 25, 26,
674 23, 24, 25, 26, 27, -1, -1, 30, -1, -1, 809 27, 28, -1, -1, 31, -1, -1, -1, -1, 36,
675 -1, -1, 35, -1, -1, -1, -1, 40, -1, -1, 810 -1, 1, -1, -1, 41, 5, 6, 7, 8, 9,
676 -1, -1, 1, -1, -1, 48, 5, 6, 7, 8, 811 10, 11, 49, 13, 14, 15, 16, 17, 18, 19,
677 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 812 20, 21, 22, -1, 24, 25, 26, 27, 28, -1,
678 19, 20, 21, -1, 23, 24, 25, 26, 27, -1, 813 -1, 31, -1, -1, -1, -1, 36, -1, 1, -1,
679 -1, 30, -1, -1, -1, -1, 35, -1, -1, -1, 814 -1, 41, 5, 6, 7, 8, 9, 10, 11, 49,
680 -1, 40, -1, -1, -1, -1, 1, -1, -1, 48, 815 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
681 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 816 -1, 24, 25, 26, 27, 28, -1, -1, 31, -1,
682 15, 16, 17, 18, 19, 20, 21, -1, 23, 24, 817 -1, -1, -1, 36, -1, -1, -1, -1, 41, -1,
683 25, 26, 27, -1, -1, 30, -1, -1, -1, -1, 818 -1, -1, -1, 1, -1, -1, 49, 5, 6, 7,
684 35, -1, -1, -1, -1, 40, -1, -1, -1, -1,
685 1, -1, -1, 48, 5, 6, 7, 8, 9, 10,
686 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
687 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
688 -1, -1, -1, -1, -1, 36, -1, -1, -1, 40,
689 -1, -1, 43, -1, -1, 46, 47, 5, 6, 7,
690 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 819 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
691 18, 19, 20, 21, -1, 23, 24, 25, 26, 27, 820 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
692 -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, 821 28, 29, 30, 31, -1, -1, -1, -1, -1, 37,
693 -1, -1, 40, -1, -1, -1, -1, -1, -1, 47, 822 -1, -1, -1, 41, -1, -1, 44, -1, -1, 47,
694 48, 5, 6, 7, 8, 9, 10, 11, 12, 13, 823 48, 5, 6, 7, 8, 9, 10, 11, -1, 13,
695 14, 15, 16, 17, 18, 19, 20, 21, -1, 23, 824 14, 15, 16, 17, 18, 19, 20, 21, 22, -1,
696 24, 25, 26, 27, -1, -1, 30, -1, -1, -1, 825 24, 25, 26, 27, 28, -1, -1, 31, -1, -1,
697 -1, -1, 36, -1, -1, -1, 40, -1, -1, -1, 826 -1, -1, -1, -1, -1, -1, -1, 41, -1, -1,
698 -1, -1, 46, 47, 5, 6, 7, 8, 9, 10, 827 -1, -1, -1, -1, 48, 49, 5, 6, 7, 8,
699 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 828 9, 10, 11, -1, 13, 14, 15, 16, 17, 18,
700 21, -1, 23, 24, 25, 26, 27, -1, -1, 30, 829 19, 20, 21, 22, -1, 24, 25, 26, 27, 28,
701 -1, -1, -1, -1, 35, -1, -1, -1, -1, 40, 830 -1, -1, 31, -1, -1, -1, -1, -1, 37, -1,
702 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 831 -1, -1, 41, -1, -1, -1, -1, -1, 47, 48,
703 15, 16, 17, 18, 19, 20, 21, -1, 23, 24, 832 5, 6, 7, 8, 9, 10, 11, -1, 13, 14,
704 25, 26, 27, -1, -1, 30, -1, -1, -1, -1, 833 15, 16, 17, 18, 19, 20, 21, 22, -1, 24,
705 -1, -1, -1, -1, -1, 40 834 25, 26, 27, 28, -1, -1, 31, -1, -1, -1,
835 -1, 36, -1, -1, -1, -1, 41, 5, 6, 7,
836 8, 9, 10, 11, -1, 13, 14, 15, 16, 17,
837 18, 19, 20, 21, 22, -1, 24, 25, 26, 27,
838 28, -1, -1, 31, -1, -1, -1, -1, -1, -1,
839 -1, -1, -1, 41
706}; 840};
707 841
708/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 842/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
709 symbol of state STATE-NUM. */ 843 symbol of state STATE-NUM. */
710static const unsigned char yystos[] = 844static const yytype_uint8 yystos[] =
711{ 845{
712 0, 53, 54, 55, 0, 54, 1, 5, 6, 7, 846 0, 54, 55, 56, 0, 55, 1, 5, 6, 7,
713 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 847 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
714 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 848 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
715 28, 29, 30, 40, 56, 58, 62, 63, 64, 65, 849 28, 29, 30, 31, 41, 57, 60, 64, 65, 66,
716 66, 67, 71, 82, 94, 96, 43, 44, 31, 36, 850 67, 68, 69, 73, 84, 96, 98, 44, 45, 32,
717 36, 50, 85, 57, 36, 85, 46, 46, 43, 36, 851 37, 23, 37, 51, 87, 59, 37, 87, 47, 47,
718 46, 47, 59, 60, 61, 68, 72, 73, 64, 31, 852 44, 37, 47, 48, 61, 62, 63, 70, 74, 75,
719 85, 1, 62, 86, 87, 88, 58, 62, 85, 63, 853 66, 32, 58, 87, 1, 64, 88, 89, 90, 60,
720 36, 1, 72, 69, 70, 71, 43, 45, 72, 29, 854 64, 87, 65, 37, 1, 74, 71, 72, 73, 44,
721 31, 95, 32, 46, 43, 44, 36, 40, 46, 51, 855 46, 74, 30, 32, 97, 33, 47, 60, 44, 45,
722 68, 74, 75, 89, 90, 91, 92, 44, 1, 88, 856 37, 41, 47, 52, 70, 76, 77, 91, 92, 93,
723 72, 47, 48, 48, 48, 48, 71, 61, 30, 93, 857 94, 45, 1, 90, 74, 48, 49, 49, 49, 49,
724 1, 63, 76, 77, 78, 79, 92, 1, 36, 74, 858 73, 63, 31, 95, 1, 65, 78, 79, 80, 81,
725 33, 74, 93, 32, 46, 43, 45, 48, 43, 49, 859 94, 1, 37, 76, 34, 76, 95, 33, 47, 44,
726 83, 84, 48, 36, 40, 46, 68, 80, 81, 48, 860 46, 49, 44, 50, 85, 86, 49, 37, 41, 47,
727 35, 45, 48, 48, 1, 76, 91, 33, 1, 40, 861 70, 82, 83, 49, 36, 46, 49, 49, 1, 78,
728 80, 80, 32, 46, 35, 79, 48, 48, 48, 48, 862 93, 34, 1, 41, 82, 82, 33, 47, 36, 81,
729 1, 76, 48, 48 863 49, 49, 49, 49, 1, 78, 49, 49
730}; 864};
731 865
732#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
733# define YYSIZE_T __SIZE_TYPE__
734#endif
735#if ! defined (YYSIZE_T) && defined (size_t)
736# define YYSIZE_T size_t
737#endif
738#if ! defined (YYSIZE_T)
739# if defined (__STDC__) || defined (__cplusplus)
740# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
741# define YYSIZE_T size_t
742# endif
743#endif
744#if ! defined (YYSIZE_T)
745# define YYSIZE_T unsigned int
746#endif
747
748#define yyerrok (yyerrstatus = 0) 866#define yyerrok (yyerrstatus = 0)
749#define yyclearin (yychar = YYEMPTY) 867#define yyclearin (yychar = YYEMPTY)
750#define YYEMPTY (-2) 868#define YYEMPTY (-2)
@@ -770,15 +888,15 @@ do \
770 yychar = (Token); \ 888 yychar = (Token); \
771 yylval = (Value); \ 889 yylval = (Value); \
772 yytoken = YYTRANSLATE (yychar); \ 890 yytoken = YYTRANSLATE (yychar); \
773 YYPOPSTACK; \ 891 YYPOPSTACK (1); \
774 goto yybackup; \ 892 goto yybackup; \
775 } \ 893 } \
776 else \ 894 else \
777 { \ 895 { \
778 yyerror ("syntax error: cannot back up");\ 896 yyerror (YY_("syntax error: cannot back up")); \
779 YYERROR; \ 897 YYERROR; \
780 } \ 898 } \
781while (0) 899while (YYID (0))
782 900
783 901
784#define YYTERROR 1 902#define YYTERROR 1
@@ -793,7 +911,7 @@ while (0)
793#ifndef YYLLOC_DEFAULT 911#ifndef YYLLOC_DEFAULT
794# define YYLLOC_DEFAULT(Current, Rhs, N) \ 912# define YYLLOC_DEFAULT(Current, Rhs, N) \
795 do \ 913 do \
796 if (N) \ 914 if (YYID (N)) \
797 { \ 915 { \
798 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 916 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
799 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 917 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -807,7 +925,7 @@ while (0)
807 (Current).first_column = (Current).last_column = \ 925 (Current).first_column = (Current).last_column = \
808 YYRHSLOC (Rhs, 0).last_column; \ 926 YYRHSLOC (Rhs, 0).last_column; \
809 } \ 927 } \
810 while (0) 928 while (YYID (0))
811#endif 929#endif
812 930
813 931
@@ -819,8 +937,8 @@ while (0)
819# if YYLTYPE_IS_TRIVIAL 937# if YYLTYPE_IS_TRIVIAL
820# define YY_LOCATION_PRINT(File, Loc) \ 938# define YY_LOCATION_PRINT(File, Loc) \
821 fprintf (File, "%d.%d-%d.%d", \ 939 fprintf (File, "%d.%d-%d.%d", \
822 (Loc).first_line, (Loc).first_column, \ 940 (Loc).first_line, (Loc).first_column, \
823 (Loc).last_line, (Loc).last_column) 941 (Loc).last_line, (Loc).last_column)
824# else 942# else
825# define YY_LOCATION_PRINT(File, Loc) ((void) 0) 943# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
826# endif 944# endif
@@ -847,36 +965,96 @@ while (0)
847do { \ 965do { \
848 if (yydebug) \ 966 if (yydebug) \
849 YYFPRINTF Args; \ 967 YYFPRINTF Args; \
850} while (0) 968} while (YYID (0))
969
970# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
971do { \
972 if (yydebug) \
973 { \
974 YYFPRINTF (stderr, "%s ", Title); \
975 yy_symbol_print (stderr, \
976 Type, Value); \
977 YYFPRINTF (stderr, "\n"); \
978 } \
979} while (YYID (0))
851 980
852# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 981
853do { \ 982/*--------------------------------.
854 if (yydebug) \ 983| Print this symbol on YYOUTPUT. |
855 { \ 984`--------------------------------*/
856 YYFPRINTF (stderr, "%s ", Title); \ 985
857 yysymprint (stderr, \ 986/*ARGSUSED*/
858 Type, Value); \ 987#if (defined __STDC__ || defined __C99__FUNC__ \
859 YYFPRINTF (stderr, "\n"); \ 988 || defined __cplusplus || defined _MSC_VER)
860 } \ 989static void
861} while (0) 990yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
991#else
992static void
993yy_symbol_value_print (yyoutput, yytype, yyvaluep)
994 FILE *yyoutput;
995 int yytype;
996 YYSTYPE const * const yyvaluep;
997#endif
998{
999 if (!yyvaluep)
1000 return;
1001# ifdef YYPRINT
1002 if (yytype < YYNTOKENS)
1003 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1004# else
1005 YYUSE (yyoutput);
1006# endif
1007 switch (yytype)
1008 {
1009 default:
1010 break;
1011 }
1012}
1013
1014
1015/*--------------------------------.
1016| Print this symbol on YYOUTPUT. |
1017`--------------------------------*/
1018
1019#if (defined __STDC__ || defined __C99__FUNC__ \
1020 || defined __cplusplus || defined _MSC_VER)
1021static void
1022yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1023#else
1024static void
1025yy_symbol_print (yyoutput, yytype, yyvaluep)
1026 FILE *yyoutput;
1027 int yytype;
1028 YYSTYPE const * const yyvaluep;
1029#endif
1030{
1031 if (yytype < YYNTOKENS)
1032 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1033 else
1034 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1035
1036 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1037 YYFPRINTF (yyoutput, ")");
1038}
862 1039
863/*------------------------------------------------------------------. 1040/*------------------------------------------------------------------.
864| yy_stack_print -- Print the state stack from its BOTTOM up to its | 1041| yy_stack_print -- Print the state stack from its BOTTOM up to its |
865| TOP (included). | 1042| TOP (included). |
866`------------------------------------------------------------------*/ 1043`------------------------------------------------------------------*/
867 1044
868#if defined (__STDC__) || defined (__cplusplus) 1045#if (defined __STDC__ || defined __C99__FUNC__ \
1046 || defined __cplusplus || defined _MSC_VER)
869static void 1047static void
870yy_stack_print (short int *bottom, short int *top) 1048yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
871#else 1049#else
872static void 1050static void
873yy_stack_print (bottom, top) 1051yy_stack_print (bottom, top)
874 short int *bottom; 1052 yytype_int16 *bottom;
875 short int *top; 1053 yytype_int16 *top;
876#endif 1054#endif
877{ 1055{
878 YYFPRINTF (stderr, "Stack now"); 1056 YYFPRINTF (stderr, "Stack now");
879 for (/* Nothing. */; bottom <= top; ++bottom) 1057 for (; bottom <= top; ++bottom)
880 YYFPRINTF (stderr, " %d", *bottom); 1058 YYFPRINTF (stderr, " %d", *bottom);
881 YYFPRINTF (stderr, "\n"); 1059 YYFPRINTF (stderr, "\n");
882} 1060}
@@ -885,37 +1063,45 @@ yy_stack_print (bottom, top)
885do { \ 1063do { \
886 if (yydebug) \ 1064 if (yydebug) \
887 yy_stack_print ((Bottom), (Top)); \ 1065 yy_stack_print ((Bottom), (Top)); \
888} while (0) 1066} while (YYID (0))
889 1067
890 1068
891/*------------------------------------------------. 1069/*------------------------------------------------.
892| Report that the YYRULE is going to be reduced. | 1070| Report that the YYRULE is going to be reduced. |
893`------------------------------------------------*/ 1071`------------------------------------------------*/
894 1072
895#if defined (__STDC__) || defined (__cplusplus) 1073#if (defined __STDC__ || defined __C99__FUNC__ \
1074 || defined __cplusplus || defined _MSC_VER)
896static void 1075static void
897yy_reduce_print (int yyrule) 1076yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
898#else 1077#else
899static void 1078static void
900yy_reduce_print (yyrule) 1079yy_reduce_print (yyvsp, yyrule)
1080 YYSTYPE *yyvsp;
901 int yyrule; 1081 int yyrule;
902#endif 1082#endif
903{ 1083{
1084 int yynrhs = yyr2[yyrule];
904 int yyi; 1085 int yyi;
905 unsigned int yylno = yyrline[yyrule]; 1086 unsigned long int yylno = yyrline[yyrule];
906 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", 1087 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
907 yyrule - 1, yylno); 1088 yyrule - 1, yylno);
908 /* Print the symbols being reduced, and their result. */ 1089 /* The symbols being reduced. */
909 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) 1090 for (yyi = 0; yyi < yynrhs; yyi++)
910 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); 1091 {
911 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); 1092 fprintf (stderr, " $%d = ", yyi + 1);
1093 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1094 &(yyvsp[(yyi + 1) - (yynrhs)])
1095 );
1096 fprintf (stderr, "\n");
1097 }
912} 1098}
913 1099
914# define YY_REDUCE_PRINT(Rule) \ 1100# define YY_REDUCE_PRINT(Rule) \
915do { \ 1101do { \
916 if (yydebug) \ 1102 if (yydebug) \
917 yy_reduce_print (Rule); \ 1103 yy_reduce_print (yyvsp, Rule); \
918} while (0) 1104} while (YYID (0))
919 1105
920/* Nonzero means print parse trace. It is left uninitialized so that 1106/* Nonzero means print parse trace. It is left uninitialized so that
921 multiple parsers can coexist. */ 1107 multiple parsers can coexist. */
@@ -937,7 +1123,7 @@ int yydebug;
937 if the built-in stack extension method is used). 1123 if the built-in stack extension method is used).
938 1124
939 Do not make this value too large; the results are undefined if 1125 Do not make this value too large; the results are undefined if
940 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) 1126 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
941 evaluated with infinite-precision integer arithmetic. */ 1127 evaluated with infinite-precision integer arithmetic. */
942 1128
943#ifndef YYMAXDEPTH 1129#ifndef YYMAXDEPTH
@@ -949,45 +1135,47 @@ int yydebug;
949#if YYERROR_VERBOSE 1135#if YYERROR_VERBOSE
950 1136
951# ifndef yystrlen 1137# ifndef yystrlen
952# if defined (__GLIBC__) && defined (_STRING_H) 1138# if defined __GLIBC__ && defined _STRING_H
953# define yystrlen strlen 1139# define yystrlen strlen
954# else 1140# else
955/* Return the length of YYSTR. */ 1141/* Return the length of YYSTR. */
1142#if (defined __STDC__ || defined __C99__FUNC__ \
1143 || defined __cplusplus || defined _MSC_VER)
956static YYSIZE_T 1144static YYSIZE_T
957# if defined (__STDC__) || defined (__cplusplus)
958yystrlen (const char *yystr) 1145yystrlen (const char *yystr)
959# else 1146#else
1147static YYSIZE_T
960yystrlen (yystr) 1148yystrlen (yystr)
961 const char *yystr; 1149 const char *yystr;
962# endif 1150#endif
963{ 1151{
964 register const char *yys = yystr; 1152 YYSIZE_T yylen;
965 1153 for (yylen = 0; yystr[yylen]; yylen++)
966 while (*yys++ != '\0')
967 continue; 1154 continue;
968 1155 return yylen;
969 return yys - yystr - 1;
970} 1156}
971# endif 1157# endif
972# endif 1158# endif
973 1159
974# ifndef yystpcpy 1160# ifndef yystpcpy
975# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) 1161# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
976# define yystpcpy stpcpy 1162# define yystpcpy stpcpy
977# else 1163# else
978/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1164/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
979 YYDEST. */ 1165 YYDEST. */
1166#if (defined __STDC__ || defined __C99__FUNC__ \
1167 || defined __cplusplus || defined _MSC_VER)
980static char * 1168static char *
981# if defined (__STDC__) || defined (__cplusplus)
982yystpcpy (char *yydest, const char *yysrc) 1169yystpcpy (char *yydest, const char *yysrc)
983# else 1170#else
1171static char *
984yystpcpy (yydest, yysrc) 1172yystpcpy (yydest, yysrc)
985 char *yydest; 1173 char *yydest;
986 const char *yysrc; 1174 const char *yysrc;
987# endif 1175#endif
988{ 1176{
989 register char *yyd = yydest; 1177 char *yyd = yydest;
990 register const char *yys = yysrc; 1178 const char *yys = yysrc;
991 1179
992 while ((*yyd++ = *yys++) != '\0') 1180 while ((*yyd++ = *yys++) != '\0')
993 continue; 1181 continue;
@@ -997,53 +1185,171 @@ yystpcpy (yydest, yysrc)
997# endif 1185# endif
998# endif 1186# endif
999 1187
1000#endif /* !YYERROR_VERBOSE */ 1188# ifndef yytnamerr
1189/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1190 quotes and backslashes, so that it's suitable for yyerror. The
1191 heuristic is that double-quoting is unnecessary unless the string
1192 contains an apostrophe, a comma, or backslash (other than
1193 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1194 null, do not copy; instead, return the length of what the result
1195 would have been. */
1196static YYSIZE_T
1197yytnamerr (char *yyres, const char *yystr)
1198{
1199 if (*yystr == '"')
1200 {
1201 YYSIZE_T yyn = 0;
1202 char const *yyp = yystr;
1203
1204 for (;;)
1205 switch (*++yyp)
1206 {
1207 case '\'':
1208 case ',':
1209 goto do_not_strip_quotes;
1210
1211 case '\\':
1212 if (*++yyp != '\\')
1213 goto do_not_strip_quotes;
1214 /* Fall through. */
1215 default:
1216 if (yyres)
1217 yyres[yyn] = *yyp;
1218 yyn++;
1219 break;
1220
1221 case '"':
1222 if (yyres)
1223 yyres[yyn] = '\0';
1224 return yyn;
1225 }
1226 do_not_strip_quotes: ;
1227 }
1001 1228
1002 1229 if (! yyres)
1230 return yystrlen (yystr);
1003 1231
1004#if YYDEBUG 1232 return yystpcpy (yyres, yystr) - yyres;
1005/*--------------------------------. 1233}
1006| Print this symbol on YYOUTPUT. | 1234# endif
1007`--------------------------------*/
1008 1235
1009#if defined (__STDC__) || defined (__cplusplus) 1236/* Copy into YYRESULT an error message about the unexpected token
1010static void 1237 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1011yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) 1238 including the terminating null byte. If YYRESULT is null, do not
1012#else 1239 copy anything; just return the number of bytes that would be
1013static void 1240 copied. As a special case, return 0 if an ordinary "syntax error"
1014yysymprint (yyoutput, yytype, yyvaluep) 1241 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1015 FILE *yyoutput; 1242 size calculation. */
1016 int yytype; 1243static YYSIZE_T
1017 YYSTYPE *yyvaluep; 1244yysyntax_error (char *yyresult, int yystate, int yychar)
1018#endif
1019{ 1245{
1020 /* Pacify ``unused variable'' warnings. */ 1246 int yyn = yypact[yystate];
1021 (void) yyvaluep;
1022 1247
1023 if (yytype < YYNTOKENS) 1248 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1024 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1249 return 0;
1025 else 1250 else
1026 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1027
1028
1029# ifdef YYPRINT
1030 if (yytype < YYNTOKENS)
1031 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1032# endif
1033 switch (yytype)
1034 { 1251 {
1035 default: 1252 int yytype = YYTRANSLATE (yychar);
1036 break; 1253 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1254 YYSIZE_T yysize = yysize0;
1255 YYSIZE_T yysize1;
1256 int yysize_overflow = 0;
1257 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1258 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1259 int yyx;
1260
1261# if 0
1262 /* This is so xgettext sees the translatable formats that are
1263 constructed on the fly. */
1264 YY_("syntax error, unexpected %s");
1265 YY_("syntax error, unexpected %s, expecting %s");
1266 YY_("syntax error, unexpected %s, expecting %s or %s");
1267 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1268 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1269# endif
1270 char *yyfmt;
1271 char const *yyf;
1272 static char const yyunexpected[] = "syntax error, unexpected %s";
1273 static char const yyexpecting[] = ", expecting %s";
1274 static char const yyor[] = " or %s";
1275 char yyformat[sizeof yyunexpected
1276 + sizeof yyexpecting - 1
1277 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1278 * (sizeof yyor - 1))];
1279 char const *yyprefix = yyexpecting;
1280
1281 /* Start YYX at -YYN if negative to avoid negative indexes in
1282 YYCHECK. */
1283 int yyxbegin = yyn < 0 ? -yyn : 0;
1284
1285 /* Stay within bounds of both yycheck and yytname. */
1286 int yychecklim = YYLAST - yyn + 1;
1287 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1288 int yycount = 1;
1289
1290 yyarg[0] = yytname[yytype];
1291 yyfmt = yystpcpy (yyformat, yyunexpected);
1292
1293 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1294 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1295 {
1296 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1297 {
1298 yycount = 1;
1299 yysize = yysize0;
1300 yyformat[sizeof yyunexpected - 1] = '\0';
1301 break;
1302 }
1303 yyarg[yycount++] = yytname[yyx];
1304 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1305 yysize_overflow |= (yysize1 < yysize);
1306 yysize = yysize1;
1307 yyfmt = yystpcpy (yyfmt, yyprefix);
1308 yyprefix = yyor;
1309 }
1310
1311 yyf = YY_(yyformat);
1312 yysize1 = yysize + yystrlen (yyf);
1313 yysize_overflow |= (yysize1 < yysize);
1314 yysize = yysize1;
1315
1316 if (yysize_overflow)
1317 return YYSIZE_MAXIMUM;
1318
1319 if (yyresult)
1320 {
1321 /* Avoid sprintf, as that infringes on the user's name space.
1322 Don't have undefined behavior even if the translation
1323 produced a string with the wrong number of "%s"s. */
1324 char *yyp = yyresult;
1325 int yyi = 0;
1326 while ((*yyp = *yyf) != '\0')
1327 {
1328 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1329 {
1330 yyp += yytnamerr (yyp, yyarg[yyi++]);
1331 yyf += 2;
1332 }
1333 else
1334 {
1335 yyp++;
1336 yyf++;
1337 }
1338 }
1339 }
1340 return yysize;
1037 } 1341 }
1038 YYFPRINTF (yyoutput, ")");
1039} 1342}
1343#endif /* YYERROR_VERBOSE */
1344
1040 1345
1041#endif /* ! YYDEBUG */
1042/*-----------------------------------------------. 1346/*-----------------------------------------------.
1043| Release the memory associated to this symbol. | 1347| Release the memory associated to this symbol. |
1044`-----------------------------------------------*/ 1348`-----------------------------------------------*/
1045 1349
1046#if defined (__STDC__) || defined (__cplusplus) 1350/*ARGSUSED*/
1351#if (defined __STDC__ || defined __C99__FUNC__ \
1352 || defined __cplusplus || defined _MSC_VER)
1047static void 1353static void
1048yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1354yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1049#else 1355#else
@@ -1054,8 +1360,7 @@ yydestruct (yymsg, yytype, yyvaluep)
1054 YYSTYPE *yyvaluep; 1360 YYSTYPE *yyvaluep;
1055#endif 1361#endif
1056{ 1362{
1057 /* Pacify ``unused variable'' warnings. */ 1363 YYUSE (yyvaluep);
1058 (void) yyvaluep;
1059 1364
1060 if (!yymsg) 1365 if (!yymsg)
1061 yymsg = "Deleting"; 1366 yymsg = "Deleting";
@@ -1065,7 +1370,7 @@ yydestruct (yymsg, yytype, yyvaluep)
1065 { 1370 {
1066 1371
1067 default: 1372 default:
1068 break; 1373 break;
1069 } 1374 }
1070} 1375}
1071 1376
@@ -1073,13 +1378,13 @@ yydestruct (yymsg, yytype, yyvaluep)
1073/* Prevent warnings from -Wmissing-prototypes. */ 1378/* Prevent warnings from -Wmissing-prototypes. */
1074 1379
1075#ifdef YYPARSE_PARAM 1380#ifdef YYPARSE_PARAM
1076# if defined (__STDC__) || defined (__cplusplus) 1381#if defined __STDC__ || defined __cplusplus
1077int yyparse (void *YYPARSE_PARAM); 1382int yyparse (void *YYPARSE_PARAM);
1078# else 1383#else
1079int yyparse (); 1384int yyparse ();
1080# endif 1385#endif
1081#else /* ! YYPARSE_PARAM */ 1386#else /* ! YYPARSE_PARAM */
1082#if defined (__STDC__) || defined (__cplusplus) 1387#if defined __STDC__ || defined __cplusplus
1083int yyparse (void); 1388int yyparse (void);
1084#else 1389#else
1085int yyparse (); 1390int yyparse ();
@@ -1104,14 +1409,18 @@ int yynerrs;
1104`----------*/ 1409`----------*/
1105 1410
1106#ifdef YYPARSE_PARAM 1411#ifdef YYPARSE_PARAM
1107# if defined (__STDC__) || defined (__cplusplus) 1412#if (defined __STDC__ || defined __C99__FUNC__ \
1108int yyparse (void *YYPARSE_PARAM) 1413 || defined __cplusplus || defined _MSC_VER)
1109# else 1414int
1110int yyparse (YYPARSE_PARAM) 1415yyparse (void *YYPARSE_PARAM)
1111 void *YYPARSE_PARAM; 1416#else
1112# endif 1417int
1418yyparse (YYPARSE_PARAM)
1419 void *YYPARSE_PARAM;
1420#endif
1113#else /* ! YYPARSE_PARAM */ 1421#else /* ! YYPARSE_PARAM */
1114#if defined (__STDC__) || defined (__cplusplus) 1422#if (defined __STDC__ || defined __C99__FUNC__ \
1423 || defined __cplusplus || defined _MSC_VER)
1115int 1424int
1116yyparse (void) 1425yyparse (void)
1117#else 1426#else
@@ -1122,13 +1431,19 @@ yyparse ()
1122#endif 1431#endif
1123{ 1432{
1124 1433
1125 register int yystate; 1434 int yystate;
1126 register int yyn; 1435 int yyn;
1127 int yyresult; 1436 int yyresult;
1128 /* Number of tokens to shift before error messages enabled. */ 1437 /* Number of tokens to shift before error messages enabled. */
1129 int yyerrstatus; 1438 int yyerrstatus;
1130 /* Look-ahead token as an internal (translated) token number. */ 1439 /* Look-ahead token as an internal (translated) token number. */
1131 int yytoken = 0; 1440 int yytoken = 0;
1441#if YYERROR_VERBOSE
1442 /* Buffer for error messages, and its allocated size. */
1443 char yymsgbuf[128];
1444 char *yymsg = yymsgbuf;
1445 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1446#endif
1132 1447
1133 /* Three stacks and their tools: 1448 /* Three stacks and their tools:
1134 `yyss': related to states, 1449 `yyss': related to states,
@@ -1139,18 +1454,18 @@ yyparse ()
1139 to reallocate them elsewhere. */ 1454 to reallocate them elsewhere. */
1140 1455
1141 /* The state stack. */ 1456 /* The state stack. */
1142 short int yyssa[YYINITDEPTH]; 1457 yytype_int16 yyssa[YYINITDEPTH];
1143 short int *yyss = yyssa; 1458 yytype_int16 *yyss = yyssa;
1144 register short int *yyssp; 1459 yytype_int16 *yyssp;
1145 1460
1146 /* The semantic value stack. */ 1461 /* The semantic value stack. */
1147 YYSTYPE yyvsa[YYINITDEPTH]; 1462 YYSTYPE yyvsa[YYINITDEPTH];
1148 YYSTYPE *yyvs = yyvsa; 1463 YYSTYPE *yyvs = yyvsa;
1149 register YYSTYPE *yyvsp; 1464 YYSTYPE *yyvsp;
1150 1465
1151 1466
1152 1467
1153#define YYPOPSTACK (yyvsp--, yyssp--) 1468#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1154 1469
1155 YYSIZE_T yystacksize = YYINITDEPTH; 1470 YYSIZE_T yystacksize = YYINITDEPTH;
1156 1471
@@ -1159,9 +1474,9 @@ yyparse ()
1159 YYSTYPE yyval; 1474 YYSTYPE yyval;
1160 1475
1161 1476
1162 /* When reducing, the number of symbols on the RHS of the reduced 1477 /* The number of symbols on the RHS of the reduced rule.
1163 rule. */ 1478 Keep to zero when no symbol should be popped. */
1164 int yylen; 1479 int yylen = 0;
1165 1480
1166 YYDPRINTF ((stderr, "Starting parse\n")); 1481 YYDPRINTF ((stderr, "Starting parse\n"));
1167 1482
@@ -1178,9 +1493,6 @@ yyparse ()
1178 yyssp = yyss; 1493 yyssp = yyss;
1179 yyvsp = yyvs; 1494 yyvsp = yyvs;
1180 1495
1181
1182 yyvsp[0] = yylval;
1183
1184 goto yysetstate; 1496 goto yysetstate;
1185 1497
1186/*------------------------------------------------------------. 1498/*------------------------------------------------------------.
@@ -1188,8 +1500,7 @@ yyparse ()
1188`------------------------------------------------------------*/ 1500`------------------------------------------------------------*/
1189 yynewstate: 1501 yynewstate:
1190 /* In all cases, when you get here, the value and location stacks 1502 /* In all cases, when you get here, the value and location stacks
1191 have just been pushed. so pushing a state here evens the stacks. 1503 have just been pushed. So pushing a state here evens the stacks. */
1192 */
1193 yyssp++; 1504 yyssp++;
1194 1505
1195 yysetstate: 1506 yysetstate:
@@ -1202,18 +1513,18 @@ yyparse ()
1202 1513
1203#ifdef yyoverflow 1514#ifdef yyoverflow
1204 { 1515 {
1205 /* Give user a chance to reallocate the stack. Use copies of 1516 /* Give user a chance to reallocate the stack. Use copies of
1206 these so that the &'s don't force the real ones into 1517 these so that the &'s don't force the real ones into
1207 memory. */ 1518 memory. */
1208 YYSTYPE *yyvs1 = yyvs; 1519 YYSTYPE *yyvs1 = yyvs;
1209 short int *yyss1 = yyss; 1520 yytype_int16 *yyss1 = yyss;
1210 1521
1211 1522
1212 /* Each stack pointer address is followed by the size of the 1523 /* Each stack pointer address is followed by the size of the
1213 data in use in that stack, in bytes. This used to be a 1524 data in use in that stack, in bytes. This used to be a
1214 conditional around just the two extra args, but that might 1525 conditional around just the two extra args, but that might
1215 be undefined if yyoverflow is a macro. */ 1526 be undefined if yyoverflow is a macro. */
1216 yyoverflow ("parser stack overflow", 1527 yyoverflow (YY_("memory exhausted"),
1217 &yyss1, yysize * sizeof (*yyssp), 1528 &yyss1, yysize * sizeof (*yyssp),
1218 &yyvs1, yysize * sizeof (*yyvsp), 1529 &yyvs1, yysize * sizeof (*yyvsp),
1219 1530
@@ -1224,21 +1535,21 @@ yyparse ()
1224 } 1535 }
1225#else /* no yyoverflow */ 1536#else /* no yyoverflow */
1226# ifndef YYSTACK_RELOCATE 1537# ifndef YYSTACK_RELOCATE
1227 goto yyoverflowlab; 1538 goto yyexhaustedlab;
1228# else 1539# else
1229 /* Extend the stack our own way. */ 1540 /* Extend the stack our own way. */
1230 if (YYMAXDEPTH <= yystacksize) 1541 if (YYMAXDEPTH <= yystacksize)
1231 goto yyoverflowlab; 1542 goto yyexhaustedlab;
1232 yystacksize *= 2; 1543 yystacksize *= 2;
1233 if (YYMAXDEPTH < yystacksize) 1544 if (YYMAXDEPTH < yystacksize)
1234 yystacksize = YYMAXDEPTH; 1545 yystacksize = YYMAXDEPTH;
1235 1546
1236 { 1547 {
1237 short int *yyss1 = yyss; 1548 yytype_int16 *yyss1 = yyss;
1238 union yyalloc *yyptr = 1549 union yyalloc *yyptr =
1239 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1550 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1240 if (! yyptr) 1551 if (! yyptr)
1241 goto yyoverflowlab; 1552 goto yyexhaustedlab;
1242 YYSTACK_RELOCATE (yyss); 1553 YYSTACK_RELOCATE (yyss);
1243 YYSTACK_RELOCATE (yyvs); 1554 YYSTACK_RELOCATE (yyvs);
1244 1555
@@ -1269,12 +1580,10 @@ yyparse ()
1269`-----------*/ 1580`-----------*/
1270yybackup: 1581yybackup:
1271 1582
1272/* Do appropriate processing given the current state. */ 1583 /* Do appropriate processing given the current state. Read a
1273/* Read a look-ahead token if we need one and don't already have one. */ 1584 look-ahead token if we need one and don't already have one. */
1274/* yyresume: */
1275 1585
1276 /* First try to decide what to do without reference to look-ahead token. */ 1586 /* First try to decide what to do without reference to look-ahead token. */
1277
1278 yyn = yypact[yystate]; 1587 yyn = yypact[yystate];
1279 if (yyn == YYPACT_NINF) 1588 if (yyn == YYPACT_NINF)
1280 goto yydefault; 1589 goto yydefault;
@@ -1316,22 +1625,21 @@ yybackup:
1316 if (yyn == YYFINAL) 1625 if (yyn == YYFINAL)
1317 YYACCEPT; 1626 YYACCEPT;
1318 1627
1628 /* Count tokens shifted since error; after three, turn off error
1629 status. */
1630 if (yyerrstatus)
1631 yyerrstatus--;
1632
1319 /* Shift the look-ahead token. */ 1633 /* Shift the look-ahead token. */
1320 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1634 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1321 1635
1322 /* Discard the token being shifted unless it is eof. */ 1636 /* Discard the shifted token unless it is eof. */
1323 if (yychar != YYEOF) 1637 if (yychar != YYEOF)
1324 yychar = YYEMPTY; 1638 yychar = YYEMPTY;
1325 1639
1640 yystate = yyn;
1326 *++yyvsp = yylval; 1641 *++yyvsp = yylval;
1327 1642
1328
1329 /* Count tokens shifted since error; after three, turn off error
1330 status. */
1331 if (yyerrstatus)
1332 yyerrstatus--;
1333
1334 yystate = yyn;
1335 goto yynewstate; 1643 goto yynewstate;
1336 1644
1337 1645
@@ -1367,457 +1675,466 @@ yyreduce:
1367 switch (yyn) 1675 switch (yyn)
1368 { 1676 {
1369 case 4: 1677 case 4:
1370#line 107 "scripts/genksyms/parse.y" 1678#line 108 "scripts/genksyms/parse.y"
1371 { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;} 1679 { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;}
1372 break; 1680 break;
1373 1681
1374 case 5: 1682 case 5:
1375#line 109 "scripts/genksyms/parse.y" 1683#line 110 "scripts/genksyms/parse.y"
1376 { free_list(*(yyvsp[0]), NULL); *(yyvsp[0]) = NULL; ;} 1684 { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;}
1377 break; 1685 break;
1378 1686
1379 case 6: 1687 case 6:
1380#line 113 "scripts/genksyms/parse.y" 1688#line 114 "scripts/genksyms/parse.y"
1381 { is_typedef = 1; ;} 1689 { is_typedef = 1; ;}
1382 break; 1690 break;
1383 1691
1384 case 7: 1692 case 7:
1385#line 114 "scripts/genksyms/parse.y" 1693#line 115 "scripts/genksyms/parse.y"
1386 { (yyval) = (yyvsp[0]); ;} 1694 { (yyval) = (yyvsp[(4) - (4)]); ;}
1387 break; 1695 break;
1388 1696
1389 case 12: 1697 case 8:
1390#line 119 "scripts/genksyms/parse.y" 1698#line 116 "scripts/genksyms/parse.y"
1391 { (yyval) = (yyvsp[0]); ;} 1699 { is_typedef = 1; ;}
1392 break; 1700 break;
1393 1701
1394 case 13: 1702 case 9:
1395#line 120 "scripts/genksyms/parse.y" 1703#line 117 "scripts/genksyms/parse.y"
1396 { (yyval) = (yyvsp[0]); ;} 1704 { (yyval) = (yyvsp[(3) - (3)]); ;}
1397 break; 1705 break;
1398 1706
1399 case 14: 1707 case 14:
1400#line 125 "scripts/genksyms/parse.y" 1708#line 122 "scripts/genksyms/parse.y"
1709 { (yyval) = (yyvsp[(2) - (2)]); ;}
1710 break;
1711
1712 case 15:
1713#line 123 "scripts/genksyms/parse.y"
1714 { (yyval) = (yyvsp[(2) - (2)]); ;}
1715 break;
1716
1717 case 16:
1718#line 128 "scripts/genksyms/parse.y"
1401 { if (current_name) { 1719 { if (current_name) {
1402 struct string_list *decl = (*(yyvsp[0]))->next; 1720 struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
1403 (*(yyvsp[0]))->next = NULL; 1721 (*(yyvsp[(3) - (3)]))->next = NULL;
1404 add_symbol(current_name, 1722 add_symbol(current_name,
1405 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, 1723 is_typedef ? SYM_TYPEDEF : SYM_NORMAL,
1406 decl, is_extern); 1724 decl, is_extern);
1407 current_name = NULL; 1725 current_name = NULL;
1408 } 1726 }
1409 (yyval) = (yyvsp[0]); 1727 (yyval) = (yyvsp[(3) - (3)]);
1410 ;} 1728 ;}
1411 break; 1729 break;
1412 1730
1413 case 15: 1731 case 17:
1414#line 138 "scripts/genksyms/parse.y" 1732#line 141 "scripts/genksyms/parse.y"
1415 { (yyval) = NULL; ;} 1733 { (yyval) = NULL; ;}
1416 break; 1734 break;
1417 1735
1418 case 17: 1736 case 19:
1419#line 144 "scripts/genksyms/parse.y" 1737#line 147 "scripts/genksyms/parse.y"
1420 { struct string_list *decl = *(yyvsp[0]); 1738 { struct string_list *decl = *(yyvsp[(1) - (1)]);
1421 *(yyvsp[0]) = NULL; 1739 *(yyvsp[(1) - (1)]) = NULL;
1422 add_symbol(current_name, 1740 add_symbol(current_name,
1423 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); 1741 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1424 current_name = NULL; 1742 current_name = NULL;
1425 (yyval) = (yyvsp[0]); 1743 (yyval) = (yyvsp[(1) - (1)]);
1426 ;} 1744 ;}
1427 break; 1745 break;
1428 1746
1429 case 18: 1747 case 20:
1430#line 152 "scripts/genksyms/parse.y" 1748#line 155 "scripts/genksyms/parse.y"
1431 { struct string_list *decl = *(yyvsp[0]); 1749 { struct string_list *decl = *(yyvsp[(3) - (3)]);
1432 *(yyvsp[0]) = NULL; 1750 *(yyvsp[(3) - (3)]) = NULL;
1433 free_list(*(yyvsp[-1]), NULL); 1751 free_list(*(yyvsp[(2) - (3)]), NULL);
1434 *(yyvsp[-1]) = decl_spec; 1752 *(yyvsp[(2) - (3)]) = decl_spec;
1435 add_symbol(current_name, 1753 add_symbol(current_name,
1436 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern); 1754 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1437 current_name = NULL; 1755 current_name = NULL;
1438 (yyval) = (yyvsp[0]); 1756 (yyval) = (yyvsp[(3) - (3)]);
1439 ;} 1757 ;}
1440 break; 1758 break;
1441 1759
1442 case 19: 1760 case 21:
1443#line 165 "scripts/genksyms/parse.y" 1761#line 168 "scripts/genksyms/parse.y"
1444 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]) ? (yyvsp[-1]) : (yyvsp[-2]) ? (yyvsp[-2]) : (yyvsp[-3]); ;} 1762 { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;}
1445 break; 1763 break;
1446 1764
1447 case 20: 1765 case 22:
1448#line 170 "scripts/genksyms/parse.y" 1766#line 173 "scripts/genksyms/parse.y"
1449 { decl_spec = NULL; ;} 1767 { decl_spec = NULL; ;}
1450 break; 1768 break;
1451 1769
1452 case 22: 1770 case 24:
1453#line 175 "scripts/genksyms/parse.y" 1771#line 178 "scripts/genksyms/parse.y"
1454 { decl_spec = *(yyvsp[0]); ;} 1772 { decl_spec = *(yyvsp[(1) - (1)]); ;}
1455 break; 1773 break;
1456 1774
1457 case 23: 1775 case 25:
1458#line 176 "scripts/genksyms/parse.y" 1776#line 179 "scripts/genksyms/parse.y"
1459 { decl_spec = *(yyvsp[0]); ;} 1777 { decl_spec = *(yyvsp[(2) - (2)]); ;}
1460 break; 1778 break;
1461 1779
1462 case 24: 1780 case 26:
1463#line 181 "scripts/genksyms/parse.y" 1781#line 184 "scripts/genksyms/parse.y"
1464 { /* Version 2 checksumming ignores storage class, as that 1782 { /* Version 2 checksumming ignores storage class, as that
1465 is really irrelevant to the linkage. */ 1783 is really irrelevant to the linkage. */
1466 remove_node((yyvsp[0])); 1784 remove_node((yyvsp[(1) - (1)]));
1467 (yyval) = (yyvsp[0]); 1785 (yyval) = (yyvsp[(1) - (1)]);
1468 ;} 1786 ;}
1469 break; 1787 break;
1470 1788
1471 case 29: 1789 case 31:
1472#line 193 "scripts/genksyms/parse.y" 1790#line 196 "scripts/genksyms/parse.y"
1473 { is_extern = 1; (yyval) = (yyvsp[0]); ;} 1791 { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;}
1474 break; 1792 break;
1475 1793
1476 case 30: 1794 case 32:
1477#line 194 "scripts/genksyms/parse.y" 1795#line 197 "scripts/genksyms/parse.y"
1478 { is_extern = 0; (yyval) = (yyvsp[0]); ;} 1796 { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;}
1479 break; 1797 break;
1480 1798
1481 case 35: 1799 case 37:
1482#line 206 "scripts/genksyms/parse.y" 1800#line 209 "scripts/genksyms/parse.y"
1483 { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_STRUCT; (yyval) = (yyvsp[0]); ;} 1801 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;}
1484 break; 1802 break;
1485 1803
1486 case 36: 1804 case 38:
1487#line 208 "scripts/genksyms/parse.y" 1805#line 211 "scripts/genksyms/parse.y"
1488 { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_UNION; (yyval) = (yyvsp[0]); ;} 1806 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;}
1489 break; 1807 break;
1490 1808
1491 case 37: 1809 case 39:
1492#line 210 "scripts/genksyms/parse.y" 1810#line 213 "scripts/genksyms/parse.y"
1493 { remove_node((yyvsp[-1])); (*(yyvsp[0]))->tag = SYM_ENUM; (yyval) = (yyvsp[0]); ;} 1811 { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;}
1494 break; 1812 break;
1495 1813
1496 case 38: 1814 case 40:
1497#line 214 "scripts/genksyms/parse.y" 1815#line 217 "scripts/genksyms/parse.y"
1498 { struct string_list *s = *(yyvsp[0]), *i = *(yyvsp[-1]), *r; 1816 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1499 r = copy_node(i); r->tag = SYM_STRUCT; 1817 r = copy_node(i); r->tag = SYM_STRUCT;
1500 r->next = (*(yyvsp[-2]))->next; *(yyvsp[0]) = r; (*(yyvsp[-2]))->next = NULL; 1818 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
1501 add_symbol(i->string, SYM_STRUCT, s, is_extern); 1819 add_symbol(i->string, SYM_STRUCT, s, is_extern);
1502 (yyval) = (yyvsp[0]); 1820 (yyval) = (yyvsp[(3) - (3)]);
1503 ;} 1821 ;}
1504 break; 1822 break;
1505 1823
1506 case 39: 1824 case 41:
1507#line 221 "scripts/genksyms/parse.y" 1825#line 224 "scripts/genksyms/parse.y"
1508 { struct string_list *s = *(yyvsp[0]), *i = *(yyvsp[-1]), *r; 1826 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1509 r = copy_node(i); r->tag = SYM_UNION; 1827 r = copy_node(i); r->tag = SYM_UNION;
1510 r->next = (*(yyvsp[-2]))->next; *(yyvsp[0]) = r; (*(yyvsp[-2]))->next = NULL; 1828 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
1511 add_symbol(i->string, SYM_UNION, s, is_extern); 1829 add_symbol(i->string, SYM_UNION, s, is_extern);
1512 (yyval) = (yyvsp[0]); 1830 (yyval) = (yyvsp[(3) - (3)]);
1513 ;} 1831 ;}
1514 break; 1832 break;
1515 1833
1516 case 40: 1834 case 42:
1517#line 228 "scripts/genksyms/parse.y" 1835#line 231 "scripts/genksyms/parse.y"
1518 { struct string_list *s = *(yyvsp[0]), *i = *(yyvsp[-1]), *r; 1836 { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1519 r = copy_node(i); r->tag = SYM_ENUM; 1837 r = copy_node(i); r->tag = SYM_ENUM;
1520 r->next = (*(yyvsp[-2]))->next; *(yyvsp[0]) = r; (*(yyvsp[-2]))->next = NULL; 1838 r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
1521 add_symbol(i->string, SYM_ENUM, s, is_extern); 1839 add_symbol(i->string, SYM_ENUM, s, is_extern);
1522 (yyval) = (yyvsp[0]); 1840 (yyval) = (yyvsp[(3) - (3)]);
1523 ;} 1841 ;}
1524 break; 1842 break;
1525 1843
1526 case 41: 1844 case 43:
1527#line 236 "scripts/genksyms/parse.y" 1845#line 239 "scripts/genksyms/parse.y"
1528 { (yyval) = (yyvsp[0]); ;} 1846 { (yyval) = (yyvsp[(2) - (2)]); ;}
1529 break; 1847 break;
1530 1848
1531 case 42: 1849 case 44:
1532#line 237 "scripts/genksyms/parse.y" 1850#line 240 "scripts/genksyms/parse.y"
1533 { (yyval) = (yyvsp[0]); ;} 1851 { (yyval) = (yyvsp[(2) - (2)]); ;}
1534 break; 1852 break;
1535 1853
1536 case 43: 1854 case 45:
1537#line 238 "scripts/genksyms/parse.y" 1855#line 241 "scripts/genksyms/parse.y"
1538 { (yyval) = (yyvsp[0]); ;} 1856 { (yyval) = (yyvsp[(2) - (2)]); ;}
1539 break; 1857 break;
1540 1858
1541 case 54: 1859 case 56:
1542#line 252 "scripts/genksyms/parse.y" 1860#line 255 "scripts/genksyms/parse.y"
1543 { (*(yyvsp[0]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[0]); ;} 1861 { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;}
1544 break; 1862 break;
1545 1863
1546 case 55: 1864 case 57:
1547#line 257 "scripts/genksyms/parse.y" 1865#line 260 "scripts/genksyms/parse.y"
1548 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;} 1866 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1549 break; 1867 break;
1550 1868
1551 case 56: 1869 case 58:
1552#line 261 "scripts/genksyms/parse.y" 1870#line 264 "scripts/genksyms/parse.y"
1553 { (yyval) = NULL; ;} 1871 { (yyval) = NULL; ;}
1554 break; 1872 break;
1555 1873
1556 case 59: 1874 case 61:
1557#line 267 "scripts/genksyms/parse.y" 1875#line 270 "scripts/genksyms/parse.y"
1558 { (yyval) = (yyvsp[0]); ;} 1876 { (yyval) = (yyvsp[(2) - (2)]); ;}
1559 break; 1877 break;
1560 1878
1561 case 63: 1879 case 65:
1562#line 273 "scripts/genksyms/parse.y" 1880#line 276 "scripts/genksyms/parse.y"
1563 { /* restrict has no effect in prototypes so ignore it */ 1881 { /* restrict has no effect in prototypes so ignore it */
1564 remove_node((yyvsp[0])); 1882 remove_node((yyvsp[(1) - (1)]));
1565 (yyval) = (yyvsp[0]); 1883 (yyval) = (yyvsp[(1) - (1)]);
1566 ;} 1884 ;}
1567 break; 1885 break;
1568 1886
1569 case 64: 1887 case 66:
1570#line 280 "scripts/genksyms/parse.y" 1888#line 283 "scripts/genksyms/parse.y"
1571 { (yyval) = (yyvsp[0]); ;} 1889 { (yyval) = (yyvsp[(2) - (2)]); ;}
1572 break; 1890 break;
1573 1891
1574 case 66: 1892 case 68:
1575#line 286 "scripts/genksyms/parse.y" 1893#line 289 "scripts/genksyms/parse.y"
1576 { if (current_name != NULL) { 1894 { if (current_name != NULL) {
1577 error_with_pos("unexpected second declaration name"); 1895 error_with_pos("unexpected second declaration name");
1578 YYERROR; 1896 YYERROR;
1579 } else { 1897 } else {
1580 current_name = (*(yyvsp[0]))->string; 1898 current_name = (*(yyvsp[(1) - (1)]))->string;
1581 (yyval) = (yyvsp[0]); 1899 (yyval) = (yyvsp[(1) - (1)]);
1582 } 1900 }
1583 ;} 1901 ;}
1584 break; 1902 break;
1585 1903
1586 case 67:
1587#line 295 "scripts/genksyms/parse.y"
1588 { (yyval) = (yyvsp[0]); ;}
1589 break;
1590
1591 case 68:
1592#line 297 "scripts/genksyms/parse.y"
1593 { (yyval) = (yyvsp[0]); ;}
1594 break;
1595
1596 case 69: 1904 case 69:
1597#line 299 "scripts/genksyms/parse.y" 1905#line 298 "scripts/genksyms/parse.y"
1598 { (yyval) = (yyvsp[0]); ;} 1906 { (yyval) = (yyvsp[(4) - (4)]); ;}
1599 break; 1907 break;
1600 1908
1601 case 70: 1909 case 70:
1602#line 301 "scripts/genksyms/parse.y" 1910#line 300 "scripts/genksyms/parse.y"
1603 { (yyval) = (yyvsp[0]); ;} 1911 { (yyval) = (yyvsp[(4) - (4)]); ;}
1604 break; 1912 break;
1605 1913
1606 case 71: 1914 case 71:
1607#line 303 "scripts/genksyms/parse.y" 1915#line 302 "scripts/genksyms/parse.y"
1608 { (yyval) = (yyvsp[0]); ;} 1916 { (yyval) = (yyvsp[(2) - (2)]); ;}
1609 break; 1917 break;
1610 1918
1611 case 72: 1919 case 72:
1612#line 309 "scripts/genksyms/parse.y" 1920#line 304 "scripts/genksyms/parse.y"
1613 { (yyval) = (yyvsp[0]); ;} 1921 { (yyval) = (yyvsp[(3) - (3)]); ;}
1614 break; 1922 break;
1615 1923
1616 case 76: 1924 case 73:
1617#line 317 "scripts/genksyms/parse.y" 1925#line 306 "scripts/genksyms/parse.y"
1618 { (yyval) = (yyvsp[0]); ;} 1926 { (yyval) = (yyvsp[(3) - (3)]); ;}
1619 break; 1927 break;
1620 1928
1621 case 77: 1929 case 74:
1622#line 319 "scripts/genksyms/parse.y" 1930#line 312 "scripts/genksyms/parse.y"
1623 { (yyval) = (yyvsp[0]); ;} 1931 { (yyval) = (yyvsp[(2) - (2)]); ;}
1624 break; 1932 break;
1625 1933
1626 case 78: 1934 case 78:
1627#line 321 "scripts/genksyms/parse.y" 1935#line 320 "scripts/genksyms/parse.y"
1628 { (yyval) = (yyvsp[0]); ;} 1936 { (yyval) = (yyvsp[(4) - (4)]); ;}
1629 break; 1937 break;
1630 1938
1631 case 79: 1939 case 79:
1632#line 323 "scripts/genksyms/parse.y" 1940#line 322 "scripts/genksyms/parse.y"
1633 { (yyval) = (yyvsp[0]); ;} 1941 { (yyval) = (yyvsp[(4) - (4)]); ;}
1634 break; 1942 break;
1635 1943
1636 case 80: 1944 case 80:
1637#line 325 "scripts/genksyms/parse.y" 1945#line 324 "scripts/genksyms/parse.y"
1638 { (yyval) = (yyvsp[0]); ;} 1946 { (yyval) = (yyvsp[(2) - (2)]); ;}
1639 break; 1947 break;
1640 1948
1641 case 81: 1949 case 81:
1642#line 329 "scripts/genksyms/parse.y" 1950#line 326 "scripts/genksyms/parse.y"
1643 { (yyval) = (yyvsp[0]); ;} 1951 { (yyval) = (yyvsp[(3) - (3)]); ;}
1644 break; 1952 break;
1645 1953
1646 case 83: 1954 case 82:
1647#line 331 "scripts/genksyms/parse.y" 1955#line 328 "scripts/genksyms/parse.y"
1648 { (yyval) = (yyvsp[0]); ;} 1956 { (yyval) = (yyvsp[(3) - (3)]); ;}
1649 break; 1957 break;
1650 1958
1651 case 84: 1959 case 83:
1652#line 335 "scripts/genksyms/parse.y" 1960#line 332 "scripts/genksyms/parse.y"
1653 { (yyval) = NULL; ;} 1961 { (yyval) = (yyvsp[(2) - (2)]); ;}
1654 break; 1962 break;
1655 1963
1656 case 87: 1964 case 85:
1657#line 342 "scripts/genksyms/parse.y" 1965#line 334 "scripts/genksyms/parse.y"
1658 { (yyval) = (yyvsp[0]); ;} 1966 { (yyval) = (yyvsp[(3) - (3)]); ;}
1659 break; 1967 break;
1660 1968
1661 case 88: 1969 case 86:
1662#line 347 "scripts/genksyms/parse.y" 1970#line 338 "scripts/genksyms/parse.y"
1663 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;} 1971 { (yyval) = NULL; ;}
1664 break; 1972 break;
1665 1973
1666 case 89: 1974 case 89:
1667#line 352 "scripts/genksyms/parse.y" 1975#line 345 "scripts/genksyms/parse.y"
1668 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;} 1976 { (yyval) = (yyvsp[(3) - (3)]); ;}
1669 break; 1977 break;
1670 1978
1671 case 91: 1979 case 90:
1672#line 357 "scripts/genksyms/parse.y" 1980#line 350 "scripts/genksyms/parse.y"
1673 { (yyval) = NULL; ;} 1981 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1674 break; 1982 break;
1675 1983
1676 case 92: 1984 case 91:
1677#line 359 "scripts/genksyms/parse.y" 1985#line 355 "scripts/genksyms/parse.y"
1678 { /* For version 2 checksums, we don't want to remember 1986 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1679 private parameter names. */
1680 remove_node((yyvsp[0]));
1681 (yyval) = (yyvsp[0]);
1682 ;}
1683 break; 1987 break;
1684 1988
1685 case 93: 1989 case 93:
1686#line 367 "scripts/genksyms/parse.y" 1990#line 360 "scripts/genksyms/parse.y"
1687 { remove_node((yyvsp[0])); 1991 { (yyval) = NULL; ;}
1688 (yyval) = (yyvsp[0]);
1689 ;}
1690 break; 1992 break;
1691 1993
1692 case 94: 1994 case 94:
1693#line 371 "scripts/genksyms/parse.y" 1995#line 362 "scripts/genksyms/parse.y"
1694 { (yyval) = (yyvsp[0]); ;} 1996 { /* For version 2 checksums, we don't want to remember
1997 private parameter names. */
1998 remove_node((yyvsp[(1) - (1)]));
1999 (yyval) = (yyvsp[(1) - (1)]);
2000 ;}
1695 break; 2001 break;
1696 2002
1697 case 95: 2003 case 95:
1698#line 373 "scripts/genksyms/parse.y" 2004#line 370 "scripts/genksyms/parse.y"
1699 { (yyval) = (yyvsp[0]); ;} 2005 { remove_node((yyvsp[(1) - (1)]));
2006 (yyval) = (yyvsp[(1) - (1)]);
2007 ;}
1700 break; 2008 break;
1701 2009
1702 case 96: 2010 case 96:
1703#line 375 "scripts/genksyms/parse.y" 2011#line 374 "scripts/genksyms/parse.y"
1704 { (yyval) = (yyvsp[0]); ;} 2012 { (yyval) = (yyvsp[(4) - (4)]); ;}
1705 break; 2013 break;
1706 2014
1707 case 97: 2015 case 97:
1708#line 377 "scripts/genksyms/parse.y" 2016#line 376 "scripts/genksyms/parse.y"
1709 { (yyval) = (yyvsp[0]); ;} 2017 { (yyval) = (yyvsp[(4) - (4)]); ;}
1710 break; 2018 break;
1711 2019
1712 case 98: 2020 case 98:
1713#line 379 "scripts/genksyms/parse.y" 2021#line 378 "scripts/genksyms/parse.y"
1714 { (yyval) = (yyvsp[0]); ;} 2022 { (yyval) = (yyvsp[(2) - (2)]); ;}
1715 break; 2023 break;
1716 2024
1717 case 99: 2025 case 99:
1718#line 384 "scripts/genksyms/parse.y" 2026#line 380 "scripts/genksyms/parse.y"
1719 { struct string_list *decl = *(yyvsp[-1]); 2027 { (yyval) = (yyvsp[(3) - (3)]); ;}
1720 *(yyvsp[-1]) = NULL;
1721 add_symbol(current_name, SYM_NORMAL, decl, is_extern);
1722 (yyval) = (yyvsp[0]);
1723 ;}
1724 break; 2028 break;
1725 2029
1726 case 100: 2030 case 100:
1727#line 392 "scripts/genksyms/parse.y" 2031#line 382 "scripts/genksyms/parse.y"
1728 { (yyval) = NULL; ;} 2032 { (yyval) = (yyvsp[(3) - (3)]); ;}
1729 break; 2033 break;
1730 2034
1731 case 102: 2035 case 101:
1732#line 399 "scripts/genksyms/parse.y" 2036#line 387 "scripts/genksyms/parse.y"
1733 { remove_list((yyvsp[0]), &(*(yyvsp[-1]))->next); (yyval) = (yyvsp[0]); ;} 2037 { struct string_list *decl = *(yyvsp[(2) - (3)]);
2038 *(yyvsp[(2) - (3)]) = NULL;
2039 add_symbol(current_name, SYM_NORMAL, decl, is_extern);
2040 (yyval) = (yyvsp[(3) - (3)]);
2041 ;}
1734 break; 2042 break;
1735 2043
1736 case 103: 2044 case 102:
1737#line 403 "scripts/genksyms/parse.y" 2045#line 395 "scripts/genksyms/parse.y"
1738 { (yyval) = (yyvsp[0]); ;} 2046 { (yyval) = NULL; ;}
1739 break; 2047 break;
1740 2048
1741 case 104: 2049 case 104:
1742#line 404 "scripts/genksyms/parse.y" 2050#line 402 "scripts/genksyms/parse.y"
1743 { (yyval) = (yyvsp[0]); ;} 2051 { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;}
1744 break; 2052 break;
1745 2053
1746 case 105: 2054 case 105:
1747#line 408 "scripts/genksyms/parse.y" 2055#line 406 "scripts/genksyms/parse.y"
1748 { (yyval) = NULL; ;} 2056 { (yyval) = (yyvsp[(3) - (3)]); ;}
1749 break; 2057 break;
1750 2058
1751 case 108: 2059 case 106:
1752#line 414 "scripts/genksyms/parse.y" 2060#line 407 "scripts/genksyms/parse.y"
1753 { (yyval) = (yyvsp[0]); ;} 2061 { (yyval) = (yyvsp[(3) - (3)]); ;}
1754 break; 2062 break;
1755 2063
1756 case 109: 2064 case 107:
1757#line 419 "scripts/genksyms/parse.y" 2065#line 411 "scripts/genksyms/parse.y"
1758 { (yyval) = (yyvsp[0]); ;} 2066 { (yyval) = NULL; ;}
1759 break; 2067 break;
1760 2068
1761 case 110: 2069 case 110:
1762#line 421 "scripts/genksyms/parse.y" 2070#line 417 "scripts/genksyms/parse.y"
1763 { (yyval) = (yyvsp[0]); ;} 2071 { (yyval) = (yyvsp[(2) - (2)]); ;}
1764 break; 2072 break;
1765 2073
1766 case 111: 2074 case 111:
1767#line 425 "scripts/genksyms/parse.y" 2075#line 422 "scripts/genksyms/parse.y"
1768 { (yyval) = NULL; ;} 2076 { (yyval) = (yyvsp[(3) - (3)]); ;}
1769 break; 2077 break;
1770 2078
1771 case 114: 2079 case 112:
1772#line 431 "scripts/genksyms/parse.y" 2080#line 424 "scripts/genksyms/parse.y"
1773 { (yyval) = (yyvsp[0]); ;} 2081 { (yyval) = (yyvsp[(2) - (2)]); ;}
1774 break; 2082 break;
1775 2083
1776 case 115: 2084 case 113:
1777#line 435 "scripts/genksyms/parse.y" 2085#line 428 "scripts/genksyms/parse.y"
1778 { (yyval) = (yyvsp[0]) ? (yyvsp[0]) : (yyvsp[-1]); ;} 2086 { (yyval) = NULL; ;}
1779 break; 2087 break;
1780 2088
1781 case 116: 2089 case 116:
1782#line 436 "scripts/genksyms/parse.y" 2090#line 434 "scripts/genksyms/parse.y"
1783 { (yyval) = (yyvsp[0]); ;} 2091 { (yyval) = (yyvsp[(3) - (3)]); ;}
2092 break;
2093
2094 case 117:
2095#line 438 "scripts/genksyms/parse.y"
2096 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1784 break; 2097 break;
1785 2098
1786 case 118: 2099 case 118:
1787#line 441 "scripts/genksyms/parse.y" 2100#line 439 "scripts/genksyms/parse.y"
1788 { (yyval) = (yyvsp[0]); ;} 2101 { (yyval) = (yyvsp[(2) - (2)]); ;}
1789 break; 2102 break;
1790 2103
1791 case 119: 2104 case 120:
1792#line 445 "scripts/genksyms/parse.y" 2105#line 444 "scripts/genksyms/parse.y"
1793 { (yyval) = NULL; ;} 2106 { (yyval) = (yyvsp[(2) - (2)]); ;}
1794 break; 2107 break;
1795 2108
1796 case 121: 2109 case 121:
1797#line 450 "scripts/genksyms/parse.y" 2110#line 448 "scripts/genksyms/parse.y"
1798 { (yyval) = (yyvsp[0]); ;} 2111 { (yyval) = NULL; ;}
1799 break; 2112 break;
1800 2113
1801 case 122: 2114 case 123:
1802#line 454 "scripts/genksyms/parse.y" 2115#line 453 "scripts/genksyms/parse.y"
1803 { (yyval) = NULL; ;} 2116 { (yyval) = (yyvsp[(2) - (2)]); ;}
1804 break; 2117 break;
1805 2118
1806 case 124: 2119 case 124:
1807#line 460 "scripts/genksyms/parse.y" 2120#line 457 "scripts/genksyms/parse.y"
1808 { export_symbol((*(yyvsp[-2]))->string); (yyval) = (yyvsp[0]); ;} 2121 { (yyval) = NULL; ;}
1809 break; 2122 break;
1810 2123
2124 case 126:
2125#line 463 "scripts/genksyms/parse.y"
2126 { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;}
2127 break;
1811 2128
1812 }
1813
1814/* Line 1037 of yacc.c. */
1815#line 1816 "scripts/genksyms/parse.c"
1816
1817 yyvsp -= yylen;
1818 yyssp -= yylen;
1819 2129
2130/* Line 1267 of yacc.c. */
2131#line 2132 "scripts/genksyms/parse.c"
2132 default: break;
2133 }
2134 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1820 2135
2136 YYPOPSTACK (yylen);
2137 yylen = 0;
1821 YY_STACK_PRINT (yyss, yyssp); 2138 YY_STACK_PRINT (yyss, yyssp);
1822 2139
1823 *++yyvsp = yyval; 2140 *++yyvsp = yyval;
@@ -1846,66 +2163,41 @@ yyerrlab:
1846 if (!yyerrstatus) 2163 if (!yyerrstatus)
1847 { 2164 {
1848 ++yynerrs; 2165 ++yynerrs;
1849#if YYERROR_VERBOSE 2166#if ! YYERROR_VERBOSE
1850 yyn = yypact[yystate]; 2167 yyerror (YY_("syntax error"));
1851 2168#else
1852 if (YYPACT_NINF < yyn && yyn < YYLAST) 2169 {
1853 { 2170 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1854 YYSIZE_T yysize = 0; 2171 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1855 int yytype = YYTRANSLATE (yychar); 2172 {
1856 const char* yyprefix; 2173 YYSIZE_T yyalloc = 2 * yysize;
1857 char *yymsg; 2174 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1858 int yyx; 2175 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1859 2176 if (yymsg != yymsgbuf)
1860 /* Start YYX at -YYN if negative to avoid negative indexes in 2177 YYSTACK_FREE (yymsg);
1861 YYCHECK. */ 2178 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1862 int yyxbegin = yyn < 0 ? -yyn : 0; 2179 if (yymsg)
1863 2180 yymsg_alloc = yyalloc;
1864 /* Stay within bounds of both yycheck and yytname. */ 2181 else
1865 int yychecklim = YYLAST - yyn;
1866 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1867 int yycount = 0;
1868
1869 yyprefix = ", expecting ";
1870 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1871 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1872 { 2182 {
1873 yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); 2183 yymsg = yymsgbuf;
1874 yycount += 1; 2184 yymsg_alloc = sizeof yymsgbuf;
1875 if (yycount == 5)
1876 {
1877 yysize = 0;
1878 break;
1879 }
1880 } 2185 }
1881 yysize += (sizeof ("syntax error, unexpected ") 2186 }
1882 + yystrlen (yytname[yytype])); 2187
1883 yymsg = (char *) YYSTACK_ALLOC (yysize); 2188 if (0 < yysize && yysize <= yymsg_alloc)
1884 if (yymsg != 0) 2189 {
1885 { 2190 (void) yysyntax_error (yymsg, yystate, yychar);
1886 char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); 2191 yyerror (yymsg);
1887 yyp = yystpcpy (yyp, yytname[yytype]); 2192 }
1888 2193 else
1889 if (yycount < 5) 2194 {
1890 { 2195 yyerror (YY_("syntax error"));
1891 yyprefix = ", expecting "; 2196 if (yysize != 0)
1892 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 2197 goto yyexhaustedlab;
1893 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 2198 }
1894 { 2199 }
1895 yyp = yystpcpy (yyp, yyprefix); 2200#endif
1896 yyp = yystpcpy (yyp, yytname[yyx]);
1897 yyprefix = " or ";
1898 }
1899 }
1900 yyerror (yymsg);
1901 YYSTACK_FREE (yymsg);
1902 }
1903 else
1904 yyerror ("syntax error; also virtual memory exhausted");
1905 }
1906 else
1907#endif /* YYERROR_VERBOSE */
1908 yyerror ("syntax error");
1909 } 2201 }
1910 2202
1911 2203
@@ -1916,23 +2208,15 @@ yyerrlab:
1916 error, discard it. */ 2208 error, discard it. */
1917 2209
1918 if (yychar <= YYEOF) 2210 if (yychar <= YYEOF)
1919 { 2211 {
1920 /* If at end of input, pop the error token, 2212 /* Return failure if at end of input. */
1921 then the rest of the stack, then return failure. */
1922 if (yychar == YYEOF) 2213 if (yychar == YYEOF)
1923 for (;;) 2214 YYABORT;
1924 { 2215 }
1925
1926 YYPOPSTACK;
1927 if (yyssp == yyss)
1928 YYABORT;
1929 yydestruct ("Error: popping",
1930 yystos[*yyssp], yyvsp);
1931 }
1932 }
1933 else 2216 else
1934 { 2217 {
1935 yydestruct ("Error: discarding", yytoken, &yylval); 2218 yydestruct ("Error: discarding",
2219 yytoken, &yylval);
1936 yychar = YYEMPTY; 2220 yychar = YYEMPTY;
1937 } 2221 }
1938 } 2222 }
@@ -1947,15 +2231,17 @@ yyerrlab:
1947`---------------------------------------------------*/ 2231`---------------------------------------------------*/
1948yyerrorlab: 2232yyerrorlab:
1949 2233
1950#ifdef __GNUC__ 2234 /* Pacify compilers like GCC when the user code never invokes
1951 /* Pacify GCC when the user code never invokes YYERROR and the label 2235 YYERROR and the label yyerrorlab therefore never appears in user
1952 yyerrorlab therefore never appears in user code. */ 2236 code. */
1953 if (0) 2237 if (/*CONSTCOND*/ 0)
1954 goto yyerrorlab; 2238 goto yyerrorlab;
1955#endif
1956 2239
1957yyvsp -= yylen; 2240 /* Do not reclaim the symbols of the rule which action triggered
1958 yyssp -= yylen; 2241 this YYERROR. */
2242 YYPOPSTACK (yylen);
2243 yylen = 0;
2244 YY_STACK_PRINT (yyss, yyssp);
1959 yystate = *yyssp; 2245 yystate = *yyssp;
1960 goto yyerrlab1; 2246 goto yyerrlab1;
1961 2247
@@ -1985,8 +2271,9 @@ yyerrlab1:
1985 YYABORT; 2271 YYABORT;
1986 2272
1987 2273
1988 yydestruct ("Error: popping", yystos[yystate], yyvsp); 2274 yydestruct ("Error: popping",
1989 YYPOPSTACK; 2275 yystos[yystate], yyvsp);
2276 YYPOPSTACK (1);
1990 yystate = *yyssp; 2277 yystate = *yyssp;
1991 YY_STACK_PRINT (yyss, yyssp); 2278 YY_STACK_PRINT (yyss, yyssp);
1992 } 2279 }
@@ -1997,7 +2284,7 @@ yyerrlab1:
1997 *++yyvsp = yylval; 2284 *++yyvsp = yylval;
1998 2285
1999 2286
2000 /* Shift the error token. */ 2287 /* Shift the error token. */
2001 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 2288 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2002 2289
2003 yystate = yyn; 2290 yystate = yyn;
@@ -2015,32 +2302,47 @@ yyacceptlab:
2015| yyabortlab -- YYABORT comes here. | 2302| yyabortlab -- YYABORT comes here. |
2016`-----------------------------------*/ 2303`-----------------------------------*/
2017yyabortlab: 2304yyabortlab:
2018 yydestruct ("Error: discarding lookahead",
2019 yytoken, &yylval);
2020 yychar = YYEMPTY;
2021 yyresult = 1; 2305 yyresult = 1;
2022 goto yyreturn; 2306 goto yyreturn;
2023 2307
2024#ifndef yyoverflow 2308#ifndef yyoverflow
2025/*----------------------------------------------. 2309/*-------------------------------------------------.
2026| yyoverflowlab -- parser overflow comes here. | 2310| yyexhaustedlab -- memory exhaustion comes here. |
2027`----------------------------------------------*/ 2311`-------------------------------------------------*/
2028yyoverflowlab: 2312yyexhaustedlab:
2029 yyerror ("parser stack overflow"); 2313 yyerror (YY_("memory exhausted"));
2030 yyresult = 2; 2314 yyresult = 2;
2031 /* Fall through. */ 2315 /* Fall through. */
2032#endif 2316#endif
2033 2317
2034yyreturn: 2318yyreturn:
2319 if (yychar != YYEOF && yychar != YYEMPTY)
2320 yydestruct ("Cleanup: discarding lookahead",
2321 yytoken, &yylval);
2322 /* Do not reclaim the symbols of the rule which action triggered
2323 this YYABORT or YYACCEPT. */
2324 YYPOPSTACK (yylen);
2325 YY_STACK_PRINT (yyss, yyssp);
2326 while (yyssp != yyss)
2327 {
2328 yydestruct ("Cleanup: popping",
2329 yystos[*yyssp], yyvsp);
2330 YYPOPSTACK (1);
2331 }
2035#ifndef yyoverflow 2332#ifndef yyoverflow
2036 if (yyss != yyssa) 2333 if (yyss != yyssa)
2037 YYSTACK_FREE (yyss); 2334 YYSTACK_FREE (yyss);
2038#endif 2335#endif
2039 return yyresult; 2336#if YYERROR_VERBOSE
2337 if (yymsg != yymsgbuf)
2338 YYSTACK_FREE (yymsg);
2339#endif
2340 /* Make sure YYID is used. */
2341 return YYID (yyresult);
2040} 2342}
2041 2343
2042 2344
2043#line 464 "scripts/genksyms/parse.y" 2345#line 467 "scripts/genksyms/parse.y"
2044 2346
2045 2347
2046static void 2348static void
diff --git a/scripts/genksyms/parse.h_shipped b/scripts/genksyms/parse.h_shipped
index f3fb2bb058e1..c4eeec652b79 100644
--- a/scripts/genksyms/parse.h_shipped
+++ b/scripts/genksyms/parse.h_shipped
@@ -1,7 +1,9 @@
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, 3/* Skeleton interface for Bison's Yacc-like parsers in C
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
5 7
6 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
@@ -15,13 +17,21 @@
15 17
16 You should have received a copy of the GNU General Public License 18 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 19 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, 20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02111-1307, USA. */ 21 Boston, MA 02110-1301, USA. */
22
23/* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
20 32
21/* As a special exception, when this file is copied by Bison into a 33 This special exception was added by the Free Software Foundation in
22 Bison output file, you may use that output file without restriction. 34 version 2.2 of Bison. */
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
25 35
26/* Tokens. */ 36/* Tokens. */
27#ifndef YYTOKENTYPE 37#ifndef YYTOKENTYPE
@@ -38,39 +48,41 @@
38 DOUBLE_KEYW = 264, 48 DOUBLE_KEYW = 264,
39 ENUM_KEYW = 265, 49 ENUM_KEYW = 265,
40 EXTERN_KEYW = 266, 50 EXTERN_KEYW = 266,
41 FLOAT_KEYW = 267, 51 EXTENSION_KEYW = 267,
42 INLINE_KEYW = 268, 52 FLOAT_KEYW = 268,
43 INT_KEYW = 269, 53 INLINE_KEYW = 269,
44 LONG_KEYW = 270, 54 INT_KEYW = 270,
45 REGISTER_KEYW = 271, 55 LONG_KEYW = 271,
46 RESTRICT_KEYW = 272, 56 REGISTER_KEYW = 272,
47 SHORT_KEYW = 273, 57 RESTRICT_KEYW = 273,
48 SIGNED_KEYW = 274, 58 SHORT_KEYW = 274,
49 STATIC_KEYW = 275, 59 SIGNED_KEYW = 275,
50 STRUCT_KEYW = 276, 60 STATIC_KEYW = 276,
51 TYPEDEF_KEYW = 277, 61 STRUCT_KEYW = 277,
52 UNION_KEYW = 278, 62 TYPEDEF_KEYW = 278,
53 UNSIGNED_KEYW = 279, 63 UNION_KEYW = 279,
54 VOID_KEYW = 280, 64 UNSIGNED_KEYW = 280,
55 VOLATILE_KEYW = 281, 65 VOID_KEYW = 281,
56 TYPEOF_KEYW = 282, 66 VOLATILE_KEYW = 282,
57 EXPORT_SYMBOL_KEYW = 283, 67 TYPEOF_KEYW = 283,
58 ASM_PHRASE = 284, 68 EXPORT_SYMBOL_KEYW = 284,
59 ATTRIBUTE_PHRASE = 285, 69 ASM_PHRASE = 285,
60 BRACE_PHRASE = 286, 70 ATTRIBUTE_PHRASE = 286,
61 BRACKET_PHRASE = 287, 71 BRACE_PHRASE = 287,
62 EXPRESSION_PHRASE = 288, 72 BRACKET_PHRASE = 288,
63 CHAR = 289, 73 EXPRESSION_PHRASE = 289,
64 DOTS = 290, 74 CHAR = 290,
65 IDENT = 291, 75 DOTS = 291,
66 INT = 292, 76 IDENT = 292,
67 REAL = 293, 77 INT = 293,
68 STRING = 294, 78 REAL = 294,
69 TYPE = 295, 79 STRING = 295,
70 OTHER = 296, 80 TYPE = 296,
71 FILENAME = 297 81 OTHER = 297,
82 FILENAME = 298
72 }; 83 };
73#endif 84#endif
85/* Tokens. */
74#define ASM_KEYW 258 86#define ASM_KEYW 258
75#define ATTRIBUTE_KEYW 259 87#define ATTRIBUTE_KEYW 259
76#define AUTO_KEYW 260 88#define AUTO_KEYW 260
@@ -80,42 +92,43 @@
80#define DOUBLE_KEYW 264 92#define DOUBLE_KEYW 264
81#define ENUM_KEYW 265 93#define ENUM_KEYW 265
82#define EXTERN_KEYW 266 94#define EXTERN_KEYW 266
83#define FLOAT_KEYW 267 95#define EXTENSION_KEYW 267
84#define INLINE_KEYW 268 96#define FLOAT_KEYW 268
85#define INT_KEYW 269 97#define INLINE_KEYW 269
86#define LONG_KEYW 270 98#define INT_KEYW 270
87#define REGISTER_KEYW 271 99#define LONG_KEYW 271
88#define RESTRICT_KEYW 272 100#define REGISTER_KEYW 272
89#define SHORT_KEYW 273 101#define RESTRICT_KEYW 273
90#define SIGNED_KEYW 274 102#define SHORT_KEYW 274
91#define STATIC_KEYW 275 103#define SIGNED_KEYW 275
92#define STRUCT_KEYW 276 104#define STATIC_KEYW 276
93#define TYPEDEF_KEYW 277 105#define STRUCT_KEYW 277
94#define UNION_KEYW 278 106#define TYPEDEF_KEYW 278
95#define UNSIGNED_KEYW 279 107#define UNION_KEYW 279
96#define VOID_KEYW 280 108#define UNSIGNED_KEYW 280
97#define VOLATILE_KEYW 281 109#define VOID_KEYW 281
98#define TYPEOF_KEYW 282 110#define VOLATILE_KEYW 282
99#define EXPORT_SYMBOL_KEYW 283 111#define TYPEOF_KEYW 283
100#define ASM_PHRASE 284 112#define EXPORT_SYMBOL_KEYW 284
101#define ATTRIBUTE_PHRASE 285 113#define ASM_PHRASE 285
102#define BRACE_PHRASE 286 114#define ATTRIBUTE_PHRASE 286
103#define BRACKET_PHRASE 287 115#define BRACE_PHRASE 287
104#define EXPRESSION_PHRASE 288 116#define BRACKET_PHRASE 288
105#define CHAR 289 117#define EXPRESSION_PHRASE 289
106#define DOTS 290 118#define CHAR 290
107#define IDENT 291 119#define DOTS 291
108#define INT 292 120#define IDENT 292
109#define REAL 293 121#define INT 293
110#define STRING 294 122#define REAL 294
111#define TYPE 295 123#define STRING 295
112#define OTHER 296 124#define TYPE 296
113#define FILENAME 297 125#define OTHER 297
126#define FILENAME 298
114 127
115 128
116 129
117 130
118#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 131#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
119typedef int YYSTYPE; 132typedef int YYSTYPE;
120# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 133# define yystype YYSTYPE /* obsolescent; will be withdrawn */
121# define YYSTYPE_IS_DECLARED 1 134# define YYSTYPE_IS_DECLARED 1
@@ -124,5 +137,3 @@ typedef int YYSTYPE;
124 137
125extern YYSTYPE yylval; 138extern YYSTYPE yylval;
126 139
127
128
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index ca04c944b7c3..408cdf82b271 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -61,6 +61,7 @@ remove_list(struct string_list **pb, struct string_list **pe)
61%token DOUBLE_KEYW 61%token DOUBLE_KEYW
62%token ENUM_KEYW 62%token ENUM_KEYW
63%token EXTERN_KEYW 63%token EXTERN_KEYW
64%token EXTENSION_KEYW
64%token FLOAT_KEYW 65%token FLOAT_KEYW
65%token INLINE_KEYW 66%token INLINE_KEYW
66%token INT_KEYW 67%token INT_KEYW
@@ -110,7 +111,9 @@ declaration:
110 ; 111 ;
111 112
112declaration1: 113declaration1:
113 TYPEDEF_KEYW { is_typedef = 1; } simple_declaration 114 EXTENSION_KEYW TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
115 { $$ = $4; }
116 | TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
114 { $$ = $3; } 117 { $$ = $3; }
115 | simple_declaration 118 | simple_declaration
116 | function_definition 119 | function_definition
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 8986a48c8c49..bb08069b04af 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -143,14 +143,8 @@ clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
143 .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c 143 .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
144clean-files += mconf qconf gconf 144clean-files += mconf qconf gconf
145 145
146# Needed for systems without gettext 146# Add environment specific flags
147KBUILD_HAVE_NLS := $(shell \ 147HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
148 if echo "\#include <libintl.h>" | $(HOSTCC) $(HOSTCFLAGS) -E - > /dev/null 2>&1 ; \
149 then echo yes ; \
150 else echo no ; fi)
151ifeq ($(KBUILD_HAVE_NLS),no)
152HOSTCFLAGS += -DKBUILD_NO_NLS
153endif
154 148
155# generated files seem to need this to find local include files 149# generated files seem to need this to find local include files
156HOSTCFLAGS_lex.zconf.o := -I$(src) 150HOSTCFLAGS_lex.zconf.o := -I$(src)
diff --git a/scripts/kconfig/check.sh b/scripts/kconfig/check.sh
new file mode 100755
index 000000000000..fa59cbf9d62c
--- /dev/null
+++ b/scripts/kconfig/check.sh
@@ -0,0 +1,14 @@
1#!/bin/sh
2# Needed for systems without gettext
3$* -xc -o /dev/null - > /dev/null 2>&1 << EOF
4#include <libintl.h>
5int main()
6{
7 gettext("");
8 return 0;
9}
10EOF
11if [ ! "$?" -eq "0" ]; then
12 echo -DKBUILD_NO_NLS;
13fi
14
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped
index 0fdc9049296f..a065d5a57c01 100644
--- a/scripts/kconfig/lex.zconf.c_shipped
+++ b/scripts/kconfig/lex.zconf.c_shipped
@@ -5,6 +5,25 @@
5 5
6/* A lexical scanner generated by flex */ 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#define FLEX_SCANNER 27#define FLEX_SCANNER
9#define YY_FLEX_MAJOR_VERSION 2 28#define YY_FLEX_MAJOR_VERSION 2
10#define YY_FLEX_MINOR_VERSION 5 29#define YY_FLEX_MINOR_VERSION 5
@@ -33,7 +52,7 @@
33#if __STDC_VERSION__ >= 199901L 52#if __STDC_VERSION__ >= 199901L
34 53
35/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 54/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types. 55 * if you want the limit (max/min) macros for int types.
37 */ 56 */
38#ifndef __STDC_LIMIT_MACROS 57#ifndef __STDC_LIMIT_MACROS
39#define __STDC_LIMIT_MACROS 1 58#define __STDC_LIMIT_MACROS 1
@@ -335,7 +354,7 @@ void zconffree (void * );
335 354
336/* Begin user sect3 */ 355/* Begin user sect3 */
337 356
338#define zconfwrap() 1 357#define zconfwrap(n) 1
339#define YY_SKIP_YYWRAP 358#define YY_SKIP_YYWRAP
340 359
341typedef unsigned char YY_CHAR; 360typedef unsigned char YY_CHAR;
@@ -1983,7 +2002,7 @@ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
1983 2002
1984/** Setup the input buffer state to scan a string. The next call to zconflex() will 2003/** Setup the input buffer state to scan a string. The next call to zconflex() will
1985 * scan from a @e copy of @a str. 2004 * scan from a @e copy of @a str.
1986 * @param yystr a NUL-terminated string to scan 2005 * @param str a NUL-terminated string to scan
1987 * 2006 *
1988 * @return the newly allocated buffer state object. 2007 * @return the newly allocated buffer state object.
1989 * @note If you want to scan bytes that may contain NUL values, then use 2008 * @note If you want to scan bytes that may contain NUL values, then use
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index bc5854ed6055..47e226fdedd7 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -35,9 +35,13 @@ static const char mconf_readme[] = N_(
35"kernel parameters which are not really features, but must be\n" 35"kernel parameters which are not really features, but must be\n"
36"entered in as decimal or hexadecimal numbers or possibly text.\n" 36"entered in as decimal or hexadecimal numbers or possibly text.\n"
37"\n" 37"\n"
38"Menu items beginning with [*], <M> or [ ] represent features\n" 38"Menu items beginning with following braces represent features that\n"
39"configured to be built in, modularized or removed respectively.\n" 39" [ ] can be built in or removed\n"
40"Pointed brackets <> represent module capable features.\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"\n" 45"\n"
42"To change any of these features, highlight it with the cursor\n" 46"To change any of these features, highlight it with the cursor\n"
43"keys and press <Y> to build it in, <M> to make it a module or\n" 47"keys and press <Y> to build it in, <M> to make it a module or\n"
@@ -357,8 +361,9 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym)
357 bool hit; 361 bool hit;
358 struct property *prop; 362 struct property *prop;
359 363
360 str_printf(r, "Symbol: %s [=%s]\n", sym->name, 364 if (sym && sym->name)
361 sym_get_string_value(sym)); 365 str_printf(r, "Symbol: %s [=%s]\n", sym->name,
366 sym_get_string_value(sym));
362 for_all_prompts(sym, prop) 367 for_all_prompts(sym, prop)
363 get_prompt_str(r, prop); 368 get_prompt_str(r, prop);
364 hit = false; 369 hit = false;
@@ -481,6 +486,14 @@ static void build_conf(struct menu *menu)
481 if (single_menu_mode && menu->data) 486 if (single_menu_mode && menu->data)
482 goto conf_childs; 487 goto conf_childs;
483 return; 488 return;
489 case P_COMMENT:
490 if (prompt) {
491 child_count++;
492 item_make(" %*c*** %s ***", indent + 1, ' ', prompt);
493 item_set_tag(':');
494 item_set_data(menu);
495 }
496 break;
484 default: 497 default:
485 if (prompt) { 498 if (prompt) {
486 child_count++; 499 child_count++;
@@ -560,7 +573,7 @@ static void build_conf(struct menu *menu)
560 if (sym_is_changable(sym)) 573 if (sym_is_changable(sym))
561 item_make("[%c]", val == no ? ' ' : '*'); 574 item_make("[%c]", val == no ? ' ' : '*');
562 else 575 else
563 item_make("---"); 576 item_make("-%c-", val == no ? ' ' : '*');
564 item_set_tag('t'); 577 item_set_tag('t');
565 item_set_data(menu); 578 item_set_data(menu);
566 break; 579 break;
@@ -570,10 +583,13 @@ static void build_conf(struct menu *menu)
570 case mod: ch = 'M'; break; 583 case mod: ch = 'M'; break;
571 default: ch = ' '; break; 584 default: ch = ' '; break;
572 } 585 }
573 if (sym_is_changable(sym)) 586 if (sym_is_changable(sym)) {
574 item_make("<%c>", ch); 587 if (sym->rev_dep.tri == mod)
575 else 588 item_make("{%c}", ch);
576 item_make("---"); 589 else
590 item_make("<%c>", ch);
591 } else
592 item_make("-%c-", ch);
577 item_set_tag('t'); 593 item_set_tag('t');
578 item_set_data(menu); 594 item_set_data(menu);
579 break; 595 break;
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index f9d0d91a3fe4..7bfa181d6ed6 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -235,16 +235,23 @@ void menu_finalize(struct menu *parent)
235 sym = parent->sym; 235 sym = parent->sym;
236 if (parent->list) { 236 if (parent->list) {
237 if (sym && sym_is_choice(sym)) { 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 for (menu = parent->list; menu; menu = menu->next) { 241 for (menu = parent->list; menu; menu = menu->next) {
240 if (menu->sym) { 242 if (menu->sym && menu->sym->type != S_UNKNOWN) {
241 current_entry = parent; 243 if (type == S_UNKNOWN)
242 menu_set_type(menu->sym->type); 244 type = menu->sym->type;
243 current_entry = menu; 245 if (type != S_BOOLEAN)
244 menu_set_type(sym->type); 246 break;
245 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 parentdep = expr_alloc_symbol(sym); 255 parentdep = expr_alloc_symbol(sym);
249 } else if (parent->prompt) 256 } else if (parent->prompt)
250 parentdep = parent->prompt->visible.expr; 257 parentdep = parent->prompt->visible.expr;
@@ -253,7 +260,16 @@ void menu_finalize(struct menu *parent)
253 260
254 for (menu = parent->list; menu; menu = menu->next) { 261 for (menu = parent->list; menu; menu = menu->next) {
255 basedep = expr_transform(menu->dep); 262 basedep = expr_transform(menu->dep);
256 basedep = expr_alloc_and(expr_copy(parentdep), basedep); 263 dep = parentdep;
264 if (sym && sym_is_choice(sym) && menu->sym) {
265 enum symbol_type type = menu->sym->type;
266
267 if (type == S_UNKNOWN)
268 type = sym->type;
269 if (type != S_TRISTATE)
270 dep = expr_alloc_comp(E_EQUAL, sym, &symbol_yes);
271 }
272 basedep = expr_alloc_and(expr_copy(dep), basedep);
257 basedep = expr_eliminate_dups(basedep); 273 basedep = expr_eliminate_dups(basedep);
258 menu->dep = basedep; 274 menu->dep = basedep;
259 if (menu->sym) 275 if (menu->sym)
@@ -326,7 +342,8 @@ void menu_finalize(struct menu *parent)
326 "values not supported"); 342 "values not supported");
327 } 343 }
328 current_entry = menu; 344 current_entry = menu;
329 menu_set_type(sym->type); 345 if (menu->sym->type == S_UNKNOWN)
346 menu_set_type(sym->type);
330 menu_add_symbol(P_CHOICE, sym, NULL); 347 menu_add_symbol(P_CHOICE, sym, NULL);
331 prop = sym_get_choice_prop(sym); 348 prop = sym_get_choice_prop(sym);
332 for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) 349 for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr)
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c
index e3f28b9d59f4..e1cad924c0a4 100644
--- a/scripts/kconfig/util.c
+++ b/scripts/kconfig/util.c
@@ -84,12 +84,15 @@ void str_free(struct gstr *gs)
84/* Append to growable string */ 84/* Append to growable string */
85void str_append(struct gstr *gs, const char *s) 85void str_append(struct gstr *gs, const char *s)
86{ 86{
87 size_t l = strlen(gs->s) + strlen(s) + 1; 87 size_t l;
88 if (l > gs->len) { 88 if (s) {
89 gs->s = realloc(gs->s, l); 89 l = strlen(gs->s) + strlen(s) + 1;
90 gs->len = l; 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/* Append printf formatted string to growable string */ 98/* Append printf formatted string to growable string */
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf
index 9b44c80dd899..93538e567bda 100644
--- a/scripts/kconfig/zconf.gperf
+++ b/scripts/kconfig/zconf.gperf
@@ -23,7 +23,6 @@ help, T_HELP, TF_COMMAND
23if, T_IF, TF_COMMAND|TF_PARAM 23if, T_IF, TF_COMMAND|TF_PARAM
24endif, T_ENDIF, TF_COMMAND 24endif, T_ENDIF, TF_COMMAND
25depends, T_DEPENDS, TF_COMMAND 25depends, T_DEPENDS, TF_COMMAND
26requires, T_REQUIRES, TF_COMMAND
27optional, T_OPTIONAL, TF_COMMAND 26optional, T_OPTIONAL, TF_COMMAND
28default, T_DEFAULT, TF_COMMAND, S_UNKNOWN 27default, T_DEFAULT, TF_COMMAND, S_UNKNOWN
29prompt, T_PROMPT, TF_COMMAND 28prompt, T_PROMPT, TF_COMMAND
@@ -32,7 +31,6 @@ def_tristate, T_DEFAULT, TF_COMMAND, S_TRISTATE
32bool, T_TYPE, TF_COMMAND, S_BOOLEAN 31bool, T_TYPE, TF_COMMAND, S_BOOLEAN
33boolean, T_TYPE, TF_COMMAND, S_BOOLEAN 32boolean, T_TYPE, TF_COMMAND, S_BOOLEAN
34def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN 33def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN
35def_boolean, T_DEFAULT, TF_COMMAND, S_BOOLEAN
36int, T_TYPE, TF_COMMAND, S_INT 34int, T_TYPE, TF_COMMAND, S_INT
37hex, T_TYPE, TF_COMMAND, S_HEX 35hex, T_TYPE, TF_COMMAND, S_HEX
38string, T_TYPE, TF_COMMAND, S_STRING 36string, T_TYPE, TF_COMMAND, S_STRING
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped
index 47c8b5babf34..ab28b18153a7 100644
--- a/scripts/kconfig/zconf.hash.c_shipped
+++ b/scripts/kconfig/zconf.hash.c_shipped
@@ -1,4 +1,4 @@
1/* ANSI-C code produced by gperf version 3.0.1 */ 1/* ANSI-C code produced by gperf version 3.0.2 */
2/* Command-line: gperf */ 2/* Command-line: gperf */
3/* Computed positions: -k'1,3' */ 3/* Computed positions: -k'1,3' */
4 4
@@ -30,7 +30,7 @@
30#endif 30#endif
31 31
32struct kconf_id; 32struct kconf_id;
33/* maximum key range = 45, duplicates = 0 */ 33/* maximum key range = 47, duplicates = 0 */
34 34
35#ifdef __GNUC__ 35#ifdef __GNUC__
36__inline 36__inline
@@ -44,32 +44,32 @@ kconf_id_hash (register const char *str, register unsigned int len)
44{ 44{
45 static unsigned char asso_values[] = 45 static unsigned char asso_values[] =
46 { 46 {
47 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
48 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 49 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
50 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 50 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
51 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 51 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
52 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 52 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
53 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 53 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
54 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 54 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
55 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 55 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
56 47, 47, 47, 47, 47, 47, 47, 25, 30, 15, 56 49, 49, 49, 49, 49, 49, 49, 18, 11, 5,
57 0, 15, 0, 47, 5, 15, 47, 47, 30, 20, 57 0, 0, 5, 49, 5, 20, 49, 49, 5, 20,
58 5, 0, 25, 15, 0, 0, 10, 35, 47, 47, 58 5, 0, 30, 49, 0, 15, 0, 10, 49, 49,
59 5, 47, 47, 47, 47, 47, 47, 47, 47, 47, 59 25, 49, 49, 49, 49, 49, 49, 49, 49, 49,
60 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 60 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
61 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 61 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
62 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 62 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
63 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 63 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
64 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 64 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
65 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 65 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
66 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 66 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
67 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 67 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
68 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 68 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
69 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 69 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
70 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 70 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
71 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 71 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
72 47, 47, 47, 47, 47, 47 72 49, 49, 49, 49, 49, 49
73 }; 73 };
74 register int hval = len; 74 register int hval = len;
75 75
@@ -89,74 +89,70 @@ kconf_id_hash (register const char *str, register unsigned int len)
89struct kconf_id_strings_t 89struct kconf_id_strings_t
90 { 90 {
91 char kconf_id_strings_str2[sizeof("on")]; 91 char kconf_id_strings_str2[sizeof("on")];
92 char kconf_id_strings_str6[sizeof("string")]; 92 char kconf_id_strings_str5[sizeof("endif")];
93 char kconf_id_strings_str7[sizeof("default")]; 93 char kconf_id_strings_str6[sizeof("option")];
94 char kconf_id_strings_str8[sizeof("def_bool")]; 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 char kconf_id_strings_str10[sizeof("range")]; 97 char kconf_id_strings_str10[sizeof("range")];
96 char kconf_id_strings_str11[sizeof("def_boolean")]; 98 char kconf_id_strings_str11[sizeof("choice")];
97 char kconf_id_strings_str12[sizeof("def_tristate")]; 99 char kconf_id_strings_str12[sizeof("default")];
98 char kconf_id_strings_str13[sizeof("hex")]; 100 char kconf_id_strings_str13[sizeof("def_bool")];
99 char kconf_id_strings_str14[sizeof("defconfig_list")]; 101 char kconf_id_strings_str14[sizeof("help")];
100 char kconf_id_strings_str16[sizeof("option")]; 102 char kconf_id_strings_str15[sizeof("bool")];
101 char kconf_id_strings_str17[sizeof("if")]; 103 char kconf_id_strings_str16[sizeof("config")];
102 char kconf_id_strings_str18[sizeof("optional")]; 104 char kconf_id_strings_str17[sizeof("def_tristate")];
103 char kconf_id_strings_str20[sizeof("endif")]; 105 char kconf_id_strings_str18[sizeof("boolean")];
104 char kconf_id_strings_str21[sizeof("choice")]; 106 char kconf_id_strings_str19[sizeof("defconfig_list")];
105 char kconf_id_strings_str22[sizeof("endmenu")]; 107 char kconf_id_strings_str21[sizeof("string")];
106 char kconf_id_strings_str23[sizeof("requires")]; 108 char kconf_id_strings_str22[sizeof("if")];
107 char kconf_id_strings_str24[sizeof("endchoice")]; 109 char kconf_id_strings_str23[sizeof("int")];
108 char kconf_id_strings_str26[sizeof("config")]; 110 char kconf_id_strings_str24[sizeof("enable")];
111 char kconf_id_strings_str26[sizeof("select")];
109 char kconf_id_strings_str27[sizeof("modules")]; 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 char kconf_id_strings_str29[sizeof("menu")]; 114 char kconf_id_strings_str29[sizeof("menu")];
112 char kconf_id_strings_str31[sizeof("prompt")]; 115 char kconf_id_strings_str31[sizeof("source")];
113 char kconf_id_strings_str32[sizeof("depends")]; 116 char kconf_id_strings_str32[sizeof("comment")];
114 char kconf_id_strings_str33[sizeof("tristate")]; 117 char kconf_id_strings_str33[sizeof("hex")];
115 char kconf_id_strings_str34[sizeof("bool")];
116 char kconf_id_strings_str35[sizeof("menuconfig")]; 118 char kconf_id_strings_str35[sizeof("menuconfig")];
117 char kconf_id_strings_str36[sizeof("select")]; 119 char kconf_id_strings_str36[sizeof("prompt")];
118 char kconf_id_strings_str37[sizeof("boolean")]; 120 char kconf_id_strings_str37[sizeof("depends")];
119 char kconf_id_strings_str39[sizeof("help")]; 121 char kconf_id_strings_str48[sizeof("mainmenu")];
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")];
124 }; 122 };
125static struct kconf_id_strings_t kconf_id_strings_contents = 123static struct kconf_id_strings_t kconf_id_strings_contents =
126 { 124 {
127 "on", 125 "on",
128 "string", 126 "endif",
127 "option",
128 "endmenu",
129 "optional",
130 "endchoice",
131 "range",
132 "choice",
129 "default", 133 "default",
130 "def_bool", 134 "def_bool",
131 "range", 135 "help",
132 "def_boolean", 136 "bool",
137 "config",
133 "def_tristate", 138 "def_tristate",
134 "hex", 139 "boolean",
135 "defconfig_list", 140 "defconfig_list",
136 "option", 141 "string",
137 "if", 142 "if",
138 "optional",
139 "endif",
140 "choice",
141 "endmenu",
142 "requires",
143 "endchoice",
144 "config",
145 "modules",
146 "int", 143 "int",
147 "menu", 144 "enable",
148 "prompt",
149 "depends",
150 "tristate",
151 "bool",
152 "menuconfig",
153 "select", 145 "select",
154 "boolean", 146 "modules",
155 "help", 147 "tristate",
148 "menu",
156 "source", 149 "source",
157 "comment", 150 "comment",
158 "mainmenu", 151 "hex",
159 "enable" 152 "menuconfig",
153 "prompt",
154 "depends",
155 "mainmenu"
160 }; 156 };
161#define kconf_id_strings ((const char *) &kconf_id_strings_contents) 157#define kconf_id_strings ((const char *) &kconf_id_strings_contents)
162#ifdef __GNUC__ 158#ifdef __GNUC__
@@ -167,58 +163,54 @@ kconf_id_lookup (register const char *str, register unsigned int len)
167{ 163{
168 enum 164 enum
169 { 165 {
170 TOTAL_KEYWORDS = 33, 166 TOTAL_KEYWORDS = 31,
171 MIN_WORD_LENGTH = 2, 167 MIN_WORD_LENGTH = 2,
172 MAX_WORD_LENGTH = 14, 168 MAX_WORD_LENGTH = 14,
173 MIN_HASH_VALUE = 2, 169 MIN_HASH_VALUE = 2,
174 MAX_HASH_VALUE = 46 170 MAX_HASH_VALUE = 48
175 }; 171 };
176 172
177 static struct kconf_id wordlist[] = 173 static struct kconf_id wordlist[] =
178 { 174 {
179 {-1}, {-1}, 175 {-1}, {-1},
180 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM}, 176 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM},
181 {-1}, {-1}, {-1}, 177 {-1}, {-1},
182 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_TYPE, TF_COMMAND, S_STRING}, 178 {(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_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, 179 {(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_str8, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, 180 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND},
185 {-1}, 181 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_OPTIONAL, TF_COMMAND},
182 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND},
186 {(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_str10, T_RANGE, TF_COMMAND},
187 {(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_str11, T_CHOICE, TF_COMMAND},
188 {(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_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
189 {(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_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
190 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION}, 187 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND},
191 {-1}, 188 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str15, T_TYPE, TF_COMMAND, S_BOOLEAN},
192 {(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_str16, T_CONFIG, TF_COMMAND},
193 {(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_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
194 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND}, 191 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_BOOLEAN},
192 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION},
195 {-1}, 193 {-1},
196 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_ENDIF, TF_COMMAND}, 194 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_TYPE, TF_COMMAND, S_STRING},
197 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CHOICE, TF_COMMAND}, 195 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM},
198 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND}, 196 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT},
199 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_REQUIRES, TF_COMMAND}, 197 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str24, T_SELECT, TF_COMMAND},
200 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str24, T_ENDCHOICE, TF_COMMAND},
201 {-1}, 198 {-1},
202 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_CONFIG, TF_COMMAND}, 199 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SELECT, TF_COMMAND},
203 {(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_str27, T_OPT_MODULES, TF_OPTION},
204 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_INT}, 201 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE},
205 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, 202 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
206 {-1}, 203 {-1},
207 {(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_str31, T_SOURCE, TF_COMMAND},
208 {(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_str32, T_COMMENT, TF_COMMAND},
209 {(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_str33, T_TYPE, TF_COMMAND, S_HEX},
210 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34, T_TYPE, TF_COMMAND, S_BOOLEAN},
211 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
212 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_SELECT, TF_COMMAND},
213 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN},
214 {-1}, 207 {-1},
215 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_HELP, TF_COMMAND}, 208 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
209 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_PROMPT, TF_COMMAND},
210 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_DEPENDS, TF_COMMAND},
211 {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
216 {-1}, 212 {-1},
217 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND}, 213 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND}
218 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_COMMENT, TF_COMMAND},
219 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_MAINMENU, TF_COMMAND},
220 {-1}, {-1},
221 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND}
222 }; 214 };
223 215
224 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) 216 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index ec21db77f78b..d22d92496f25 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,7 +1,9 @@
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, 3/* Skeleton implementation for Bison's Yacc-like parsers in C
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
5 7
6 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
@@ -18,13 +20,21 @@
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */ 21 Boston, MA 02110-1301, USA. */
20 22
21/* As a special exception, when this file is copied by Bison into a 23/* As a special exception, you may create a larger work that contains
22 Bison output file, you may use that output file without restriction. 24 part or all of the Bison parser skeleton and distribute that work
23 This special exception was added by the Free Software Foundation 25 under terms of your choice, so long as that work isn't itself a
24 in version 1.24 of Bison. */ 26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
32
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
25 35
26/* Written by Richard Stallman by simplifying the original so called 36/* C LALR(1) parser skeleton written by Richard Stallman, by
27 ``semantic'' parser. */ 37 simplifying the original so-called "semantic" parser. */
28 38
29/* All symbols defined below should begin with yy or YY, to avoid 39/* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local 40 infringing on user name space. This should be done even for local
@@ -37,7 +47,7 @@
37#define YYBISON 1 47#define YYBISON 1
38 48
39/* Bison version. */ 49/* Bison version. */
40#define YYBISON_VERSION "2.1" 50#define YYBISON_VERSION "2.3"
41 51
42/* Skeleton name. */ 52/* Skeleton name. */
43#define YYSKELETON_NAME "yacc.c" 53#define YYSKELETON_NAME "yacc.c"
@@ -78,25 +88,24 @@
78 T_IF = 269, 88 T_IF = 269,
79 T_ENDIF = 270, 89 T_ENDIF = 270,
80 T_DEPENDS = 271, 90 T_DEPENDS = 271,
81 T_REQUIRES = 272, 91 T_OPTIONAL = 272,
82 T_OPTIONAL = 273, 92 T_PROMPT = 273,
83 T_PROMPT = 274, 93 T_TYPE = 274,
84 T_TYPE = 275, 94 T_DEFAULT = 275,
85 T_DEFAULT = 276, 95 T_SELECT = 276,
86 T_SELECT = 277, 96 T_RANGE = 277,
87 T_RANGE = 278, 97 T_OPTION = 278,
88 T_OPTION = 279, 98 T_ON = 279,
89 T_ON = 280, 99 T_WORD = 280,
90 T_WORD = 281, 100 T_WORD_QUOTE = 281,
91 T_WORD_QUOTE = 282, 101 T_UNEQUAL = 282,
92 T_UNEQUAL = 283, 102 T_CLOSE_PAREN = 283,
93 T_CLOSE_PAREN = 284, 103 T_OPEN_PAREN = 284,
94 T_OPEN_PAREN = 285, 104 T_EOL = 285,
95 T_EOL = 286, 105 T_OR = 286,
96 T_OR = 287, 106 T_AND = 287,
97 T_AND = 288, 107 T_EQUAL = 288,
98 T_EQUAL = 289, 108 T_NOT = 289
99 T_NOT = 290
100 }; 109 };
101#endif 110#endif
102/* Tokens. */ 111/* Tokens. */
@@ -114,25 +123,24 @@
114#define T_IF 269 123#define T_IF 269
115#define T_ENDIF 270 124#define T_ENDIF 270
116#define T_DEPENDS 271 125#define T_DEPENDS 271
117#define T_REQUIRES 272 126#define T_OPTIONAL 272
118#define T_OPTIONAL 273 127#define T_PROMPT 273
119#define T_PROMPT 274 128#define T_TYPE 274
120#define T_TYPE 275 129#define T_DEFAULT 275
121#define T_DEFAULT 276 130#define T_SELECT 276
122#define T_SELECT 277 131#define T_RANGE 277
123#define T_RANGE 278 132#define T_OPTION 278
124#define T_OPTION 279 133#define T_ON 279
125#define T_ON 280 134#define T_WORD 280
126#define T_WORD 281 135#define T_WORD_QUOTE 281
127#define T_WORD_QUOTE 282 136#define T_UNEQUAL 282
128#define T_UNEQUAL 283 137#define T_CLOSE_PAREN 283
129#define T_CLOSE_PAREN 284 138#define T_OPEN_PAREN 284
130#define T_OPEN_PAREN 285 139#define T_EOL 285
131#define T_EOL 286 140#define T_OR 286
132#define T_OR 287 141#define T_AND 287
133#define T_AND 288 142#define T_EQUAL 288
134#define T_EQUAL 289 143#define T_NOT 289
135#define T_NOT 290
136 144
137 145
138 146
@@ -198,18 +206,20 @@ static struct menu *current_menu, *current_entry;
198# define YYTOKEN_TABLE 0 206# define YYTOKEN_TABLE 0
199#endif 207#endif
200 208
201#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 209#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
210typedef union YYSTYPE
202 211
203typedef union YYSTYPE { 212{
204 char *string; 213 char *string;
205 struct file *file; 214 struct file *file;
206 struct symbol *symbol; 215 struct symbol *symbol;
207 struct expr *expr; 216 struct expr *expr;
208 struct menu *menu; 217 struct menu *menu;
209 struct kconf_id *id; 218 struct kconf_id *id;
210} YYSTYPE; 219}
211/* Line 196 of yacc.c. */ 220/* Line 187 of yacc.c. */
212 221
222 YYSTYPE;
213# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 223# define yystype YYSTYPE /* obsolescent; will be withdrawn */
214# define YYSTYPE_IS_DECLARED 1 224# define YYSTYPE_IS_DECLARED 1
215# define YYSTYPE_IS_TRIVIAL 1 225# define YYSTYPE_IS_TRIVIAL 1
@@ -220,23 +230,56 @@ typedef union YYSTYPE {
220/* Copy the second part of user declarations. */ 230/* Copy the second part of user declarations. */
221 231
222 232
223/* Line 219 of yacc.c. */ 233/* Line 216 of yacc.c. */
234
235
236#ifdef short
237# undef short
238#endif
224 239
240#ifdef YYTYPE_UINT8
241typedef YYTYPE_UINT8 yytype_uint8;
242#else
243typedef unsigned char yytype_uint8;
244#endif
225 245
226#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) 246#ifdef YYTYPE_INT8
227# define YYSIZE_T __SIZE_TYPE__ 247typedef YYTYPE_INT8 yytype_int8;
248#elif (defined __STDC__ || defined __C99__FUNC__ \
249 || defined __cplusplus || defined _MSC_VER)
250typedef signed char yytype_int8;
251#else
252typedef short int yytype_int8;
228#endif 253#endif
229#if ! defined (YYSIZE_T) && defined (size_t) 254
230# define YYSIZE_T size_t 255#ifdef YYTYPE_UINT16
256typedef YYTYPE_UINT16 yytype_uint16;
257#else
258typedef unsigned short int yytype_uint16;
231#endif 259#endif
232#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) 260
233# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 261#ifdef YYTYPE_INT16
234# define YYSIZE_T size_t 262typedef YYTYPE_INT16 yytype_int16;
263#else
264typedef short int yytype_int16;
235#endif 265#endif
236#if ! defined (YYSIZE_T) 266
237# define YYSIZE_T unsigned int 267#ifndef YYSIZE_T
268# ifdef __SIZE_TYPE__
269# define YYSIZE_T __SIZE_TYPE__
270# elif defined size_t
271# define YYSIZE_T size_t
272# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
273 || defined __cplusplus || defined _MSC_VER)
274# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
275# define YYSIZE_T size_t
276# else
277# define YYSIZE_T unsigned int
278# endif
238#endif 279#endif
239 280
281#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
282
240#ifndef YY_ 283#ifndef YY_
241# if YYENABLE_NLS 284# if YYENABLE_NLS
242# if ENABLE_NLS 285# if ENABLE_NLS
@@ -249,7 +292,32 @@ typedef union YYSTYPE {
249# endif 292# endif
250#endif 293#endif
251 294
252#if ! defined (yyoverflow) || YYERROR_VERBOSE 295/* Suppress unused-variable warnings by "using" E. */
296#if ! defined lint || defined __GNUC__
297# define YYUSE(e) ((void) (e))
298#else
299# define YYUSE(e) /* empty */
300#endif
301
302/* Identity function, used to suppress warnings about constant conditions. */
303#ifndef lint
304# define YYID(n) (n)
305#else
306#if (defined __STDC__ || defined __C99__FUNC__ \
307 || defined __cplusplus || defined _MSC_VER)
308static int
309YYID (int i)
310#else
311static int
312YYID (i)
313 int i;
314#endif
315{
316 return i;
317}
318#endif
319
320#if ! defined yyoverflow || YYERROR_VERBOSE
253 321
254/* The parser invokes alloca or malloc; define the necessary symbols. */ 322/* The parser invokes alloca or malloc; define the necessary symbols. */
255 323
@@ -257,64 +325,76 @@ typedef union YYSTYPE {
257# if YYSTACK_USE_ALLOCA 325# if YYSTACK_USE_ALLOCA
258# ifdef __GNUC__ 326# ifdef __GNUC__
259# define YYSTACK_ALLOC __builtin_alloca 327# define YYSTACK_ALLOC __builtin_alloca
328# elif defined __BUILTIN_VA_ARG_INCR
329# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
330# elif defined _AIX
331# define YYSTACK_ALLOC __alloca
332# elif defined _MSC_VER
333# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
334# define alloca _alloca
260# else 335# else
261# define YYSTACK_ALLOC alloca 336# define YYSTACK_ALLOC alloca
262# if defined (__STDC__) || defined (__cplusplus) 337# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
338 || defined __cplusplus || defined _MSC_VER)
263# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 339# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
264# define YYINCLUDED_STDLIB_H 340# ifndef _STDLIB_H
341# define _STDLIB_H 1
342# endif
265# endif 343# endif
266# endif 344# endif
267# endif 345# endif
268# endif 346# endif
269 347
270# ifdef YYSTACK_ALLOC 348# ifdef YYSTACK_ALLOC
271 /* Pacify GCC's `empty if-body' warning. */ 349 /* Pacify GCC's `empty if-body' warning. */
272# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 350# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
273# ifndef YYSTACK_ALLOC_MAXIMUM 351# ifndef YYSTACK_ALLOC_MAXIMUM
274 /* The OS might guarantee only one guard page at the bottom of the stack, 352 /* The OS might guarantee only one guard page at the bottom of the stack,
275 and a page size can be as small as 4096 bytes. So we cannot safely 353 and a page size can be as small as 4096 bytes. So we cannot safely
276 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 354 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
277 to allow for a few compiler-allocated temporary stack slots. */ 355 to allow for a few compiler-allocated temporary stack slots. */
278# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ 356# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
279# endif 357# endif
280# else 358# else
281# define YYSTACK_ALLOC YYMALLOC 359# define YYSTACK_ALLOC YYMALLOC
282# define YYSTACK_FREE YYFREE 360# define YYSTACK_FREE YYFREE
283# ifndef YYSTACK_ALLOC_MAXIMUM 361# ifndef YYSTACK_ALLOC_MAXIMUM
284# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) 362# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
285# endif 363# endif
286# ifdef __cplusplus 364# if (defined __cplusplus && ! defined _STDLIB_H \
287extern "C" { 365 && ! ((defined YYMALLOC || defined malloc) \
366 && (defined YYFREE || defined free)))
367# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
368# ifndef _STDLIB_H
369# define _STDLIB_H 1
370# endif
288# endif 371# endif
289# ifndef YYMALLOC 372# ifndef YYMALLOC
290# define YYMALLOC malloc 373# define YYMALLOC malloc
291# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ 374# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
292 && (defined (__STDC__) || defined (__cplusplus))) 375 || defined __cplusplus || defined _MSC_VER)
293void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 376void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
294# endif 377# endif
295# endif 378# endif
296# ifndef YYFREE 379# ifndef YYFREE
297# define YYFREE free 380# define YYFREE free
298# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ 381# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
299 && (defined (__STDC__) || defined (__cplusplus))) 382 || defined __cplusplus || defined _MSC_VER)
300void free (void *); /* INFRINGES ON USER NAME SPACE */ 383void free (void *); /* INFRINGES ON USER NAME SPACE */
301# endif 384# endif
302# endif 385# endif
303# ifdef __cplusplus
304}
305# endif
306# endif 386# endif
307#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ 387#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
308 388
309 389
310#if (! defined (yyoverflow) \ 390#if (! defined yyoverflow \
311 && (! defined (__cplusplus) \ 391 && (! defined __cplusplus \
312 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) 392 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
313 393
314/* A type that is properly aligned for any stack member. */ 394/* A type that is properly aligned for any stack member. */
315union yyalloc 395union yyalloc
316{ 396{
317 short int yyss; 397 yytype_int16 yyss;
318 YYSTYPE yyvs; 398 YYSTYPE yyvs;
319 }; 399 };
320 400
@@ -324,13 +404,13 @@ union yyalloc
324/* The size of an array large to enough to hold all stacks, each with 404/* The size of an array large to enough to hold all stacks, each with
325 N elements. */ 405 N elements. */
326# define YYSTACK_BYTES(N) \ 406# define YYSTACK_BYTES(N) \
327 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ 407 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
328 + YYSTACK_GAP_MAXIMUM) 408 + YYSTACK_GAP_MAXIMUM)
329 409
330/* Copy COUNT objects from FROM to TO. The source and destination do 410/* Copy COUNT objects from FROM to TO. The source and destination do
331 not overlap. */ 411 not overlap. */
332# ifndef YYCOPY 412# ifndef YYCOPY
333# if defined (__GNUC__) && 1 < __GNUC__ 413# if defined __GNUC__ && 1 < __GNUC__
334# define YYCOPY(To, From, Count) \ 414# define YYCOPY(To, From, Count) \
335 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 415 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
336# else 416# else
@@ -341,7 +421,7 @@ union yyalloc
341 for (yyi = 0; yyi < (Count); yyi++) \ 421 for (yyi = 0; yyi < (Count); yyi++) \
342 (To)[yyi] = (From)[yyi]; \ 422 (To)[yyi] = (From)[yyi]; \
343 } \ 423 } \
344 while (0) 424 while (YYID (0))
345# endif 425# endif
346# endif 426# endif
347 427
@@ -359,39 +439,33 @@ union yyalloc
359 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 439 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
360 yyptr += yynewbytes / sizeof (*yyptr); \ 440 yyptr += yynewbytes / sizeof (*yyptr); \
361 } \ 441 } \
362 while (0) 442 while (YYID (0))
363 443
364#endif 444#endif
365 445
366#if defined (__STDC__) || defined (__cplusplus) 446/* YYFINAL -- State number of the termination state. */
367 typedef signed char yysigned_char;
368#else
369 typedef short int yysigned_char;
370#endif
371
372/* YYFINAL -- State number of the termination state. */
373#define YYFINAL 3 447#define YYFINAL 3
374/* YYLAST -- Last index in YYTABLE. */ 448/* YYLAST -- Last index in YYTABLE. */
375#define YYLAST 275 449#define YYLAST 258
376 450
377/* YYNTOKENS -- Number of terminals. */ 451/* YYNTOKENS -- Number of terminals. */
378#define YYNTOKENS 36 452#define YYNTOKENS 35
379/* YYNNTS -- Number of nonterminals. */ 453/* YYNNTS -- Number of nonterminals. */
380#define YYNNTS 45 454#define YYNNTS 45
381/* YYNRULES -- Number of rules. */ 455/* YYNRULES -- Number of rules. */
382#define YYNRULES 110 456#define YYNRULES 108
383/* YYNRULES -- Number of states. */ 457/* YYNRULES -- Number of states. */
384#define YYNSTATES 183 458#define YYNSTATES 178
385 459
386/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 460/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
387#define YYUNDEFTOK 2 461#define YYUNDEFTOK 2
388#define YYMAXUTOK 290 462#define YYMAXUTOK 289
389 463
390#define YYTRANSLATE(YYX) \ 464#define YYTRANSLATE(YYX) \
391 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 465 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
392 466
393/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 467/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
394static const unsigned char yytranslate[] = 468static const yytype_uint8 yytranslate[] =
395{ 469{
396 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 470 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
397 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -421,14 +495,13 @@ static const unsigned char yytranslate[] =
421 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 495 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
422 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 496 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
423 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 497 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
424 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 498 25, 26, 27, 28, 29, 30, 31, 32, 33, 34
425 35
426}; 499};
427 500
428#if YYDEBUG 501#if YYDEBUG
429/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 502/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
430 YYRHS. */ 503 YYRHS. */
431static const unsigned short int yyprhs[] = 504static const yytype_uint16 yyprhs[] =
432{ 505{
433 0, 0, 3, 5, 6, 9, 12, 15, 20, 23, 506 0, 0, 3, 5, 6, 9, 12, 15, 20, 23,
434 28, 33, 37, 39, 41, 43, 45, 47, 49, 51, 507 28, 33, 37, 39, 41, 43, 45, 47, 49, 51,
@@ -439,80 +512,77 @@ static const unsigned short int yyprhs[] =
439 178, 181, 186, 187, 190, 194, 196, 200, 201, 204, 512 178, 181, 186, 187, 190, 194, 196, 200, 201, 204,
440 207, 210, 214, 217, 219, 223, 224, 227, 230, 233, 513 207, 210, 214, 217, 219, 223, 224, 227, 230, 233,
441 237, 241, 244, 247, 250, 251, 254, 257, 260, 265, 514 237, 241, 244, 247, 250, 251, 254, 257, 260, 265,
442 269, 273, 274, 277, 279, 281, 284, 287, 290, 292, 515 266, 269, 271, 273, 276, 279, 282, 284, 287, 288,
443 295, 296, 299, 301, 305, 309, 313, 316, 320, 324, 516 291, 293, 297, 301, 305, 308, 312, 316, 318
444 326
445}; 517};
446 518
447/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 519/* YYRHS -- A `-1'-separated list of the rules' RHS. */
448static const yysigned_char yyrhs[] = 520static const yytype_int8 yyrhs[] =
449{ 521{
450 37, 0, -1, 38, -1, -1, 38, 40, -1, 38, 522 36, 0, -1, 37, -1, -1, 37, 39, -1, 37,
451 54, -1, 38, 65, -1, 38, 3, 75, 77, -1, 523 53, -1, 37, 64, -1, 37, 3, 74, 76, -1,
452 38, 76, -1, 38, 26, 1, 31, -1, 38, 39, 524 37, 75, -1, 37, 25, 1, 30, -1, 37, 38,
453 1, 31, -1, 38, 1, 31, -1, 16, -1, 19, 525 1, 30, -1, 37, 1, 30, -1, 16, -1, 18,
454 -1, 20, -1, 22, -1, 18, -1, 23, -1, 21, 526 -1, 19, -1, 21, -1, 17, -1, 22, -1, 20,
455 -1, 31, -1, 60, -1, 69, -1, 43, -1, 45, 527 -1, 30, -1, 59, -1, 68, -1, 42, -1, 44,
456 -1, 67, -1, 26, 1, 31, -1, 1, 31, -1, 528 -1, 66, -1, 25, 1, 30, -1, 1, 30, -1,
457 10, 26, 31, -1, 42, 46, -1, 11, 26, 31, 529 10, 25, 30, -1, 41, 45, -1, 11, 25, 30,
458 -1, 44, 46, -1, -1, 46, 47, -1, 46, 48, 530 -1, 43, 45, -1, -1, 45, 46, -1, 45, 47,
459 -1, 46, 73, -1, 46, 71, -1, 46, 41, -1, 531 -1, 45, 72, -1, 45, 70, -1, 45, 40, -1,
460 46, 31, -1, 20, 74, 31, -1, 19, 75, 78, 532 45, 30, -1, 19, 73, 30, -1, 18, 74, 77,
461 31, -1, 21, 79, 78, 31, -1, 22, 26, 78, 533 30, -1, 20, 78, 77, 30, -1, 21, 25, 77,
462 31, -1, 23, 80, 80, 78, 31, -1, 24, 49, 534 30, -1, 22, 79, 79, 77, 30, -1, 23, 48,
463 31, -1, -1, 49, 26, 50, -1, -1, 34, 75, 535 30, -1, -1, 48, 25, 49, -1, -1, 33, 74,
464 -1, 7, 31, -1, 51, 55, -1, 76, -1, 52, 536 -1, 7, 30, -1, 50, 54, -1, 75, -1, 51,
465 57, 53, -1, -1, 55, 56, -1, 55, 73, -1, 537 56, 52, -1, -1, 54, 55, -1, 54, 72, -1,
466 55, 71, -1, 55, 31, -1, 55, 41, -1, 19, 538 54, 70, -1, 54, 30, -1, 54, 40, -1, 18,
467 75, 78, 31, -1, 20, 74, 31, -1, 18, 31, 539 74, 77, 30, -1, 19, 73, 30, -1, 17, 30,
468 -1, 21, 26, 78, 31, -1, -1, 57, 40, -1, 540 -1, 20, 25, 77, 30, -1, -1, 56, 39, -1,
469 14, 79, 77, -1, 76, -1, 58, 61, 59, -1, 541 14, 78, 76, -1, 75, -1, 57, 60, 58, -1,
470 -1, 61, 40, -1, 61, 65, -1, 61, 54, -1, 542 -1, 60, 39, -1, 60, 64, -1, 60, 53, -1,
471 4, 75, 31, -1, 62, 72, -1, 76, -1, 63, 543 4, 74, 30, -1, 61, 71, -1, 75, -1, 62,
472 66, 64, -1, -1, 66, 40, -1, 66, 65, -1, 544 65, 63, -1, -1, 65, 39, -1, 65, 64, -1,
473 66, 54, -1, 6, 75, 31, -1, 9, 75, 31, 545 65, 53, -1, 6, 74, 30, -1, 9, 74, 30,
474 -1, 68, 72, -1, 12, 31, -1, 70, 13, -1, 546 -1, 67, 71, -1, 12, 30, -1, 69, 13, -1,
475 -1, 72, 73, -1, 72, 31, -1, 72, 41, -1, 547 -1, 71, 72, -1, 71, 30, -1, 71, 40, -1,
476 16, 25, 79, 31, -1, 16, 79, 31, -1, 17, 548 16, 24, 78, 30, -1, -1, 74, 77, -1, 25,
477 79, 31, -1, -1, 75, 78, -1, 26, -1, 27, 549 -1, 26, -1, 5, 30, -1, 8, 30, -1, 15,
478 -1, 5, 31, -1, 8, 31, -1, 15, 31, -1, 550 30, -1, 30, -1, 76, 30, -1, -1, 14, 78,
479 31, -1, 77, 31, -1, -1, 14, 79, -1, 80, 551 -1, 79, -1, 79, 33, 79, -1, 79, 27, 79,
480 -1, 80, 34, 80, -1, 80, 28, 80, -1, 30, 552 -1, 29, 78, 28, -1, 34, 78, -1, 78, 31,
481 79, 29, -1, 35, 79, -1, 79, 32, 79, -1, 553 78, -1, 78, 32, 78, -1, 25, -1, 26, -1
482 79, 33, 79, -1, 26, -1, 27, -1
483}; 554};
484 555
485/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 556/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
486static const unsigned short int yyrline[] = 557static const yytype_uint16 yyrline[] =
487{ 558{
488 0, 105, 105, 107, 109, 110, 111, 112, 113, 114, 559 0, 104, 104, 106, 108, 109, 110, 111, 112, 113,
489 115, 119, 123, 123, 123, 123, 123, 123, 123, 127, 560 114, 118, 122, 122, 122, 122, 122, 122, 122, 126,
490 128, 129, 130, 131, 132, 136, 137, 143, 151, 157, 561 127, 128, 129, 130, 131, 135, 136, 142, 150, 156,
491 165, 175, 177, 178, 179, 180, 181, 182, 185, 193, 562 164, 174, 176, 177, 178, 179, 180, 181, 184, 192,
492 199, 209, 215, 221, 224, 226, 237, 238, 243, 252, 563 198, 208, 214, 220, 223, 225, 236, 237, 242, 251,
493 257, 265, 268, 270, 271, 272, 273, 274, 277, 283, 564 256, 264, 267, 269, 270, 271, 272, 273, 276, 282,
494 294, 300, 310, 312, 317, 325, 333, 336, 338, 339, 565 293, 299, 309, 311, 316, 324, 332, 335, 337, 338,
495 340, 345, 352, 357, 365, 368, 370, 371, 372, 375, 566 339, 344, 351, 356, 364, 367, 369, 370, 371, 374,
496 383, 390, 397, 403, 410, 412, 413, 414, 417, 422, 567 382, 389, 396, 402, 409, 411, 412, 413, 416, 424,
497 427, 435, 437, 442, 443, 446, 447, 448, 452, 453, 568 426, 431, 432, 435, 436, 437, 441, 442, 445, 446,
498 456, 457, 460, 461, 462, 463, 464, 465, 466, 469, 569 449, 450, 451, 452, 453, 454, 455, 458, 459
499 470
500}; 570};
501#endif 571#endif
502 572
503#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 573#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
504/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 574/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
505 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 575 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
506static const char *const yytname[] = 576static const char *const yytname[] =
507{ 577{
508 "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", 578 "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU",
509 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 579 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
510 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", 580 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
511 "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", 581 "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE",
512 "T_SELECT", "T_RANGE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", 582 "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
513 "T_UNEQUAL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", 583 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL",
514 "T_EQUAL", "T_NOT", "$accept", "input", "stmt_list", "option_name", 584 "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt",
515 "common_stmt", "option_error", "config_entry_start", "config_stmt", 585 "option_error", "config_entry_start", "config_stmt",
516 "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", 586 "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
517 "config_option", "symbol_option", "symbol_option_list", 587 "config_option", "symbol_option", "symbol_option_list",
518 "symbol_option_arg", "choice", "choice_entry", "choice_end", 588 "symbol_option_arg", "choice", "choice_entry", "choice_end",
@@ -527,34 +597,33 @@ static const char *const yytname[] =
527# ifdef YYPRINT 597# ifdef YYPRINT
528/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 598/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
529 token YYLEX-NUM. */ 599 token YYLEX-NUM. */
530static const unsigned short int yytoknum[] = 600static const yytype_uint16 yytoknum[] =
531{ 601{
532 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 602 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
533 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 603 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
534 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 604 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
535 285, 286, 287, 288, 289, 290 605 285, 286, 287, 288, 289
536}; 606};
537# endif 607# endif
538 608
539/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 609/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
540static const unsigned char yyr1[] = 610static const yytype_uint8 yyr1[] =
541{ 611{
542 0, 36, 37, 38, 38, 38, 38, 38, 38, 38, 612 0, 35, 36, 37, 37, 37, 37, 37, 37, 37,
543 38, 38, 39, 39, 39, 39, 39, 39, 39, 40, 613 37, 37, 38, 38, 38, 38, 38, 38, 38, 39,
544 40, 40, 40, 40, 40, 41, 41, 42, 43, 44, 614 39, 39, 39, 39, 39, 40, 40, 41, 42, 43,
545 45, 46, 46, 46, 46, 46, 46, 46, 47, 47, 615 44, 45, 45, 45, 45, 45, 45, 45, 46, 46,
546 47, 47, 47, 48, 49, 49, 50, 50, 51, 52, 616 46, 46, 46, 47, 48, 48, 49, 49, 50, 51,
547 53, 54, 55, 55, 55, 55, 55, 55, 56, 56, 617 52, 53, 54, 54, 54, 54, 54, 54, 55, 55,
548 56, 56, 57, 57, 58, 59, 60, 61, 61, 61, 618 55, 55, 56, 56, 57, 58, 59, 60, 60, 60,
549 61, 62, 63, 64, 65, 66, 66, 66, 66, 67, 619 60, 61, 62, 63, 64, 65, 65, 65, 65, 66,
550 68, 69, 70, 71, 72, 72, 72, 72, 73, 73, 620 67, 68, 69, 70, 71, 71, 71, 71, 72, 73,
551 73, 74, 74, 75, 75, 76, 76, 76, 77, 77, 621 73, 74, 74, 75, 75, 75, 76, 76, 77, 77,
552 78, 78, 79, 79, 79, 79, 79, 79, 79, 80, 622 78, 78, 78, 78, 78, 78, 78, 79, 79
553 80
554}; 623};
555 624
556/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 625/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
557static const unsigned char yyr2[] = 626static const yytype_uint8 yyr2[] =
558{ 627{
559 0, 2, 1, 0, 2, 2, 2, 4, 2, 4, 628 0, 2, 1, 0, 2, 2, 2, 4, 2, 4,
560 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 629 4, 3, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -564,82 +633,79 @@ static const unsigned char yyr2[] =
564 1, 3, 0, 2, 2, 2, 2, 2, 4, 3, 633 1, 3, 0, 2, 2, 2, 2, 2, 4, 3,
565 2, 4, 0, 2, 3, 1, 3, 0, 2, 2, 634 2, 4, 0, 2, 3, 1, 3, 0, 2, 2,
566 2, 3, 2, 1, 3, 0, 2, 2, 2, 3, 635 2, 3, 2, 1, 3, 0, 2, 2, 2, 3,
567 3, 2, 2, 2, 0, 2, 2, 2, 4, 3, 636 3, 2, 2, 2, 0, 2, 2, 2, 4, 0,
568 3, 0, 2, 1, 1, 2, 2, 2, 1, 2, 637 2, 1, 1, 2, 2, 2, 1, 2, 0, 2,
569 0, 2, 1, 3, 3, 3, 2, 3, 3, 1, 638 1, 3, 3, 3, 2, 3, 3, 1, 1
570 1
571}; 639};
572 640
573/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 641/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
574 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 642 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
575 means the default is an error. */ 643 means the default is an error. */
576static const unsigned char yydefact[] = 644static const yytype_uint8 yydefact[] =
577{ 645{
578 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 646 3, 0, 0, 1, 0, 0, 0, 0, 0, 0,
579 0, 0, 0, 0, 0, 0, 12, 16, 13, 14, 647 0, 0, 0, 0, 0, 0, 12, 16, 13, 14,
580 18, 15, 17, 0, 19, 0, 4, 31, 22, 31, 648 18, 15, 17, 0, 19, 0, 4, 31, 22, 31,
581 23, 52, 62, 5, 67, 20, 84, 75, 6, 24, 649 23, 52, 62, 5, 67, 20, 84, 75, 6, 24,
582 84, 21, 8, 11, 93, 94, 0, 0, 95, 0, 650 84, 21, 8, 11, 91, 92, 0, 0, 93, 0,
583 48, 96, 0, 0, 0, 109, 110, 0, 0, 0, 651 48, 94, 0, 0, 0, 107, 108, 0, 0, 0,
584 102, 97, 0, 0, 0, 0, 0, 0, 0, 0, 652 100, 95, 0, 0, 0, 0, 0, 0, 0, 0,
585 0, 0, 98, 7, 71, 79, 80, 27, 29, 0, 653 0, 0, 96, 7, 71, 79, 80, 27, 29, 0,
586 106, 0, 0, 64, 0, 0, 9, 10, 0, 0, 654 104, 0, 0, 64, 0, 0, 9, 10, 0, 0,
587 0, 0, 0, 91, 0, 0, 0, 44, 0, 37, 655 0, 0, 89, 0, 0, 0, 44, 0, 37, 36,
588 36, 32, 33, 0, 35, 34, 0, 0, 91, 0, 656 32, 33, 0, 35, 34, 0, 0, 89, 0, 56,
589 56, 57, 53, 55, 54, 63, 51, 50, 68, 70, 657 57, 53, 55, 54, 63, 51, 50, 68, 70, 66,
590 66, 69, 65, 86, 87, 85, 76, 78, 74, 77, 658 69, 65, 86, 87, 85, 76, 78, 74, 77, 73,
591 73, 99, 105, 107, 108, 104, 103, 26, 82, 0, 659 97, 103, 105, 106, 102, 101, 26, 82, 0, 98,
592 0, 0, 100, 0, 100, 100, 100, 0, 0, 0, 660 0, 98, 98, 98, 0, 0, 0, 83, 60, 98,
593 83, 60, 100, 0, 100, 0, 89, 90, 0, 0, 661 0, 98, 0, 0, 0, 38, 90, 0, 0, 98,
594 38, 92, 0, 0, 100, 46, 43, 25, 0, 59, 662 46, 43, 25, 0, 59, 0, 88, 99, 39, 40,
595 0, 88, 101, 39, 40, 41, 0, 0, 45, 58, 663 41, 0, 0, 45, 58, 61, 42, 47
596 61, 42, 47
597}; 664};
598 665
599/* YYDEFGOTO[NTERM-NUM]. */ 666/* YYDEFGOTO[NTERM-NUM]. */
600static const short int yydefgoto[] = 667static const yytype_int16 yydefgoto[] =
601{ 668{
602 -1, 1, 2, 25, 26, 100, 27, 28, 29, 30, 669 -1, 1, 2, 25, 26, 99, 27, 28, 29, 30,
603 64, 101, 102, 148, 178, 31, 32, 116, 33, 66, 670 64, 100, 101, 145, 173, 31, 32, 115, 33, 66,
604 112, 67, 34, 120, 35, 68, 36, 37, 128, 38, 671 111, 67, 34, 119, 35, 68, 36, 37, 127, 38,
605 70, 39, 40, 41, 103, 104, 69, 105, 143, 144, 672 70, 39, 40, 41, 102, 103, 69, 104, 140, 141,
606 42, 73, 159, 59, 60 673 42, 73, 154, 59, 60
607}; 674};
608 675
609/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 676/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
610 STATE-NUM. */ 677 STATE-NUM. */
611#define YYPACT_NINF -135 678#define YYPACT_NINF -78
612static const short int yypact[] = 679static const yytype_int16 yypact[] =
613{ 680{
614 -135, 2, 170, -135, -14, 56, 56, -8, 56, 24, 681 -78, 33, 130, -78, -28, 73, 73, 7, 73, 36,
615 67, 56, 7, 14, 62, 97, -135, -135, -135, -135, 682 41, 73, 26, 52, -4, 58, -78, -78, -78, -78,
616 -135, -135, -135, 156, -135, 166, -135, -135, -135, -135, 683 -78, -78, -78, 90, -78, 94, -78, -78, -78, -78,
617 -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 684 -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
618 -135, -135, -135, -135, -135, -135, 138, 151, -135, 152, 685 -78, -78, -78, -78, -78, -78, 74, 85, -78, 96,
619 -135, -135, 163, 167, 176, -135, -135, 62, 62, 185, 686 -78, -78, 131, 134, 147, -78, -78, -4, -4, 193,
620 -19, -135, 188, 190, 42, 103, 194, 85, 70, 222, 687 -10, -78, 162, 164, 38, 102, 64, 148, 5, 192,
621 70, 132, -135, 191, -135, -135, -135, -135, -135, 127, 688 5, 165, -78, 174, -78, -78, -78, -78, -78, 65,
622 -135, 62, 62, 191, 104, 104, -135, -135, 193, 203, 689 -78, -4, -4, 174, 103, 103, -78, -78, 175, 185,
623 9, 62, 56, 56, 62, 161, 104, -135, 196, -135, 690 197, 73, 73, -4, 194, 103, -78, 231, -78, -78,
624 -135, -135, -135, 233, -135, -135, 204, 56, 56, 221, 691 -78, -78, 220, -78, -78, 204, 73, 73, 210, -78,
625 -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 692 -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
626 -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 693 -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
627 -135, -135, -135, 219, -135, -135, -135, -135, -135, 62, 694 -78, -78, 205, -78, -78, -78, -78, -78, -4, 222,
628 209, 212, 240, 224, 240, -1, 240, 104, 41, 225, 695 208, 222, 195, 222, 103, 2, 209, -78, -78, 222,
629 -135, -135, 240, 226, 240, 218, -135, -135, 62, 227, 696 211, 222, 199, -4, 212, -78, -78, 213, 214, 222,
630 -135, -135, 228, 229, 240, 230, -135, -135, 231, -135, 697 207, -78, -78, 215, -78, 216, -78, 111, -78, -78,
631 232, -135, 112, -135, -135, -135, 234, 56, -135, -135, 698 -78, 217, 73, -78, -78, -78, -78, -78
632 -135, -135, -135
633}; 699};
634 700
635/* YYPGOTO[NTERM-NUM]. */ 701/* YYPGOTO[NTERM-NUM]. */
636static const short int yypgoto[] = 702static const yytype_int16 yypgoto[] =
637{ 703{
638 -135, -135, -135, -135, 94, -45, -135, -135, -135, -135, 704 -78, -78, -78, -78, 121, -35, -78, -78, -78, -78,
639 237, -135, -135, -135, -135, -135, -135, -135, -54, -135, 705 219, -78, -78, -78, -78, -78, -78, -78, -44, -78,
640 -135, -135, -135, -135, -135, -135, -135, -135, -135, 1, 706 -78, -78, -78, -78, -78, -78, -78, -78, -78, -6,
641 -135, -135, -135, -135, -135, 195, 235, -44, 159, -5, 707 -78, -78, -78, -78, -78, 183, 218, 21, 143, -5,
642 98, 210, -134, -53, -77 708 146, 196, 69, -53, -77
643}; 709};
644 710
645/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 711/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -647,93 +713,88 @@ static const short int yypgoto[] =
647 number is the opposite. If zero, do what YYDEFACT says. 713 number is the opposite. If zero, do what YYDEFACT says.
648 If YYTABLE_NINF, syntax error. */ 714 If YYTABLE_NINF, syntax error. */
649#define YYTABLE_NINF -82 715#define YYTABLE_NINF -82
650static const short int yytable[] = 716static const yytype_int16 yytable[] =
651{ 717{
652 46, 47, 3, 49, 79, 80, 52, 135, 136, 84, 718 46, 47, 43, 49, 79, 80, 52, 134, 135, 6,
653 161, 162, 163, 158, 119, 85, 127, 43, 168, 147, 719 7, 8, 9, 10, 11, 12, 13, 84, 144, 14,
654 170, 111, 114, 48, 124, 125, 124, 125, 133, 134, 720 15, 55, 56, 85, 118, 57, 126, 160, 132, 133,
655 176, 81, 82, 53, 139, 55, 56, 140, 141, 57, 721 58, 110, 161, 3, 123, 24, 123, 48, -28, 88,
656 54, 145, -28, 88, 58, -28, -28, -28, -28, -28, 722 142, -28, -28, -28, -28, -28, -28, -28, -28, -28,
657 -28, -28, -28, -28, 89, 50, -28, -28, 90, 91, 723 89, 53, -28, -28, 90, -28, 91, 92, 93, 94,
658 -28, 92, 93, 94, 95, 96, 97, 165, 98, 121, 724 95, 96, 120, 97, 128, 88, 50, 159, 98, -49,
659 164, 129, 166, 99, 6, 7, 8, 9, 10, 11, 725 -49, 51, -49, -49, -49, -49, 89, 54, -49, -49,
660 12, 13, 44, 45, 14, 15, 155, 142, 55, 56, 726 90, 105, 106, 107, 108, 152, 139, 113, 61, 97,
661 7, 8, 57, 10, 11, 12, 13, 58, 51, 14, 727 124, 62, 124, 131, 109, 63, 81, 82, 44, 45,
662 15, 24, 152, -30, 88, 172, -30, -30, -30, -30, 728 167, 149, -30, 88, 72, -30, -30, -30, -30, -30,
663 -30, -30, -30, -30, -30, 89, 24, -30, -30, 90, 729 -30, -30, -30, -30, 89, 74, -30, -30, 90, -30,
664 91, -30, 92, 93, 94, 95, 96, 97, 61, 98, 730 91, 92, 93, 94, 95, 96, 75, 97, 55, 56,
665 55, 56, -81, 88, 99, -81, -81, -81, -81, -81, 731 -2, 4, 98, 5, 6, 7, 8, 9, 10, 11,
666 -81, -81, -81, -81, 81, 82, -81, -81, 90, 91, 732 12, 13, 81, 82, 14, 15, 16, 17, 18, 19,
667 -81, -81, -81, -81, -81, -81, 132, 62, 98, 81, 733 20, 21, 22, 7, 8, 23, 10, 11, 12, 13,
668 82, 115, 118, 123, 126, 117, 122, 63, 130, 72, 734 24, 76, 14, 15, 77, -81, 88, 177, -81, -81,
669 -2, 4, 182, 5, 6, 7, 8, 9, 10, 11, 735 -81, -81, -81, -81, -81, -81, -81, 78, 24, -81,
670 12, 13, 74, 75, 14, 15, 16, 146, 17, 18, 736 -81, 90, -81, -81, -81, -81, -81, -81, 114, 117,
671 19, 20, 21, 22, 76, 88, 23, 149, 77, -49, 737 97, 125, 86, 88, 87, 122, -72, -72, -72, -72,
672 -49, 24, -49, -49, -49, -49, 89, 78, -49, -49, 738 -72, -72, -72, -72, 130, 136, -72, -72, 90, 153,
673 90, 91, 106, 107, 108, 109, 72, 81, 82, 86, 739 156, 157, 158, 116, 121, 137, 129, 97, 163, 143,
674 98, 87, 131, 88, 137, 110, -72, -72, -72, -72, 740 165, 138, 122, 72, 81, 82, 81, 82, 171, 166,
675 -72, -72, -72, -72, 138, 151, -72, -72, 90, 91, 741 81, 82, 146, 147, 148, 151, 153, 82, 155, 162,
676 156, 81, 82, 157, 81, 82, 150, 154, 98, 171, 742 172, 164, 168, 169, 170, 174, 175, 176, 65, 112,
677 81, 82, 82, 123, 158, 160, 167, 169, 173, 174, 743 150, 0, 0, 0, 0, 83, 0, 0, 71
678 175, 113, 179, 180, 177, 181, 65, 153, 0, 83,
679 0, 0, 0, 0, 0, 71
680}; 744};
681 745
682static const short int yycheck[] = 746static const yytype_int16 yycheck[] =
683{ 747{
684 5, 6, 0, 8, 57, 58, 11, 84, 85, 28, 748 5, 6, 30, 8, 57, 58, 11, 84, 85, 4,
685 144, 145, 146, 14, 68, 34, 70, 31, 152, 96, 749 5, 6, 7, 8, 9, 10, 11, 27, 95, 14,
686 154, 66, 66, 31, 69, 69, 71, 71, 81, 82, 750 15, 25, 26, 33, 68, 29, 70, 25, 81, 82,
687 164, 32, 33, 26, 25, 26, 27, 90, 91, 30, 751 34, 66, 30, 0, 69, 30, 71, 30, 0, 1,
688 26, 94, 0, 1, 35, 3, 4, 5, 6, 7, 752 93, 3, 4, 5, 6, 7, 8, 9, 10, 11,
689 8, 9, 10, 11, 12, 31, 14, 15, 16, 17, 753 12, 25, 14, 15, 16, 17, 18, 19, 20, 21,
690 18, 19, 20, 21, 22, 23, 24, 26, 26, 68, 754 22, 23, 68, 25, 70, 1, 30, 144, 30, 5,
691 147, 70, 31, 31, 4, 5, 6, 7, 8, 9, 755 6, 30, 8, 9, 10, 11, 12, 25, 14, 15,
692 10, 11, 26, 27, 14, 15, 139, 92, 26, 27, 756 16, 17, 18, 19, 20, 138, 91, 66, 30, 25,
693 5, 6, 30, 8, 9, 10, 11, 35, 31, 14, 757 69, 1, 71, 28, 30, 1, 31, 32, 25, 26,
694 15, 31, 107, 0, 1, 158, 3, 4, 5, 6, 758 153, 106, 0, 1, 30, 3, 4, 5, 6, 7,
695 7, 8, 9, 10, 11, 12, 31, 14, 15, 16, 759 8, 9, 10, 11, 12, 30, 14, 15, 16, 17,
696 17, 18, 19, 20, 21, 22, 23, 24, 31, 26, 760 18, 19, 20, 21, 22, 23, 30, 25, 25, 26,
697 26, 27, 0, 1, 31, 3, 4, 5, 6, 7, 761 0, 1, 30, 3, 4, 5, 6, 7, 8, 9,
698 8, 9, 10, 11, 32, 33, 14, 15, 16, 17, 762 10, 11, 31, 32, 14, 15, 16, 17, 18, 19,
699 18, 19, 20, 21, 22, 23, 29, 1, 26, 32, 763 20, 21, 22, 5, 6, 25, 8, 9, 10, 11,
700 33, 67, 68, 31, 70, 67, 68, 1, 70, 31, 764 30, 30, 14, 15, 30, 0, 1, 172, 3, 4,
701 0, 1, 177, 3, 4, 5, 6, 7, 8, 9, 765 5, 6, 7, 8, 9, 10, 11, 30, 30, 14,
702 10, 11, 31, 31, 14, 15, 16, 26, 18, 19, 766 15, 16, 17, 18, 19, 20, 21, 22, 67, 68,
703 20, 21, 22, 23, 31, 1, 26, 1, 31, 5, 767 25, 70, 30, 1, 30, 30, 4, 5, 6, 7,
704 6, 31, 8, 9, 10, 11, 12, 31, 14, 15, 768 8, 9, 10, 11, 30, 30, 14, 15, 16, 14,
705 16, 17, 18, 19, 20, 21, 31, 32, 33, 31, 769 141, 142, 143, 67, 68, 30, 70, 25, 149, 25,
706 26, 31, 31, 1, 31, 31, 4, 5, 6, 7, 770 151, 24, 30, 30, 31, 32, 31, 32, 159, 30,
707 8, 9, 10, 11, 31, 31, 14, 15, 16, 17, 771 31, 32, 1, 13, 30, 25, 14, 32, 30, 30,
708 31, 32, 33, 31, 32, 33, 13, 26, 26, 31, 772 33, 30, 30, 30, 30, 30, 30, 30, 29, 66,
709 32, 33, 33, 31, 14, 31, 31, 31, 31, 31, 773 107, -1, -1, -1, -1, 59, -1, -1, 40
710 31, 66, 31, 31, 34, 31, 29, 108, -1, 59,
711 -1, -1, -1, -1, -1, 40
712}; 774};
713 775
714/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 776/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
715 symbol of state STATE-NUM. */ 777 symbol of state STATE-NUM. */
716static const unsigned char yystos[] = 778static const yytype_uint8 yystos[] =
717{ 779{
718 0, 37, 38, 0, 1, 3, 4, 5, 6, 7, 780 0, 36, 37, 0, 1, 3, 4, 5, 6, 7,
719 8, 9, 10, 11, 14, 15, 16, 18, 19, 20, 781 8, 9, 10, 11, 14, 15, 16, 17, 18, 19,
720 21, 22, 23, 26, 31, 39, 40, 42, 43, 44, 782 20, 21, 22, 25, 30, 38, 39, 41, 42, 43,
721 45, 51, 52, 54, 58, 60, 62, 63, 65, 67, 783 44, 50, 51, 53, 57, 59, 61, 62, 64, 66,
722 68, 69, 76, 31, 26, 27, 75, 75, 31, 75, 784 67, 68, 75, 30, 25, 26, 74, 74, 30, 74,
723 31, 31, 75, 26, 26, 26, 27, 30, 35, 79, 785 30, 30, 74, 25, 25, 25, 26, 29, 34, 78,
724 80, 31, 1, 1, 46, 46, 55, 57, 61, 72, 786 79, 30, 1, 1, 45, 45, 54, 56, 60, 71,
725 66, 72, 31, 77, 31, 31, 31, 31, 31, 79, 787 65, 71, 30, 76, 30, 30, 30, 30, 30, 78,
726 79, 32, 33, 77, 28, 34, 31, 31, 1, 12, 788 78, 31, 32, 76, 27, 33, 30, 30, 1, 12,
727 16, 17, 19, 20, 21, 22, 23, 24, 26, 31, 789 16, 18, 19, 20, 21, 22, 23, 25, 30, 40,
728 41, 47, 48, 70, 71, 73, 18, 19, 20, 21, 790 46, 47, 69, 70, 72, 17, 18, 19, 20, 30,
729 31, 41, 56, 71, 73, 40, 53, 76, 40, 54, 791 40, 55, 70, 72, 39, 52, 75, 39, 53, 58,
730 59, 65, 76, 31, 41, 73, 40, 54, 64, 65, 792 64, 75, 30, 40, 72, 39, 53, 63, 64, 75,
731 76, 31, 29, 79, 79, 80, 80, 31, 31, 25, 793 30, 28, 78, 78, 79, 79, 30, 30, 24, 74,
732 79, 79, 75, 74, 75, 79, 26, 80, 49, 1, 794 73, 74, 78, 25, 79, 48, 1, 13, 30, 74,
733 13, 31, 75, 74, 26, 79, 31, 31, 14, 78, 795 73, 25, 78, 14, 77, 30, 77, 77, 77, 79,
734 31, 78, 78, 78, 80, 26, 31, 31, 78, 31, 796 25, 30, 30, 77, 30, 77, 30, 78, 30, 30,
735 78, 31, 79, 31, 31, 31, 78, 34, 50, 31, 797 30, 77, 33, 49, 30, 30, 30, 74
736 31, 31, 75
737}; 798};
738 799
739#define yyerrok (yyerrstatus = 0) 800#define yyerrok (yyerrstatus = 0)
@@ -761,7 +822,7 @@ do \
761 yychar = (Token); \ 822 yychar = (Token); \
762 yylval = (Value); \ 823 yylval = (Value); \
763 yytoken = YYTRANSLATE (yychar); \ 824 yytoken = YYTRANSLATE (yychar); \
764 YYPOPSTACK; \ 825 YYPOPSTACK (1); \
765 goto yybackup; \ 826 goto yybackup; \
766 } \ 827 } \
767 else \ 828 else \
@@ -769,7 +830,7 @@ do \
769 yyerror (YY_("syntax error: cannot back up")); \ 830 yyerror (YY_("syntax error: cannot back up")); \
770 YYERROR; \ 831 YYERROR; \
771 } \ 832 } \
772while (0) 833while (YYID (0))
773 834
774 835
775#define YYTERROR 1 836#define YYTERROR 1
@@ -784,7 +845,7 @@ while (0)
784#ifndef YYLLOC_DEFAULT 845#ifndef YYLLOC_DEFAULT
785# define YYLLOC_DEFAULT(Current, Rhs, N) \ 846# define YYLLOC_DEFAULT(Current, Rhs, N) \
786 do \ 847 do \
787 if (N) \ 848 if (YYID (N)) \
788 { \ 849 { \
789 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 850 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
790 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 851 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -798,7 +859,7 @@ while (0)
798 (Current).first_column = (Current).last_column = \ 859 (Current).first_column = (Current).last_column = \
799 YYRHSLOC (Rhs, 0).last_column; \ 860 YYRHSLOC (Rhs, 0).last_column; \
800 } \ 861 } \
801 while (0) 862 while (YYID (0))
802#endif 863#endif
803 864
804 865
@@ -810,8 +871,8 @@ while (0)
810# if YYLTYPE_IS_TRIVIAL 871# if YYLTYPE_IS_TRIVIAL
811# define YY_LOCATION_PRINT(File, Loc) \ 872# define YY_LOCATION_PRINT(File, Loc) \
812 fprintf (File, "%d.%d-%d.%d", \ 873 fprintf (File, "%d.%d-%d.%d", \
813 (Loc).first_line, (Loc).first_column, \ 874 (Loc).first_line, (Loc).first_column, \
814 (Loc).last_line, (Loc).last_column) 875 (Loc).last_line, (Loc).last_column)
815# else 876# else
816# define YY_LOCATION_PRINT(File, Loc) ((void) 0) 877# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
817# endif 878# endif
@@ -838,36 +899,96 @@ while (0)
838do { \ 899do { \
839 if (yydebug) \ 900 if (yydebug) \
840 YYFPRINTF Args; \ 901 YYFPRINTF Args; \
841} while (0) 902} while (YYID (0))
842 903
843# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 904# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
844do { \ 905do { \
845 if (yydebug) \ 906 if (yydebug) \
846 { \ 907 { \
847 YYFPRINTF (stderr, "%s ", Title); \ 908 YYFPRINTF (stderr, "%s ", Title); \
848 yysymprint (stderr, \ 909 yy_symbol_print (stderr, \
849 Type, Value); \ 910 Type, Value); \
850 YYFPRINTF (stderr, "\n"); \ 911 YYFPRINTF (stderr, "\n"); \
851 } \ 912 } \
852} while (0) 913} while (YYID (0))
914
915
916/*--------------------------------.
917| Print this symbol on YYOUTPUT. |
918`--------------------------------*/
919
920/*ARGSUSED*/
921#if (defined __STDC__ || defined __C99__FUNC__ \
922 || defined __cplusplus || defined _MSC_VER)
923static void
924yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
925#else
926static void
927yy_symbol_value_print (yyoutput, yytype, yyvaluep)
928 FILE *yyoutput;
929 int yytype;
930 YYSTYPE const * const yyvaluep;
931#endif
932{
933 if (!yyvaluep)
934 return;
935# ifdef YYPRINT
936 if (yytype < YYNTOKENS)
937 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
938# else
939 YYUSE (yyoutput);
940# endif
941 switch (yytype)
942 {
943 default:
944 break;
945 }
946}
947
948
949/*--------------------------------.
950| Print this symbol on YYOUTPUT. |
951`--------------------------------*/
952
953#if (defined __STDC__ || defined __C99__FUNC__ \
954 || defined __cplusplus || defined _MSC_VER)
955static void
956yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
957#else
958static void
959yy_symbol_print (yyoutput, yytype, yyvaluep)
960 FILE *yyoutput;
961 int yytype;
962 YYSTYPE const * const yyvaluep;
963#endif
964{
965 if (yytype < YYNTOKENS)
966 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
967 else
968 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
969
970 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
971 YYFPRINTF (yyoutput, ")");
972}
853 973
854/*------------------------------------------------------------------. 974/*------------------------------------------------------------------.
855| yy_stack_print -- Print the state stack from its BOTTOM up to its | 975| yy_stack_print -- Print the state stack from its BOTTOM up to its |
856| TOP (included). | 976| TOP (included). |
857`------------------------------------------------------------------*/ 977`------------------------------------------------------------------*/
858 978
859#if defined (__STDC__) || defined (__cplusplus) 979#if (defined __STDC__ || defined __C99__FUNC__ \
980 || defined __cplusplus || defined _MSC_VER)
860static void 981static void
861yy_stack_print (short int *bottom, short int *top) 982yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
862#else 983#else
863static void 984static void
864yy_stack_print (bottom, top) 985yy_stack_print (bottom, top)
865 short int *bottom; 986 yytype_int16 *bottom;
866 short int *top; 987 yytype_int16 *top;
867#endif 988#endif
868{ 989{
869 YYFPRINTF (stderr, "Stack now"); 990 YYFPRINTF (stderr, "Stack now");
870 for (/* Nothing. */; bottom <= top; ++bottom) 991 for (; bottom <= top; ++bottom)
871 YYFPRINTF (stderr, " %d", *bottom); 992 YYFPRINTF (stderr, " %d", *bottom);
872 YYFPRINTF (stderr, "\n"); 993 YYFPRINTF (stderr, "\n");
873} 994}
@@ -876,37 +997,45 @@ yy_stack_print (bottom, top)
876do { \ 997do { \
877 if (yydebug) \ 998 if (yydebug) \
878 yy_stack_print ((Bottom), (Top)); \ 999 yy_stack_print ((Bottom), (Top)); \
879} while (0) 1000} while (YYID (0))
880 1001
881 1002
882/*------------------------------------------------. 1003/*------------------------------------------------.
883| Report that the YYRULE is going to be reduced. | 1004| Report that the YYRULE is going to be reduced. |
884`------------------------------------------------*/ 1005`------------------------------------------------*/
885 1006
886#if defined (__STDC__) || defined (__cplusplus) 1007#if (defined __STDC__ || defined __C99__FUNC__ \
1008 || defined __cplusplus || defined _MSC_VER)
887static void 1009static void
888yy_reduce_print (int yyrule) 1010yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
889#else 1011#else
890static void 1012static void
891yy_reduce_print (yyrule) 1013yy_reduce_print (yyvsp, yyrule)
1014 YYSTYPE *yyvsp;
892 int yyrule; 1015 int yyrule;
893#endif 1016#endif
894{ 1017{
1018 int yynrhs = yyr2[yyrule];
895 int yyi; 1019 int yyi;
896 unsigned long int yylno = yyrline[yyrule]; 1020 unsigned long int yylno = yyrline[yyrule];
897 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", 1021 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
898 yyrule - 1, yylno); 1022 yyrule - 1, yylno);
899 /* Print the symbols being reduced, and their result. */ 1023 /* The symbols being reduced. */
900 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) 1024 for (yyi = 0; yyi < yynrhs; yyi++)
901 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); 1025 {
902 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); 1026 fprintf (stderr, " $%d = ", yyi + 1);
1027 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1028 &(yyvsp[(yyi + 1) - (yynrhs)])
1029 );
1030 fprintf (stderr, "\n");
1031 }
903} 1032}
904 1033
905# define YY_REDUCE_PRINT(Rule) \ 1034# define YY_REDUCE_PRINT(Rule) \
906do { \ 1035do { \
907 if (yydebug) \ 1036 if (yydebug) \
908 yy_reduce_print (Rule); \ 1037 yy_reduce_print (yyvsp, Rule); \
909} while (0) 1038} while (YYID (0))
910 1039
911/* Nonzero means print parse trace. It is left uninitialized so that 1040/* Nonzero means print parse trace. It is left uninitialized so that
912 multiple parsers can coexist. */ 1041 multiple parsers can coexist. */
@@ -940,42 +1069,44 @@ int yydebug;
940#if YYERROR_VERBOSE 1069#if YYERROR_VERBOSE
941 1070
942# ifndef yystrlen 1071# ifndef yystrlen
943# if defined (__GLIBC__) && defined (_STRING_H) 1072# if defined __GLIBC__ && defined _STRING_H
944# define yystrlen strlen 1073# define yystrlen strlen
945# else 1074# else
946/* Return the length of YYSTR. */ 1075/* Return the length of YYSTR. */
1076#if (defined __STDC__ || defined __C99__FUNC__ \
1077 || defined __cplusplus || defined _MSC_VER)
947static YYSIZE_T 1078static YYSIZE_T
948# if defined (__STDC__) || defined (__cplusplus)
949yystrlen (const char *yystr) 1079yystrlen (const char *yystr)
950# else 1080#else
1081static YYSIZE_T
951yystrlen (yystr) 1082yystrlen (yystr)
952 const char *yystr; 1083 const char *yystr;
953# endif 1084#endif
954{ 1085{
955 const char *yys = yystr; 1086 YYSIZE_T yylen;
956 1087 for (yylen = 0; yystr[yylen]; yylen++)
957 while (*yys++ != '\0')
958 continue; 1088 continue;
959 1089 return yylen;
960 return yys - yystr - 1;
961} 1090}
962# endif 1091# endif
963# endif 1092# endif
964 1093
965# ifndef yystpcpy 1094# ifndef yystpcpy
966# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) 1095# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
967# define yystpcpy stpcpy 1096# define yystpcpy stpcpy
968# else 1097# else
969/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1098/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
970 YYDEST. */ 1099 YYDEST. */
1100#if (defined __STDC__ || defined __C99__FUNC__ \
1101 || defined __cplusplus || defined _MSC_VER)
971static char * 1102static char *
972# if defined (__STDC__) || defined (__cplusplus)
973yystpcpy (char *yydest, const char *yysrc) 1103yystpcpy (char *yydest, const char *yysrc)
974# else 1104#else
1105static char *
975yystpcpy (yydest, yysrc) 1106yystpcpy (yydest, yysrc)
976 char *yydest; 1107 char *yydest;
977 const char *yysrc; 1108 const char *yysrc;
978# endif 1109#endif
979{ 1110{
980 char *yyd = yydest; 1111 char *yyd = yydest;
981 const char *yys = yysrc; 1112 const char *yys = yysrc;
@@ -1001,7 +1132,7 @@ yytnamerr (char *yyres, const char *yystr)
1001{ 1132{
1002 if (*yystr == '"') 1133 if (*yystr == '"')
1003 { 1134 {
1004 size_t yyn = 0; 1135 YYSIZE_T yyn = 0;
1005 char const *yyp = yystr; 1136 char const *yyp = yystr;
1006 1137
1007 for (;;) 1138 for (;;)
@@ -1036,53 +1167,123 @@ yytnamerr (char *yyres, const char *yystr)
1036} 1167}
1037# endif 1168# endif
1038 1169
1039#endif /* YYERROR_VERBOSE */ 1170/* Copy into YYRESULT an error message about the unexpected token
1040 1171 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1041 1172 including the terminating null byte. If YYRESULT is null, do not
1042 1173 copy anything; just return the number of bytes that would be
1043#if YYDEBUG 1174 copied. As a special case, return 0 if an ordinary "syntax error"
1044/*--------------------------------. 1175 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1045| Print this symbol on YYOUTPUT. | 1176 size calculation. */
1046`--------------------------------*/ 1177static YYSIZE_T
1047 1178yysyntax_error (char *yyresult, int yystate, int yychar)
1048#if defined (__STDC__) || defined (__cplusplus)
1049static void
1050yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1051#else
1052static void
1053yysymprint (yyoutput, yytype, yyvaluep)
1054 FILE *yyoutput;
1055 int yytype;
1056 YYSTYPE *yyvaluep;
1057#endif
1058{ 1179{
1059 /* Pacify ``unused variable'' warnings. */ 1180 int yyn = yypact[yystate];
1060 (void) yyvaluep;
1061 1181
1062 if (yytype < YYNTOKENS) 1182 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1063 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1183 return 0;
1064 else 1184 else
1065 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 1185 {
1186 int yytype = YYTRANSLATE (yychar);
1187 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1188 YYSIZE_T yysize = yysize0;
1189 YYSIZE_T yysize1;
1190 int yysize_overflow = 0;
1191 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1192 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1193 int yyx;
1194
1195# if 0
1196 /* This is so xgettext sees the translatable formats that are
1197 constructed on the fly. */
1198 YY_("syntax error, unexpected %s");
1199 YY_("syntax error, unexpected %s, expecting %s");
1200 YY_("syntax error, unexpected %s, expecting %s or %s");
1201 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1202 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1203# endif
1204 char *yyfmt;
1205 char const *yyf;
1206 static char const yyunexpected[] = "syntax error, unexpected %s";
1207 static char const yyexpecting[] = ", expecting %s";
1208 static char const yyor[] = " or %s";
1209 char yyformat[sizeof yyunexpected
1210 + sizeof yyexpecting - 1
1211 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1212 * (sizeof yyor - 1))];
1213 char const *yyprefix = yyexpecting;
1214
1215 /* Start YYX at -YYN if negative to avoid negative indexes in
1216 YYCHECK. */
1217 int yyxbegin = yyn < 0 ? -yyn : 0;
1218
1219 /* Stay within bounds of both yycheck and yytname. */
1220 int yychecklim = YYLAST - yyn + 1;
1221 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1222 int yycount = 1;
1223
1224 yyarg[0] = yytname[yytype];
1225 yyfmt = yystpcpy (yyformat, yyunexpected);
1226
1227 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1228 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1229 {
1230 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1231 {
1232 yycount = 1;
1233 yysize = yysize0;
1234 yyformat[sizeof yyunexpected - 1] = '\0';
1235 break;
1236 }
1237 yyarg[yycount++] = yytname[yyx];
1238 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1239 yysize_overflow |= (yysize1 < yysize);
1240 yysize = yysize1;
1241 yyfmt = yystpcpy (yyfmt, yyprefix);
1242 yyprefix = yyor;
1243 }
1066 1244
1245 yyf = YY_(yyformat);
1246 yysize1 = yysize + yystrlen (yyf);
1247 yysize_overflow |= (yysize1 < yysize);
1248 yysize = yysize1;
1067 1249
1068# ifdef YYPRINT 1250 if (yysize_overflow)
1069 if (yytype < YYNTOKENS) 1251 return YYSIZE_MAXIMUM;
1070 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1252
1071# endif 1253 if (yyresult)
1072 switch (yytype) 1254 {
1073 { 1255 /* Avoid sprintf, as that infringes on the user's name space.
1074 default: 1256 Don't have undefined behavior even if the translation
1075 break; 1257 produced a string with the wrong number of "%s"s. */
1258 char *yyp = yyresult;
1259 int yyi = 0;
1260 while ((*yyp = *yyf) != '\0')
1261 {
1262 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1263 {
1264 yyp += yytnamerr (yyp, yyarg[yyi++]);
1265 yyf += 2;
1266 }
1267 else
1268 {
1269 yyp++;
1270 yyf++;
1271 }
1272 }
1273 }
1274 return yysize;
1076 } 1275 }
1077 YYFPRINTF (yyoutput, ")");
1078} 1276}
1277#endif /* YYERROR_VERBOSE */
1278
1079 1279
1080#endif /* ! YYDEBUG */
1081/*-----------------------------------------------. 1280/*-----------------------------------------------.
1082| Release the memory associated to this symbol. | 1281| Release the memory associated to this symbol. |
1083`-----------------------------------------------*/ 1282`-----------------------------------------------*/
1084 1283
1085#if defined (__STDC__) || defined (__cplusplus) 1284/*ARGSUSED*/
1285#if (defined __STDC__ || defined __C99__FUNC__ \
1286 || defined __cplusplus || defined _MSC_VER)
1086static void 1287static void
1087yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1288yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1088#else 1289#else
@@ -1093,8 +1294,7 @@ yydestruct (yymsg, yytype, yyvaluep)
1093 YYSTYPE *yyvaluep; 1294 YYSTYPE *yyvaluep;
1094#endif 1295#endif
1095{ 1296{
1096 /* Pacify ``unused variable'' warnings. */ 1297 YYUSE (yyvaluep);
1097 (void) yyvaluep;
1098 1298
1099 if (!yymsg) 1299 if (!yymsg)
1100 yymsg = "Deleting"; 1300 yymsg = "Deleting";
@@ -1102,39 +1302,39 @@ yydestruct (yymsg, yytype, yyvaluep)
1102 1302
1103 switch (yytype) 1303 switch (yytype)
1104 { 1304 {
1105 case 52: /* "choice_entry" */ 1305 case 51: /* "choice_entry" */
1106 1306
1107 { 1307 {
1108 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1308 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1109 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 1309 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
1110 if (current_menu == (yyvaluep->menu)) 1310 if (current_menu == (yyvaluep->menu))
1111 menu_end_menu(); 1311 menu_end_menu();
1112}; 1312};
1113 1313
1114 break; 1314 break;
1115 case 58: /* "if_entry" */ 1315 case 57: /* "if_entry" */
1116 1316
1117 { 1317 {
1118 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1318 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1119 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 1319 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
1120 if (current_menu == (yyvaluep->menu)) 1320 if (current_menu == (yyvaluep->menu))
1121 menu_end_menu(); 1321 menu_end_menu();
1122}; 1322};
1123 1323
1124 break; 1324 break;
1125 case 63: /* "menu_entry" */ 1325 case 62: /* "menu_entry" */
1126 1326
1127 { 1327 {
1128 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1328 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1129 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 1329 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
1130 if (current_menu == (yyvaluep->menu)) 1330 if (current_menu == (yyvaluep->menu))
1131 menu_end_menu(); 1331 menu_end_menu();
1132}; 1332};
1133 1333
1134 break; 1334 break;
1135 1335
1136 default: 1336 default:
1137 break; 1337 break;
1138 } 1338 }
1139} 1339}
1140 1340
@@ -1142,13 +1342,13 @@ yydestruct (yymsg, yytype, yyvaluep)
1142/* Prevent warnings from -Wmissing-prototypes. */ 1342/* Prevent warnings from -Wmissing-prototypes. */
1143 1343
1144#ifdef YYPARSE_PARAM 1344#ifdef YYPARSE_PARAM
1145# if defined (__STDC__) || defined (__cplusplus) 1345#if defined __STDC__ || defined __cplusplus
1146int yyparse (void *YYPARSE_PARAM); 1346int yyparse (void *YYPARSE_PARAM);
1147# else 1347#else
1148int yyparse (); 1348int yyparse ();
1149# endif 1349#endif
1150#else /* ! YYPARSE_PARAM */ 1350#else /* ! YYPARSE_PARAM */
1151#if defined (__STDC__) || defined (__cplusplus) 1351#if defined __STDC__ || defined __cplusplus
1152int yyparse (void); 1352int yyparse (void);
1153#else 1353#else
1154int yyparse (); 1354int yyparse ();
@@ -1173,20 +1373,24 @@ int yynerrs;
1173`----------*/ 1373`----------*/
1174 1374
1175#ifdef YYPARSE_PARAM 1375#ifdef YYPARSE_PARAM
1176# if defined (__STDC__) || defined (__cplusplus) 1376#if (defined __STDC__ || defined __C99__FUNC__ \
1177int yyparse (void *YYPARSE_PARAM) 1377 || defined __cplusplus || defined _MSC_VER)
1178# else 1378int
1179int yyparse (YYPARSE_PARAM) 1379yyparse (void *YYPARSE_PARAM)
1180 void *YYPARSE_PARAM; 1380#else
1181# endif 1381int
1382yyparse (YYPARSE_PARAM)
1383 void *YYPARSE_PARAM;
1384#endif
1182#else /* ! YYPARSE_PARAM */ 1385#else /* ! YYPARSE_PARAM */
1183#if defined (__STDC__) || defined (__cplusplus) 1386#if (defined __STDC__ || defined __C99__FUNC__ \
1387 || defined __cplusplus || defined _MSC_VER)
1184int 1388int
1185yyparse (void) 1389yyparse (void)
1186#else 1390#else
1187int 1391int
1188yyparse () 1392yyparse ()
1189 ; 1393
1190#endif 1394#endif
1191#endif 1395#endif
1192{ 1396{
@@ -1198,6 +1402,12 @@ yyparse ()
1198 int yyerrstatus; 1402 int yyerrstatus;
1199 /* Look-ahead token as an internal (translated) token number. */ 1403 /* Look-ahead token as an internal (translated) token number. */
1200 int yytoken = 0; 1404 int yytoken = 0;
1405#if YYERROR_VERBOSE
1406 /* Buffer for error messages, and its allocated size. */
1407 char yymsgbuf[128];
1408 char *yymsg = yymsgbuf;
1409 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1410#endif
1201 1411
1202 /* Three stacks and their tools: 1412 /* Three stacks and their tools:
1203 `yyss': related to states, 1413 `yyss': related to states,
@@ -1208,9 +1418,9 @@ yyparse ()
1208 to reallocate them elsewhere. */ 1418 to reallocate them elsewhere. */
1209 1419
1210 /* The state stack. */ 1420 /* The state stack. */
1211 short int yyssa[YYINITDEPTH]; 1421 yytype_int16 yyssa[YYINITDEPTH];
1212 short int *yyss = yyssa; 1422 yytype_int16 *yyss = yyssa;
1213 short int *yyssp; 1423 yytype_int16 *yyssp;
1214 1424
1215 /* The semantic value stack. */ 1425 /* The semantic value stack. */
1216 YYSTYPE yyvsa[YYINITDEPTH]; 1426 YYSTYPE yyvsa[YYINITDEPTH];
@@ -1219,7 +1429,7 @@ yyparse ()
1219 1429
1220 1430
1221 1431
1222#define YYPOPSTACK (yyvsp--, yyssp--) 1432#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1223 1433
1224 YYSIZE_T yystacksize = YYINITDEPTH; 1434 YYSIZE_T yystacksize = YYINITDEPTH;
1225 1435
@@ -1228,9 +1438,9 @@ yyparse ()
1228 YYSTYPE yyval; 1438 YYSTYPE yyval;
1229 1439
1230 1440
1231 /* When reducing, the number of symbols on the RHS of the reduced 1441 /* The number of symbols on the RHS of the reduced rule.
1232 rule. */ 1442 Keep to zero when no symbol should be popped. */
1233 int yylen; 1443 int yylen = 0;
1234 1444
1235 YYDPRINTF ((stderr, "Starting parse\n")); 1445 YYDPRINTF ((stderr, "Starting parse\n"));
1236 1446
@@ -1254,8 +1464,7 @@ yyparse ()
1254`------------------------------------------------------------*/ 1464`------------------------------------------------------------*/
1255 yynewstate: 1465 yynewstate:
1256 /* In all cases, when you get here, the value and location stacks 1466 /* In all cases, when you get here, the value and location stacks
1257 have just been pushed. so pushing a state here evens the stacks. 1467 have just been pushed. So pushing a state here evens the stacks. */
1258 */
1259 yyssp++; 1468 yyssp++;
1260 1469
1261 yysetstate: 1470 yysetstate:
@@ -1268,11 +1477,11 @@ yyparse ()
1268 1477
1269#ifdef yyoverflow 1478#ifdef yyoverflow
1270 { 1479 {
1271 /* Give user a chance to reallocate the stack. Use copies of 1480 /* Give user a chance to reallocate the stack. Use copies of
1272 these so that the &'s don't force the real ones into 1481 these so that the &'s don't force the real ones into
1273 memory. */ 1482 memory. */
1274 YYSTYPE *yyvs1 = yyvs; 1483 YYSTYPE *yyvs1 = yyvs;
1275 short int *yyss1 = yyss; 1484 yytype_int16 *yyss1 = yyss;
1276 1485
1277 1486
1278 /* Each stack pointer address is followed by the size of the 1487 /* Each stack pointer address is followed by the size of the
@@ -1300,7 +1509,7 @@ yyparse ()
1300 yystacksize = YYMAXDEPTH; 1509 yystacksize = YYMAXDEPTH;
1301 1510
1302 { 1511 {
1303 short int *yyss1 = yyss; 1512 yytype_int16 *yyss1 = yyss;
1304 union yyalloc *yyptr = 1513 union yyalloc *yyptr =
1305 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1514 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1306 if (! yyptr) 1515 if (! yyptr)
@@ -1335,12 +1544,10 @@ yyparse ()
1335`-----------*/ 1544`-----------*/
1336yybackup: 1545yybackup:
1337 1546
1338/* Do appropriate processing given the current state. */ 1547 /* Do appropriate processing given the current state. Read a
1339/* Read a look-ahead token if we need one and don't already have one. */ 1548 look-ahead token if we need one and don't already have one. */
1340/* yyresume: */
1341 1549
1342 /* First try to decide what to do without reference to look-ahead token. */ 1550 /* First try to decide what to do without reference to look-ahead token. */
1343
1344 yyn = yypact[yystate]; 1551 yyn = yypact[yystate];
1345 if (yyn == YYPACT_NINF) 1552 if (yyn == YYPACT_NINF)
1346 goto yydefault; 1553 goto yydefault;
@@ -1382,22 +1589,21 @@ yybackup:
1382 if (yyn == YYFINAL) 1589 if (yyn == YYFINAL)
1383 YYACCEPT; 1590 YYACCEPT;
1384 1591
1592 /* Count tokens shifted since error; after three, turn off error
1593 status. */
1594 if (yyerrstatus)
1595 yyerrstatus--;
1596
1385 /* Shift the look-ahead token. */ 1597 /* Shift the look-ahead token. */
1386 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1598 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1387 1599
1388 /* Discard the token being shifted unless it is eof. */ 1600 /* Discard the shifted token unless it is eof. */
1389 if (yychar != YYEOF) 1601 if (yychar != YYEOF)
1390 yychar = YYEMPTY; 1602 yychar = YYEMPTY;
1391 1603
1604 yystate = yyn;
1392 *++yyvsp = yylval; 1605 *++yyvsp = yylval;
1393 1606
1394
1395 /* Count tokens shifted since error; after three, turn off error
1396 status. */
1397 if (yyerrstatus)
1398 yyerrstatus--;
1399
1400 yystate = yyn;
1401 goto yynewstate; 1607 goto yynewstate;
1402 1608
1403 1609
@@ -1439,13 +1645,13 @@ yyreduce:
1439 1645
1440 case 9: 1646 case 9:
1441 1647
1442 { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); ;} 1648 { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); ;}
1443 break; 1649 break;
1444 1650
1445 case 10: 1651 case 10:
1446 1652
1447 { 1653 {
1448 zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[-2].id)->name); 1654 zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name);
1449;} 1655;}
1450 break; 1656 break;
1451 1657
@@ -1456,7 +1662,7 @@ yyreduce:
1456 1662
1457 case 25: 1663 case 25:
1458 1664
1459 { zconf_error("unknown option \"%s\"", (yyvsp[-2].string)); ;} 1665 { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;}
1460 break; 1666 break;
1461 1667
1462 case 26: 1668 case 26:
@@ -1467,10 +1673,10 @@ yyreduce:
1467 case 27: 1673 case 27:
1468 1674
1469 { 1675 {
1470 struct symbol *sym = sym_lookup((yyvsp[-1].string), 0); 1676 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
1471 sym->flags |= SYMBOL_OPTIONAL; 1677 sym->flags |= SYMBOL_OPTIONAL;
1472 menu_add_entry(sym); 1678 menu_add_entry(sym);
1473 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 1679 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
1474;} 1680;}
1475 break; 1681 break;
1476 1682
@@ -1485,10 +1691,10 @@ yyreduce:
1485 case 29: 1691 case 29:
1486 1692
1487 { 1693 {
1488 struct symbol *sym = sym_lookup((yyvsp[-1].string), 0); 1694 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
1489 sym->flags |= SYMBOL_OPTIONAL; 1695 sym->flags |= SYMBOL_OPTIONAL;
1490 menu_add_entry(sym); 1696 menu_add_entry(sym);
1491 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 1697 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
1492;} 1698;}
1493 break; 1699 break;
1494 1700
@@ -1507,17 +1713,17 @@ yyreduce:
1507 case 38: 1713 case 38:
1508 1714
1509 { 1715 {
1510 menu_set_type((yyvsp[-2].id)->stype); 1716 menu_set_type((yyvsp[(1) - (3)].id)->stype);
1511 printd(DEBUG_PARSE, "%s:%d:type(%u)\n", 1717 printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
1512 zconf_curname(), zconf_lineno(), 1718 zconf_curname(), zconf_lineno(),
1513 (yyvsp[-2].id)->stype); 1719 (yyvsp[(1) - (3)].id)->stype);
1514;} 1720;}
1515 break; 1721 break;
1516 1722
1517 case 39: 1723 case 39:
1518 1724
1519 { 1725 {
1520 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); 1726 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
1521 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1727 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1522;} 1728;}
1523 break; 1729 break;
@@ -1525,19 +1731,19 @@ yyreduce:
1525 case 40: 1731 case 40:
1526 1732
1527 { 1733 {
1528 menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr)); 1734 menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr));
1529 if ((yyvsp[-3].id)->stype != S_UNKNOWN) 1735 if ((yyvsp[(1) - (4)].id)->stype != S_UNKNOWN)
1530 menu_set_type((yyvsp[-3].id)->stype); 1736 menu_set_type((yyvsp[(1) - (4)].id)->stype);
1531 printd(DEBUG_PARSE, "%s:%d:default(%u)\n", 1737 printd(DEBUG_PARSE, "%s:%d:default(%u)\n",
1532 zconf_curname(), zconf_lineno(), 1738 zconf_curname(), zconf_lineno(),
1533 (yyvsp[-3].id)->stype); 1739 (yyvsp[(1) - (4)].id)->stype);
1534;} 1740;}
1535 break; 1741 break;
1536 1742
1537 case 41: 1743 case 41:
1538 1744
1539 { 1745 {
1540 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); 1746 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
1541 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); 1747 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
1542;} 1748;}
1543 break; 1749 break;
@@ -1545,7 +1751,7 @@ yyreduce:
1545 case 42: 1751 case 42:
1546 1752
1547 { 1753 {
1548 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr)); 1754 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr));
1549 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); 1755 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
1550;} 1756;}
1551 break; 1757 break;
@@ -1553,12 +1759,12 @@ yyreduce:
1553 case 45: 1759 case 45:
1554 1760
1555 { 1761 {
1556 struct kconf_id *id = kconf_id_lookup((yyvsp[-1].string), strlen((yyvsp[-1].string))); 1762 struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
1557 if (id && id->flags & TF_OPTION) 1763 if (id && id->flags & TF_OPTION)
1558 menu_add_option(id->token, (yyvsp[0].string)); 1764 menu_add_option(id->token, (yyvsp[(3) - (3)].string));
1559 else 1765 else
1560 zconfprint("warning: ignoring unknown option %s", (yyvsp[-1].string)); 1766 zconfprint("warning: ignoring unknown option %s", (yyvsp[(2) - (3)].string));
1561 free((yyvsp[-1].string)); 1767 free((yyvsp[(2) - (3)].string));
1562;} 1768;}
1563 break; 1769 break;
1564 1770
@@ -1569,7 +1775,7 @@ yyreduce:
1569 1775
1570 case 47: 1776 case 47:
1571 1777
1572 { (yyval.string) = (yyvsp[0].string); ;} 1778 { (yyval.string) = (yyvsp[(2) - (2)].string); ;}
1573 break; 1779 break;
1574 1780
1575 case 48: 1781 case 48:
@@ -1593,7 +1799,7 @@ yyreduce:
1593 case 50: 1799 case 50:
1594 1800
1595 { 1801 {
1596 if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) { 1802 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) {
1597 menu_end_menu(); 1803 menu_end_menu();
1598 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); 1804 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
1599 } 1805 }
@@ -1603,7 +1809,7 @@ yyreduce:
1603 case 58: 1809 case 58:
1604 1810
1605 { 1811 {
1606 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); 1812 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
1607 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1813 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1608;} 1814;}
1609 break; 1815 break;
@@ -1611,11 +1817,11 @@ yyreduce:
1611 case 59: 1817 case 59:
1612 1818
1613 { 1819 {
1614 if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) { 1820 if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) {
1615 menu_set_type((yyvsp[-2].id)->stype); 1821 menu_set_type((yyvsp[(1) - (3)].id)->stype);
1616 printd(DEBUG_PARSE, "%s:%d:type(%u)\n", 1822 printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
1617 zconf_curname(), zconf_lineno(), 1823 zconf_curname(), zconf_lineno(),
1618 (yyvsp[-2].id)->stype); 1824 (yyvsp[(1) - (3)].id)->stype);
1619 } else 1825 } else
1620 YYERROR; 1826 YYERROR;
1621;} 1827;}
@@ -1632,8 +1838,8 @@ yyreduce:
1632 case 61: 1838 case 61:
1633 1839
1634 { 1840 {
1635 if ((yyvsp[-3].id)->stype == S_UNKNOWN) { 1841 if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) {
1636 menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); 1842 menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
1637 printd(DEBUG_PARSE, "%s:%d:default\n", 1843 printd(DEBUG_PARSE, "%s:%d:default\n",
1638 zconf_curname(), zconf_lineno()); 1844 zconf_curname(), zconf_lineno());
1639 } else 1845 } else
@@ -1646,7 +1852,7 @@ yyreduce:
1646 { 1852 {
1647 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); 1853 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
1648 menu_add_entry(NULL); 1854 menu_add_entry(NULL);
1649 menu_add_dep((yyvsp[-1].expr)); 1855 menu_add_dep((yyvsp[(2) - (3)].expr));
1650 (yyval.menu) = menu_add_menu(); 1856 (yyval.menu) = menu_add_menu();
1651;} 1857;}
1652 break; 1858 break;
@@ -1654,7 +1860,7 @@ yyreduce:
1654 case 65: 1860 case 65:
1655 1861
1656 { 1862 {
1657 if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) { 1863 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) {
1658 menu_end_menu(); 1864 menu_end_menu();
1659 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); 1865 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
1660 } 1866 }
@@ -1665,7 +1871,7 @@ yyreduce:
1665 1871
1666 { 1872 {
1667 menu_add_entry(NULL); 1873 menu_add_entry(NULL);
1668 menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); 1874 menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
1669 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 1875 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
1670;} 1876;}
1671 break; 1877 break;
@@ -1680,7 +1886,7 @@ yyreduce:
1680 case 73: 1886 case 73:
1681 1887
1682 { 1888 {
1683 if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) { 1889 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) {
1684 menu_end_menu(); 1890 menu_end_menu();
1685 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); 1891 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
1686 } 1892 }
@@ -1690,8 +1896,8 @@ yyreduce:
1690 case 79: 1896 case 79:
1691 1897
1692 { 1898 {
1693 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 1899 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
1694 zconf_nextfile((yyvsp[-1].string)); 1900 zconf_nextfile((yyvsp[(2) - (3)].string));
1695;} 1901;}
1696 break; 1902 break;
1697 1903
@@ -1699,7 +1905,7 @@ yyreduce:
1699 1905
1700 { 1906 {
1701 menu_add_entry(NULL); 1907 menu_add_entry(NULL);
1702 menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL); 1908 menu_add_prompt(P_COMMENT, (yyvsp[(2) - (3)].string), NULL);
1703 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 1909 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
1704;} 1910;}
1705 break; 1911 break;
@@ -1722,122 +1928,104 @@ yyreduce:
1722 case 83: 1928 case 83:
1723 1929
1724 { 1930 {
1725 current_entry->help = (yyvsp[0].string); 1931 current_entry->help = (yyvsp[(2) - (2)].string);
1726;} 1932;}
1727 break; 1933 break;
1728 1934
1729 case 88: 1935 case 88:
1730 1936
1731 { 1937 {
1732 menu_add_dep((yyvsp[-1].expr)); 1938 menu_add_dep((yyvsp[(3) - (4)].expr));
1733 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); 1939 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
1734;} 1940;}
1735 break; 1941 break;
1736 1942
1737 case 89: 1943 case 90:
1738 1944
1739 { 1945 {
1740 menu_add_dep((yyvsp[-1].expr)); 1946 menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr));
1741 printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
1742;} 1947;}
1743 break; 1948 break;
1744 1949
1745 case 90: 1950 case 93:
1746 1951
1747 { 1952 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
1748 menu_add_dep((yyvsp[-1].expr));
1749 printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
1750;}
1751 break; 1953 break;
1752 1954
1753 case 92: 1955 case 94:
1754 1956
1755 { 1957 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
1756 menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr));
1757;}
1758 break; 1958 break;
1759 1959
1760 case 95: 1960 case 95:
1761 1961
1762 { (yyval.id) = (yyvsp[-1].id); ;} 1962 { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
1763 break; 1963 break;
1764 1964
1765 case 96: 1965 case 98:
1766 1966
1767 { (yyval.id) = (yyvsp[-1].id); ;} 1967 { (yyval.expr) = NULL; ;}
1768 break; 1968 break;
1769 1969
1770 case 97: 1970 case 99:
1771 1971
1772 { (yyval.id) = (yyvsp[-1].id); ;} 1972 { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;}
1773 break; 1973 break;
1774 1974
1775 case 100: 1975 case 100:
1776 1976
1777 { (yyval.expr) = NULL; ;} 1977 { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;}
1778 break; 1978 break;
1779 1979
1780 case 101: 1980 case 101:
1781 1981
1782 { (yyval.expr) = (yyvsp[0].expr); ;} 1982 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
1783 break; 1983 break;
1784 1984
1785 case 102: 1985 case 102:
1786 1986
1787 { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); ;} 1987 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
1788 break; 1988 break;
1789 1989
1790 case 103: 1990 case 103:
1791 1991
1792 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} 1992 { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;}
1793 break; 1993 break;
1794 1994
1795 case 104: 1995 case 104:
1796 1996
1797 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} 1997 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;}
1798 break; 1998 break;
1799 1999
1800 case 105: 2000 case 105:
1801 2001
1802 { (yyval.expr) = (yyvsp[-1].expr); ;} 2002 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
1803 break; 2003 break;
1804 2004
1805 case 106: 2005 case 106:
1806 2006
1807 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); ;} 2007 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
1808 break; 2008 break;
1809 2009
1810 case 107: 2010 case 107:
1811 2011
1812 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} 2012 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;}
1813 break; 2013 break;
1814 2014
1815 case 108: 2015 case 108:
1816 2016
1817 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} 2017 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 1); free((yyvsp[(1) - (1)].string)); ;}
1818 break;
1819
1820 case 109:
1821
1822 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); ;}
1823 break; 2018 break;
1824 2019
1825 case 110:
1826
1827 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 1); free((yyvsp[0].string)); ;}
1828 break;
1829 2020
2021/* Line 1267 of yacc.c. */
1830 2022
1831 default: break; 2023 default: break;
1832 } 2024 }
2025 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1833 2026
1834/* Line 1126 of yacc.c. */ 2027 YYPOPSTACK (yylen);
1835 2028 yylen = 0;
1836
1837 yyvsp -= yylen;
1838 yyssp -= yylen;
1839
1840
1841 YY_STACK_PRINT (yyss, yyssp); 2029 YY_STACK_PRINT (yyss, yyssp);
1842 2030
1843 *++yyvsp = yyval; 2031 *++yyvsp = yyval;
@@ -1866,110 +2054,41 @@ yyerrlab:
1866 if (!yyerrstatus) 2054 if (!yyerrstatus)
1867 { 2055 {
1868 ++yynerrs; 2056 ++yynerrs;
1869#if YYERROR_VERBOSE 2057#if ! YYERROR_VERBOSE
1870 yyn = yypact[yystate]; 2058 yyerror (YY_("syntax error"));
1871 2059#else
1872 if (YYPACT_NINF < yyn && yyn < YYLAST) 2060 {
1873 { 2061 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1874 int yytype = YYTRANSLATE (yychar); 2062 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1875 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 2063 {
1876 YYSIZE_T yysize = yysize0; 2064 YYSIZE_T yyalloc = 2 * yysize;
1877 YYSIZE_T yysize1; 2065 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1878 int yysize_overflow = 0; 2066 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1879 char *yymsg = 0; 2067 if (yymsg != yymsgbuf)
1880# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 2068 YYSTACK_FREE (yymsg);
1881 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 2069 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1882 int yyx; 2070 if (yymsg)
1883 2071 yymsg_alloc = yyalloc;
1884#if 0 2072 else
1885 /* This is so xgettext sees the translatable formats that are
1886 constructed on the fly. */
1887 YY_("syntax error, unexpected %s");
1888 YY_("syntax error, unexpected %s, expecting %s");
1889 YY_("syntax error, unexpected %s, expecting %s or %s");
1890 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1891 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1892#endif
1893 char *yyfmt;
1894 char const *yyf;
1895 static char const yyunexpected[] = "syntax error, unexpected %s";
1896 static char const yyexpecting[] = ", expecting %s";
1897 static char const yyor[] = " or %s";
1898 char yyformat[sizeof yyunexpected
1899 + sizeof yyexpecting - 1
1900 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1901 * (sizeof yyor - 1))];
1902 char const *yyprefix = yyexpecting;
1903
1904 /* Start YYX at -YYN if negative to avoid negative indexes in
1905 YYCHECK. */
1906 int yyxbegin = yyn < 0 ? -yyn : 0;
1907
1908 /* Stay within bounds of both yycheck and yytname. */
1909 int yychecklim = YYLAST - yyn;
1910 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1911 int yycount = 1;
1912
1913 yyarg[0] = yytname[yytype];
1914 yyfmt = yystpcpy (yyformat, yyunexpected);
1915
1916 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1917 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1918 { 2073 {
1919 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 2074 yymsg = yymsgbuf;
1920 { 2075 yymsg_alloc = sizeof yymsgbuf;
1921 yycount = 1;
1922 yysize = yysize0;
1923 yyformat[sizeof yyunexpected - 1] = '\0';
1924 break;
1925 }
1926 yyarg[yycount++] = yytname[yyx];
1927 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1928 yysize_overflow |= yysize1 < yysize;
1929 yysize = yysize1;
1930 yyfmt = yystpcpy (yyfmt, yyprefix);
1931 yyprefix = yyor;
1932 } 2076 }
2077 }
1933 2078
1934 yyf = YY_(yyformat); 2079 if (0 < yysize && yysize <= yymsg_alloc)
1935 yysize1 = yysize + yystrlen (yyf); 2080 {
1936 yysize_overflow |= yysize1 < yysize; 2081 (void) yysyntax_error (yymsg, yystate, yychar);
1937 yysize = yysize1; 2082 yyerror (yymsg);
1938 2083 }
1939 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) 2084 else
1940 yymsg = (char *) YYSTACK_ALLOC (yysize); 2085 {
1941 if (yymsg) 2086 yyerror (YY_("syntax error"));
1942 { 2087 if (yysize != 0)
1943 /* Avoid sprintf, as that infringes on the user's name space.
1944 Don't have undefined behavior even if the translation
1945 produced a string with the wrong number of "%s"s. */
1946 char *yyp = yymsg;
1947 int yyi = 0;
1948 while ((*yyp = *yyf))
1949 {
1950 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1951 {
1952 yyp += yytnamerr (yyp, yyarg[yyi++]);
1953 yyf += 2;
1954 }
1955 else
1956 {
1957 yyp++;
1958 yyf++;
1959 }
1960 }
1961 yyerror (yymsg);
1962 YYSTACK_FREE (yymsg);
1963 }
1964 else
1965 {
1966 yyerror (YY_("syntax error"));
1967 goto yyexhaustedlab; 2088 goto yyexhaustedlab;
1968 } 2089 }
1969 } 2090 }
1970 else 2091#endif
1971#endif /* YYERROR_VERBOSE */
1972 yyerror (YY_("syntax error"));
1973 } 2092 }
1974 2093
1975 2094
@@ -1980,14 +2099,15 @@ yyerrlab:
1980 error, discard it. */ 2099 error, discard it. */
1981 2100
1982 if (yychar <= YYEOF) 2101 if (yychar <= YYEOF)
1983 { 2102 {
1984 /* Return failure if at end of input. */ 2103 /* Return failure if at end of input. */
1985 if (yychar == YYEOF) 2104 if (yychar == YYEOF)
1986 YYABORT; 2105 YYABORT;
1987 } 2106 }
1988 else 2107 else
1989 { 2108 {
1990 yydestruct ("Error: discarding", yytoken, &yylval); 2109 yydestruct ("Error: discarding",
2110 yytoken, &yylval);
1991 yychar = YYEMPTY; 2111 yychar = YYEMPTY;
1992 } 2112 }
1993 } 2113 }
@@ -2005,11 +2125,14 @@ yyerrorlab:
2005 /* Pacify compilers like GCC when the user code never invokes 2125 /* Pacify compilers like GCC when the user code never invokes
2006 YYERROR and the label yyerrorlab therefore never appears in user 2126 YYERROR and the label yyerrorlab therefore never appears in user
2007 code. */ 2127 code. */
2008 if (0) 2128 if (/*CONSTCOND*/ 0)
2009 goto yyerrorlab; 2129 goto yyerrorlab;
2010 2130
2011yyvsp -= yylen; 2131 /* Do not reclaim the symbols of the rule which action triggered
2012 yyssp -= yylen; 2132 this YYERROR. */
2133 YYPOPSTACK (yylen);
2134 yylen = 0;
2135 YY_STACK_PRINT (yyss, yyssp);
2013 yystate = *yyssp; 2136 yystate = *yyssp;
2014 goto yyerrlab1; 2137 goto yyerrlab1;
2015 2138
@@ -2039,8 +2162,9 @@ yyerrlab1:
2039 YYABORT; 2162 YYABORT;
2040 2163
2041 2164
2042 yydestruct ("Error: popping", yystos[yystate], yyvsp); 2165 yydestruct ("Error: popping",
2043 YYPOPSTACK; 2166 yystos[yystate], yyvsp);
2167 YYPOPSTACK (1);
2044 yystate = *yyssp; 2168 yystate = *yyssp;
2045 YY_STACK_PRINT (yyss, yyssp); 2169 YY_STACK_PRINT (yyss, yyssp);
2046 } 2170 }
@@ -2051,7 +2175,7 @@ yyerrlab1:
2051 *++yyvsp = yylval; 2175 *++yyvsp = yylval;
2052 2176
2053 2177
2054 /* Shift the error token. */ 2178 /* Shift the error token. */
2055 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 2179 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2056 2180
2057 yystate = yyn; 2181 yystate = yyn;
@@ -2086,17 +2210,26 @@ yyreturn:
2086 if (yychar != YYEOF && yychar != YYEMPTY) 2210 if (yychar != YYEOF && yychar != YYEMPTY)
2087 yydestruct ("Cleanup: discarding lookahead", 2211 yydestruct ("Cleanup: discarding lookahead",
2088 yytoken, &yylval); 2212 yytoken, &yylval);
2213 /* Do not reclaim the symbols of the rule which action triggered
2214 this YYABORT or YYACCEPT. */
2215 YYPOPSTACK (yylen);
2216 YY_STACK_PRINT (yyss, yyssp);
2089 while (yyssp != yyss) 2217 while (yyssp != yyss)
2090 { 2218 {
2091 yydestruct ("Cleanup: popping", 2219 yydestruct ("Cleanup: popping",
2092 yystos[*yyssp], yyvsp); 2220 yystos[*yyssp], yyvsp);
2093 YYPOPSTACK; 2221 YYPOPSTACK (1);
2094 } 2222 }
2095#ifndef yyoverflow 2223#ifndef yyoverflow
2096 if (yyss != yyssa) 2224 if (yyss != yyssa)
2097 YYSTACK_FREE (yyss); 2225 YYSTACK_FREE (yyss);
2098#endif 2226#endif
2099 return yyresult; 2227#if YYERROR_VERBOSE
2228 if (yymsg != yymsgbuf)
2229 YYSTACK_FREE (yymsg);
2230#endif
2231 /* Make sure YYID is used. */
2232 return YYID (yyresult);
2100} 2233}
2101 2234
2102 2235
@@ -2344,4 +2477,3 @@ void zconfdump(FILE *out)
2344#include "symbol.c" 2477#include "symbol.c"
2345#include "menu.c" 2478#include "menu.c"
2346 2479
2347
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 79db4cf22a51..d9b96ba8e38c 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -64,7 +64,6 @@ static struct menu *current_menu, *current_entry;
64%token <id>T_IF 64%token <id>T_IF
65%token <id>T_ENDIF 65%token <id>T_ENDIF
66%token <id>T_DEPENDS 66%token <id>T_DEPENDS
67%token <id>T_REQUIRES
68%token <id>T_OPTIONAL 67%token <id>T_OPTIONAL
69%token <id>T_PROMPT 68%token <id>T_PROMPT
70%token <id>T_TYPE 69%token <id>T_TYPE
@@ -418,16 +417,6 @@ depends: T_DEPENDS T_ON expr T_EOL
418{ 417{
419 menu_add_dep($3); 418 menu_add_dep($3);
420 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); 419 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
421}
422 | T_DEPENDS expr T_EOL
423{
424 menu_add_dep($2);
425 printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
426}
427 | T_REQUIRES expr T_EOL
428{
429 menu_add_dep($2);
430 printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
431}; 420};
432 421
433/* prompt statement */ 422/* prompt statement */
diff --git a/scripts/makelst b/scripts/makelst
index 4fc80f2b7e19..e6581496d820 100755
--- a/scripts/makelst
+++ b/scripts/makelst
@@ -3,8 +3,8 @@
3# with correct relocations from System.map 3# with correct relocations from System.map
4# Requires the following lines in makefile: 4# Requires the following lines in makefile:
5#%.lst: %.c 5#%.lst: %.c
6# $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -g -c -o $*.o $< 6# $(CC) $(c_flags) -g -c -o $*.o $< &&
7# $(srctree)/scripts/makelst $*.o $(objtree)/System.map $(OBJDUMP) 7# $(srctree)/scripts/makelst $*.o System.map $(OBJDUMP) > $@
8# 8#
9# Copyright (C) 2000 IBM Corporation 9# Copyright (C) 2000 IBM Corporation
10# Author(s): DJ Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) 10# Author(s): DJ Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index 7f9d544f9b6c..ee39facee152 100644
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -26,11 +26,13 @@ MAKEFLAGS += --no-print-directory
26 26
27.PHONY: all \$(MAKECMDGOALS) 27.PHONY: all \$(MAKECMDGOALS)
28 28
29all := \$(filter-out all Makefile,\$(MAKECMDGOALS))
30
29all: 31all:
30 \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) 32 \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$(all)
31 33
32Makefile:; 34Makefile:;
33 35
34\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/: 36\$(all) %/: all
35 \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@ 37 @:
36EOF 38EOF
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 494435ca88fa..91c15da2680b 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -55,10 +55,14 @@ do { \
55 * Check that sizeof(device_id type) are consistent with size of section 55 * Check that sizeof(device_id type) are consistent with size of section
56 * in .o file. If in-consistent then userspace and kernel does not agree 56 * in .o file. If in-consistent then userspace and kernel does not agree
57 * on actual size which is a bug. 57 * on actual size which is a bug.
58 * Also verify that the final entry in the table is all zeros.
58 **/ 59 **/
59static void device_id_size_check(const char *modname, const char *device_id, 60static void device_id_check(const char *modname, const char *device_id,
60 unsigned long size, unsigned long id_size) 61 unsigned long size, unsigned long id_size,
62 void *symval)
61{ 63{
64 int i;
65
62 if (size % id_size || size < id_size) { 66 if (size % id_size || size < id_size) {
63 fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo " 67 fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
64 "of the size of section __mod_%s_device_table=%lu.\n" 68 "of the size of section __mod_%s_device_table=%lu.\n"
@@ -66,6 +70,20 @@ static void device_id_size_check(const char *modname, const char *device_id,
66 "in mod_devicetable.h\n", 70 "in mod_devicetable.h\n",
67 modname, device_id, id_size, device_id, size, device_id); 71 modname, device_id, id_size, device_id, size, device_id);
68 } 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 }
86 }
69} 87}
70 88
71/* USB is special because the bcdDevice can be matched against a numeric range */ 89/* USB is special because the bcdDevice can be matched against a numeric range */
@@ -168,7 +186,7 @@ static void do_usb_table(void *symval, unsigned long size,
168 unsigned int i; 186 unsigned int i;
169 const unsigned long id_size = sizeof(struct usb_device_id); 187 const unsigned long id_size = sizeof(struct usb_device_id);
170 188
171 device_id_size_check(mod->name, "usb", size, id_size); 189 device_id_check(mod->name, "usb", size, id_size, symval);
172 190
173 /* Leave last one: it's the terminator. */ 191 /* Leave last one: it's the terminator. */
174 size -= id_size; 192 size -= id_size;
@@ -528,7 +546,7 @@ static void do_table(void *symval, unsigned long size,
528 char alias[500]; 546 char alias[500];
529 int (*do_entry)(const char *, void *entry, char *alias) = function; 547 int (*do_entry)(const char *, void *entry, char *alias) = function;
530 548
531 device_id_size_check(mod->name, device_id, size, id_size); 549 device_id_check(mod->name, device_id, size, id_size, symval);
532 /* Leave last one: it's the terminator. */ 550 /* Leave last one: it's the terminator. */
533 size -= id_size; 551 size -= id_size;
534 552
@@ -550,14 +568,21 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
550 Elf_Sym *sym, const char *symname) 568 Elf_Sym *sym, const char *symname)
551{ 569{
552 void *symval; 570 void *symval;
571 char *zeros = NULL;
553 572
554 /* We're looking for a section relative symbol */ 573 /* We're looking for a section relative symbol */
555 if (!sym->st_shndx || sym->st_shndx >= info->hdr->e_shnum) 574 if (!sym->st_shndx || sym->st_shndx >= info->hdr->e_shnum)
556 return; 575 return;
557 576
558 symval = (void *)info->hdr 577 /* Handle all-NULL symbols allocated into .bss */
559 + info->sechdrs[sym->st_shndx].sh_offset 578 if (info->sechdrs[sym->st_shndx].sh_type & SHT_NOBITS) {
560 + sym->st_value; 579 zeros = calloc(1, sym->st_size);
580 symval = zeros;
581 } else {
582 symval = (void *)info->hdr
583 + info->sechdrs[sym->st_shndx].sh_offset
584 + sym->st_value;
585 }
561 586
562 if (sym_is(symname, "__mod_pci_device_table")) 587 if (sym_is(symname, "__mod_pci_device_table"))
563 do_table(symval, sym->st_size, 588 do_table(symval, sym->st_size,
@@ -626,6 +651,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
626 do_table(symval, sym->st_size, 651 do_table(symval, sym->st_size,
627 sizeof(struct ssb_device_id), "ssb", 652 sizeof(struct ssb_device_id), "ssb",
628 do_ssb_entry, mod); 653 do_ssb_entry, mod);
654 free(zeros);
629} 655}
630 656
631/* Now add out buffered information to the generated C source */ 657/* Now add out buffered information to the generated C source */
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 0a4051fbd34e..2ef9a193fcae 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -381,6 +381,12 @@ static int parse_elf(struct elf_info *info, const char *filename)
381 sechdrs = (void *)hdr + hdr->e_shoff; 381 sechdrs = (void *)hdr + hdr->e_shoff;
382 info->sechdrs = sechdrs; 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 /* Fix endianness in section headers */ 390 /* Fix endianness in section headers */
385 for (i = 0; i < hdr->e_shnum; i++) { 391 for (i = 0; i < hdr->e_shnum; i++) {
386 sechdrs[i].sh_type = TO_NATIVE(sechdrs[i].sh_type); 392 sechdrs[i].sh_type = TO_NATIVE(sechdrs[i].sh_type);
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
index 4156dd34c5de..0ffed17ec20c 100644
--- a/scripts/mod/modpost.h
+++ b/scripts/mod/modpost.h
@@ -17,7 +17,7 @@
17#define Elf_Shdr Elf32_Shdr 17#define Elf_Shdr Elf32_Shdr
18#define Elf_Sym Elf32_Sym 18#define Elf_Sym Elf32_Sym
19#define Elf_Addr Elf32_Addr 19#define Elf_Addr Elf32_Addr
20#define Elf_Section Elf32_Section 20#define Elf_Section Elf32_Half
21#define ELF_ST_BIND ELF32_ST_BIND 21#define ELF_ST_BIND ELF32_ST_BIND
22#define ELF_ST_TYPE ELF32_ST_TYPE 22#define ELF_ST_TYPE ELF32_ST_TYPE
23 23
@@ -31,7 +31,7 @@
31#define Elf_Shdr Elf64_Shdr 31#define Elf_Shdr Elf64_Shdr
32#define Elf_Sym Elf64_Sym 32#define Elf_Sym Elf64_Sym
33#define Elf_Addr Elf64_Addr 33#define Elf_Addr Elf64_Addr
34#define Elf_Section Elf64_Section 34#define Elf_Section Elf64_Half
35#define ELF_ST_BIND ELF64_ST_BIND 35#define ELF_ST_BIND ELF64_ST_BIND
36#define ELF_ST_TYPE ELF64_ST_TYPE 36#define ELF_ST_TYPE ELF64_ST_TYPE
37 37
diff --git a/scripts/ver_linux b/scripts/ver_linux
index 8f8df93141a9..ab69ecefedbd 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -21,9 +21,7 @@ gcc --version 2>&1| grep gcc | awk \
21make --version 2>&1 | awk -F, '{print $1}' | awk \ 21make --version 2>&1 | awk -F, '{print $1}' | awk \
22 '/GNU Make/{print "Gnu make ",$NF}' 22 '/GNU Make/{print "Gnu make ",$NF}'
23 23
24ld -v | awk -F\) '{print $1}' | awk \ 24echo "binutils $(ld -v | egrep -o '[0-9]+\.[0-9\.]+')"
25'/BFD/{print "binutils ",$NF} \
26/^GNU/{print "binutils ",$4}'
27 25
28echo -n "util-linux " 26echo -n "util-linux "
29fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$// 27fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//
@@ -65,9 +63,8 @@ isdnctrl 2>&1 | grep version | awk \
65showmount --version 2>&1 | grep nfs-utils | awk \ 63showmount --version 2>&1 | grep nfs-utils | awk \
66'NR==1{print "nfs-utils ", $NF}' 64'NR==1{print "nfs-utils ", $NF}'
67 65
68ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \ 66echo -n "Linux C Library "
69-e 's/\.so$//' | sed -e 's/>//' | \ 67sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps
70awk -F'[.-]' '{print "Linux C Library "$(NF-1)"."$NF}'
71 68
72ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \ 69ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
73'NR==1{print "Dynamic linker (ldd) ", $NF}' 70'NR==1{print "Dynamic linker (ldd) ", $NF}'