eliot-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Eliot-dev] Changes to eliot/dic/regexp.c [antoine-1]


From: eliot-dev
Subject: [Eliot-dev] Changes to eliot/dic/regexp.c [antoine-1]
Date: Sun, 23 Oct 2005 16:58:33 -0400

Index: eliot/dic/regexp.c
diff -u eliot/dic/regexp.c:1.9.2.1 eliot/dic/regexp.c:1.9.2.2
--- eliot/dic/regexp.c:1.9.2.1  Sun Oct 23 17:13:56 2005
+++ eliot/dic/regexp.c  Sun Oct 23 20:58:19 2005
@@ -17,8 +17,6 @@
 /* along with this program; if not, write to the Free Software               */
 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
*/
 
-/* $Id: regexp.c,v 1.9.2.1 2005/10/23 17:13:56 afrab Exp $ */
-
 /**
  *  \file   regexp.c
  *  \brief  Regular Expression fonctions
@@ -41,9 +39,9 @@
 
 #ifndef PDBG
 #ifdef DEBUG_RE2
-#define PDBG(x) x 
+#define PDBG(x) x
 #else
-#define PDBG(x) 
+#define PDBG(x)
 #endif
 #endif
 
@@ -77,7 +75,7 @@
 #endif
 
 /**
- * computes position, annulable, PP, DP attributes 
+ * computes position, annulable, PP, DP attributes
  * @param r   = root
  * @param p   = current leaf position
  * @param n   = current node number
@@ -133,7 +131,7 @@
 }
 
 /**
- * computes possuivante 
+ * computes possuivante
  * @param r   = root
  * @param PS  = next position
  */
@@ -152,7 +150,7 @@
     case NODE_AND:
       /************************************/
       /* \forall p \in DP(left)           */
-      /*     PS[p] = PS[p] \cup PP(right) */ 
+      /*     PS[p] = PS[p] \cup PP(right) */
       /************************************/
       for(pos=1; pos <= PS[0]; pos++)
        {
@@ -164,7 +162,7 @@
       /************************************/
       /* == same as START                 */
       /* \forall p \in DP(left)           */
-      /*     PS[p] = PS[p] \cup PP(left)  */ 
+      /*     PS[p] = PS[p] \cup PP(left)  */
       /************************************/
       for(pos=1; pos <= PS[0]; pos++)
        {
@@ -175,7 +173,7 @@
     case NODE_STAR:
       /************************************/
       /* \forall p \in DP(left)           */
-      /*     PS[p] = PS[p] \cup PP(left)  */ 
+      /*     PS[p] = PS[p] \cup PP(left)  */
       /************************************/
       for(pos=1; pos <= PS[0]; pos++)
        {
@@ -232,9 +230,9 @@
     case RE_CONS_MATCH: fprintf(f,"(:c: [%d])",l); break;
     case RE_USR1_MATCH: fprintf(f,"(:1: [%d])",l); break;
     case RE_USR2_MATCH: fprintf(f,"(:2: [%d])",l); break;
-    default: 
+    default:
       if (l < RE_FINAL_TOK)
-       fprintf(f," (%c [%d]) ",l + 'a' - 1, l); 
+       fprintf(f," (%c [%d]) ",l + 'a' - 1, l);
       else
        fprintf(f," (liste %d)",l - RE_LIST_USER_END);
        break;
@@ -255,9 +253,9 @@
     case RE_CONS_MATCH: fprintf(f,":c:"); break;
     case RE_USR1_MATCH: fprintf(f,":1:"); break;
     case RE_USR2_MATCH: fprintf(f,":2:"); break;
-    default: 
+    default:
       if (l < RE_FINAL_TOK)
-       fprintf(f,"%c",l + 'a' - 1); 
+       fprintf(f,"%c",l + 'a' - 1);
       else
        fprintf(f,"l%d",l - RE_LIST_USER_END);
        break;
@@ -297,7 +295,7 @@
              n->position,n->annulable,n->PP,n->DP);
     }
 }
-#endif 
+#endif
 
 /*////////////////////////////////////////////////
 ////////////////////////////////////////////////*/
@@ -305,8 +303,8 @@
 #ifdef DEBUG_RE
 static void print_tree_nodes(FILE* f, NODE* n, int detail)
 {
-  if (n == NULL) 
-    return; 
+  if (n == NULL)
+    return;
 
   print_tree_nodes(f,n->fg,detail);
   print_tree_nodes(f,n->fd,detail);
@@ -328,7 +326,7 @@
 
   print_tree_edges(f,n->fg);
   print_tree_edges(f,n->fd);
-  
+
   switch (n->type)
     {
     case NODE_OR:
@@ -354,8 +352,8 @@
 void regexp_print_tree(NODE* n, char* name, int detail)
 {
   FILE* f;
-  pid_t   pid; 
-  
+  pid_t   pid;
+
   f=fopen(name,"w");
   fprintf(f,"digraph %s {\n",name);
   print_tree_nodes(f,n,detail);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]