aboutsummaryrefslogtreecommitdiffstats
path: root/res/ael/ael.tab.c
AgeCommit message (Collapse)AuthorFilesLines
2009-04-20Merged revisions 189462 via svnmerge from seanbright1-375/+388
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r189462 | seanbright | 2009-04-20 16:58:39 -0400 (Mon, 20 Apr 2009) | 13 lines Properly handle @s within hints in AEL. AEL was not handling the case of a device hint containing an @ symbol, which caused parking hints (e.g. hint(park:exten@context)) to error out the parser. This patch makes AEL treat the @ the same way it treats colon and ampersand now, meaning the characters are included in verbatim. (closes issue #14941) Reported by: bpgoldsb Patches: bug14941.patch uploaded by seanbright (license 71) Tested by: bpgoldsb ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@189464 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18Merged revisions 177225 via svnmerge from murf1-216/+226
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r177225 | murf | 2009-02-18 15:43:14 -0700 (Wed, 18 Feb 2009) | 34 lines This patch fixes a regression of sorts that was introduced in rev 24425. It basically fixes AST-190/ABE-1782. What was wrong: the user has 6000 extensions in one context; and then 6000 contexts, one per extension. The parser could only handle about 4893 of the 6000 extens in the single context. This was due to the regression I mentioned. To get rid of shift/reduce conflicts, Luigi set up right-recursive lists for globals, context elements, switch lists, and statements. Right recursive lists got rid of the warnings, but instead, they use up a tremendous amount of stack space when the lists are long. I saw this a few years back, and resolved not to fix it until someone complained. That day has arrived! After the changes were made, I ran the regression test suite, and there were no problems. I took the test case the user provided, and added 100,000 extensions to the single context, that already had 6,000 extens in it. (I'll see your 6, and raise you 100!) It takes a few minutes to read it all in, check it and generate code for it, but no problems. So, I think I can say that fundamentally, there are no longer any limits on the number of items you can place in contexts, statement blocks, switches, or globals, beyond your virt mem constraints. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177286 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 ↵kpfleming1-136/+190
branch, and add the ones needed for all the new code here too git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-03In these changes, I have added some explanationmurf1-255/+250
of changes to the Set and MSet apps, so people aren't so shocked and surprised when they upgrade from 1.4 to 1.6. Also, for the sake of those upgrading from 1.4 to 1.6 with AEL, I provide automatic support for the "old" way of using Set(), that still does the exact same old thing with quotes and backslashes and so on as 1.4 did, by having AEL compile in the use of MSet() instead of Set(), everywhere it inserts this code. But, if the app_set var is set to 1.6 or higher, it uses the "new", non-evaluative Set(). This only usually happens if the user manually inserts this into the asterisk.conf file, or runs the "make samples" command. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140824 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-19Oops. put a decl in a generated file. My bad, but fixed now.murf1-250/+252
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@138845 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-19These changes are in regards to bug 13249, where users are being surprised ↵murf1-276/+295
by the changes made to the Set app in trunk/1.6.x, as they come from the 1.4 world. They are only bitten if they write their AEL dialplan in the 1.4 world, and then carry it over to a trunk/1.6.x installation where a "make samples" was executed, or where they hand-edited the asterisk.conf file and added the [compat] category with app_set = 1.6 (or higher). (this commit does not totally solve 13249, at least not yet) The change involves issueing a single warning while the AEL file is loading, if: 1. app_set is present in the config file, and set to 1.6 or higher. 2. there are double quotes in an assignment statement (eg x = "hi there";) 3. the warning was not already issued. The standalone app, aelparse, does not (yet) issue this warning. I'd have to have it read in the asterisk.conf file, and that's a bit of hassle. I'll add it if users request it, tho. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@138815 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07(closes issue #6002)murf1-250/+252
Reported by: rizzo Tested by: murf Proposal of the changes to be made, and then an announcement of how they were accomplished: http://lists.digium.com/pipermail/asterisk-dev/2008-February/032065.html and: http://lists.digium.com/pipermail/asterisk-dev/2008-March/032124.html Here is a recap, file by file, of what I have done: pbx/pbx_config.c pbx/pbx_ael.c All funcs that were passed a ptr to the context list, now will ALSO be passed a hashtab ptr to the same set. Why? because (for the time being), the dialplan is stored in both, to facilitate a quick, low-cost move to hash-tables to speed up dialplan processing. If it was deemed necessary to pass the context LIST, well, it is just as necessary to have the TABLE available. This is because the list/table in question might not be the global one, but temporary ones we would use to stage the dialplan on, and then swap into the global position when things are ready. We now have one external function for apps to use, "ast_context_find_or_create()" instead of the pre-existing "find" and "create", as all existing usages used both in tandem anyway. pbx_config, and pbx_ael, will stage the reloaded dialplan into local lists and tables, and then call merge_contexts_and_delete, which will merge (now) existing contexts and priorities from other registrars into this local set by copying them. Then, merge_contexts_and_delete will lock down the contexts, swap the lists and tables, and unlock (real quick), and then destroy the old dialplan. chan_sip.c chan_iax.c chan_skinny.c All the channel drivers that would add regcontexts now use the ast_context_find_or_create now. chan_sip also includes a small fix to get rid of warnings about removing priorities that never got entered. apps/app_meetme.c apps/app_dial.c apps/app_queue.c All the apps that added a context/exten/priority were also modified to use ast_context_find_or_create instead. include/asterisk/pbx.h ast_context_create() is removed. Find_or_create_ is the new method. ast_context_find_or_create() interface gets the hashtab added. ast_merge_contexts_and_delete() gets the local hashtab arg added. ast_wrlock_contexts_version() is added so you can detect if someone else got a writelock between your readlocking and writelocking. ast_hashtab_compare_contexts was made public for use in pbx_config/pbx_ael ast_hashtab_hash_contexts was in like fashion make public. include/asterisk/pval.h ast_compile_ael2() interface changed to include the local hashtab table ptr. main/features.c For the sake of the parking context, we use ast_context_find_or_create(). main/pbx.c I changed all the "tree" names to "table" instead. That's because the original implementation was based on binary trees. (had a free library). Then I moved to hashtabs. Now, the names move forward too. refcount field added to contexts, so you can keep track of how many modules wanted this context to exist. Some log messages that are warnings were inflated from LOG_NOTICE to LOG_WARNING. Added some calls to ast_verb(3,...) for debug messages Lots of little mods to ast_context_remove_extension2, which is now excersized in ways it was not previously; one definite bug fixed. find_or_create was upgraded to handle both local lists/tables as well as the globals. context_merge() was added to do the per-context merging of the old/present contexts/extens/prios into the new/proposed local list/tables ast_merge_contexts_and_delete() was heavily modified. ast_add_extension2() was also upgraded to handle changes. the context_destroy() code was re-engineered to handle the new way of doing things, by exten/prio instead of by context. res/ael/pval.c res/ael/ael.tab.c res/ael/ael.tab.h res/ael/ael.y res/ael/ael_lex.c res/ael/ael.flex utils/ael_main.c utils/extconf.c utils/conf2ael.c utils/Makefile Had to change the interface to ast_compile_ael2(), to include the hashtab ptr. This ended up involving several external apps. The main gotcha was I had to include lock.h and hashtab.h in several places. As a side note, I tested this stuff pretty thoroughly, I replicated the problems originally reported by Luigi, and made triply sure that reloads worked, and everything worked thru "stop gracefully". I found a and fixed a few bugs as I was merging into trunk, that did not appear in my tests of bug6002. How's this for verbose commit messages? git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106757 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27made AEL 8-bit transparent; mainly the lexer was tossing chars with the ↵murf1-474/+487
hi-order bit set. Not nice. Also, allow @ in extension names, and a backslash, also. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89682 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26Merged revisions 87168 via svnmerge from murf1-682/+696
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: http://svn.digium.com/svn/asterisk/trunk@87187 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-24Merged revisions 86936 via svnmerge from murf1-401/+416
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r86936 | murf | 2007-10-23 22:14:28 -0600 (Tue, 23 Oct 2007) | 1 line closes issue #11037 -- unable to specify app:spec in hint arguments ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86954 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01Merged revisions 84239 via svnmerge from murf1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84239 | murf | 2007-10-01 14:27:52 -0600 (Mon, 01 Oct 2007) | 1 line closes issue #10777 -- by returning a null for the parse tree when there's really nothing there, and making sure we don't try to do checking on a null tree. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84327 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-27deal with more gcc 4.2 const pointer warningskpfleming1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83978 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23an unreported crash I debugged, looked like it was backing up way too far ↵murf1-254/+243
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: http://svn.digium.com/svn/asterisk/trunk@80649 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-15This commit closes bug 7605, and half-closes 7638. The AEL code has been ↵murf1-0/+3382
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