[asterisk-commits] trunk r23550 - in /trunk/pbx/ael: ael.flex ael_lex.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Apr 30 02:06:29 MST 2006


Author: rizzo
Date: Sun Apr 30 04:06:28 2006
New Revision: 23550

URL: http://svn.digium.com/view/asterisk?rev=23550&view=rev
Log:
comment some code


Modified:
    trunk/pbx/ael/ael.flex
    trunk/pbx/ael/ael_lex.c

Modified: trunk/pbx/ael/ael.flex
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael.flex?rev=23550&r1=23549&r2=23550&view=diff
==============================================================================
--- trunk/pbx/ael/ael.flex (original)
+++ trunk/pbx/ael/ael.flex Sun Apr 30 04:06:28 2006
@@ -493,7 +493,19 @@
 }
 
 
-/* used by the bison code */
+/*
+ * 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 )
 {
@@ -505,7 +517,6 @@
 	BEGIN(paren);
 }
 
-/* used by the bison code */
 void reset_semicount(yyscan_t yyscanner );
 void reset_semicount(yyscan_t yyscanner )
 {
@@ -514,7 +525,6 @@
 	BEGIN(semic);
 }
 
-/* used by the bison code */
 void reset_argcount(yyscan_t yyscanner );
 void reset_argcount(yyscan_t yyscanner )
 {

Modified: trunk/pbx/ael/ael_lex.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael_lex.c?rev=23550&r1=23549&r2=23550&view=diff
==============================================================================
--- trunk/pbx/ael/ael_lex.c (original)
+++ trunk/pbx/ael/ael_lex.c Sun Apr 30 04:06:28 2006
@@ -2781,7 +2781,19 @@
 }
 
 
-/* used by the bison code */
+/*
+ * 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 )
 {
@@ -2793,7 +2805,6 @@
 	BEGIN(paren);
 }
 
-/* used by the bison code */
 void reset_semicount(yyscan_t yyscanner );
 void reset_semicount(yyscan_t yyscanner )
 {
@@ -2802,7 +2813,6 @@
 	BEGIN(semic);
 }
 
-/* used by the bison code */
 void reset_argcount(yyscan_t yyscanner );
 void reset_argcount(yyscan_t yyscanner )
 {



More information about the asterisk-commits mailing list