You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/10/17 21:18:40 UTC

[lucy-commits] svn commit: r1185338 - /incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l

Author: marvin
Date: Mon Oct 17 19:18:40 2011
New Revision: 1185338

URL: http://svn.apache.org/viewvc?rev=1185338&view=rev
Log:
Indent verbatim include text in Flex file for clarity.

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=1185338&r1=1185337&r2=1185338&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l Mon Oct 17 19:18:40 2011
@@ -15,31 +15,31 @@
  */
 
 %{
-#include "CFC.h"
-#include "CFCParseHeader.h"
+    #include "CFC.h"
+    #include "CFCParseHeader.h"
 
-void
-CFCParseHeader(void *header_parser, int token_type, CFCBase *value,
-               CFCParserState *state);
-/* Invoke Lemon-generated parser. */
-#define PARSE(token_type) \
-    CFCParseHeader(CFCParser_current_parser, token_type, NULL, \
-        CFCParser_current_state)
-
-/* Copy yytext and then invoke parser. */
-#define SAVE_AND_PARSE(token_type) \
-    S_save_and_parse(token_type)
-static void
-S_save_and_parse(int token_type) {
-    if (yyleng >= CFCParser_current_state->cap) {
-        CFCParser_current_state->text
-            = REALLOCATE(CFCParser_current_state->text, yyleng + 1);
-        CFCParser_current_state->cap = yyleng + 1;
+    void
+    CFCParseHeader(void *header_parser, int token_type, CFCBase *value,
+                   CFCParserState *state);
+    /* Invoke Lemon-generated parser. */
+    #define PARSE(token_type) \
+        CFCParseHeader(CFCParser_current_parser, token_type, NULL, \
+            CFCParser_current_state)
+
+    /* Copy yytext and then invoke parser. */
+    #define SAVE_AND_PARSE(token_type) \
+        S_save_and_parse(token_type)
+    static void
+    S_save_and_parse(int token_type) {
+        if (yyleng >= CFCParser_current_state->cap) {
+            CFCParser_current_state->text
+                = REALLOCATE(CFCParser_current_state->text, yyleng + 1);
+            CFCParser_current_state->cap = yyleng + 1;
+        }
+        strncpy(CFCParser_current_state->text, yytext, yyleng);
+        CFCParser_current_state->text[yyleng] = '\0';
+        PARSE(token_type);
     }
-    strncpy(CFCParser_current_state->text, yytext, yyleng);
-    CFCParser_current_state->text[yyleng] = '\0';
-    PARSE(token_type);
- }
 %}
 
 OBJECT_TYPE_SPECIFIER   ([a-z]+[a-z0-9]*_)?[A-Z]+[A-Z0-9]*[a-z]+[A-Za-z0-9]*