summaryrefslogtreecommitdiff
path: root/pbx/ael/ael.flex
diff options
context:
space:
mode:
authorSteve Murphy <murf@digium.com>2006-08-31 02:53:15 +0000
committerSteve Murphy <murf@digium.com>2006-08-31 02:53:15 +0000
commit6557d250c84977254fc48e360aaed4386ffd123d (patch)
treeac2165a2a83b341fb8cae9e66844b123ae77cb1c /pbx/ael/ael.flex
parenta0cd4f4cc8ab7d98073900929c0738b3f7f42d9c (diff)
This commit is a basic AEL enhancement: c-style comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/ael/ael.flex')
-rw-r--r--pbx/ael/ael.flex9
1 files changed, 8 insertions, 1 deletions
diff --git a/pbx/ael/ael.flex b/pbx/ael/ael.flex
index f773dd4e9..1c4722e9b 100644
--- a/pbx/ael/ael.flex
+++ b/pbx/ael/ael.flex
@@ -26,7 +26,7 @@
*
* %x describes the contexts we have: paren, semic and argg, plus INITIAL
*/
-%x paren semic argg
+%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
@@ -211,6 +211,13 @@ 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; }