aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/ael
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-15 19:21:27 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-15 19:21:27 +0000
commite897b4499e9719aea235ebe6e67c18183e043dea (patch)
tree85730165ce45a65a5e7bfcc9fceab9626317e49d /pbx/ael
parent46d935c8ca1dd16a67f246814417c3bf1ae2ebb6 (diff)
This commit closes bug 7605, and half-closes 7638. The AEL code has been redistributed/repartitioned to allow code re-use both inside and outside of Asterisk. This commit introduces the utils/conf2ael program, and an external config-file reader, for both normal config files, and for extensions.conf (context, exten, prio); It provides an API for programs outside of asterisk to use to play with the dialplan and config files.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79595 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/ael')
-rw-r--r--pbx/ael/ael-test/ref.ael-ntest1059
-rw-r--r--pbx/ael/ael-test/ref.ael-test130
-rw-r--r--pbx/ael/ael-test/ref.ael-test1120
-rw-r--r--pbx/ael/ael-test/ref.ael-test1416
-rw-r--r--pbx/ael/ael-test/ref.ael-test1518
-rw-r--r--pbx/ael/ael-test/ref.ael-test1618
-rw-r--r--pbx/ael/ael-test/ref.ael-test1927
-rw-r--r--pbx/ael/ael-test/ref.ael-test246
-rw-r--r--pbx/ael/ael-test/ref.ael-test3180
-rw-r--r--pbx/ael/ael-test/ref.ael-test446
-rw-r--r--pbx/ael/ael-test/ref.ael-test522
-rw-r--r--pbx/ael/ael-test/ref.ael-test626
-rw-r--r--pbx/ael/ael-test/ref.ael-test741
-rw-r--r--pbx/ael/ael.flex595
-rw-r--r--pbx/ael/ael.tab.c3386
-rw-r--r--pbx/ael/ael.tab.h152
-rw-r--r--pbx/ael/ael.y832
-rw-r--r--pbx/ael/ael_lex.c3029
18 files changed, 285 insertions, 8258 deletions
diff --git a/pbx/ael/ael-test/ref.ael-ntest10 b/pbx/ael/ael-test/ref.ael-ntest10
index 3ecc171c5..02024ee46 100644
--- a/pbx/ael/ael-test/ref.ael-ntest10
+++ b/pbx/ael/ael-test/ref.ael-ntest10
@@ -5,27 +5,36 @@
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4092 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4099 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4107 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1-4: The macro endsess does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 6-9: The macro nullchk does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 11-26: The macro endcall does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 13-13: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 28-44: The macro endcall2 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 36-36: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 46-68: The macro endcall3 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 48-48: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 60-60: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 70-96: The macro endcall4 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 72-72: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 84-84: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 87-87: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 98-131: The macro endcall5 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 106-106: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 119-119: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 122-122: A default case was automatically added to the switch.
-LOG: lev:2 file:pbx_ael.c line:4110 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1-4: The macro endsess does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 6-9: The macro nullchk does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 11-26: The macro endcall does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 13-13: A default case was automatically added to the switch.
+LOG: lev:3 file:extconf.c line:3959 func: add_pri Unable to register extension '_', priority 1 in 'test6', already in use
+LOG: lev:3 file:extconf.c line:3959 func: add_pri Unable to register extension '_X.', priority 1 in 'test6', already in use
+=== Loading extensions.conf ===
+Context: test6
+Context: test5
+Context: macro-funcA
+Context: macro-funcB
+Context: macro-funcC
+=========
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 28-44: The macro endcall2 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 36-36: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 46-68: The macro endcall3 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 48-48: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 60-60: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 70-96: The macro endcall4 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 72-72: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 84-84: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 87-87: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 98-131: The macro endcall5 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 106-106: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 119-119: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 122-122: A default case was automatically added to the switch.
+LOG: lev:2 file:pbx_ael.c line:1698 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
Executed ast_context_create(conts, name=endsess, registrar=pbx_ael);
Executed ast_context_create(conts, name=nullchk, registrar=pbx_ael);
Executed ast_context_create(conts, name=endcall, registrar=pbx_ael);
@@ -154,9 +163,9 @@ Executed ast_add_extension2(context=endcall5, rep=0, exten=sw-16-out, priority=1
Executed ast_add_extension2(context=endcall5, rep=0, exten=sw-16-out, priority=13, label=(null), callerid=(null), appl=Goto, data=sw-21-in,ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(context=endcall5, rep=0, exten=sw-16-out, priority=14, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall5-out-16-17, FREE, registrar=pbx_ael);
Executed ast_add_extension2(context=endcall5, rep=0, exten=sw-16-out, priority=15, label=(null), callerid=(null), appl=Goto, data=sw-16-in,10, FREE, registrar=pbx_ael);
-LOG: lev:2 file:pbx_ael.c line:4112 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1700 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
Executed ast_merge_contexts_and_delete();
-LOG: lev:2 file:pbx_ael.c line:4115 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1703 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
Executed ast_walk_contexts();
-LOG: lev:2 file:pbx_ael.c line:4118 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse line:522 func: main 7 contexts, 27 extensions, 121 priorities
+LOG: lev:2 file:pbx_ael.c line:1706 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:521 func: main 7 contexts, 27 extensions, 121 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test1 b/pbx/ael/ael-test/ref.ael-test1
index 5ef73ab38..92b2c6b6b 100644
--- a/pbx/ael/ael-test/ref.ael-test1
+++ b/pbx/ael/ael-test/ref.ael-test1
@@ -2,18 +2,18 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4092 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4099 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4107 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 2-16: The macro testdial does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 18-25: The macro exten-gen does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:1408 func: check_goto Warning: file ./extensions.ael, line 21-21: It's bad form to have a goto in a macro to a target outside the macro!
-LOG: lev:3 file:pbx_ael.c line:1408 func: check_goto Warning: file ./extensions.ael, line 23-23: It's bad form to have a goto in a macro to a target outside the macro!
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 58-58: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:989 func: check_dow Warning: file ./extensions.ael, line 67-67: The day (m0n) must be one of 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', or 'sat'!
-LOG: lev:3 file:pbx_ael.c line:947 func: check_timerange Warning: file ./extensions.ael, line 78-78: The end time (25:00) is out of range!
-LOG: lev:2 file:pbx_ael.c line:4110 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4112 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4115 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4118 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse line:522 func: main 5 contexts, 14 extensions, 155 priorities
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 2-16: The macro testdial does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 18-25: The macro exten-gen does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:1358 func: check_goto Warning: file ./extensions.ael, line 21-21: It's bad form to have a goto in a macro to a target outside the macro!
+LOG: lev:3 file:pval.c line:1358 func: check_goto Warning: file ./extensions.ael, line 23-23: It's bad form to have a goto in a macro to a target outside the macro!
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 58-58: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:918 func: check_dow Warning: file ./extensions.ael, line 67-67: The day (m0n) must be one of 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', or 'sat'!
+LOG: lev:3 file:pval.c line:876 func: check_timerange Warning: file ./extensions.ael, line 78-78: The end time (25:00) is out of range!
+LOG: lev:2 file:pbx_ael.c line:1698 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1700 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1703 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1706 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:521 func: main 5 contexts, 14 extensions, 155 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test11 b/pbx/ael/ael-test/ref.ael-test11
index 7211c2b69..6f1e062e4 100644
--- a/pbx/ael/ael-test/ref.ael-test11
+++ b/pbx/ael/ael-test/ref.ael-test11
@@ -2,13 +2,13 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4092 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4099 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4107 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:4 file:pbx_ael.c line:1214 func: check_label Error: file ./extensions.ael, line 13-13: Duplicate label lab1! Previously defined at file ./extensions.ael, line 8.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 32-32: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 44-44: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 47-47: A default case was automatically added to the switch.
-LOG: lev:4 file:pbx_ael.c line:1214 func: check_label Error: file ./extensions.ael, line 49-49: Duplicate label ptr1! Previously defined at file ./extensions.ael, line 33.
-LOG: lev:4 file:pbx_ael.c line:4120 func: pbx_load_module Sorry, but 0 syntax errors and 2 semantic errors were detected. It doesn't make sense to compile.
-LOG: lev:4 file:ael2_parse line:522 func: main 0 contexts, 0 extensions, 0 priorities
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:4 file:pval.c line:1143 func: check_label Error: file ./extensions.ael, line 13-13: Duplicate label lab1! Previously defined at file ./extensions.ael, line 8.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 32-32: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 44-44: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 47-47: A default case was automatically added to the switch.
+LOG: lev:4 file:pval.c line:1143 func: check_label Error: file ./extensions.ael, line 49-49: Duplicate label ptr1! Previously defined at file ./extensions.ael, line 33.
+LOG: lev:4 file:pbx_ael.c line:1708 func: pbx_load_module Sorry, but 0 syntax errors and 2 semantic errors were detected. It doesn't make sense to compile.
+LOG: lev:4 file:ael2_parse line:521 func: main 0 contexts, 0 extensions, 0 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test14 b/pbx/ael/ael-test/ref.ael-test14
index 2c51ae79f..6c0d3770a 100644
--- a/pbx/ael/ael-test/ref.ael-test14
+++ b/pbx/ael/ael-test/ref.ael-test14
@@ -2,11 +2,11 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4092 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4099 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4107 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 13-13: A default case was automatically added to the switch.
-LOG: lev:4 file:pbx_ael.c line:1138 func: check_continue Error: file ./extensions.ael, line 15-15: 'continue' not in 'for' or 'while' statement!
-LOG: lev:4 file:pbx_ael.c line:1119 func: check_break Error: file ./extensions.ael, line 17-17: 'break' not in switch, for, or while statement!
-LOG: lev:4 file:pbx_ael.c line:4120 func: pbx_load_module Sorry, but 0 syntax errors and 2 semantic errors were detected. It doesn't make sense to compile.
-LOG: lev:4 file:ael2_parse line:522 func: main 0 contexts, 0 extensions, 0 priorities
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 13-13: A default case was automatically added to the switch.
+LOG: lev:4 file:pval.c line:1067 func: check_continue Error: file ./extensions.ael, line 15-15: 'continue' not in 'for' or 'while' statement!
+LOG: lev:4 file:pval.c line:1048 func: check_break Error: file ./extensions.ael, line 17-17: 'break' not in switch, for, or while statement!
+LOG: lev:4 file:pbx_ael.c line:1708 func: pbx_load_module Sorry, but 0 syntax errors and 2 semantic errors were detected. It doesn't make sense to compile.
+LOG: lev:4 file:ael2_parse line:521 func: main 0 contexts, 0 extensions, 0 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test15 b/pbx/ael/ael-test/ref.ael-test15
index 2240d269b..892e51649 100644
--- a/pbx/ael/ael-test/ref.ael-test15
+++ b/pbx/ael/ael-test/ref.ael-test15
@@ -2,12 +2,12 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:3910 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:3917 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3925 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3928 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:3813 func: ast_compile_ael2 Warning: file ./extensions.ael, line 8-13: Empty Extension!
-LOG: lev:2 file:pbx_ael.c line:3930 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3933 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3936 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse line:479 func: main 1 contexts, 0 extensions, 0 priorities
+LOG: lev:2 file:pbx_ael.c line:113 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:120 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:128 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:131 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:3905 func: ast_compile_ael2 Warning: file ./extensions.ael, line 8-13: Empty Extension!
+LOG: lev:2 file:pbx_ael.c line:133 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:136 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:139 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:499 func: main 1 contexts, 0 extensions, 0 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test16 b/pbx/ael/ael-test/ref.ael-test16
index 323a726c4..ffa926009 100644
--- a/pbx/ael/ael-test/ref.ael-test16
+++ b/pbx/ael/ael-test/ref.ael-test16
@@ -2,13 +2,13 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:3914 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:3921 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:113 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:120 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:3 file:ael.y line:205 func: ael_yyparse ==== File: ./extensions.ael, Line 1, Cols: 19-19: Warning! The empty context real-small will be IGNORED!
-LOG: lev:2 file:pbx_ael.c line:3929 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3932 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:3545 func: add_extensions This file is Empty!
-LOG: lev:2 file:pbx_ael.c line:3934 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3937 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3940 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse line:479 func: main 0 contexts, 0 extensions, 0 priorities
+LOG: lev:2 file:pbx_ael.c line:128 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:131 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:3633 func: add_extensions This file is Empty!
+LOG: lev:2 file:pbx_ael.c line:133 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:136 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:139 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:499 func: main 0 contexts, 0 extensions, 0 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test19 b/pbx/ael/ael-test/ref.ael-test19
index 7ff3fd4e1..a283b2db9 100644
--- a/pbx/ael/ael-test/ref.ael-test19
+++ b/pbx/ael/ael-test/ref.ael-test19
@@ -2,15 +2,18 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4092 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4099 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4107 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:4 file:pbx_ael.c line:2372 func: check_context_names Error: file ./extensions.ael, line 49-62: The context name (incoming) is also declared in file ./extensions.ael, line 62-69!
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 71-175: The macro std-priv-exten does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:2356 func: check_switch_expr Warning: file ./extensions.ael, line 245-246: A default case was automatically added to the switch.
-LOG: lev:3 file:pbx_ael.c line:2472 func: check_pval_item Warning: file ./extensions.ael, line 312-312: macro call to non-existent funcA ! Hopefully it is present in extensions.conf!
-LOG: lev:3 file:pbx_ael.c line:2472 func: check_pval_item Warning: file ./extensions.ael, line 313-313: macro call to non-existent funcD ! Hopefully it is present in extensions.conf!
-LOG: lev:3 file:pbx_ael.c line:1398 func: check_goto Warning: file ./extensions.ael, line 319-319: goto: no context test5 could be found that matches the goto target!
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 363-366: The macro dialoutpstn does not end with a return; I will insert one.
-LOG: lev:4 file:pbx_ael.c line:4120 func: pbx_load_module Sorry, but 0 syntax errors and 1 semantic errors were detected. It doesn't make sense to compile.
-LOG: lev:4 file:ael2_parse line:522 func: main 0 contexts, 0 extensions, 0 priorities
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:2296 func: check_context_names Warning: file ./extensions.ael, line 49-62: The context name (incoming) is also declared in file ./extensions.ael, line 62-69!
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 71-175: The macro std-priv-exten does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:2280 func: check_switch_expr Warning: file ./extensions.ael, line 245-246: A default case was automatically added to the switch.
+LOG: lev:3 file:pval.c line:2422 func: check_pval_item Warning: file ./extensions.ael, line 312-312: macro call to non-existent funcA! (Not even in the extensions.conf stuff!)
+LOG: lev:3 file:pval.c line:2422 func: check_pval_item Warning: file ./extensions.ael, line 313-313: macro call to non-existent funcD! (Not even in the extensions.conf stuff!)
+LOG: lev:3 file:pval.c line:1342 func: check_goto Warning: file ./extensions.ael, line 319-319: goto: Couldn't find goto target test5|s|1, not even in extensions.conf!
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 363-366: The macro dialoutpstn does not end with a return; I will insert one.
+LOG: lev:2 file:pbx_ael.c line:1698 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1700 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1703 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1706 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:521 func: main 13 contexts, 51 extensions, 182 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test2 b/pbx/ael/ael-test/ref.ael-test2
index 161117904..aea70b561 100644
--- a/pbx/ael/ael-test/ref.ael-test2
+++ b/pbx/ael/ael-test/ref.ael-test2
@@ -2,28 +2,28 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4092 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4099 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:ael.flex line:430 func: ael_yylex --Read in included file ./apptest.ael2, 3474 chars
LOG: lev:3 file:ael.y line:538 func: ael_yyparse ==== File: ./apptest.ael2, Line 46, Cols: 8-11: Suggestion: Use the goto statement instead of the Goto() application call in AEL.
-LOG: lev:2 file:pbx_ael.c line:4107 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 35-35: application call to EndWhile affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 37-37: application call to ExecIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 38-38: application call to ExecIfTime affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 44-44: application call to Gosub affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 45-45: application call to GosubIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:1398 func: check_goto Warning: file ./apptest.ael2, line 46-46: goto: no context cont could be found that matches the goto target!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 47-47: application call to GotoIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 58-58: application call to Macro affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2535 func: check_pval_item Warning: file ./apptest.ael2, line 59-59: I am converting the MacroExit call here to a return statement.
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 60-60: application call to MacroIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 85-85: application call to Random affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 94-94: application call to Return affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 119-119: application call to StackPop affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 141-141: application call to While affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:2 file:pbx_ael.c line:4110 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4112 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4115 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4118 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse line:522 func: main 1 contexts, 1 extensions, 142 priorities
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 35-35: application call to EndWhile affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 37-37: application call to ExecIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 38-38: application call to ExecIfTime affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 44-44: application call to Gosub affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 45-45: application call to GosubIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:1342 func: check_goto Warning: file ./apptest.ael2, line 46-46: goto: Couldn't find goto target cont|exten|prior, not even in extensions.conf!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 47-47: application call to GotoIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 58-58: application call to Macro affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2508 func: check_pval_item Warning: file ./apptest.ael2, line 59-59: I am converting the MacroExit call here to a return statement.
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 60-60: application call to MacroIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 85-85: application call to Random affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 94-94: application call to Return affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 119-119: application call to StackPop affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 141-141: application call to While affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:2 file:pbx_ael.c line:1698 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1700 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1703 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1706 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:521 func: main 1 contexts, 1 extensions, 142 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test3 b/pbx/ael/ael-test/ref.ael-test3
index ede90246b..cbd6392e8 100644
--- a/pbx/ael/ael-test/ref.ael-test3
+++ b/pbx/ael/ael-test/ref.ael-test3
@@ -2,99 +2,99 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4092 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4099 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:ael.flex line:430 func: ael_yylex --Read in included file ./include1.ael2, 78 chars
LOG: lev:2 file:ael.flex line:430 func: ael_yylex --Read in included file ./include2.ael2, 98 chars
LOG: lev:2 file:ael.flex line:430 func: ael_yylex --Read in included file ./include3.ael2, 57 chars
LOG: lev:2 file:ael.flex line:430 func: ael_yylex --Read in included file ./include5.ael2, 56 chars
LOG: lev:2 file:ael.flex line:430 func: ael_yylex --Read in included file ./include4.ael2, 87 chars
LOG: lev:2 file:ael.flex line:430 func: ael_yylex --Read in included file ./telemarket_torture.ael2, 28036 chars
-LOG: lev:2 file:pbx_ael.c line:4107 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 14-34: The macro std-exten does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:1408 func: check_goto Warning: file ./extensions.ael, line 17-17: It's bad form to have a goto in a macro to a target outside the macro!
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 36-59: The macro std-priv-exten_1 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 62-85: The macro std-priv-exten_2 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 88-111: The macro std-priv-exten_3 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 114-137: The macro std-priv-exten_4 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 140-163: The macro std-priv-exten_5 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 166-189: The macro std-priv-exten_6 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 192-215: The macro std-priv-exten_7 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 218-241: The macro std-priv-exten_8 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 244-267: The macro std-priv-exten_9 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 270-293: The macro std-priv-exten_10 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 296-319: The macro std-priv-exten_11 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 322-345: The macro std-priv-exten_12 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 348-371: The macro std-priv-exten_13 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 374-397: The macro std-priv-exten_14 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 400-423: The macro std-priv-exten_15 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 426-449: The macro std-priv-exten_16 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 452-475: The macro std-priv-exten_17 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 478-501: The macro std-priv-exten_18 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 504-527: The macro std-priv-exten_19 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 530-553: The macro std-priv-exten_20 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 556-579: The macro std-priv-exten_21 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 582-605: The macro std-priv-exten_22 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 608-631: The macro std-priv-exten_23 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 634-657: The macro std-priv-exten_24 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 660-683: The macro std-priv-exten_25 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 686-709: The macro std-priv-exten_26 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 712-735: The macro std-priv-exten_27 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 738-761: The macro std-priv-exten_28 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 764-787: The macro std-priv-exten_29 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 790-813: The macro std-priv-exten_30 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 816-839: The macro std-priv-exten_31 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 842-865: The macro std-priv-exten_32 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 868-891: The macro std-priv-exten_33 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 894-917: The macro std-priv-exten_34 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 920-943: The macro std-priv-exten_35 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 946-969: The macro std-priv-exten_36 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 972-995: The macro std-priv-exten_37 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 998-1021: The macro std-priv-exten_38 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1024-1047: The macro std-priv-exten_39 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1050-1073: The macro std-priv-exten_40 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1076-1099: The macro std-priv-exten_41 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1102-1125: The macro std-priv-exten_42 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1128-1151: The macro std-priv-exten_43 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1154-1177: The macro std-priv-exten_44 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1180-1203: The macro std-priv-exten_45 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1206-1229: The macro std-priv-exten_46 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1232-1255: The macro std-priv-exten_47 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1258-1281: The macro std-priv-exten_48 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1284-1307: The macro std-priv-exten_49 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1310-1333: The macro std-priv-exten_50 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1336-1359: The macro std-priv-exten_51 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1362-1385: The macro std-priv-exten_52 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1388-1411: The macro std-priv-exten_53 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1414-1437: The macro std-priv-exten_54 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1440-1463: The macro std-priv-exten_55 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1466-1489: The macro std-priv-exten_56 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1492-1515: The macro std-priv-exten_57 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1518-1541: The macro std-priv-exten_58 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1544-1567: The macro std-priv-exten_59 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1570-1593: The macro std-priv-exten_60 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1596-1619: The macro std-priv-exten_61 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1622-1645: The macro std-priv-exten_62 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1648-1671: The macro std-priv-exten_63 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1674-1697: The macro std-priv-exten_64 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1700-1723: The macro std-priv-exten_65 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1726-1749: The macro std-priv-exten_66 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1752-1775: The macro std-priv-exten_67 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1778-1801: The macro std-priv-exten_68 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1804-1827: The macro std-priv-exten_69 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1830-1853: The macro std-priv-exten_70 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1856-1879: The macro std-priv-exten_71 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1882-1905: The macro std-priv-exten_72 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1908-1931: The macro std-priv-exten_73 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1934-1957: The macro std-priv-exten does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1959-1995: The macro fillcidname does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 1997-2015: The macro ciddial does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 2017-2028: The macro ciddial3 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 2030-2048: The macro ciddial2 does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 2050-2065: The macro callerid-liar does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 2067-2072: The macro callerid-bad does not end with a return; I will insert one.
-LOG: lev:2 file:pbx_ael.c line:4110 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4112 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4115 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4118 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse line:522 func: main 172 contexts, 858 extensions, 2406 priorities
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 14-34: The macro std-exten does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:1358 func: check_goto Warning: file ./extensions.ael, line 17-17: It's bad form to have a goto in a macro to a target outside the macro!
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 36-59: The macro std-priv-exten_1 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 62-85: The macro std-priv-exten_2 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 88-111: The macro std-priv-exten_3 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 114-137: The macro std-priv-exten_4 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 140-163: The macro std-priv-exten_5 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 166-189: The macro std-priv-exten_6 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 192-215: The macro std-priv-exten_7 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 218-241: The macro std-priv-exten_8 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 244-267: The macro std-priv-exten_9 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 270-293: The macro std-priv-exten_10 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 296-319: The macro std-priv-exten_11 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 322-345: The macro std-priv-exten_12 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 348-371: The macro std-priv-exten_13 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 374-397: The macro std-priv-exten_14 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 400-423: The macro std-priv-exten_15 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 426-449: The macro std-priv-exten_16 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 452-475: The macro std-priv-exten_17 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 478-501: The macro std-priv-exten_18 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 504-527: The macro std-priv-exten_19 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 530-553: The macro std-priv-exten_20 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 556-579: The macro std-priv-exten_21 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 582-605: The macro std-priv-exten_22 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 608-631: The macro std-priv-exten_23 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 634-657: The macro std-priv-exten_24 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 660-683: The macro std-priv-exten_25 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 686-709: The macro std-priv-exten_26 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 712-735: The macro std-priv-exten_27 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 738-761: The macro std-priv-exten_28 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 764-787: The macro std-priv-exten_29 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 790-813: The macro std-priv-exten_30 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 816-839: The macro std-priv-exten_31 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 842-865: The macro std-priv-exten_32 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 868-891: The macro std-priv-exten_33 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 894-917: The macro std-priv-exten_34 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 920-943: The macro std-priv-exten_35 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 946-969: The macro std-priv-exten_36 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 972-995: The macro std-priv-exten_37 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 998-1021: The macro std-priv-exten_38 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1024-1047: The macro std-priv-exten_39 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1050-1073: The macro std-priv-exten_40 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1076-1099: The macro std-priv-exten_41 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1102-1125: The macro std-priv-exten_42 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1128-1151: The macro std-priv-exten_43 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1154-1177: The macro std-priv-exten_44 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1180-1203: The macro std-priv-exten_45 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1206-1229: The macro std-priv-exten_46 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1232-1255: The macro std-priv-exten_47 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1258-1281: The macro std-priv-exten_48 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1284-1307: The macro std-priv-exten_49 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1310-1333: The macro std-priv-exten_50 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1336-1359: The macro std-priv-exten_51 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1362-1385: The macro std-priv-exten_52 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1388-1411: The macro std-priv-exten_53 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1414-1437: The macro std-priv-exten_54 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1440-1463: The macro std-priv-exten_55 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1466-1489: The macro std-priv-exten_56 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1492-1515: The macro std-priv-exten_57 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1518-1541: The macro std-priv-exten_58 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1544-1567: The macro std-priv-exten_59 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1570-1593: The macro std-priv-exten_60 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1596-1619: The macro std-priv-exten_61 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1622-1645: The macro std-priv-exten_62 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1648-1671: The macro std-priv-exten_63 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1674-1697: The macro std-priv-exten_64 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1700-1723: The macro std-priv-exten_65 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1726-1749: The macro std-priv-exten_66 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1752-1775: The macro std-priv-exten_67 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1778-1801: The macro std-priv-exten_68 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1804-1827: The macro std-priv-exten_69 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1830-1853: The macro std-priv-exten_70 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1856-1879: The macro std-priv-exten_71 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1882-1905: The macro std-priv-exten_72 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1908-1931: The macro std-priv-exten_73 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1934-1957: The macro std-priv-exten does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1959-1995: The macro fillcidname does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 1997-2015: The macro ciddial does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 2017-2028: The macro ciddial3 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 2030-2048: The macro ciddial2 does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 2050-2065: The macro callerid-liar does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 2067-2072: The macro callerid-bad does not end with a return; I will insert one.
+LOG: lev:2 file:pbx_ael.c line:1698 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1700 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1703 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1706 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:521 func: main 172 contexts, 858 extensions, 2406 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test4 b/pbx/ael/ael-test/ref.ael-test4
index 161117904..aea70b561 100644
--- a/pbx/ael/ael-test/ref.ael-test4
+++ b/pbx/ael/ael-test/ref.ael-test4
@@ -2,28 +2,28 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4092 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4099 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:ael.flex line:430 func: ael_yylex --Read in included file ./apptest.ael2, 3474 chars
LOG: lev:3 file:ael.y line:538 func: ael_yyparse ==== File: ./apptest.ael2, Line 46, Cols: 8-11: Suggestion: Use the goto statement instead of the Goto() application call in AEL.
-LOG: lev:2 file:pbx_ael.c line:4107 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 35-35: application call to EndWhile affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 37-37: application call to ExecIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 38-38: application call to ExecIfTime affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 44-44: application call to Gosub affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 45-45: application call to GosubIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:1398 func: check_goto Warning: file ./apptest.ael2, line 46-46: goto: no context cont could be found that matches the goto target!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 47-47: application call to GotoIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 58-58: application call to Macro affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2535 func: check_pval_item Warning: file ./apptest.ael2, line 59-59: I am converting the MacroExit call here to a return statement.
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 60-60: application call to MacroIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 85-85: application call to Random affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 94-94: application call to Return affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 119-119: application call to StackPop affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:3 file:pbx_ael.c line:2530 func: check_pval_item Warning: file ./apptest.ael2, line 141-141: application call to While affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
-LOG: lev:2 file:pbx_ael.c line:4110 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4112 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4115 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4118 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse line:522 func: main 1 contexts, 1 extensions, 142 priorities
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 35-35: application call to EndWhile affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 37-37: application call to ExecIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 38-38: application call to ExecIfTime affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 44-44: application call to Gosub affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 45-45: application call to GosubIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:1342 func: check_goto Warning: file ./apptest.ael2, line 46-46: goto: Couldn't find goto target cont|exten|prior, not even in extensions.conf!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 47-47: application call to GotoIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 58-58: application call to Macro affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2508 func: check_pval_item Warning: file ./apptest.ael2, line 59-59: I am converting the MacroExit call here to a return statement.
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 60-60: application call to MacroIf affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 85-85: application call to Random affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 94-94: application call to Return affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 119-119: application call to StackPop affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:3 file:pval.c line:2503 func: check_pval_item Warning: file ./apptest.ael2, line 141-141: application call to While affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
+LOG: lev:2 file:pbx_ael.c line:1698 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1700 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1703 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1706 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:521 func: main 1 contexts, 1 extensions, 142 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test5 b/pbx/ael/ael-test/ref.ael-test5
index 4cc110631..d9c4130c4 100644
--- a/pbx/ael/ael-test/ref.ael-test5
+++ b/pbx/ael/ael-test/ref.ael-test5
@@ -2,14 +2,14 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:3910 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:3917 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3925 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 130-183: The macro stdexten does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 185-192: The macro uvm does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 194-201: The macro bvm does not end with a return; I will insert one.
-LOG: lev:2 file:pbx_ael.c line:3928 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3930 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3933 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3936 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse line:479 func: main 38 contexts, 90 extensions, 492 priorities
+LOG: lev:2 file:pbx_ael.c line:113 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:120 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:128 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:678 func: check_macro_returns Warning: file ./extensions.ael, line 130-183: The macro stdexten does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:678 func: check_macro_returns Warning: file ./extensions.ael, line 185-192: The macro uvm does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:678 func: check_macro_returns Warning: file ./extensions.ael, line 194-201: The macro bvm does not end with a return; I will insert one.
+LOG: lev:2 file:pbx_ael.c line:131 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:133 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:136 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:139 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:499 func: main 38 contexts, 90 extensions, 492 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test6 b/pbx/ael/ael-test/ref.ael-test6
index ec5fc1318..37b4ef939 100644
--- a/pbx/ael/ael-test/ref.ael-test6
+++ b/pbx/ael/ael-test/ref.ael-test6
@@ -2,8 +2,8 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4092 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4099 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:4 file:ael.flex line:277 func: ael_yylex File=./extensions.ael, line=165, column=49: Mismatched '}' in expression!
LOG: lev:4 file:ael.y line:764 func: ael_yyerror ==== File: ./extensions.ael, Line 165, Cols: 51-51: Error: syntax error, unexpected '=', expecting ')'
LOG: lev:4 file:ael.y line:764 func: ael_yyerror ==== File: ./extensions.ael, Line 169, Cols: 24-24: Error: syntax error, unexpected '&'
@@ -11,14 +11,14 @@ LOG: lev:4 file:ael.flex line:277 func: ael_yylex File=./extensions.ael, line=
LOG: lev:4 file:ael.y line:764 func: ael_yyerror ==== File: ./extensions.ael, Line 222, Cols: 43-43: Error: syntax error, unexpected '=', expecting ')'
LOG: lev:4 file:ael.y line:764 func: ael_yyerror ==== File: ./extensions.ael, Line 226, Cols: 16-16: Error: syntax error, unexpected '&'
LOG: lev:4 file:ael.y line:764 func: ael_yyerror ==== File: ./extensions.ael, Line 291, Cols: 21-28: Error: syntax error, unexpected word, expecting '(' or ';' or '=' or ':'
-LOG: lev:2 file:pbx_ael.c line:4107 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 116-125: The macro dialout does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 129-168: The macro stdexten does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 184-191: The macro uvm does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 193-200: The macro bvm does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 202-207: The macro checkdnd does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 209-216: The macro checkcf does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 218-225: The macro checkcfb does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:739 func: check_macro_returns Warning: file ./extensions.ael, line 688-694: The macro check-psd-exists does not end with a return; I will insert one.
-LOG: lev:4 file:pbx_ael.c line:4120 func: pbx_load_module Sorry, but 5 syntax errors and 0 semantic errors were detected. It doesn't make sense to compile.
-LOG: lev:4 file:ael2_parse line:522 func: main 0 contexts, 0 extensions, 0 priorities
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 116-125: The macro dialout does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 129-168: The macro stdexten does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 184-191: The macro uvm does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 193-200: The macro bvm does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 202-207: The macro checkdnd does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 209-216: The macro checkcf does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 218-225: The macro checkcfb does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 688-694: The macro check-psd-exists does not end with a return; I will insert one.
+LOG: lev:4 file:pbx_ael.c line:1708 func: pbx_load_module Sorry, but 5 syntax errors and 0 semantic errors were detected. It doesn't make sense to compile.
+LOG: lev:4 file:ael2_parse line:521 func: main 0 contexts, 0 extensions, 0 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test7 b/pbx/ael/ael-test/ref.ael-test7
index ae015b9df..57707a0c1 100644
--- a/pbx/ael/ael-test/ref.ael-test7
+++ b/pbx/ael/ael-test/ref.ael-test7
@@ -2,19 +2,28 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:4026 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:4033 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:4041 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:pbx_ael.c line:734 func: check_macro_returns Warning: file ./extensions.ael, line 22-42: The macro stdexten does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:734 func: check_macro_returns Warning: file ./extensions.ael, line 44-49: The macro announce_minutes does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:734 func: check_macro_returns Warning: file ./extensions.ael, line 59-89: The macro checkanddial does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:734 func: check_macro_returns Warning: file ./extensions.ael, line 91-100: The macro trunkdial does not end with a return; I will insert one.
-LOG: lev:4 file:pbx_ael.c line:2459 func: check_pval_item Error: file ./extensions.ael, line 98-98: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
-LOG: lev:3 file:pbx_ael.c line:734 func: check_macro_returns Warning: file ./extensions.ael, line 102-112: The macro checklocal does not end with a return; I will insert one.
-LOG: lev:4 file:pbx_ael.c line:2459 func: check_pval_item Error: file ./extensions.ael, line 107-107: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
-LOG: lev:3 file:pbx_ael.c line:734 func: check_macro_returns Warning: file ./extensions.ael, line 114-119: The macro autodial does not end with a return; I will insert one.
-LOG: lev:4 file:pbx_ael.c line:2459 func: check_pval_item Error: file ./extensions.ael, line 284-284: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
-LOG: lev:4 file:pbx_ael.c line:2459 func: check_pval_item Error: file ./extensions.ael, line 287-287: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
-LOG: lev:3 file:pbx_ael.c line:2440 func: check_pval_item Warning: file ./extensions.ael, line 452-452: macro call to non-existent std-exten-ael ! Hopefully it is present in extensions.conf!
-LOG: lev:4 file:pbx_ael.c line:4054 func: pbx_load_module Sorry, but 0 syntax errors and 4 semantic errors were detected. It doesn't make sense to compile.
-LOG: lev:4 file:ael2_parse line:512 func: main 0 contexts, 0 extensions, 0 priorities
+LOG: lev:2 file:pbx_ael.c line:1680 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:1687 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:1695 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 22-42: The macro stdexten does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 44-49: The macro announce_minutes does not end with a return; I will insert one.
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 59-89: The macro checkanddial does not end with a return; I will insert one.
+LOG: lev:3 file:extconf.c line:3959 func: add_pri Unable to register extension '_', priority 1 in 'test6', already in use
+LOG: lev:3 file:extconf.c line:3959 func: add_pri Unable to register extension '_X.', priority 1 in 'test6', already in use
+=== Loading extensions.conf ===
+Context: test6
+Context: test5
+Context: macro-funcA
+Context: macro-funcB
+Context: macro-funcC
+=========
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 91-100: The macro trunkdial does not end with a return; I will insert one.
+LOG: lev:4 file:pval.c line:2464 func: check_pval_item Error: file ./extensions.ael, line 98-98: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 102-112: The macro checklocal does not end with a return; I will insert one.
+LOG: lev:4 file:pval.c line:2464 func: check_pval_item Error: file ./extensions.ael, line 107-107: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
+LOG: lev:3 file:pval.c line:668 func: check_macro_returns Warning: file ./extensions.ael, line 114-119: The macro autodial does not end with a return; I will insert one.
+LOG: lev:4 file:pval.c line:2464 func: check_pval_item Error: file ./extensions.ael, line 284-284: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
+LOG: lev:4 file:pval.c line:2464 func: check_pval_item Error: file ./extensions.ael, line 287-287: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
+LOG: lev:3 file:pval.c line:2422 func: check_pval_item Warning: file ./extensions.ael, line 452-452: macro call to non-existent std-exten-ael! (Not even in the extensions.conf stuff!)
+LOG: lev:4 file:pbx_ael.c line:1708 func: pbx_load_module Sorry, but 0 syntax errors and 4 semantic errors were detected. It doesn't make sense to compile.
+LOG: lev:4 file:ael2_parse line:521 func: main 0 contexts, 0 extensions, 0 priorities
diff --git a/pbx/ael/ael.flex b/pbx/ael/ael.flex
deleted file mode 100644
index 00fb2db33..000000000
--- a/pbx/ael/ael.flex
+++ /dev/null
@@ -1,595 +0,0 @@
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2006, Digium, Inc.
- *
- * Steve Murphy <murf@parsetree.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-/*! \file
- *
- * \brief Flex scanner description of tokens used in AEL2 .
- *
- */
-
-/*
- * Start with flex options:
- *
- * %x describes the contexts we have: paren, semic and argg, plus INITIAL
- */
-%x paren semic argg comment
-
-/* prefix used for various globally-visible functions and variables.
- * This renames also yywrap, but since we do not use it, we just
- * add option noyywrap to remove it.
- */
-%option prefix="ael_yy"
-%option noyywrap
-
-/* batch gives a bit more performance if we are using it in
- * a non-interactive mode. We probably don't care much.
- */
-%option batch
-
-/* outfile is the filename to be used instead of lex.yy.c */
-%option outfile="ael_lex.c"
-
-/*
- * These are not supported in flex 2.5.4, but we need them
- * at the moment:
- * reentrant produces a thread-safe parser. Not 100% sure that
- * we require it, though.
- * bison-bridge passes an additional yylval argument to yylex().
- * bison-locations is probably not needed.
- */
-%option reentrant
-%option bison-bridge
-%option bison-locations
-
-%{
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "asterisk/logger.h"
-#include "asterisk/utils.h"
-#include "ael/ael.tab.h"
-#include "asterisk/ael_structs.h"
-
-/*
- * A stack to keep track of matching brackets ( [ { } ] )
- */
-static char pbcstack[400]; /* XXX missing size checks */
-static int pbcpos = 0;
-static void pbcpush(char x);
-static int pbcpop(char x);
-
-static int parencount = 0;
-
-/*
- * current line, column and filename, updated as we read the input.
- */
-static int my_lineno = 1; /* current line in the source */
-static int my_col = 1; /* current column in the source */
-char *my_file = 0; /* used also in the bison code */
-char *prev_word; /* XXX document it */
-
-#define MAX_INCLUDE_DEPTH 50
-
-/*
- * flex is not too smart, and generates global functions
- * without prototypes so the compiler may complain.
- * To avoid that, we declare the prototypes here,
- * even though these functions are not used.
- */
-int ael_yyget_column (yyscan_t yyscanner);
-void ael_yyset_column (int column_no , yyscan_t yyscanner);
-
-int ael_yyparse (struct parse_io *);
-
-/*
- * A stack to process include files.
- * As we switch into the new file we need to store the previous
- * state to restore it later.
- */
-struct stackelement {
- char *fname;
- int lineno;
- int colno;
- YY_BUFFER_STATE bufstate;
-};
-
-static struct stackelement include_stack[MAX_INCLUDE_DEPTH];
-static int include_stack_index = 0;
-
-/*
- * if we use the @n feature of bison, we must supply the start/end
- * location of tokens in the structure pointed by yylloc.
- * Simple tokens are just assumed to be on the same line, so
- * the line number is constant, and the column is incremented
- * by the length of the token.
- */
-#ifdef FLEX_BETA /* set for 2.5.33 */
-
-/* compute the total number of lines and columns in the text
- * passed as argument.
- */
-static void pbcwhere(const char *text, int *line, int *col )
-{
- int loc_line = *line;
- int loc_col = *col;
- char c;
- while ( (c = *text++) ) {
- if ( c == '\t' ) {
- loc_col += 8 - (loc_col % 8);
- } else if ( c == '\n' ) {
- loc_line++;
- loc_col = 1;
- } else
- loc_col++;
- }
- *line = loc_line;
- *col = loc_col;
-}
-
-#define STORE_POS do { \
- yylloc->first_line = yylloc->last_line = my_lineno; \
- yylloc->first_column=my_col; \
- yylloc->last_column=my_col+yyleng-1; \
- my_col+=yyleng; \
- } while (0)
-
-#define STORE_LOC do { \
- yylloc->first_line = my_lineno; \
- yylloc->first_column=my_col; \
- pbcwhere(yytext, &my_lineno, &my_col); \
- yylloc->last_line = my_lineno; \
- yylloc->last_column = my_col - 1; \
- } while (0)
-#else
-#define STORE_POS
-#define STORE_LOC
-#endif
-%}
-
-
-NOPARENS ([^()\[\]\{\}]|\\[()\[\]\{\}])*
-
-NOARGG ([^(),\{\}\[\]]|\\[,()\[\]\{\}])*
-
-NOSEMIC ([^;()\{\}\[\]]|\\[;()\[\]\{\}])*
-
-%%
-
-\{ { STORE_POS; return LC;}
-\} { STORE_POS; return RC;}
-\( { STORE_POS; return LP;}
-\) { STORE_POS; return RP;}
-\; { STORE_POS; return SEMI;}
-\= { STORE_POS; return EQ;}
-\, { STORE_POS; return COMMA;}
-\: { STORE_POS; return COLON;}
-\& { STORE_POS; return AMPER;}
-\| { STORE_POS; return BAR;}
-\=\> { STORE_POS; return EXTENMARK;}
-\@ { STORE_POS; return AT;}
-\/\/[^\n]* {/*comment*/}
-context { STORE_POS; return KW_CONTEXT;}
-abstract { STORE_POS; return KW_ABSTRACT;}
-macro { STORE_POS; return KW_MACRO;};
-globals { STORE_POS; return KW_GLOBALS;}
-local { STORE_POS; return KW_LOCAL;}
-ignorepat { STORE_POS; return KW_IGNOREPAT;}
-switch { STORE_POS; return KW_SWITCH;}
-if { STORE_POS; return KW_IF;}
-ifTime { STORE_POS; return KW_IFTIME;}
-random { STORE_POS; return KW_RANDOM;}
-regexten { STORE_POS; return KW_REGEXTEN;}
-hint { STORE_POS; return KW_HINT;}
-else { STORE_POS; return KW_ELSE;}
-goto { STORE_POS; return KW_GOTO;}
-jump { STORE_POS; return KW_JUMP;}
-return { STORE_POS; return KW_RETURN;}
-break { STORE_POS; return KW_BREAK;}
-continue { STORE_POS; return KW_CONTINUE;}
-for { STORE_POS; return KW_FOR;}
-while { STORE_POS; return KW_WHILE;}
-case { STORE_POS; return KW_CASE;}
-default { STORE_POS; return KW_DEFAULT;}
-pattern { STORE_POS; return KW_PATTERN;}
-catch { STORE_POS; return KW_CATCH;}
-switches { STORE_POS; return KW_SWITCHES;}
-eswitches { STORE_POS; return KW_ESWITCHES;}
-includes { STORE_POS; return KW_INCLUDES;}
-"/*" { BEGIN(comment); my_col += 2; }
-
-<comment>[^*\n]* { my_col += yyleng; }
-<comment>[^*\n]*\n { ++my_lineno; my_col=1;}
-<comment>"*"+[^*/\n]* { my_col += yyleng; }
-<comment>"*"+[^*/\n]*\n { ++my_lineno; my_col=1;}
-<comment>"*/" { my_col += 2; BEGIN(INITIAL); }
-
-\n { my_lineno++; my_col = 1; }
-[ ]+ { my_col += yyleng; }
-[\t]+ { my_col += (yyleng*8)-(my_col%8); }
-
-[-a-zA-Z0-9'"_/.\<\>\*\+!$#\[\]][-a-zA-Z0-9'"_/.!\*\+\<\>\{\}$#\[\]]* {
- STORE_POS;
- yylval->str = strdup(yytext);
- prev_word = yylval->str;
- return word;
- }
-
-
-
- /*
- * context used for arguments of if_head, random_head, switch_head,
- * for (last statement), while (XXX why not iftime_head ?).
- * End with the matching parentheses.
- * A comma at the top level is valid here, unlike in argg where it
- * is an argument separator so it must be returned as a token.
- */
-<paren>{NOPARENS}\) {
- if ( pbcpop(')') ) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
- BEGIN(0);
- yylval->str = strdup(yytext);
- prev_word = 0;
- return word;
- }
- parencount--;
- if ( parencount >= 0) {
- yymore();
- } else {
- STORE_LOC;
- yylval->str = strdup(yytext);
- yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
- unput(')');
- BEGIN(0);
- return word;
- }
- }
-
-<paren>{NOPARENS}[\(\[\{] {
- char c = yytext[yyleng-1];
- if (c == '(')
- parencount++;
- pbcpush(c);
- yymore();
- }
-
-<paren>{NOPARENS}[\]\}] {
- char c = yytext[yyleng-1];
- if ( pbcpop(c)) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
- my_file, my_lineno, my_col, c);
- BEGIN(0);
- yylval->str = strdup(yytext);
- return word;
- }
- yymore();
- }
-
-
- /*
- * handlers for arguments to a macro or application calls.
- * We enter this context when we find the initial '(' and
- * stay here until we close all matching parentheses,
- * and find the comma (argument separator) or the closing ')'
- * of the (external) call, which happens when parencount == 0
- * before the decrement.
- */
-<argg>{NOARGG}[\(\[\{] {
- char c = yytext[yyleng-1];
- if (c == '(')
- parencount++;
- pbcpush(c);
- yymore();
- }
-
-<argg>{NOARGG}\) {
- if ( pbcpop(')') ) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
- BEGIN(0);
- yylval->str = strdup(yytext);
- return word;
- }
-
- parencount--;
- if( parencount >= 0){
- yymore();
- } else {
- STORE_LOC;
- BEGIN(0);
- if ( !strcmp(yytext, ")") )
- return RP;
- yylval->str = strdup(yytext);
- yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
- unput(')');
- return word;
- }
- }
-
-<argg>{NOARGG}\, {
- if( parencount != 0) { /* printf("Folding in a comma!\n"); */
- yymore();
- } else {
- STORE_LOC;
- if( !strcmp(yytext,"," ) )
- return COMMA;
- yylval->str = strdup(yytext);
- yylval->str[yyleng-1] = '\0';
- unput(',');
- return word;
- }
- }
-
-<argg>{NOARGG}[\]\}] {
- char c = yytext[yyleng-1];
- if ( pbcpop(c) ) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
- BEGIN(0);
- yylval->str = strdup(yytext);
- return word;
- }
- yymore();
- }
-
- /*
- * context used to find tokens in the right hand side of assignments,
- * or in the first and second operand of a 'for'. As above, match
- * commas and use ';' as a separator (hence return it as a separate token).
- */
-<semic>{NOSEMIC}[\(\[\{] {
- char c = yytext[yyleng-1];
- yymore();
- pbcpush(c);
- }
-
-<semic>{NOSEMIC}[\)\]\}] {
- char c = yytext[yyleng-1];
- if ( pbcpop(c) ) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
- BEGIN(0);
- yylval->str = strdup(yytext);
- return word;
- }
- yymore();
- }
-
-<semic>{NOSEMIC}; {
- STORE_LOC;
- yylval->str = strdup(yytext);
- yylval->str[yyleng-1] = '\0';
- unput(';');
- BEGIN(0);
- return word;
- }
-
-\#include[ \t]+\"[^\"]+\" {
- FILE *in1;
- char fnamebuf[1024],*p1,*p2;
- int error = 1; /* don't use the file if set */
- p1 = strchr(yytext,'"');
- p2 = strrchr(yytext,'"');
- if ( include_stack_index >= MAX_INCLUDE_DEPTH ) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Includes nested too deeply! Wow!!! How did you do that?\n", my_file, my_lineno, my_col);
- } else if ( (int)(p2-p1) > sizeof(fnamebuf) - 1 ) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Filename is incredibly way too long (%d chars!). Inclusion ignored!\n", my_file, my_lineno, my_col, yyleng - 10);
- } else {
- int i;
- strncpy(fnamebuf, p1, p2-p1);
- fnamebuf[p2-p1] = 0;
- for (i=0; i<include_stack_index; i++) {
- if ( !strcmp(fnamebuf,include_stack[i].fname )) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Nice Try!!! But %s has already been included (perhaps by another file), and would cause an infinite loop of file inclusions!!! Include directive ignored\n",
- my_file, my_lineno, my_col, fnamebuf);
- break;
- }
- }
- if (i == include_stack_index)
- error = 0; /* we can use this file */
- }
- if ( !error ) { /* valid file name */
- *p2 = 0;
- /* relative vs. absolute */
- if (*(p1+1) != '/')
- snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
- else
-#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
- strncpy(fnamebuf, p1 + 1, sizeof(fnamebuf) - 1);
-#else
- ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));
-#endif
- in1 = fopen( fnamebuf, "r" );
- if ( ! in1 ) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
- } else {
- char *buffer;
- struct stat stats;
- stat(fnamebuf, &stats);
- buffer = (char*)malloc(stats.st_size+1);
- fread(buffer, 1, stats.st_size, in1);
- buffer[stats.st_size] = 0;
- ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf, (int)stats.st_size);
- fclose(in1);
-
- include_stack[include_stack_index].fname = my_file;
- my_file = strdup(fnamebuf);
- include_stack[include_stack_index].lineno = my_lineno;
- include_stack[include_stack_index].colno = my_col+yyleng;
- include_stack[include_stack_index++].bufstate = YY_CURRENT_BUFFER;
-
- yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner);
- free(buffer);
- my_lineno = 1;
- my_col = 1;
- BEGIN(INITIAL);
- }
- }
- }
-
-<<EOF>> {
- if ( --include_stack_index < 0 ) {
- yyterminate();
- } else {
- free(my_file);
- yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
- yy_switch_to_buffer(include_stack[include_stack_index].bufstate, yyscanner );
- my_lineno = include_stack[include_stack_index].lineno;
- my_col = include_stack[include_stack_index].colno;
- my_file = include_stack[include_stack_index].fname;
- }
- }
-
-%%
-
-static void pbcpush(char x)
-{
- pbcstack[pbcpos++] = x;
-}
-
-static int pbcpop(char x)
-{
- if ( ( x == ')' && pbcstack[pbcpos-1] == '(' )
- || ( x == ']' && pbcstack[pbcpos-1] == '[' )
- || ( x == '}' && pbcstack[pbcpos-1] == '{' )) {
- pbcpos--;
- return 0;
- }
- return 1; /* error */
-}
-
-static int c_prevword(void)
-{
- char *c = prev_word;
- if (c == NULL)
- return 0;
- while ( *c ) {
- switch (*c) {
- case '{':
- case '[':
- case '(':
- pbcpush(*c);
- break;
- case '}':
- case ']':
- case ')':
- if (pbcpop(*c))
- return 1;
- break;
- }
- c++;
- }
- return 0;
-}
-
-
-/*
- * The following three functions, reset_*, are used in the bison
- * code to switch context. As a consequence, we need to
- * declare them global and add a prototype so that the
- * compiler does not complain.
- *
- * NOTE: yyg is declared because it is used in the BEGIN macros,
- * though that should be hidden as the macro changes
- * depending on the flex options that we use - in particular,
- * %reentrant changes the way the macro is declared;
- * without %reentrant, BEGIN uses yystart instead of yyg
- */
-
-void reset_parencount(yyscan_t yyscanner );
-void reset_parencount(yyscan_t yyscanner )
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- parencount = 0;
- pbcpos = 0;
- pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
- c_prevword();
- BEGIN(paren);
-}
-
-void reset_semicount(yyscan_t yyscanner );
-void reset_semicount(yyscan_t yyscanner )
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- pbcpos = 0;
- BEGIN(semic);
-}
-
-void reset_argcount(yyscan_t yyscanner );
-void reset_argcount(yyscan_t yyscanner )
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- parencount = 0;
- pbcpos = 0;
- pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
- c_prevword();
- BEGIN(argg);
-}
-
-/* used elsewhere, but some local vars */
-struct pval *ael2_parse(char *filename, int *errors)
-{
- struct pval *pval;
- struct parse_io *io;
- char *buffer;
- struct stat stats;
- FILE *fin;
-
- /* extern int ael_yydebug; */
-
- io = calloc(sizeof(struct parse_io),1);
- /* reset the global counters */
- prev_word = 0;
- my_lineno = 1;
- include_stack_index=0;
- my_col = 0;
- /* ael_yydebug = 1; */
- ael_yylex_init(&io->scanner);
- fin = fopen(filename,"r");
- if ( !fin ) {
- ast_log(LOG_ERROR,"File %s could not be opened\n", filename);
- *errors = 1;
- return 0;
- }
- my_file = strdup(filename);
- stat(filename, &stats);
- buffer = (char*)malloc(stats.st_size+2);
- fread(buffer, 1, stats.st_size, fin);
- buffer[stats.st_size]=0;
- fclose(fin);
-
- ael_yy_scan_string (buffer ,io->scanner);
- ael_yyset_lineno(1 , io->scanner);
-
- /* ael_yyset_in (fin , io->scanner); OLD WAY */
-
- ael_yyparse(io);
-
-
- pval = io->pval;
- *errors = io->syntax_error_count;
-
- ael_yylex_destroy(io->scanner);
- free(buffer);
- free(io);
-
- return pval;
-}
diff --git a/pbx/ael/ael.tab.c b/pbx/ael/ael.tab.c
deleted file mode 100644
index 145c1c402..000000000
--- a/pbx/ael/ael.tab.c
+++ /dev/null
@@ -1,3386 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.1a. */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "2.1a"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 1
-
-/* Using locations. */
-#define YYLSP_NEEDED 1
-
-/* Substitute the variable and function names. */
-#define yyparse ael_yyparse
-#define yylex ael_yylex
-#define yyerror ael_yyerror
-#define yylval ael_yylval
-#define yychar ael_yychar
-#define yydebug ael_yydebug
-#define yynerrs ael_yynerrs
-#define yylloc ael_yylloc
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- KW_CONTEXT = 258,
- LC = 259,
- RC = 260,
- LP = 261,
- RP = 262,
- SEMI = 263,
- EQ = 264,
- COMMA = 265,
- COLON = 266,
- AMPER = 267,
- BAR = 268,
- AT = 269,
- KW_MACRO = 270,
- KW_GLOBALS = 271,
- KW_IGNOREPAT = 272,
- KW_SWITCH = 273,
- KW_IF = 274,
- KW_IFTIME = 275,
- KW_ELSE = 276,
- KW_RANDOM = 277,
- KW_ABSTRACT = 278,
- EXTENMARK = 279,
- KW_GOTO = 280,
- KW_JUMP = 281,
- KW_RETURN = 282,
- KW_BREAK = 283,
- KW_CONTINUE = 284,
- KW_REGEXTEN = 285,
- KW_HINT = 286,
- KW_FOR = 287,
- KW_WHILE = 288,
- KW_CASE = 289,
- KW_PATTERN = 290,
- KW_DEFAULT = 291,
- KW_CATCH = 292,
- KW_SWITCHES = 293,
- KW_ESWITCHES = 294,
- KW_INCLUDES = 295,
- KW_LOCAL = 296,
- word = 297
- };
-#endif
-/* Tokens. */
-#define KW_CONTEXT 258
-#define LC 259
-#define RC 260
-#define LP 261
-#define RP 262
-#define SEMI 263
-#define EQ 264
-#define COMMA 265
-#define COLON 266
-#define AMPER 267
-#define BAR 268
-#define AT 269
-#define KW_MACRO 270
-#define KW_GLOBALS 271
-#define KW_IGNOREPAT 272
-#define KW_SWITCH 273
-#define KW_IF 274
-#define KW_IFTIME 275
-#define KW_ELSE 276
-#define KW_RANDOM 277
-#define KW_ABSTRACT 278
-#define EXTENMARK 279
-#define KW_GOTO 280
-#define KW_JUMP 281
-#define KW_RETURN 282
-#define KW_BREAK 283
-#define KW_CONTINUE 284
-#define KW_REGEXTEN 285
-#define KW_HINT 286
-#define KW_FOR 287
-#define KW_WHILE 288
-#define KW_CASE 289
-#define KW_PATTERN 290
-#define KW_DEFAULT 291
-#define KW_CATCH 292
-#define KW_SWITCHES 293
-#define KW_ESWITCHES 294
-#define KW_INCLUDES 295
-#define KW_LOCAL 296
-#define word 297
-
-
-
-
-/* Copy the first part of user declarations. */
-#line 1 "ael.y"
-
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2006, Digium, Inc.
- *
- * Steve Murphy <murf@parsetree.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-/*! \file
- *
- * \brief Bison Grammar description of AEL2.
- *
- */
-
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "asterisk/logger.h"
-#include "asterisk/ael_structs.h"
-
-static pval * linku1(pval *head, pval *tail);
-static void set_dads(pval *dad, pval *child_list);
-void reset_parencount(yyscan_t yyscanner);
-void reset_semicount(yyscan_t yyscanner);
-void reset_argcount(yyscan_t yyscanner );
-
-#define YYLEX_PARAM ((struct parse_io *)parseio)->scanner
-#define YYERROR_VERBOSE 1
-
-extern char *my_file;
-#ifdef AAL_ARGCHECK
-int ael_is_funcname(char *name);
-#endif
-static char *ael_token_subst(char *mess);
-
-
-
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 1
-#endif
-
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 54 "ael.y"
-{
- int intval; /* integer value, typically flags */
- char *str; /* strings */
- struct pval *pval; /* full objects */
-}
-/* Line 198 of yacc.c. */
-#line 236 "ael.tab.c"
- YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
-{
- int first_line;
- int first_column;
- int last_line;
- int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-
-
-/* Copy the second part of user declarations. */
-#line 60 "ael.y"
-
- /* declaring these AFTER the union makes things a lot simpler! */
-void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s);
-int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , void * yyscanner);
-
-/* create a new object with start-end marker */
-static pval *npval(pvaltype type, int first_line, int last_line,
- int first_column, int last_column);
-
-/* create a new object with start-end marker, simplified interface.
- * Must be declared here because YYLTYPE is not known before
- */
-static pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last);
-
-/* another frontend for npval, this time for a string */
-static pval *nword(char *string, YYLTYPE *pos);
-
-/* update end position of an object, return the object */
-static pval *update_last(pval *, YYLTYPE *);
-
-
-/* Line 221 of yacc.c. */
-#line 281 "ael.tab.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# else
-# define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int i)
-#else
-static int
-YYID (i)
- int i;
-#endif
-{
- return i;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# ifdef __cplusplus
-extern "C" {
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifdef __cplusplus
-}
-# endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
-};
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
- + 2 * YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 14
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 300
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 43
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 56
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 137
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 275
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 297
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 yytranslate[] =
-{
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 5, 7, 10, 13, 15, 17, 19,
- 21, 23, 25, 32, 34, 35, 44, 49, 50, 53,
- 56, 57, 63, 64, 71, 72, 74, 78, 81, 82,
- 85, 88, 90, 92, 94, 96, 98, 100, 102, 105,
- 107, 112, 116, 121, 129, 138, 139, 142, 145, 151,
- 153, 161, 162, 167, 170, 173, 178, 180, 183, 185,
- 188, 192, 194, 197, 201, 203, 206, 210, 216, 220,
- 222, 224, 228, 232, 235, 236, 237, 238, 251, 255,
- 257, 261, 264, 267, 268, 274, 277, 280, 283, 287,
- 289, 292, 293, 295, 299, 303, 309, 315, 321, 327,
- 328, 331, 334, 339, 340, 346, 350, 351, 355, 359,
- 362, 364, 365, 367, 368, 372, 373, 376, 381, 385,
- 390, 391, 394, 396, 398, 404, 409, 414, 415, 419,
- 425, 428, 430, 434, 437, 441, 444, 449
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 44, 0, -1, 45, -1, 46, -1, 45, 46, -1,
- 45, 1, -1, 48, -1, 50, -1, 51, -1, 8,
- -1, 42, -1, 36, -1, 49, 3, 47, 4, 58,
- 5, -1, 23, -1, -1, 15, 42, 6, 57, 7,
- 4, 91, 5, -1, 16, 4, 52, 5, -1, -1,
- 53, 52, -1, 52, 1, -1, -1, 42, 9, 54,
- 42, 8, -1, -1, 41, 42, 9, 56, 42, 8,
- -1, -1, 42, -1, 57, 10, 42, -1, 57, 1,
- -1, -1, 59, 58, -1, 58, 1, -1, 61, -1,
- 98, -1, 93, -1, 94, -1, 60, -1, 53, -1,
- 55, -1, 42, 1, -1, 8, -1, 17, 24, 42,
- 8, -1, 42, 24, 73, -1, 30, 42, 24, 73,
- -1, 31, 6, 69, 7, 42, 24, 73, -1, 30,
- 31, 6, 69, 7, 42, 24, 73, -1, -1, 73,
- 62, -1, 62, 1, -1, 70, 11, 70, 11, 70,
- -1, 42, -1, 63, 13, 70, 13, 70, 13, 70,
- -1, -1, 6, 66, 68, 7, -1, 19, 65, -1,
- 22, 65, -1, 20, 6, 64, 7, -1, 42, -1,
- 42, 42, -1, 42, -1, 69, 42, -1, 69, 12,
- 42, -1, 42, -1, 42, 42, -1, 42, 42, 42,
- -1, 42, -1, 42, 42, -1, 71, 11, 42, -1,
- 18, 65, 4, 89, 5, -1, 4, 62, 5, -1,
- 53, -1, 55, -1, 25, 79, 8, -1, 26, 81,
- 8, -1, 42, 11, -1, -1, -1, -1, 32, 6,
- 74, 42, 8, 75, 42, 8, 76, 42, 7, 73,
- -1, 33, 65, 73, -1, 72, -1, 12, 82, 8,
- -1, 86, 8, -1, 42, 8, -1, -1, 86, 9,
- 77, 42, 8, -1, 28, 8, -1, 27, 8, -1,
- 29, 8, -1, 67, 73, 78, -1, 8, -1, 21,
- 73, -1, -1, 71, -1, 71, 13, 71, -1, 71,
- 10, 71, -1, 71, 13, 71, 13, 71, -1, 71,
- 10, 71, 10, 71, -1, 36, 13, 71, 13, 71,
- -1, 36, 10, 71, 10, 71, -1, -1, 10, 42,
- -1, 71, 80, -1, 71, 80, 14, 47, -1, -1,
- 42, 6, 83, 88, 7, -1, 42, 6, 7, -1,
- -1, 42, 6, 85, -1, 84, 88, 7, -1, 84,
- 7, -1, 42, -1, -1, 68, -1, -1, 88, 10,
- 87, -1, -1, 90, 89, -1, 34, 42, 11, 62,
- -1, 36, 11, 62, -1, 35, 42, 11, 62, -1,
- -1, 92, 91, -1, 73, -1, 98, -1, 37, 42,
- 4, 62, 5, -1, 38, 4, 95, 5, -1, 39,
- 4, 95, 5, -1, -1, 42, 8, 95, -1, 42,
- 14, 42, 8, 95, -1, 95, 1, -1, 47, -1,
- 47, 13, 64, -1, 96, 8, -1, 97, 96, 8,
- -1, 97, 1, -1, 40, 4, 97, 5, -1, 40,
- 4, 5, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
-{
- 0, 186, 186, 189, 190, 191, 194, 195, 196, 197,
- 200, 201, 204, 219, 220, 223, 229, 235, 236, 237,
- 240, 240, 246, 246, 253, 254, 255, 256, 259, 260,
- 261, 264, 265, 266, 267, 268, 269, 270, 271, 272,
- 275, 280, 284, 289, 294, 304, 305, 306, 312, 317,
- 321, 329, 329, 333, 336, 339, 350, 351, 358, 359,
- 363, 369, 370, 375, 383, 384, 388, 394, 403, 406,
- 407, 408, 411, 414, 417, 418, 419, 417, 425, 429,
- 430, 431, 432, 435, 435, 468, 469, 470, 471, 475,
- 478, 479, 482, 483, 486, 489, 493, 497, 501, 507,
- 508, 512, 515, 521, 521, 526, 534, 534, 545, 552,
- 555, 556, 559, 560, 563, 566, 567, 570, 574, 578,
- 584, 585, 588, 589, 590, 596, 601, 606, 607, 608,
- 610, 613, 614, 621, 622, 623, 626, 629
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "$end", "error", "$undefined", "KW_CONTEXT", "LC", "RC", "LP", "RP",
- "SEMI", "EQ", "COMMA", "COLON", "AMPER", "BAR", "AT", "KW_MACRO",
- "KW_GLOBALS", "KW_IGNOREPAT", "KW_SWITCH", "KW_IF", "KW_IFTIME",
- "KW_ELSE", "KW_RANDOM", "KW_ABSTRACT", "EXTENMARK", "KW_GOTO", "KW_JUMP",
- "KW_RETURN", "KW_BREAK", "KW_CONTINUE", "KW_REGEXTEN", "KW_HINT",
- "KW_FOR", "KW_WHILE", "KW_CASE", "KW_PATTERN", "KW_DEFAULT", "KW_CATCH",
- "KW_SWITCHES", "KW_ESWITCHES", "KW_INCLUDES", "KW_LOCAL", "word",
- "$accept", "file", "objects", "object", "context_name", "context",
- "opt_abstract", "macro", "globals", "global_statements", "assignment",
- "@1", "local_assignment", "@2", "arglist", "elements", "element",
- "ignorepat", "extension", "statements", "timerange", "timespec",
- "test_expr", "@3", "if_like_head", "word_list", "hint_word",
- "word3_list", "goto_word", "switch_statement", "statement", "@4", "@5",
- "@6", "@7", "opt_else", "target", "opt_pri", "jumptarget", "macro_call",
- "@8", "application_call_head", "@9", "application_call", "opt_word",
- "eval_arglist", "case_statements", "case_statement", "macro_statements",
- "macro_statement", "switches", "eswitches", "switchlist",
- "included_entry", "includeslist", "includes", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 296, 297
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 43, 44, 45, 45, 45, 46, 46, 46, 46,
- 47, 47, 48, 49, 49, 50, 51, 52, 52, 52,
- 54, 53, 56, 55, 57, 57, 57, 57, 58, 58,
- 58, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 60, 61, 61, 61, 61, 62, 62, 62, 63, 63,
- 64, 66, 65, 67, 67, 67, 68, 68, 69, 69,
- 69, 70, 70, 70, 71, 71, 71, 72, 73, 73,
- 73, 73, 73, 73, 74, 75, 76, 73, 73, 73,
- 73, 73, 73, 77, 73, 73, 73, 73, 73, 73,
- 78, 78, 79, 79, 79, 79, 79, 79, 79, 80,
- 80, 81, 81, 83, 82, 82, 85, 84, 86, 86,
- 87, 87, 88, 88, 88, 89, 89, 90, 90, 90,
- 91, 91, 92, 92, 92, 93, 94, 95, 95, 95,
- 95, 96, 96, 97, 97, 97, 98, 98
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 1, 1, 2, 2, 1, 1, 1, 1,
- 1, 1, 6, 1, 0, 8, 4, 0, 2, 2,
- 0, 5, 0, 6, 0, 1, 3, 2, 0, 2,
- 2, 1, 1, 1, 1, 1, 1, 1, 2, 1,
- 4, 3, 4, 7, 8, 0, 2, 2, 5, 1,
- 7, 0, 4, 2, 2, 4, 1, 2, 1, 2,
- 3, 1, 2, 3, 1, 2, 3, 5, 3, 1,
- 1, 3, 3, 2, 0, 0, 0, 12, 3, 1,
- 3, 2, 2, 0, 5, 2, 2, 2, 3, 1,
- 2, 0, 1, 3, 3, 5, 5, 5, 5, 0,
- 2, 2, 4, 0, 5, 3, 0, 3, 3, 2,
- 1, 0, 1, 0, 3, 0, 2, 4, 3, 4,
- 0, 2, 1, 1, 5, 4, 4, 0, 3, 5,
- 2, 1, 3, 2, 3, 2, 4, 3
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 14, 9, 0, 0, 13, 0, 0, 3, 6, 0,
- 7, 8, 0, 17, 1, 5, 4, 0, 24, 0,
- 0, 17, 11, 10, 0, 25, 0, 20, 19, 16,
- 0, 28, 27, 0, 0, 0, 39, 0, 0, 0,
- 0, 0, 0, 0, 0, 36, 37, 0, 28, 35,
- 31, 33, 34, 32, 120, 26, 0, 0, 0, 0,
- 0, 127, 127, 0, 0, 38, 0, 30, 12, 0,
- 45, 89, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 69, 70, 0, 79,
- 122, 113, 0, 0, 120, 123, 21, 0, 0, 0,
- 58, 0, 0, 0, 0, 137, 131, 0, 0, 22,
- 41, 0, 45, 0, 0, 51, 0, 53, 0, 54,
- 0, 64, 92, 0, 99, 0, 86, 85, 87, 74,
- 0, 0, 106, 82, 73, 91, 109, 56, 112, 0,
- 81, 83, 15, 121, 40, 0, 42, 0, 0, 59,
- 127, 0, 130, 125, 126, 0, 133, 135, 136, 0,
- 0, 47, 68, 0, 103, 80, 0, 115, 49, 0,
- 0, 0, 0, 0, 65, 0, 0, 0, 71, 0,
- 101, 72, 0, 78, 45, 107, 0, 88, 57, 108,
- 111, 0, 0, 0, 60, 0, 0, 132, 134, 0,
- 105, 113, 0, 0, 0, 0, 0, 115, 62, 0,
- 55, 0, 0, 0, 94, 66, 93, 100, 0, 0,
- 0, 90, 110, 114, 0, 0, 0, 127, 23, 0,
- 52, 0, 0, 45, 67, 116, 63, 61, 0, 0,
- 0, 0, 0, 0, 102, 75, 124, 84, 0, 43,
- 0, 104, 45, 45, 0, 0, 0, 98, 97, 96,
- 95, 0, 44, 0, 0, 0, 48, 0, 0, 76,
- 50, 0, 0, 0, 77
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 5, 6, 7, 106, 8, 9, 10, 11, 20,
- 86, 35, 87, 160, 26, 47, 48, 49, 50, 111,
- 169, 170, 116, 166, 88, 138, 101, 171, 122, 89,
- 112, 182, 261, 271, 191, 187, 123, 180, 125, 114,
- 201, 91, 185, 92, 223, 139, 206, 207, 93, 94,
- 51, 52, 103, 107, 108, 53
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -206
-static const yytype_int16 yypact[] =
-{
- 139, -206, -4, 42, -206, 56, 170, -206, -206, 66,
- -206, -206, 137, 46, -206, -206, -206, -6, 60, 65,
- 17, 46, -206, -206, 107, -206, 14, -206, -206, -206,
- 34, 119, -206, 159, 127, 133, -206, 166, -14, 191,
- 197, 208, 209, 172, 111, -206, -206, 82, 119, -206,
- -206, -206, -206, -206, 53, -206, 207, 174, 211, 194,
- 180, 181, 181, 5, 212, -206, 96, -206, -206, 102,
- 96, -206, 183, 214, 214, 218, 214, 28, 184, 219,
- 220, 221, 224, 214, 190, 168, -206, -206, 96, -206,
- -206, 13, 173, 226, 53, -206, -206, 225, 180, 96,
- -206, 20, 84, 104, 112, -206, 222, 228, 6, -206,
- -206, 129, 96, 231, 230, -206, 235, -206, 192, -206,
- 143, 199, 178, 232, 196, 234, -206, -206, -206, -206,
- 96, 239, -206, -206, -206, 223, -206, 203, -206, 185,
- -206, -206, -206, -206, -206, 77, -206, 204, 205, -206,
- 181, 206, -206, -206, -206, 192, -206, -206, -206, 241,
- 210, -206, -206, 18, 243, -206, 213, 169, 2, 238,
- 246, 245, 184, 184, -206, 184, 215, 184, -206, 216,
- 240, -206, 217, -206, 96, -206, 96, -206, -206, -206,
- 227, 229, 233, 236, -206, 147, 253, -206, -206, 254,
- -206, 213, 256, 237, 242, 255, 259, 169, 244, 247,
- -206, 247, 198, 120, 200, -206, 187, -206, -6, 257,
- 179, -206, -206, -206, 260, 248, 96, 181, -206, 189,
- -206, 262, 263, 96, -206, -206, -206, 249, 264, 265,
- 184, 184, 184, 184, -206, -206, -206, -206, 96, -206,
- 182, -206, 96, 96, 24, 247, 247, 267, 267, 267,
- 267, 250, -206, 32, 105, 268, -206, 272, 247, -206,
- -206, 251, 275, 96, -206
-};
-
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int16 yypgoto[] =
-{
- -206, -206, -206, 261, -16, -206, -206, -206, -206, 266,
- -5, -206, -17, -206, -206, 252, -206, -206, -206, -107,
- -206, 115, 68, -206, -206, 117, 201, -205, -76, -206,
- -54, -206, -206, -206, -206, -206, -206, -206, -206, -206,
- -206, -206, -206, -206, -206, 87, 78, -206, 202, -206,
- -206, -206, -59, 186, -206, -45
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -130
-static const yytype_int16 yytable[] =
-{
- 90, 24, 124, 104, 238, 163, 239, 157, 21, 95,
- 105, 158, 110, -61, 46, 32, 21, 58, 28, 161,
- 136, 33, 29, -46, 34, 161, 45, 147, 59, -118,
- 22, 46, 148, 161, 135, 28, 23, -117, 12, -18,
- 90, 22, 22, 45, 208, 146, 13, 23, 23, 95,
- 265, 266, -46, -46, -46, 137, 14, 70, -118, -118,
- -118, 71, 149, 270, 120, 72, -117, -117, -117, 17,
- 121, 73, 74, 75, 27, 76, 183, 220, 77, 78,
- 79, 80, 81, 67, 192, 82, 83, 68, 19, 148,
- 84, 195, 150, 42, 43, 85, 212, 213, 151, 214,
- 70, 216, 25, 67, 71, 152, 161, -29, 72, 153,
- -119, 31, 65, 152, 73, 74, 75, 154, 76, 149,
- 27, 77, 78, 79, 80, 81, 254, 36, 82, 83,
- 161, 176, 221, 241, 162, 66, 37, 43, 85, -119,
- -119, -119, 117, 18, 119, 263, 264, 1, 152, 38,
- 39, 130, -128, 172, 2, 3, 173, 40, 41, 42,
- 43, 44, 4, 54, 257, 258, 259, 260, 250, 55,
- -2, 15, 249, -14, 132, 56, 133, 27, 1, 134,
- 161, 140, 141, 152, 246, 2, 3, -129, 175, 176,
- 57, 177, 189, 4, 262, 190, 251, 60, 176, 190,
- 243, 61, 244, 203, 204, 205, 179, 176, 240, 176,
- 242, 176, 62, 63, 64, 96, 97, 98, 99, 274,
- 115, 109, 100, 102, 118, 113, 121, 126, 127, 128,
- 129, 142, 131, 144, 168, 155, 156, 164, 165, 167,
- 178, 174, 181, 184, 186, 188, 193, 194, 196, 198,
- 200, 209, 199, 210, 218, 137, 211, 215, 217, 219,
- 226, 227, 228, 230, 234, 245, 233, 16, 247, 222,
- 197, 224, 248, 252, 253, 225, 256, 255, 176, 231,
- 269, 268, 273, 202, 232, 235, 236, 30, 229, 237,
- 0, 208, 267, 272, 159, 0, 143, 0, 0, 145,
- 69
-};
-
-static const yytype_int16 yycheck[] =
-{
- 54, 17, 78, 62, 209, 112, 211, 1, 13, 54,
- 5, 5, 66, 11, 31, 1, 21, 31, 1, 1,
- 7, 7, 5, 5, 10, 1, 31, 7, 42, 5,
- 36, 48, 12, 1, 88, 1, 42, 5, 42, 5,
- 94, 36, 36, 48, 42, 99, 4, 42, 42, 94,
- 255, 256, 34, 35, 36, 42, 0, 4, 34, 35,
- 36, 8, 42, 268, 36, 12, 34, 35, 36, 3,
- 42, 18, 19, 20, 9, 22, 130, 184, 25, 26,
- 27, 28, 29, 1, 7, 32, 33, 5, 42, 12,
- 37, 150, 8, 40, 41, 42, 172, 173, 14, 175,
- 4, 177, 42, 1, 8, 1, 1, 5, 12, 5,
- 5, 4, 1, 1, 18, 19, 20, 5, 22, 42,
- 9, 25, 26, 27, 28, 29, 233, 8, 32, 33,
- 1, 11, 186, 13, 5, 24, 17, 41, 42, 34,
- 35, 36, 74, 6, 76, 252, 253, 8, 1, 30,
- 31, 83, 5, 10, 15, 16, 13, 38, 39, 40,
- 41, 42, 23, 4, 240, 241, 242, 243, 227, 42,
- 0, 1, 226, 3, 6, 42, 8, 9, 8, 11,
- 1, 8, 9, 1, 5, 15, 16, 5, 10, 11,
- 24, 13, 7, 23, 248, 10, 7, 6, 11, 10,
- 13, 4, 218, 34, 35, 36, 10, 11, 10, 11,
- 10, 11, 4, 4, 42, 8, 42, 6, 24, 273,
- 6, 9, 42, 42, 6, 42, 42, 8, 8, 8,
- 6, 5, 42, 8, 42, 13, 8, 6, 8, 4,
- 8, 42, 8, 4, 21, 42, 42, 42, 42, 8,
- 7, 13, 42, 7, 14, 42, 11, 42, 42, 42,
- 24, 8, 8, 7, 5, 8, 11, 6, 8, 42,
- 155, 42, 24, 11, 11, 42, 11, 13, 11, 42,
- 8, 13, 7, 166, 42, 207, 42, 21, 201, 42,
- -1, 42, 42, 42, 108, -1, 94, -1, -1, 98,
- 48
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
-{
- 0, 8, 15, 16, 23, 44, 45, 46, 48, 49,
- 50, 51, 42, 4, 0, 1, 46, 3, 6, 42,
- 52, 53, 36, 42, 47, 42, 57, 9, 1, 5,
- 52, 4, 1, 7, 10, 54, 8, 17, 30, 31,
- 38, 39, 40, 41, 42, 53, 55, 58, 59, 60,
- 61, 93, 94, 98, 4, 42, 42, 24, 31, 42,
- 6, 4, 4, 4, 42, 1, 24, 1, 5, 58,
- 4, 8, 12, 18, 19, 20, 22, 25, 26, 27,
- 28, 29, 32, 33, 37, 42, 53, 55, 67, 72,
- 73, 84, 86, 91, 92, 98, 8, 42, 6, 24,
- 42, 69, 42, 95, 95, 5, 47, 96, 97, 9,
- 73, 62, 73, 42, 82, 6, 65, 65, 6, 65,
- 36, 42, 71, 79, 71, 81, 8, 8, 8, 6,
- 65, 42, 6, 8, 11, 73, 7, 42, 68, 88,
- 8, 9, 5, 91, 8, 69, 73, 7, 12, 42,
- 8, 14, 1, 5, 5, 13, 8, 1, 5, 96,
- 56, 1, 5, 62, 6, 8, 66, 4, 42, 63,
- 64, 70, 10, 13, 42, 10, 11, 13, 8, 10,
- 80, 8, 74, 73, 4, 85, 21, 78, 42, 7,
- 10, 77, 7, 42, 42, 95, 42, 64, 8, 42,
- 7, 83, 68, 34, 35, 36, 89, 90, 42, 13,
- 7, 11, 71, 71, 71, 42, 71, 42, 14, 42,
- 62, 73, 42, 87, 42, 42, 24, 8, 8, 88,
- 7, 42, 42, 11, 5, 89, 42, 42, 70, 70,
- 10, 13, 10, 13, 47, 8, 5, 8, 24, 73,
- 95, 7, 11, 11, 62, 13, 11, 71, 71, 71,
- 71, 75, 73, 62, 62, 70, 70, 42, 13, 8,
- 70, 76, 42, 7, 73
-};
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-
-#define YYFAIL goto yyerrlab
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK (1); \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (&yylloc, parseio, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
-
-#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments. */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval, &yylloc)
-#endif
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value, Location, parseio); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep, const YYLTYPE * const yylocationp, struct parse_io *parseio)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parseio)
- FILE *yyoutput;
- int yytype;
- const YYSTYPE * const yyvaluep;
- const YYLTYPE * const yylocationp;
- struct parse_io *parseio;
-#endif
-{
- if (!yyvaluep)
- return;
- YYUSE (yylocationp);
- YYUSE (parseio);
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
-# endif
- switch (yytype)
- {
- default:
- break;
- }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep, const YYLTYPE * const yylocationp, struct parse_io *parseio)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parseio)
- FILE *yyoutput;
- int yytype;
- const YYSTYPE * const yyvaluep;
- const YYLTYPE * const yylocationp;
- struct parse_io *parseio;
-#endif
-{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- YY_LOCATION_PRINT (yyoutput, *yylocationp);
- YYFPRINTF (yyoutput, ": ");
- yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parseio);
- YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
-#else
-static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
-#endif
-{
- YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parse_io *parseio)
-#else
-static void
-yy_reduce_print (yyvsp, yylsp, yyrule, parseio)
- YYSTYPE *yyvsp;
- YYLTYPE *yylsp;
- int yyrule;
- struct parse_io *parseio;
-#endif
-{
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- fprintf (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , &(yylsp[(yyi + 1) - (yynrhs)]) , parseio);
- fprintf (stderr, "\n");
- }
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, yylsp, Rule, parseio); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- size_t yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
-
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
- int yyn = yypact[yystate];
-
- if (! (YYPACT_NINF < yyn && yyn < YYLAST))
- return 0;
- else
- {
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
-
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
-
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
-
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
- }
-}
-#endif /* YYERROR_VERBOSE */
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parse_io *parseio)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, yylocationp, parseio)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- YYLTYPE *yylocationp;
- struct parse_io *parseio;
-#endif
-{
- YYUSE (yyvaluep);
- YYUSE (yylocationp);
- YYUSE (parseio);
-
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- switch (yytype)
- {
- case 42: /* "word" */
-#line 178 "ael.y"
- { free((yyvaluep->str));};
-#line 1441 "ael.tab.c"
- break;
- case 45: /* "objects" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1449 "ael.tab.c"
- break;
- case 46: /* "object" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1457 "ael.tab.c"
- break;
- case 47: /* "context_name" */
-#line 178 "ael.y"
- { free((yyvaluep->str));};
-#line 1462 "ael.tab.c"
- break;
- case 48: /* "context" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1470 "ael.tab.c"
- break;
- case 50: /* "macro" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1478 "ael.tab.c"
- break;
- case 51: /* "globals" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1486 "ael.tab.c"
- break;
- case 52: /* "global_statements" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1494 "ael.tab.c"
- break;
- case 53: /* "assignment" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1502 "ael.tab.c"
- break;
- case 55: /* "local_assignment" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1510 "ael.tab.c"
- break;
- case 57: /* "arglist" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1518 "ael.tab.c"
- break;
- case 58: /* "elements" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1526 "ael.tab.c"
- break;
- case 59: /* "element" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1534 "ael.tab.c"
- break;
- case 60: /* "ignorepat" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1542 "ael.tab.c"
- break;
- case 61: /* "extension" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1550 "ael.tab.c"
- break;
- case 62: /* "statements" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1558 "ael.tab.c"
- break;
- case 63: /* "timerange" */
-#line 178 "ael.y"
- { free((yyvaluep->str));};
-#line 1563 "ael.tab.c"
- break;
- case 64: /* "timespec" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1571 "ael.tab.c"
- break;
- case 65: /* "test_expr" */
-#line 178 "ael.y"
- { free((yyvaluep->str));};
-#line 1576 "ael.tab.c"
- break;
- case 67: /* "if_like_head" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1584 "ael.tab.c"
- break;
- case 68: /* "word_list" */
-#line 178 "ael.y"
- { free((yyvaluep->str));};
-#line 1589 "ael.tab.c"
- break;
- case 70: /* "word3_list" */
-#line 178 "ael.y"
- { free((yyvaluep->str));};
-#line 1594 "ael.tab.c"
- break;
- case 71: /* "goto_word" */
-#line 178 "ael.y"
- { free((yyvaluep->str));};
-#line 1599 "ael.tab.c"
- break;
- case 72: /* "switch_statement" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1607 "ael.tab.c"
- break;
- case 73: /* "statement" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1615 "ael.tab.c"
- break;
- case 78: /* "opt_else" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1623 "ael.tab.c"
- break;
- case 79: /* "target" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1631 "ael.tab.c"
- break;
- case 80: /* "opt_pri" */
-#line 178 "ael.y"
- { free((yyvaluep->str));};
-#line 1636 "ael.tab.c"
- break;
- case 81: /* "jumptarget" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1644 "ael.tab.c"
- break;
- case 82: /* "macro_call" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1652 "ael.tab.c"
- break;
- case 84: /* "application_call_head" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1660 "ael.tab.c"
- break;
- case 86: /* "application_call" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1668 "ael.tab.c"
- break;
- case 87: /* "opt_word" */
-#line 178 "ael.y"
- { free((yyvaluep->str));};
-#line 1673 "ael.tab.c"
- break;
- case 88: /* "eval_arglist" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1681 "ael.tab.c"
- break;
- case 89: /* "case_statements" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1689 "ael.tab.c"
- break;
- case 90: /* "case_statement" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1697 "ael.tab.c"
- break;
- case 91: /* "macro_statements" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1705 "ael.tab.c"
- break;
- case 92: /* "macro_statement" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1713 "ael.tab.c"
- break;
- case 93: /* "switches" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1721 "ael.tab.c"
- break;
- case 94: /* "eswitches" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1729 "ael.tab.c"
- break;
- case 95: /* "switchlist" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1737 "ael.tab.c"
- break;
- case 96: /* "included_entry" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1745 "ael.tab.c"
- break;
- case 97: /* "includeslist" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1753 "ael.tab.c"
- break;
- case 98: /* "includes" */
-#line 165 "ael.y"
- {
- destroy_pval((yyvaluep->pval));
- prev_word=0;
- };
-#line 1761 "ael.tab.c"
- break;
-
- default:
- break;
- }
-}
-
-
-/* Prevent warnings from -Wmissing-prototypes. */
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (struct parse_io *parseio);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (struct parse_io *parseio)
-#else
-int
-yyparse (parseio)
- struct parse_io *parseio;
-#endif
-#endif
-{
- /* The look-ahead symbol. */
-int yychar;
-
-/* The semantic value of the look-ahead symbol. */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
-YYLTYPE yylloc;
-
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
-
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
-
- YYSIZE_T yystacksize = YYINITDEPTH;
-
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
- YYLTYPE yyloc;
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss;
- yyvsp = yyvs;
- yylsp = yyls;
-#if YYLTYPE_IS_TRIVIAL
- /* Initialize the default location before parsing starts. */
- yylloc.first_line = yylloc.last_line = 1;
- yylloc.first_column = yylloc.last_column = 0;
-#endif
-
- goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
- yysetstate:
- *yyssp = yystate;
-
- if (yyss + yystacksize - 1 <= yyssp)
- {
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
- YYLTYPE *yyls1 = yyls;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yyls1, yysize * sizeof (*yylsp),
- &yystacksize);
- yyls = yyls1;
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
- yylsp = yyls + yysize - 1;
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
- /* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to look-ahead token. */
- yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
- goto yydefault;
-
- /* Not known => get a look-ahead token if don't already have one. */
-
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
-
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the look-ahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- yystate = yyn;
- *++yyvsp = yylval;
- *++yylsp = yylloc;
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
- /* Default location. */
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 2:
-#line 186 "ael.y"
- { (yyval.pval) = parseio->pval = (yyvsp[(1) - (1)].pval); ;}
- break;
-
- case 3:
-#line 189 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 4:
-#line 190 "ael.y"
- { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
- break;
-
- case 5:
-#line 191 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
- break;
-
- case 6:
-#line 194 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 7:
-#line 195 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 8:
-#line 196 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 9:
-#line 197 "ael.y"
- {(yyval.pval)=0;/* allow older docs to be read */;}
- break;
-
- case 10:
-#line 200 "ael.y"
- { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
- break;
-
- case 11:
-#line 201 "ael.y"
- { (yyval.str) = strdup("default"); ;}
- break;
-
- case 12:
-#line 204 "ael.y"
- {
- if (!(yyvsp[(5) - (6)].pval)) {
- ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Warning! The empty context %s will be IGNORED!\n",
- my_file, (yylsp[(4) - (6)]).first_line, (yylsp[(4) - (6)]).first_column, (yylsp[(4) - (6)]).last_column, (yyvsp[(3) - (6)].str) );
- free((yyvsp[(3) - (6)].str));
-
- } else {
- (yyval.pval) = npval2(PV_CONTEXT, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
- (yyval.pval)->u1.str = (yyvsp[(3) - (6)].str);
- (yyval.pval)->u2.statements = (yyvsp[(5) - (6)].pval);
- set_dads((yyval.pval),(yyvsp[(5) - (6)].pval));
- (yyval.pval)->u3.abstract = (yyvsp[(1) - (6)].intval);} ;}
- break;
-
- case 13:
-#line 219 "ael.y"
- { (yyval.intval) = 1; ;}
- break;
-
- case 14:
-#line 220 "ael.y"
- { (yyval.intval) = 0; ;}
- break;
-
- case 15:
-#line 223 "ael.y"
- {
- (yyval.pval) = npval2(PV_MACRO, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
- (yyval.pval)->u1.str = (yyvsp[(2) - (8)].str); (yyval.pval)->u2.arglist = (yyvsp[(4) - (8)].pval); (yyval.pval)->u3.macro_statements = (yyvsp[(7) - (8)].pval);
- set_dads((yyval.pval),(yyvsp[(7) - (8)].pval));;}
- break;
-
- case 16:
-#line 229 "ael.y"
- {
- (yyval.pval) = npval2(PV_GLOBALS, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
- (yyval.pval)->u1.statements = (yyvsp[(3) - (4)].pval);
- set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
- break;
-
- case 17:
-#line 235 "ael.y"
- { (yyval.pval) = NULL; ;}
- break;
-
- case 18:
-#line 236 "ael.y"
- {(yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
- break;
-
- case 19:
-#line 237 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
- break;
-
- case 20:
-#line 240 "ael.y"
- { reset_semicount(parseio->scanner); ;}
- break;
-
- case 21:
-#line 240 "ael.y"
- {
- (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
- (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
- (yyval.pval)->u2.val = (yyvsp[(4) - (5)].str); ;}
- break;
-
- case 22:
-#line 246 "ael.y"
- { reset_semicount(parseio->scanner); ;}
- break;
-
- case 23:
-#line 246 "ael.y"
- {
- (yyval.pval) = npval2(PV_LOCALVARDEC, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)]));
- (yyval.pval)->u1.str = (yyvsp[(2) - (6)].str);
- (yyval.pval)->u2.val = (yyvsp[(5) - (6)].str); ;}
- break;
-
- case 24:
-#line 253 "ael.y"
- { (yyval.pval) = NULL; ;}
- break;
-
- case 25:
-#line 254 "ael.y"
- { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
- break;
-
- case 26:
-#line 255 "ael.y"
- { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); ;}
- break;
-
- case 27:
-#line 256 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
- break;
-
- case 28:
-#line 259 "ael.y"
- {(yyval.pval)=0;;}
- break;
-
- case 29:
-#line 260 "ael.y"
- { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
- break;
-
- case 30:
-#line 261 "ael.y"
- { (yyval.pval)=(yyvsp[(1) - (2)].pval);;}
- break;
-
- case 31:
-#line 264 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 32:
-#line 265 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 33:
-#line 266 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 34:
-#line 267 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 35:
-#line 268 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 36:
-#line 269 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 37:
-#line 270 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 38:
-#line 271 "ael.y"
- {free((yyvsp[(1) - (2)].str)); (yyval.pval)=0;;}
- break;
-
- case 39:
-#line 272 "ael.y"
- {(yyval.pval)=0;/* allow older docs to be read */;}
- break;
-
- case 40:
-#line 275 "ael.y"
- {
- (yyval.pval) = npval2(PV_IGNOREPAT, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
- (yyval.pval)->u1.str = (yyvsp[(3) - (4)].str);;}
- break;
-
- case 41:
-#line 280 "ael.y"
- {
- (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
- (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
- (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;}
- break;
-
- case 42:
-#line 284 "ael.y"
- {
- (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
- (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
- (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));
- (yyval.pval)->u4.regexten=1;;}
- break;
-
- case 43:
-#line 289 "ael.y"
- {
- (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (7)]), &(yylsp[(7) - (7)]));
- (yyval.pval)->u1.str = (yyvsp[(5) - (7)].str);
- (yyval.pval)->u2.statements = (yyvsp[(7) - (7)].pval); set_dads((yyval.pval),(yyvsp[(7) - (7)].pval));
- (yyval.pval)->u3.hints = (yyvsp[(3) - (7)].str);;}
- break;
-
- case 44:
-#line 294 "ael.y"
- {
- (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)]));
- (yyval.pval)->u1.str = (yyvsp[(6) - (8)].str);
- (yyval.pval)->u2.statements = (yyvsp[(8) - (8)].pval); set_dads((yyval.pval),(yyvsp[(8) - (8)].pval));
- (yyval.pval)->u4.regexten=1;
- (yyval.pval)->u3.hints = (yyvsp[(4) - (8)].str);;}
- break;
-
- case 45:
-#line 304 "ael.y"
- { (yyval.pval) = NULL; ;}
- break;
-
- case 46:
-#line 305 "ael.y"
- { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
- break;
-
- case 47:
-#line 306 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
- break;
-
- case 48:
-#line 312 "ael.y"
- {
- asprintf(&(yyval.str), "%s:%s:%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str));
- free((yyvsp[(1) - (5)].str));
- free((yyvsp[(3) - (5)].str));
- free((yyvsp[(5) - (5)].str)); ;}
- break;
-
- case 49:
-#line 317 "ael.y"
- { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
- break;
-
- case 50:
-#line 321 "ael.y"
- {
- (yyval.pval) = nword((yyvsp[(1) - (7)].str), &(yylsp[(1) - (7)]));
- (yyval.pval)->next = nword((yyvsp[(3) - (7)].str), &(yylsp[(3) - (7)]));
- (yyval.pval)->next->next = nword((yyvsp[(5) - (7)].str), &(yylsp[(5) - (7)]));
- (yyval.pval)->next->next->next = nword((yyvsp[(7) - (7)].str), &(yylsp[(7) - (7)])); ;}
- break;
-
- case 51:
-#line 329 "ael.y"
- { reset_parencount(parseio->scanner); ;}
- break;
-
- case 52:
-#line 329 "ael.y"
- { (yyval.str) = (yyvsp[(3) - (4)].str); ;}
- break;
-
- case 53:
-#line 333 "ael.y"
- {
- (yyval.pval)= npval2(PV_IF, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
- (yyval.pval)->u1.str = (yyvsp[(2) - (2)].str); ;}
- break;
-
- case 54:
-#line 336 "ael.y"
- {
- (yyval.pval) = npval2(PV_RANDOM, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
- (yyval.pval)->u1.str=(yyvsp[(2) - (2)].str);;}
- break;
-
- case 55:
-#line 339 "ael.y"
- {
- (yyval.pval) = npval2(PV_IFTIME, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
- (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);
- prev_word = 0; ;}
- break;
-
- case 56:
-#line 350 "ael.y"
- { (yyval.str) = (yyvsp[(1) - (1)].str);;}
- break;
-
- case 57:
-#line 351 "ael.y"
- {
- asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
- free((yyvsp[(1) - (2)].str));
- free((yyvsp[(2) - (2)].str));
- prev_word = (yyval.str);;}
- break;
-
- case 58:
-#line 358 "ael.y"
- { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
- break;
-
- case 59:
-#line 359 "ael.y"
- {
- asprintf(&((yyval.str)), "%s %s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
- free((yyvsp[(1) - (2)].str));
- free((yyvsp[(2) - (2)].str)); ;}
- break;
-
- case 60:
-#line 363 "ael.y"
- { /* there are often '&' in hints */
- asprintf(&((yyval.str)), "%s&%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str));
- free((yyvsp[(1) - (3)].str));
- free((yyvsp[(3) - (3)].str));;}
- break;
-
- case 61:
-#line 369 "ael.y"
- { (yyval.str) = (yyvsp[(1) - (1)].str);;}
- break;
-
- case 62:
-#line 370 "ael.y"
- {
- asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
- free((yyvsp[(1) - (2)].str));
- free((yyvsp[(2) - (2)].str));
- prev_word = (yyval.str);;}
- break;
-
- case 63:
-#line 375 "ael.y"
- {
- asprintf(&((yyval.str)), "%s%s%s", (yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str));
- free((yyvsp[(1) - (3)].str));
- free((yyvsp[(2) - (3)].str));
- free((yyvsp[(3) - (3)].str));
- prev_word=(yyval.str);;}
- break;
-
- case 64:
-#line 383 "ael.y"
- { (yyval.str) = (yyvsp[(1) - (1)].str);;}
- break;
-
- case 65:
-#line 384 "ael.y"
- {
- asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
- free((yyvsp[(1) - (2)].str));
- free((yyvsp[(2) - (2)].str));;}
- break;
-
- case 66:
-#line 388 "ael.y"
- {
- asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str));
- free((yyvsp[(1) - (3)].str));
- free((yyvsp[(3) - (3)].str));;}
- break;
-
- case 67:
-#line 394 "ael.y"
- {
- (yyval.pval) = npval2(PV_SWITCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
- (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
- (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));;}
- break;
-
- case 68:
-#line 403 "ael.y"
- {
- (yyval.pval) = npval2(PV_STATEMENTBLOCK, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
- (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));;}
- break;
-
- case 69:
-#line 406 "ael.y"
- { (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
- break;
-
- case 70:
-#line 407 "ael.y"
- { (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
- break;
-
- case 71:
-#line 408 "ael.y"
- {
- (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
- (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);;}
- break;
-
- case 72:
-#line 411 "ael.y"
- {
- (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
- (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);;}
- break;
-
- case 73:
-#line 414 "ael.y"
- {
- (yyval.pval) = npval2(PV_LABEL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
- (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str); ;}
- break;
-
- case 74:
-#line 417 "ael.y"
- {reset_semicount(parseio->scanner);;}
- break;
-
- case 75:
-#line 418 "ael.y"
- {reset_semicount(parseio->scanner);;}
- break;
-
- case 76:
-#line 419 "ael.y"
- {reset_parencount(parseio->scanner);;}
- break;
-
- case 77:
-#line 419 "ael.y"
- { /* XXX word_list maybe ? */
- (yyval.pval) = npval2(PV_FOR, &(yylsp[(1) - (12)]), &(yylsp[(12) - (12)]));
- (yyval.pval)->u1.for_init = (yyvsp[(4) - (12)].str);
- (yyval.pval)->u2.for_test=(yyvsp[(7) - (12)].str);
- (yyval.pval)->u3.for_inc = (yyvsp[(10) - (12)].str);
- (yyval.pval)->u4.for_statements = (yyvsp[(12) - (12)].pval); set_dads((yyval.pval),(yyvsp[(12) - (12)].pval));;}
- break;
-
- case 78:
-#line 425 "ael.y"
- {
- (yyval.pval) = npval2(PV_WHILE, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
- (yyval.pval)->u1.str = (yyvsp[(2) - (3)].str);
- (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;}
- break;
-
- case 79:
-#line 429 "ael.y"
- { (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
- break;
-
- case 80:
-#line 430 "ael.y"
- { (yyval.pval) = update_last((yyvsp[(2) - (3)].pval), &(yylsp[(2) - (3)])); ;}
- break;
-
- case 81:
-#line 431 "ael.y"
- { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;}
- break;
-
- case 82:
-#line 432 "ael.y"
- {
- (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
- (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str);;}
- break;
-
- case 83:
-#line 435 "ael.y"
- {reset_semicount(parseio->scanner);;}
- break;
-
- case 84:
-#line 435 "ael.y"
- {
- char *bufx;
- int tot=0;
- pval *pptr;
- (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
- (yyval.pval)->u2.val=(yyvsp[(4) - (5)].str);
- /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
- /* string to big to fit in the buffer? */
- tot+=strlen((yyvsp[(1) - (5)].pval)->u1.str);
- for(pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
- tot+=strlen(pptr->u1.str);
- tot++; /* for a sep like a comma */
- }
- tot+=4; /* for safety */
- bufx = calloc(1, tot);
- strcpy(bufx,(yyvsp[(1) - (5)].pval)->u1.str);
- strcat(bufx,"(");
- /* XXX need to advance the pointer or the loop is very inefficient */
- for (pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) {
- if ( pptr != (yyvsp[(1) - (5)].pval)->u2.arglist )
- strcat(bufx,",");
- strcat(bufx,pptr->u1.str);
- }
- strcat(bufx,")");
-#ifdef AAL_ARGCHECK
- if ( !ael_is_funcname((yyvsp[(1) - (5)].pval)->u1.str) )
- ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Function call? The name %s is not in my internal list of function names\n",
- my_file, (yylsp[(1) - (5)]).first_line, (yylsp[(1) - (5)]).first_column, (yylsp[(1) - (5)]).last_column, (yyvsp[(1) - (5)].pval)->u1.str);
-#endif
- (yyval.pval)->u1.str = bufx;
- destroy_pval((yyvsp[(1) - (5)].pval)); /* the app call it is not, get rid of that chain */
- prev_word = 0;
- ;}
- break;
-
- case 85:
-#line 468 "ael.y"
- { (yyval.pval) = npval2(PV_BREAK, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
- break;
-
- case 86:
-#line 469 "ael.y"
- { (yyval.pval) = npval2(PV_RETURN, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
- break;
-
- case 87:
-#line 470 "ael.y"
- { (yyval.pval) = npval2(PV_CONTINUE, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
- break;
-
- case 88:
-#line 471 "ael.y"
- {
- (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(2) - (3)]));
- (yyval.pval)->u2.statements = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));
- (yyval.pval)->u3.else_statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;}
- break;
-
- case 89:
-#line 475 "ael.y"
- { (yyval.pval)=0; ;}
- break;
-
- case 90:
-#line 478 "ael.y"
- { (yyval.pval) = (yyvsp[(2) - (2)].pval); ;}
- break;
-
- case 91:
-#line 479 "ael.y"
- { (yyval.pval) = NULL ; ;}
- break;
-
- case 92:
-#line 482 "ael.y"
- { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
- break;
-
- case 93:
-#line 483 "ael.y"
- {
- (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
- (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); ;}
- break;
-
- case 94:
-#line 486 "ael.y"
- {
- (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
- (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); ;}
- break;
-
- case 95:
-#line 489 "ael.y"
- {
- (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
- (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
- (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;}
- break;
-
- case 96:
-#line 493 "ael.y"
- {
- (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
- (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
- (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;}
- break;
-
- case 97:
-#line 497 "ael.y"
- {
- (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
- (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
- (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;}
- break;
-
- case 98:
-#line 501 "ael.y"
- {
- (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
- (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
- (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;}
- break;
-
- case 99:
-#line 507 "ael.y"
- { (yyval.str) = strdup("1"); ;}
- break;
-
- case 100:
-#line 508 "ael.y"
- { (yyval.str) = (yyvsp[(2) - (2)].str); ;}
- break;
-
- case 101:
-#line 512 "ael.y"
- { /* ext[, pri] default 1 */
- (yyval.pval) = nword((yyvsp[(1) - (2)].str), &(yylsp[(1) - (2)]));
- (yyval.pval)->next = nword((yyvsp[(2) - (2)].str), &(yylsp[(2) - (2)])); ;}
- break;
-
- case 102:
-#line 515 "ael.y"
- { /* context, ext, pri */
- (yyval.pval) = nword((yyvsp[(4) - (4)].str), &(yylsp[(4) - (4)]));
- (yyval.pval)->next = nword((yyvsp[(1) - (4)].str), &(yylsp[(1) - (4)]));
- (yyval.pval)->next->next = nword((yyvsp[(2) - (4)].str), &(yylsp[(2) - (4)])); ;}
- break;
-
- case 103:
-#line 521 "ael.y"
- {reset_argcount(parseio->scanner);;}
- break;
-
- case 104:
-#line 521 "ael.y"
- {
- /* XXX original code had @2 but i think we need @5 */
- (yyval.pval) = npval2(PV_MACRO_CALL, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
- (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str);
- (yyval.pval)->u2.arglist = (yyvsp[(4) - (5)].pval);;}
- break;
-
- case 105:
-#line 526 "ael.y"
- {
- (yyval.pval)= npval2(PV_MACRO_CALL, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
- (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); ;}
- break;
-
- case 106:
-#line 534 "ael.y"
- {reset_argcount(parseio->scanner);;}
- break;
-
- case 107:
-#line 534 "ael.y"
- {
- if (strcasecmp((yyvsp[(1) - (3)].str),"goto") == 0) {
- (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
- free((yyvsp[(1) - (3)].str)); /* won't be using this */
- ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Suggestion: Use the goto statement instead of the Goto() application call in AEL.\n", my_file, (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column );
- } else {
- (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
- (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str);
- } ;}
- break;
-
- case 108:
-#line 545 "ael.y"
- {
- (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(3) - (3)]));
- if( (yyval.pval)->type == PV_GOTO )
- (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);
- else
- (yyval.pval)->u2.arglist = (yyvsp[(2) - (3)].pval);
- ;}
- break;
-
- case 109:
-#line 552 "ael.y"
- { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;}
- break;
-
- case 110:
-#line 555 "ael.y"
- { (yyval.str) = (yyvsp[(1) - (1)].str) ;}
- break;
-
- case 111:
-#line 556 "ael.y"
- { (yyval.str) = strdup(""); ;}
- break;
-
- case 112:
-#line 559 "ael.y"
- { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
- break;
-
- case 113:
-#line 560 "ael.y"
- {
- (yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/);
- (yyval.pval)->u1.str = strdup(""); ;}
- break;
-
- case 114:
-#line 563 "ael.y"
- { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); ;}
- break;
-
- case 115:
-#line 566 "ael.y"
- { (yyval.pval) = NULL; ;}
- break;
-
- case 116:
-#line 567 "ael.y"
- { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
- break;
-
- case 117:
-#line 570 "ael.y"
- {
- (yyval.pval) = npval2(PV_CASE, &(yylsp[(1) - (4)]), &(yylsp[(3) - (4)])); /* XXX 3 or 4 ? */
- (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
- (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));;}
- break;
-
- case 118:
-#line 574 "ael.y"
- {
- (yyval.pval) = npval2(PV_DEFAULT, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
- (yyval.pval)->u1.str = NULL;
- (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;}
- break;
-
- case 119:
-#line 578 "ael.y"
- {
- (yyval.pval) = npval2(PV_PATTERN, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); /* XXX@3 or @4 ? */
- (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
- (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval);set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));;}
- break;
-
- case 120:
-#line 584 "ael.y"
- { (yyval.pval) = NULL; ;}
- break;
-
- case 121:
-#line 585 "ael.y"
- { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
- break;
-
- case 122:
-#line 588 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 123:
-#line 589 "ael.y"
- { (yyval.pval)=(yyvsp[(1) - (1)].pval);;}
- break;
-
- case 124:
-#line 590 "ael.y"
- {
- (yyval.pval) = npval2(PV_CATCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
- (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
- (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));;}
- break;
-
- case 125:
-#line 596 "ael.y"
- {
- (yyval.pval) = npval2(PV_SWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
- (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
- break;
-
- case 126:
-#line 601 "ael.y"
- {
- (yyval.pval) = npval2(PV_ESWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
- (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
- break;
-
- case 127:
-#line 606 "ael.y"
- { (yyval.pval) = NULL; ;}
- break;
-
- case 128:
-#line 607 "ael.y"
- { (yyval.pval) = linku1(nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)])), (yyvsp[(3) - (3)].pval)); ;}
- break;
-
- case 129:
-#line 608 "ael.y"
- { char *x; asprintf(&x,"%s@%s", (yyvsp[(1) - (5)].str),(yyvsp[(3) - (5)].str)); free((yyvsp[(1) - (5)].str)); free((yyvsp[(3) - (5)].str));
- (yyval.pval) = linku1(nword(x, &(yylsp[(1) - (5)])), (yyvsp[(5) - (5)].pval));;}
- break;
-
- case 130:
-#line 610 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
- break;
-
- case 131:
-#line 613 "ael.y"
- { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
- break;
-
- case 132:
-#line 614 "ael.y"
- {
- (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
- (yyval.pval)->u2.arglist = (yyvsp[(3) - (3)].pval);
- prev_word=0; /* XXX sure ? */ ;}
- break;
-
- case 133:
-#line 621 "ael.y"
- { (yyval.pval) = (yyvsp[(1) - (2)].pval); ;}
- break;
-
- case 134:
-#line 622 "ael.y"
- { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), (yyvsp[(2) - (3)].pval)); ;}
- break;
-
- case 135:
-#line 623 "ael.y"
- {(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
- break;
-
- case 136:
-#line 626 "ael.y"
- {
- (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
- (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
- break;
-
- case 137:
-#line 629 "ael.y"
- {
- (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));;}
- break;
-
-
-/* Line 1270 of yacc.c. */
-#line 2968 "ael.tab.c"
- default: break;
- }
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
- *++yylsp = yyloc;
-
- /* Now `shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (&yylloc, parseio, YY_("syntax error"));
-#else
- {
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (&yylloc, parseio, yymsg);
- }
- else
- {
- yyerror (&yylloc, parseio, YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
- }
-#endif
- }
-
- yyerror_range[0] = yylloc;
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse look-ahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, &yylloc, parseio);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse look-ahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- yyerror_range[0] = yylsp[1-yylen];
- /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
- yyerror_range[0] = *yylsp;
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp, yylsp, parseio);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- *++yyvsp = yylval;
-
- yyerror_range[1] = yylloc;
- /* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
- *++yylsp = yyloc;
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#ifndef yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (&yylloc, parseio, YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
-#endif
-
-yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, &yylloc, parseio);
- /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp, yylsp, parseio);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
- return yyresult;
-}
-
-
-#line 634 "ael.y"
-
-
-static char *token_equivs1[] =
-{
- "AMPER",
- "AT",
- "BAR",
- "COLON",
- "COMMA",
- "EQ",
- "EXTENMARK",
- "KW_BREAK",
- "KW_CASE",
- "KW_CATCH",
- "KW_CONTEXT",
- "KW_CONTINUE",
- "KW_DEFAULT",
- "KW_ELSE",
- "KW_ESWITCHES",
- "KW_FOR",
- "KW_GLOBALS",
- "KW_GOTO",
- "KW_HINT",
- "KW_IFTIME",
- "KW_IF",
- "KW_IGNOREPAT",
- "KW_INCLUDES"
- "KW_JUMP",
- "KW_MACRO",
- "KW_PATTERN",
- "KW_REGEXTEN",
- "KW_RETURN",
- "KW_SWITCHES",
- "KW_SWITCH",
- "KW_WHILE",
- "LC",
- "LP",
- "RC",
- "RP",
- "SEMI",
-};
-
-static char *token_equivs2[] =
-{
- "&",
- "@",
- "|",
- ":",
- ",",
- "=",
- "=>",
- "break",
- "case",
- "catch",
- "context",
- "continue",
- "default",
- "else",
- "eswitches",
- "for",
- "globals",
- "goto",
- "hint",
- "ifTime",
- "if",
- "ignorepat",
- "includes"
- "jump",
- "macro",
- "pattern",
- "regexten",
- "return",
- "switches",
- "switch",
- "while",
- "{",
- "(",
- "}",
- ")",
- ";",
-};
-
-
-static char *ael_token_subst(char *mess)
-{
- /* calc a length, malloc, fill, and return; yyerror had better free it! */
- int len=0,i;
- char *p;
- char *res, *s,*t;
- int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*);
-
- for (p=mess; *p; p++) {
- for (i=0; i<token_equivs_entries; i++) {
- if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 )
- {
- len+=strlen(token_equivs2[i])+2;
- p += strlen(token_equivs1[i])-1;
- break;
- }
- }
- len++;
- }
- res = calloc(1, len+1);
- res[0] = 0;
- s = res;
- for (p=mess; *p;) {
- int found = 0;
- for (i=0; i<token_equivs_entries; i++) {
- if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) {
- *s++ = '\'';
- for (t=token_equivs2[i]; *t;) {
- *s++ = *t++;
- }
- *s++ = '\'';
- p += strlen(token_equivs1[i]);
- found = 1;
- break;
- }
- }
- if( !found )
- *s++ = *p++;
- }
- *s++ = 0;
- return res;
-}
-
-void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s)
-{
- char *s2 = ael_token_subst((char *)s);
- if (locp->first_line == locp->last_line) {
- ast_log(LOG_ERROR, "==== File: %s, Line %d, Cols: %d-%d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_column, s2);
- } else {
- ast_log(LOG_ERROR, "==== File: %s, Line %d Col %d to Line %d Col %d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_line, locp->last_column, s2);
- }
- free(s2);
- parseio->syntax_error_count++;
-}
-
-static struct pval *npval(pvaltype type, int first_line, int last_line,
- int first_column, int last_column)
-{
- pval *z = calloc(1, sizeof(struct pval));
- z->type = type;
- z->startline = first_line;
- z->endline = last_line;
- z->startcol = first_column;
- z->endcol = last_column;
- z->filename = strdup(my_file);
- return z;
-}
-
-static struct pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last)
-{
- return npval(type, first->first_line, last->last_line,
- first->first_column, last->last_column);
-}
-
-static struct pval *update_last(pval *obj, YYLTYPE *last)
-{
- obj->endline = last->last_line;
- obj->endcol = last->last_column;
- return obj;
-}
-
-/* frontend for npval to create a PV_WORD string from the given token */
-static pval *nword(char *string, YYLTYPE *pos)
-{
- pval *p = npval2(PV_WORD, pos, pos);
- if (p)
- p->u1.str = string;
- return p;
-}
-
-/* append second element to the list in the first one */
-static pval * linku1(pval *head, pval *tail)
-{
- if (!head)
- return tail;
- if (tail) {
- if (!head->next) {
- head->next = tail;
- } else {
- head->u1_last->next = tail;
- }
- head->u1_last = tail;
- tail->prev = head; /* the dad link only points to containers */
- }
- return head;
-}
-
-/* this routine adds a dad ptr to each element in the list */
-static void set_dads(struct pval *dad, struct pval *child_list)
-{
- struct pval *t;
-
- for(t=child_list;t;t=t->next) /* simple stuff */
- t->dad = dad;
-}
-
-
diff --git a/pbx/ael/ael.tab.h b/pbx/ael/ael.tab.h
deleted file mode 100644
index 4036c07f7..000000000
--- a/pbx/ael/ael.tab.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.1a. */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- KW_CONTEXT = 258,
- LC = 259,
- RC = 260,
- LP = 261,
- RP = 262,
- SEMI = 263,
- EQ = 264,
- COMMA = 265,
- COLON = 266,
- AMPER = 267,
- BAR = 268,
- AT = 269,
- KW_MACRO = 270,
- KW_GLOBALS = 271,
- KW_IGNOREPAT = 272,
- KW_SWITCH = 273,
- KW_IF = 274,
- KW_IFTIME = 275,
- KW_ELSE = 276,
- KW_RANDOM = 277,
- KW_ABSTRACT = 278,
- EXTENMARK = 279,
- KW_GOTO = 280,
- KW_JUMP = 281,
- KW_RETURN = 282,
- KW_BREAK = 283,
- KW_CONTINUE = 284,
- KW_REGEXTEN = 285,
- KW_HINT = 286,
- KW_FOR = 287,
- KW_WHILE = 288,
- KW_CASE = 289,
- KW_PATTERN = 290,
- KW_DEFAULT = 291,
- KW_CATCH = 292,
- KW_SWITCHES = 293,
- KW_ESWITCHES = 294,
- KW_INCLUDES = 295,
- KW_LOCAL = 296,
- word = 297
- };
-#endif
-/* Tokens. */
-#define KW_CONTEXT 258
-#define LC 259
-#define RC 260
-#define LP 261
-#define RP 262
-#define SEMI 263
-#define EQ 264
-#define COMMA 265
-#define COLON 266
-#define AMPER 267
-#define BAR 268
-#define AT 269
-#define KW_MACRO 270
-#define KW_GLOBALS 271
-#define KW_IGNOREPAT 272
-#define KW_SWITCH 273
-#define KW_IF 274
-#define KW_IFTIME 275
-#define KW_ELSE 276
-#define KW_RANDOM 277
-#define KW_ABSTRACT 278
-#define EXTENMARK 279
-#define KW_GOTO 280
-#define KW_JUMP 281
-#define KW_RETURN 282
-#define KW_BREAK 283
-#define KW_CONTINUE 284
-#define KW_REGEXTEN 285
-#define KW_HINT 286
-#define KW_FOR 287
-#define KW_WHILE 288
-#define KW_CASE 289
-#define KW_PATTERN 290
-#define KW_DEFAULT 291
-#define KW_CATCH 292
-#define KW_SWITCHES 293
-#define KW_ESWITCHES 294
-#define KW_INCLUDES 295
-#define KW_LOCAL 296
-#define word 297
-
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 54 "ael.y"
-{
- int intval; /* integer value, typically flags */
- char *str; /* strings */
- struct pval *pval; /* full objects */
-}
-/* Line 1536 of yacc.c. */
-#line 129 "ael.tab.h"
- YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE
-{
- int first_line;
- int first_column;
- int last_line;
- int last_column;
-} YYLTYPE;
-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-
diff --git a/pbx/ael/ael.y b/pbx/ael/ael.y
deleted file mode 100644
index 9aee66687..000000000
--- a/pbx/ael/ael.y
+++ /dev/null
@@ -1,832 +0,0 @@
-%{
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2006, Digium, Inc.
- *
- * Steve Murphy <murf@parsetree.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-/*! \file
- *
- * \brief Bison Grammar description of AEL2.
- *
- */
-
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "asterisk/logger.h"
-#include "asterisk/ael_structs.h"
-
-static pval * linku1(pval *head, pval *tail);
-static void set_dads(pval *dad, pval *child_list);
-void reset_parencount(yyscan_t yyscanner);
-void reset_semicount(yyscan_t yyscanner);
-void reset_argcount(yyscan_t yyscanner );
-
-#define YYLEX_PARAM ((struct parse_io *)parseio)->scanner
-#define YYERROR_VERBOSE 1
-
-extern char *my_file;
-#ifdef AAL_ARGCHECK
-int ael_is_funcname(char *name);
-#endif
-static char *ael_token_subst(char *mess);
-
-%}
-
-
-%union {
- int intval; /* integer value, typically flags */
- char *str; /* strings */
- struct pval *pval; /* full objects */
-}
-
-%{
- /* declaring these AFTER the union makes things a lot simpler! */
-void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s);
-int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , void * yyscanner);
-
-/* create a new object with start-end marker */
-static pval *npval(pvaltype type, int first_line, int last_line,
- int first_column, int last_column);
-
-/* create a new object with start-end marker, simplified interface.
- * Must be declared here because YYLTYPE is not known before
- */
-static pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last);
-
-/* another frontend for npval, this time for a string */
-static pval *nword(char *string, YYLTYPE *pos);
-
-/* update end position of an object, return the object */
-static pval *update_last(pval *, YYLTYPE *);
-%}
-
-
-%token KW_CONTEXT LC RC LP RP SEMI EQ COMMA COLON AMPER BAR AT
-%token KW_MACRO KW_GLOBALS KW_IGNOREPAT KW_SWITCH KW_IF KW_IFTIME KW_ELSE KW_RANDOM KW_ABSTRACT
-%token EXTENMARK KW_GOTO KW_JUMP KW_RETURN KW_BREAK KW_CONTINUE KW_REGEXTEN KW_HINT
-%token KW_FOR KW_WHILE KW_CASE KW_PATTERN KW_DEFAULT KW_CATCH KW_SWITCHES KW_ESWITCHES
-%token KW_INCLUDES KW_LOCAL
-
-%right BAR COMMA
-
-%token <str> word
-
-%type <pval>includes
-%type <pval>includeslist
-%type <pval>switchlist
-%type <pval>eswitches
-%type <pval>switches
-%type <pval>macro_statement
-%type <pval>macro_statements
-%type <pval>case_statement
-%type <pval>case_statements
-%type <pval>eval_arglist
-%type <pval>application_call
-%type <pval>application_call_head
-%type <pval>macro_call
-%type <pval>target jumptarget
-%type <pval>statement
-%type <pval>switch_statement
-
-%type <pval>if_like_head
-%type <pval>statements
-%type <pval>extension
-%type <pval>ignorepat
-%type <pval>element
-%type <pval>elements
-%type <pval>arglist
-%type <pval>assignment
-%type <pval>local_assignment
-%type <pval>global_statements
-%type <pval>globals
-%type <pval>macro
-%type <pval>context
-%type <pval>object
-%type <pval>objects
-%type <pval>file
-/* XXX lr changes */
-%type <pval>opt_else
-%type <pval>timespec
-%type <pval>included_entry
-
-%type <str>opt_word
-%type <str>context_name
-%type <str>timerange
-
-%type <str>goto_word
-%type <str>word_list
-%type <str>word3_list hint_word
-%type <str>test_expr
-%type <str>opt_pri
-
-%type <intval>opt_abstract
-
-/*
- * OPTIONS
- */
-
-%locations /* track source location using @n variables (yylloc in flex) */
-%pure-parser /* pass yylval and yylloc as arguments to yylex(). */
-%name-prefix="ael_yy"
-/*
- * add an additional argument, parseio, to yyparse(),
- * which is then accessible in the grammar actions
- */
-%parse-param {struct parse_io *parseio}
-
-/* there will be two shift/reduce conflicts, they involve the if statement, where a single statement occurs not wrapped in curlies in the "true" section
- the default action to shift will attach the else to the preceeding if. */
-%expect 8
-%error-verbose
-
-/*
- * declare destructors for objects.
- * The former is for pval, the latter for strings.
- * NOTE: we must not have a destructor for a 'file' object.
- */
-%destructor {
- destroy_pval($$);
- prev_word=0;
- } includes includeslist switchlist eswitches switches
- macro_statement macro_statements case_statement case_statements
- eval_arglist application_call application_call_head
- macro_call target jumptarget statement switch_statement
- if_like_head statements extension
- ignorepat element elements arglist assignment local_assignment
- global_statements globals macro context object objects
- opt_else
- timespec included_entry
-
-%destructor { free($$);} word word_list goto_word word3_list opt_word context_name
- timerange
- test_expr
- opt_pri
-
-
-%%
-
-file : objects { $$ = parseio->pval = $1; }
- ;
-
-objects : object {$$=$1;}
- | objects object { $$ = linku1($1, $2); }
- | objects error {$$=$1;}
- ;
-
-object : context {$$=$1;}
- | macro {$$=$1;}
- | globals {$$=$1;}
- | SEMI {$$=0;/* allow older docs to be read */}
- ;
-
-context_name : word { $$ = $1; }
- | KW_DEFAULT { $$ = strdup("default"); }
- ;
-
-context : opt_abstract KW_CONTEXT context_name LC elements RC {
- if (!$5) {
- ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Warning! The empty context %s will be IGNORED!\n",
- my_file, @4.first_line, @4.first_column, @4.last_column, $3 );
- free($3);
-
- } else {
- $$ = npval2(PV_CONTEXT, &@1, &@6);
- $$->u1.str = $3;
- $$->u2.statements = $5;
- set_dads($$,$5);
- $$->u3.abstract = $1;} }
- ;
-
-/* optional "abstract" keyword XXX there is no regression test for this */
-opt_abstract: KW_ABSTRACT { $$ = 1; }
- | /* nothing */ { $$ = 0; }
- ;
-
-macro : KW_MACRO word LP arglist RP LC macro_statements RC {
- $$ = npval2(PV_MACRO, &@1, &@8);
- $$->u1.str = $2; $$->u2.arglist = $4; $$->u3.macro_statements = $7;
- set_dads($$,$7);}
- ;
-
-globals : KW_GLOBALS LC global_statements RC {
- $$ = npval2(PV_GLOBALS, &@1, &@4);
- $$->u1.statements = $3;
- set_dads($$,$3);}
- ;
-
-global_statements : { $$ = NULL; }
- | assignment global_statements {$$ = linku1($1, $2); }
- | global_statements error {$$=$1;}
- ;
-
-assignment : word EQ { reset_semicount(parseio->scanner); } word SEMI {
- $$ = npval2(PV_VARDEC, &@1, &@5);
- $$->u1.str = $1;
- $$->u2.val = $4; }
- ;
-
-local_assignment : KW_LOCAL word EQ { reset_semicount(parseio->scanner); } word SEMI {
- $$ = npval2(PV_LOCALVARDEC, &@1, &@6);
- $$->u1.str = $2;
- $$->u2.val = $5; }
- ;
-
-/* XXX this matches missing arguments, is this desired ? */
-arglist : /* empty */ { $$ = NULL; }
- | word { $$ = nword($1, &@1); }
- | arglist COMMA word { $$ = linku1($1, nword($3, &@3)); }
- | arglist error {$$=$1;}
- ;
-
-elements : {$$=0;}
- | element elements { $$ = linku1($1, $2); }
- | elements error { $$=$1;}
- ;
-
-element : extension {$$=$1;}
- | includes {$$=$1;}
- | switches {$$=$1;}
- | eswitches {$$=$1;}
- | ignorepat {$$=$1;}
- | assignment {$$=$1;}
- | local_assignment {$$=$1;}
- | word error {free($1); $$=0;}
- | SEMI {$$=0;/* allow older docs to be read */}
- ;
-
-ignorepat : KW_IGNOREPAT EXTENMARK word SEMI {
- $$ = npval2(PV_IGNOREPAT, &@1, &@4);
- $$->u1.str = $3;}
- ;
-
-extension : word EXTENMARK statement {
- $$ = npval2(PV_EXTENSION, &@1, &@3);
- $$->u1.str = $1;
- $$->u2.statements = $3; set_dads($$,$3);}
- | KW_REGEXTEN word EXTENMARK statement {
- $$ = npval2(PV_EXTENSION, &@1, &@4);
- $$->u1.str = $2;
- $$->u2.statements = $4; set_dads($$,$4);
- $$->u4.regexten=1;}
- | KW_HINT LP hint_word RP word EXTENMARK statement {
- $$ = npval2(PV_EXTENSION, &@1, &@7);
- $$->u1.str = $5;
- $$->u2.statements = $7; set_dads($$,$7);
- $$->u3.hints = $3;}
- | KW_REGEXTEN KW_HINT LP hint_word RP word EXTENMARK statement {
- $$ = npval2(PV_EXTENSION, &@1, &@8);
- $$->u1.str = $6;
- $$->u2.statements = $8; set_dads($$,$8);
- $$->u4.regexten=1;
- $$->u3.hints = $4;}
-
- ;
-
-/* list of statements in a block or after a case label - can be empty */
-statements : /* empty */ { $$ = NULL; }
- | statement statements { $$ = linku1($1, $2); }
- | statements error {$$=$1;}
- ;
-
-/* hh:mm-hh:mm, due to the way the parser works we do not
- * detect the '-' but only the ':' as separator
- */
-timerange: word3_list COLON word3_list COLON word3_list {
- asprintf(&$$, "%s:%s:%s", $1, $3, $5);
- free($1);
- free($3);
- free($5); }
- | word { $$ = $1; }
- ;
-
-/* full time specification range|dow|*|* */
-timespec : timerange BAR word3_list BAR word3_list BAR word3_list {
- $$ = nword($1, &@1);
- $$->next = nword($3, &@3);
- $$->next->next = nword($5, &@5);
- $$->next->next->next = nword($7, &@7); }
- ;
-
-/* expression used in if, random, while, switch */
-test_expr : LP { reset_parencount(parseio->scanner); } word_list RP { $$ = $3; }
- ;
-
-/* 'if' like statements: if, iftime, random */
-if_like_head : KW_IF test_expr {
- $$= npval2(PV_IF, &@1, &@2);
- $$->u1.str = $2; }
- | KW_RANDOM test_expr {
- $$ = npval2(PV_RANDOM, &@1, &@2);
- $$->u1.str=$2;}
- | KW_IFTIME LP timespec RP {
- $$ = npval2(PV_IFTIME, &@1, &@4);
- $$->u1.list = $3;
- prev_word = 0; }
- ;
-
-/* word_list is a hack to fix a problem with context switching between bison and flex;
- by the time you register a new context with flex, you've already got a look-ahead token
- from the old context, with no way to put it back and start afresh. So, we kludge this
- and merge the words back together. */
-
-word_list : word { $$ = $1;}
- | word word {
- asprintf(&($$), "%s%s", $1, $2);
- free($1);
- free($2);
- prev_word = $$;}
- ;
-
-hint_word : word { $$ = $1; }
- | hint_word word {
- asprintf(&($$), "%s %s", $1, $2);
- free($1);
- free($2); }
- | hint_word AMPER word { /* there are often '&' in hints */
- asprintf(&($$), "%s&%s", $1, $3);
- free($1);
- free($3);}
-
-
-word3_list : word { $$ = $1;}
- | word word {
- asprintf(&($$), "%s%s", $1, $2);
- free($1);
- free($2);
- prev_word = $$;}
- | word word word {
- asprintf(&($$), "%s%s%s", $1, $2, $3);
- free($1);
- free($2);
- free($3);
- prev_word=$$;}
- ;
-
-goto_word : word { $$ = $1;}
- | word word {
- asprintf(&($$), "%s%s", $1, $2);
- free($1);
- free($2);}
- | goto_word COLON word {
- asprintf(&($$), "%s:%s", $1, $3);
- free($1);
- free($3);}
- ;
-
-switch_statement : KW_SWITCH test_expr LC case_statements RC {
- $$ = npval2(PV_SWITCH, &@1, &@5);
- $$->u1.str = $2;
- $$->u2.statements = $4; set_dads($$,$4);}
- ;
-
-/*
- * Definition of a statememt in our language
- */
-statement : LC statements RC {
- $$ = npval2(PV_STATEMENTBLOCK, &@1, &@3);
- $$->u1.list = $2; set_dads($$,$2);}
- | assignment { $$ = $1; }
- | local_assignment { $$ = $1; }
- | KW_GOTO target SEMI {
- $$ = npval2(PV_GOTO, &@1, &@3);
- $$->u1.list = $2;}
- | KW_JUMP jumptarget SEMI {
- $$ = npval2(PV_GOTO, &@1, &@3);
- $$->u1.list = $2;}
- | word COLON {
- $$ = npval2(PV_LABEL, &@1, &@2);
- $$->u1.str = $1; }
- | KW_FOR LP {reset_semicount(parseio->scanner);} word SEMI
- {reset_semicount(parseio->scanner);} word SEMI
- {reset_parencount(parseio->scanner);} word RP statement { /* XXX word_list maybe ? */
- $$ = npval2(PV_FOR, &@1, &@12);
- $$->u1.for_init = $4;
- $$->u2.for_test=$7;
- $$->u3.for_inc = $10;
- $$->u4.for_statements = $12; set_dads($$,$12);}
- | KW_WHILE test_expr statement {
- $$ = npval2(PV_WHILE, &@1, &@3);
- $$->u1.str = $2;
- $$->u2.statements = $3; set_dads($$,$3);}
- | switch_statement { $$ = $1; }
- | AMPER macro_call SEMI { $$ = update_last($2, &@2); }
- | application_call SEMI { $$ = update_last($1, &@2); }
- | word SEMI {
- $$= npval2(PV_APPLICATION_CALL, &@1, &@2);
- $$->u1.str = $1;}
- | application_call EQ {reset_semicount(parseio->scanner);} word SEMI {
- char *bufx;
- int tot=0;
- pval *pptr;
- $$ = npval2(PV_VARDEC, &@1, &@5);
- $$->u2.val=$4;
- /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */
- /* string to big to fit in the buffer? */
- tot+=strlen($1->u1.str);
- for(pptr=$1->u2.arglist;pptr;pptr=pptr->next) {
- tot+=strlen(pptr->u1.str);
- tot++; /* for a sep like a comma */
- }
- tot+=4; /* for safety */
- bufx = calloc(1, tot);
- strcpy(bufx,$1->u1.str);
- strcat(bufx,"(");
- /* XXX need to advance the pointer or the loop is very inefficient */
- for (pptr=$1->u2.arglist;pptr;pptr=pptr->next) {
- if ( pptr != $1->u2.arglist )
- strcat(bufx,",");
- strcat(bufx,pptr->u1.str);
- }
- strcat(bufx,")");
-#ifdef AAL_ARGCHECK
- if ( !ael_is_funcname($1->u1.str) )
- ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Function call? The name %s is not in my internal list of function names\n",
- my_file, @1.first_line, @1.first_column, @1.last_column, $1->u1.str);
-#endif
- $$->u1.str = bufx;
- destroy_pval($1); /* the app call it is not, get rid of that chain */
- prev_word = 0;
- }
- | KW_BREAK SEMI { $$ = npval2(PV_BREAK, &@1, &@2); }
- | KW_RETURN SEMI { $$ = npval2(PV_RETURN, &@1, &@2); }
- | KW_CONTINUE SEMI { $$ = npval2(PV_CONTINUE, &@1, &@2); }
- | if_like_head statement opt_else {
- $$ = update_last($1, &@2);
- $$->u2.statements = $2; set_dads($$,$2);
- $$->u3.else_statements = $3;set_dads($$,$3);}
- | SEMI { $$=0; }
- ;
-
-opt_else : KW_ELSE statement { $$ = $2; }
- | { $$ = NULL ; }
-
-
-target : goto_word { $$ = nword($1, &@1); }
- | goto_word BAR goto_word {
- $$ = nword($1, &@1);
- $$->next = nword($3, &@3); }
- | goto_word COMMA goto_word {
- $$ = nword($1, &@1);
- $$->next = nword($3, &@3); }
- | goto_word BAR goto_word BAR goto_word {
- $$ = nword($1, &@1);
- $$->next = nword($3, &@3);
- $$->next->next = nword($5, &@5); }
- | goto_word COMMA goto_word COMMA goto_word {
- $$ = nword($1, &@1);
- $$->next = nword($3, &@3);
- $$->next->next = nword($5, &@5); }
- | KW_DEFAULT BAR goto_word BAR goto_word {
- $$ = nword(strdup("default"), &@1);
- $$->next = nword($3, &@3);
- $$->next->next = nword($5, &@5); }
- | KW_DEFAULT COMMA goto_word COMMA goto_word {
- $$ = nword(strdup("default"), &@1);
- $$->next = nword($3, &@3);
- $$->next->next = nword($5, &@5); }
- ;
-
-opt_pri : /* empty */ { $$ = strdup("1"); }
- | COMMA word { $$ = $2; }
- ;
-
-/* XXX please document the form of jumptarget */
-jumptarget : goto_word opt_pri { /* ext[, pri] default 1 */
- $$ = nword($1, &@1);
- $$->next = nword($2, &@2); } /* jump extension[,priority][@context] */
- | goto_word opt_pri AT context_name { /* context, ext, pri */
- $$ = nword($4, &@4);
- $$->next = nword($1, &@1);
- $$->next->next = nword($2, &@2); }
- ;
-
-macro_call : word LP {reset_argcount(parseio->scanner);} eval_arglist RP {
- /* XXX original code had @2 but i think we need @5 */
- $$ = npval2(PV_MACRO_CALL, &@1, &@5);
- $$->u1.str = $1;
- $$->u2.arglist = $4;}
- | word LP RP {
- $$= npval2(PV_MACRO_CALL, &@1, &@3);
- $$->u1.str = $1; }
- ;
-
-/* XXX application_call_head must be revised. Having 'word LP { ...'
- * just as above should work fine, however it gives a different result.
- */
-application_call_head: word LP {reset_argcount(parseio->scanner);} {
- if (strcasecmp($1,"goto") == 0) {
- $$ = npval2(PV_GOTO, &@1, &@2);
- free($1); /* won't be using this */
- ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Suggestion: Use the goto statement instead of the Goto() application call in AEL.\n", my_file, @1.first_line, @1.first_column, @1.last_column );
- } else {
- $$= npval2(PV_APPLICATION_CALL, &@1, &@2);
- $$->u1.str = $1;
- } }
- ;
-
-application_call : application_call_head eval_arglist RP {
- $$ = update_last($1, &@3);
- if( $$->type == PV_GOTO )
- $$->u1.list = $2;
- else
- $$->u2.arglist = $2;
- }
- | application_call_head RP { $$ = update_last($1, &@2); }
- ;
-
-opt_word : word { $$ = $1 }
- | { $$ = strdup(""); }
- ;
-
-eval_arglist : word_list { $$ = nword($1, &@1); }
- | /*nothing! */ {
- $$= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/);
- $$->u1.str = strdup(""); }
- | eval_arglist COMMA opt_word { $$ = linku1($1, nword($3, &@3)); }
- ;
-
-case_statements: /* empty */ { $$ = NULL; }
- | case_statement case_statements { $$ = linku1($1, $2); }
- ;
-
-case_statement: KW_CASE word COLON statements {
- $$ = npval2(PV_CASE, &@1, &@3); /* XXX 3 or 4 ? */
- $$->u1.str = $2;
- $$->u2.statements = $4; set_dads($$,$4);}
- | KW_DEFAULT COLON statements {
- $$ = npval2(PV_DEFAULT, &@1, &@3);
- $$->u1.str = NULL;
- $$->u2.statements = $3;set_dads($$,$3);}
- | KW_PATTERN word COLON statements {
- $$ = npval2(PV_PATTERN, &@1, &@4); /* XXX@3 or @4 ? */
- $$->u1.str = $2;
- $$->u2.statements = $4;set_dads($$,$4);}
- ;
-
-macro_statements: /* empty */ { $$ = NULL; }
- | macro_statement macro_statements { $$ = linku1($1, $2); }
- ;
-
-macro_statement : statement {$$=$1;}
- | includes { $$=$1;}
- | KW_CATCH word LC statements RC {
- $$ = npval2(PV_CATCH, &@1, &@5);
- $$->u1.str = $2;
- $$->u2.statements = $4; set_dads($$,$4);}
- ;
-
-switches : KW_SWITCHES LC switchlist RC {
- $$ = npval2(PV_SWITCHES, &@1, &@2);
- $$->u1.list = $3; set_dads($$,$3);}
- ;
-
-eswitches : KW_ESWITCHES LC switchlist RC {
- $$ = npval2(PV_ESWITCHES, &@1, &@2);
- $$->u1.list = $3; set_dads($$,$3);}
- ;
-
-switchlist : /* empty */ { $$ = NULL; }
- | word SEMI switchlist { $$ = linku1(nword($1, &@1), $3); }
- | word AT word SEMI switchlist { char *x; asprintf(&x,"%s@%s", $1,$3); free($1); free($3);
- $$ = linku1(nword(x, &@1), $5);}
- | switchlist error {$$=$1;}
- ;
-
-included_entry : context_name { $$ = nword($1, &@1); }
- | context_name BAR timespec {
- $$ = nword($1, &@1);
- $$->u2.arglist = $3;
- prev_word=0; /* XXX sure ? */ }
- ;
-
-/* list of ';' separated context names followed by optional timespec */
-includeslist : included_entry SEMI { $$ = $1; }
- | includeslist included_entry SEMI { $$ = linku1($1, $2); }
- | includeslist error {$$=$1;}
- ;
-
-includes : KW_INCLUDES LC includeslist RC {
- $$ = npval2(PV_INCLUDES, &@1, &@4);
- $$->u1.list = $3;set_dads($$,$3);}
- | KW_INCLUDES LC RC {
- $$ = npval2(PV_INCLUDES, &@1, &@3);}
- ;
-
-
-%%
-
-static char *token_equivs1[] =
-{
- "AMPER",
- "AT",
- "BAR",
- "COLON",
- "COMMA",
- "EQ",
- "EXTENMARK",
- "KW_BREAK",
- "KW_CASE",
- "KW_CATCH",
- "KW_CONTEXT",
- "KW_CONTINUE",
- "KW_DEFAULT",
- "KW_ELSE",
- "KW_ESWITCHES",
- "KW_FOR",
- "KW_GLOBALS",
- "KW_GOTO",
- "KW_HINT",
- "KW_IFTIME",
- "KW_IF",
- "KW_IGNOREPAT",
- "KW_INCLUDES"
- "KW_JUMP",
- "KW_MACRO",
- "KW_PATTERN",
- "KW_REGEXTEN",
- "KW_RETURN",
- "KW_SWITCHES",
- "KW_SWITCH",
- "KW_WHILE",
- "LC",
- "LP",
- "RC",
- "RP",
- "SEMI",
-};
-
-static char *token_equivs2[] =
-{
- "&",
- "@",
- "|",
- ":",
- ",",
- "=",
- "=>",
- "break",
- "case",
- "catch",
- "context",
- "continue",
- "default",
- "else",
- "eswitches",
- "for",
- "globals",
- "goto",
- "hint",
- "ifTime",
- "if",
- "ignorepat",
- "includes"
- "jump",
- "macro",
- "pattern",
- "regexten",
- "return",
- "switches",
- "switch",
- "while",
- "{",
- "(",
- "}",
- ")",
- ";",
-};
-
-
-static char *ael_token_subst(char *mess)
-{
- /* calc a length, malloc, fill, and return; yyerror had better free it! */
- int len=0,i;
- char *p;
- char *res, *s,*t;
- int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*);
-
- for (p=mess; *p; p++) {
- for (i=0; i<token_equivs_entries; i++) {
- if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 )
- {
- len+=strlen(token_equivs2[i])+2;
- p += strlen(token_equivs1[i])-1;
- break;
- }
- }
- len++;
- }
- res = calloc(1, len+1);
- res[0] = 0;
- s = res;
- for (p=mess; *p;) {
- int found = 0;
- for (i=0; i<token_equivs_entries; i++) {
- if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) {
- *s++ = '\'';
- for (t=token_equivs2[i]; *t;) {
- *s++ = *t++;
- }
- *s++ = '\'';
- p += strlen(token_equivs1[i]);
- found = 1;
- break;
- }
- }
- if( !found )
- *s++ = *p++;
- }
- *s++ = 0;
- return res;
-}
-
-void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s)
-{
- char *s2 = ael_token_subst((char *)s);
- if (locp->first_line == locp->last_line) {
- ast_log(LOG_ERROR, "==== File: %s, Line %d, Cols: %d-%d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_column, s2);
- } else {
- ast_log(LOG_ERROR, "==== File: %s, Line %d Col %d to Line %d Col %d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_line, locp->last_column, s2);
- }
- free(s2);
- parseio->syntax_error_count++;
-}
-
-static struct pval *npval(pvaltype type, int first_line, int last_line,
- int first_column, int last_column)
-{
- pval *z = calloc(1, sizeof(struct pval));
- z->type = type;
- z->startline = first_line;
- z->endline = last_line;
- z->startcol = first_column;
- z->endcol = last_column;
- z->filename = strdup(my_file);
- return z;
-}
-
-static struct pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last)
-{
- return npval(type, first->first_line, last->last_line,
- first->first_column, last->last_column);
-}
-
-static struct pval *update_last(pval *obj, YYLTYPE *last)
-{
- obj->endline = last->last_line;
- obj->endcol = last->last_column;
- return obj;
-}
-
-/* frontend for npval to create a PV_WORD string from the given token */
-static pval *nword(char *string, YYLTYPE *pos)
-{
- pval *p = npval2(PV_WORD, pos, pos);
- if (p)
- p->u1.str = string;
- return p;
-}
-
-/* append second element to the list in the first one */
-static pval * linku1(pval *head, pval *tail)
-{
- if (!head)
- return tail;
- if (tail) {
- if (!head->next) {
- head->next = tail;
- } else {
- head->u1_last->next = tail;
- }
- head->u1_last = tail;
- tail->prev = head; /* the dad link only points to containers */
- }
- return head;
-}
-
-/* this routine adds a dad ptr to each element in the list */
-static void set_dads(struct pval *dad, struct pval *child_list)
-{
- struct pval *t;
-
- for(t=child_list;t;t=t->next) /* simple stuff */
- t->dad = dad;
-}
-
diff --git a/pbx/ael/ael_lex.c b/pbx/ael/ael_lex.c
deleted file mode 100644
index d277fbc42..000000000
--- a/pbx/ael/ael_lex.c
+++ /dev/null
@@ -1,3029 +0,0 @@
-#line 2 "ael_lex.c"
-
-#line 4 "ael_lex.c"
-
-#define YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 31
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with platform-specific or compiler-specific issues. */
-
-#include "asterisk.h"
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
-#endif
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* An opaque pointer. */
-#ifndef YY_TYPEDEF_YY_SCANNER_T
-#define YY_TYPEDEF_YY_SCANNER_T
-typedef void* yyscan_t;
-#endif
-
-/* For convenience, these vars (plus the bison vars far below)
- are macros in the reentrant scanner. */
-#define yyin yyg->yyin_r
-#define yyout yyg->yyout_r
-#define yyextra yyg->yyextra_r
-#define yyleng yyg->yyleng_r
-#define yytext yyg->yytext_r
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
-#define yy_flex_debug yyg->yy_flex_debug_r
-
-int ael_yylex_init (yyscan_t* scanner);
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yyg->yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yyg->yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE ael_yyrestart(yyin ,yyscanner )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
-#endif
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
- #define YY_LESS_LINENO(n)
-
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- *yy_cp = yyg->yy_hold_char; \
- YY_RESTORE_YY_MORE_OFFSET \
- yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- } \
- while ( 0 )
-
-#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef unsigned int yy_size_t;
-#endif
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via ael_yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
-
- };
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
- ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
- : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-
-void ael_yyrestart (FILE *input_file ,yyscan_t yyscanner );
-void ael_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE ael_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void ael_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void ael_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void ael_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void ael_yypop_buffer_state (yyscan_t yyscanner );
-
-static void ael_yyensure_buffer_stack (yyscan_t yyscanner );
-static void ael_yy_load_buffer_state (yyscan_t yyscanner );
-static void ael_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
-
-#define YY_FLUSH_BUFFER ael_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
-
-YY_BUFFER_STATE ael_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE ael_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-
-void *ael_yyalloc (yy_size_t ,yyscan_t yyscanner );
-void *ael_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
-void ael_yyfree (void * ,yyscan_t yyscanner );
-
-#define yy_new_buffer ael_yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
- { \
- if ( ! YY_CURRENT_BUFFER ){ \
- ael_yyensure_buffer_stack (yyscanner); \
- YY_CURRENT_BUFFER_LVALUE = \
- ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
- }
-
-#define yy_set_bol(at_bol) \
- { \
- if ( ! YY_CURRENT_BUFFER ){\
- ael_yyensure_buffer_stack (yyscanner); \
- YY_CURRENT_BUFFER_LVALUE = \
- ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
- }
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-#define ael_yywrap(n) 1
-#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
-
-typedef int yy_state_type;
-
-#define yytext_ptr yytext_r
-
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
-static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
- yyg->yytext_ptr = yy_bp; \
- yyg->yytext_ptr -= yyg->yy_more_len; \
- yyleng = (size_t) (yy_cp - yyg->yytext_ptr); \
- yyg->yy_hold_char = *yy_cp; \
- *yy_cp = '\0'; \
- yyg->yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 62
-#define YY_END_OF_BUFFER 63
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static yyconst flex_int16_t yy_accept[239] =
- { 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 42, 42,
- 63, 62, 49, 47, 48, 50, 50, 9, 3, 4,
- 7, 50, 8, 5, 6, 12, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 1, 10, 2, 62, 52, 51, 62, 53,
- 62, 58, 59, 60, 62, 62, 54, 55, 56, 62,
- 57, 42, 43, 44, 49, 48, 50, 50, 41, 13,
- 11, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 21, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 0, 52, 51, 0, 53, 52, 51,
-
- 53, 0, 58, 59, 60, 0, 58, 59, 60, 0,
- 54, 55, 56, 0, 57, 54, 55, 56, 57, 42,
- 43, 44, 45, 44, 46, 50, 13, 13, 50, 50,
- 50, 50, 50, 50, 50, 50, 32, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 34, 50, 50, 50, 26,
- 50, 50, 27, 25, 50, 50, 50, 28, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 30, 37,
- 50, 50, 50, 50, 50, 50, 50, 50, 18, 16,
- 50, 50, 50, 50, 50, 33, 50, 50, 50, 50,
-
- 50, 50, 50, 22, 50, 50, 50, 23, 50, 29,
- 20, 50, 50, 14, 50, 35, 50, 17, 50, 50,
- 36, 50, 50, 50, 15, 31, 50, 50, 40, 24,
- 38, 0, 39, 19, 0, 0, 61, 0
- } ;
-
-static yyconst flex_int32_t yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 5, 6, 7, 5, 1, 8, 5, 9,
- 10, 11, 5, 12, 5, 5, 13, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 14, 15, 5,
- 16, 17, 1, 18, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 19, 5, 5, 5, 5, 5, 5,
- 20, 21, 22, 1, 5, 1, 23, 24, 25, 26,
-
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 5, 39, 40, 41, 42, 5, 43, 44,
- 5, 5, 45, 46, 47, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst flex_int32_t yy_meta[48] =
- { 0,
- 1, 1, 2, 1, 3, 4, 3, 1, 1, 1,
- 5, 1, 3, 1, 1, 1, 3, 1, 3, 3,
- 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 1, 3
- } ;
-
-static yyconst flex_int16_t yy_base[252] =
- { 0,
- 0, 0, 39, 42, 81, 120, 159, 198, 47, 54,
- 314, 985, 311, 985, 308, 0, 280, 985, 985, 985,
- 985, 42, 985, 985, 293, 985, 285, 269, 31, 280,
- 32, 269, 33, 274, 45, 262, 266, 279, 278, 48,
- 257, 269, 985, 985, 985, 73, 985, 985, 89, 985,
- 237, 985, 985, 985, 276, 315, 985, 985, 985, 354,
- 985, 292, 985, 66, 292, 289, 0, 256, 0, 401,
- 985, 250, 262, 64, 252, 259, 243, 238, 241, 242,
- 237, 241, 257, 239, 249, 238, 247, 246, 229, 233,
- 47, 237, 236, 103, 985, 985, 137, 985, 142, 176,
-
- 181, 439, 985, 985, 985, 478, 517, 556, 595, 634,
- 985, 985, 985, 673, 985, 712, 751, 790, 829, 263,
- 985, 103, 985, 104, 985, 240, 0, 876, 223, 240,
- 235, 236, 219, 233, 228, 223, 0, 229, 214, 209,
- 218, 211, 210, 204, 218, 201, 198, 212, 210, 194,
- 194, 200, 199, 193, 198, 0, 200, 100, 187, 0,
- 186, 202, 0, 0, 189, 183, 175, 0, 182, 178,
- 187, 176, 168, 172, 184, 178, 158, 176, 0, 0,
- 151, 158, 159, 167, 154, 156, 151, 151, 0, 0,
- 137, 140, 132, 130, 131, 0, 134, 131, 114, 112,
-
- 112, 119, 105, 0, 106, 116, 103, 0, 111, 0,
- 110, 106, 91, 0, 95, 0, 94, 0, 96, 68,
- 0, 64, 57, 76, 0, 0, 52, 44, 0, 0,
- 0, 168, 0, 0, 0, 50, 985, 985, 922, 927,
- 932, 937, 940, 945, 950, 955, 960, 964, 969, 974,
- 979
- } ;
-
-static yyconst flex_int16_t yy_def[252] =
- { 0,
- 238, 1, 239, 239, 240, 240, 241, 241, 242, 242,
- 238, 238, 238, 238, 238, 243, 243, 238, 238, 238,
- 238, 243, 238, 238, 238, 238, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 238, 238, 238, 244, 238, 238, 244, 238,
- 245, 238, 238, 238, 245, 246, 238, 238, 238, 246,
- 238, 247, 238, 248, 238, 238, 243, 243, 243, 249,
- 238, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 244, 238, 238, 244, 238, 244, 244,
-
- 244, 245, 238, 238, 238, 245, 245, 245, 245, 246,
- 238, 238, 238, 246, 238, 246, 246, 246, 246, 247,
- 238, 248, 238, 248, 238, 243, 250, 249, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
-
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 238, 243, 243, 251, 251, 238, 0, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238
- } ;
-
-static yyconst flex_int16_t yy_nxt[1033] =
- { 0,
- 12, 13, 14, 15, 16, 16, 17, 18, 19, 20,
- 16, 21, 22, 23, 24, 25, 16, 26, 16, 16,
- 12, 16, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 16, 37, 38, 16, 16, 39, 40, 41,
- 16, 16, 42, 16, 43, 44, 45, 47, 48, 63,
- 47, 48, 69, 74, 70, 237, 63, 64, 47, 49,
- 50, 47, 49, 50, 64, 77, 80, 75, 123, 81,
- 90, 78, 83, 84, 91, 149, 124, 232, 125, 232,
- 85, 95, 96, 47, 234, 50, 47, 150, 50, 52,
- 53, 233, 95, 97, 98, 54, 231, 99, 100, 230,
-
- 52, 55, 53, 131, 132, 123, 123, 229, 99, 97,
- 101, 95, 96, 238, 124, 238, 238, 95, 228, 98,
- 227, 226, 95, 97, 98, 52, 181, 53, 52, 53,
- 182, 225, 224, 99, 54, 101, 223, 222, 221, 52,
- 55, 53, 220, 219, 218, 99, 100, 95, 217, 98,
- 95, 96, 216, 215, 214, 213, 99, 97, 101, 212,
- 211, 95, 97, 98, 52, 210, 53, 57, 58, 232,
- 59, 232, 209, 235, 208, 207, 206, 205, 57, 60,
- 61, 99, 204, 101, 95, 96, 95, 203, 98, 95,
- 96, 202, 201, 200, 199, 95, 97, 98, 198, 197,
-
- 95, 97, 98, 57, 196, 61, 57, 58, 195, 59,
- 194, 193, 192, 191, 190, 189, 188, 57, 60, 61,
- 95, 187, 98, 186, 185, 95, 184, 98, 183, 180,
- 179, 178, 177, 176, 175, 174, 173, 172, 171, 170,
- 169, 168, 57, 167, 61, 103, 104, 166, 165, 164,
- 163, 105, 162, 161, 160, 159, 103, 106, 104, 158,
- 157, 156, 155, 154, 153, 121, 152, 151, 148, 147,
- 146, 145, 144, 143, 142, 141, 140, 139, 138, 137,
- 136, 103, 135, 104, 107, 108, 134, 133, 130, 129,
- 109, 126, 66, 65, 121, 107, 106, 108, 93, 92,
-
- 89, 88, 87, 86, 82, 79, 76, 73, 72, 71,
- 68, 66, 65, 238, 238, 238, 238, 238, 238, 238,
- 107, 238, 108, 111, 112, 238, 113, 238, 238, 238,
- 238, 238, 238, 238, 111, 114, 115, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 111,
- 238, 115, 116, 117, 238, 118, 238, 238, 238, 238,
- 238, 238, 238, 116, 114, 119, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 116, 238,
-
- 119, 127, 127, 238, 127, 238, 238, 238, 127, 127,
- 127, 238, 127, 238, 127, 127, 127, 238, 127, 238,
- 238, 127, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 127, 103, 104, 238,
- 238, 238, 238, 105, 238, 238, 238, 238, 103, 106,
- 104, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 103, 238, 104, 107, 108, 238, 238,
- 238, 238, 109, 238, 238, 238, 238, 107, 106, 108,
-
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 107, 238, 108, 103, 104, 238, 238, 238,
- 238, 105, 238, 238, 238, 238, 103, 106, 104, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 103, 238, 104, 103, 104, 238, 238, 238, 238,
- 105, 238, 238, 238, 238, 103, 106, 104, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
-
- 103, 238, 104, 103, 104, 238, 238, 238, 238, 105,
- 238, 238, 238, 238, 103, 106, 104, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 103,
- 238, 104, 111, 112, 238, 113, 238, 238, 238, 238,
- 238, 238, 238, 111, 114, 115, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 111, 238,
- 115, 116, 117, 238, 118, 238, 238, 238, 238, 238,
- 238, 238, 116, 114, 119, 238, 238, 238, 238, 238,
-
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 116, 238, 119,
- 111, 112, 238, 113, 238, 238, 238, 238, 238, 238,
- 238, 111, 114, 115, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 111, 238, 115, 111,
- 112, 238, 113, 238, 238, 238, 238, 238, 238, 238,
- 111, 114, 115, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 111, 238, 115, 111, 112,
-
- 238, 113, 238, 238, 238, 238, 238, 238, 238, 111,
- 114, 115, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 111, 238, 115, 111, 112, 238,
- 113, 238, 238, 238, 238, 238, 238, 238, 111, 114,
- 115, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 111, 238, 115, 127, 127, 238, 127,
- 238, 238, 238, 127, 127, 127, 238, 127, 238, 127,
- 127, 127, 238, 127, 238, 238, 127, 238, 238, 238,
-
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 127, 46, 46, 46, 46, 46, 51, 51, 51,
- 51, 51, 56, 56, 56, 56, 56, 62, 62, 62,
- 62, 62, 67, 67, 67, 94, 94, 94, 94, 94,
- 102, 102, 102, 102, 102, 110, 110, 110, 110, 110,
- 120, 120, 120, 120, 122, 122, 122, 122, 122, 128,
- 238, 128, 128, 128, 127, 238, 127, 127, 127, 236,
- 236, 236, 238, 236, 11, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
-
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238
- } ;
-
-static yyconst flex_int16_t yy_chk[1033] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 3, 9,
- 4, 4, 22, 29, 22, 236, 10, 9, 3, 3,
- 3, 4, 4, 4, 10, 31, 33, 29, 64, 33,
- 40, 31, 35, 35, 40, 91, 64, 224, 64, 224,
- 35, 46, 46, 3, 228, 3, 4, 91, 4, 5,
- 5, 227, 46, 46, 46, 5, 223, 49, 49, 222,
-
- 5, 5, 5, 74, 74, 122, 124, 220, 49, 49,
- 49, 94, 94, 122, 124, 122, 124, 46, 219, 46,
- 217, 215, 94, 94, 94, 5, 158, 5, 6, 6,
- 158, 213, 212, 49, 6, 49, 211, 209, 207, 6,
- 6, 6, 206, 205, 203, 97, 97, 94, 202, 94,
- 99, 99, 201, 200, 199, 198, 97, 97, 97, 197,
- 195, 99, 99, 99, 6, 194, 6, 7, 7, 232,
- 7, 232, 193, 232, 192, 191, 188, 187, 7, 7,
- 7, 97, 186, 97, 100, 100, 99, 185, 99, 101,
- 101, 184, 183, 182, 181, 100, 100, 100, 178, 177,
-
- 101, 101, 101, 7, 176, 7, 8, 8, 175, 8,
- 174, 173, 172, 171, 170, 169, 167, 8, 8, 8,
- 100, 166, 100, 165, 162, 101, 161, 101, 159, 157,
- 155, 154, 153, 152, 151, 150, 149, 148, 147, 146,
- 145, 144, 8, 143, 8, 51, 51, 142, 141, 140,
- 139, 51, 138, 136, 135, 134, 51, 51, 51, 133,
- 132, 131, 130, 129, 126, 120, 93, 92, 90, 89,
- 88, 87, 86, 85, 84, 83, 82, 81, 80, 79,
- 78, 51, 77, 51, 55, 55, 76, 75, 73, 72,
- 55, 68, 66, 65, 62, 55, 55, 55, 42, 41,
-
- 39, 38, 37, 36, 34, 32, 30, 28, 27, 25,
- 17, 15, 13, 11, 0, 0, 0, 0, 0, 0,
- 55, 0, 55, 56, 56, 0, 56, 0, 0, 0,
- 0, 0, 0, 0, 56, 56, 56, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,
- 0, 56, 60, 60, 0, 60, 0, 0, 0, 0,
- 0, 0, 0, 60, 60, 60, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 60, 0,
-
- 60, 70, 70, 0, 70, 0, 0, 0, 70, 70,
- 70, 0, 70, 0, 70, 70, 70, 0, 70, 0,
- 0, 70, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 70, 102, 102, 0,
- 0, 0, 0, 102, 0, 0, 0, 0, 102, 102,
- 102, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 102, 0, 102, 106, 106, 0, 0,
- 0, 0, 106, 0, 0, 0, 0, 106, 106, 106,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 106, 0, 106, 107, 107, 0, 0, 0,
- 0, 107, 0, 0, 0, 0, 107, 107, 107, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 107, 0, 107, 108, 108, 0, 0, 0, 0,
- 108, 0, 0, 0, 0, 108, 108, 108, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 108, 0, 108, 109, 109, 0, 0, 0, 0, 109,
- 0, 0, 0, 0, 109, 109, 109, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 109,
- 0, 109, 110, 110, 0, 110, 0, 0, 0, 0,
- 0, 0, 0, 110, 110, 110, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 110, 0,
- 110, 114, 114, 0, 114, 0, 0, 0, 0, 0,
- 0, 0, 114, 114, 114, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 114, 0, 114,
- 116, 116, 0, 116, 0, 0, 0, 0, 0, 0,
- 0, 116, 116, 116, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 116, 0, 116, 117,
- 117, 0, 117, 0, 0, 0, 0, 0, 0, 0,
- 117, 117, 117, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 117, 0, 117, 118, 118,
-
- 0, 118, 0, 0, 0, 0, 0, 0, 0, 118,
- 118, 118, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 118, 0, 118, 119, 119, 0,
- 119, 0, 0, 0, 0, 0, 0, 0, 119, 119,
- 119, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 119, 0, 119, 128, 128, 0, 128,
- 0, 0, 0, 128, 128, 128, 0, 128, 0, 128,
- 128, 128, 0, 128, 0, 0, 128, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 128, 239, 239, 239, 239, 239, 240, 240, 240,
- 240, 240, 241, 241, 241, 241, 241, 242, 242, 242,
- 242, 242, 243, 243, 243, 244, 244, 244, 244, 244,
- 245, 245, 245, 245, 245, 246, 246, 246, 246, 246,
- 247, 247, 247, 247, 248, 248, 248, 248, 248, 249,
- 0, 249, 249, 249, 250, 0, 250, 250, 250, 251,
- 251, 251, 0, 251, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
-
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238
- } ;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() (yyg->yy_more_flag = 1)
-#define YY_MORE_ADJ yyg->yy_more_len
-#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "ael.flex"
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2006, Digium, Inc.
- *
- * Steve Murphy <murf@parsetree.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-/*! \file
- *
- * \brief Flex scanner description of tokens used in AEL2 .
- *
- */
-/*
- * Start with flex options:
- *
- * %x describes the contexts we have: paren, semic and argg, plus INITIAL
- */
-
-/* prefix used for various globally-visible functions and variables.
- * This renames also ael_yywrap, but since we do not use it, we just
- * add option noyywrap to remove it.
- */
-/* batch gives a bit more performance if we are using it in
- * a non-interactive mode. We probably don't care much.
- */
-/* outfile is the filename to be used instead of lex.yy.c */
-/*
- * These are not supported in flex 2.5.4, but we need them
- * at the moment:
- * reentrant produces a thread-safe parser. Not 100% sure that
- * we require it, though.
- * bison-bridge passes an additional yylval argument to ael_yylex().
- * bison-locations is probably not needed.
- */
-#line 59 "ael.flex"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "asterisk/logger.h"
-#include "asterisk/utils.h"
-#include "ael/ael.tab.h"
-#include "asterisk/ael_structs.h"
-
-/*
- * A stack to keep track of matching brackets ( [ { } ] )
- */
-static char pbcstack[400]; /* XXX missing size checks */
-static int pbcpos = 0;
-static void pbcpush(char x);
-static int pbcpop(char x);
-
-static int parencount = 0;
-
-/*
- * current line, column and filename, updated as we read the input.
- */
-static int my_lineno = 1; /* current line in the source */
-static int my_col = 1; /* current column in the source */
-char *my_file = 0; /* used also in the bison code */
-char *prev_word; /* XXX document it */
-
-#define MAX_INCLUDE_DEPTH 50
-
-/*
- * flex is not too smart, and generates global functions
- * without prototypes so the compiler may complain.
- * To avoid that, we declare the prototypes here,
- * even though these functions are not used.
- */
-int ael_yyget_column (yyscan_t yyscanner);
-void ael_yyset_column (int column_no , yyscan_t yyscanner);
-
-int ael_yyparse (struct parse_io *);
-
-/*
- * A stack to process include files.
- * As we switch into the new file we need to store the previous
- * state to restore it later.
- */
-struct stackelement {
- char *fname;
- int lineno;
- int colno;
- YY_BUFFER_STATE bufstate;
-};
-
-static struct stackelement include_stack[MAX_INCLUDE_DEPTH];
-static int include_stack_index = 0;
-
-/*
- * if we use the @n feature of bison, we must supply the start/end
- * location of tokens in the structure pointed by yylloc.
- * Simple tokens are just assumed to be on the same line, so
- * the line number is constant, and the column is incremented
- * by the length of the token.
- */
-#ifdef FLEX_BETA /* set for 2.5.33 */
-
-/* compute the total number of lines and columns in the text
- * passed as argument.
- */
-static void pbcwhere(const char *text, int *line, int *col )
-{
- int loc_line = *line;
- int loc_col = *col;
- char c;
- while ( (c = *text++) ) {
- if ( c == '\t' ) {
- loc_col += 8 - (loc_col % 8);
- } else if ( c == '\n' ) {
- loc_line++;
- loc_col = 1;
- } else
- loc_col++;
- }
- *line = loc_line;
- *col = loc_col;
-}
-
-#define STORE_POS do { \
- yylloc->first_line = yylloc->last_line = my_lineno; \
- yylloc->first_column=my_col; \
- yylloc->last_column=my_col+yyleng-1; \
- my_col+=yyleng; \
- } while (0)
-
-#define STORE_LOC do { \
- yylloc->first_line = my_lineno; \
- yylloc->first_column=my_col; \
- pbcwhere(yytext, &my_lineno, &my_col); \
- yylloc->last_line = my_lineno; \
- yylloc->last_column = my_col - 1; \
- } while (0)
-#else
-#define STORE_POS
-#define STORE_LOC
-#endif
-#line 886 "ael_lex.c"
-
-#define INITIAL 0
-#define paren 1
-#define semic 2
-#define argg 3
-#define comment 4
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-/* Holds the entire state of the reentrant scanner. */
-struct yyguts_t
- {
-
- /* User-defined. Not touched by flex. */
- YY_EXTRA_TYPE yyextra_r;
-
- /* The rest are the same as the globals declared in the non-reentrant scanner. */
- FILE *yyin_r, *yyout_r;
- size_t yy_buffer_stack_top; /**< index of top of stack. */
- size_t yy_buffer_stack_max; /**< capacity of stack. */
- YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
- char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
- char *yy_c_buf_p;
- int yy_init;
- int yy_start;
- int yy_did_buffer_switch_on_eof;
- int yy_start_stack_ptr;
- int yy_start_stack_depth;
- int *yy_start_stack;
- yy_state_type yy_last_accepting_state;
- char* yy_last_accepting_cpos;
-
- int yylineno_r;
- int yy_flex_debug_r;
-
- char *yytext_r;
- int yy_more_flag;
- int yy_more_len;
-
- YYSTYPE * yylval_r;
-
- YYLTYPE * yylloc_r;
-
- }; /* end struct yyguts_t */
-
-static int yy_init_globals (yyscan_t yyscanner );
-
- /* This must go here because YYSTYPE and YYLTYPE are included
- * from bison output in section 1.*/
- # define yylval yyg->yylval_r
-
- # define yylloc yyg->yylloc_r
-
-/* Accessor methods to globals.
- These are made visible to non-reentrant scanners for convenience. */
-
-int ael_yylex_destroy (yyscan_t yyscanner );
-
-int ael_yyget_debug (yyscan_t yyscanner );
-
-void ael_yyset_debug (int debug_flag ,yyscan_t yyscanner );
-
-YY_EXTRA_TYPE ael_yyget_extra (yyscan_t yyscanner );
-
-void ael_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
-
-FILE *ael_yyget_in (yyscan_t yyscanner );
-
-void ael_yyset_in (FILE * in_str ,yyscan_t yyscanner );
-
-FILE *ael_yyget_out (yyscan_t yyscanner );
-
-void ael_yyset_out (FILE * out_str ,yyscan_t yyscanner );
-
-int ael_yyget_leng (yyscan_t yyscanner );
-
-char *ael_yyget_text (yyscan_t yyscanner );
-
-int ael_yyget_lineno (yyscan_t yyscanner );
-
-void ael_yyset_lineno (int line_number ,yyscan_t yyscanner );
-
-YYSTYPE * ael_yyget_lval (yyscan_t yyscanner );
-
-void ael_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
-
- YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner );
-
- void ael_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int ael_yywrap (yyscan_t yyscanner );
-#else
-extern int ael_yywrap (yyscan_t yyscanner );
-#endif
-#endif
-
- static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
-#endif
-
-#ifndef YY_NO_INPUT
-
-#ifdef __cplusplus
-static int yyinput (yyscan_t yyscanner );
-#else
-static int input (yyscan_t yyscanner );
-#endif
-
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
- { \
- int c = '*'; \
- size_t n; \
- for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
- } \
- else \
- { \
- errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
- { \
- if( errno != EINTR) \
- { \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- break; \
- } \
- errno=0; \
- clearerr(yyin); \
- } \
- }\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int ael_yylex \
- (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
-
-#define YY_DECL int ael_yylex \
- (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
- YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-#line 173 "ael.flex"
-
-
-#line 1130 "ael_lex.c"
-
- yylval = yylval_param;
-
- yylloc = yylloc_param;
-
- if ( yyg->yy_init )
- {
- yyg->yy_init = 0;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- if ( ! yyg->yy_start )
- yyg->yy_start = 1; /* first start state */
-
- if ( ! yyin )
- yyin = stdin;
-
- if ( ! yyout )
- yyout = stdout;
-
- if ( ! YY_CURRENT_BUFFER ) {
- ael_yyensure_buffer_stack (yyscanner);
- YY_CURRENT_BUFFER_LVALUE =
- ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
- }
-
- ael_yy_load_buffer_state(yyscanner );
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yyg->yy_more_len = 0;
- if ( yyg->yy_more_flag )
- {
- yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr;
- yyg->yy_more_flag = 0;
- }
- yy_cp = yyg->yy_c_buf_p;
-
- /* Support of yytext. */
- *yy_cp = yyg->yy_hold_char;
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
- yy_current_state = yyg->yy_start;
-yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] )
- {
- yyg->yy_last_accepting_state = yy_current_state;
- yyg->yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 239 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- ++yy_cp;
- }
- while ( yy_current_state != 238 );
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
-
-yy_find_action:
- yy_act = yy_accept[yy_current_state];
-
- YY_DO_BEFORE_ACTION;
-
-do_action: /* This label is used only to access EOF actions. */
-
- switch ( yy_act )
- { /* beginning of action switch */
- case 0: /* must back up */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yyg->yy_hold_char;
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
- goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 175 "ael.flex"
-{ STORE_POS; return LC;}
- YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 176 "ael.flex"
-{ STORE_POS; return RC;}
- YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 177 "ael.flex"
-{ STORE_POS; return LP;}
- YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 178 "ael.flex"
-{ STORE_POS; return RP;}
- YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 179 "ael.flex"
-{ STORE_POS; return SEMI;}
- YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 180 "ael.flex"
-{ STORE_POS; return EQ;}
- YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 181 "ael.flex"
-{ STORE_POS; return COMMA;}
- YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 182 "ael.flex"
-{ STORE_POS; return COLON;}
- YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 183 "ael.flex"
-{ STORE_POS; return AMPER;}
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 184 "ael.flex"
-{ STORE_POS; return BAR;}
- YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 185 "ael.flex"
-{ STORE_POS; return EXTENMARK;}
- YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 186 "ael.flex"
-{ STORE_POS; return AT;}
- YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 187 "ael.flex"
-{/*comment*/}
- YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 188 "ael.flex"
-{ STORE_POS; return KW_CONTEXT;}
- YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 189 "ael.flex"
-{ STORE_POS; return KW_ABSTRACT;}
- YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 190 "ael.flex"
-{ STORE_POS; return KW_MACRO;};
- YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 191 "ael.flex"
-{ STORE_POS; return KW_GLOBALS;}
- YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 192 "ael.flex"
-{ STORE_POS; return KW_LOCAL;}
- YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 193 "ael.flex"
-{ STORE_POS; return KW_IGNOREPAT;}
- YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 194 "ael.flex"
-{ STORE_POS; return KW_SWITCH;}
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 195 "ael.flex"
-{ STORE_POS; return KW_IF;}
- YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 196 "ael.flex"
-{ STORE_POS; return KW_IFTIME;}
- YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 197 "ael.flex"
-{ STORE_POS; return KW_RANDOM;}
- YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 198 "ael.flex"
-{ STORE_POS; return KW_REGEXTEN;}
- YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 199 "ael.flex"
-{ STORE_POS; return KW_HINT;}
- YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 200 "ael.flex"
-{ STORE_POS; return KW_ELSE;}
- YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 201 "ael.flex"
-{ STORE_POS; return KW_GOTO;}
- YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 202 "ael.flex"
-{ STORE_POS; return KW_JUMP;}
- YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 203 "ael.flex"
-{ STORE_POS; return KW_RETURN;}
- YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 204 "ael.flex"
-{ STORE_POS; return KW_BREAK;}
- YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 205 "ael.flex"
-{ STORE_POS; return KW_CONTINUE;}
- YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 206 "ael.flex"
-{ STORE_POS; return KW_FOR;}
- YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 207 "ael.flex"
-{ STORE_POS; return KW_WHILE;}
- YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 208 "ael.flex"
-{ STORE_POS; return KW_CASE;}
- YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 209 "ael.flex"
-{ STORE_POS; return KW_DEFAULT;}
- YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 210 "ael.flex"
-{ STORE_POS; return KW_PATTERN;}
- YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 211 "ael.flex"
-{ STORE_POS; return KW_CATCH;}
- YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 212 "ael.flex"
-{ STORE_POS; return KW_SWITCHES;}
- YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 213 "ael.flex"
-{ STORE_POS; return KW_ESWITCHES;}
- YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 214 "ael.flex"
-{ STORE_POS; return KW_INCLUDES;}
- YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 215 "ael.flex"
-{ BEGIN(comment); my_col += 2; }
- YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 217 "ael.flex"
-{ my_col += yyleng; }
- YY_BREAK
-case 43:
-/* rule 43 can match eol */
-YY_RULE_SETUP
-#line 218 "ael.flex"
-{ ++my_lineno; my_col=1;}
- YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 219 "ael.flex"
-{ my_col += yyleng; }
- YY_BREAK
-case 45:
-/* rule 45 can match eol */
-YY_RULE_SETUP
-#line 220 "ael.flex"
-{ ++my_lineno; my_col=1;}
- YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 221 "ael.flex"
-{ my_col += 2; BEGIN(INITIAL); }
- YY_BREAK
-case 47:
-/* rule 47 can match eol */
-YY_RULE_SETUP
-#line 223 "ael.flex"
-{ my_lineno++; my_col = 1; }
- YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 224 "ael.flex"
-{ my_col += yyleng; }
- YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 225 "ael.flex"
-{ my_col += (yyleng*8)-(my_col%8); }
- YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 227 "ael.flex"
-{
- STORE_POS;
- yylval->str = strdup(yytext);
- prev_word = yylval->str;
- return word;
- }
- YY_BREAK
-/*
- * context used for arguments of if_head, random_head, switch_head,
- * for (last statement), while (XXX why not iftime_head ?).
- * End with the matching parentheses.
- * A comma at the top level is valid here, unlike in argg where it
- * is an argument separator so it must be returned as a token.
- */
-case 51:
-/* rule 51 can match eol */
-YY_RULE_SETUP
-#line 243 "ael.flex"
-{
- if ( pbcpop(')') ) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
- BEGIN(0);
- yylval->str = strdup(yytext);
- prev_word = 0;
- return word;
- }
- parencount--;
- if ( parencount >= 0) {
- yymore();
- } else {
- STORE_LOC;
- yylval->str = strdup(yytext);
- yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
- unput(')');
- BEGIN(0);
- return word;
- }
- }
- YY_BREAK
-case 52:
-/* rule 52 can match eol */
-YY_RULE_SETUP
-#line 265 "ael.flex"
-{
- char c = yytext[yyleng-1];
- if (c == '(')
- parencount++;
- pbcpush(c);
- yymore();
- }
- YY_BREAK
-case 53:
-/* rule 53 can match eol */
-YY_RULE_SETUP
-#line 273 "ael.flex"
-{
- char c = yytext[yyleng-1];
- if ( pbcpop(c)) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
- my_file, my_lineno, my_col, c);
- BEGIN(0);
- yylval->str = strdup(yytext);
- return word;
- }
- yymore();
- }
- YY_BREAK
-/*
- * handlers for arguments to a macro or application calls.
- * We enter this context when we find the initial '(' and
- * stay here until we close all matching parentheses,
- * and find the comma (argument separator) or the closing ')'
- * of the (external) call, which happens when parencount == 0
- * before the decrement.
- */
-case 54:
-/* rule 54 can match eol */
-YY_RULE_SETUP
-#line 295 "ael.flex"
-{
- char c = yytext[yyleng-1];
- if (c == '(')
- parencount++;
- pbcpush(c);
- yymore();
- }
- YY_BREAK
-case 55:
-/* rule 55 can match eol */
-YY_RULE_SETUP
-#line 303 "ael.flex"
-{
- if ( pbcpop(')') ) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
- BEGIN(0);
- yylval->str = strdup(yytext);
- return word;
- }
-
- parencount--;
- if( parencount >= 0){
- yymore();
- } else {
- STORE_LOC;
- BEGIN(0);
- if ( !strcmp(yytext, ")") )
- return RP;
- yylval->str = strdup(yytext);
- yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
- unput(')');
- return word;
- }
- }
- YY_BREAK
-case 56:
-/* rule 56 can match eol */
-YY_RULE_SETUP
-#line 327 "ael.flex"
-{
- if( parencount != 0) { /* printf("Folding in a comma!\n"); */
- yymore();
- } else {
- STORE_LOC;
- if( !strcmp(yytext,"," ) )
- return COMMA;
- yylval->str = strdup(yytext);
- yylval->str[yyleng-1] = '\0';
- unput(',');
- return word;
- }
- }
- YY_BREAK
-case 57:
-/* rule 57 can match eol */
-YY_RULE_SETUP
-#line 341 "ael.flex"
-{
- char c = yytext[yyleng-1];
- if ( pbcpop(c) ) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
- BEGIN(0);
- yylval->str = strdup(yytext);
- return word;
- }
- yymore();
- }
- YY_BREAK
-/*
- * context used to find tokens in the right hand side of assignments,
- * or in the first and second operand of a 'for'. As above, match
- * commas and use ';' as a separator (hence return it as a separate token).
- */
-case 58:
-/* rule 58 can match eol */
-YY_RULE_SETUP
-#line 358 "ael.flex"
-{
- char c = yytext[yyleng-1];
- yymore();
- pbcpush(c);
- }
- YY_BREAK
-case 59:
-/* rule 59 can match eol */
-YY_RULE_SETUP
-#line 364 "ael.flex"
-{
- char c = yytext[yyleng-1];
- if ( pbcpop(c) ) { /* error */
- STORE_LOC;
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
- BEGIN(0);
- yylval->str = strdup(yytext);
- return word;
- }
- yymore();
- }
- YY_BREAK
-case 60:
-/* rule 60 can match eol */
-YY_RULE_SETUP
-#line 376 "ael.flex"
-{
- STORE_LOC;
- yylval->str = strdup(yytext);
- yylval->str[yyleng-1] = '\0';
- unput(';');
- BEGIN(0);
- return word;
- }
- YY_BREAK
-case 61:
-/* rule 61 can match eol */
-YY_RULE_SETUP
-#line 385 "ael.flex"
-{
- FILE *in1;
- char fnamebuf[1024],*p1,*p2;
- int error = 1; /* don't use the file if set */
- p1 = strchr(yytext,'"');
- p2 = strrchr(yytext,'"');
- if ( include_stack_index >= MAX_INCLUDE_DEPTH ) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Includes nested too deeply! Wow!!! How did you do that?\n", my_file, my_lineno, my_col);
- } else if ( (int)(p2-p1) > sizeof(fnamebuf) - 1 ) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Filename is incredibly way too long (%d chars!). Inclusion ignored!\n", my_file, my_lineno, my_col, yyleng - 10);
- } else {
- int i;
- strncpy(fnamebuf, p1, p2-p1);
- fnamebuf[p2-p1] = 0;
- for (i=0; i<include_stack_index; i++) {
- if ( !strcmp(fnamebuf,include_stack[i].fname )) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Nice Try!!! But %s has already been included (perhaps by another file), and would cause an infinite loop of file inclusions!!! Include directive ignored\n",
- my_file, my_lineno, my_col, fnamebuf);
- break;
- }
- }
- if (i == include_stack_index)
- error = 0; /* we can use this file */
- }
- if ( !error ) { /* valid file name */
- *p2 = 0;
- /* relative vs. absolute */
- if (*(p1+1) != '/')
- snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
- else
-#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL)
- strncpy(fnamebuf, p1 + 1, sizeof(fnamebuf) - 1);
-#else
- ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));
-#endif
- in1 = fopen( fnamebuf, "r" );
- if ( ! in1 ) {
- ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf);
- } else {
- char *buffer;
- struct stat stats;
- stat(fnamebuf, &stats);
- buffer = (char*)malloc(stats.st_size+1);
- fread(buffer, 1, stats.st_size, in1);
- buffer[stats.st_size] = 0;
- ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf, (int)stats.st_size);
- fclose(in1);
-
- include_stack[include_stack_index].fname = my_file;
- my_file = strdup(fnamebuf);
- include_stack[include_stack_index].lineno = my_lineno;
- include_stack[include_stack_index].colno = my_col+yyleng;
- include_stack[include_stack_index++].bufstate = YY_CURRENT_BUFFER;
-
- ael_yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner);
- free(buffer);
- my_lineno = 1;
- my_col = 1;
- BEGIN(INITIAL);
- }
- }
- }
- YY_BREAK
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(paren):
-case YY_STATE_EOF(semic):
-case YY_STATE_EOF(argg):
-case YY_STATE_EOF(comment):
-#line 448 "ael.flex"
-{
- if ( --include_stack_index < 0 ) {
- yyterminate();
- } else {
- free(my_file);
- ael_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner );
- ael_yy_switch_to_buffer(include_stack[include_stack_index].bufstate,yyscanner );
- my_lineno = include_stack[include_stack_index].lineno;
- my_col = include_stack[include_stack_index].colno;
- my_file = include_stack[include_stack_index].fname;
- }
- }
- YY_BREAK
-case 62:
-YY_RULE_SETUP
-#line 461 "ael.flex"
-ECHO;
- YY_BREAK
-#line 1756 "ael_lex.c"
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yyg->yy_hold_char;
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * ael_yylex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( yyscanner );
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
-
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yyg->yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer( yyscanner ) )
- {
- case EOB_ACT_END_OF_FILE:
- {
- yyg->yy_did_buffer_switch_on_eof = 0;
-
- if ( ael_yywrap(yyscanner ) )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! yyg->yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yyg->yy_c_buf_p =
- yyg->yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( yyscanner );
-
- yy_cp = yyg->yy_c_buf_p;
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- yyg->yy_c_buf_p =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
-
- yy_current_state = yy_get_previous_state( yyscanner );
-
- yy_cp = yyg->yy_c_buf_p;
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
-} /* end of ael_yylex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
- int ret_val;
-
- if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
-
- else
- {
- int num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-
- /* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
-
- int yy_c_buf_p_offset =
- (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
-
- if ( b->yy_is_our_buffer )
- {
- int new_size = b->yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->yy_buf_size += b->yy_buf_size / 8;
- else
- b->yy_buf_size *= 2;
-
- b->yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- ael_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
- }
- else
- /* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
- number_to_move - 1;
-
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read );
-
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
- }
-
- if ( yyg->yy_n_chars == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- ael_yyrestart(yyin ,yyscanner);
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- yyg->yy_n_chars += number_to_move;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
- yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
- return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
- static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
-{
- register yy_state_type yy_current_state;
- register char *yy_cp;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- yy_current_state = yyg->yy_start;
-
- for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
- {
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- if ( yy_accept[yy_current_state] )
- {
- yyg->yy_last_accepting_state = yy_current_state;
- yyg->yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 239 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- }
-
- return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
-{
- register int yy_is_jam;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *yy_cp = yyg->yy_c_buf_p;
-
- register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- yyg->yy_last_accepting_state = yy_current_state;
- yyg->yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 239 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 238);
-
- return yy_is_jam ? 0 : yy_current_state;
-}
-
- static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
-{
- register char *yy_cp;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- yy_cp = yyg->yy_c_buf_p;
-
- /* undo effects of setting up yytext */
- *yy_cp = yyg->yy_hold_char;
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register int number_to_move = yyg->yy_n_chars + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
- yyg->yytext_ptr = yy_bp;
- yyg->yy_hold_char = *yy_cp;
- yyg->yy_c_buf_p = yy_cp;
-}
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
- static int yyinput (yyscan_t yyscanner)
-#else
- static int input (yyscan_t yyscanner)
-#endif
-
-{
- int c;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- *yyg->yy_c_buf_p = yyg->yy_hold_char;
-
- if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
- /* This was really a NUL. */
- *yyg->yy_c_buf_p = '\0';
-
- else
- { /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
- ++yyg->yy_c_buf_p;
-
- switch ( yy_get_next_buffer( yyscanner ) )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- ael_yyrestart(yyin ,yyscanner);
-
- /*FALLTHROUGH*/
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( ael_yywrap(yyscanner ) )
- return EOF;
-
- if ( ! yyg->yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput(yyscanner);
-#else
- return input(yyscanner);
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
- break;
- }
- }
- }
-
- c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
- *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
- yyg->yy_hold_char = *++yyg->yy_c_buf_p;
-
- return c;
-}
-#endif /* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * @param yyscanner The scanner object.
- * @note This function does not reset the start condition to @c INITIAL .
- */
- void ael_yyrestart (FILE * input_file , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if ( ! YY_CURRENT_BUFFER ){
- ael_yyensure_buffer_stack (yyscanner);
- YY_CURRENT_BUFFER_LVALUE =
- ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
- }
-
- ael_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
- ael_yy_load_buffer_state(yyscanner );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * @param yyscanner The scanner object.
- */
- void ael_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- /* TODO. We should be able to replace this entire function body
- * with
- * ael_yypop_buffer_state();
- * ael_yypush_buffer_state(new_buffer);
- */
- ael_yyensure_buffer_stack (yyscanner);
- if ( YY_CURRENT_BUFFER == new_buffer )
- return;
-
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *yyg->yy_c_buf_p = yyg->yy_hold_char;
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
- }
-
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
- ael_yy_load_buffer_state(yyscanner );
-
- /* We don't actually know whether we did this switch during
- * EOF (ael_yywrap()) processing, but the only time this flag
- * is looked at is after ael_yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- yyg->yy_did_buffer_switch_on_eof = 1;
-}
-
-static void ael_yy_load_buffer_state (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
- yyg->yy_hold_char = *yyg->yy_c_buf_p;
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * @param yyscanner The scanner object.
- * @return the allocated buffer state.
- */
- YY_BUFFER_STATE ael_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
-{
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) ael_yyalloc(b->yy_buf_size + 2 ,yyscanner );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
-
- b->yy_is_our_buffer = 1;
-
- ael_yy_init_buffer(b,file ,yyscanner);
-
- return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with ael_yy_create_buffer()
- * @param yyscanner The scanner object.
- */
- void ael_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if ( ! b )
- return;
-
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
- if ( b->yy_is_our_buffer )
- ael_yyfree((void *) b->yy_ch_buf ,yyscanner );
-
- ael_yyfree((void *) b ,yyscanner );
-}
-
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a ael_yyrestart() or at EOF.
- */
- static void ael_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
-
-{
- int oerrno = errno;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- ael_yy_flush_buffer(b ,yyscanner);
-
- b->yy_input_file = file;
- b->yy_fill_buffer = 1;
-
- /* If b is the current buffer, then ael_yy_init_buffer was _probably_
- * called from ael_yyrestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
-
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
- errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * @param yyscanner The scanner object.
- */
- void ael_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- if ( ! b )
- return;
-
- b->yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[0];
-
- b->yy_at_bol = 1;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- if ( b == YY_CURRENT_BUFFER )
- ael_yy_load_buffer_state(yyscanner );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- * the current state. This function will allocate the stack
- * if necessary.
- * @param new_buffer The new state.
- * @param yyscanner The scanner object.
- */
-void ael_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- if (new_buffer == NULL)
- return;
-
- ael_yyensure_buffer_stack(yyscanner);
-
- /* This block is copied from ael_yy_switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *yyg->yy_c_buf_p = yyg->yy_hold_char;
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
- }
-
- /* Only push if top exists. Otherwise, replace top. */
- if (YY_CURRENT_BUFFER)
- yyg->yy_buffer_stack_top++;
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
- /* copied from ael_yy_switch_to_buffer. */
- ael_yy_load_buffer_state(yyscanner );
- yyg->yy_did_buffer_switch_on_eof = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- * The next element becomes the new top.
- * @param yyscanner The scanner object.
- */
-void ael_yypop_buffer_state (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- if (!YY_CURRENT_BUFFER)
- return;
-
- ael_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
- YY_CURRENT_BUFFER_LVALUE = NULL;
- if (yyg->yy_buffer_stack_top > 0)
- --yyg->yy_buffer_stack_top;
-
- if (YY_CURRENT_BUFFER) {
- ael_yy_load_buffer_state(yyscanner );
- yyg->yy_did_buffer_switch_on_eof = 1;
- }
-}
-
-/* Allocates the stack if it does not exist.
- * Guarantees space for at least one push.
- */
-static void ael_yyensure_buffer_stack (yyscan_t yyscanner)
-{
- int num_to_alloc;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if (!yyg->yy_buffer_stack) {
-
- /* First allocation is just for 2 elements, since we don't know if this
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
- * immediate realloc on the next call.
- */
- num_to_alloc = 1;
- yyg->yy_buffer_stack = (struct yy_buffer_state**)ael_yyalloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- , yyscanner);
-
- memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
- yyg->yy_buffer_stack_max = num_to_alloc;
- yyg->yy_buffer_stack_top = 0;
- return;
- }
-
- if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
-
- /* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
-
- num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
- yyg->yy_buffer_stack = (struct yy_buffer_state**)ael_yyrealloc
- (yyg->yy_buffer_stack,
- num_to_alloc * sizeof(struct yy_buffer_state*)
- , yyscanner);
-
- /* zero only the new slots.*/
- memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
- yyg->yy_buffer_stack_max = num_to_alloc;
- }
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE ael_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
-{
- YY_BUFFER_STATE b;
-
- if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
- /* They forgot to leave room for the EOB's. */
- return 0;
-
- b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_buffer()" );
-
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- b->yy_buf_pos = b->yy_ch_buf = base;
- b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- ael_yy_switch_to_buffer(b ,yyscanner );
-
- return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to ael_yylex() will
- * scan from a @e copy of @a str.
- * @param str a NUL-terminated string to scan
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- * ael_yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE ael_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner)
-{
-
- return ael_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner);
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to ael_yylex() will
- * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
- * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char * bytes, int len , yyscan_t yyscanner)
-{
- YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- int i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = len + 2;
- buf = (char *) ael_yyalloc(n ,yyscanner );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_bytes()" );
-
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
-
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
- b = ael_yy_scan_buffer(buf,n ,yyscanner);
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in ael_yy_scan_bytes()" );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->yy_is_our_buffer = 1;
-
- return b;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
-{
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = yyg->yy_hold_char; \
- yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
- yyg->yy_hold_char = *yyg->yy_c_buf_p; \
- *yyg->yy_c_buf_p = '\0'; \
- yyleng = yyless_macro_arg; \
- } \
- while ( 0 )
-
-/* Accessor methods (get/set functions) to struct members. */
-
-/** Get the user-defined data for this scanner.
- * @param yyscanner The scanner object.
- */
-YY_EXTRA_TYPE ael_yyget_extra (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyextra;
-}
-
-/** Get the current line number.
- * @param yyscanner The scanner object.
- */
-int ael_yyget_lineno (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if (! YY_CURRENT_BUFFER)
- return 0;
-
- return yylineno;
-}
-
-/** Get the current column number.
- * @param yyscanner The scanner object.
- */
-int ael_yyget_column (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if (! YY_CURRENT_BUFFER)
- return 0;
-
- return yycolumn;
-}
-
-/** Get the input stream.
- * @param yyscanner The scanner object.
- */
-FILE *ael_yyget_in (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyin;
-}
-
-/** Get the output stream.
- * @param yyscanner The scanner object.
- */
-FILE *ael_yyget_out (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyout;
-}
-
-/** Get the length of the current token.
- * @param yyscanner The scanner object.
- */
-int ael_yyget_leng (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyleng;
-}
-
-/** Get the current token.
- * @param yyscanner The scanner object.
- */
-
-char *ael_yyget_text (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yytext;
-}
-
-/** Set the user-defined data. This data is never touched by the scanner.
- * @param user_defined The data to be associated with this scanner.
- * @param yyscanner The scanner object.
- */
-void ael_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyextra = user_defined ;
-}
-
-/** Set the current line number.
- * @param line_number
- * @param yyscanner The scanner object.
- */
-void ael_yyset_lineno (int line_number , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- /* lineno is only valid if an input buffer exists. */
- if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "ael_yyset_lineno called with no buffer" , yyscanner);
-
- yylineno = line_number;
-}
-
-/** Set the current column.
- * @param line_number
- * @param yyscanner The scanner object.
- */
-void ael_yyset_column (int column_no , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- /* column is only valid if an input buffer exists. */
- if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "ael_yyset_column called with no buffer" , yyscanner);
-
- yycolumn = column_no;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * @param yyscanner The scanner object.
- * @see ael_yy_switch_to_buffer
- */
-void ael_yyset_in (FILE * in_str , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyin = in_str ;
-}
-
-void ael_yyset_out (FILE * out_str , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyout = out_str ;
-}
-
-int ael_yyget_debug (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yy_flex_debug;
-}
-
-void ael_yyset_debug (int bdebug , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flex_debug = bdebug ;
-}
-
-/* Accessor methods for yylval and yylloc */
-
-YYSTYPE * ael_yyget_lval (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yylval;
-}
-
-void ael_yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yylval = yylval_param;
-}
-
-YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yylloc;
-}
-
-void ael_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yylloc = yylloc_param;
-}
-
-static int yy_init_globals (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* Initialization is the same as for the non-reentrant scanner.
- This function is called once per scanner lifetime. */
-
- yyg->yy_buffer_stack = 0;
- yyg->yy_buffer_stack_top = 0;
- yyg->yy_buffer_stack_max = 0;
- yyg->yy_c_buf_p = (char *) 0;
- yyg->yy_init = 1;
- yyg->yy_start = 0;
- yyg->yy_start_stack_ptr = 0;
- yyg->yy_start_stack_depth = 0;
- yyg->yy_start_stack = (int *) 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
-#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
-#endif
-
- /* For future reference: Set errno on error, since we are called by
- * ael_yylex_init()
- */
- return 0;
-}
-
-/* User-visible API */
-
-/* ael_yylex_init is special because it creates the scanner itself, so it is
- * the ONLY reentrant function that doesn't take the scanner as the last argument.
- * That's why we explicitly handle the declaration, instead of using our macros.
- */
-
-int ael_yylex_init(yyscan_t* ptr_yy_globals)
-
-{
- if (ptr_yy_globals == NULL){
- errno = EINVAL;
- return 1;
- }
-
- *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), NULL );
-
- if (*ptr_yy_globals == NULL){
- errno = ENOMEM;
- return 1;
- }
-
- memset(*ptr_yy_globals,0,sizeof(struct yyguts_t));
-
- return yy_init_globals ( *ptr_yy_globals );
-}
-
-/* ael_yylex_destroy is for both reentrant and non-reentrant scanners. */
-int ael_yylex_destroy (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- /* Pop the buffer stack, destroying each element. */
- while(YY_CURRENT_BUFFER){
- ael_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- ael_yypop_buffer_state(yyscanner);
- }
-
- /* Destroy the stack itself. */
- ael_yyfree(yyg->yy_buffer_stack ,yyscanner);
- yyg->yy_buffer_stack = NULL;
-
- /* Destroy the start condition stack. */
- ael_yyfree(yyg->yy_start_stack ,yyscanner );
- yyg->yy_start_stack = NULL;
-
- /* Destroy the main struct (reentrant only). */
- ael_yyfree ( yyscanner , yyscanner );
- return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
-{
- register int i;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
-{
- register int n;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- for ( n = 0; s[n]; ++n )
- ;
-
- return n;
-}
-#endif
-
-void *ael_yyalloc (yy_size_t size , yyscan_t yyscanner)
-{
- return (void *) malloc( size );
-}
-
-void *ael_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
-{
- /* The cast to (char *) in the following accommodates both
- * implementations that use char* generic pointers, and those
- * that use void* generic pointers. It works with the latter
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * as though doing an assignment.
- */
- return (void *) realloc( (char *) ptr, size );
-}
-
-void ael_yyfree (void * ptr , yyscan_t yyscanner)
-{
- free( (char *) ptr ); /* see ael_yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#undef YY_NEW_FILE
-#undef YY_FLUSH_BUFFER
-#undef yy_set_bol
-#undef yy_new_buffer
-#undef yy_set_interactive
-#undef yytext_ptr
-#undef YY_DO_BEFORE_ACTION
-
-#ifdef YY_DECL_IS_OURS
-#undef YY_DECL_IS_OURS
-#undef YY_DECL
-#endif
-#line 461 "ael.flex"
-
-
-
-static void pbcpush(char x)
-{
- pbcstack[pbcpos++] = x;
-}
-
-static int pbcpop(char x)
-{
- if ( ( x == ')' && pbcstack[pbcpos-1] == '(' )
- || ( x == ']' && pbcstack[pbcpos-1] == '[' )
- || ( x == '}' && pbcstack[pbcpos-1] == '{' )) {
- pbcpos--;
- return 0;
- }
- return 1; /* error */
-}
-
-static int c_prevword(void)
-{
- char *c = prev_word;
- if (c == NULL)
- return 0;
- while ( *c ) {
- switch (*c) {
- case '{':
- case '[':
- case '(':
- pbcpush(*c);
- break;
- case '}':
- case ']':
- case ')':
- if (pbcpop(*c))
- return 1;
- break;
- }
- c++;
- }
- return 0;
-}
-
-
-/*
- * The following three functions, reset_*, are used in the bison
- * code to switch context. As a consequence, we need to
- * declare them global and add a prototype so that the
- * compiler does not complain.
- *
- * NOTE: yyg is declared because it is used in the BEGIN macros,
- * though that should be hidden as the macro changes
- * depending on the flex options that we use - in particular,
- * %reentrant changes the way the macro is declared;
- * without %reentrant, BEGIN uses yystart instead of yyg
- */
-
-void reset_parencount(yyscan_t yyscanner );
-void reset_parencount(yyscan_t yyscanner )
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- parencount = 0;
- pbcpos = 0;
- pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
- c_prevword();
- BEGIN(paren);
-}
-
-void reset_semicount(yyscan_t yyscanner );
-void reset_semicount(yyscan_t yyscanner )
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- pbcpos = 0;
- BEGIN(semic);
-}
-
-void reset_argcount(yyscan_t yyscanner );
-void reset_argcount(yyscan_t yyscanner )
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- parencount = 0;
- pbcpos = 0;
- pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */
- c_prevword();
- BEGIN(argg);
-}
-
-/* used elsewhere, but some local vars */
-struct pval *ael2_parse(char *filename, int *errors)
-{
- struct pval *pval;
- struct parse_io *io;
- char *buffer;
- struct stat stats;
- FILE *fin;
-
- /* extern int ael_yydebug; */
-
- io = calloc(sizeof(struct parse_io),1);
- /* reset the global counters */
- prev_word = 0;
- my_lineno = 1;
- include_stack_index=0;
- my_col = 0;
- /* ael_yydebug = 1; */
- ael_yylex_init(&io->scanner);
- fin = fopen(filename,"r");
- if ( !fin ) {
- ast_log(LOG_ERROR,"File %s could not be opened\n", filename);
- *errors = 1;
- return 0;
- }
- my_file = strdup(filename);
- stat(filename, &stats);
- buffer = (char*)malloc(stats.st_size+2);
- fread(buffer, 1, stats.st_size, fin);
- buffer[stats.st_size]=0;
- fclose(fin);
-
- ael_yy_scan_string (buffer ,io->scanner);
- ael_yyset_lineno(1 , io->scanner);
-
- /* ael_yyset_in (fin , io->scanner); OLD WAY */
-
- ael_yyparse(io);
-
-
- pval = io->pval;
- *errors = io->syntax_error_count;
-
- ael_yylex_destroy(io->scanner);
- free(buffer);
- free(io);
-
- return pval;
-}
-