summaryrefslogtreecommitdiff
path: root/pbx/ael
AgeCommit message (Collapse)Author
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2010-12-22Merged revisions 299449 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r299449 | tilghman | 2010-12-22 14:05:02 -0600 (Wed, 22 Dec 2010) | 15 lines Merged revisions 299448 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r299448 | tilghman | 2010-12-22 14:03:30 -0600 (Wed, 22 Dec 2010) | 8 lines Resolve warnings by disambiguating the "s" extension as used by chan_dahdi from the "s" extension as used by the AEL macros. (closes issue #18480) Reported by: nivek Patches: 20101215__issue18480__2.diff.txt uploaded by tilghman (license 14) Tested by: nivek ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-04Merged revisions 290255 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r290255 | tilghman | 2010-10-04 18:23:11 -0500 (Mon, 04 Oct 2010) | 18 lines Merged revisions 290254 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r290254 | tilghman | 2010-10-04 18:14:59 -0500 (Mon, 04 Oct 2010) | 11 lines Change new pattern matcher to regard dashes the same as the old pattern matcher -- as visual candy to be ignored. Also change the AEL parser to not generate dashes within extensions, as those dashes would be ignored. Update the AEL tests to match this behavior. (closes issue #17366) Reported by: murf Patches: 20100727__issue17366.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17fixed the regressionsSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-04Merged revisions 141094 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r141094 | murf | 2008-09-04 17:15:07 -0600 (Thu, 04 Sep 2008) | 70 lines (closes issue #13357) Reported by: pj Tested by: murf (closes issue #13416) Reported by: yarns Tested by: murf If you find this message overly verbose, relax, it's probably not meant for you. This message is meant for probably only two people in the whole world: me, or the poor schnook that has to maintain this code because I'm either dead or unavailable at the moment. This fix solves two reports, both having to do with embedding a function call in a ${} construct. It was tricky because the funccall syntax has parenthesis () in it. And up till now, the 'word' token in the flex stuff didn't allow that, because it would tend to steal the LP and RP tokens. To be truthful, the "word" token was the trickiest, most unstable thing in the whole lexer. I was lucky it made this long without complaints. I had to choose every character in the pattern with extreme care, and I knew that someday I'd have to revisit it. Well, the day has come. So, my brilliant idea (and I'm being modest), was to use the surrounding ${} construct to make a state machine and capture everything in it, no matter what it contains. But, I have to now treat the word token like I did with comments, in that I turn the whole thing into a state-machine sort of spec, with new contexts "curlystate", "wordstate", and "brackstate". Wait a minute, "brackstate"? Yes, well, it didn't take very many regression tests to point out if I do this for ${} constructs, I also have to do it with the $[] constructs, too. I had to create a separate pcbstack2 and pcbstack3 because these constructs can occur inside macro argument lists, and when we have two state machines operating on the same structures we'd get problems otherwise. I guess I could have stopped at pcbstack2 and had the brackstate stuff share it, but it doesn't hurt to be safe. So, the pcbpush and pcbpop routines also now have versions for "2" and "3". I had to add the {KEYWORD} construct to the initial pattern for "word", because previously word would match stuff like "default7", because it was a longer match than the keyword "default". But, not any more, because the word pattern only matches only one or two characters now, and it will always lose. So, I made it the winner again by making an optional match on any of the keywords before it's normal pattern. I added another regression test to make sure we don't lose this in future edits, and had to fix just one regression, where it no longer reports a 'cascaded' error, which I guess is a plus. I've given some thought as to whether to apply these fixes to 1.4 and the 1.6.x releases, vs trunk; I decided to put it in 1.4 because one of the bug reports was against 1.4; and it is unexpected that AEL cannot handle this situation. It actually reduced the amount of useless "cascade" error messages that appeared in the regressions (by one line, ehhem). There is a possible side-effect in that it does now do more careful checking of what's in those ${} constructs, as far as matching parens, and brackets are concerned. Some users may find a an insidious problem and correct it this way. This should be exceedingly rare, I hope. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-08Merged revisions 136726 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r136726 | murf | 2008-08-07 18:15:34 -0600 (Thu, 07 Aug 2008) | 32 lines (closes issue #13236) Reported by: korihor Wow, this one was a challenge! I regrouped and ran a new strategy for setting the ~~MACRO~~ value; I set it once per extension, up near the top. It is only set if there is a switch in the extension. So, I had to put in a chunk of code to detect a switch in the pval tree. I moved the code to insert the set of ~~exten~~ up to the beginning of the gen_prios routine, instead of down in the switch code. I learned that I have to push the detection of the switches down into the code, so everywhere I create a new exten in gen_prios, I make sure to pass onto it the values of the mother_exten first, and the exten next. I had to add a couple fields to the exten struct to accomplish this, in the ael_structs.h file. The checked field makes it so we don't repeat the switch search if it's been done. I also updated the regressions. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03Merged revisions 119966 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r119966 | murf | 2008-06-03 09:26:56 -0600 (Tue, 03 Jun 2008) | 8 lines Updated the regressions on AEL. Hadn't updated this for the changes I made to preserve ${EXTEN} in switches, which affected several tests because it adds extra priorities, and at least one needed to be updated because of the removal of the empty extension warning message. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-21(closes issue #12467)Steve Murphy
Reported by: atis Tested by: murf This upgrade adds the ~~ (concatenation) string operator to expr2. While not needed in normal runtime pbx operation, it is needed when raw exprs are being syntax checked. This plays into future syntax- unification plans. By permission of atis, this addition in trunk and the reason of why things are as they are will suffice to close this bug. I also added a short note about the previous addition of "sip show sched" to the CLI in CHANGES, which I discovered I forgot in a previous commit. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Merged revisions 109309 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r109309 | murf | 2008-03-18 00:37:15 -0600 (Tue, 18 Mar 2008) | 17 lines (closes issue #11903) Reported by: atis Many thanks to atis for spotting this problem and reporting it. The fix was to straighten out how items are placed on and removed from the file stack. Regressions as well as the provided test case helped to straighten out all code paths. valgrind was used to make sure all memory allocated was freed. Sorry for not solving this earlier. I got distracted. Added the ntest23 regression test, which is mainly a copy of ntest22, but with a few juicy errors thrown in, to replicate the kind of error that atis spotted. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27made AEL 8-bit transparent; mainly the lexer was tossing chars with the ↵Steve Murphy
hi-order bit set. Not nice. Also, allow @ in extension names, and a backslash, also. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26Change all instances of "CALLERID(number)" to "CALLERID(num)" forMark Michelson
consistency's sake (closes issue #11381, reported and patched by jon) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-26Merged revisions 87168 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87168 | murf | 2007-10-26 10:34:02 -0600 (Fri, 26 Oct 2007) | 1 line closes issue #11086 where a user complains that references to following contexts report a problem; The problem was REALLy that he was referring to empty contexts, which were being ignored. Reporter stated that empty contexts should be OK. I checked it out against extensions.conf, and sure enough, empty contexts ARE ok. So, I removed the restriction from AEL. This, though, highlighted a problem with multiple contexts of the same name. This should be OK, also. So, I added the extend keyword to AEL, and it can preceed the 'context' keyword (mixed with 'abstract', if nec.). This will turn off the warnings in AEL if the same context name is used 2 or more times. Also, I now call ast_context_find_or_create for contexts now, instead of just ast_context_create; I did this because pbx_config does this. The 'extend' keyword thus becomes a statement of intent. AEL can now duplicate the behavior of pbx_config, ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-24closes issue #11005, where #include uses the current dir instead of the ↵Steve Murphy
config dir (/etc/asterisk) for relative path includes for AEL git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-03Merged revisions 84511 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84511 | murf | 2007-10-03 08:23:00 -0600 (Wed, 03 Oct 2007) | 1 line closes issue #10834 ; where a null input to a switch statement results in a hangup; since switch is implemented with extensions, and the default case is implemented with a '.', and the '.' matches 1 or more remaining characters, the case where 0 characters exist isn't matched, and the extension isn't matched, and the goto fails, and a hangup occurs. Now, when a default case is generated, it also generates a single fixed extension that will match a null input. That extension just does a goto to the default extension for that switch. I played with an alternate solution, where I just tack an extra char onto all the patterns and the goto, but not the default case's pattern. Then even a null input will still have at least one char in it. But it made me nervous, having that extra char in , even if that's a pretty secret and low-level issue. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-29the last commit for AEL affected a small number of tests. Added a regression ↵Steve Murphy
test for glob'd includes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23an unreported crash I debugged, looked like it was backing up way too far ↵Steve Murphy
after hitting the syntax error. An inspection of the code revealed that error tokens in lists were not rearranged when the rules were rearranged as part of a code neatening-up process. By moving the error tokens to where they should be, I also reduced the number of shift/reduce conflicts to 3 instead of 8. This introduces subtle differences in error messages, so the regressions had to be updated. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15This commit closes bug 7605, and half-closes 7638. The AEL code has been ↵Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@79595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14Merged revisions 79255 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79255 | murf | 2007-08-13 11:49:54 -0600 (Mon, 13 Aug 2007) | 1 line This patch fixes bug 10411. I added a new regression test, some regression test cleanups ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20This finishes the changes for making Macro args LOCAL to the call, and ↵Steve Murphy
allowing users to declare local variables. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05Merged revisions 67526 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r67526 | murf | 2007-06-05 15:30:18 -0600 (Tue, 05 Jun 2007) | 1 line this fixes bug 9883, wherein macros were not allowing the includes construct. fixed and tested, looks OK. Now includes can serve as an adjunct to catch. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04Change javadoc style code documentation to the same format we use elsewhere.Russell Bryant
(issue #9864, patch from snuffy) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03Merged revisions 62883 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r62883 | murf | 2007-05-03 07:54:56 -0600 (Thu, 03 May 2007) | 1 line These mods fix bug 9623, where an '@' in the eswitch contents causes a syntax error. I also updated the regressions. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26added the no. 18 regression testSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26updated the regressions with regards to 9373, the crash on double contexts, ↵Steve Murphy
and brought other regressions up to date git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26Merged revisions 59206 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59206 | murf | 2007-03-26 11:38:29 -0600 (Mon, 26 Mar 2007) | 1 line A fix for the flex input files, DONT_COMPILE, and STANDALONE_AEL ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26Merged revisions 59200 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59200 | file | 2007-03-26 11:16:29 -0400 (Mon, 26 Mar 2007) | 2 lines Have ast_copy_string magically appear in the aelparse binary! DONT_OPTIMIZE should now work once again. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-03updated the regression testsSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18add -Wundef to the --enable-dev-mode flags, so that mistyped macro names in ↵Kevin P. Fleming
#if expressions will be caught convert various #if expressions to #ifdef for macros that may not be defined (and where the value is not important) Note: two of these changes are in bison generated files which is going to be inconvenient when they are regenerated git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-02Merged revisions 49237 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49237 | murf | 2007-01-02 15:30:53 -0700 (Tue, 02 Jan 2007) | 1 line This is a slight modification to Josh's edits for #8579; both files edited were the produced by flex; so the source files need to be changed instead, and the generated files regenerated. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-28Jason is having problems with the inclusion of <err.h>; it appears to be ↵Steve Murphy
unnecessary for sucessful builds, so I either removed or commented out the inclusions from all the AEL related code. New outputs from bison/flex are included, etc. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-27Merged revisions 49009 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49009 | file | 2006-12-27 17:28:46 -0500 (Wed, 27 Dec 2006) | 2 lines ast_copy_string is not available when LOW_MEMORY is used and things are being built in the utils directory, so we need to resort to the old method of strncpy. (issue #8579 reported by mottano) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13Eager people beat me to fixing the messed if, but we all forgot to update ↵Steve Murphy
the regressions. Until now. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13Correction for bug 8128 in trunkSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04These changes resolve the problems in bug 8090, where there's a crash ↵Steve Murphy
compiling an empty context git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03These changes correspond to the changes to app_stack's Gosub() applicationSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27This commits the changes to AEL to use the gosub-with-args from Tilghman to ↵Steve Murphy
perform macro calls. This results in substantially smaller stack footprint, which allows macro call depths in excess of 100,000 levels, rather than the limit of 7 calls deep, which the Macro app is subject to. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31This commit is a basic AEL enhancement: c-style commentsSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25Changes to fix all problems reported in 7804 are included here.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-12This commit merges the contents of 7721, as it applied to the trunk version. ↵Steve Murphy
Added the item that would previously trigger a false error to test1. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-11added a -q for quiet, option to aelparseSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-09This bug adds enhancement as per bug 7606, the -wSteve Murphy
option to aelparse. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07The contents of branch teams/murf/bug_7598 are being folded in here.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01This branch will resolve the bug 7635.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19committing a fix for colons in goto arguments and suppressing operator ↵Steve Murphy
messages in globals assignments. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06OK, here is everything I changed to fix 7474:Steve Murphy
1. ael/ael.flex -- the "fix" is here. In short, I modified the pattern for the chars that break args, to exclude those chars that would normally break args if they are preceded by a backslash. I did this to 3 patterns where really, this kind of exclusion should be placed. 2. ael_lex.c is an updated output from lex. 3. the ael-test stuff -- instituted a regression test for this condition. as ael_ntest9. The "n" in the name means that instead of just getting the syntax/semantic errors and high-level output from aelparse, we also want the compilation results to be in the comparison file. (remove the -n option). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18merge changes from team/murf/AEL-trunk-fixesonlyRussell Bryant
- fix callerid matching for extensions - fix nested switch statements - fix compilation with bison 2.1a or higher (issue #7309) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-10don't use ast_copy_string when building for an external toolRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09various minor portability fixes (mostly from tholo for OpenBSD)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵Kevin P. Fleming
again :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03more simplificationsLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24460 65c4cc65-6c06-0410-ace0-fbb531ad65f3