aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.build98
-rw-r--r--scripts/Makefile.extrawarn1
-rw-r--r--scripts/Makefile.kasan2
-rw-r--r--scripts/Makefile.ubsan4
-rwxr-xr-xscripts/adjust_autoksyms.sh1
-rwxr-xr-xscripts/bloat-o-meter28
-rwxr-xr-xscripts/checkkconfigsymbols.py2
-rwxr-xr-xscripts/checkpatch.pl60
-rw-r--r--scripts/coccinelle/misc/boolconv.cocci90
-rw-r--r--scripts/coccinelle/misc/irqf_oneshot.cocci52
-rwxr-xr-xscripts/decode_stacktrace.sh3
-rwxr-xr-xscripts/faddr2line33
-rw-r--r--scripts/gcc-plugins/latent_entropy_plugin.c2
-rw-r--r--scripts/gcc-plugins/sancov_plugin.c2
-rwxr-xr-xscripts/gcc-x86_64-has-stack-protector.sh2
-rw-r--r--scripts/genksyms/keywords.gperf1
-rw-r--r--scripts/genksyms/keywords.hash.c_shipped59
-rw-r--r--scripts/genksyms/parse.tab.c_shipped676
-rw-r--r--scripts/genksyms/parse.tab.h_shipped33
-rw-r--r--scripts/genksyms/parse.y2
-rwxr-xr-xscripts/get_maintainer.pl12
-rw-r--r--scripts/kallsyms.c1
-rw-r--r--scripts/kconfig/Makefile2
-rw-r--r--scripts/kconfig/expr.h2
-rw-r--r--scripts/kconfig/menu.c55
-rw-r--r--scripts/kconfig/nconf.c2
-rw-r--r--scripts/kconfig/nconf.gui.c15
-rw-r--r--scripts/kconfig/qconf.cc19
-rw-r--r--scripts/kconfig/symbol.c24
-rw-r--r--scripts/kconfig/zconf.gperf1
-rw-r--r--scripts/kconfig/zconf.hash.c_shipped30
-rw-r--r--scripts/kconfig/zconf.tab.c_shipped1581
-rw-r--r--scripts/kconfig/zconf.y16
-rwxr-xr-xscripts/link-vmlinux.sh37
-rw-r--r--scripts/mod/modpost.c8
-rwxr-xr-xscripts/package/builddeb2
-rwxr-xr-xscripts/package/mkspec3
-rw-r--r--scripts/recordmcount.c65
-rw-r--r--scripts/selinux/genheaders/Makefile4
-rw-r--r--scripts/selinux/genheaders/genheaders.c4
-rw-r--r--scripts/selinux/mdp/Makefile4
-rw-r--r--scripts/selinux/mdp/mdp.c4
-rw-r--r--[-rwxr-xr-x]scripts/sign-file.c2
-rw-r--r--scripts/sortextable.c2
-rwxr-xr-xscripts/tags.sh19
45 files changed, 1697 insertions, 1368 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index de46ab03f063..eadcd4d359d9 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -159,7 +159,8 @@ cmd_cpp_i_c = $(CPP) $(c_flags) -o $@ $<
159$(obj)/%.i: $(src)/%.c FORCE 159$(obj)/%.i: $(src)/%.c FORCE
160 $(call if_changed_dep,cpp_i_c) 160 $(call if_changed_dep,cpp_i_c)
161 161
162cmd_gensymtypes = \ 162# These mirror gensymtypes_S and co below, keep them in synch.
163cmd_gensymtypes_c = \
163 $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ 164 $(CPP) -D__GENKSYMS__ $(c_flags) $< | \
164 $(GENKSYMS) $(if $(1), -T $(2)) \ 165 $(GENKSYMS) $(if $(1), -T $(2)) \
165 $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX)) \ 166 $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX)) \
@@ -169,7 +170,7 @@ cmd_gensymtypes = \
169quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ 170quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@
170cmd_cc_symtypes_c = \ 171cmd_cc_symtypes_c = \
171 set -e; \ 172 set -e; \
172 $(call cmd_gensymtypes,true,$@) >/dev/null; \ 173 $(call cmd_gensymtypes_c,true,$@) >/dev/null; \
173 test -s $@ || rm -f $@ 174 test -s $@ || rm -f $@
174 175
175$(obj)/%.symtypes : $(src)/%.c FORCE 176$(obj)/%.symtypes : $(src)/%.c FORCE
@@ -198,9 +199,10 @@ else
198# the actual value of the checksum generated by genksyms 199# the actual value of the checksum generated by genksyms
199 200
200cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< 201cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $<
201cmd_modversions = \ 202
203cmd_modversions_c = \
202 if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ 204 if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
203 $(call cmd_gensymtypes,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ 205 $(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
204 > $(@D)/.tmp_$(@F:.o=.ver); \ 206 > $(@D)/.tmp_$(@F:.o=.ver); \
205 \ 207 \
206 $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ 208 $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
@@ -268,13 +270,14 @@ endif # CONFIG_STACK_VALIDATION
268define rule_cc_o_c 270define rule_cc_o_c
269 $(call echo-cmd,checksrc) $(cmd_checksrc) \ 271 $(call echo-cmd,checksrc) $(cmd_checksrc) \
270 $(call cmd_and_fixdep,cc_o_c) \ 272 $(call cmd_and_fixdep,cc_o_c) \
271 $(cmd_modversions) \ 273 $(cmd_modversions_c) \
272 $(cmd_objtool) \ 274 $(cmd_objtool) \
273 $(call echo-cmd,record_mcount) $(cmd_record_mcount) 275 $(call echo-cmd,record_mcount) $(cmd_record_mcount)
274endef 276endef
275 277
276define rule_as_o_S 278define rule_as_o_S
277 $(call cmd_and_fixdep,as_o_S) \ 279 $(call cmd_and_fixdep,as_o_S) \
280 $(cmd_modversions_S) \
278 $(cmd_objtool) 281 $(cmd_objtool)
279endef 282endef
280 283
@@ -314,6 +317,39 @@ modkern_aflags := $(KBUILD_AFLAGS_KERNEL) $(AFLAGS_KERNEL)
314$(real-objs-m) : modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) 317$(real-objs-m) : modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE)
315$(real-objs-m:.o=.s): modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) 318$(real-objs-m:.o=.s): modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE)
316 319
320# .S file exports must have their C prototypes defined in asm/asm-prototypes.h
321# or a file that it includes, in order to get versioned symbols. We build a
322# dummy C file that includes asm-prototypes and the EXPORT_SYMBOL lines from
323# the .S file (with trailing ';'), and run genksyms on that, to extract vers.
324#
325# This is convoluted. The .S file must first be preprocessed to run guards and
326# expand names, then the resulting exports must be constructed into plain
327# EXPORT_SYMBOL(symbol); to build our dummy C file, and that gets preprocessed
328# to make the genksyms input.
329#
330# These mirror gensymtypes_c and co above, keep them in synch.
331cmd_gensymtypes_S = \
332 (echo "\#include <linux/kernel.h>" ; \
333 echo "\#include <asm/asm-prototypes.h>" ; \
334 $(CPP) $(a_flags) $< | \
335 grep "\<___EXPORT_SYMBOL\>" | \
336 sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ) | \
337 $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | \
338 $(GENKSYMS) $(if $(1), -T $(2)) \
339 $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX)) \
340 $(if $(KBUILD_PRESERVE),-p) \
341 -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null))
342
343quiet_cmd_cc_symtypes_S = SYM $(quiet_modtag) $@
344cmd_cc_symtypes_S = \
345 set -e; \
346 $(call cmd_gensymtypes_S,true,$@) >/dev/null; \
347 test -s $@ || rm -f $@
348
349$(obj)/%.symtypes : $(src)/%.S FORCE
350 $(call cmd,cc_symtypes_S)
351
352
317quiet_cmd_cpp_s_S = CPP $(quiet_modtag) $@ 353quiet_cmd_cpp_s_S = CPP $(quiet_modtag) $@
318cmd_cpp_s_S = $(CPP) $(a_flags) -o $@ $< 354cmd_cpp_s_S = $(CPP) $(a_flags) -o $@ $<
319 355
@@ -321,7 +357,37 @@ $(obj)/%.s: $(src)/%.S FORCE
321 $(call if_changed_dep,cpp_s_S) 357 $(call if_changed_dep,cpp_s_S)
322 358
323quiet_cmd_as_o_S = AS $(quiet_modtag) $@ 359quiet_cmd_as_o_S = AS $(quiet_modtag) $@
324cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< 360
361ifndef CONFIG_MODVERSIONS
362cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $<
363
364else
365
366ASM_PROTOTYPES := $(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/asm-prototypes.h)
367
368ifeq ($(ASM_PROTOTYPES),)
369cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $<
370
371else
372
373# versioning matches the C process described above, with difference that
374# we parse asm-prototypes.h C header to get function definitions.
375
376cmd_as_o_S = $(CC) $(a_flags) -c -o $(@D)/.tmp_$(@F) $<
377
378cmd_modversions_S = \
379 if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
380 $(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
381 > $(@D)/.tmp_$(@F:.o=.ver); \
382 \
383 $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
384 -T $(@D)/.tmp_$(@F:.o=.ver); \
385 rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \
386 else \
387 mv -f $(@D)/.tmp_$(@F) $@; \
388 fi;
389endif
390endif
325 391
326$(obj)/%.o: $(src)/%.S $(objtool_obj) FORCE 392$(obj)/%.o: $(src)/%.S $(objtool_obj) FORCE
327 $(call if_changed_rule,as_o_S) 393 $(call if_changed_rule,as_o_S)
@@ -422,14 +488,17 @@ endif
422 488
423quiet_cmd_export_list = EXPORTS $@ 489quiet_cmd_export_list = EXPORTS $@
424cmd_export_list = $(OBJDUMP) -h $< | \ 490cmd_export_list = $(OBJDUMP) -h $< | \
425 sed -ne '/___ksymtab/{s/.*+/$(ref_prefix)/;s/ .*/)/;p}' >$(ksyms-lds);\ 491 sed -ne '/___ksymtab/s/.*+\([^ ]*\).*/$(ref_prefix)\1)/p' >$(ksyms-lds);\
426 rm -f $(dummy-object);\ 492 rm -f $(dummy-object);\
427 $(AR) rcs$(KBUILD_ARFLAGS) $(dummy-object);\ 493 echo | $(CC) $(a_flags) -c -o $(dummy-object) -x assembler -;\
428 $(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\ 494 $(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\
429 rm $(dummy-object) $(ksyms-lds) 495 rm $(dummy-object) $(ksyms-lds)
430 496
431$(obj)/lib-ksyms.o: $(lib-target) FORCE 497$(obj)/lib-ksyms.o: $(lib-target) FORCE
432 $(call if_changed,export_list) 498 $(call if_changed,export_list)
499
500targets += $(obj)/lib-ksyms.o
501
433endif 502endif
434 503
435# 504#
@@ -448,11 +517,18 @@ $($(subst $(obj)/,,$(@:.o=-objs))) \
448$($(subst $(obj)/,,$(@:.o=-y))) \ 517$($(subst $(obj)/,,$(@:.o=-y))) \
449$($(subst $(obj)/,,$(@:.o=-m)))), $^) 518$($(subst $(obj)/,,$(@:.o=-m)))), $^)
450 519
451quiet_cmd_link_multi-y = LD $@ 520cmd_link_multi-link = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis)
452cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) 521
522ifdef CONFIG_THIN_ARCHIVES
523 quiet_cmd_link_multi-y = AR $@
524 cmd_link_multi-y = rm -f $@; $(AR) rcST$(KBUILD_ARFLAGS) $@ $(link_multi_deps)
525else
526 quiet_cmd_link_multi-y = LD $@
527 cmd_link_multi-y = $(cmd_link_multi-link)
528endif
453 529
454quiet_cmd_link_multi-m = LD [M] $@ 530quiet_cmd_link_multi-m = LD [M] $@
455cmd_link_multi-m = $(cmd_link_multi-y) 531cmd_link_multi-m = $(cmd_link_multi-link)
456 532
457$(multi-used-y): FORCE 533$(multi-used-y): FORCE
458 $(call if_changed,link_multi-y) 534 $(call if_changed,link_multi-y)
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 53449a6ff6aa..7c321a603b07 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -36,6 +36,7 @@ warning-2 += -Wshadow
36warning-2 += $(call cc-option, -Wlogical-op) 36warning-2 += $(call cc-option, -Wlogical-op)
37warning-2 += $(call cc-option, -Wmissing-field-initializers) 37warning-2 += $(call cc-option, -Wmissing-field-initializers)
38warning-2 += $(call cc-option, -Wsign-compare) 38warning-2 += $(call cc-option, -Wsign-compare)
39warning-2 += $(call cc-option, -Wmaybe-uninitialized)
39 40
40warning-3 := -Wbad-function-cast 41warning-3 := -Wbad-function-cast
41warning-3 += -Wcast-qual 42warning-3 += -Wcast-qual
diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan
index 37323b0df374..9576775a86f6 100644
--- a/scripts/Makefile.kasan
+++ b/scripts/Makefile.kasan
@@ -28,4 +28,6 @@ else
28 CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL) 28 CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL)
29 endif 29 endif
30endif 30endif
31
32CFLAGS_KASAN += $(call cc-option, -fsanitize-address-use-after-scope)
31endif 33endif
diff --git a/scripts/Makefile.ubsan b/scripts/Makefile.ubsan
index dd779c40c8e6..3b1b13818d59 100644
--- a/scripts/Makefile.ubsan
+++ b/scripts/Makefile.ubsan
@@ -17,4 +17,8 @@ endif
17ifdef CONFIG_UBSAN_NULL 17ifdef CONFIG_UBSAN_NULL
18 CFLAGS_UBSAN += $(call cc-option, -fsanitize=null) 18 CFLAGS_UBSAN += $(call cc-option, -fsanitize=null)
19endif 19endif
20
21 # -fsanitize=* options makes GCC less smart than usual and
22 # increase number of 'maybe-uninitialized false-positives
23 CFLAGS_UBSAN += $(call cc-option, -Wno-maybe-uninitialized)
20endif 24endif
diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh
index 8dc1918b6783..513da1a4a2da 100755
--- a/scripts/adjust_autoksyms.sh
+++ b/scripts/adjust_autoksyms.sh
@@ -59,6 +59,7 @@ cat > "$new_ksyms_file" << EOT
59 */ 59 */
60 60
61EOT 61EOT
62[ "$(ls -A "$MODVERDIR")" ] &&
62sed -ns -e '3{s/ /\n/g;/^$/!p;}' "$MODVERDIR"/*.mod | sort -u | 63sed -ns -e '3{s/ /\n/g;/^$/!p;}' "$MODVERDIR"/*.mod | sort -u |
63while read sym; do 64while read sym; do
64 if [ -n "$CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX" ]; then 65 if [ -n "$CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX" ]; then
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index 19f5adfd877d..a27677146410 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -8,24 +8,30 @@
8# of the GNU General Public License, incorporated herein by reference. 8# of the GNU General Public License, incorporated herein by reference.
9 9
10import sys, os, re 10import sys, os, re
11from signal import signal, SIGPIPE, SIG_DFL
12
13signal(SIGPIPE, SIG_DFL)
11 14
12if len(sys.argv) != 3: 15if len(sys.argv) != 3:
13 sys.stderr.write("usage: %s file1 file2\n" % sys.argv[0]) 16 sys.stderr.write("usage: %s file1 file2\n" % sys.argv[0])
14 sys.exit(-1) 17 sys.exit(-1)
15 18
19re_NUMBER = re.compile(r'\.[0-9]+')
20
16def getsizes(file): 21def getsizes(file):
17 sym = {} 22 sym = {}
18 for l in os.popen("nm --size-sort " + file).readlines(): 23 with os.popen("nm --size-sort " + file) as f:
19 size, type, name = l[:-1].split() 24 for line in f:
20 if type in "tTdDbBrR": 25 size, type, name = line.split()
21 # strip generated symbols 26 if type in "tTdDbBrR":
22 if name.startswith("__mod_"): continue 27 # strip generated symbols
23 if name.startswith("SyS_"): continue 28 if name.startswith("__mod_"): continue
24 if name.startswith("compat_SyS_"): continue 29 if name.startswith("SyS_"): continue
25 if name == "linux_banner": continue 30 if name.startswith("compat_SyS_"): continue
26 # statics and some other optimizations adds random .NUMBER 31 if name == "linux_banner": continue
27 name = re.sub(r'\.[0-9]+', '', name) 32 # statics and some other optimizations adds random .NUMBER
28 sym[name] = sym.get(name, 0) + int(size, 16) 33 name = re_NUMBER.sub('', name)
34 sym[name] = sym.get(name, 0) + int(size, 16)
29 return sym 35 return sym
30 36
31old = getsizes(sys.argv[1]) 37old = getsizes(sys.argv[1])
diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py
index a32e4da4c117..3820f00b066a 100755
--- a/scripts/checkkconfigsymbols.py
+++ b/scripts/checkkconfigsymbols.py
@@ -88,7 +88,7 @@ def parse_options():
88 if args.commit and args.diff: 88 if args.commit and args.diff:
89 sys.exit("Please specify only one option at once.") 89 sys.exit("Please specify only one option at once.")
90 90
91 if args.diff and not re.match(r"^[\w\-\.]+\.\.[\w\-\.]+$", args.diff): 91 if args.diff and not re.match(r"^[\w\-\.\^]+\.\.[\w\-\.\^]+$", args.diff):
92 sys.exit("Please specify valid input in the following format: " 92 sys.exit("Please specify valid input in the following format: "
93 "\'commit1..commit2\'") 93 "\'commit1..commit2\'")
94 94
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d0c729ccec20..982c52ca6473 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -335,7 +335,7 @@ our $Attribute = qr{
335 __percpu| 335 __percpu|
336 __nocast| 336 __nocast|
337 __safe| 337 __safe|
338 __bitwise__| 338 __bitwise|
339 __packed__| 339 __packed__|
340 __packed2__| 340 __packed2__|
341 __naked| 341 __naked|
@@ -761,7 +761,7 @@ sub seed_camelcase_file {
761sub is_maintained_obsolete { 761sub is_maintained_obsolete {
762 my ($filename) = @_; 762 my ($filename) = @_;
763 763
764 return 0 if (!(-e "$root/scripts/get_maintainer.pl")); 764 return 0 if (!$tree || !(-e "$root/scripts/get_maintainer.pl"));
765 765
766 my $status = `perl $root/scripts/get_maintainer.pl --status --nom --nol --nogit --nogit-fallback -f $filename 2>&1`; 766 my $status = `perl $root/scripts/get_maintainer.pl --status --nom --nol --nogit --nogit-fallback -f $filename 2>&1`;
767 767
@@ -2589,6 +2589,7 @@ sub process {
2589 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ || 2589 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
2590 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ && 2590 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
2591 (defined($1) || defined($2))))) { 2591 (defined($1) || defined($2))))) {
2592 $is_patch = 1;
2592 $reported_maintainer_file = 1; 2593 $reported_maintainer_file = 1;
2593 WARN("FILE_PATH_CHANGES", 2594 WARN("FILE_PATH_CHANGES",
2594 "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr); 2595 "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
@@ -2601,20 +2602,6 @@ sub process {
2601 $herecurr) if (!$emitted_corrupt++); 2602 $herecurr) if (!$emitted_corrupt++);
2602 } 2603 }
2603 2604
2604# Check for absolute kernel paths.
2605 if ($tree) {
2606 while ($line =~ m{(?:^|\s)(/\S*)}g) {
2607 my $file = $1;
2608
2609 if ($file =~ m{^(.*?)(?::\d+)+:?$} &&
2610 check_absolute_file($1, $herecurr)) {
2611 #
2612 } else {
2613 check_absolute_file($file, $herecurr);
2614 }
2615 }
2616 }
2617
2618# UTF-8 regex found at http://www.w3.org/International/questions/qa-forms-utf-8.en.php 2605# UTF-8 regex found at http://www.w3.org/International/questions/qa-forms-utf-8.en.php
2619 if (($realfile =~ /^$/ || $line =~ /^\+/) && 2606 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
2620 $rawline !~ m/^$UTF8*$/) { 2607 $rawline !~ m/^$UTF8*$/) {
@@ -2652,6 +2639,20 @@ sub process {
2652 "8-bit UTF-8 used in possible commit log\n" . $herecurr); 2639 "8-bit UTF-8 used in possible commit log\n" . $herecurr);
2653 } 2640 }
2654 2641
2642# Check for absolute kernel paths in commit message
2643 if ($tree && $in_commit_log) {
2644 while ($line =~ m{(?:^|\s)(/\S*)}g) {
2645 my $file = $1;
2646
2647 if ($file =~ m{^(.*?)(?::\d+)+:?$} &&
2648 check_absolute_file($1, $herecurr)) {
2649 #
2650 } else {
2651 check_absolute_file($file, $herecurr);
2652 }
2653 }
2654 }
2655
2655# Check for various typo / spelling mistakes 2656# Check for various typo / spelling mistakes
2656 if (defined($misspellings) && 2657 if (defined($misspellings) &&
2657 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) { 2658 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
@@ -2805,7 +2806,7 @@ sub process {
2805 } 2806 }
2806 2807
2807# check we are in a valid source file if not then ignore this hunk 2808# check we are in a valid source file if not then ignore this hunk
2808 next if ($realfile !~ /\.(h|c|s|S|pl|sh|dtsi|dts)$/); 2809 next if ($realfile !~ /\.(h|c|s|S|sh|dtsi|dts)$/);
2809 2810
2810# line length limit (with some exclusions) 2811# line length limit (with some exclusions)
2811# 2812#
@@ -3440,6 +3441,18 @@ sub process {
3440#ignore lines not being added 3441#ignore lines not being added
3441 next if ($line =~ /^[^\+]/); 3442 next if ($line =~ /^[^\+]/);
3442 3443
3444# check for dereferences that span multiple lines
3445 if ($prevline =~ /^\+.*$Lval\s*(?:\.|->)\s*$/ &&
3446 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
3447 $prevline =~ /($Lval\s*(?:\.|->))\s*$/;
3448 my $ref = $1;
3449 $line =~ /^.\s*($Lval)/;
3450 $ref .= $1;
3451 $ref =~ s/\s//g;
3452 WARN("MULTILINE_DEREFERENCE",
3453 "Avoid multiple line dereference - prefer '$ref'\n" . $hereprev);
3454 }
3455
3443# check for declarations of signed or unsigned without int 3456# check for declarations of signed or unsigned without int
3444 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) { 3457 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
3445 my $type = $1; 3458 my $type = $1;
@@ -3668,7 +3681,7 @@ sub process {
3668 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ && 3681 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
3669 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ && 3682 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
3670 $line !~ /\b$typeTypedefs\b/ && 3683 $line !~ /\b$typeTypedefs\b/ &&
3671 $line !~ /\b__bitwise(?:__|)\b/) { 3684 $line !~ /\b__bitwise\b/) {
3672 WARN("NEW_TYPEDEFS", 3685 WARN("NEW_TYPEDEFS",
3673 "do not add new typedefs\n" . $herecurr); 3686 "do not add new typedefs\n" . $herecurr);
3674 } 3687 }
@@ -5548,8 +5561,9 @@ sub process {
5548 "Using weak declarations can have unintended link defects\n" . $herecurr); 5561 "Using weak declarations can have unintended link defects\n" . $herecurr);
5549 } 5562 }
5550 5563
5551# check for c99 types like uint8_t used outside of uapi/ 5564# check for c99 types like uint8_t used outside of uapi/ and tools/
5552 if ($realfile !~ m@\binclude/uapi/@ && 5565 if ($realfile !~ m@\binclude/uapi/@ &&
5566 $realfile !~ m@\btools/@ &&
5553 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) { 5567 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
5554 my $type = $1; 5568 my $type = $1;
5555 if ($type =~ /\b($typeC99Typedefs)\b/) { 5569 if ($type =~ /\b($typeC99Typedefs)\b/) {
@@ -5925,7 +5939,7 @@ sub process {
5925 } 5939 }
5926 if (!$has_break && $has_statement) { 5940 if (!$has_break && $has_statement) {
5927 WARN("MISSING_BREAK", 5941 WARN("MISSING_BREAK",
5928 "Possible switch case/default not preceeded by break or fallthrough comment\n" . $herecurr); 5942 "Possible switch case/default not preceded by break or fallthrough comment\n" . $herecurr);
5929 } 5943 }
5930 } 5944 }
5931 5945
@@ -6076,6 +6090,12 @@ sub process {
6076 } 6090 }
6077 } 6091 }
6078 6092
6093# check for mutex_trylock_recursive usage
6094 if ($line =~ /mutex_trylock_recursive/) {
6095 ERROR("LOCKING",
6096 "recursive locking is bad, do not use this ever.\n" . $herecurr);
6097 }
6098
6079# check for lockdep_set_novalidate_class 6099# check for lockdep_set_novalidate_class
6080 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ || 6100 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
6081 $line =~ /__lockdep_no_validate__\s*\)/ ) { 6101 $line =~ /__lockdep_no_validate__\s*\)/ ) {
diff --git a/scripts/coccinelle/misc/boolconv.cocci b/scripts/coccinelle/misc/boolconv.cocci
new file mode 100644
index 000000000000..33c464d6bc71
--- /dev/null
+++ b/scripts/coccinelle/misc/boolconv.cocci
@@ -0,0 +1,90 @@
1/// Remove unneeded conversion to bool
2///
3//# Relational and logical operators evaluate to bool,
4//# explicit conversion is overly verbose and unneeded.
5//
6// Copyright: (C) 2016 Andrew F. Davis <afd@ti.com> GPLv2.
7
8virtual patch
9virtual context
10virtual org
11virtual report
12
13//----------------------------------------------------------
14// For patch mode
15//----------------------------------------------------------
16
17@depends on patch@
18expression A, B;
19symbol true, false;
20@@
21
22(
23 A == B
24|
25 A != B
26|
27 A > B
28|
29 A < B
30|
31 A >= B
32|
33 A <= B
34|
35 A && B
36|
37 A || B
38)
39- ? true : false
40
41//----------------------------------------------------------
42// For context mode
43//----------------------------------------------------------
44
45@r depends on !patch@
46expression A, B;
47symbol true, false;
48position p;
49@@
50
51(
52 A == B
53|
54 A != B
55|
56 A > B
57|
58 A < B
59|
60 A >= B
61|
62 A <= B
63|
64 A && B
65|
66 A || B
67)
68* ? true : false@p
69
70//----------------------------------------------------------
71// For org mode
72//----------------------------------------------------------
73
74@script:python depends on r&&org@
75p << r.p;
76@@
77
78msg = "WARNING: conversion to bool not needed here"
79coccilib.org.print_todo(p[0], msg)
80
81//----------------------------------------------------------
82// For report mode
83//----------------------------------------------------------
84
85@script:python depends on r&&report@
86p << r.p;
87@@
88
89msg = "WARNING: conversion to bool not needed here"
90coccilib.report.print_report(p[0], msg)
diff --git a/scripts/coccinelle/misc/irqf_oneshot.cocci b/scripts/coccinelle/misc/irqf_oneshot.cocci
index b421150a2eff..f698d6d0f5d7 100644
--- a/scripts/coccinelle/misc/irqf_oneshot.cocci
+++ b/scripts/coccinelle/misc/irqf_oneshot.cocci
@@ -5,7 +5,7 @@
5/// So pass the IRQF_ONESHOT flag in this case. 5/// So pass the IRQF_ONESHOT flag in this case.
6/// 6///
7// 7//
8// Confidence: Good 8// Confidence: Moderate
9// Comments: 9// Comments:
10// Options: --no-includes 10// Options: --no-includes
11 11
@@ -15,16 +15,13 @@ virtual org
15virtual report 15virtual report
16 16
17@r1@ 17@r1@
18expression dev; 18expression dev, irq, thread_fn;
19expression irq;
20expression thread_fn;
21expression flags;
22position p; 19position p;
23@@ 20@@
24( 21(
25request_threaded_irq@p(irq, NULL, thread_fn, 22request_threaded_irq@p(irq, NULL, thread_fn,
26( 23(
27flags | IRQF_ONESHOT 24IRQF_ONESHOT | ...
28| 25|
29IRQF_ONESHOT 26IRQF_ONESHOT
30) 27)
@@ -32,21 +29,34 @@ IRQF_ONESHOT
32| 29|
33devm_request_threaded_irq@p(dev, irq, NULL, thread_fn, 30devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
34( 31(
35flags | IRQF_ONESHOT 32IRQF_ONESHOT | ...
36| 33|
37IRQF_ONESHOT 34IRQF_ONESHOT
38) 35)
39, ...) 36, ...)
40) 37)
41 38
42@depends on patch@ 39@r2@
43expression dev; 40expression dev, irq, thread_fn, flags, e;
44expression irq;
45expression thread_fn;
46expression flags;
47position p != r1.p; 41position p != r1.p;
48@@ 42@@
49( 43(
44flags = IRQF_ONESHOT | ...
45|
46flags |= IRQF_ONESHOT | ...
47)
48... when != flags = e
49(
50request_threaded_irq@p(irq, NULL, thread_fn, flags, ...);
51|
52devm_request_threaded_irq@p(dev, irq, NULL, thread_fn, flags, ...);
53)
54
55@depends on patch@
56expression dev, irq, thread_fn, flags;
57position p != {r1.p,r2.p};
58@@
59(
50request_threaded_irq@p(irq, NULL, thread_fn, 60request_threaded_irq@p(irq, NULL, thread_fn,
51( 61(
52-0 62-0
@@ -69,15 +79,25 @@ devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
69) 79)
70 80
71@depends on context@ 81@depends on context@
72position p != r1.p; 82expression dev, irq;
83position p != {r1.p,r2.p};
73@@ 84@@
74*request_threaded_irq@p(...) 85(
86*request_threaded_irq@p(irq, NULL, ...)
87|
88*devm_request_threaded_irq@p(dev, irq, NULL, ...)
89)
90
75 91
76@match depends on report || org@ 92@match depends on report || org@
77expression irq; 93expression dev, irq;
78position p != r1.p; 94position p != {r1.p,r2.p};
79@@ 95@@
96(
80request_threaded_irq@p(irq, NULL, ...) 97request_threaded_irq@p(irq, NULL, ...)
98|
99devm_request_threaded_irq@p(dev, irq, NULL, ...)
100)
81 101
82@script:python depends on org@ 102@script:python depends on org@
83p << match.p; 103p << match.p;
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index c332684e1b5a..5206d99ddeb8 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -139,7 +139,8 @@ handle_line() {
139 139
140while read line; do 140while read line; do
141 # Let's see if we have an address in the line 141 # Let's see if we have an address in the line
142 if [[ $line =~ \[\<([^]]+)\>\] ]]; then 142 if [[ $line =~ \[\<([^]]+)\>\] ]] ||
143 [[ $line =~ [^+\ ]+\+0x[0-9a-f]+/0x[0-9a-f]+ ]]; then
143 # Translate address to line numbers 144 # Translate address to line numbers
144 handle_line "$line" 145 handle_line "$line"
145 # Is it a code line? 146 # Is it a code line?
diff --git a/scripts/faddr2line b/scripts/faddr2line
index 450b33257339..29df825d375c 100755
--- a/scripts/faddr2line
+++ b/scripts/faddr2line
@@ -105,9 +105,18 @@ __faddr2line() {
105 # In rare cases there might be duplicates. 105 # In rare cases there might be duplicates.
106 while read symbol; do 106 while read symbol; do
107 local fields=($symbol) 107 local fields=($symbol)
108 local sym_base=0x${fields[1]} 108 local sym_base=0x${fields[0]}
109 local sym_size=${fields[2]} 109 local sym_type=${fields[1]}
110 local sym_type=${fields[3]} 110 local sym_end=0x${fields[3]}
111
112 # calculate the size
113 local sym_size=$(($sym_end - $sym_base))
114 if [[ -z $sym_size ]] || [[ $sym_size -le 0 ]]; then
115 warn "bad symbol size: base: $sym_base end: $sym_end"
116 DONE=1
117 return
118 fi
119 sym_size=0x$(printf %x $sym_size)
111 120
112 # calculate the address 121 # calculate the address
113 local addr=$(($sym_base + $offset)) 122 local addr=$(($sym_base + $offset))
@@ -116,26 +125,26 @@ __faddr2line() {
116 DONE=1 125 DONE=1
117 return 126 return
118 fi 127 fi
119 local hexaddr=0x$(printf %x $addr) 128 addr=0x$(printf %x $addr)
120 129
121 # weed out non-function symbols 130 # weed out non-function symbols
122 if [[ $sym_type != "FUNC" ]]; then 131 if [[ $sym_type != t ]] && [[ $sym_type != T ]]; then
123 [[ $print_warnings = 1 ]] && 132 [[ $print_warnings = 1 ]] &&
124 echo "skipping $func address at $hexaddr due to non-function symbol" 133 echo "skipping $func address at $addr due to non-function symbol of type '$sym_type'"
125 continue 134 continue
126 fi 135 fi
127 136
128 # if the user provided a size, make sure it matches the symbol's size 137 # if the user provided a size, make sure it matches the symbol's size
129 if [[ -n $size ]] && [[ $size -ne $sym_size ]]; then 138 if [[ -n $size ]] && [[ $size -ne $sym_size ]]; then
130 [[ $print_warnings = 1 ]] && 139 [[ $print_warnings = 1 ]] &&
131 echo "skipping $func address at $hexaddr due to size mismatch ($size != $sym_size)" 140 echo "skipping $func address at $addr due to size mismatch ($size != $sym_size)"
132 continue; 141 continue;
133 fi 142 fi
134 143
135 # make sure the provided offset is within the symbol's range 144 # make sure the provided offset is within the symbol's range
136 if [[ $offset -gt $sym_size ]]; then 145 if [[ $offset -gt $sym_size ]]; then
137 [[ $print_warnings = 1 ]] && 146 [[ $print_warnings = 1 ]] &&
138 echo "skipping $func address at $hexaddr due to size mismatch ($offset > $sym_size)" 147 echo "skipping $func address at $addr due to size mismatch ($offset > $sym_size)"
139 continue 148 continue
140 fi 149 fi
141 150
@@ -143,12 +152,12 @@ __faddr2line() {
143 [[ $FIRST = 0 ]] && echo 152 [[ $FIRST = 0 ]] && echo
144 FIRST=0 153 FIRST=0
145 154
146 local hexsize=0x$(printf %x $sym_size) 155 # pass real address to addr2line
147 echo "$func+$offset/$hexsize:" 156 echo "$func+$offset/$sym_size:"
148 addr2line -fpie $objfile $hexaddr | sed "s; $dir_prefix\(\./\)*; ;" 157 addr2line -fpie $objfile $addr | sed "s; $dir_prefix\(\./\)*; ;"
149 DONE=1 158 DONE=1
150 159
151 done < <(readelf -sW $objfile | awk -v f=$func '$8 == f {print}') 160 done < <(nm -n $objfile | awk -v fn=$func '$3 == fn { found=1; line=$0; start=$1; next } found == 1 { found=0; print line, $1 }')
152} 161}
153 162
154[[ $# -lt 2 ]] && usage 163[[ $# -lt 2 ]] && usage
diff --git a/scripts/gcc-plugins/latent_entropy_plugin.c b/scripts/gcc-plugins/latent_entropy_plugin.c
index 8160f1c1b56e..12541126575b 100644
--- a/scripts/gcc-plugins/latent_entropy_plugin.c
+++ b/scripts/gcc-plugins/latent_entropy_plugin.c
@@ -619,7 +619,7 @@ __visible int plugin_init(struct plugin_name_args *plugin_info,
619 enabled = false; 619 enabled = false;
620 continue; 620 continue;
621 } 621 }
622 error(G_("unkown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key); 622 error(G_("unknown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
623 } 623 }
624 624
625 register_callback(plugin_name, PLUGIN_INFO, NULL, 625 register_callback(plugin_name, PLUGIN_INFO, NULL,
diff --git a/scripts/gcc-plugins/sancov_plugin.c b/scripts/gcc-plugins/sancov_plugin.c
index 7ea0b3f50739..70f5fe0d590a 100644
--- a/scripts/gcc-plugins/sancov_plugin.c
+++ b/scripts/gcc-plugins/sancov_plugin.c
@@ -126,7 +126,7 @@ __visible int plugin_init(struct plugin_name_args *plugin_info, struct plugin_gc
126 enable = false; 126 enable = false;
127 continue; 127 continue;
128 } 128 }
129 error(G_("unkown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key); 129 error(G_("unknown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
130 } 130 }
131 131
132 register_callback(plugin_name, PLUGIN_INFO, NULL, &sancov_plugin_info); 132 register_callback(plugin_name, PLUGIN_INFO, NULL, &sancov_plugin_info);
diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh
index 973e8c141567..17867e723a51 100755
--- a/scripts/gcc-x86_64-has-stack-protector.sh
+++ b/scripts/gcc-x86_64-has-stack-protector.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2 2
3echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs" 3echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4if [ "$?" -eq "0" ] ; then 4if [ "$?" -eq "0" ] ; then
5 echo y 5 echo y
6else 6else
diff --git a/scripts/genksyms/keywords.gperf b/scripts/genksyms/keywords.gperf
index a9096d993172..bd4c4b235588 100644
--- a/scripts/genksyms/keywords.gperf
+++ b/scripts/genksyms/keywords.gperf
@@ -27,6 +27,7 @@ __typeof, TYPEOF_KEYW
27__typeof__, TYPEOF_KEYW 27__typeof__, TYPEOF_KEYW
28__volatile, VOLATILE_KEYW 28__volatile, VOLATILE_KEYW
29__volatile__, VOLATILE_KEYW 29__volatile__, VOLATILE_KEYW
30__builtin_va_list, VA_LIST_KEYW
30# According to rth, c99 defines _Bool, __restrict, __restrict__, restrict. KAO 31# According to rth, c99 defines _Bool, __restrict, __restrict__, restrict. KAO
31_Bool, BOOL_KEYW 32_Bool, BOOL_KEYW
32_restrict, RESTRICT_KEYW 33_restrict, RESTRICT_KEYW
diff --git a/scripts/genksyms/keywords.hash.c_shipped b/scripts/genksyms/keywords.hash.c_shipped
index e9452482e198..738018ba7375 100644
--- a/scripts/genksyms/keywords.hash.c_shipped
+++ b/scripts/genksyms/keywords.hash.c_shipped
@@ -57,7 +57,7 @@ is_reserved_hash (register const char *str, register unsigned int len)
57 101, 101, 101, 101, 101, 101, 101, 101, 101, 0, 57 101, 101, 101, 101, 101, 101, 101, 101, 101, 0,
58 101, 101, 101, 101, 101, 101, 15, 101, 101, 101, 58 101, 101, 101, 101, 101, 101, 15, 101, 101, 101,
59 0, 101, 101, 101, 101, 101, 101, 101, 101, 101, 59 0, 101, 101, 101, 101, 101, 101, 101, 101, 101,
60 101, 101, 101, 101, 101, 0, 101, 0, 101, 5, 60 101, 101, 101, 101, 101, 0, 101, 0, 0, 5,
61 25, 20, 55, 30, 101, 15, 101, 101, 10, 0, 61 25, 20, 55, 30, 101, 15, 101, 101, 10, 0,
62 10, 40, 10, 101, 10, 5, 0, 10, 15, 101, 62 10, 40, 10, 101, 10, 5, 0, 10, 15, 101,
63 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 63 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
@@ -89,7 +89,7 @@ is_reserved_word (register const char *str, register unsigned int len)
89{ 89{
90 enum 90 enum
91 { 91 {
92 TOTAL_KEYWORDS = 46, 92 TOTAL_KEYWORDS = 47,
93 MIN_WORD_LENGTH = 3, 93 MIN_WORD_LENGTH = 3,
94 MAX_WORD_LENGTH = 24, 94 MAX_WORD_LENGTH = 24,
95 MIN_HASH_VALUE = 3, 95 MIN_HASH_VALUE = 3,
@@ -99,7 +99,7 @@ is_reserved_word (register const char *str, register unsigned int len)
99 static const struct resword wordlist[] = 99 static const struct resword wordlist[] =
100 { 100 {
101 {""}, {""}, {""}, 101 {""}, {""}, {""},
102#line 35 "scripts/genksyms/keywords.gperf" 102#line 36 "scripts/genksyms/keywords.gperf"
103 {"asm", ASM_KEYW}, 103 {"asm", ASM_KEYW},
104 {""}, 104 {""},
105#line 15 "scripts/genksyms/keywords.gperf" 105#line 15 "scripts/genksyms/keywords.gperf"
@@ -119,20 +119,21 @@ is_reserved_word (register const char *str, register unsigned int len)
119 {"__const__", CONST_KEYW}, 119 {"__const__", CONST_KEYW},
120#line 25 "scripts/genksyms/keywords.gperf" 120#line 25 "scripts/genksyms/keywords.gperf"
121 {"__signed__", SIGNED_KEYW}, 121 {"__signed__", SIGNED_KEYW},
122#line 53 "scripts/genksyms/keywords.gperf" 122#line 54 "scripts/genksyms/keywords.gperf"
123 {"static", STATIC_KEYW}, 123 {"static", STATIC_KEYW},
124 {""}, 124#line 30 "scripts/genksyms/keywords.gperf"
125#line 48 "scripts/genksyms/keywords.gperf" 125 {"__builtin_va_list", VA_LIST_KEYW},
126#line 49 "scripts/genksyms/keywords.gperf"
126 {"int", INT_KEYW}, 127 {"int", INT_KEYW},
127#line 41 "scripts/genksyms/keywords.gperf"
128 {"char", CHAR_KEYW},
129#line 42 "scripts/genksyms/keywords.gperf" 128#line 42 "scripts/genksyms/keywords.gperf"
129 {"char", CHAR_KEYW},
130#line 43 "scripts/genksyms/keywords.gperf"
130 {"const", CONST_KEYW}, 131 {"const", CONST_KEYW},
131#line 54 "scripts/genksyms/keywords.gperf" 132#line 55 "scripts/genksyms/keywords.gperf"
132 {"struct", STRUCT_KEYW}, 133 {"struct", STRUCT_KEYW},
133#line 33 "scripts/genksyms/keywords.gperf"
134 {"__restrict__", RESTRICT_KEYW},
135#line 34 "scripts/genksyms/keywords.gperf" 134#line 34 "scripts/genksyms/keywords.gperf"
135 {"__restrict__", RESTRICT_KEYW},
136#line 35 "scripts/genksyms/keywords.gperf"
136 {"restrict", RESTRICT_KEYW}, 137 {"restrict", RESTRICT_KEYW},
137#line 12 "scripts/genksyms/keywords.gperf" 138#line 12 "scripts/genksyms/keywords.gperf"
138 {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, 139 {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW},
@@ -143,7 +144,7 @@ is_reserved_word (register const char *str, register unsigned int len)
143 {"__volatile__", VOLATILE_KEYW}, 144 {"__volatile__", VOLATILE_KEYW},
144#line 10 "scripts/genksyms/keywords.gperf" 145#line 10 "scripts/genksyms/keywords.gperf"
145 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, 146 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW},
146#line 32 "scripts/genksyms/keywords.gperf" 147#line 33 "scripts/genksyms/keywords.gperf"
147 {"_restrict", RESTRICT_KEYW}, 148 {"_restrict", RESTRICT_KEYW},
148 {""}, 149 {""},
149#line 17 "scripts/genksyms/keywords.gperf" 150#line 17 "scripts/genksyms/keywords.gperf"
@@ -152,64 +153,64 @@ is_reserved_word (register const char *str, register unsigned int len)
152 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, 153 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
153#line 21 "scripts/genksyms/keywords.gperf" 154#line 21 "scripts/genksyms/keywords.gperf"
154 {"__extension__", EXTENSION_KEYW}, 155 {"__extension__", EXTENSION_KEYW},
155#line 44 "scripts/genksyms/keywords.gperf" 156#line 45 "scripts/genksyms/keywords.gperf"
156 {"enum", ENUM_KEYW}, 157 {"enum", ENUM_KEYW},
157#line 13 "scripts/genksyms/keywords.gperf" 158#line 13 "scripts/genksyms/keywords.gperf"
158 {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW}, 159 {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW},
159#line 45 "scripts/genksyms/keywords.gperf" 160#line 46 "scripts/genksyms/keywords.gperf"
160 {"extern", EXTERN_KEYW}, 161 {"extern", EXTERN_KEYW},
161 {""}, 162 {""},
162#line 24 "scripts/genksyms/keywords.gperf" 163#line 24 "scripts/genksyms/keywords.gperf"
163 {"__signed", SIGNED_KEYW}, 164 {"__signed", SIGNED_KEYW},
164#line 14 "scripts/genksyms/keywords.gperf" 165#line 14 "scripts/genksyms/keywords.gperf"
165 {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, 166 {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
166#line 57 "scripts/genksyms/keywords.gperf" 167#line 58 "scripts/genksyms/keywords.gperf"
167 {"union", UNION_KEYW}, 168 {"union", UNION_KEYW},
168 {""}, {""}, 169 {""}, {""},
169#line 22 "scripts/genksyms/keywords.gperf" 170#line 22 "scripts/genksyms/keywords.gperf"
170 {"__inline", INLINE_KEYW}, 171 {"__inline", INLINE_KEYW},
171#line 40 "scripts/genksyms/keywords.gperf" 172#line 41 "scripts/genksyms/keywords.gperf"
172 {"auto", AUTO_KEYW}, 173 {"auto", AUTO_KEYW},
173#line 28 "scripts/genksyms/keywords.gperf" 174#line 28 "scripts/genksyms/keywords.gperf"
174 {"__volatile", VOLATILE_KEYW}, 175 {"__volatile", VOLATILE_KEYW},
175 {""}, {""}, 176 {""}, {""},
176#line 58 "scripts/genksyms/keywords.gperf" 177#line 59 "scripts/genksyms/keywords.gperf"
177 {"unsigned", UNSIGNED_KEYW}, 178 {"unsigned", UNSIGNED_KEYW},
178 {""}, 179 {""},
179#line 51 "scripts/genksyms/keywords.gperf" 180#line 52 "scripts/genksyms/keywords.gperf"
180 {"short", SHORT_KEYW}, 181 {"short", SHORT_KEYW},
181#line 47 "scripts/genksyms/keywords.gperf" 182#line 48 "scripts/genksyms/keywords.gperf"
182 {"inline", INLINE_KEYW}, 183 {"inline", INLINE_KEYW},
183 {""}, 184 {""},
184#line 60 "scripts/genksyms/keywords.gperf" 185#line 61 "scripts/genksyms/keywords.gperf"
185 {"volatile", VOLATILE_KEYW}, 186 {"volatile", VOLATILE_KEYW},
186#line 49 "scripts/genksyms/keywords.gperf" 187#line 50 "scripts/genksyms/keywords.gperf"
187 {"long", LONG_KEYW}, 188 {"long", LONG_KEYW},
188#line 31 "scripts/genksyms/keywords.gperf" 189#line 32 "scripts/genksyms/keywords.gperf"
189 {"_Bool", BOOL_KEYW}, 190 {"_Bool", BOOL_KEYW},
190 {""}, {""}, 191 {""}, {""},
191#line 50 "scripts/genksyms/keywords.gperf" 192#line 51 "scripts/genksyms/keywords.gperf"
192 {"register", REGISTER_KEYW}, 193 {"register", REGISTER_KEYW},
193#line 59 "scripts/genksyms/keywords.gperf" 194#line 60 "scripts/genksyms/keywords.gperf"
194 {"void", VOID_KEYW}, 195 {"void", VOID_KEYW},
195 {""}, 196 {""},
196#line 43 "scripts/genksyms/keywords.gperf" 197#line 44 "scripts/genksyms/keywords.gperf"
197 {"double", DOUBLE_KEYW}, 198 {"double", DOUBLE_KEYW},
198 {""}, 199 {""},
199#line 26 "scripts/genksyms/keywords.gperf" 200#line 26 "scripts/genksyms/keywords.gperf"
200 {"__typeof", TYPEOF_KEYW}, 201 {"__typeof", TYPEOF_KEYW},
201 {""}, {""}, 202 {""}, {""},
202#line 52 "scripts/genksyms/keywords.gperf" 203#line 53 "scripts/genksyms/keywords.gperf"
203 {"signed", SIGNED_KEYW}, 204 {"signed", SIGNED_KEYW},
204 {""}, {""}, {""}, {""}, 205 {""}, {""}, {""}, {""},
205#line 56 "scripts/genksyms/keywords.gperf" 206#line 57 "scripts/genksyms/keywords.gperf"
206 {"typeof", TYPEOF_KEYW}, 207 {"typeof", TYPEOF_KEYW},
207#line 55 "scripts/genksyms/keywords.gperf" 208#line 56 "scripts/genksyms/keywords.gperf"
208 {"typedef", TYPEDEF_KEYW}, 209 {"typedef", TYPEDEF_KEYW},
209 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, 210 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
210 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, 211 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
211 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, 212 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
212#line 46 "scripts/genksyms/keywords.gperf" 213#line 47 "scripts/genksyms/keywords.gperf"
213 {"float", FLOAT_KEYW} 214 {"float", FLOAT_KEYW}
214 }; 215 };
215 216
diff --git a/scripts/genksyms/parse.tab.c_shipped b/scripts/genksyms/parse.tab.c_shipped
index 99950b5afb0d..69148d30ca3f 100644
--- a/scripts/genksyms/parse.tab.c_shipped
+++ b/scripts/genksyms/parse.tab.c_shipped
@@ -172,22 +172,23 @@ extern int yydebug;
172 VOID_KEYW = 281, 172 VOID_KEYW = 281,
173 VOLATILE_KEYW = 282, 173 VOLATILE_KEYW = 282,
174 TYPEOF_KEYW = 283, 174 TYPEOF_KEYW = 283,
175 EXPORT_SYMBOL_KEYW = 284, 175 VA_LIST_KEYW = 284,
176 ASM_PHRASE = 285, 176 EXPORT_SYMBOL_KEYW = 285,
177 ATTRIBUTE_PHRASE = 286, 177 ASM_PHRASE = 286,
178 TYPEOF_PHRASE = 287, 178 ATTRIBUTE_PHRASE = 287,
179 BRACE_PHRASE = 288, 179 TYPEOF_PHRASE = 288,
180 BRACKET_PHRASE = 289, 180 BRACE_PHRASE = 289,
181 EXPRESSION_PHRASE = 290, 181 BRACKET_PHRASE = 290,
182 CHAR = 291, 182 EXPRESSION_PHRASE = 291,
183 DOTS = 292, 183 CHAR = 292,
184 IDENT = 293, 184 DOTS = 293,
185 INT = 294, 185 IDENT = 294,
186 REAL = 295, 186 INT = 295,
187 STRING = 296, 187 REAL = 296,
188 TYPE = 297, 188 STRING = 297,
189 OTHER = 298, 189 TYPE = 298,
190 FILENAME = 299 190 OTHER = 299,
191 FILENAME = 300
191 }; 192 };
192#endif 193#endif
193 194
@@ -439,20 +440,20 @@ union yyalloc
439/* YYFINAL -- State number of the termination state. */ 440/* YYFINAL -- State number of the termination state. */
440#define YYFINAL 4 441#define YYFINAL 4
441/* YYLAST -- Last index in YYTABLE. */ 442/* YYLAST -- Last index in YYTABLE. */
442#define YYLAST 515 443#define YYLAST 524
443 444
444/* YYNTOKENS -- Number of terminals. */ 445/* YYNTOKENS -- Number of terminals. */
445#define YYNTOKENS 54 446#define YYNTOKENS 55
446/* YYNNTS -- Number of nonterminals. */ 447/* YYNNTS -- Number of nonterminals. */
447#define YYNNTS 49 448#define YYNNTS 49
448/* YYNRULES -- Number of rules. */ 449/* YYNRULES -- Number of rules. */
449#define YYNRULES 133 450#define YYNRULES 134
450/* YYNRULES -- Number of states. */ 451/* YYNRULES -- Number of states. */
451#define YYNSTATES 188 452#define YYNSTATES 189
452 453
453/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 454/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
454#define YYUNDEFTOK 2 455#define YYUNDEFTOK 2
455#define YYMAXUTOK 299 456#define YYMAXUTOK 300
456 457
457#define YYTRANSLATE(YYX) \ 458#define YYTRANSLATE(YYX) \
458 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 459 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -464,15 +465,15 @@ static const yytype_uint8 yytranslate[] =
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 48, 49, 50, 2, 47, 2, 2, 2, 2, 2, 468 49, 50, 51, 2, 48, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 53, 45, 469 2, 2, 2, 2, 2, 2, 2, 2, 54, 46,
469 2, 51, 2, 2, 2, 2, 2, 2, 2, 2, 470 2, 52, 2, 2, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 2, 2, 52, 2, 46, 2, 2, 2, 2, 476 2, 2, 2, 53, 2, 47, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -489,7 +490,8 @@ static const yytype_uint8 yytranslate[] =
489 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 490 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
490 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 491 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
491 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 492 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
492 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 493 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
494 45
493}; 495};
494 496
495#if YYDEBUG 497#if YYDEBUG
@@ -502,76 +504,76 @@ static const yytype_uint16 yyprhs[] =
502 46, 50, 55, 56, 58, 60, 63, 65, 67, 69, 504 46, 50, 55, 56, 58, 60, 63, 65, 67, 69,
503 71, 73, 75, 77, 79, 81, 86, 88, 91, 94, 505 71, 73, 75, 77, 79, 81, 86, 88, 91, 94,
504 97, 101, 105, 109, 112, 115, 118, 120, 122, 124, 506 97, 101, 105, 109, 112, 115, 118, 120, 122, 124,
505 126, 128, 130, 132, 134, 136, 138, 140, 143, 144, 507 126, 128, 130, 132, 134, 136, 138, 140, 142, 145,
506 146, 148, 151, 153, 155, 157, 159, 162, 164, 166, 508 146, 148, 150, 153, 155, 157, 159, 161, 164, 166,
507 168, 173, 178, 181, 185, 189, 192, 194, 196, 198, 509 168, 170, 175, 180, 183, 187, 191, 194, 196, 198,
508 203, 208, 211, 215, 219, 222, 224, 228, 229, 231, 510 200, 205, 210, 213, 217, 221, 224, 226, 230, 231,
509 233, 237, 240, 243, 245, 246, 248, 250, 255, 260, 511 233, 235, 239, 242, 245, 247, 248, 250, 252, 257,
510 263, 267, 271, 275, 276, 278, 281, 285, 289, 290, 512 262, 265, 269, 273, 277, 278, 280, 283, 287, 291,
511 292, 294, 297, 301, 304, 305, 307, 309, 313, 316, 513 292, 294, 296, 299, 303, 306, 307, 309, 311, 315,
512 319, 321, 324, 325, 328, 332, 337, 339, 343, 345, 514 318, 321, 323, 326, 327, 330, 334, 339, 341, 345,
513 349, 352, 353, 355 515 347, 351, 354, 355, 357
514}; 516};
515 517
516/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 518/* YYRHS -- A `-1'-separated list of the rules' RHS. */
517static const yytype_int8 yyrhs[] = 519static const yytype_int8 yyrhs[] =
518{ 520{
519 55, 0, -1, 56, -1, 55, 56, -1, -1, 57, 521 56, 0, -1, 57, -1, 56, 57, -1, -1, 58,
520 58, -1, -1, 12, 23, 59, 61, -1, -1, 23, 522 59, -1, -1, 12, 23, 60, 62, -1, -1, 23,
521 60, 61, -1, 61, -1, 85, -1, 100, -1, 102, 523 61, 62, -1, 62, -1, 86, -1, 101, -1, 103,
522 -1, 1, 45, -1, 1, 46, -1, 65, 62, 45, 524 -1, 1, 46, -1, 1, 47, -1, 66, 63, 46,
523 -1, -1, 63, -1, 64, -1, 63, 47, 64, -1, 525 -1, -1, 64, -1, 65, -1, 64, 48, 65, -1,
524 75, 101, 96, 86, -1, -1, 66, -1, 67, -1, 526 76, 102, 97, 87, -1, -1, 67, -1, 68, -1,
525 66, 67, -1, 68, -1, 69, -1, 5, -1, 17, 527 67, 68, -1, 69, -1, 70, -1, 5, -1, 17,
526 -1, 21, -1, 11, -1, 14, -1, 70, -1, 74, 528 -1, 21, -1, 11, -1, 14, -1, 71, -1, 75,
527 -1, 28, 48, 82, 49, -1, 32, -1, 22, 38, 529 -1, 28, 49, 83, 50, -1, 33, -1, 22, 39,
528 -1, 24, 38, -1, 10, 38, -1, 22, 38, 88, 530 -1, 24, 39, -1, 10, 39, -1, 22, 39, 89,
529 -1, 24, 38, 88, -1, 10, 38, 97, -1, 10, 531 -1, 24, 39, 89, -1, 10, 39, 98, -1, 10,
530 97, -1, 22, 88, -1, 24, 88, -1, 7, -1, 532 98, -1, 22, 89, -1, 24, 89, -1, 7, -1,
531 19, -1, 15, -1, 16, -1, 20, -1, 25, -1, 533 19, -1, 15, -1, 16, -1, 20, -1, 25, -1,
532 13, -1, 9, -1, 26, -1, 6, -1, 42, -1, 534 13, -1, 9, -1, 26, -1, 6, -1, 29, -1,
533 50, 72, -1, -1, 73, -1, 74, -1, 73, 74, 535 43, -1, 51, 73, -1, -1, 74, -1, 75, -1,
534 -1, 8, -1, 27, -1, 31, -1, 18, -1, 71, 536 74, 75, -1, 8, -1, 27, -1, 32, -1, 18,
535 75, -1, 76, -1, 38, -1, 42, -1, 76, 48, 537 -1, 72, 76, -1, 77, -1, 39, -1, 43, -1,
536 79, 49, -1, 76, 48, 1, 49, -1, 76, 34, 538 77, 49, 80, 50, -1, 77, 49, 1, 50, -1,
537 -1, 48, 75, 49, -1, 48, 1, 49, -1, 71, 539 77, 35, -1, 49, 76, 50, -1, 49, 1, 50,
538 77, -1, 78, -1, 38, -1, 42, -1, 78, 48, 540 -1, 72, 78, -1, 79, -1, 39, -1, 43, -1,
539 79, 49, -1, 78, 48, 1, 49, -1, 78, 34, 541 79, 49, 80, 50, -1, 79, 49, 1, 50, -1,
540 -1, 48, 77, 49, -1, 48, 1, 49, -1, 80, 542 79, 35, -1, 49, 78, 50, -1, 49, 1, 50,
541 37, -1, 80, -1, 81, 47, 37, -1, -1, 81, 543 -1, 81, 38, -1, 81, -1, 82, 48, 38, -1,
542 -1, 82, -1, 81, 47, 82, -1, 66, 83, -1, 544 -1, 82, -1, 83, -1, 82, 48, 83, -1, 67,
543 71, 83, -1, 84, -1, -1, 38, -1, 42, -1, 545 84, -1, 72, 84, -1, 85, -1, -1, 39, -1,
544 84, 48, 79, 49, -1, 84, 48, 1, 49, -1, 546 43, -1, 85, 49, 80, 50, -1, 85, 49, 1,
545 84, 34, -1, 48, 83, 49, -1, 48, 1, 49, 547 50, -1, 85, 35, -1, 49, 84, 50, -1, 49,
546 -1, 65, 75, 33, -1, -1, 87, -1, 51, 35, 548 1, 50, -1, 66, 76, 34, -1, -1, 88, -1,
547 -1, 52, 89, 46, -1, 52, 1, 46, -1, -1, 549 52, 36, -1, 53, 90, 47, -1, 53, 1, 47,
548 90, -1, 91, -1, 90, 91, -1, 65, 92, 45, 550 -1, -1, 91, -1, 92, -1, 91, 92, -1, 66,
549 -1, 1, 45, -1, -1, 93, -1, 94, -1, 93, 551 93, 46, -1, 1, 46, -1, -1, 94, -1, 95,
550 47, 94, -1, 77, 96, -1, 38, 95, -1, 95, 552 -1, 94, 48, 95, -1, 78, 97, -1, 39, 96,
551 -1, 53, 35, -1, -1, 96, 31, -1, 52, 98, 553 -1, 96, -1, 54, 36, -1, -1, 97, 32, -1,
552 46, -1, 52, 98, 47, 46, -1, 99, -1, 98, 554 53, 99, 47, -1, 53, 99, 48, 47, -1, 100,
553 47, 99, -1, 38, -1, 38, 51, 35, -1, 30, 555 -1, 99, 48, 100, -1, 39, -1, 39, 52, 36,
554 45, -1, -1, 30, -1, 29, 48, 38, 49, 45, 556 -1, 31, 46, -1, -1, 31, -1, 30, 49, 39,
555 -1 557 50, 46, -1
556}; 558};
557 559
558/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 560/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
559static const yytype_uint16 yyrline[] = 561static const yytype_uint16 yyrline[] =
560{ 562{
561 0, 124, 124, 125, 129, 129, 135, 135, 137, 137, 563 0, 125, 125, 126, 130, 130, 136, 136, 138, 138,
562 139, 140, 141, 142, 143, 144, 148, 162, 163, 167, 564 140, 141, 142, 143, 144, 145, 149, 163, 164, 168,
563 175, 188, 194, 195, 199, 200, 204, 210, 214, 215, 565 176, 189, 195, 196, 200, 201, 205, 211, 215, 216,
564 216, 217, 218, 222, 223, 224, 225, 229, 231, 233, 566 217, 218, 219, 223, 224, 225, 226, 230, 232, 234,
565 237, 239, 241, 246, 249, 250, 254, 255, 256, 257, 567 238, 240, 242, 247, 250, 251, 255, 256, 257, 258,
566 258, 259, 260, 261, 262, 263, 264, 268, 273, 274, 568 259, 260, 261, 262, 263, 264, 265, 266, 270, 275,
567 278, 279, 283, 283, 283, 284, 292, 293, 297, 306, 569 276, 280, 281, 285, 285, 285, 286, 294, 295, 299,
568 315, 317, 319, 321, 323, 330, 331, 335, 336, 337, 570 308, 317, 319, 321, 323, 325, 332, 333, 337, 338,
569 339, 341, 343, 345, 350, 351, 352, 356, 357, 361, 571 339, 341, 343, 345, 347, 352, 353, 354, 358, 359,
570 362, 367, 372, 374, 378, 379, 387, 391, 393, 395, 572 363, 364, 369, 374, 376, 380, 381, 389, 393, 395,
571 397, 399, 404, 413, 414, 419, 424, 425, 429, 430, 573 397, 399, 401, 406, 415, 416, 421, 426, 427, 431,
572 434, 435, 439, 441, 446, 447, 451, 452, 456, 457, 574 432, 436, 437, 441, 443, 448, 449, 453, 454, 458,
573 458, 462, 466, 467, 471, 472, 476, 477, 480, 485, 575 459, 460, 464, 468, 469, 473, 474, 478, 479, 482,
574 493, 497, 498, 502 576 487, 495, 499, 500, 504
575}; 577};
576#endif 578#endif
577 579
@@ -586,12 +588,12 @@ static const char *const yytname[] =
586 "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW", 588 "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW",
587 "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", 589 "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW",
588 "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", 590 "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW",
589 "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", 591 "VOLATILE_KEYW", "TYPEOF_KEYW", "VA_LIST_KEYW", "EXPORT_SYMBOL_KEYW",
590 "ATTRIBUTE_PHRASE", "TYPEOF_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE", 592 "ASM_PHRASE", "ATTRIBUTE_PHRASE", "TYPEOF_PHRASE", "BRACE_PHRASE",
591 "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING", 593 "BRACKET_PHRASE", "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT",
592 "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "')'", "'*'", 594 "REAL", "STRING", "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','",
593 "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "$@1", 595 "'('", "')'", "'*'", "'='", "'{'", "':'", "$accept", "declaration_seq",
594 "declaration1", "$@2", "$@3", "simple_declaration", 596 "declaration", "$@1", "declaration1", "$@2", "$@3", "simple_declaration",
595 "init_declarator_list_opt", "init_declarator_list", "init_declarator", 597 "init_declarator_list_opt", "init_declarator_list", "init_declarator",
596 "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier", 598 "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier",
597 "storage_class_specifier", "type_specifier", "simple_type_specifier", 599 "storage_class_specifier", "type_specifier", "simple_type_specifier",
@@ -619,28 +621,28 @@ static const yytype_uint16 yytoknum[] =
619 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 621 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
620 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 622 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
621 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 623 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
622 295, 296, 297, 298, 299, 59, 125, 44, 40, 41, 624 295, 296, 297, 298, 299, 300, 59, 125, 44, 40,
623 42, 61, 123, 58 625 41, 42, 61, 123, 58
624}; 626};
625# endif 627# endif
626 628
627/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 629/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
628static const yytype_uint8 yyr1[] = 630static const yytype_uint8 yyr1[] =
629{ 631{
630 0, 54, 55, 55, 57, 56, 59, 58, 60, 58, 632 0, 55, 56, 56, 58, 57, 60, 59, 61, 59,
631 58, 58, 58, 58, 58, 58, 61, 62, 62, 63, 633 59, 59, 59, 59, 59, 59, 62, 63, 63, 64,
632 63, 64, 65, 65, 66, 66, 67, 67, 68, 68, 634 64, 65, 66, 66, 67, 67, 68, 68, 69, 69,
633 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 635 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
634 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 636 70, 70, 70, 70, 70, 70, 71, 71, 71, 71,
635 70, 70, 70, 70, 70, 70, 70, 71, 72, 72, 637 71, 71, 71, 71, 71, 71, 71, 71, 72, 73,
636 73, 73, 74, 74, 74, 74, 75, 75, 76, 76, 638 73, 74, 74, 75, 75, 75, 75, 76, 76, 77,
637 76, 76, 76, 76, 76, 77, 77, 78, 78, 78, 639 77, 77, 77, 77, 77, 77, 78, 78, 79, 79,
638 78, 78, 78, 78, 79, 79, 79, 80, 80, 81, 640 79, 79, 79, 79, 79, 80, 80, 80, 81, 81,
639 81, 82, 83, 83, 84, 84, 84, 84, 84, 84, 641 82, 82, 83, 84, 84, 85, 85, 85, 85, 85,
640 84, 84, 85, 86, 86, 87, 88, 88, 89, 89, 642 85, 85, 85, 86, 87, 87, 88, 89, 89, 90,
641 90, 90, 91, 91, 92, 92, 93, 93, 94, 94, 643 90, 91, 91, 92, 92, 93, 93, 94, 94, 95,
642 94, 95, 96, 96, 97, 97, 98, 98, 99, 99, 644 95, 95, 96, 97, 97, 98, 98, 99, 99, 100,
643 100, 101, 101, 102 645 100, 101, 102, 102, 103
644}; 646};
645 647
646/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 648/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -651,15 +653,15 @@ static const yytype_uint8 yyr2[] =
651 3, 4, 0, 1, 1, 2, 1, 1, 1, 1, 653 3, 4, 0, 1, 1, 2, 1, 1, 1, 1,
652 1, 1, 1, 1, 1, 4, 1, 2, 2, 2, 654 1, 1, 1, 1, 1, 4, 1, 2, 2, 2,
653 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 655 3, 3, 3, 2, 2, 2, 1, 1, 1, 1,
654 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 656 1, 1, 1, 1, 1, 1, 1, 1, 2, 0,
655 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 657 1, 1, 2, 1, 1, 1, 1, 2, 1, 1,
656 4, 4, 2, 3, 3, 2, 1, 1, 1, 4, 658 1, 4, 4, 2, 3, 3, 2, 1, 1, 1,
657 4, 2, 3, 3, 2, 1, 3, 0, 1, 1, 659 4, 4, 2, 3, 3, 2, 1, 3, 0, 1,
658 3, 2, 2, 1, 0, 1, 1, 4, 4, 2, 660 1, 3, 2, 2, 1, 0, 1, 1, 4, 4,
659 3, 3, 3, 0, 1, 2, 3, 3, 0, 1, 661 2, 3, 3, 3, 0, 1, 2, 3, 3, 0,
660 1, 2, 3, 2, 0, 1, 1, 3, 2, 2, 662 1, 1, 2, 3, 2, 0, 1, 1, 3, 2,
661 1, 2, 0, 2, 3, 4, 1, 3, 1, 3, 663 2, 1, 2, 0, 2, 3, 4, 1, 3, 1,
662 2, 0, 1, 5 664 3, 2, 0, 1, 5
663}; 665};
664 666
665/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 667/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
@@ -668,217 +670,219 @@ static const yytype_uint8 yyr2[] =
668static const yytype_uint8 yydefact[] = 670static const yytype_uint8 yydefact[] =
669{ 671{
670 4, 4, 2, 0, 1, 3, 0, 28, 55, 46, 672 4, 4, 2, 0, 1, 3, 0, 28, 55, 46,
671 62, 53, 0, 31, 0, 52, 32, 48, 49, 29, 673 63, 53, 0, 31, 0, 52, 32, 48, 49, 29,
672 65, 47, 50, 30, 0, 8, 0, 51, 54, 63, 674 66, 47, 50, 30, 0, 8, 0, 51, 54, 64,
673 0, 0, 0, 64, 36, 56, 5, 10, 17, 23, 675 0, 56, 0, 0, 65, 36, 57, 5, 10, 17,
674 24, 26, 27, 33, 34, 11, 12, 13, 14, 15, 676 23, 24, 26, 27, 33, 34, 11, 12, 13, 14,
675 39, 0, 43, 6, 37, 0, 44, 22, 38, 45, 677 15, 39, 0, 43, 6, 37, 0, 44, 22, 38,
676 0, 0, 130, 68, 69, 0, 58, 0, 18, 19, 678 45, 0, 0, 131, 69, 70, 0, 59, 0, 18,
677 0, 131, 67, 25, 42, 128, 0, 126, 22, 40, 679 19, 0, 132, 68, 25, 42, 129, 0, 127, 22,
678 0, 114, 0, 0, 110, 9, 17, 41, 94, 0, 680 40, 0, 115, 0, 0, 111, 9, 17, 41, 95,
679 0, 0, 0, 57, 59, 60, 16, 0, 66, 132, 681 0, 0, 0, 0, 58, 60, 61, 16, 0, 67,
680 102, 122, 72, 0, 0, 124, 0, 7, 113, 107, 682 133, 103, 123, 73, 0, 0, 125, 0, 7, 114,
681 77, 78, 0, 0, 0, 122, 76, 0, 115, 116, 683 108, 78, 79, 0, 0, 0, 123, 77, 0, 116,
682 120, 106, 0, 111, 131, 95, 56, 0, 94, 91, 684 117, 121, 107, 0, 112, 132, 96, 57, 0, 95,
683 93, 35, 0, 74, 73, 61, 20, 103, 0, 0, 685 92, 94, 35, 0, 75, 74, 62, 20, 104, 0,
684 85, 88, 89, 129, 125, 127, 119, 0, 77, 0, 686 0, 86, 89, 90, 130, 126, 128, 120, 0, 78,
685 121, 75, 118, 81, 0, 112, 0, 0, 96, 0, 687 0, 122, 76, 119, 82, 0, 113, 0, 0, 97,
686 92, 99, 0, 133, 123, 0, 21, 104, 71, 70, 688 0, 93, 100, 0, 134, 124, 0, 21, 105, 72,
687 84, 0, 83, 82, 0, 0, 117, 101, 100, 0, 689 71, 85, 0, 84, 83, 0, 0, 118, 102, 101,
688 0, 105, 86, 90, 80, 79, 98, 97 690 0, 0, 106, 87, 91, 81, 80, 99, 98
689}; 691};
690 692
691/* YYDEFGOTO[NTERM-NUM]. */ 693/* YYDEFGOTO[NTERM-NUM]. */
692static const yytype_int16 yydefgoto[] = 694static const yytype_int16 yydefgoto[] =
693{ 695{
694 -1, 1, 2, 3, 36, 78, 57, 37, 67, 68, 696 -1, 1, 2, 3, 37, 79, 58, 38, 68, 69,
695 69, 81, 39, 40, 41, 42, 43, 70, 93, 94, 697 70, 82, 40, 41, 42, 43, 44, 71, 94, 95,
696 44, 124, 72, 115, 116, 139, 140, 141, 142, 129, 698 45, 125, 73, 116, 117, 140, 141, 142, 143, 130,
697 130, 45, 166, 167, 56, 82, 83, 84, 117, 118, 699 131, 46, 167, 168, 57, 83, 84, 85, 118, 119,
698 119, 120, 137, 52, 76, 77, 46, 101, 47 700 120, 121, 138, 53, 77, 78, 47, 102, 48
699}; 701};
700 702
701/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 703/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
702 STATE-NUM. */ 704 STATE-NUM. */
703#define YYPACT_NINF -92 705#define YYPACT_NINF -111
704static const yytype_int16 yypact[] = 706static const yytype_int16 yypact[] =
705{ 707{
706 -92, 19, -92, 208, -92, -92, 39, -92, -92, -92, 708 -111, 13, -111, 210, -111, -111, 28, -111, -111, -111,
707 -92, -92, -27, -92, 23, -92, -92, -92, -92, -92, 709 -111, -111, -27, -111, 44, -111, -111, -111, -111, -111,
708 -92, -92, -92, -92, -22, -92, 9, -92, -92, -92, 710 -111, -111, -111, -111, -24, -111, -20, -111, -111, -111,
709 -6, 16, 25, -92, -92, -92, -92, -92, 31, 473, 711 31, -111, 32, 42, -111, -111, -111, -111, -111, 34,
710 -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, 712 481, -111, -111, -111, -111, -111, -111, -111, -111, -111,
711 49, 37, -92, -92, 51, 108, -92, 473, 51, -92, 713 -111, 51, 56, -111, -111, 52, 108, -111, 481, 52,
712 473, 59, -92, -92, -92, 12, -3, 60, 57, -92, 714 -111, 481, 58, -111, -111, -111, 19, 0, 54, 55,
713 31, -7, 24, -92, -92, 55, 42, -92, 473, -92, 715 -111, 34, 30, -18, -111, -111, 68, -25, -111, 481,
714 46, -21, 61, 158, -92, -92, 31, -92, 389, 71, 716 -111, 45, 33, 59, 159, -111, -111, 34, -111, 395,
715 82, 88, 89, -92, -3, -92, -92, 31, -92, -92, 717 57, 60, 81, 88, -111, 0, -111, -111, 34, -111,
716 -92, -92, -92, 254, 73, -92, -24, -92, -92, -92, 718 -111, -111, -111, -111, 257, 72, -111, -23, -111, -111,
717 90, -92, 17, 75, 45, -92, 32, 96, 95, -92, 719 -111, 85, -111, 20, 106, 47, -111, -10, 97, 96,
718 -92, -92, 99, -92, 115, -92, -92, 3, 48, -92, 720 -111, -111, -111, 99, -111, 115, -111, -111, 5, 50,
719 34, -92, 102, -92, -92, -92, -92, -11, 100, 103, 721 -111, 11, -111, 102, -111, -111, -111, -111, -22, 100,
720 111, 104, -92, -92, -92, -92, -92, 106, -92, 113, 722 103, 111, 104, -111, -111, -111, -111, -111, 113, -111,
721 -92, -92, 126, -92, 299, -92, -21, 121, -92, 132, 723 121, -111, -111, 124, -111, 303, -111, 33, 132, -111,
722 -92, -92, 344, -92, -92, 125, -92, -92, -92, -92, 724 139, -111, -111, 349, -111, -111, 122, -111, -111, -111,
723 -92, 435, -92, -92, 138, 139, -92, -92, -92, 142, 725 -111, -111, 442, -111, -111, 140, 143, -111, -111, -111,
724 143, -92, -92, -92, -92, -92, -92, -92 726 144, 145, -111, -111, -111, -111, -111, -111, -111
725}; 727};
726 728
727/* YYPGOTO[NTERM-NUM]. */ 729/* YYPGOTO[NTERM-NUM]. */
728static const yytype_int16 yypgoto[] = 730static const yytype_int16 yypgoto[] =
729{ 731{
730 -92, -92, 192, -92, -92, -92, -92, -47, -92, -92, 732 -111, -111, 160, -111, -111, -111, -111, -51, -111, -111,
731 97, 0, -60, -32, -92, -92, -92, -79, -92, -92, 733 98, -1, -61, -37, -111, -111, -111, -78, -111, -111,
732 -58, -26, -92, -38, -92, -91, -92, -92, -59, -28, 734 -53, -30, -111, -66, -111, -110, -111, -111, -60, -63,
733 -92, -92, -92, -92, -20, -92, -92, 112, -92, -92, 735 -111, -111, -111, -111, -21, -111, -111, 116, -111, -111,
734 41, 91, 83, 149, -92, 101, -92, -92, -92 736 40, 90, 83, 152, -111, 105, -111, -111, -111
735}; 737};
736 738
737/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 739/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
738 positive, shift that token. If negative, reduce the rule which 740 positive, shift that token. If negative, reduce the rule which
739 number is the opposite. If YYTABLE_NINF, syntax error. */ 741 number is the opposite. If YYTABLE_NINF, syntax error. */
740#define YYTABLE_NINF -110 742#define YYTABLE_NINF -111
741static const yytype_int16 yytable[] = 743static const yytype_int16 yytable[] =
742{ 744{
743 88, 89, 114, 38, 157, 10, 59, 73, 95, 128, 745 89, 90, 39, 74, 115, 60, 158, 86, 10, 72,
744 85, 50, 71, 91, 75, 20, 54, 110, 147, 4, 746 165, 129, 51, 4, 96, 55, 76, 103, 20, 59,
745 164, 111, 144, 99, 29, 51, 100, 112, 33, 66, 747 92, 148, 106, 107, 145, 154, 52, 29, 108, 56,
746 55, 107, 113, 114, 79, 114, 135, -94, 87, 92, 748 166, 104, 34, 56, 80, 115, 93, 115, 88, 155,
747 165, 125, 60, 88, 98, 158, 53, 58, 128, 128, 749 -95, 99, 136, 89, 126, 176, 162, 150, 159, 152,
748 63, 127, -94, 66, 64, 148, 73, 86, 102, 111, 750 129, 129, 74, 181, 128, -95, 67, 87, 64, 149,
749 65, 55, 66, 175, 61, 112, 153, 66, 161, 63, 751 163, 100, 65, 112, 101, 160, 161, 54, 66, 113,
750 62, 180, 103, 64, 149, 75, 151, 114, 86, 65, 752 67, 67, 111, 64, 49, 50, 112, 65, 87, 115,
751 154, 66, 162, 148, 48, 49, 125, 111, 105, 106, 753 61, 62, 113, 66, 67, 67, 149, 114, 63, 126,
752 158, 108, 109, 112, 88, 66, 127, 90, 66, 159, 754 112, 109, 110, 159, 89, 76, 113, 91, 67, 128,
753 160, 51, 88, 55, 97, 96, 104, 121, 143, 80, 755 97, 67, 89, 98, 52, 56, 122, 132, 144, 81,
754 150, 88, 183, 7, 8, 9, 10, 11, 12, 13, 756 133, 89, 184, 7, 8, 9, 10, 11, 12, 13,
755 131, 15, 16, 17, 18, 19, 20, 21, 22, 23, 757 105, 15, 16, 17, 18, 19, 20, 21, 22, 23,
756 24, 132, 26, 27, 28, 29, 30, 133, 134, 33, 758 24, 134, 26, 27, 28, 29, 30, 31, 135, 114,
757 34, 155, 156, 113, 108, 99, -22, 163, 170, 168, 759 34, 35, 151, 156, 157, 109, 100, -22, 164, 171,
758 35, 171, 169, -22, -108, 172, -22, 164, -22, 122, 760 169, 36, 172, 170, -22, -109, 165, -22, 182, -22,
759 181, -22, 173, 7, 8, 9, 10, 11, 12, 13, 761 123, 5, -22, 173, 7, 8, 9, 10, 11, 12,
760 177, 15, 16, 17, 18, 19, 20, 21, 22, 23, 762 13, 174, 15, 16, 17, 18, 19, 20, 21, 22,
761 24, 178, 26, 27, 28, 29, 30, 184, 185, 33, 763 23, 24, 178, 26, 27, 28, 29, 30, 31, 179,
762 34, 186, 187, 5, 136, 123, -22, 176, 152, 74, 764 185, 34, 35, 186, 187, 188, 137, 177, -22, 153,
763 35, 146, 0, -22, -109, 0, -22, 145, -22, 6, 765 124, 147, 36, 75, 0, -22, -110, 0, -22, 0,
764 0, -22, 0, 7, 8, 9, 10, 11, 12, 13, 766 -22, 6, 146, -22, 0, 7, 8, 9, 10, 11,
765 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 767 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
766 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 768 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
767 34, 0, 0, 0, 0, 0, -22, 0, 0, 0, 769 32, 33, 34, 35, 0, 0, 0, 0, 0, -22,
768 35, 0, 0, -22, 0, 138, -22, 0, -22, 7, 770 0, 0, 0, 36, 0, 0, -22, 0, 139, -22,
769 8, 9, 10, 11, 12, 13, 0, 15, 16, 17, 771 0, -22, 7, 8, 9, 10, 11, 12, 13, 0,
770 18, 19, 20, 21, 22, 23, 24, 0, 26, 27, 772 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
771 28, 29, 30, 0, 0, 33, 34, 0, 0, 0, 773 0, 26, 27, 28, 29, 30, 31, 0, 0, 34,
772 0, -87, 0, 0, 0, 0, 35, 0, 0, 0, 774 35, 0, 0, 0, 0, -88, 0, 0, 0, 0,
773 174, 0, 0, -87, 7, 8, 9, 10, 11, 12, 775 36, 0, 0, 0, 175, 0, 0, -88, 7, 8,
774 13, 0, 15, 16, 17, 18, 19, 20, 21, 22, 776 9, 10, 11, 12, 13, 0, 15, 16, 17, 18,
775 23, 24, 0, 26, 27, 28, 29, 30, 0, 0, 777 19, 20, 21, 22, 23, 24, 0, 26, 27, 28,
776 33, 34, 0, 0, 0, 0, -87, 0, 0, 0, 778 29, 30, 31, 0, 0, 34, 35, 0, 0, 0,
777 0, 35, 0, 0, 0, 179, 0, 0, -87, 7, 779 0, -88, 0, 0, 0, 0, 36, 0, 0, 0,
778 8, 9, 10, 11, 12, 13, 0, 15, 16, 17, 780 180, 0, 0, -88, 7, 8, 9, 10, 11, 12,
779 18, 19, 20, 21, 22, 23, 24, 0, 26, 27,
780 28, 29, 30, 0, 0, 33, 34, 0, 0, 0,
781 0, -87, 0, 0, 0, 0, 35, 0, 0, 0,
782 0, 0, 0, -87, 7, 8, 9, 10, 11, 12,
783 13, 0, 15, 16, 17, 18, 19, 20, 21, 22, 781 13, 0, 15, 16, 17, 18, 19, 20, 21, 22,
784 23, 24, 0, 26, 27, 28, 29, 30, 0, 0, 782 23, 24, 0, 26, 27, 28, 29, 30, 31, 0,
785 33, 34, 0, 0, 0, 0, 0, 125, 0, 0, 783 0, 34, 35, 0, 0, 0, 0, -88, 0, 0,
786 0, 126, 0, 0, 0, 0, 0, 127, 0, 66, 784 0, 0, 36, 0, 0, 0, 0, 0, 0, -88,
787 7, 8, 9, 10, 11, 12, 13, 0, 15, 16, 785 7, 8, 9, 10, 11, 12, 13, 0, 15, 16,
788 17, 18, 19, 20, 21, 22, 23, 24, 0, 26, 786 17, 18, 19, 20, 21, 22, 23, 24, 0, 26,
789 27, 28, 29, 30, 0, 0, 33, 34, 0, 0, 787 27, 28, 29, 30, 31, 0, 0, 34, 35, 0,
790 0, 0, 182, 0, 0, 0, 0, 35, 7, 8, 788 0, 0, 0, 0, 126, 0, 0, 0, 127, 0,
791 9, 10, 11, 12, 13, 0, 15, 16, 17, 18, 789 0, 0, 0, 0, 128, 0, 67, 7, 8, 9,
792 19, 20, 21, 22, 23, 24, 0, 26, 27, 28, 790 10, 11, 12, 13, 0, 15, 16, 17, 18, 19,
793 29, 30, 0, 0, 33, 34, 0, 0, 0, 0, 791 20, 21, 22, 23, 24, 0, 26, 27, 28, 29,
794 0, 0, 0, 0, 0, 35 792 30, 31, 0, 0, 34, 35, 0, 0, 0, 0,
793 183, 0, 0, 0, 0, 36, 7, 8, 9, 10,
794 11, 12, 13, 0, 15, 16, 17, 18, 19, 20,
795 21, 22, 23, 24, 0, 26, 27, 28, 29, 30,
796 31, 0, 0, 34, 35, 0, 0, 0, 0, 0,
797 0, 0, 0, 0, 36
795}; 798};
796 799
797#define yypact_value_is_default(Yystate) \ 800#define yypact_value_is_default(Yystate) \
798 (!!((Yystate) == (-92))) 801 (!!((Yystate) == (-111)))
799 802
800#define yytable_value_is_error(Yytable_value) \ 803#define yytable_value_is_error(Yytable_value) \
801 YYID (0) 804 YYID (0)
802 805
803static const yytype_int16 yycheck[] = 806static const yytype_int16 yycheck[] =
804{ 807{
805 60, 60, 81, 3, 1, 8, 26, 39, 66, 88, 808 61, 61, 3, 40, 82, 26, 1, 58, 8, 39,
806 57, 38, 38, 1, 38, 18, 38, 38, 1, 0, 809 32, 89, 39, 0, 67, 39, 39, 35, 18, 39,
807 31, 42, 46, 30, 27, 52, 33, 48, 31, 50, 810 1, 1, 47, 48, 47, 35, 53, 27, 79, 53,
808 52, 78, 53, 112, 54, 114, 94, 34, 58, 65, 811 52, 49, 32, 53, 55, 113, 66, 115, 59, 49,
809 51, 38, 48, 103, 70, 42, 23, 38, 127, 128, 812 35, 71, 95, 104, 39, 155, 35, 113, 43, 115,
810 38, 48, 49, 50, 42, 38, 88, 57, 34, 42, 813 128, 129, 89, 163, 49, 50, 51, 58, 39, 39,
811 48, 52, 50, 154, 48, 48, 34, 50, 34, 38, 814 49, 31, 43, 43, 34, 128, 129, 23, 49, 49,
812 45, 162, 48, 42, 112, 38, 114, 156, 78, 48, 815 51, 51, 39, 39, 46, 47, 43, 43, 79, 157,
813 48, 50, 48, 38, 45, 46, 38, 42, 46, 47, 816 49, 49, 49, 49, 51, 51, 39, 54, 46, 39,
814 42, 45, 46, 48, 154, 50, 48, 38, 50, 127, 817 43, 46, 47, 43, 155, 39, 49, 39, 51, 49,
815 128, 52, 162, 52, 47, 45, 51, 46, 35, 1, 818 46, 51, 163, 48, 53, 53, 47, 50, 36, 1,
816 35, 171, 171, 5, 6, 7, 8, 9, 10, 11, 819 50, 172, 172, 5, 6, 7, 8, 9, 10, 11,
817 49, 13, 14, 15, 16, 17, 18, 19, 20, 21, 820 52, 13, 14, 15, 16, 17, 18, 19, 20, 21,
818 22, 49, 24, 25, 26, 27, 28, 49, 49, 31, 821 22, 50, 24, 25, 26, 27, 28, 29, 50, 54,
819 32, 45, 47, 53, 45, 30, 38, 45, 37, 49, 822 32, 33, 36, 46, 48, 46, 31, 39, 46, 38,
820 42, 47, 49, 45, 46, 49, 48, 31, 50, 1, 823 50, 43, 48, 50, 46, 47, 32, 49, 36, 51,
821 35, 53, 49, 5, 6, 7, 8, 9, 10, 11, 824 1, 1, 54, 50, 5, 6, 7, 8, 9, 10,
822 49, 13, 14, 15, 16, 17, 18, 19, 20, 21, 825 11, 50, 13, 14, 15, 16, 17, 18, 19, 20,
823 22, 49, 24, 25, 26, 27, 28, 49, 49, 31, 826 21, 22, 50, 24, 25, 26, 27, 28, 29, 50,
824 32, 49, 49, 1, 97, 83, 38, 156, 115, 50, 827 50, 32, 33, 50, 50, 50, 98, 157, 39, 116,
825 42, 110, -1, 45, 46, -1, 48, 106, 50, 1, 828 84, 111, 43, 51, -1, 46, 47, -1, 49, -1,
826 -1, 53, -1, 5, 6, 7, 8, 9, 10, 11, 829 51, 1, 107, 54, -1, 5, 6, 7, 8, 9,
827 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 830 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
828 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 831 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
829 32, -1, -1, -1, -1, -1, 38, -1, -1, -1, 832 30, 31, 32, 33, -1, -1, -1, -1, -1, 39,
830 42, -1, -1, 45, -1, 1, 48, -1, 50, 5, 833 -1, -1, -1, 43, -1, -1, 46, -1, 1, 49,
831 6, 7, 8, 9, 10, 11, -1, 13, 14, 15, 834 -1, 51, 5, 6, 7, 8, 9, 10, 11, -1,
832 16, 17, 18, 19, 20, 21, 22, -1, 24, 25, 835 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
833 26, 27, 28, -1, -1, 31, 32, -1, -1, -1, 836 -1, 24, 25, 26, 27, 28, 29, -1, -1, 32,
834 -1, 37, -1, -1, -1, -1, 42, -1, -1, -1, 837 33, -1, -1, -1, -1, 38, -1, -1, -1, -1,
835 1, -1, -1, 49, 5, 6, 7, 8, 9, 10, 838 43, -1, -1, -1, 1, -1, -1, 50, 5, 6,
836 11, -1, 13, 14, 15, 16, 17, 18, 19, 20, 839 7, 8, 9, 10, 11, -1, 13, 14, 15, 16,
837 21, 22, -1, 24, 25, 26, 27, 28, -1, -1, 840 17, 18, 19, 20, 21, 22, -1, 24, 25, 26,
838 31, 32, -1, -1, -1, -1, 37, -1, -1, -1, 841 27, 28, 29, -1, -1, 32, 33, -1, -1, -1,
839 -1, 42, -1, -1, -1, 1, -1, -1, 49, 5, 842 -1, 38, -1, -1, -1, -1, 43, -1, -1, -1,
840 6, 7, 8, 9, 10, 11, -1, 13, 14, 15, 843 1, -1, -1, 50, 5, 6, 7, 8, 9, 10,
841 16, 17, 18, 19, 20, 21, 22, -1, 24, 25,
842 26, 27, 28, -1, -1, 31, 32, -1, -1, -1,
843 -1, 37, -1, -1, -1, -1, 42, -1, -1, -1,
844 -1, -1, -1, 49, 5, 6, 7, 8, 9, 10,
845 11, -1, 13, 14, 15, 16, 17, 18, 19, 20, 844 11, -1, 13, 14, 15, 16, 17, 18, 19, 20,
846 21, 22, -1, 24, 25, 26, 27, 28, -1, -1, 845 21, 22, -1, 24, 25, 26, 27, 28, 29, -1,
847 31, 32, -1, -1, -1, -1, -1, 38, -1, -1, 846 -1, 32, 33, -1, -1, -1, -1, 38, -1, -1,
848 -1, 42, -1, -1, -1, -1, -1, 48, -1, 50, 847 -1, -1, 43, -1, -1, -1, -1, -1, -1, 50,
849 5, 6, 7, 8, 9, 10, 11, -1, 13, 14, 848 5, 6, 7, 8, 9, 10, 11, -1, 13, 14,
850 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, 849 15, 16, 17, 18, 19, 20, 21, 22, -1, 24,
851 25, 26, 27, 28, -1, -1, 31, 32, -1, -1, 850 25, 26, 27, 28, 29, -1, -1, 32, 33, -1,
852 -1, -1, 37, -1, -1, -1, -1, 42, 5, 6, 851 -1, -1, -1, -1, 39, -1, -1, -1, 43, -1,
853 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, 852 -1, -1, -1, -1, 49, -1, 51, 5, 6, 7,
854 17, 18, 19, 20, 21, 22, -1, 24, 25, 26, 853 8, 9, 10, 11, -1, 13, 14, 15, 16, 17,
855 27, 28, -1, -1, 31, 32, -1, -1, -1, -1, 854 18, 19, 20, 21, 22, -1, 24, 25, 26, 27,
856 -1, -1, -1, -1, -1, 42 855 28, 29, -1, -1, 32, 33, -1, -1, -1, -1,
856 38, -1, -1, -1, -1, 43, 5, 6, 7, 8,
857 9, 10, 11, -1, 13, 14, 15, 16, 17, 18,
858 19, 20, 21, 22, -1, 24, 25, 26, 27, 28,
859 29, -1, -1, 32, 33, -1, -1, -1, -1, -1,
860 -1, -1, -1, -1, 43
857}; 861};
858 862
859/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 863/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
860 symbol of state STATE-NUM. */ 864 symbol of state STATE-NUM. */
861static const yytype_uint8 yystos[] = 865static const yytype_uint8 yystos[] =
862{ 866{
863 0, 55, 56, 57, 0, 56, 1, 5, 6, 7, 867 0, 56, 57, 58, 0, 57, 1, 5, 6, 7,
864 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 868 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
865 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 869 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
866 28, 29, 30, 31, 32, 42, 58, 61, 65, 66, 870 28, 29, 30, 31, 32, 33, 43, 59, 62, 66,
867 67, 68, 69, 70, 74, 85, 100, 102, 45, 46, 871 67, 68, 69, 70, 71, 75, 86, 101, 103, 46,
868 38, 52, 97, 23, 38, 52, 88, 60, 38, 88, 872 47, 39, 53, 98, 23, 39, 53, 89, 61, 39,
869 48, 48, 45, 38, 42, 48, 50, 62, 63, 64, 873 89, 49, 49, 46, 39, 43, 49, 51, 63, 64,
870 71, 75, 76, 67, 97, 38, 98, 99, 59, 88, 874 65, 72, 76, 77, 68, 98, 39, 99, 100, 60,
871 1, 65, 89, 90, 91, 61, 65, 88, 66, 82, 875 89, 1, 66, 90, 91, 92, 62, 66, 89, 67,
872 38, 1, 75, 72, 73, 74, 45, 47, 75, 30, 876 83, 39, 1, 76, 73, 74, 75, 46, 48, 76,
873 33, 101, 34, 48, 51, 46, 47, 61, 45, 46, 877 31, 34, 102, 35, 49, 52, 47, 48, 62, 46,
874 38, 42, 48, 53, 71, 77, 78, 92, 93, 94, 878 47, 39, 43, 49, 54, 72, 78, 79, 93, 94,
875 95, 46, 1, 91, 75, 38, 42, 48, 71, 83, 879 95, 96, 47, 1, 92, 76, 39, 43, 49, 72,
876 84, 49, 49, 49, 49, 74, 64, 96, 1, 79, 880 84, 85, 50, 50, 50, 50, 75, 65, 97, 1,
877 80, 81, 82, 35, 46, 99, 95, 1, 38, 77, 881 80, 81, 82, 83, 36, 47, 100, 96, 1, 39,
878 35, 77, 96, 34, 48, 45, 47, 1, 42, 83, 882 78, 36, 78, 97, 35, 49, 46, 48, 1, 43,
879 83, 34, 48, 45, 31, 51, 86, 87, 49, 49, 883 84, 84, 35, 49, 46, 32, 52, 87, 88, 50,
880 37, 47, 49, 49, 1, 79, 94, 49, 49, 1, 884 50, 38, 48, 50, 50, 1, 80, 95, 50, 50,
881 79, 35, 37, 82, 49, 49, 49, 49 885 1, 80, 36, 38, 83, 50, 50, 50, 50
882}; 886};
883 887
884#define yyerrok (yyerrstatus = 0) 888#define yyerrok (yyerrstatus = 0)
@@ -1845,27 +1849,27 @@ yyreduce:
1845 { (yyval) = (yyvsp[(2) - (2)]); } 1849 { (yyval) = (yyvsp[(2) - (2)]); }
1846 break; 1850 break;
1847 1851
1848 case 56: 1852 case 57:
1849 1853
1850 { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); } 1854 { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); }
1851 break; 1855 break;
1852 1856
1853 case 57: 1857 case 58:
1854 1858
1855 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } 1859 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
1856 break; 1860 break;
1857 1861
1858 case 58: 1862 case 59:
1859 1863
1860 { (yyval) = NULL; } 1864 { (yyval) = NULL; }
1861 break; 1865 break;
1862 1866
1863 case 61: 1867 case 62:
1864 1868
1865 { (yyval) = (yyvsp[(2) - (2)]); } 1869 { (yyval) = (yyvsp[(2) - (2)]); }
1866 break; 1870 break;
1867 1871
1868 case 65: 1872 case 66:
1869 1873
1870 { /* restrict has no effect in prototypes so ignore it */ 1874 { /* restrict has no effect in prototypes so ignore it */
1871 remove_node((yyvsp[(1) - (1)])); 1875 remove_node((yyvsp[(1) - (1)]));
@@ -1873,12 +1877,12 @@ yyreduce:
1873 } 1877 }
1874 break; 1878 break;
1875 1879
1876 case 66: 1880 case 67:
1877 1881
1878 { (yyval) = (yyvsp[(2) - (2)]); } 1882 { (yyval) = (yyvsp[(2) - (2)]); }
1879 break; 1883 break;
1880 1884
1881 case 68: 1885 case 69:
1882 1886
1883 { if (current_name != NULL) { 1887 { if (current_name != NULL) {
1884 error_with_pos("unexpected second declaration name"); 1888 error_with_pos("unexpected second declaration name");
@@ -1890,7 +1894,7 @@ yyreduce:
1890 } 1894 }
1891 break; 1895 break;
1892 1896
1893 case 69: 1897 case 70:
1894 1898
1895 { if (current_name != NULL) { 1899 { if (current_name != NULL) {
1896 error_with_pos("unexpected second declaration name"); 1900 error_with_pos("unexpected second declaration name");
@@ -1902,11 +1906,6 @@ yyreduce:
1902 } 1906 }
1903 break; 1907 break;
1904 1908
1905 case 70:
1906
1907 { (yyval) = (yyvsp[(4) - (4)]); }
1908 break;
1909
1910 case 71: 1909 case 71:
1911 1910
1912 { (yyval) = (yyvsp[(4) - (4)]); } 1911 { (yyval) = (yyvsp[(4) - (4)]); }
@@ -1914,12 +1913,12 @@ yyreduce:
1914 1913
1915 case 72: 1914 case 72:
1916 1915
1917 { (yyval) = (yyvsp[(2) - (2)]); } 1916 { (yyval) = (yyvsp[(4) - (4)]); }
1918 break; 1917 break;
1919 1918
1920 case 73: 1919 case 73:
1921 1920
1922 { (yyval) = (yyvsp[(3) - (3)]); } 1921 { (yyval) = (yyvsp[(2) - (2)]); }
1923 break; 1922 break;
1924 1923
1925 case 74: 1924 case 74:
@@ -1929,12 +1928,12 @@ yyreduce:
1929 1928
1930 case 75: 1929 case 75:
1931 1930
1932 { (yyval) = (yyvsp[(2) - (2)]); } 1931 { (yyval) = (yyvsp[(3) - (3)]); }
1933 break; 1932 break;
1934 1933
1935 case 79: 1934 case 76:
1936 1935
1937 { (yyval) = (yyvsp[(4) - (4)]); } 1936 { (yyval) = (yyvsp[(2) - (2)]); }
1938 break; 1937 break;
1939 1938
1940 case 80: 1939 case 80:
@@ -1944,12 +1943,12 @@ yyreduce:
1944 1943
1945 case 81: 1944 case 81:
1946 1945
1947 { (yyval) = (yyvsp[(2) - (2)]); } 1946 { (yyval) = (yyvsp[(4) - (4)]); }
1948 break; 1947 break;
1949 1948
1950 case 82: 1949 case 82:
1951 1950
1952 { (yyval) = (yyvsp[(3) - (3)]); } 1951 { (yyval) = (yyvsp[(2) - (2)]); }
1953 break; 1952 break;
1954 1953
1955 case 83: 1954 case 83:
@@ -1959,40 +1958,45 @@ yyreduce:
1959 1958
1960 case 84: 1959 case 84:
1961 1960
1961 { (yyval) = (yyvsp[(3) - (3)]); }
1962 break;
1963
1964 case 85:
1965
1962 { (yyval) = (yyvsp[(2) - (2)]); } 1966 { (yyval) = (yyvsp[(2) - (2)]); }
1963 break; 1967 break;
1964 1968
1965 case 86: 1969 case 87:
1966 1970
1967 { (yyval) = (yyvsp[(3) - (3)]); } 1971 { (yyval) = (yyvsp[(3) - (3)]); }
1968 break; 1972 break;
1969 1973
1970 case 87: 1974 case 88:
1971 1975
1972 { (yyval) = NULL; } 1976 { (yyval) = NULL; }
1973 break; 1977 break;
1974 1978
1975 case 90: 1979 case 91:
1976 1980
1977 { (yyval) = (yyvsp[(3) - (3)]); } 1981 { (yyval) = (yyvsp[(3) - (3)]); }
1978 break; 1982 break;
1979 1983
1980 case 91: 1984 case 92:
1981 1985
1982 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } 1986 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
1983 break; 1987 break;
1984 1988
1985 case 92: 1989 case 93:
1986 1990
1987 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } 1991 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
1988 break; 1992 break;
1989 1993
1990 case 94: 1994 case 95:
1991 1995
1992 { (yyval) = NULL; } 1996 { (yyval) = NULL; }
1993 break; 1997 break;
1994 1998
1995 case 95: 1999 case 96:
1996 2000
1997 { /* For version 2 checksums, we don't want to remember 2001 { /* For version 2 checksums, we don't want to remember
1998 private parameter names. */ 2002 private parameter names. */
@@ -2001,39 +2005,39 @@ yyreduce:
2001 } 2005 }
2002 break; 2006 break;
2003 2007
2004 case 96: 2008 case 97:
2005 2009
2006 { remove_node((yyvsp[(1) - (1)])); 2010 { remove_node((yyvsp[(1) - (1)]));
2007 (yyval) = (yyvsp[(1) - (1)]); 2011 (yyval) = (yyvsp[(1) - (1)]);
2008 } 2012 }
2009 break; 2013 break;
2010 2014
2011 case 97: 2015 case 98:
2012 2016
2013 { (yyval) = (yyvsp[(4) - (4)]); } 2017 { (yyval) = (yyvsp[(4) - (4)]); }
2014 break; 2018 break;
2015 2019
2016 case 98: 2020 case 99:
2017 2021
2018 { (yyval) = (yyvsp[(4) - (4)]); } 2022 { (yyval) = (yyvsp[(4) - (4)]); }
2019 break; 2023 break;
2020 2024
2021 case 99: 2025 case 100:
2022 2026
2023 { (yyval) = (yyvsp[(2) - (2)]); } 2027 { (yyval) = (yyvsp[(2) - (2)]); }
2024 break; 2028 break;
2025 2029
2026 case 100: 2030 case 101:
2027 2031
2028 { (yyval) = (yyvsp[(3) - (3)]); } 2032 { (yyval) = (yyvsp[(3) - (3)]); }
2029 break; 2033 break;
2030 2034
2031 case 101: 2035 case 102:
2032 2036
2033 { (yyval) = (yyvsp[(3) - (3)]); } 2037 { (yyval) = (yyvsp[(3) - (3)]); }
2034 break; 2038 break;
2035 2039
2036 case 102: 2040 case 103:
2037 2041
2038 { struct string_list *decl = *(yyvsp[(2) - (3)]); 2042 { struct string_list *decl = *(yyvsp[(2) - (3)]);
2039 *(yyvsp[(2) - (3)]) = NULL; 2043 *(yyvsp[(2) - (3)]) = NULL;
@@ -2042,87 +2046,87 @@ yyreduce:
2042 } 2046 }
2043 break; 2047 break;
2044 2048
2045 case 103: 2049 case 104:
2046 2050
2047 { (yyval) = NULL; } 2051 { (yyval) = NULL; }
2048 break; 2052 break;
2049 2053
2050 case 105: 2054 case 106:
2051 2055
2052 { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); } 2056 { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); }
2053 break; 2057 break;
2054 2058
2055 case 106: 2059 case 107:
2056 2060
2057 { (yyval) = (yyvsp[(3) - (3)]); } 2061 { (yyval) = (yyvsp[(3) - (3)]); }
2058 break; 2062 break;
2059 2063
2060 case 107: 2064 case 108:
2061 2065
2062 { (yyval) = (yyvsp[(3) - (3)]); } 2066 { (yyval) = (yyvsp[(3) - (3)]); }
2063 break; 2067 break;
2064 2068
2065 case 108: 2069 case 109:
2066 2070
2067 { (yyval) = NULL; } 2071 { (yyval) = NULL; }
2068 break; 2072 break;
2069 2073
2070 case 111: 2074 case 112:
2071 2075
2072 { (yyval) = (yyvsp[(2) - (2)]); } 2076 { (yyval) = (yyvsp[(2) - (2)]); }
2073 break; 2077 break;
2074 2078
2075 case 112: 2079 case 113:
2076 2080
2077 { (yyval) = (yyvsp[(3) - (3)]); } 2081 { (yyval) = (yyvsp[(3) - (3)]); }
2078 break; 2082 break;
2079 2083
2080 case 113: 2084 case 114:
2081 2085
2082 { (yyval) = (yyvsp[(2) - (2)]); } 2086 { (yyval) = (yyvsp[(2) - (2)]); }
2083 break; 2087 break;
2084 2088
2085 case 114: 2089 case 115:
2086 2090
2087 { (yyval) = NULL; } 2091 { (yyval) = NULL; }
2088 break; 2092 break;
2089 2093
2090 case 117: 2094 case 118:
2091 2095
2092 { (yyval) = (yyvsp[(3) - (3)]); } 2096 { (yyval) = (yyvsp[(3) - (3)]); }
2093 break; 2097 break;
2094 2098
2095 case 118: 2099 case 119:
2096 2100
2097 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); } 2101 { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
2098 break; 2102 break;
2099 2103
2100 case 119: 2104 case 120:
2101 2105
2102 { (yyval) = (yyvsp[(2) - (2)]); } 2106 { (yyval) = (yyvsp[(2) - (2)]); }
2103 break; 2107 break;
2104 2108
2105 case 121: 2109 case 122:
2106 2110
2107 { (yyval) = (yyvsp[(2) - (2)]); } 2111 { (yyval) = (yyvsp[(2) - (2)]); }
2108 break; 2112 break;
2109 2113
2110 case 122: 2114 case 123:
2111 2115
2112 { (yyval) = NULL; } 2116 { (yyval) = NULL; }
2113 break; 2117 break;
2114 2118
2115 case 124: 2119 case 125:
2116 2120
2117 { (yyval) = (yyvsp[(3) - (3)]); } 2121 { (yyval) = (yyvsp[(3) - (3)]); }
2118 break; 2122 break;
2119 2123
2120 case 125: 2124 case 126:
2121 2125
2122 { (yyval) = (yyvsp[(4) - (4)]); } 2126 { (yyval) = (yyvsp[(4) - (4)]); }
2123 break; 2127 break;
2124 2128
2125 case 128: 2129 case 129:
2126 2130
2127 { 2131 {
2128 const char *name = strdup((*(yyvsp[(1) - (1)]))->string); 2132 const char *name = strdup((*(yyvsp[(1) - (1)]))->string);
@@ -2130,7 +2134,7 @@ yyreduce:
2130 } 2134 }
2131 break; 2135 break;
2132 2136
2133 case 129: 2137 case 130:
2134 2138
2135 { 2139 {
2136 const char *name = strdup((*(yyvsp[(1) - (3)]))->string); 2140 const char *name = strdup((*(yyvsp[(1) - (3)]))->string);
@@ -2139,17 +2143,17 @@ yyreduce:
2139 } 2143 }
2140 break; 2144 break;
2141 2145
2142 case 130: 2146 case 131:
2143 2147
2144 { (yyval) = (yyvsp[(2) - (2)]); } 2148 { (yyval) = (yyvsp[(2) - (2)]); }
2145 break; 2149 break;
2146 2150
2147 case 131: 2151 case 132:
2148 2152
2149 { (yyval) = NULL; } 2153 { (yyval) = NULL; }
2150 break; 2154 break;
2151 2155
2152 case 133: 2156 case 134:
2153 2157
2154 { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); } 2158 { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); }
2155 break; 2159 break;
diff --git a/scripts/genksyms/parse.tab.h_shipped b/scripts/genksyms/parse.tab.h_shipped
index 4c00cef6d71d..46a5e124eda1 100644
--- a/scripts/genksyms/parse.tab.h_shipped
+++ b/scripts/genksyms/parse.tab.h_shipped
@@ -72,22 +72,23 @@ extern int yydebug;
72 VOID_KEYW = 281, 72 VOID_KEYW = 281,
73 VOLATILE_KEYW = 282, 73 VOLATILE_KEYW = 282,
74 TYPEOF_KEYW = 283, 74 TYPEOF_KEYW = 283,
75 EXPORT_SYMBOL_KEYW = 284, 75 VA_LIST_KEYW = 284,
76 ASM_PHRASE = 285, 76 EXPORT_SYMBOL_KEYW = 285,
77 ATTRIBUTE_PHRASE = 286, 77 ASM_PHRASE = 286,
78 TYPEOF_PHRASE = 287, 78 ATTRIBUTE_PHRASE = 287,
79 BRACE_PHRASE = 288, 79 TYPEOF_PHRASE = 288,
80 BRACKET_PHRASE = 289, 80 BRACE_PHRASE = 289,
81 EXPRESSION_PHRASE = 290, 81 BRACKET_PHRASE = 290,
82 CHAR = 291, 82 EXPRESSION_PHRASE = 291,
83 DOTS = 292, 83 CHAR = 292,
84 IDENT = 293, 84 DOTS = 293,
85 INT = 294, 85 IDENT = 294,
86 REAL = 295, 86 INT = 295,
87 STRING = 296, 87 REAL = 296,
88 TYPE = 297, 88 STRING = 297,
89 OTHER = 298, 89 TYPE = 298,
90 FILENAME = 299 90 OTHER = 299,
91 FILENAME = 300
91 }; 92 };
92#endif 93#endif
93 94
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index 723ab30fe9d4..4fba255e54ae 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -98,6 +98,7 @@ static void record_compound(struct string_list **keyw,
98%token VOID_KEYW 98%token VOID_KEYW
99%token VOLATILE_KEYW 99%token VOLATILE_KEYW
100%token TYPEOF_KEYW 100%token TYPEOF_KEYW
101%token VA_LIST_KEYW
101 102
102%token EXPORT_SYMBOL_KEYW 103%token EXPORT_SYMBOL_KEYW
103 104
@@ -261,6 +262,7 @@ simple_type_specifier:
261 | DOUBLE_KEYW 262 | DOUBLE_KEYW
262 | VOID_KEYW 263 | VOID_KEYW
263 | BOOL_KEYW 264 | BOOL_KEYW
265 | VA_LIST_KEYW
264 | TYPE { (*$1)->tag = SYM_TYPEDEF; $$ = $1; } 266 | TYPE { (*$1)->tag = SYM_TYPEDEF; $$ = $1; }
265 ; 267 ;
266 268
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index aed4511f0304..633f2dd3de27 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -49,6 +49,7 @@ my $scm = 0;
49my $web = 0; 49my $web = 0;
50my $subsystem = 0; 50my $subsystem = 0;
51my $status = 0; 51my $status = 0;
52my $letters = "";
52my $keywords = 1; 53my $keywords = 1;
53my $sections = 0; 54my $sections = 0;
54my $file_emails = 0; 55my $file_emails = 0;
@@ -241,6 +242,7 @@ if (!GetOptions(
241 'status!' => \$status, 242 'status!' => \$status,
242 'scm!' => \$scm, 243 'scm!' => \$scm,
243 'web!' => \$web, 244 'web!' => \$web,
245 'letters=s' => \$letters,
244 'pattern-depth=i' => \$pattern_depth, 246 'pattern-depth=i' => \$pattern_depth,
245 'k|keywords!' => \$keywords, 247 'k|keywords!' => \$keywords,
246 'sections!' => \$sections, 248 'sections!' => \$sections,
@@ -271,7 +273,8 @@ $output_multiline = 0 if ($output_separator ne ", ");
271$output_rolestats = 1 if ($interactive); 273$output_rolestats = 1 if ($interactive);
272$output_roles = 1 if ($output_rolestats); 274$output_roles = 1 if ($output_rolestats);
273 275
274if ($sections) { 276if ($sections || $letters ne "") {
277 $sections = 1;
275 $email = 0; 278 $email = 0;
276 $email_list = 0; 279 $email_list = 0;
277 $scm = 0; 280 $scm = 0;
@@ -682,8 +685,10 @@ sub get_maintainers {
682 $line =~ s/\\\./\./g; ##Convert \. to . 685 $line =~ s/\\\./\./g; ##Convert \. to .
683 $line =~ s/\.\*/\*/g; ##Convert .* to * 686 $line =~ s/\.\*/\*/g; ##Convert .* to *
684 } 687 }
685 $line =~ s/^([A-Z]):/$1:\t/g; 688 my $count = $line =~ s/^([A-Z]):/$1:\t/g;
686 print("$line\n"); 689 if ($letters eq "" || (!$count || $letters =~ /$1/i)) {
690 print("$line\n");
691 }
687 } 692 }
688 print("\n"); 693 print("\n");
689 } 694 }
@@ -814,6 +819,7 @@ Other options:
814 --pattern-depth => Number of pattern directory traversals (default: 0 (all)) 819 --pattern-depth => Number of pattern directory traversals (default: 0 (all))
815 --keywords => scan patch for keywords (default: $keywords) 820 --keywords => scan patch for keywords (default: $keywords)
816 --sections => print all of the subsystem sections with pattern matches 821 --sections => print all of the subsystem sections with pattern matches
822 --letters => print all matching 'letter' types from all matching sections
817 --mailmap => use .mailmap file (default: $email_use_mailmap) 823 --mailmap => use .mailmap file (default: $email_use_mailmap)
818 --version => show version 824 --version => show version
819 --help => show this help information 825 --help => show this help information
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 1f22a186c18c..299b92ca1ae0 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -76,7 +76,6 @@ static void usage(void)
76{ 76{
77 fprintf(stderr, "Usage: kallsyms [--all-symbols] " 77 fprintf(stderr, "Usage: kallsyms [--all-symbols] "
78 "[--symbol-prefix=<prefix char>] " 78 "[--symbol-prefix=<prefix char>] "
79 "[--page-offset=<CONFIG_PAGE_OFFSET>] "
80 "[--base-relative] < in.map > out.S\n"); 79 "[--base-relative] < in.map > out.S\n");
81 exit(1); 80 exit(1);
82} 81}
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index ebced77deb9c..90a091b6ae4d 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -35,6 +35,8 @@ nconfig: $(obj)/nconf
35 35
36silentoldconfig: $(obj)/conf 36silentoldconfig: $(obj)/conf
37 $(Q)mkdir -p include/config include/generated 37 $(Q)mkdir -p include/config include/generated
38 $(Q)test -e include/generated/autoksyms.h || \
39 touch include/generated/autoksyms.h
38 $< $(silent) --$@ $(Kconfig) 40 $< $(silent) --$@ $(Kconfig)
39 41
40localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf 42localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 973b6f733368..a73f762c48d6 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -85,6 +85,7 @@ struct symbol {
85 struct property *prop; 85 struct property *prop;
86 struct expr_value dir_dep; 86 struct expr_value dir_dep;
87 struct expr_value rev_dep; 87 struct expr_value rev_dep;
88 struct expr_value implied;
88}; 89};
89 90
90#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) 91#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
@@ -136,6 +137,7 @@ enum prop_type {
136 P_DEFAULT, /* default y */ 137 P_DEFAULT, /* default y */
137 P_CHOICE, /* choice value */ 138 P_CHOICE, /* choice value */
138 P_SELECT, /* select BAR */ 139 P_SELECT, /* select BAR */
140 P_IMPLY, /* imply BAR */
139 P_RANGE, /* range 7..100 (for a symbol) */ 141 P_RANGE, /* range 7..100 (for a symbol) */
140 P_ENV, /* value from environment variable */ 142 P_ENV, /* value from environment variable */
141 P_SYMBOL, /* where a symbol is defined */ 143 P_SYMBOL, /* where a symbol is defined */
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index aed678e8a777..e9357931b47d 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -233,6 +233,8 @@ static void sym_check_prop(struct symbol *sym)
233{ 233{
234 struct property *prop; 234 struct property *prop;
235 struct symbol *sym2; 235 struct symbol *sym2;
236 char *use;
237
236 for (prop = sym->prop; prop; prop = prop->next) { 238 for (prop = sym->prop; prop; prop = prop->next) {
237 switch (prop->type) { 239 switch (prop->type) {
238 case P_DEFAULT: 240 case P_DEFAULT:
@@ -252,18 +254,20 @@ static void sym_check_prop(struct symbol *sym)
252 } 254 }
253 break; 255 break;
254 case P_SELECT: 256 case P_SELECT:
257 case P_IMPLY:
258 use = prop->type == P_SELECT ? "select" : "imply";
255 sym2 = prop_get_symbol(prop); 259 sym2 = prop_get_symbol(prop);
256 if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) 260 if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE)
257 prop_warn(prop, 261 prop_warn(prop,
258 "config symbol '%s' uses select, but is " 262 "config symbol '%s' uses %s, but is "
259 "not boolean or tristate", sym->name); 263 "not boolean or tristate", sym->name, use);
260 else if (sym2->type != S_UNKNOWN && 264 else if (sym2->type != S_UNKNOWN &&
261 sym2->type != S_BOOLEAN && 265 sym2->type != S_BOOLEAN &&
262 sym2->type != S_TRISTATE) 266 sym2->type != S_TRISTATE)
263 prop_warn(prop, 267 prop_warn(prop,
264 "'%s' has wrong type. 'select' only " 268 "'%s' has wrong type. '%s' only "
265 "accept arguments of boolean and " 269 "accept arguments of boolean and "
266 "tristate type", sym2->name); 270 "tristate type", sym2->name, use);
267 break; 271 break;
268 case P_RANGE: 272 case P_RANGE:
269 if (sym->type != S_INT && sym->type != S_HEX) 273 if (sym->type != S_INT && sym->type != S_HEX)
@@ -333,6 +337,10 @@ void menu_finalize(struct menu *parent)
333 struct symbol *es = prop_get_symbol(prop); 337 struct symbol *es = prop_get_symbol(prop);
334 es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, 338 es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr,
335 expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); 339 expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep)));
340 } else if (prop->type == P_IMPLY) {
341 struct symbol *es = prop_get_symbol(prop);
342 es->implied.expr = expr_alloc_or(es->implied.expr,
343 expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep)));
336 } 344 }
337 } 345 }
338 } 346 }
@@ -612,13 +620,30 @@ static struct property *get_symbol_prop(struct symbol *sym)
612 return prop; 620 return prop;
613} 621}
614 622
623static void get_symbol_props_str(struct gstr *r, struct symbol *sym,
624 enum prop_type tok, const char *prefix)
625{
626 bool hit = false;
627 struct property *prop;
628
629 for_all_properties(sym, prop, tok) {
630 if (!hit) {
631 str_append(r, prefix);
632 hit = true;
633 } else
634 str_printf(r, " && ");
635 expr_gstr_print(prop->expr, r);
636 }
637 if (hit)
638 str_append(r, "\n");
639}
640
615/* 641/*
616 * head is optional and may be NULL 642 * head is optional and may be NULL
617 */ 643 */
618static void get_symbol_str(struct gstr *r, struct symbol *sym, 644static void get_symbol_str(struct gstr *r, struct symbol *sym,
619 struct list_head *head) 645 struct list_head *head)
620{ 646{
621 bool hit;
622 struct property *prop; 647 struct property *prop;
623 648
624 if (sym && sym->name) { 649 if (sym && sym->name) {
@@ -648,22 +673,20 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym,
648 } 673 }
649 } 674 }
650 675
651 hit = false; 676 get_symbol_props_str(r, sym, P_SELECT, _(" Selects: "));
652 for_all_properties(sym, prop, P_SELECT) {
653 if (!hit) {
654 str_append(r, " Selects: ");
655 hit = true;
656 } else
657 str_printf(r, " && ");
658 expr_gstr_print(prop->expr, r);
659 }
660 if (hit)
661 str_append(r, "\n");
662 if (sym->rev_dep.expr) { 677 if (sym->rev_dep.expr) {
663 str_append(r, _(" Selected by: ")); 678 str_append(r, _(" Selected by: "));
664 expr_gstr_print(sym->rev_dep.expr, r); 679 expr_gstr_print(sym->rev_dep.expr, r);
665 str_append(r, "\n"); 680 str_append(r, "\n");
666 } 681 }
682
683 get_symbol_props_str(r, sym, P_IMPLY, _(" Implies: "));
684 if (sym->implied.expr) {
685 str_append(r, _(" Implied by: "));
686 expr_gstr_print(sym->implied.expr, r);
687 str_append(r, "\n");
688 }
689
667 str_append(r, "\n\n"); 690 str_append(r, "\n\n");
668} 691}
669 692
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index d42d534a66cd..a9bc5334a478 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -5,7 +5,9 @@
5 * Derived from menuconfig. 5 * Derived from menuconfig.
6 * 6 *
7 */ 7 */
8#ifndef _GNU_SOURCE
8#define _GNU_SOURCE 9#define _GNU_SOURCE
10#endif
9#include <string.h> 11#include <string.h>
10#include <stdlib.h> 12#include <stdlib.h>
11 13
diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
index 8275f0e55106..4b2f44c20caf 100644
--- a/scripts/kconfig/nconf.gui.c
+++ b/scripts/kconfig/nconf.gui.c
@@ -364,12 +364,14 @@ int dialog_inputbox(WINDOW *main_window,
364 WINDOW *prompt_win; 364 WINDOW *prompt_win;
365 WINDOW *form_win; 365 WINDOW *form_win;
366 PANEL *panel; 366 PANEL *panel;
367 int i, x, y; 367 int i, x, y, lines, columns, win_lines, win_cols;
368 int res = -1; 368 int res = -1;
369 int cursor_position = strlen(init); 369 int cursor_position = strlen(init);
370 int cursor_form_win; 370 int cursor_form_win;
371 char *result = *resultp; 371 char *result = *resultp;
372 372
373 getmaxyx(stdscr, lines, columns);
374
373 if (strlen(init)+1 > *result_len) { 375 if (strlen(init)+1 > *result_len) {
374 *result_len = strlen(init)+1; 376 *result_len = strlen(init)+1;
375 *resultp = result = realloc(result, *result_len); 377 *resultp = result = realloc(result, *result_len);
@@ -386,14 +388,19 @@ int dialog_inputbox(WINDOW *main_window,
386 if (title) 388 if (title)
387 prompt_width = max(prompt_width, strlen(title)); 389 prompt_width = max(prompt_width, strlen(title));
388 390
391 win_lines = min(prompt_lines+6, lines-2);
392 win_cols = min(prompt_width+7, columns-2);
393 prompt_lines = max(win_lines-6, 0);
394 prompt_width = max(win_cols-7, 0);
395
389 /* place dialog in middle of screen */ 396 /* place dialog in middle of screen */
390 y = (getmaxy(stdscr)-(prompt_lines+4))/2; 397 y = (lines-win_lines)/2;
391 x = (getmaxx(stdscr)-(prompt_width+4))/2; 398 x = (columns-win_cols)/2;
392 399
393 strncpy(result, init, *result_len); 400 strncpy(result, init, *result_len);
394 401
395 /* create the windows */ 402 /* create the windows */
396 win = newwin(prompt_lines+6, prompt_width+7, y, x); 403 win = newwin(win_lines, win_cols, y, x);
397 prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2); 404 prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2);
398 form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2); 405 form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2);
399 keypad(form_win, TRUE); 406 keypad(form_win, TRUE);
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index fc5555992220..ae6c72546411 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -65,11 +65,19 @@ ConfigSettings::ConfigSettings()
65QList<int> ConfigSettings::readSizes(const QString& key, bool *ok) 65QList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
66{ 66{
67 QList<int> result; 67 QList<int> result;
68 QStringList entryList = value(key).toStringList();
69 QStringList::Iterator it;
70 68
71 for (it = entryList.begin(); it != entryList.end(); ++it) 69 if (contains(key))
72 result.push_back((*it).toInt()); 70 {
71 QStringList entryList = value(key).toStringList();
72 QStringList::Iterator it;
73
74 for (it = entryList.begin(); it != entryList.end(); ++it)
75 result.push_back((*it).toInt());
76
77 *ok = true;
78 }
79 else
80 *ok = false;
73 81
74 return result; 82 return result;
75} 83}
@@ -1014,7 +1022,7 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
1014 1022
1015 if (!objectName().isEmpty()) { 1023 if (!objectName().isEmpty()) {
1016 configSettings->beginGroup(objectName()); 1024 configSettings->beginGroup(objectName());
1017 _showDebug = configSettings->value("/showDebug", false).toBool(); 1025 setShowDebug(configSettings->value("/showDebug", false).toBool());
1018 configSettings->endGroup(); 1026 configSettings->endGroup();
1019 connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); 1027 connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
1020 } 1028 }
@@ -1474,6 +1482,7 @@ ConfigMainWindow::ConfigMainWindow(void)
1474 optionMenu->addSeparator(); 1482 optionMenu->addSeparator();
1475 optionMenu->addActions(optGroup->actions()); 1483 optionMenu->addActions(optGroup->actions());
1476 optionMenu->addSeparator(); 1484 optionMenu->addSeparator();
1485 optionMenu->addAction(showDebugAction);
1477 1486
1478 // create help menu 1487 // create help menu
1479 menu->addSeparator(); 1488 menu->addSeparator();
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 2432298487fb..20136ffefb23 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -258,6 +258,15 @@ static void sym_calc_visibility(struct symbol *sym)
258 sym->rev_dep.tri = tri; 258 sym->rev_dep.tri = tri;
259 sym_set_changed(sym); 259 sym_set_changed(sym);
260 } 260 }
261 tri = no;
262 if (sym->implied.expr && sym->dir_dep.tri != no)
263 tri = expr_calc_value(sym->implied.expr);
264 if (tri == mod && sym_get_type(sym) == S_BOOLEAN)
265 tri = yes;
266 if (sym->implied.tri != tri) {
267 sym->implied.tri = tri;
268 sym_set_changed(sym);
269 }
261} 270}
262 271
263/* 272/*
@@ -397,6 +406,10 @@ void sym_calc_value(struct symbol *sym)
397 newval.tri = EXPR_AND(expr_calc_value(prop->expr), 406 newval.tri = EXPR_AND(expr_calc_value(prop->expr),
398 prop->visible.tri); 407 prop->visible.tri);
399 } 408 }
409 if (sym->implied.tri != no) {
410 sym->flags |= SYMBOL_WRITE;
411 newval.tri = EXPR_OR(newval.tri, sym->implied.tri);
412 }
400 } 413 }
401 calc_newval: 414 calc_newval:
402 if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) { 415 if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) {
@@ -413,7 +426,8 @@ void sym_calc_value(struct symbol *sym)
413 } 426 }
414 newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); 427 newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
415 } 428 }
416 if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) 429 if (newval.tri == mod &&
430 (sym_get_type(sym) == S_BOOLEAN || sym->implied.tri == yes))
417 newval.tri = yes; 431 newval.tri = yes;
418 break; 432 break;
419 case S_STRING: 433 case S_STRING:
@@ -498,6 +512,8 @@ bool sym_tristate_within_range(struct symbol *sym, tristate val)
498 return false; 512 return false;
499 if (sym->visible <= sym->rev_dep.tri) 513 if (sym->visible <= sym->rev_dep.tri)
500 return false; 514 return false;
515 if (sym->implied.tri == yes && val == mod)
516 return false;
501 if (sym_is_choice_value(sym) && sym->visible == yes) 517 if (sym_is_choice_value(sym) && sym->visible == yes)
502 return val == yes; 518 return val == yes;
503 return val >= sym->rev_dep.tri && val <= sym->visible; 519 return val >= sym->rev_dep.tri && val <= sym->visible;
@@ -750,6 +766,10 @@ const char *sym_get_string_default(struct symbol *sym)
750 if (sym->type == S_BOOLEAN && val == mod) 766 if (sym->type == S_BOOLEAN && val == mod)
751 val = yes; 767 val = yes;
752 768
769 /* adjust the default value if this symbol is implied by another */
770 if (val < sym->implied.tri)
771 val = sym->implied.tri;
772
753 switch (sym->type) { 773 switch (sym->type) {
754 case S_BOOLEAN: 774 case S_BOOLEAN:
755 case S_TRISTATE: 775 case S_TRISTATE:
@@ -1352,6 +1372,8 @@ const char *prop_get_type_name(enum prop_type type)
1352 return "choice"; 1372 return "choice";
1353 case P_SELECT: 1373 case P_SELECT:
1354 return "select"; 1374 return "select";
1375 case P_IMPLY:
1376 return "imply";
1355 case P_RANGE: 1377 case P_RANGE:
1356 return "range"; 1378 return "range";
1357 case P_SYMBOL: 1379 case P_SYMBOL:
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf
index ac498f01b449..ead02edec936 100644
--- a/scripts/kconfig/zconf.gperf
+++ b/scripts/kconfig/zconf.gperf
@@ -38,6 +38,7 @@ int, T_TYPE, TF_COMMAND, S_INT
38hex, T_TYPE, TF_COMMAND, S_HEX 38hex, T_TYPE, TF_COMMAND, S_HEX
39string, T_TYPE, TF_COMMAND, S_STRING 39string, T_TYPE, TF_COMMAND, S_STRING
40select, T_SELECT, TF_COMMAND 40select, T_SELECT, TF_COMMAND
41imply, T_IMPLY, TF_COMMAND
41range, T_RANGE, TF_COMMAND 42range, T_RANGE, TF_COMMAND
42visible, T_VISIBLE, TF_COMMAND 43visible, T_VISIBLE, TF_COMMAND
43option, T_OPTION, TF_COMMAND 44option, T_OPTION, TF_COMMAND
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped
index 360a62df2b5e..d51b15de074a 100644
--- a/scripts/kconfig/zconf.hash.c_shipped
+++ b/scripts/kconfig/zconf.hash.c_shipped
@@ -55,10 +55,10 @@ kconf_id_hash (register const char *str, register unsigned int len)
55 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 55 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
56 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 56 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
57 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 57 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
58 73, 73, 73, 73, 73, 73, 73, 5, 25, 25, 58 73, 73, 73, 73, 73, 73, 73, 10, 25, 25,
59 0, 0, 0, 5, 0, 0, 73, 73, 5, 0, 59 0, 0, 0, 5, 0, 0, 73, 73, 5, 0,
60 10, 5, 45, 73, 20, 20, 0, 15, 15, 73, 60 10, 5, 45, 73, 20, 20, 0, 15, 15, 73,
61 20, 5, 73, 73, 73, 73, 73, 73, 73, 73, 61 20, 0, 73, 73, 73, 73, 73, 73, 73, 73,
62 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 62 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
63 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 63 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
64 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 64 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
@@ -120,6 +120,7 @@ struct kconf_id_strings_t
120 char kconf_id_strings_str43[sizeof("hex")]; 120 char kconf_id_strings_str43[sizeof("hex")];
121 char kconf_id_strings_str46[sizeof("config")]; 121 char kconf_id_strings_str46[sizeof("config")];
122 char kconf_id_strings_str47[sizeof("boolean")]; 122 char kconf_id_strings_str47[sizeof("boolean")];
123 char kconf_id_strings_str50[sizeof("imply")];
123 char kconf_id_strings_str51[sizeof("string")]; 124 char kconf_id_strings_str51[sizeof("string")];
124 char kconf_id_strings_str54[sizeof("help")]; 125 char kconf_id_strings_str54[sizeof("help")];
125 char kconf_id_strings_str56[sizeof("prompt")]; 126 char kconf_id_strings_str56[sizeof("prompt")];
@@ -157,6 +158,7 @@ static const struct kconf_id_strings_t kconf_id_strings_contents =
157 "hex", 158 "hex",
158 "config", 159 "config",
159 "boolean", 160 "boolean",
161 "imply",
160 "string", 162 "string",
161 "help", 163 "help",
162 "prompt", 164 "prompt",
@@ -174,7 +176,7 @@ kconf_id_lookup (register const char *str, register unsigned int len)
174{ 176{
175 enum 177 enum
176 { 178 {
177 TOTAL_KEYWORDS = 34, 179 TOTAL_KEYWORDS = 35,
178 MIN_WORD_LENGTH = 2, 180 MIN_WORD_LENGTH = 2,
179 MAX_WORD_LENGTH = 14, 181 MAX_WORD_LENGTH = 14,
180 MIN_HASH_VALUE = 2, 182 MIN_HASH_VALUE = 2,
@@ -205,15 +207,15 @@ kconf_id_lookup (register const char *str, register unsigned int len)
205 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE}, 207 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
206#line 36 "scripts/kconfig/zconf.gperf" 208#line 36 "scripts/kconfig/zconf.gperf"
207 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, 209 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
208#line 46 "scripts/kconfig/zconf.gperf" 210#line 47 "scripts/kconfig/zconf.gperf"
209 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION}, 211 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
210 {-1}, {-1}, 212 {-1}, {-1},
211#line 44 "scripts/kconfig/zconf.gperf" 213#line 45 "scripts/kconfig/zconf.gperf"
212 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM}, 214 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM},
213#line 29 "scripts/kconfig/zconf.gperf" 215#line 29 "scripts/kconfig/zconf.gperf"
214 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND}, 216 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
215 {-1}, {-1}, 217 {-1}, {-1},
216#line 43 "scripts/kconfig/zconf.gperf" 218#line 44 "scripts/kconfig/zconf.gperf"
217 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND}, 219 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND},
218#line 17 "scripts/kconfig/zconf.gperf" 220#line 17 "scripts/kconfig/zconf.gperf"
219 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND}, 221 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
@@ -223,9 +225,9 @@ kconf_id_lookup (register const char *str, register unsigned int len)
223#line 23 "scripts/kconfig/zconf.gperf" 225#line 23 "scripts/kconfig/zconf.gperf"
224 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND}, 226 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND},
225 {-1}, 227 {-1},
226#line 45 "scripts/kconfig/zconf.gperf" 228#line 46 "scripts/kconfig/zconf.gperf"
227 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, 229 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
228#line 48 "scripts/kconfig/zconf.gperf" 230#line 49 "scripts/kconfig/zconf.gperf"
229 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPT_ALLNOCONFIG_Y,TF_OPTION}, 231 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPT_ALLNOCONFIG_Y,TF_OPTION},
230#line 16 "scripts/kconfig/zconf.gperf" 232#line 16 "scripts/kconfig/zconf.gperf"
231 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, 233 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
@@ -234,10 +236,10 @@ kconf_id_lookup (register const char *str, register unsigned int len)
234 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND}, 236 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND},
235#line 21 "scripts/kconfig/zconf.gperf" 237#line 21 "scripts/kconfig/zconf.gperf"
236 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, 238 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
237#line 47 "scripts/kconfig/zconf.gperf" 239#line 48 "scripts/kconfig/zconf.gperf"
238 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION}, 240 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION},
239 {-1}, 241 {-1},
240#line 41 "scripts/kconfig/zconf.gperf" 242#line 42 "scripts/kconfig/zconf.gperf"
241 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND}, 243 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND},
242#line 19 "scripts/kconfig/zconf.gperf" 244#line 19 "scripts/kconfig/zconf.gperf"
243 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND}, 245 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND},
@@ -247,7 +249,7 @@ kconf_id_lookup (register const char *str, register unsigned int len)
247 {-1}, 249 {-1},
248#line 18 "scripts/kconfig/zconf.gperf" 250#line 18 "scripts/kconfig/zconf.gperf"
249 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND}, 251 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND},
250#line 42 "scripts/kconfig/zconf.gperf" 252#line 43 "scripts/kconfig/zconf.gperf"
251 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND}, 253 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND},
252#line 38 "scripts/kconfig/zconf.gperf" 254#line 38 "scripts/kconfig/zconf.gperf"
253 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX}, 255 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX},
@@ -256,7 +258,9 @@ kconf_id_lookup (register const char *str, register unsigned int len)
256 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND}, 258 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND},
257#line 35 "scripts/kconfig/zconf.gperf" 259#line 35 "scripts/kconfig/zconf.gperf"
258 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN}, 260 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
259 {-1}, {-1}, {-1}, 261 {-1}, {-1},
262#line 41 "scripts/kconfig/zconf.gperf"
263 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str50, T_IMPLY, TF_COMMAND},
260#line 39 "scripts/kconfig/zconf.gperf" 264#line 39 "scripts/kconfig/zconf.gperf"
261 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING}, 265 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING},
262 {-1}, {-1}, 266 {-1}, {-1},
@@ -289,5 +293,5 @@ kconf_id_lookup (register const char *str, register unsigned int len)
289 } 293 }
290 return 0; 294 return 0;
291} 295}
292#line 49 "scripts/kconfig/zconf.gperf" 296#line 50 "scripts/kconfig/zconf.gperf"
293 297
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index 7a4d658c2066..65b7515a577c 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,19 +1,19 @@
1/* A Bison parser, made by GNU Bison 2.5.1. */ 1/* A Bison parser, made by GNU Bison 3.0.4. */
2 2
3/* Bison implementation for Yacc-like parsers in C 3/* Bison implementation for Yacc-like parsers in C
4 4
5 Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. 5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6 6
7 This program is free software: you can redistribute it and/or modify 7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or 9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 19
@@ -26,7 +26,7 @@
26 special exception, which will cause the skeleton and the resulting 26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public 27 Bison output files to be licensed under the GNU General Public
28 License without this special exception. 28 License without this special exception.
29 29
30 This special exception was added by the Free Software Foundation in 30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */ 31 version 2.2 of Bison. */
32 32
@@ -44,7 +44,7 @@
44#define YYBISON 1 44#define YYBISON 1
45 45
46/* Bison version. */ 46/* Bison version. */
47#define YYBISON_VERSION "2.5.1" 47#define YYBISON_VERSION "3.0.4"
48 48
49/* Skeleton name. */ 49/* Skeleton name. */
50#define YYSKELETON_NAME "yacc.c" 50#define YYSKELETON_NAME "yacc.c"
@@ -58,18 +58,16 @@
58/* Pull parsers. */ 58/* Pull parsers. */
59#define YYPULL 1 59#define YYPULL 1
60 60
61/* Using locations. */
62#define YYLSP_NEEDED 0
63 61
64/* Substitute the variable and function names. */ 62/* Substitute the variable and function names. */
65#define yyparse zconfparse 63#define yyparse zconfparse
66#define yylex zconflex 64#define yylex zconflex
67#define yyerror zconferror 65#define yyerror zconferror
68#define yylval zconflval
69#define yychar zconfchar
70#define yydebug zconfdebug 66#define yydebug zconfdebug
71#define yynerrs zconfnerrs 67#define yynerrs zconfnerrs
72 68
69#define yylval zconflval
70#define yychar zconfchar
73 71
74/* Copy the first part of user declarations. */ 72/* Copy the first part of user declarations. */
75 73
@@ -108,19 +106,14 @@ static struct menu *current_menu, *current_entry;
108 106
109 107
110 108
111# ifndef YY_NULL 109# ifndef YY_NULLPTR
112# if defined __cplusplus && 201103L <= __cplusplus 110# if defined __cplusplus && 201103L <= __cplusplus
113# define YY_NULL nullptr 111# define YY_NULLPTR nullptr
114# else 112# else
115# define YY_NULL 0 113# define YY_NULLPTR 0
116# endif 114# endif
117# endif 115# endif
118 116
119/* Enabling traces. */
120#ifndef YYDEBUG
121# define YYDEBUG 1
122#endif
123
124/* Enabling verbose error messages. */ 117/* Enabling verbose error messages. */
125#ifdef YYERROR_VERBOSE 118#ifdef YYERROR_VERBOSE
126# undef YYERROR_VERBOSE 119# undef YYERROR_VERBOSE
@@ -129,62 +122,65 @@ static struct menu *current_menu, *current_entry;
129# define YYERROR_VERBOSE 0 122# define YYERROR_VERBOSE 0
130#endif 123#endif
131 124
132/* Enabling the token table. */
133#ifndef YYTOKEN_TABLE
134# define YYTOKEN_TABLE 0
135#endif
136 125
126/* Debug traces. */
127#ifndef YYDEBUG
128# define YYDEBUG 1
129#endif
130#if YYDEBUG
131extern int zconfdebug;
132#endif
137 133
138/* Tokens. */ 134/* Token type. */
139#ifndef YYTOKENTYPE 135#ifndef YYTOKENTYPE
140# define YYTOKENTYPE 136# define YYTOKENTYPE
141 /* Put the tokens into the symbol table, so that GDB and other debuggers 137 enum yytokentype
142 know about them. */ 138 {
143 enum yytokentype { 139 T_MAINMENU = 258,
144 T_MAINMENU = 258, 140 T_MENU = 259,
145 T_MENU = 259, 141 T_ENDMENU = 260,
146 T_ENDMENU = 260, 142 T_SOURCE = 261,
147 T_SOURCE = 261, 143 T_CHOICE = 262,
148 T_CHOICE = 262, 144 T_ENDCHOICE = 263,
149 T_ENDCHOICE = 263, 145 T_COMMENT = 264,
150 T_COMMENT = 264, 146 T_CONFIG = 265,
151 T_CONFIG = 265, 147 T_MENUCONFIG = 266,
152 T_MENUCONFIG = 266, 148 T_HELP = 267,
153 T_HELP = 267, 149 T_HELPTEXT = 268,
154 T_HELPTEXT = 268, 150 T_IF = 269,
155 T_IF = 269, 151 T_ENDIF = 270,
156 T_ENDIF = 270, 152 T_DEPENDS = 271,
157 T_DEPENDS = 271, 153 T_OPTIONAL = 272,
158 T_OPTIONAL = 272, 154 T_PROMPT = 273,
159 T_PROMPT = 273, 155 T_TYPE = 274,
160 T_TYPE = 274, 156 T_DEFAULT = 275,
161 T_DEFAULT = 275, 157 T_SELECT = 276,
162 T_SELECT = 276, 158 T_IMPLY = 277,
163 T_RANGE = 277, 159 T_RANGE = 278,
164 T_VISIBLE = 278, 160 T_VISIBLE = 279,
165 T_OPTION = 279, 161 T_OPTION = 280,
166 T_ON = 280, 162 T_ON = 281,
167 T_WORD = 281, 163 T_WORD = 282,
168 T_WORD_QUOTE = 282, 164 T_WORD_QUOTE = 283,
169 T_UNEQUAL = 283, 165 T_UNEQUAL = 284,
170 T_LESS = 284, 166 T_LESS = 285,
171 T_LESS_EQUAL = 285, 167 T_LESS_EQUAL = 286,
172 T_GREATER = 286, 168 T_GREATER = 287,
173 T_GREATER_EQUAL = 287, 169 T_GREATER_EQUAL = 288,
174 T_CLOSE_PAREN = 288, 170 T_CLOSE_PAREN = 289,
175 T_OPEN_PAREN = 289, 171 T_OPEN_PAREN = 290,
176 T_EOL = 290, 172 T_EOL = 291,
177 T_OR = 291, 173 T_OR = 292,
178 T_AND = 292, 174 T_AND = 293,
179 T_EQUAL = 293, 175 T_EQUAL = 294,
180 T_NOT = 294 176 T_NOT = 295
181 }; 177 };
182#endif 178#endif
183 179
184 180/* Value type. */
185
186#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 181#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
187typedef union YYSTYPE 182
183union YYSTYPE
188{ 184{
189 185
190 186
@@ -196,14 +192,20 @@ typedef union YYSTYPE
196 const struct kconf_id *id; 192 const struct kconf_id *id;
197 193
198 194
195};
199 196
200} YYSTYPE; 197typedef union YYSTYPE YYSTYPE;
201# define YYSTYPE_IS_TRIVIAL 1 198# define YYSTYPE_IS_TRIVIAL 1
202# define yystype YYSTYPE /* obsolescent; will be withdrawn */
203# define YYSTYPE_IS_DECLARED 1 199# define YYSTYPE_IS_DECLARED 1
204#endif 200#endif
205 201
206 202
203extern YYSTYPE zconflval;
204
205int zconfparse (void);
206
207
208
207/* Copy the second part of user declarations. */ 209/* Copy the second part of user declarations. */
208 210
209 211
@@ -224,11 +226,8 @@ typedef unsigned char yytype_uint8;
224 226
225#ifdef YYTYPE_INT8 227#ifdef YYTYPE_INT8
226typedef YYTYPE_INT8 yytype_int8; 228typedef YYTYPE_INT8 yytype_int8;
227#elif (defined __STDC__ || defined __C99__FUNC__ \
228 || defined __cplusplus || defined _MSC_VER)
229typedef signed char yytype_int8;
230#else 229#else
231typedef short int yytype_int8; 230typedef signed char yytype_int8;
232#endif 231#endif
233 232
234#ifdef YYTYPE_UINT16 233#ifdef YYTYPE_UINT16
@@ -248,8 +247,7 @@ typedef short int yytype_int16;
248# define YYSIZE_T __SIZE_TYPE__ 247# define YYSIZE_T __SIZE_TYPE__
249# elif defined size_t 248# elif defined size_t
250# define YYSIZE_T size_t 249# define YYSIZE_T size_t
251# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 250# elif ! defined YYSIZE_T
252 || defined __cplusplus || defined _MSC_VER)
253# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 251# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
254# define YYSIZE_T size_t 252# define YYSIZE_T size_t
255# else 253# else
@@ -263,38 +261,67 @@ typedef short int yytype_int16;
263# if defined YYENABLE_NLS && YYENABLE_NLS 261# if defined YYENABLE_NLS && YYENABLE_NLS
264# if ENABLE_NLS 262# if ENABLE_NLS
265# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 263# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
266# define YY_(msgid) dgettext ("bison-runtime", msgid) 264# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
267# endif 265# endif
268# endif 266# endif
269# ifndef YY_ 267# ifndef YY_
270# define YY_(msgid) msgid 268# define YY_(Msgid) Msgid
269# endif
270#endif
271
272#ifndef YY_ATTRIBUTE
273# if (defined __GNUC__ \
274 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
275 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
276# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
277# else
278# define YY_ATTRIBUTE(Spec) /* empty */
279# endif
280#endif
281
282#ifndef YY_ATTRIBUTE_PURE
283# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
284#endif
285
286#ifndef YY_ATTRIBUTE_UNUSED
287# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
288#endif
289
290#if !defined _Noreturn \
291 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
292# if defined _MSC_VER && 1200 <= _MSC_VER
293# define _Noreturn __declspec (noreturn)
294# else
295# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
271# endif 296# endif
272#endif 297#endif
273 298
274/* Suppress unused-variable warnings by "using" E. */ 299/* Suppress unused-variable warnings by "using" E. */
275#if ! defined lint || defined __GNUC__ 300#if ! defined lint || defined __GNUC__
276# define YYUSE(e) ((void) (e)) 301# define YYUSE(E) ((void) (E))
277#else 302#else
278# define YYUSE(e) /* empty */ 303# define YYUSE(E) /* empty */
279#endif 304#endif
280 305
281/* Identity function, used to suppress warnings about constant conditions. */ 306#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
282#ifndef lint 307/* Suppress an incorrect diagnostic about yylval being uninitialized. */
283# define YYID(n) (n) 308# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
284#else 309 _Pragma ("GCC diagnostic push") \
285#if (defined __STDC__ || defined __C99__FUNC__ \ 310 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
286 || defined __cplusplus || defined _MSC_VER) 311 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
287static int 312# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
288YYID (int yyi) 313 _Pragma ("GCC diagnostic pop")
289#else 314#else
290static int 315# define YY_INITIAL_VALUE(Value) Value
291YYID (yyi)
292 int yyi;
293#endif 316#endif
294{ 317#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
295 return yyi; 318# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
296} 319# define YY_IGNORE_MAYBE_UNINITIALIZED_END
297#endif 320#endif
321#ifndef YY_INITIAL_VALUE
322# define YY_INITIAL_VALUE(Value) /* Nothing. */
323#endif
324
298 325
299#if ! defined yyoverflow || YYERROR_VERBOSE 326#if ! defined yyoverflow || YYERROR_VERBOSE
300 327
@@ -313,8 +340,7 @@ YYID (yyi)
313# define alloca _alloca 340# define alloca _alloca
314# else 341# else
315# define YYSTACK_ALLOC alloca 342# define YYSTACK_ALLOC alloca
316# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 343# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
317 || defined __cplusplus || defined _MSC_VER)
318# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 344# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
319 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 345 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
320# ifndef EXIT_SUCCESS 346# ifndef EXIT_SUCCESS
@@ -326,8 +352,8 @@ YYID (yyi)
326# endif 352# endif
327 353
328# ifdef YYSTACK_ALLOC 354# ifdef YYSTACK_ALLOC
329 /* Pacify GCC's `empty if-body' warning. */ 355 /* Pacify GCC's 'empty if-body' warning. */
330# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 356# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
331# ifndef YYSTACK_ALLOC_MAXIMUM 357# ifndef YYSTACK_ALLOC_MAXIMUM
332 /* The OS might guarantee only one guard page at the bottom of the stack, 358 /* The OS might guarantee only one guard page at the bottom of the stack,
333 and a page size can be as small as 4096 bytes. So we cannot safely 359 and a page size can be as small as 4096 bytes. So we cannot safely
@@ -343,7 +369,7 @@ YYID (yyi)
343# endif 369# endif
344# if (defined __cplusplus && ! defined EXIT_SUCCESS \ 370# if (defined __cplusplus && ! defined EXIT_SUCCESS \
345 && ! ((defined YYMALLOC || defined malloc) \ 371 && ! ((defined YYMALLOC || defined malloc) \
346 && (defined YYFREE || defined free))) 372 && (defined YYFREE || defined free)))
347# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 373# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
348# ifndef EXIT_SUCCESS 374# ifndef EXIT_SUCCESS
349# define EXIT_SUCCESS 0 375# define EXIT_SUCCESS 0
@@ -351,15 +377,13 @@ YYID (yyi)
351# endif 377# endif
352# ifndef YYMALLOC 378# ifndef YYMALLOC
353# define YYMALLOC malloc 379# define YYMALLOC malloc
354# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 380# if ! defined malloc && ! defined EXIT_SUCCESS
355 || defined __cplusplus || defined _MSC_VER)
356void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 381void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
357# endif 382# endif
358# endif 383# endif
359# ifndef YYFREE 384# ifndef YYFREE
360# define YYFREE free 385# define YYFREE free
361# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 386# if ! defined free && ! defined EXIT_SUCCESS
362 || defined __cplusplus || defined _MSC_VER)
363void free (void *); /* INFRINGES ON USER NAME SPACE */ 387void free (void *); /* INFRINGES ON USER NAME SPACE */
364# endif 388# endif
365# endif 389# endif
@@ -369,7 +393,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
369 393
370#if (! defined yyoverflow \ 394#if (! defined yyoverflow \
371 && (! defined __cplusplus \ 395 && (! defined __cplusplus \
372 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 396 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
373 397
374/* A type that is properly aligned for any stack member. */ 398/* A type that is properly aligned for any stack member. */
375union yyalloc 399union yyalloc
@@ -394,16 +418,16 @@ union yyalloc
394 elements in the stack, and YYPTR gives the new location of the 418 elements in the stack, and YYPTR gives the new location of the
395 stack. Advance YYPTR to a properly aligned location for the next 419 stack. Advance YYPTR to a properly aligned location for the next
396 stack. */ 420 stack. */
397# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 421# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
398 do \ 422 do \
399 { \ 423 { \
400 YYSIZE_T yynewbytes; \ 424 YYSIZE_T yynewbytes; \
401 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 425 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
402 Stack = &yyptr->Stack_alloc; \ 426 Stack = &yyptr->Stack_alloc; \
403 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 427 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
404 yyptr += yynewbytes / sizeof (*yyptr); \ 428 yyptr += yynewbytes / sizeof (*yyptr); \
405 } \ 429 } \
406 while (YYID (0)) 430 while (0)
407 431
408#endif 432#endif
409 433
@@ -422,7 +446,7 @@ union yyalloc
422 for (yyi = 0; yyi < (Count); yyi++) \ 446 for (yyi = 0; yyi < (Count); yyi++) \
423 (Dst)[yyi] = (Src)[yyi]; \ 447 (Dst)[yyi] = (Src)[yyi]; \
424 } \ 448 } \
425 while (YYID (0)) 449 while (0)
426# endif 450# endif
427# endif 451# endif
428#endif /* !YYCOPY_NEEDED */ 452#endif /* !YYCOPY_NEEDED */
@@ -430,25 +454,27 @@ union yyalloc
430/* YYFINAL -- State number of the termination state. */ 454/* YYFINAL -- State number of the termination state. */
431#define YYFINAL 11 455#define YYFINAL 11
432/* YYLAST -- Last index in YYTABLE. */ 456/* YYLAST -- Last index in YYTABLE. */
433#define YYLAST 298 457#define YYLAST 301
434 458
435/* YYNTOKENS -- Number of terminals. */ 459/* YYNTOKENS -- Number of terminals. */
436#define YYNTOKENS 40 460#define YYNTOKENS 41
437/* YYNNTS -- Number of nonterminals. */ 461/* YYNNTS -- Number of nonterminals. */
438#define YYNNTS 50 462#define YYNNTS 50
439/* YYNRULES -- Number of rules. */ 463/* YYNRULES -- Number of rules. */
440#define YYNRULES 122 464#define YYNRULES 124
441/* YYNRULES -- Number of states. */ 465/* YYNSTATES -- Number of states. */
442#define YYNSTATES 199 466#define YYNSTATES 204
443 467
444/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 468/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
469 by yylex, with out-of-bounds checking. */
445#define YYUNDEFTOK 2 470#define YYUNDEFTOK 2
446#define YYMAXUTOK 294 471#define YYMAXUTOK 295
447 472
448#define YYTRANSLATE(YYX) \ 473#define YYTRANSLATE(YYX) \
449 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 474 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
450 475
451/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 476/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
477 as returned by yylex, without out-of-bounds checking. */
452static const yytype_uint8 yytranslate[] = 478static const yytype_uint8 yytranslate[] =
453{ 479{
454 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 480 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -480,90 +506,30 @@ static const yytype_uint8 yytranslate[] =
480 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 506 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
481 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 507 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
482 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 508 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
483 35, 36, 37, 38, 39 509 35, 36, 37, 38, 39, 40
484}; 510};
485 511
486#if YYDEBUG 512#if YYDEBUG
487/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 513 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
488 YYRHS. */
489static const yytype_uint16 yyprhs[] =
490{
491 0, 0, 3, 6, 8, 11, 13, 14, 17, 20,
492 23, 26, 31, 36, 40, 42, 44, 46, 48, 50,
493 52, 54, 56, 58, 60, 62, 64, 66, 68, 72,
494 75, 79, 82, 86, 89, 90, 93, 96, 99, 102,
495 105, 108, 112, 117, 122, 127, 133, 137, 138, 142,
496 143, 146, 150, 153, 155, 159, 160, 163, 166, 169,
497 172, 175, 180, 184, 187, 192, 193, 196, 200, 202,
498 206, 207, 210, 213, 216, 220, 224, 228, 230, 234,
499 235, 238, 241, 244, 248, 252, 255, 258, 261, 262,
500 265, 268, 271, 276, 277, 280, 283, 286, 287, 290,
501 292, 294, 297, 300, 303, 305, 308, 309, 312, 314,
502 318, 322, 326, 330, 334, 338, 342, 345, 349, 353,
503 355, 357, 358
504};
505
506/* YYRHS -- A `-1'-separated list of the rules' RHS. */
507static const yytype_int8 yyrhs[] =
508{
509 41, 0, -1, 85, 42, -1, 42, -1, 67, 43,
510 -1, 43, -1, -1, 43, 45, -1, 43, 59, -1,
511 43, 71, -1, 43, 84, -1, 43, 26, 1, 35,
512 -1, 43, 44, 1, 35, -1, 43, 1, 35, -1,
513 16, -1, 18, -1, 19, -1, 21, -1, 17, -1,
514 22, -1, 20, -1, 23, -1, 35, -1, 65, -1,
515 75, -1, 48, -1, 50, -1, 73, -1, 26, 1,
516 35, -1, 1, 35, -1, 10, 26, 35, -1, 47,
517 51, -1, 11, 26, 35, -1, 49, 51, -1, -1,
518 51, 52, -1, 51, 53, -1, 51, 79, -1, 51,
519 77, -1, 51, 46, -1, 51, 35, -1, 19, 82,
520 35, -1, 18, 83, 86, 35, -1, 20, 87, 86,
521 35, -1, 21, 26, 86, 35, -1, 22, 88, 88,
522 86, 35, -1, 24, 54, 35, -1, -1, 54, 26,
523 55, -1, -1, 38, 83, -1, 7, 89, 35, -1,
524 56, 60, -1, 84, -1, 57, 62, 58, -1, -1,
525 60, 61, -1, 60, 79, -1, 60, 77, -1, 60,
526 35, -1, 60, 46, -1, 18, 83, 86, 35, -1,
527 19, 82, 35, -1, 17, 35, -1, 20, 26, 86,
528 35, -1, -1, 62, 45, -1, 14, 87, 85, -1,
529 84, -1, 63, 66, 64, -1, -1, 66, 45, -1,
530 66, 71, -1, 66, 59, -1, 3, 83, 85, -1,
531 4, 83, 35, -1, 68, 80, 78, -1, 84, -1,
532 69, 72, 70, -1, -1, 72, 45, -1, 72, 71,
533 -1, 72, 59, -1, 6, 83, 35, -1, 9, 83,
534 35, -1, 74, 78, -1, 12, 35, -1, 76, 13,
535 -1, -1, 78, 79, -1, 78, 35, -1, 78, 46,
536 -1, 16, 25, 87, 35, -1, -1, 80, 81, -1,
537 80, 35, -1, 23, 86, -1, -1, 83, 86, -1,
538 26, -1, 27, -1, 5, 35, -1, 8, 35, -1,
539 15, 35, -1, 35, -1, 85, 35, -1, -1, 14,
540 87, -1, 88, -1, 88, 29, 88, -1, 88, 30,
541 88, -1, 88, 31, 88, -1, 88, 32, 88, -1,
542 88, 38, 88, -1, 88, 28, 88, -1, 34, 87,
543 33, -1, 39, 87, -1, 87, 36, 87, -1, 87,
544 37, 87, -1, 26, -1, 27, -1, -1, 26, -1
545};
546
547/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
548static const yytype_uint16 yyrline[] = 514static const yytype_uint16 yyrline[] =
549{ 515{
550 0, 108, 108, 108, 110, 110, 112, 114, 115, 116, 516 0, 109, 109, 109, 111, 111, 113, 115, 116, 117,
551 117, 118, 119, 123, 127, 127, 127, 127, 127, 127, 517 118, 119, 120, 124, 128, 128, 128, 128, 128, 128,
552 127, 127, 131, 132, 133, 134, 135, 136, 140, 141, 518 128, 128, 128, 132, 133, 134, 135, 136, 137, 141,
553 147, 155, 161, 169, 179, 181, 182, 183, 184, 185, 519 142, 148, 156, 162, 170, 180, 182, 183, 184, 185,
554 186, 189, 197, 203, 213, 219, 225, 228, 230, 241, 520 186, 187, 190, 198, 204, 214, 220, 226, 232, 235,
555 242, 247, 256, 261, 269, 272, 274, 275, 276, 277, 521 237, 248, 249, 254, 263, 268, 276, 279, 281, 282,
556 278, 281, 287, 298, 304, 314, 316, 321, 329, 337, 522 283, 284, 285, 288, 294, 305, 311, 321, 323, 328,
557 340, 342, 343, 344, 349, 356, 363, 368, 376, 379, 523 336, 344, 347, 349, 350, 351, 356, 363, 370, 375,
558 381, 382, 383, 386, 394, 401, 408, 414, 421, 423, 524 383, 386, 388, 389, 390, 393, 401, 408, 415, 421,
559 424, 425, 428, 436, 438, 439, 442, 449, 451, 456, 525 428, 430, 431, 432, 435, 443, 445, 446, 449, 456,
560 457, 460, 461, 462, 466, 467, 470, 471, 474, 475, 526 458, 463, 464, 467, 468, 469, 473, 474, 477, 478,
561 476, 477, 478, 479, 480, 481, 482, 483, 484, 487, 527 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
562 488, 491, 492 528 491, 494, 495, 498, 499
563}; 529};
564#endif 530#endif
565 531
566#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 532#if YYDEBUG || YYERROR_VERBOSE || 0
567/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 533/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
568 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 534 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
569static const char *const yytname[] = 535static const char *const yytname[] =
@@ -571,9 +537,9 @@ static const char *const yytname[] =
571 "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", 537 "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU",
572 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 538 "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
573 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", 539 "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
574 "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE", 540 "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_IMPLY",
575 "T_VISIBLE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", 541 "T_RANGE", "T_VISIBLE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE",
576 "T_LESS", "T_LESS_EQUAL", "T_GREATER", "T_GREATER_EQUAL", 542 "T_UNEQUAL", "T_LESS", "T_LESS_EQUAL", "T_GREATER", "T_GREATER_EQUAL",
577 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", 543 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL",
578 "T_NOT", "$accept", "input", "start", "stmt_list", "option_name", 544 "T_NOT", "$accept", "input", "start", "stmt_list", "option_name",
579 "common_stmt", "option_error", "config_entry_start", "config_stmt", 545 "common_stmt", "option_error", "config_entry_start", "config_stmt",
@@ -585,260 +551,254 @@ static const char *const yytname[] =
585 "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt", 551 "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt",
586 "comment", "comment_stmt", "help_start", "help", "depends_list", 552 "comment", "comment_stmt", "help_start", "help", "depends_list",
587 "depends", "visibility_list", "visible", "prompt_stmt_opt", "prompt", 553 "depends", "visibility_list", "visible", "prompt_stmt_opt", "prompt",
588 "end", "nl", "if_expr", "expr", "symbol", "word_opt", YY_NULL 554 "end", "nl", "if_expr", "expr", "symbol", "word_opt", YY_NULLPTR
589}; 555};
590#endif 556#endif
591 557
592# ifdef YYPRINT 558# ifdef YYPRINT
593/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 559/* YYTOKNUM[NUM] -- (External) token number corresponding to the
594 token YYLEX-NUM. */ 560 (internal) symbol number NUM (which must be that of a token). */
595static const yytype_uint16 yytoknum[] = 561static const yytype_uint16 yytoknum[] =
596{ 562{
597 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 563 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
598 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 564 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
599 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 565 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
600 285, 286, 287, 288, 289, 290, 291, 292, 293, 294 566 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
567 295
601}; 568};
602# endif 569# endif
603 570
604/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 571#define YYPACT_NINF -92
605static const yytype_uint8 yyr1[] = 572
573#define yypact_value_is_default(Yystate) \
574 (!!((Yystate) == (-92)))
575
576#define YYTABLE_NINF -88
577
578#define yytable_value_is_error(Yytable_value) \
579 0
580
581 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
582 STATE-NUM. */
583static const yytype_int16 yypact[] =
606{ 584{
607 0, 40, 41, 41, 42, 42, 43, 43, 43, 43, 585 17, 41, -92, 15, -92, 150, -92, 19, -92, -92,
608 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 586 -13, -92, 28, 41, 38, 41, 50, 47, 41, 79,
609 44, 44, 45, 45, 45, 45, 45, 45, 46, 46, 587 82, 44, 76, -92, -92, -92, -92, -92, -92, -92,
610 47, 48, 49, 50, 51, 51, 51, 51, 51, 51, 588 -92, -92, 118, -92, 129, -92, -92, -92, -92, -92,
611 51, 52, 52, 52, 52, 52, 53, 54, 54, 55, 589 -92, -92, -92, -92, -92, -92, -92, -92, -92, -92,
612 55, 56, 57, 58, 59, 60, 60, 60, 60, 60, 590 -92, -92, 184, -92, -92, 107, -92, 111, -92, 113,
613 60, 61, 61, 61, 61, 62, 62, 63, 64, 65, 591 -92, 116, -92, 139, 140, 151, -92, -92, 44, 44,
614 66, 66, 66, 66, 67, 68, 69, 70, 71, 72, 592 142, 256, -92, 160, 173, 27, 117, 80, 51, 255,
615 72, 72, 72, 73, 74, 75, 76, 77, 78, 78, 593 -15, 255, 217, -92, -92, -92, -92, -92, -92, -8,
616 78, 78, 79, 80, 80, 80, 81, 82, 82, 83, 594 -92, 44, 44, 107, 87, 87, 87, 87, 87, 87,
617 83, 84, 84, 84, 85, 85, 86, 86, 87, 87, 595 -92, -92, 174, 176, 187, 41, 41, 44, 188, 189,
618 87, 87, 87, 87, 87, 87, 87, 87, 87, 88, 596 87, -92, 213, -92, -92, -92, -92, 206, -92, -92,
619 88, 89, 89 597 193, 41, 41, 203, -92, -92, -92, -92, -92, -92,
598 -92, -92, -92, -92, -92, -92, -92, 229, -92, 241,
599 -92, -92, -92, -92, -92, -92, -92, -92, -92, -92,
600 216, -92, -92, -92, -92, -92, -92, -92, -92, -92,
601 44, 229, 222, 229, 64, 229, 229, 87, 31, 231,
602 -92, -92, 229, 236, 229, 44, -92, 145, 242, -92,
603 -92, 243, 244, 245, 229, 251, -92, -92, 247, -92,
604 257, 125, -92, -92, -92, -92, -92, 260, 41, -92,
605 -92, -92, -92, -92
620}; 606};
621 607
622/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 608 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
623static const yytype_uint8 yyr2[] = 609 Performed when YYTABLE does not specify something else to do. Zero
610 means the default is an error. */
611static const yytype_uint8 yydefact[] =
624{ 612{
625 0, 2, 2, 1, 2, 1, 0, 2, 2, 2, 613 6, 0, 106, 0, 3, 0, 6, 6, 101, 102,
626 2, 4, 4, 3, 1, 1, 1, 1, 1, 1, 614 0, 1, 0, 0, 0, 0, 123, 0, 0, 0,
627 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 615 0, 0, 0, 14, 19, 15, 16, 21, 17, 18,
628 3, 2, 3, 2, 0, 2, 2, 2, 2, 2, 616 20, 22, 0, 23, 0, 7, 35, 26, 35, 27,
629 2, 3, 4, 4, 4, 5, 3, 0, 3, 0, 617 57, 67, 8, 72, 24, 95, 81, 9, 28, 90,
630 2, 3, 2, 1, 3, 0, 2, 2, 2, 2, 618 25, 10, 0, 107, 2, 76, 13, 0, 103, 0,
631 2, 4, 3, 2, 4, 0, 2, 3, 1, 3, 619 124, 0, 104, 0, 0, 0, 121, 122, 0, 0,
632 0, 2, 2, 2, 3, 3, 3, 1, 3, 0, 620 0, 110, 105, 0, 0, 0, 0, 0, 0, 0,
633 2, 2, 2, 3, 3, 2, 2, 2, 0, 2, 621 90, 0, 0, 77, 85, 53, 86, 31, 33, 0,
634 2, 2, 4, 0, 2, 2, 2, 0, 2, 1, 622 118, 0, 0, 69, 0, 0, 0, 0, 0, 0,
635 1, 2, 2, 2, 1, 2, 0, 2, 1, 3, 623 11, 12, 0, 0, 0, 0, 99, 0, 0, 0,
636 3, 3, 3, 3, 3, 3, 2, 3, 3, 1, 624 0, 49, 0, 41, 40, 36, 37, 0, 39, 38,
637 1, 0, 1 625 0, 0, 99, 0, 61, 62, 58, 60, 59, 68,
626 56, 55, 73, 75, 71, 74, 70, 108, 97, 0,
627 96, 82, 84, 80, 83, 79, 92, 93, 91, 117,
628 119, 120, 116, 111, 112, 113, 114, 115, 30, 88,
629 0, 108, 0, 108, 108, 108, 108, 0, 0, 0,
630 89, 65, 108, 0, 108, 0, 98, 0, 0, 42,
631 100, 0, 0, 0, 108, 51, 48, 29, 0, 64,
632 0, 109, 94, 43, 44, 45, 46, 0, 0, 50,
633 63, 66, 47, 52
638}; 634};
639 635
640/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 636 /* YYPGOTO[NTERM-NUM]. */
641 Performed when YYTABLE doesn't specify something else to do. Zero 637static const yytype_int16 yypgoto[] =
642 means the default is an error. */
643static const yytype_uint8 yydefact[] =
644{ 638{
645 6, 0, 104, 0, 3, 0, 6, 6, 99, 100, 639 -92, -92, 285, 291, -92, 32, -66, -92, -92, -92,
646 0, 1, 0, 0, 0, 0, 121, 0, 0, 0, 640 -92, 261, -92, -92, -92, -92, -92, -92, -92, 1,
647 0, 0, 0, 14, 18, 15, 16, 20, 17, 19, 641 -92, -92, -92, -92, -92, -92, -92, -92, -92, -92,
648 21, 0, 22, 0, 7, 34, 25, 34, 26, 55, 642 -92, 24, -92, -92, -92, -92, -92, 221, 220, -64,
649 65, 8, 70, 23, 93, 79, 9, 27, 88, 24, 643 -92, -92, 179, -1, 67, 0, 110, -67, -91, -92
650 10, 0, 105, 2, 74, 13, 0, 101, 0, 122,
651 0, 102, 0, 0, 0, 119, 120, 0, 0, 0,
652 108, 103, 0, 0, 0, 0, 0, 0, 0, 88,
653 0, 0, 75, 83, 51, 84, 30, 32, 0, 116,
654 0, 0, 67, 0, 0, 0, 0, 0, 0, 11,
655 12, 0, 0, 0, 0, 97, 0, 0, 0, 47,
656 0, 40, 39, 35, 36, 0, 38, 37, 0, 0,
657 97, 0, 59, 60, 56, 58, 57, 66, 54, 53,
658 71, 73, 69, 72, 68, 106, 95, 0, 94, 80,
659 82, 78, 81, 77, 90, 91, 89, 115, 117, 118,
660 114, 109, 110, 111, 112, 113, 29, 86, 0, 106,
661 0, 106, 106, 106, 0, 0, 0, 87, 63, 106,
662 0, 106, 0, 96, 0, 0, 41, 98, 0, 0,
663 106, 49, 46, 28, 0, 62, 0, 107, 92, 42,
664 43, 44, 0, 0, 48, 61, 64, 45, 50
665}; 644};
666 645
667/* YYDEFGOTO[NTERM-NUM]. */ 646 /* YYDEFGOTO[NTERM-NUM]. */
668static const yytype_int16 yydefgoto[] = 647static const yytype_int16 yydefgoto[] =
669{ 648{
670 -1, 3, 4, 5, 33, 34, 112, 35, 36, 37, 649 -1, 3, 4, 5, 34, 35, 114, 36, 37, 38,
671 38, 74, 113, 114, 165, 194, 39, 40, 128, 41, 650 39, 75, 115, 116, 168, 199, 40, 41, 130, 42,
672 76, 124, 77, 42, 132, 43, 78, 6, 44, 45, 651 77, 126, 78, 43, 134, 44, 79, 6, 45, 46,
673 141, 46, 80, 47, 48, 49, 115, 116, 81, 117, 652 143, 47, 81, 48, 49, 50, 117, 118, 82, 119,
674 79, 138, 160, 161, 50, 7, 173, 69, 70, 60 653 80, 140, 162, 163, 51, 7, 176, 70, 71, 61
675}; 654};
676 655
677/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 656 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
678 STATE-NUM. */ 657 positive, shift that token. If negative, reduce the rule whose
679#define YYPACT_NINF -91 658 number is the opposite. If YYTABLE_NINF, syntax error. */
680static const yytype_int16 yypact[] = 659static const yytype_int16 yytable[] =
681{ 660{
682 19, 37, -91, 13, -91, 79, -91, 20, -91, -91, 661 10, 89, 90, 152, 153, 154, 155, 156, 157, 137,
683 -16, -91, 21, 37, 25, 37, 41, 36, 37, 78, 662 55, 125, 57, 128, 59, 11, 147, 63, 148, 167,
684 83, 31, 56, -91, -91, -91, -91, -91, -91, -91, 663 1, 138, 1, 2, 150, 151, 149, -32, 102, 91,
685 -91, 116, -91, 127, -91, -91, -91, -91, -91, -91, 664 92, -32, -32, -32, -32, -32, -32, -32, -32, 103,
686 -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, 665 164, -32, -32, 104, -32, 105, 106, 107, 108, 109,
687 -91, 147, -91, -91, 105, -91, 109, -91, 111, -91, 666 110, -32, 111, 2, 112, 53, 14, 15, 185, 17,
688 114, -91, 136, 137, 142, -91, -91, 31, 31, 76, 667 18, 19, 20, 113, 56, 21, 22, 186, 8, 9,
689 254, -91, 143, 146, 27, 115, 207, 258, 243, -14, 668 93, 66, 67, 147, 58, 148, 184, 60, 175, 68,
690 243, 179, -91, -91, -91, -91, -91, -91, -7, -91, 669 133, 102, 142, 62, 69, -54, -54, 33, -54, -54,
691 31, 31, 105, 51, 51, 51, 51, 51, 51, -91, 670 -54, -54, 103, 177, -54, -54, 104, 120, 121, 122,
692 -91, 156, 168, 181, 37, 37, 31, 178, 51, -91, 671 123, 91, 92, 135, 161, 144, 64, 112, 191, 65,
693 206, -91, -91, -91, -91, 196, -91, -91, 175, 37, 672 129, 132, 72, 141, 66, 67, 124, -34, 102, 73,
694 37, 185, -91, -91, -91, -91, -91, -91, -91, -91, 673 172, -34, -34, -34, -34, -34, -34, -34, -34, 103,
695 -91, -91, -91, -91, -91, 214, -91, 230, -91, -91, 674 74, -34, -34, 104, -34, 105, 106, 107, 108, 109,
696 -91, -91, -91, -91, -91, -91, -91, -91, 183, -91, 675 110, -34, 111, 53, 112, 131, 136, 83, 145, 84,
697 -91, -91, -91, -91, -91, -91, -91, -91, 31, 214, 676 -5, 12, 85, 113, 13, 14, 15, 16, 17, 18,
698 194, 214, 45, 214, 51, 26, 195, -91, -91, 214, 677 19, 20, 91, 92, 21, 22, 23, 24, 25, 26,
699 197, 214, 31, -91, 139, 208, -91, -91, 220, 224, 678 27, 28, 29, 30, 31, 86, 87, 32, 2, 91,
700 214, 222, -91, -91, 226, -91, 227, 123, -91, -91, 679 92, 192, 91, 92, -4, 12, 33, 88, 13, 14,
701 -91, -91, 235, 37, -91, -91, -91, -91, -91 680 15, 16, 17, 18, 19, 20, 100, 203, 21, 22,
681 23, 24, 25, 26, 27, 28, 29, 30, 31, 101,
682 158, 32, 159, 160, 169, 165, 166, -87, 102, 170,
683 33, -87, -87, -87, -87, -87, -87, -87, -87, 171,
684 174, -87, -87, 104, -87, -87, -87, -87, -87, -87,
685 -87, -87, 102, 175, 112, -78, -78, -78, -78, -78,
686 -78, -78, -78, 146, 92, -78, -78, 104, 179, 13,
687 14, 15, 16, 17, 18, 19, 20, 187, 112, 21,
688 22, 178, 189, 180, 181, 182, 183, 146, 193, 194,
689 195, 196, 188, 200, 190, 94, 95, 96, 97, 98,
690 198, 33, 54, 201, 197, 99, 202, 52, 127, 76,
691 139, 173
702}; 692};
703 693
704/* YYPGOTO[NTERM-NUM]. */ 694static const yytype_uint8 yycheck[] =
705static const yytype_int16 yypgoto[] =
706{ 695{
707 -91, -91, 264, 268, -91, 30, -65, -91, -91, -91, 696 1, 68, 69, 94, 95, 96, 97, 98, 99, 24,
708 -91, 238, -91, -91, -91, -91, -91, -91, -91, -12, 697 10, 77, 13, 77, 15, 0, 82, 18, 82, 110,
709 -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, 698 3, 36, 3, 36, 91, 92, 34, 0, 1, 37,
710 -91, -5, -91, -91, -91, -91, -91, 200, 209, -61, 699 38, 4, 5, 6, 7, 8, 9, 10, 11, 12,
711 -91, -91, 170, -1, 65, 0, 118, -66, -90, -91 700 107, 14, 15, 16, 17, 18, 19, 20, 21, 22,
701 23, 24, 25, 36, 27, 36, 5, 6, 27, 8,
702 9, 10, 11, 36, 36, 14, 15, 36, 27, 28,
703 70, 27, 28, 139, 36, 139, 167, 27, 14, 35,
704 79, 1, 81, 36, 40, 5, 6, 36, 8, 9,
705 10, 11, 12, 160, 14, 15, 16, 17, 18, 19,
706 20, 37, 38, 79, 105, 81, 27, 27, 175, 27,
707 78, 79, 36, 81, 27, 28, 36, 0, 1, 1,
708 121, 4, 5, 6, 7, 8, 9, 10, 11, 12,
709 1, 14, 15, 16, 17, 18, 19, 20, 21, 22,
710 23, 24, 25, 36, 27, 78, 79, 36, 81, 36,
711 0, 1, 36, 36, 4, 5, 6, 7, 8, 9,
712 10, 11, 37, 38, 14, 15, 16, 17, 18, 19,
713 20, 21, 22, 23, 24, 36, 36, 27, 36, 37,
714 38, 36, 37, 38, 0, 1, 36, 36, 4, 5,
715 6, 7, 8, 9, 10, 11, 36, 198, 14, 15,
716 16, 17, 18, 19, 20, 21, 22, 23, 24, 36,
717 36, 27, 36, 26, 1, 27, 27, 0, 1, 13,
718 36, 4, 5, 6, 7, 8, 9, 10, 11, 36,
719 27, 14, 15, 16, 17, 18, 19, 20, 21, 22,
720 23, 24, 1, 14, 27, 4, 5, 6, 7, 8,
721 9, 10, 11, 36, 38, 14, 15, 16, 36, 4,
722 5, 6, 7, 8, 9, 10, 11, 36, 27, 14,
723 15, 161, 36, 163, 164, 165, 166, 36, 36, 36,
724 36, 36, 172, 36, 174, 29, 30, 31, 32, 33,
725 39, 36, 7, 36, 184, 39, 36, 6, 77, 38,
726 80, 122
712}; 727};
713 728
714/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 729 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
715 positive, shift that token. If negative, reduce the rule which 730 symbol of state STATE-NUM. */
716 number is the opposite. If YYTABLE_NINF, syntax error. */ 731static const yytype_uint8 yystos[] =
717#define YYTABLE_NINF -86
718static const yytype_int16 yytable[] =
719{ 732{
720 10, 88, 89, 150, 151, 152, 153, 154, 155, 135, 733 0, 3, 36, 42, 43, 44, 68, 86, 27, 28,
721 54, 123, 56, 11, 58, 126, 145, 62, 164, 2, 734 84, 0, 1, 4, 5, 6, 7, 8, 9, 10,
722 146, 136, 1, 1, 148, 149, 147, -31, 101, 90, 735 11, 14, 15, 16, 17, 18, 19, 20, 21, 22,
723 91, -31, -31, -31, -31, -31, -31, -31, -31, 102, 736 23, 24, 27, 36, 45, 46, 48, 49, 50, 51,
724 162, -31, -31, 103, -31, 104, 105, 106, 107, 108, 737 57, 58, 60, 64, 66, 69, 70, 72, 74, 75,
725 -31, 109, 181, 110, 2, 52, 55, 65, 66, 172, 738 76, 85, 44, 36, 43, 86, 36, 84, 36, 84,
726 57, 182, 111, 8, 9, 67, 131, 59, 140, 92, 739 27, 90, 36, 84, 27, 27, 27, 28, 35, 40,
727 68, 61, 145, 133, 180, 142, 146, 65, 66, -5, 740 88, 89, 36, 1, 1, 52, 52, 61, 63, 67,
728 12, 90, 91, 13, 14, 15, 16, 17, 18, 19, 741 81, 73, 79, 36, 36, 36, 36, 36, 36, 88,
729 20, 71, 174, 21, 22, 23, 24, 25, 26, 27, 742 88, 37, 38, 86, 29, 30, 31, 32, 33, 39,
730 28, 29, 30, 159, 63, 31, 187, 127, 130, 64, 743 36, 36, 1, 12, 16, 18, 19, 20, 21, 22,
731 139, 2, 90, 91, 32, -33, 101, 72, 169, -33, 744 23, 25, 27, 36, 47, 53, 54, 77, 78, 80,
732 -33, -33, -33, -33, -33, -33, -33, 102, 73, -33, 745 17, 18, 19, 20, 36, 47, 62, 78, 80, 46,
733 -33, 103, -33, 104, 105, 106, 107, 108, -33, 109, 746 59, 85, 46, 60, 65, 72, 85, 24, 36, 79,
734 52, 110, 129, 134, 82, 143, 83, -4, 12, 84, 747 82, 46, 60, 71, 72, 85, 36, 47, 80, 34,
735 111, 13, 14, 15, 16, 17, 18, 19, 20, 90, 748 88, 88, 89, 89, 89, 89, 89, 89, 36, 36,
736 91, 21, 22, 23, 24, 25, 26, 27, 28, 29, 749 26, 84, 83, 84, 88, 27, 27, 89, 55, 1,
737 30, 85, 86, 31, 188, 90, 91, 87, 99, -85, 750 13, 36, 84, 83, 27, 14, 87, 88, 87, 36,
738 101, 100, 32, -85, -85, -85, -85, -85, -85, -85, 751 87, 87, 87, 87, 89, 27, 36, 36, 87, 36,
739 -85, 156, 198, -85, -85, 103, -85, -85, -85, -85, 752 87, 88, 36, 36, 36, 36, 36, 87, 39, 56,
740 -85, -85, -85, 157, 163, 110, 158, 166, 101, 167, 753 36, 36, 36, 84
741 168, 171, -52, -52, 144, -52, -52, -52, -52, 102,
742 91, -52, -52, 103, 118, 119, 120, 121, 172, 176,
743 183, 101, 185, 110, -76, -76, -76, -76, -76, -76,
744 -76, -76, 122, 189, -76, -76, 103, 13, 14, 15,
745 16, 17, 18, 19, 20, 190, 110, 21, 22, 191,
746 193, 195, 196, 14, 15, 144, 17, 18, 19, 20,
747 197, 53, 21, 22, 51, 75, 125, 175, 32, 177,
748 178, 179, 93, 94, 95, 96, 97, 184, 137, 186,
749 170, 0, 98, 32, 0, 0, 0, 0, 192
750}; 754};
751 755
752#define yypact_value_is_default(yystate) \ 756 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
753 ((yystate) == (-91)) 757static const yytype_uint8 yyr1[] =
754
755#define yytable_value_is_error(yytable_value) \
756 YYID (0)
757
758static const yytype_int16 yycheck[] =
759{ 758{
760 1, 67, 68, 93, 94, 95, 96, 97, 98, 23, 759 0, 41, 42, 42, 43, 43, 44, 44, 44, 44,
761 10, 76, 13, 0, 15, 76, 81, 18, 108, 35, 760 44, 44, 44, 44, 45, 45, 45, 45, 45, 45,
762 81, 35, 3, 3, 90, 91, 33, 0, 1, 36, 761 45, 45, 45, 46, 46, 46, 46, 46, 46, 47,
763 37, 4, 5, 6, 7, 8, 9, 10, 11, 12, 762 47, 48, 49, 50, 51, 52, 52, 52, 52, 52,
764 106, 14, 15, 16, 17, 18, 19, 20, 21, 22, 763 52, 52, 53, 53, 53, 53, 53, 53, 54, 55,
765 23, 24, 26, 26, 35, 35, 35, 26, 27, 14, 764 55, 56, 56, 57, 58, 59, 60, 61, 61, 61,
766 35, 35, 35, 26, 27, 34, 78, 26, 80, 69, 765 61, 61, 61, 62, 62, 62, 62, 63, 63, 64,
767 39, 35, 137, 78, 164, 80, 137, 26, 27, 0, 766 65, 66, 67, 67, 67, 67, 68, 69, 70, 71,
768 1, 36, 37, 4, 5, 6, 7, 8, 9, 10, 767 72, 73, 73, 73, 73, 74, 75, 76, 77, 78,
769 11, 35, 158, 14, 15, 16, 17, 18, 19, 20, 768 79, 79, 79, 79, 80, 81, 81, 81, 82, 83,
770 21, 22, 23, 104, 26, 26, 172, 77, 78, 26, 769 83, 84, 84, 85, 85, 85, 86, 86, 87, 87,
771 80, 35, 36, 37, 35, 0, 1, 1, 119, 4, 770 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
772 5, 6, 7, 8, 9, 10, 11, 12, 1, 14, 771 88, 89, 89, 90, 90
773 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
774 35, 26, 77, 78, 35, 80, 35, 0, 1, 35,
775 35, 4, 5, 6, 7, 8, 9, 10, 11, 36,
776 37, 14, 15, 16, 17, 18, 19, 20, 21, 22,
777 23, 35, 35, 26, 35, 36, 37, 35, 35, 0,
778 1, 35, 35, 4, 5, 6, 7, 8, 9, 10,
779 11, 35, 193, 14, 15, 16, 17, 18, 19, 20,
780 21, 22, 23, 35, 26, 26, 25, 1, 1, 13,
781 35, 26, 5, 6, 35, 8, 9, 10, 11, 12,
782 37, 14, 15, 16, 17, 18, 19, 20, 14, 35,
783 35, 1, 35, 26, 4, 5, 6, 7, 8, 9,
784 10, 11, 35, 35, 14, 15, 16, 4, 5, 6,
785 7, 8, 9, 10, 11, 35, 26, 14, 15, 35,
786 38, 35, 35, 5, 6, 35, 8, 9, 10, 11,
787 35, 7, 14, 15, 6, 37, 76, 159, 35, 161,
788 162, 163, 28, 29, 30, 31, 32, 169, 79, 171,
789 120, -1, 38, 35, -1, -1, -1, -1, 180
790}; 772};
791 773
792/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 774 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
793 symbol of state STATE-NUM. */ 775static const yytype_uint8 yyr2[] =
794static const yytype_uint8 yystos[] =
795{ 776{
796 0, 3, 35, 41, 42, 43, 67, 85, 26, 27, 777 0, 2, 2, 1, 2, 1, 0, 2, 2, 2,
797 83, 0, 1, 4, 5, 6, 7, 8, 9, 10, 778 2, 4, 4, 3, 1, 1, 1, 1, 1, 1,
798 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 779 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
799 23, 26, 35, 44, 45, 47, 48, 49, 50, 56, 780 2, 3, 2, 3, 2, 0, 2, 2, 2, 2,
800 57, 59, 63, 65, 68, 69, 71, 73, 74, 75, 781 2, 2, 3, 4, 4, 4, 4, 5, 3, 0,
801 84, 43, 35, 42, 85, 35, 83, 35, 83, 26, 782 3, 0, 2, 3, 2, 1, 3, 0, 2, 2,
802 89, 35, 83, 26, 26, 26, 27, 34, 39, 87, 783 2, 2, 2, 4, 3, 2, 4, 0, 2, 3,
803 88, 35, 1, 1, 51, 51, 60, 62, 66, 80, 784 1, 3, 0, 2, 2, 2, 3, 3, 3, 1,
804 72, 78, 35, 35, 35, 35, 35, 35, 87, 87, 785 3, 0, 2, 2, 2, 3, 3, 2, 2, 2,
805 36, 37, 85, 28, 29, 30, 31, 32, 38, 35, 786 0, 2, 2, 2, 4, 0, 2, 2, 2, 0,
806 35, 1, 12, 16, 18, 19, 20, 21, 22, 24, 787 2, 1, 1, 2, 2, 2, 1, 2, 0, 2,
807 26, 35, 46, 52, 53, 76, 77, 79, 17, 18, 788 1, 3, 3, 3, 3, 3, 3, 3, 2, 3,
808 19, 20, 35, 46, 61, 77, 79, 45, 58, 84, 789 3, 1, 1, 0, 1
809 45, 59, 64, 71, 84, 23, 35, 78, 81, 45,
810 59, 70, 71, 84, 35, 46, 79, 33, 87, 87,
811 88, 88, 88, 88, 88, 88, 35, 35, 25, 83,
812 82, 83, 87, 26, 88, 54, 1, 13, 35, 83,
813 82, 26, 14, 86, 87, 86, 35, 86, 86, 86,
814 88, 26, 35, 35, 86, 35, 86, 87, 35, 35,
815 35, 35, 86, 38, 55, 35, 35, 35, 83
816}; 790};
817 791
818#define yyerrok (yyerrstatus = 0) 792
819#define yyclearin (yychar = YYEMPTY) 793#define yyerrok (yyerrstatus = 0)
820#define YYEMPTY (-2) 794#define yyclearin (yychar = YYEMPTY)
821#define YYEOF 0 795#define YYEMPTY (-2)
822 796#define YYEOF 0
823#define YYACCEPT goto yyacceptlab 797
824#define YYABORT goto yyabortlab 798#define YYACCEPT goto yyacceptlab
825#define YYERROR goto yyerrorlab 799#define YYABORT goto yyabortlab
826 800#define YYERROR goto yyerrorlab
827 801
828/* Like YYERROR except do call yyerror. This remains here temporarily
829 to ease the transition to the new meaning of YYERROR, for GCC.
830 Once GCC version 2 has supplanted version 1, this can go. However,
831 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
832 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
833 discussed. */
834
835#define YYFAIL goto yyerrlab
836#if defined YYFAIL
837 /* This is here to suppress warnings from the GCC cpp's
838 -Wunused-macros. Normally we don't worry about that warning, but
839 some users do, and we want to make it easy for users to remove
840 YYFAIL uses, which will produce warnings from Bison 2.5. */
841#endif
842 802
843#define YYRECOVERING() (!!yyerrstatus) 803#define YYRECOVERING() (!!yyerrstatus)
844 804
@@ -855,55 +815,15 @@ do \
855 else \ 815 else \
856 { \ 816 { \
857 yyerror (YY_("syntax error: cannot back up")); \ 817 yyerror (YY_("syntax error: cannot back up")); \
858 YYERROR; \ 818 YYERROR; \
859 } \ 819 } \
860while (YYID (0)) 820while (0)
861
862
863#define YYTERROR 1
864#define YYERRCODE 256
865
866
867/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
868 If N is 0, then set CURRENT to the empty location which ends
869 the previous symbol: RHS[0] (always defined). */
870
871#define YYRHSLOC(Rhs, K) ((Rhs)[K])
872#ifndef YYLLOC_DEFAULT
873# define YYLLOC_DEFAULT(Current, Rhs, N) \
874 do \
875 if (YYID (N)) \
876 { \
877 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
878 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
879 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
880 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
881 } \
882 else \
883 { \
884 (Current).first_line = (Current).last_line = \
885 YYRHSLOC (Rhs, 0).last_line; \
886 (Current).first_column = (Current).last_column = \
887 YYRHSLOC (Rhs, 0).last_column; \
888 } \
889 while (YYID (0))
890#endif
891
892
893/* This macro is provided for backward compatibility. */
894
895#ifndef YY_LOCATION_PRINT
896# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
897#endif
898 821
822/* Error token number */
823#define YYTERROR 1
824#define YYERRCODE 256
899 825
900/* YYLEX -- calling `yylex' with the right arguments. */
901 826
902#ifdef YYLEX_PARAM
903# define YYLEX yylex (YYLEX_PARAM)
904#else
905# define YYLEX yylex ()
906#endif
907 827
908/* Enable debugging if requested. */ 828/* Enable debugging if requested. */
909#if YYDEBUG 829#if YYDEBUG
@@ -913,40 +833,36 @@ while (YYID (0))
913# define YYFPRINTF fprintf 833# define YYFPRINTF fprintf
914# endif 834# endif
915 835
916# define YYDPRINTF(Args) \ 836# define YYDPRINTF(Args) \
917do { \ 837do { \
918 if (yydebug) \ 838 if (yydebug) \
919 YYFPRINTF Args; \ 839 YYFPRINTF Args; \
920} while (YYID (0)) 840} while (0)
841
842/* This macro is provided for backward compatibility. */
843#ifndef YY_LOCATION_PRINT
844# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
845#endif
846
921 847
922# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 848# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
923do { \ 849do { \
924 if (yydebug) \ 850 if (yydebug) \
925 { \ 851 { \
926 YYFPRINTF (stderr, "%s ", Title); \ 852 YYFPRINTF (stderr, "%s ", Title); \
927 yy_symbol_print (stderr, \ 853 yy_symbol_print (stderr, \
928 Type, Value); \ 854 Type, Value); \
929 YYFPRINTF (stderr, "\n"); \ 855 YYFPRINTF (stderr, "\n"); \
930 } \ 856 } \
931} while (YYID (0)) 857} while (0)
932 858
933 859
934/*--------------------------------. 860/*----------------------------------------.
935| Print this symbol on YYOUTPUT. | 861| Print this symbol's value on YYOUTPUT. |
936`--------------------------------*/ 862`----------------------------------------*/
937 863
938/*ARGSUSED*/
939#if (defined __STDC__ || defined __C99__FUNC__ \
940 || defined __cplusplus || defined _MSC_VER)
941static void 864static void
942yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 865yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
943#else
944static void
945yy_symbol_value_print (yyoutput, yytype, yyvaluep)
946 FILE *yyoutput;
947 int yytype;
948 YYSTYPE const * const yyvaluep;
949#endif
950{ 866{
951 FILE *yyo = yyoutput; 867 FILE *yyo = yyoutput;
952 YYUSE (yyo); 868 YYUSE (yyo);
@@ -955,14 +871,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
955# ifdef YYPRINT 871# ifdef YYPRINT
956 if (yytype < YYNTOKENS) 872 if (yytype < YYNTOKENS)
957 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 873 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
958# else
959 YYUSE (yyoutput);
960# endif 874# endif
961 switch (yytype) 875 YYUSE (yytype);
962 {
963 default:
964 break;
965 }
966} 876}
967 877
968 878
@@ -970,22 +880,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
970| Print this symbol on YYOUTPUT. | 880| Print this symbol on YYOUTPUT. |
971`--------------------------------*/ 881`--------------------------------*/
972 882
973#if (defined __STDC__ || defined __C99__FUNC__ \
974 || defined __cplusplus || defined _MSC_VER)
975static void 883static void
976yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 884yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
977#else
978static void
979yy_symbol_print (yyoutput, yytype, yyvaluep)
980 FILE *yyoutput;
981 int yytype;
982 YYSTYPE const * const yyvaluep;
983#endif
984{ 885{
985 if (yytype < YYNTOKENS) 886 YYFPRINTF (yyoutput, "%s %s (",
986 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 887 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
987 else
988 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
989 888
990 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 889 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
991 YYFPRINTF (yyoutput, ")"); 890 YYFPRINTF (yyoutput, ")");
@@ -996,16 +895,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
996| TOP (included). | 895| TOP (included). |
997`------------------------------------------------------------------*/ 896`------------------------------------------------------------------*/
998 897
999#if (defined __STDC__ || defined __C99__FUNC__ \
1000 || defined __cplusplus || defined _MSC_VER)
1001static void 898static void
1002yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 899yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1003#else
1004static void
1005yy_stack_print (yybottom, yytop)
1006 yytype_int16 *yybottom;
1007 yytype_int16 *yytop;
1008#endif
1009{ 900{
1010 YYFPRINTF (stderr, "Stack now"); 901 YYFPRINTF (stderr, "Stack now");
1011 for (; yybottom <= yytop; yybottom++) 902 for (; yybottom <= yytop; yybottom++)
@@ -1016,49 +907,42 @@ yy_stack_print (yybottom, yytop)
1016 YYFPRINTF (stderr, "\n"); 907 YYFPRINTF (stderr, "\n");
1017} 908}
1018 909
1019# define YY_STACK_PRINT(Bottom, Top) \ 910# define YY_STACK_PRINT(Bottom, Top) \
1020do { \ 911do { \
1021 if (yydebug) \ 912 if (yydebug) \
1022 yy_stack_print ((Bottom), (Top)); \ 913 yy_stack_print ((Bottom), (Top)); \
1023} while (YYID (0)) 914} while (0)
1024 915
1025 916
1026/*------------------------------------------------. 917/*------------------------------------------------.
1027| Report that the YYRULE is going to be reduced. | 918| Report that the YYRULE is going to be reduced. |
1028`------------------------------------------------*/ 919`------------------------------------------------*/
1029 920
1030#if (defined __STDC__ || defined __C99__FUNC__ \
1031 || defined __cplusplus || defined _MSC_VER)
1032static void 921static void
1033yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 922yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1034#else
1035static void
1036yy_reduce_print (yyvsp, yyrule)
1037 YYSTYPE *yyvsp;
1038 int yyrule;
1039#endif
1040{ 923{
924 unsigned long int yylno = yyrline[yyrule];
1041 int yynrhs = yyr2[yyrule]; 925 int yynrhs = yyr2[yyrule];
1042 int yyi; 926 int yyi;
1043 unsigned long int yylno = yyrline[yyrule];
1044 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 927 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1045 yyrule - 1, yylno); 928 yyrule - 1, yylno);
1046 /* The symbols being reduced. */ 929 /* The symbols being reduced. */
1047 for (yyi = 0; yyi < yynrhs; yyi++) 930 for (yyi = 0; yyi < yynrhs; yyi++)
1048 { 931 {
1049 YYFPRINTF (stderr, " $%d = ", yyi + 1); 932 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1050 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 933 yy_symbol_print (stderr,
1051 &(yyvsp[(yyi + 1) - (yynrhs)]) 934 yystos[yyssp[yyi + 1 - yynrhs]],
1052 ); 935 &(yyvsp[(yyi + 1) - (yynrhs)])
936 );
1053 YYFPRINTF (stderr, "\n"); 937 YYFPRINTF (stderr, "\n");
1054 } 938 }
1055} 939}
1056 940
1057# define YY_REDUCE_PRINT(Rule) \ 941# define YY_REDUCE_PRINT(Rule) \
1058do { \ 942do { \
1059 if (yydebug) \ 943 if (yydebug) \
1060 yy_reduce_print (yyvsp, Rule); \ 944 yy_reduce_print (yyssp, yyvsp, Rule); \
1061} while (YYID (0)) 945} while (0)
1062 946
1063/* Nonzero means print parse trace. It is left uninitialized so that 947/* Nonzero means print parse trace. It is left uninitialized so that
1064 multiple parsers can coexist. */ 948 multiple parsers can coexist. */
@@ -1072,7 +956,7 @@ int yydebug;
1072 956
1073 957
1074/* YYINITDEPTH -- initial size of the parser's stacks. */ 958/* YYINITDEPTH -- initial size of the parser's stacks. */
1075#ifndef YYINITDEPTH 959#ifndef YYINITDEPTH
1076# define YYINITDEPTH 200 960# define YYINITDEPTH 200
1077#endif 961#endif
1078 962
@@ -1095,15 +979,8 @@ int yydebug;
1095# define yystrlen strlen 979# define yystrlen strlen
1096# else 980# else
1097/* Return the length of YYSTR. */ 981/* Return the length of YYSTR. */
1098#if (defined __STDC__ || defined __C99__FUNC__ \
1099 || defined __cplusplus || defined _MSC_VER)
1100static YYSIZE_T 982static YYSIZE_T
1101yystrlen (const char *yystr) 983yystrlen (const char *yystr)
1102#else
1103static YYSIZE_T
1104yystrlen (yystr)
1105 const char *yystr;
1106#endif
1107{ 984{
1108 YYSIZE_T yylen; 985 YYSIZE_T yylen;
1109 for (yylen = 0; yystr[yylen]; yylen++) 986 for (yylen = 0; yystr[yylen]; yylen++)
@@ -1119,16 +996,8 @@ yystrlen (yystr)
1119# else 996# else
1120/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 997/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1121 YYDEST. */ 998 YYDEST. */
1122#if (defined __STDC__ || defined __C99__FUNC__ \
1123 || defined __cplusplus || defined _MSC_VER)
1124static char * 999static char *
1125yystpcpy (char *yydest, const char *yysrc) 1000yystpcpy (char *yydest, const char *yysrc)
1126#else
1127static char *
1128yystpcpy (yydest, yysrc)
1129 char *yydest;
1130 const char *yysrc;
1131#endif
1132{ 1001{
1133 char *yyd = yydest; 1002 char *yyd = yydest;
1134 const char *yys = yysrc; 1003 const char *yys = yysrc;
@@ -1158,27 +1027,27 @@ yytnamerr (char *yyres, const char *yystr)
1158 char const *yyp = yystr; 1027 char const *yyp = yystr;
1159 1028
1160 for (;;) 1029 for (;;)
1161 switch (*++yyp) 1030 switch (*++yyp)
1162 { 1031 {
1163 case '\'': 1032 case '\'':
1164 case ',': 1033 case ',':
1165 goto do_not_strip_quotes; 1034 goto do_not_strip_quotes;
1166 1035
1167 case '\\': 1036 case '\\':
1168 if (*++yyp != '\\') 1037 if (*++yyp != '\\')
1169 goto do_not_strip_quotes; 1038 goto do_not_strip_quotes;
1170 /* Fall through. */ 1039 /* Fall through. */
1171 default: 1040 default:
1172 if (yyres) 1041 if (yyres)
1173 yyres[yyn] = *yyp; 1042 yyres[yyn] = *yyp;
1174 yyn++; 1043 yyn++;
1175 break; 1044 break;
1176 1045
1177 case '"': 1046 case '"':
1178 if (yyres) 1047 if (yyres)
1179 yyres[yyn] = '\0'; 1048 yyres[yyn] = '\0';
1180 return yyn; 1049 return yyn;
1181 } 1050 }
1182 do_not_strip_quotes: ; 1051 do_not_strip_quotes: ;
1183 } 1052 }
1184 1053
@@ -1201,12 +1070,11 @@ static int
1201yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1070yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1202 yytype_int16 *yyssp, int yytoken) 1071 yytype_int16 *yyssp, int yytoken)
1203{ 1072{
1204 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); 1073 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1205 YYSIZE_T yysize = yysize0; 1074 YYSIZE_T yysize = yysize0;
1206 YYSIZE_T yysize1;
1207 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1075 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1208 /* Internationalized format string. */ 1076 /* Internationalized format string. */
1209 const char *yyformat = YY_NULL; 1077 const char *yyformat = YY_NULLPTR;
1210 /* Arguments of yyformat. */ 1078 /* Arguments of yyformat. */
1211 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1079 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1212 /* Number of reported tokens (one for the "unexpected", one per 1080 /* Number of reported tokens (one for the "unexpected", one per
@@ -1214,10 +1082,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1214 int yycount = 0; 1082 int yycount = 0;
1215 1083
1216 /* There are many possibilities here to consider: 1084 /* There are many possibilities here to consider:
1217 - Assume YYFAIL is not used. It's too flawed to consider. See
1218 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1219 for details. YYERROR is fine as it does not invoke this
1220 function.
1221 - If this state is a consistent state with a default action, then 1085 - If this state is a consistent state with a default action, then
1222 the only way this function was invoked is if the default action 1086 the only way this function was invoked is if the default action
1223 is an error action. In that case, don't check for expected 1087 is an error action. In that case, don't check for expected
@@ -1266,11 +1130,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1266 break; 1130 break;
1267 } 1131 }
1268 yyarg[yycount++] = yytname[yyx]; 1132 yyarg[yycount++] = yytname[yyx];
1269 yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); 1133 {
1270 if (! (yysize <= yysize1 1134 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1271 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1135 if (! (yysize <= yysize1
1272 return 2; 1136 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1273 yysize = yysize1; 1137 return 2;
1138 yysize = yysize1;
1139 }
1274 } 1140 }
1275 } 1141 }
1276 } 1142 }
@@ -1290,10 +1156,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1290# undef YYCASE_ 1156# undef YYCASE_
1291 } 1157 }
1292 1158
1293 yysize1 = yysize + yystrlen (yyformat); 1159 {
1294 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1160 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1295 return 2; 1161 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1296 yysize = yysize1; 1162 return 2;
1163 yysize = yysize1;
1164 }
1297 1165
1298 if (*yymsg_alloc < yysize) 1166 if (*yymsg_alloc < yysize)
1299 { 1167 {
@@ -1330,78 +1198,58 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1330| Release the memory associated to this symbol. | 1198| Release the memory associated to this symbol. |
1331`-----------------------------------------------*/ 1199`-----------------------------------------------*/
1332 1200
1333/*ARGSUSED*/
1334#if (defined __STDC__ || defined __C99__FUNC__ \
1335 || defined __cplusplus || defined _MSC_VER)
1336static void 1201static void
1337yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1202yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1338#else
1339static void
1340yydestruct (yymsg, yytype, yyvaluep)
1341 const char *yymsg;
1342 int yytype;
1343 YYSTYPE *yyvaluep;
1344#endif
1345{ 1203{
1346 YYUSE (yyvaluep); 1204 YYUSE (yyvaluep);
1347
1348 if (!yymsg) 1205 if (!yymsg)
1349 yymsg = "Deleting"; 1206 yymsg = "Deleting";
1350 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1207 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1351 1208
1209 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1352 switch (yytype) 1210 switch (yytype)
1353 { 1211 {
1354 case 57: /* "choice_entry" */ 1212 case 58: /* choice_entry */
1355 1213
1356 { 1214 {
1357 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1215 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1358 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 1216 ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno);
1359 if (current_menu == (yyvaluep->menu)) 1217 if (current_menu == ((*yyvaluep).menu))
1360 menu_end_menu(); 1218 menu_end_menu();
1361}; 1219}
1220
1221 break;
1362 1222
1363 break; 1223 case 64: /* if_entry */
1364 case 63: /* "if_entry" */
1365 1224
1366 { 1225 {
1367 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1226 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1368 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 1227 ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno);
1369 if (current_menu == (yyvaluep->menu)) 1228 if (current_menu == ((*yyvaluep).menu))
1370 menu_end_menu(); 1229 menu_end_menu();
1371}; 1230}
1372 1231
1373 break; 1232 break;
1374 case 69: /* "menu_entry" */
1375 1233
1376 { 1234 case 70: /* menu_entry */
1235
1236 {
1377 fprintf(stderr, "%s:%d: missing end statement for this entry\n", 1237 fprintf(stderr, "%s:%d: missing end statement for this entry\n",
1378 (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 1238 ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno);
1379 if (current_menu == (yyvaluep->menu)) 1239 if (current_menu == ((*yyvaluep).menu))
1380 menu_end_menu(); 1240 menu_end_menu();
1381}; 1241}
1242
1243 break;
1382 1244
1383 break;
1384 1245
1385 default: 1246 default:
1386 break; 1247 break;
1387 } 1248 }
1249 YY_IGNORE_MAYBE_UNINITIALIZED_END
1388} 1250}
1389 1251
1390 1252
1391/* Prevent warnings from -Wmissing-prototypes. */
1392#ifdef YYPARSE_PARAM
1393#if defined __STDC__ || defined __cplusplus
1394int yyparse (void *YYPARSE_PARAM);
1395#else
1396int yyparse ();
1397#endif
1398#else /* ! YYPARSE_PARAM */
1399#if defined __STDC__ || defined __cplusplus
1400int yyparse (void);
1401#else
1402int yyparse ();
1403#endif
1404#endif /* ! YYPARSE_PARAM */
1405 1253
1406 1254
1407/* The lookahead symbol. */ 1255/* The lookahead symbol. */
@@ -1409,7 +1257,6 @@ int yychar;
1409 1257
1410/* The semantic value of the lookahead symbol. */ 1258/* The semantic value of the lookahead symbol. */
1411YYSTYPE yylval; 1259YYSTYPE yylval;
1412
1413/* Number of syntax errors so far. */ 1260/* Number of syntax errors so far. */
1414int yynerrs; 1261int yynerrs;
1415 1262
@@ -1418,35 +1265,16 @@ int yynerrs;
1418| yyparse. | 1265| yyparse. |
1419`----------*/ 1266`----------*/
1420 1267
1421#ifdef YYPARSE_PARAM
1422#if (defined __STDC__ || defined __C99__FUNC__ \
1423 || defined __cplusplus || defined _MSC_VER)
1424int
1425yyparse (void *YYPARSE_PARAM)
1426#else
1427int
1428yyparse (YYPARSE_PARAM)
1429 void *YYPARSE_PARAM;
1430#endif
1431#else /* ! YYPARSE_PARAM */
1432#if (defined __STDC__ || defined __C99__FUNC__ \
1433 || defined __cplusplus || defined _MSC_VER)
1434int 1268int
1435yyparse (void) 1269yyparse (void)
1436#else
1437int
1438yyparse ()
1439
1440#endif
1441#endif
1442{ 1270{
1443 int yystate; 1271 int yystate;
1444 /* Number of tokens to shift before error messages enabled. */ 1272 /* Number of tokens to shift before error messages enabled. */
1445 int yyerrstatus; 1273 int yyerrstatus;
1446 1274
1447 /* The stacks and their tools: 1275 /* The stacks and their tools:
1448 `yyss': related to states. 1276 'yyss': related to states.
1449 `yyvs': related to semantic values. 1277 'yyvs': related to semantic values.
1450 1278
1451 Refer to the stacks through separate pointers, to allow yyoverflow 1279 Refer to the stacks through separate pointers, to allow yyoverflow
1452 to reallocate them elsewhere. */ 1280 to reallocate them elsewhere. */
@@ -1466,7 +1294,7 @@ yyparse ()
1466 int yyn; 1294 int yyn;
1467 int yyresult; 1295 int yyresult;
1468 /* Lookahead token as an internal (translated) token number. */ 1296 /* Lookahead token as an internal (translated) token number. */
1469 int yytoken; 1297 int yytoken = 0;
1470 /* The variables used to return semantic value and location from the 1298 /* The variables used to return semantic value and location from the
1471 action routines. */ 1299 action routines. */
1472 YYSTYPE yyval; 1300 YYSTYPE yyval;
@@ -1484,9 +1312,8 @@ yyparse ()
1484 Keep to zero when no symbol should be popped. */ 1312 Keep to zero when no symbol should be popped. */
1485 int yylen = 0; 1313 int yylen = 0;
1486 1314
1487 yytoken = 0; 1315 yyssp = yyss = yyssa;
1488 yyss = yyssa; 1316 yyvsp = yyvs = yyvsa;
1489 yyvs = yyvsa;
1490 yystacksize = YYINITDEPTH; 1317 yystacksize = YYINITDEPTH;
1491 1318
1492 YYDPRINTF ((stderr, "Starting parse\n")); 1319 YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1495,14 +1322,6 @@ yyparse ()
1495 yyerrstatus = 0; 1322 yyerrstatus = 0;
1496 yynerrs = 0; 1323 yynerrs = 0;
1497 yychar = YYEMPTY; /* Cause a token to be read. */ 1324 yychar = YYEMPTY; /* Cause a token to be read. */
1498
1499 /* Initialize stack pointers.
1500 Waste one element of value and location stack
1501 so that they stay on the same level as the state stack.
1502 The wasted elements are never initialized. */
1503 yyssp = yyss;
1504 yyvsp = yyvs;
1505
1506 goto yysetstate; 1325 goto yysetstate;
1507 1326
1508/*------------------------------------------------------------. 1327/*------------------------------------------------------------.
@@ -1523,23 +1342,23 @@ yyparse ()
1523 1342
1524#ifdef yyoverflow 1343#ifdef yyoverflow
1525 { 1344 {
1526 /* Give user a chance to reallocate the stack. Use copies of 1345 /* Give user a chance to reallocate the stack. Use copies of
1527 these so that the &'s don't force the real ones into 1346 these so that the &'s don't force the real ones into
1528 memory. */ 1347 memory. */
1529 YYSTYPE *yyvs1 = yyvs; 1348 YYSTYPE *yyvs1 = yyvs;
1530 yytype_int16 *yyss1 = yyss; 1349 yytype_int16 *yyss1 = yyss;
1531 1350
1532 /* Each stack pointer address is followed by the size of the 1351 /* Each stack pointer address is followed by the size of the
1533 data in use in that stack, in bytes. This used to be a 1352 data in use in that stack, in bytes. This used to be a
1534 conditional around just the two extra args, but that might 1353 conditional around just the two extra args, but that might
1535 be undefined if yyoverflow is a macro. */ 1354 be undefined if yyoverflow is a macro. */
1536 yyoverflow (YY_("memory exhausted"), 1355 yyoverflow (YY_("memory exhausted"),
1537 &yyss1, yysize * sizeof (*yyssp), 1356 &yyss1, yysize * sizeof (*yyssp),
1538 &yyvs1, yysize * sizeof (*yyvsp), 1357 &yyvs1, yysize * sizeof (*yyvsp),
1539 &yystacksize); 1358 &yystacksize);
1540 1359
1541 yyss = yyss1; 1360 yyss = yyss1;
1542 yyvs = yyvs1; 1361 yyvs = yyvs1;
1543 } 1362 }
1544#else /* no yyoverflow */ 1363#else /* no yyoverflow */
1545# ifndef YYSTACK_RELOCATE 1364# ifndef YYSTACK_RELOCATE
@@ -1547,22 +1366,22 @@ yyparse ()
1547# else 1366# else
1548 /* Extend the stack our own way. */ 1367 /* Extend the stack our own way. */
1549 if (YYMAXDEPTH <= yystacksize) 1368 if (YYMAXDEPTH <= yystacksize)
1550 goto yyexhaustedlab; 1369 goto yyexhaustedlab;
1551 yystacksize *= 2; 1370 yystacksize *= 2;
1552 if (YYMAXDEPTH < yystacksize) 1371 if (YYMAXDEPTH < yystacksize)
1553 yystacksize = YYMAXDEPTH; 1372 yystacksize = YYMAXDEPTH;
1554 1373
1555 { 1374 {
1556 yytype_int16 *yyss1 = yyss; 1375 yytype_int16 *yyss1 = yyss;
1557 union yyalloc *yyptr = 1376 union yyalloc *yyptr =
1558 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1377 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1559 if (! yyptr) 1378 if (! yyptr)
1560 goto yyexhaustedlab; 1379 goto yyexhaustedlab;
1561 YYSTACK_RELOCATE (yyss_alloc, yyss); 1380 YYSTACK_RELOCATE (yyss_alloc, yyss);
1562 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1381 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1563# undef YYSTACK_RELOCATE 1382# undef YYSTACK_RELOCATE
1564 if (yyss1 != yyssa) 1383 if (yyss1 != yyssa)
1565 YYSTACK_FREE (yyss1); 1384 YYSTACK_FREE (yyss1);
1566 } 1385 }
1567# endif 1386# endif
1568#endif /* no yyoverflow */ 1387#endif /* no yyoverflow */
@@ -1571,10 +1390,10 @@ yyparse ()
1571 yyvsp = yyvs + yysize - 1; 1390 yyvsp = yyvs + yysize - 1;
1572 1391
1573 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1392 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1574 (unsigned long int) yystacksize)); 1393 (unsigned long int) yystacksize));
1575 1394
1576 if (yyss + yystacksize - 1 <= yyssp) 1395 if (yyss + yystacksize - 1 <= yyssp)
1577 YYABORT; 1396 YYABORT;
1578 } 1397 }
1579 1398
1580 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1399 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -1603,7 +1422,7 @@ yybackup:
1603 if (yychar == YYEMPTY) 1422 if (yychar == YYEMPTY)
1604 { 1423 {
1605 YYDPRINTF ((stderr, "Reading a token: ")); 1424 YYDPRINTF ((stderr, "Reading a token: "));
1606 yychar = YYLEX; 1425 yychar = yylex ();
1607 } 1426 }
1608 1427
1609 if (yychar <= YYEOF) 1428 if (yychar <= YYEOF)
@@ -1643,7 +1462,9 @@ yybackup:
1643 yychar = YYEMPTY; 1462 yychar = YYEMPTY;
1644 1463
1645 yystate = yyn; 1464 yystate = yyn;
1465 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1646 *++yyvsp = yylval; 1466 *++yyvsp = yylval;
1467 YY_IGNORE_MAYBE_UNINITIALIZED_END
1647 1468
1648 goto yynewstate; 1469 goto yynewstate;
1649 1470
@@ -1666,7 +1487,7 @@ yyreduce:
1666 yylen = yyr2[yyn]; 1487 yylen = yyr2[yyn];
1667 1488
1668 /* If YYLEN is nonzero, implement the default value of the action: 1489 /* If YYLEN is nonzero, implement the default value of the action:
1669 `$$ = $1'. 1490 '$$ = $1'.
1670 1491
1671 Otherwise, the following line sets YYVAL to garbage. 1492 Otherwise, the following line sets YYVAL to garbage.
1672 This behavior is undocumented and Bison 1493 This behavior is undocumented and Bison
@@ -1682,64 +1503,73 @@ yyreduce:
1682 case 10: 1503 case 10:
1683 1504
1684 { zconf_error("unexpected end statement"); } 1505 { zconf_error("unexpected end statement"); }
1506
1685 break; 1507 break;
1686 1508
1687 case 11: 1509 case 11:
1688 1510
1689 { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); } 1511 { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); }
1512
1690 break; 1513 break;
1691 1514
1692 case 12: 1515 case 12:
1693 1516
1694 { 1517 {
1695 zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name); 1518 zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[-2].id)->name);
1696} 1519}
1520
1697 break; 1521 break;
1698 1522
1699 case 13: 1523 case 13:
1700 1524
1701 { zconf_error("invalid statement"); } 1525 { zconf_error("invalid statement"); }
1526
1702 break; 1527 break;
1703 1528
1704 case 28: 1529 case 29:
1530
1531 { zconf_error("unknown option \"%s\"", (yyvsp[-2].string)); }
1705 1532
1706 { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); }
1707 break; 1533 break;
1708 1534
1709 case 29: 1535 case 30:
1710 1536
1711 { zconf_error("invalid option"); } 1537 { zconf_error("invalid option"); }
1538
1712 break; 1539 break;
1713 1540
1714 case 30: 1541 case 31:
1715 1542
1716 { 1543 {
1717 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); 1544 struct symbol *sym = sym_lookup((yyvsp[-1].string), 0);
1718 sym->flags |= SYMBOL_OPTIONAL; 1545 sym->flags |= SYMBOL_OPTIONAL;
1719 menu_add_entry(sym); 1546 menu_add_entry(sym);
1720 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1547 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
1721} 1548}
1549
1722 break; 1550 break;
1723 1551
1724 case 31: 1552 case 32:
1725 1553
1726 { 1554 {
1727 menu_end_entry(); 1555 menu_end_entry();
1728 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); 1556 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
1729} 1557}
1558
1730 break; 1559 break;
1731 1560
1732 case 32: 1561 case 33:
1733 1562
1734 { 1563 {
1735 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); 1564 struct symbol *sym = sym_lookup((yyvsp[-1].string), 0);
1736 sym->flags |= SYMBOL_OPTIONAL; 1565 sym->flags |= SYMBOL_OPTIONAL;
1737 menu_add_entry(sym); 1566 menu_add_entry(sym);
1738 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1567 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
1739} 1568}
1569
1740 break; 1570 break;
1741 1571
1742 case 33: 1572 case 34:
1743 1573
1744 { 1574 {
1745 if (current_entry->prompt) 1575 if (current_entry->prompt)
@@ -1749,352 +1579,410 @@ yyreduce:
1749 menu_end_entry(); 1579 menu_end_entry();
1750 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); 1580 printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
1751} 1581}
1582
1752 break; 1583 break;
1753 1584
1754 case 41: 1585 case 42:
1755 1586
1756 { 1587 {
1757 menu_set_type((yyvsp[(1) - (3)].id)->stype); 1588 menu_set_type((yyvsp[-2].id)->stype);
1758 printd(DEBUG_PARSE, "%s:%d:type(%u)\n", 1589 printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
1759 zconf_curname(), zconf_lineno(), 1590 zconf_curname(), zconf_lineno(),
1760 (yyvsp[(1) - (3)].id)->stype); 1591 (yyvsp[-2].id)->stype);
1761} 1592}
1593
1762 break; 1594 break;
1763 1595
1764 case 42: 1596 case 43:
1765 1597
1766 { 1598 {
1767 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); 1599 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
1768 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1600 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1769} 1601}
1602
1770 break; 1603 break;
1771 1604
1772 case 43: 1605 case 44:
1773 1606
1774 { 1607 {
1775 menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); 1608 menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr));
1776 if ((yyvsp[(1) - (4)].id)->stype != S_UNKNOWN) 1609 if ((yyvsp[-3].id)->stype != S_UNKNOWN)
1777 menu_set_type((yyvsp[(1) - (4)].id)->stype); 1610 menu_set_type((yyvsp[-3].id)->stype);
1778 printd(DEBUG_PARSE, "%s:%d:default(%u)\n", 1611 printd(DEBUG_PARSE, "%s:%d:default(%u)\n",
1779 zconf_curname(), zconf_lineno(), 1612 zconf_curname(), zconf_lineno(),
1780 (yyvsp[(1) - (4)].id)->stype); 1613 (yyvsp[-3].id)->stype);
1781} 1614}
1615
1782 break; 1616 break;
1783 1617
1784 case 44: 1618 case 45:
1785 1619
1786 { 1620 {
1787 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); 1621 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr));
1788 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); 1622 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
1789} 1623}
1624
1790 break; 1625 break;
1791 1626
1792 case 45: 1627 case 46:
1793 1628
1794 { 1629 {
1795 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr)); 1630 menu_add_symbol(P_IMPLY, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr));
1631 printd(DEBUG_PARSE, "%s:%d:imply\n", zconf_curname(), zconf_lineno());
1632}
1633
1634 break;
1635
1636 case 47:
1637
1638 {
1639 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr));
1796 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); 1640 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
1797} 1641}
1642
1798 break; 1643 break;
1799 1644
1800 case 48: 1645 case 50:
1801 1646
1802 { 1647 {
1803 const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); 1648 const struct kconf_id *id = kconf_id_lookup((yyvsp[-1].string), strlen((yyvsp[-1].string)));
1804 if (id && id->flags & TF_OPTION) 1649 if (id && id->flags & TF_OPTION)
1805 menu_add_option(id->token, (yyvsp[(3) - (3)].string)); 1650 menu_add_option(id->token, (yyvsp[0].string));
1806 else 1651 else
1807 zconfprint("warning: ignoring unknown option %s", (yyvsp[(2) - (3)].string)); 1652 zconfprint("warning: ignoring unknown option %s", (yyvsp[-1].string));
1808 free((yyvsp[(2) - (3)].string)); 1653 free((yyvsp[-1].string));
1809} 1654}
1655
1810 break; 1656 break;
1811 1657
1812 case 49: 1658 case 51:
1813 1659
1814 { (yyval.string) = NULL; } 1660 { (yyval.string) = NULL; }
1661
1815 break; 1662 break;
1816 1663
1817 case 50: 1664 case 52:
1665
1666 { (yyval.string) = (yyvsp[0].string); }
1818 1667
1819 { (yyval.string) = (yyvsp[(2) - (2)].string); }
1820 break; 1668 break;
1821 1669
1822 case 51: 1670 case 53:
1823 1671
1824 { 1672 {
1825 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE); 1673 struct symbol *sym = sym_lookup((yyvsp[-1].string), SYMBOL_CHOICE);
1826 sym->flags |= SYMBOL_AUTO; 1674 sym->flags |= SYMBOL_AUTO;
1827 menu_add_entry(sym); 1675 menu_add_entry(sym);
1828 menu_add_expr(P_CHOICE, NULL, NULL); 1676 menu_add_expr(P_CHOICE, NULL, NULL);
1829 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); 1677 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
1830} 1678}
1679
1831 break; 1680 break;
1832 1681
1833 case 52: 1682 case 54:
1834 1683
1835 { 1684 {
1836 (yyval.menu) = menu_add_menu(); 1685 (yyval.menu) = menu_add_menu();
1837} 1686}
1687
1838 break; 1688 break;
1839 1689
1840 case 53: 1690 case 55:
1841 1691
1842 { 1692 {
1843 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) { 1693 if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) {
1844 menu_end_menu(); 1694 menu_end_menu();
1845 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); 1695 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
1846 } 1696 }
1847} 1697}
1698
1848 break; 1699 break;
1849 1700
1850 case 61: 1701 case 63:
1851 1702
1852 { 1703 {
1853 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); 1704 menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
1854 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1705 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
1855} 1706}
1707
1856 break; 1708 break;
1857 1709
1858 case 62: 1710 case 64:
1859 1711
1860 { 1712 {
1861 if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) { 1713 if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) {
1862 menu_set_type((yyvsp[(1) - (3)].id)->stype); 1714 menu_set_type((yyvsp[-2].id)->stype);
1863 printd(DEBUG_PARSE, "%s:%d:type(%u)\n", 1715 printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
1864 zconf_curname(), zconf_lineno(), 1716 zconf_curname(), zconf_lineno(),
1865 (yyvsp[(1) - (3)].id)->stype); 1717 (yyvsp[-2].id)->stype);
1866 } else 1718 } else
1867 YYERROR; 1719 YYERROR;
1868} 1720}
1721
1869 break; 1722 break;
1870 1723
1871 case 63: 1724 case 65:
1872 1725
1873 { 1726 {
1874 current_entry->sym->flags |= SYMBOL_OPTIONAL; 1727 current_entry->sym->flags |= SYMBOL_OPTIONAL;
1875 printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); 1728 printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
1876} 1729}
1730
1877 break; 1731 break;
1878 1732
1879 case 64: 1733 case 66:
1880 1734
1881 { 1735 {
1882 if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) { 1736 if ((yyvsp[-3].id)->stype == S_UNKNOWN) {
1883 menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); 1737 menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr));
1884 printd(DEBUG_PARSE, "%s:%d:default\n", 1738 printd(DEBUG_PARSE, "%s:%d:default\n",
1885 zconf_curname(), zconf_lineno()); 1739 zconf_curname(), zconf_lineno());
1886 } else 1740 } else
1887 YYERROR; 1741 YYERROR;
1888} 1742}
1743
1889 break; 1744 break;
1890 1745
1891 case 67: 1746 case 69:
1892 1747
1893 { 1748 {
1894 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); 1749 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
1895 menu_add_entry(NULL); 1750 menu_add_entry(NULL);
1896 menu_add_dep((yyvsp[(2) - (3)].expr)); 1751 menu_add_dep((yyvsp[-1].expr));
1897 (yyval.menu) = menu_add_menu(); 1752 (yyval.menu) = menu_add_menu();
1898} 1753}
1754
1899 break; 1755 break;
1900 1756
1901 case 68: 1757 case 70:
1902 1758
1903 { 1759 {
1904 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) { 1760 if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) {
1905 menu_end_menu(); 1761 menu_end_menu();
1906 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); 1762 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
1907 } 1763 }
1908} 1764}
1765
1909 break; 1766 break;
1910 1767
1911 case 74: 1768 case 76:
1912 1769
1913 { 1770 {
1914 menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL); 1771 menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL);
1915} 1772}
1773
1916 break; 1774 break;
1917 1775
1918 case 75: 1776 case 77:
1919 1777
1920 { 1778 {
1921 menu_add_entry(NULL); 1779 menu_add_entry(NULL);
1922 menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL); 1780 menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL);
1923 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 1781 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
1924} 1782}
1783
1925 break; 1784 break;
1926 1785
1927 case 76: 1786 case 78:
1928 1787
1929 { 1788 {
1930 (yyval.menu) = menu_add_menu(); 1789 (yyval.menu) = menu_add_menu();
1931} 1790}
1791
1932 break; 1792 break;
1933 1793
1934 case 77: 1794 case 79:
1935 1795
1936 { 1796 {
1937 if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) { 1797 if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) {
1938 menu_end_menu(); 1798 menu_end_menu();
1939 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); 1799 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
1940 } 1800 }
1941} 1801}
1802
1942 break; 1803 break;
1943 1804
1944 case 83: 1805 case 85:
1945 1806
1946 { 1807 {
1947 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1808 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
1948 zconf_nextfile((yyvsp[(2) - (3)].string)); 1809 zconf_nextfile((yyvsp[-1].string));
1949} 1810}
1811
1950 break; 1812 break;
1951 1813
1952 case 84: 1814 case 86:
1953 1815
1954 { 1816 {
1955 menu_add_entry(NULL); 1817 menu_add_entry(NULL);
1956 menu_add_prompt(P_COMMENT, (yyvsp[(2) - (3)].string), NULL); 1818 menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL);
1957 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 1819 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
1958} 1820}
1821
1959 break; 1822 break;
1960 1823
1961 case 85: 1824 case 87:
1962 1825
1963 { 1826 {
1964 menu_end_entry(); 1827 menu_end_entry();
1965} 1828}
1829
1966 break; 1830 break;
1967 1831
1968 case 86: 1832 case 88:
1969 1833
1970 { 1834 {
1971 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); 1835 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
1972 zconf_starthelp(); 1836 zconf_starthelp();
1973} 1837}
1838
1974 break; 1839 break;
1975 1840
1976 case 87: 1841 case 89:
1977 1842
1978 { 1843 {
1979 current_entry->help = (yyvsp[(2) - (2)].string); 1844 current_entry->help = (yyvsp[0].string);
1980} 1845}
1846
1981 break; 1847 break;
1982 1848
1983 case 92: 1849 case 94:
1984 1850
1985 { 1851 {
1986 menu_add_dep((yyvsp[(3) - (4)].expr)); 1852 menu_add_dep((yyvsp[-1].expr));
1987 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); 1853 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
1988} 1854}
1989 break;
1990
1991 case 96:
1992 1855
1993 {
1994 menu_add_visibility((yyvsp[(2) - (2)].expr));
1995}
1996 break; 1856 break;
1997 1857
1998 case 98: 1858 case 98:
1999 1859
2000 { 1860 {
2001 menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr)); 1861 menu_add_visibility((yyvsp[0].expr));
2002} 1862}
2003 break;
2004 1863
2005 case 101:
2006
2007 { (yyval.id) = (yyvsp[(1) - (2)].id); }
2008 break; 1864 break;
2009 1865
2010 case 102: 1866 case 100:
1867
1868 {
1869 menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr));
1870}
2011 1871
2012 { (yyval.id) = (yyvsp[(1) - (2)].id); }
2013 break; 1872 break;
2014 1873
2015 case 103: 1874 case 103:
2016 1875
2017 { (yyval.id) = (yyvsp[(1) - (2)].id); } 1876 { (yyval.id) = (yyvsp[-1].id); }
1877
2018 break; 1878 break;
2019 1879
2020 case 106: 1880 case 104:
1881
1882 { (yyval.id) = (yyvsp[-1].id); }
2021 1883
2022 { (yyval.expr) = NULL; }
2023 break; 1884 break;
2024 1885
2025 case 107: 1886 case 105:
1887
1888 { (yyval.id) = (yyvsp[-1].id); }
2026 1889
2027 { (yyval.expr) = (yyvsp[(2) - (2)].expr); }
2028 break; 1890 break;
2029 1891
2030 case 108: 1892 case 108:
2031 1893
2032 { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); } 1894 { (yyval.expr) = NULL; }
1895
2033 break; 1896 break;
2034 1897
2035 case 109: 1898 case 109:
2036 1899
2037 { (yyval.expr) = expr_alloc_comp(E_LTH, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); } 1900 { (yyval.expr) = (yyvsp[0].expr); }
1901
2038 break; 1902 break;
2039 1903
2040 case 110: 1904 case 110:
2041 1905
2042 { (yyval.expr) = expr_alloc_comp(E_LEQ, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); } 1906 { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); }
1907
2043 break; 1908 break;
2044 1909
2045 case 111: 1910 case 111:
2046 1911
2047 { (yyval.expr) = expr_alloc_comp(E_GTH, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); } 1912 { (yyval.expr) = expr_alloc_comp(E_LTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1913
2048 break; 1914 break;
2049 1915
2050 case 112: 1916 case 112:
2051 1917
2052 { (yyval.expr) = expr_alloc_comp(E_GEQ, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); } 1918 { (yyval.expr) = expr_alloc_comp(E_LEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1919
2053 break; 1920 break;
2054 1921
2055 case 113: 1922 case 113:
2056 1923
2057 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); } 1924 { (yyval.expr) = expr_alloc_comp(E_GTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1925
2058 break; 1926 break;
2059 1927
2060 case 114: 1928 case 114:
2061 1929
2062 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); } 1930 { (yyval.expr) = expr_alloc_comp(E_GEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1931
2063 break; 1932 break;
2064 1933
2065 case 115: 1934 case 115:
2066 1935
2067 { (yyval.expr) = (yyvsp[(2) - (3)].expr); } 1936 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1937
2068 break; 1938 break;
2069 1939
2070 case 116: 1940 case 116:
2071 1941
2072 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); } 1942 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); }
1943
2073 break; 1944 break;
2074 1945
2075 case 117: 1946 case 117:
2076 1947
2077 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } 1948 { (yyval.expr) = (yyvsp[-1].expr); }
1949
2078 break; 1950 break;
2079 1951
2080 case 118: 1952 case 118:
2081 1953
2082 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } 1954 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); }
1955
2083 break; 1956 break;
2084 1957
2085 case 119: 1958 case 119:
2086 1959
2087 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); } 1960 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
1961
2088 break; 1962 break;
2089 1963
2090 case 120: 1964 case 120:
2091 1965
2092 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); } 1966 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
1967
2093 break; 1968 break;
2094 1969
2095 case 121: 1970 case 121:
2096 1971
1972 { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); }
1973
1974 break;
1975
1976 case 122:
1977
1978 { (yyval.symbol) = sym_lookup((yyvsp[0].string), SYMBOL_CONST); free((yyvsp[0].string)); }
1979
1980 break;
1981
1982 case 123:
1983
2097 { (yyval.string) = NULL; } 1984 { (yyval.string) = NULL; }
1985
2098 break; 1986 break;
2099 1987
2100 1988
@@ -2120,7 +2008,7 @@ yyreduce:
2120 2008
2121 *++yyvsp = yyval; 2009 *++yyvsp = yyval;
2122 2010
2123 /* Now `shift' the result of the reduction. Determine what state 2011 /* Now 'shift' the result of the reduction. Determine what state
2124 that goes to, based on the state we popped back to and the rule 2012 that goes to, based on the state we popped back to and the rule
2125 number reduced by. */ 2013 number reduced by. */
2126 2014
@@ -2135,9 +2023,9 @@ yyreduce:
2135 goto yynewstate; 2023 goto yynewstate;
2136 2024
2137 2025
2138/*------------------------------------. 2026/*--------------------------------------.
2139| yyerrlab -- here on detecting error | 2027| yyerrlab -- here on detecting error. |
2140`------------------------------------*/ 2028`--------------------------------------*/
2141yyerrlab: 2029yyerrlab:
2142 /* Make sure we have latest lookahead translation. See comments at 2030 /* Make sure we have latest lookahead translation. See comments at
2143 user semantic actions for why this is necessary. */ 2031 user semantic actions for why this is necessary. */
@@ -2188,20 +2076,20 @@ yyerrlab:
2188 if (yyerrstatus == 3) 2076 if (yyerrstatus == 3)
2189 { 2077 {
2190 /* If just tried and failed to reuse lookahead token after an 2078 /* If just tried and failed to reuse lookahead token after an
2191 error, discard it. */ 2079 error, discard it. */
2192 2080
2193 if (yychar <= YYEOF) 2081 if (yychar <= YYEOF)
2194 { 2082 {
2195 /* Return failure if at end of input. */ 2083 /* Return failure if at end of input. */
2196 if (yychar == YYEOF) 2084 if (yychar == YYEOF)
2197 YYABORT; 2085 YYABORT;
2198 } 2086 }
2199 else 2087 else
2200 { 2088 {
2201 yydestruct ("Error: discarding", 2089 yydestruct ("Error: discarding",
2202 yytoken, &yylval); 2090 yytoken, &yylval);
2203 yychar = YYEMPTY; 2091 yychar = YYEMPTY;
2204 } 2092 }
2205 } 2093 }
2206 2094
2207 /* Else will try to reuse lookahead token after shifting the error 2095 /* Else will try to reuse lookahead token after shifting the error
@@ -2220,7 +2108,7 @@ yyerrorlab:
2220 if (/*CONSTCOND*/ 0) 2108 if (/*CONSTCOND*/ 0)
2221 goto yyerrorlab; 2109 goto yyerrorlab;
2222 2110
2223 /* Do not reclaim the symbols of the rule which action triggered 2111 /* Do not reclaim the symbols of the rule whose action triggered
2224 this YYERROR. */ 2112 this YYERROR. */
2225 YYPOPSTACK (yylen); 2113 YYPOPSTACK (yylen);
2226 yylen = 0; 2114 yylen = 0;
@@ -2233,35 +2121,37 @@ yyerrorlab:
2233| yyerrlab1 -- common code for both syntax error and YYERROR. | 2121| yyerrlab1 -- common code for both syntax error and YYERROR. |
2234`-------------------------------------------------------------*/ 2122`-------------------------------------------------------------*/
2235yyerrlab1: 2123yyerrlab1:
2236 yyerrstatus = 3; /* Each real token shifted decrements this. */ 2124 yyerrstatus = 3; /* Each real token shifted decrements this. */
2237 2125
2238 for (;;) 2126 for (;;)
2239 { 2127 {
2240 yyn = yypact[yystate]; 2128 yyn = yypact[yystate];
2241 if (!yypact_value_is_default (yyn)) 2129 if (!yypact_value_is_default (yyn))
2242 { 2130 {
2243 yyn += YYTERROR; 2131 yyn += YYTERROR;
2244 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 2132 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2245 { 2133 {
2246 yyn = yytable[yyn]; 2134 yyn = yytable[yyn];
2247 if (0 < yyn) 2135 if (0 < yyn)
2248 break; 2136 break;
2249 } 2137 }
2250 } 2138 }
2251 2139
2252 /* Pop the current state because it cannot handle the error token. */ 2140 /* Pop the current state because it cannot handle the error token. */
2253 if (yyssp == yyss) 2141 if (yyssp == yyss)
2254 YYABORT; 2142 YYABORT;
2255 2143
2256 2144
2257 yydestruct ("Error: popping", 2145 yydestruct ("Error: popping",
2258 yystos[yystate], yyvsp); 2146 yystos[yystate], yyvsp);
2259 YYPOPSTACK (1); 2147 YYPOPSTACK (1);
2260 yystate = *yyssp; 2148 yystate = *yyssp;
2261 YY_STACK_PRINT (yyss, yyssp); 2149 YY_STACK_PRINT (yyss, yyssp);
2262 } 2150 }
2263 2151
2152 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2264 *++yyvsp = yylval; 2153 *++yyvsp = yylval;
2154 YY_IGNORE_MAYBE_UNINITIALIZED_END
2265 2155
2266 2156
2267 /* Shift the error token. */ 2157 /* Shift the error token. */
@@ -2304,14 +2194,14 @@ yyreturn:
2304 yydestruct ("Cleanup: discarding lookahead", 2194 yydestruct ("Cleanup: discarding lookahead",
2305 yytoken, &yylval); 2195 yytoken, &yylval);
2306 } 2196 }
2307 /* Do not reclaim the symbols of the rule which action triggered 2197 /* Do not reclaim the symbols of the rule whose action triggered
2308 this YYABORT or YYACCEPT. */ 2198 this YYABORT or YYACCEPT. */
2309 YYPOPSTACK (yylen); 2199 YYPOPSTACK (yylen);
2310 YY_STACK_PRINT (yyss, yyssp); 2200 YY_STACK_PRINT (yyss, yyssp);
2311 while (yyssp != yyss) 2201 while (yyssp != yyss)
2312 { 2202 {
2313 yydestruct ("Cleanup: popping", 2203 yydestruct ("Cleanup: popping",
2314 yystos[*yyssp], yyvsp); 2204 yystos[*yyssp], yyvsp);
2315 YYPOPSTACK (1); 2205 YYPOPSTACK (1);
2316 } 2206 }
2317#ifndef yyoverflow 2207#ifndef yyoverflow
@@ -2322,14 +2212,11 @@ yyreturn:
2322 if (yymsg != yymsgbuf) 2212 if (yymsg != yymsgbuf)
2323 YYSTACK_FREE (yymsg); 2213 YYSTACK_FREE (yymsg);
2324#endif 2214#endif
2325 /* Make sure YYID is used. */ 2215 return yyresult;
2326 return YYID (yyresult);
2327} 2216}
2328 2217
2329 2218
2330 2219
2331
2332
2333void conf_parse(const char *name) 2220void conf_parse(const char *name)
2334{ 2221{
2335 struct symbol *sym; 2222 struct symbol *sym;
@@ -2501,6 +2388,11 @@ static void print_symbol(FILE *out, struct menu *menu)
2501 expr_fprint(prop->expr, out); 2388 expr_fprint(prop->expr, out);
2502 fputc('\n', out); 2389 fputc('\n', out);
2503 break; 2390 break;
2391 case P_IMPLY:
2392 fputs( " imply ", out);
2393 expr_fprint(prop->expr, out);
2394 fputc('\n', out);
2395 break;
2504 case P_RANGE: 2396 case P_RANGE:
2505 fputs( " range ", out); 2397 fputs( " range ", out);
2506 expr_fprint(prop->expr, out); 2398 expr_fprint(prop->expr, out);
@@ -2577,4 +2469,3 @@ void zconfdump(FILE *out)
2577#include "expr.c" 2469#include "expr.c"
2578#include "symbol.c" 2470#include "symbol.c"
2579#include "menu.c" 2471#include "menu.c"
2580
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 71bf8bff696a..001305fa080b 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -31,7 +31,7 @@ struct symbol *symbol_hash[SYMBOL_HASHSIZE];
31static struct menu *current_menu, *current_entry; 31static struct menu *current_menu, *current_entry;
32 32
33%} 33%}
34%expect 30 34%expect 32
35 35
36%union 36%union
37{ 37{
@@ -62,6 +62,7 @@ static struct menu *current_menu, *current_entry;
62%token <id>T_TYPE 62%token <id>T_TYPE
63%token <id>T_DEFAULT 63%token <id>T_DEFAULT
64%token <id>T_SELECT 64%token <id>T_SELECT
65%token <id>T_IMPLY
65%token <id>T_RANGE 66%token <id>T_RANGE
66%token <id>T_VISIBLE 67%token <id>T_VISIBLE
67%token <id>T_OPTION 68%token <id>T_OPTION
@@ -124,7 +125,7 @@ stmt_list:
124; 125;
125 126
126option_name: 127option_name:
127 T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE 128 T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_IMPLY | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE
128; 129;
129 130
130common_stmt: 131common_stmt:
@@ -216,6 +217,12 @@ config_option: T_SELECT T_WORD if_expr T_EOL
216 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); 217 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
217}; 218};
218 219
220config_option: T_IMPLY T_WORD if_expr T_EOL
221{
222 menu_add_symbol(P_IMPLY, sym_lookup($2, 0), $3);
223 printd(DEBUG_PARSE, "%s:%d:imply\n", zconf_curname(), zconf_lineno());
224};
225
219config_option: T_RANGE symbol symbol if_expr T_EOL 226config_option: T_RANGE symbol symbol if_expr T_EOL
220{ 227{
221 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); 228 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4);
@@ -664,6 +671,11 @@ static void print_symbol(FILE *out, struct menu *menu)
664 expr_fprint(prop->expr, out); 671 expr_fprint(prop->expr, out);
665 fputc('\n', out); 672 fputc('\n', out);
666 break; 673 break;
674 case P_IMPLY:
675 fputs( " imply ", out);
676 expr_fprint(prop->expr, out);
677 fputc('\n', out);
678 break;
667 case P_RANGE: 679 case P_RANGE:
668 fputs( " range ", out); 680 fputs( " range ", out);
669 expr_fprint(prop->expr, out); 681 expr_fprint(prop->expr, out);
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index f742c65108b9..c80291319cb2 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -209,15 +209,6 @@ case "${KCONFIG_CONFIG}" in
209 . "./${KCONFIG_CONFIG}" 209 . "./${KCONFIG_CONFIG}"
210esac 210esac
211 211
212archive_builtin
213
214#link vmlinux.o
215info LD vmlinux.o
216modpost_link vmlinux.o
217
218# modpost vmlinux.o to check for section mismatches
219${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o
220
221# Update version 212# Update version
222info GEN .version 213info GEN .version
223if [ ! -r .version ]; then 214if [ ! -r .version ]; then
@@ -231,6 +222,15 @@ fi;
231# final build of init/ 222# final build of init/
232${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}" 223${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}"
233 224
225archive_builtin
226
227#link vmlinux.o
228info LD vmlinux.o
229modpost_link vmlinux.o
230
231# modpost vmlinux.o to check for section mismatches
232${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o
233
234kallsymso="" 234kallsymso=""
235kallsyms_vmlinux="" 235kallsyms_vmlinux=""
236if [ -n "${CONFIG_KALLSYMS}" ]; then 236if [ -n "${CONFIG_KALLSYMS}" ]; then
@@ -246,10 +246,14 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then
246 # the right size, but due to the added section, some 246 # the right size, but due to the added section, some
247 # addresses have shifted. 247 # addresses have shifted.
248 # From here, we generate a correct .tmp_kallsyms2.o 248 # From here, we generate a correct .tmp_kallsyms2.o
249 # 2a) We may use an extra pass as this has been necessary to 249 # 3) That link may have expanded the kernel image enough that
250 # woraround some alignment related bugs. 250 # more linker branch stubs / trampolines had to be added, which
251 # KALLSYMS_EXTRA_PASS=1 is used to trigger this. 251 # introduces new names, which further expands kallsyms. Do another
252 # 3) The correct ${kallsymso} is linked into the final vmlinux. 252 # pass if that is the case. In theory it's possible this results
253 # in even more stubs, but unlikely.
254 # KALLSYMS_EXTRA_PASS=1 may also used to debug or work around
255 # other bugs.
256 # 4) The correct ${kallsymso} is linked into the final vmlinux.
253 # 257 #
254 # a) Verify that the System.map from vmlinux matches the map from 258 # a) Verify that the System.map from vmlinux matches the map from
255 # ${kallsymso}. 259 # ${kallsymso}.
@@ -265,8 +269,11 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then
265 vmlinux_link .tmp_kallsyms1.o .tmp_vmlinux2 269 vmlinux_link .tmp_kallsyms1.o .tmp_vmlinux2
266 kallsyms .tmp_vmlinux2 .tmp_kallsyms2.o 270 kallsyms .tmp_vmlinux2 .tmp_kallsyms2.o
267 271
268 # step 2a 272 # step 3
269 if [ -n "${KALLSYMS_EXTRA_PASS}" ]; then 273 size1=$(stat -c "%s" .tmp_kallsyms1.o)
274 size2=$(stat -c "%s" .tmp_kallsyms2.o)
275
276 if [ $size1 -ne $size2 ] || [ -n "${KALLSYMS_EXTRA_PASS}" ]; then
270 kallsymso=.tmp_kallsyms3.o 277 kallsymso=.tmp_kallsyms3.o
271 kallsyms_vmlinux=.tmp_vmlinux3 278 kallsyms_vmlinux=.tmp_vmlinux3
272 279
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index bd8349759095..29c89a6bad3d 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -609,6 +609,7 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
609{ 609{
610 unsigned int crc; 610 unsigned int crc;
611 enum export export; 611 enum export export;
612 bool is_crc = false;
612 613
613 if ((!is_vmlinux(mod->name) || mod->is_dot_o) && 614 if ((!is_vmlinux(mod->name) || mod->is_dot_o) &&
614 strncmp(symname, "__ksymtab", 9) == 0) 615 strncmp(symname, "__ksymtab", 9) == 0)
@@ -618,6 +619,7 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
618 619
619 /* CRC'd symbol */ 620 /* CRC'd symbol */
620 if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { 621 if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
622 is_crc = true;
621 crc = (unsigned int) sym->st_value; 623 crc = (unsigned int) sym->st_value;
622 sym_update_crc(symname + strlen(CRC_PFX), mod, crc, 624 sym_update_crc(symname + strlen(CRC_PFX), mod, crc,
623 export); 625 export);
@@ -663,6 +665,10 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
663 else 665 else
664 symname++; 666 symname++;
665#endif 667#endif
668 if (is_crc) {
669 const char *e = is_vmlinux(mod->name) ?"":".ko";
670 warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n", symname + strlen(CRC_PFX), mod->name, e);
671 }
666 mod->unres = alloc_symbol(symname, 672 mod->unres = alloc_symbol(symname,
667 ELF_ST_BIND(sym->st_info) == STB_WEAK, 673 ELF_ST_BIND(sym->st_info) == STB_WEAK,
668 mod->unres); 674 mod->unres);
@@ -2371,6 +2377,7 @@ static void write_dump(const char *fname)
2371 } 2377 }
2372 } 2378 }
2373 write_if_changed(&buf, fname); 2379 write_if_changed(&buf, fname);
2380 free(buf.p);
2374} 2381}
2375 2382
2376struct ext_sym_list { 2383struct ext_sym_list {
@@ -2496,6 +2503,7 @@ int main(int argc, char **argv)
2496 "Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n"); 2503 "Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n");
2497 } 2504 }
2498 } 2505 }
2506 free(buf.p);
2499 2507
2500 return err; 2508 return err;
2501} 2509}
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 8ea9fd2b6573..3c575cd07888 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -51,7 +51,7 @@ set_debarch() {
51 debarch=hppa ;; 51 debarch=hppa ;;
52 mips*) 52 mips*)
53 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;; 53 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
54 arm64) 54 aarch64|arm64)
55 debarch=arm64 ;; 55 debarch=arm64 ;;
56 arm*) 56 arm*)
57 if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then 57 if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 57673bae5597..bb43f153fd8e 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -116,7 +116,8 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
116echo "%endif" 116echo "%endif"
117 117
118if ! $PREBUILT; then 118if ! $PREBUILT; then
119echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}" 119echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/build"
120echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/source"
120echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" 121echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
121echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\"" 122echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\""
122echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)" 123echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index 5423a58d1b06..aeb34223167c 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -213,6 +213,59 @@ static int make_nop_x86(void *map, size_t const offset)
213 return 0; 213 return 0;
214} 214}
215 215
216static unsigned char ideal_nop4_arm_le[4] = { 0x00, 0x00, 0xa0, 0xe1 }; /* mov r0, r0 */
217static unsigned char ideal_nop4_arm_be[4] = { 0xe1, 0xa0, 0x00, 0x00 }; /* mov r0, r0 */
218static unsigned char *ideal_nop4_arm;
219
220static unsigned char bl_mcount_arm_le[4] = { 0xfe, 0xff, 0xff, 0xeb }; /* bl */
221static unsigned char bl_mcount_arm_be[4] = { 0xeb, 0xff, 0xff, 0xfe }; /* bl */
222static unsigned char *bl_mcount_arm;
223
224static unsigned char push_arm_le[4] = { 0x04, 0xe0, 0x2d, 0xe5 }; /* push {lr} */
225static unsigned char push_arm_be[4] = { 0xe5, 0x2d, 0xe0, 0x04 }; /* push {lr} */
226static unsigned char *push_arm;
227
228static unsigned char ideal_nop2_thumb_le[2] = { 0x00, 0xbf }; /* nop */
229static unsigned char ideal_nop2_thumb_be[2] = { 0xbf, 0x00 }; /* nop */
230static unsigned char *ideal_nop2_thumb;
231
232static unsigned char push_bl_mcount_thumb_le[6] = { 0x00, 0xb5, 0xff, 0xf7, 0xfe, 0xff }; /* push {lr}, bl */
233static unsigned char push_bl_mcount_thumb_be[6] = { 0xb5, 0x00, 0xf7, 0xff, 0xff, 0xfe }; /* push {lr}, bl */
234static unsigned char *push_bl_mcount_thumb;
235
236static int make_nop_arm(void *map, size_t const offset)
237{
238 char *ptr;
239 int cnt = 1;
240 int nop_size;
241 size_t off = offset;
242
243 ptr = map + offset;
244 if (memcmp(ptr, bl_mcount_arm, 4) == 0) {
245 if (memcmp(ptr - 4, push_arm, 4) == 0) {
246 off -= 4;
247 cnt = 2;
248 }
249 ideal_nop = ideal_nop4_arm;
250 nop_size = 4;
251 } else if (memcmp(ptr - 2, push_bl_mcount_thumb, 6) == 0) {
252 cnt = 3;
253 nop_size = 2;
254 off -= 2;
255 ideal_nop = ideal_nop2_thumb;
256 } else
257 return -1;
258
259 /* Convert to nop */
260 ulseek(fd_map, off, SEEK_SET);
261
262 do {
263 uwrite(fd_map, ideal_nop, nop_size);
264 } while (--cnt > 0);
265
266 return 0;
267}
268
216static unsigned char ideal_nop4_arm64[4] = {0x1f, 0x20, 0x03, 0xd5}; 269static unsigned char ideal_nop4_arm64[4] = {0x1f, 0x20, 0x03, 0xd5};
217static int make_nop_arm64(void *map, size_t const offset) 270static int make_nop_arm64(void *map, size_t const offset)
218{ 271{
@@ -430,6 +483,11 @@ do_file(char const *const fname)
430 w2 = w2rev; 483 w2 = w2rev;
431 w8 = w8rev; 484 w8 = w8rev;
432 } 485 }
486 ideal_nop4_arm = ideal_nop4_arm_le;
487 bl_mcount_arm = bl_mcount_arm_le;
488 push_arm = push_arm_le;
489 ideal_nop2_thumb = ideal_nop2_thumb_le;
490 push_bl_mcount_thumb = push_bl_mcount_thumb_le;
433 break; 491 break;
434 case ELFDATA2MSB: 492 case ELFDATA2MSB:
435 if (*(unsigned char const *)&endian != 0) { 493 if (*(unsigned char const *)&endian != 0) {
@@ -438,6 +496,11 @@ do_file(char const *const fname)
438 w2 = w2rev; 496 w2 = w2rev;
439 w8 = w8rev; 497 w8 = w8rev;
440 } 498 }
499 ideal_nop4_arm = ideal_nop4_arm_be;
500 bl_mcount_arm = bl_mcount_arm_be;
501 push_arm = push_arm_be;
502 ideal_nop2_thumb = ideal_nop2_thumb_be;
503 push_bl_mcount_thumb = push_bl_mcount_thumb_be;
441 break; 504 break;
442 } /* end switch */ 505 } /* end switch */
443 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 506 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0
@@ -463,6 +526,8 @@ do_file(char const *const fname)
463 break; 526 break;
464 case EM_ARM: reltype = R_ARM_ABS32; 527 case EM_ARM: reltype = R_ARM_ABS32;
465 altmcount = "__gnu_mcount_nc"; 528 altmcount = "__gnu_mcount_nc";
529 make_nop = make_nop_arm;
530 rel_type_nop = R_ARM_NONE;
466 break; 531 break;
467 case EM_AARCH64: 532 case EM_AARCH64:
468 reltype = R_AARCH64_ABS64; 533 reltype = R_AARCH64_ABS64;
diff --git a/scripts/selinux/genheaders/Makefile b/scripts/selinux/genheaders/Makefile
index 1d1ac51359e3..6fc2b8789a0b 100644
--- a/scripts/selinux/genheaders/Makefile
+++ b/scripts/selinux/genheaders/Makefile
@@ -1,4 +1,6 @@
1hostprogs-y := genheaders 1hostprogs-y := genheaders
2HOST_EXTRACFLAGS += -Isecurity/selinux/include 2HOST_EXTRACFLAGS += \
3 -I$(srctree)/include/uapi -I$(srctree)/include \
4 -I$(srctree)/security/selinux/include
3 5
4always := $(hostprogs-y) 6always := $(hostprogs-y)
diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c
index 539855ff31f9..f4dd41f900d5 100644
--- a/scripts/selinux/genheaders/genheaders.c
+++ b/scripts/selinux/genheaders/genheaders.c
@@ -1,3 +1,7 @@
1
2/* NOTE: we really do want to use the kernel headers here */
3#define __EXPORTED_HEADERS__
4
1#include <stdio.h> 5#include <stdio.h>
2#include <stdlib.h> 6#include <stdlib.h>
3#include <unistd.h> 7#include <unistd.h>
diff --git a/scripts/selinux/mdp/Makefile b/scripts/selinux/mdp/Makefile
index dba7eff69a00..d6a83cafe59f 100644
--- a/scripts/selinux/mdp/Makefile
+++ b/scripts/selinux/mdp/Makefile
@@ -1,5 +1,7 @@
1hostprogs-y := mdp 1hostprogs-y := mdp
2HOST_EXTRACFLAGS += -Isecurity/selinux/include 2HOST_EXTRACFLAGS += \
3 -I$(srctree)/include/uapi -I$(srctree)/include \
4 -I$(srctree)/security/selinux/include
3 5
4always := $(hostprogs-y) 6always := $(hostprogs-y)
5clean-files := policy.* file_contexts 7clean-files := policy.* file_contexts
diff --git a/scripts/selinux/mdp/mdp.c b/scripts/selinux/mdp/mdp.c
index e10beb11b696..c29fa4a6228d 100644
--- a/scripts/selinux/mdp/mdp.c
+++ b/scripts/selinux/mdp/mdp.c
@@ -24,6 +24,10 @@
24 * Authors: Serge E. Hallyn <serue@us.ibm.com> 24 * Authors: Serge E. Hallyn <serue@us.ibm.com>
25 */ 25 */
26 26
27
28/* NOTE: we really do want to use the kernel headers here */
29#define __EXPORTED_HEADERS__
30
27#include <stdio.h> 31#include <stdio.h>
28#include <stdlib.h> 32#include <stdlib.h>
29#include <unistd.h> 33#include <unistd.h>
diff --git a/scripts/sign-file.c b/scripts/sign-file.c
index 53af6dc3e6c1..19ec468b1168 100755..100644
--- a/scripts/sign-file.c
+++ b/scripts/sign-file.c
@@ -267,7 +267,7 @@ int main(int argc, char **argv)
267 } 267 }
268 x509_name = argv[2]; 268 x509_name = argv[2];
269 module_name = argv[3]; 269 module_name = argv[3];
270 if (argc == 5) { 270 if (argc == 5 && strcmp(argv[3], argv[4]) != 0) {
271 dest_name = argv[4]; 271 dest_name = argv[4];
272 replace_orig = false; 272 replace_orig = false;
273 } else { 273 } else {
diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index f453b7ce99d6..365a907f98b3 100644
--- a/scripts/sortextable.c
+++ b/scripts/sortextable.c
@@ -316,6 +316,8 @@ do_file(char const *const fname)
316 case EM_S390: 316 case EM_S390:
317 case EM_AARCH64: 317 case EM_AARCH64:
318 case EM_PARISC: 318 case EM_PARISC:
319 case EM_PPC:
320 case EM_PPC64:
319 custom_sort = sort_relative_table; 321 custom_sort = sort_relative_table;
320 break; 322 break;
321 case EM_ARCOMPACT: 323 case EM_ARCOMPACT:
diff --git a/scripts/tags.sh b/scripts/tags.sh
index a2ff3388e5ea..df5fa777d300 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -304,11 +304,26 @@ if [ "${ARCH}" = "um" ]; then
304elif [ "${SRCARCH}" = "arm" -a "${SUBARCH}" != "" ]; then 304elif [ "${SRCARCH}" = "arm" -a "${SUBARCH}" != "" ]; then
305 subarchdir=$(find ${tree}arch/$SRCARCH/ -name "mach-*" -type d -o \ 305 subarchdir=$(find ${tree}arch/$SRCARCH/ -name "mach-*" -type d -o \
306 -name "plat-*" -type d); 306 -name "plat-*" -type d);
307 mach_suffix=$SUBARCH
308 plat_suffix=$SUBARCH
309
310 # Special cases when $plat_suffix != $mach_suffix
311 case $mach_suffix in
312 "omap1" | "omap2")
313 plat_suffix="omap"
314 ;;
315 esac
316
317 if [ ! -d ${tree}arch/$SRCARCH/mach-$mach_suffix ]; then
318 echo "Warning: arch/arm/mach-$mach_suffix/ not found." >&2
319 echo " Fix your \$SUBARCH appropriately" >&2
320 fi
321
307 for i in $subarchdir; do 322 for i in $subarchdir; do
308 case "$i" in 323 case "$i" in
309 *"mach-"${SUBARCH}) 324 *"mach-"${mach_suffix})
310 ;; 325 ;;
311 *"plat-"${SUBARCH}) 326 *"plat-"${plat_suffix})
312 ;; 327 ;;
313 *) 328 *)
314 subarchprune="$subarchprune \ 329 subarchprune="$subarchprune \