mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-21 12:30:41 +00:00
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
This commit is contained in:
@@ -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; }
|
||||
|
Reference in New Issue
Block a user