lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] svn commit: r1178941 - /incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l
Date Tue, 04 Oct 2011 20:16:02 GMT
Author: marvin
Date: Tue Oct  4 20:16:02 2011
New Revision: 1178941

URL: http://svn.apache.org/viewvc?rev=1178941&view=rev
Log:
Introduce a space saving macro.

Modified:
    incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l

Modified: incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l?rev=1178941&r1=1178940&r2=1178941&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l Tue Oct  4 20:16:02
2011
@@ -20,19 +20,16 @@
 void
 CFCParseHeader(void *header_parser, int token_type, CFCBase *value,
                CFCParserState *state);
+#define PARSE(token_type, value) \
+    CFCParseHeader(CFCParser_current_parser, token_type, value, \
+        CFCParser_current_state)
 %}
 
 %option noyywrap
 
 %%
-void {
-    CFCParseHeader(CFCParser_current_parser, CFC_TOKENTYPE_VOID, NULL,
-                   CFCParser_current_state);
-}
+void       { PARSE(CFC_TOKENTYPE_VOID, NULL); }
 
-const {
-    CFCParseHeader(CFCParser_current_parser, CFC_TOKENTYPE_CONST, NULL,
-                   CFCParser_current_state);
-}
+const      { PARSE(CFC_TOKENTYPE_CONST, NULL); }
 %%
 



Mime
View raw message