]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/www/lambdadelta/bin/xhtbl/textParser.mly
update in basic_2
[helm.git] / helm / www / lambdadelta / bin / xhtbl / textParser.mly
index 3dba122d04a9581cec3008d3c396245aced8a8f9..9072c2b23ddf96932583b797c8125945bf4f9c9a 100644 (file)
@@ -20,7 +20,7 @@ let mk_string_atom s rs =
 
 %token <int> NUM
 %token <string> TEXT 
-%token SPACE NAME TABLE CSS URI EXT SR OC CC OB CB PS OP CP AT EOF
+%token SPACE NAME TABLE CSS URI EXT SR OC CC OB CB PS CF OP CP AT EOF
 
 %start script
 %type <(string * string) list * (string * Table.table * Table.css Attr.atoms * Table.uri Attr.atoms * Table.ext Attr.atoms) list> script
@@ -45,8 +45,9 @@ text:
 ;
 
 texts:
-  | text          { [$1]     }
-  | text PS texts { $1 :: $3 }
+  | text          { [$1]                    }
+  | text PS texts { $1 :: T.Plain " " :: $3 }
+  | text CF texts { $1 :: $3                }
 ;
 
 key:
@@ -71,9 +72,9 @@ ext:
 ;
 
 table:
-   | css uri ext key          { T.mk_key        $4 $1 $2 $3 }
-   | css uri ext OC tables CC { T.mk_line false $5 $1 $2 $3 }
-   | css uri ext OB tables CB { T.mk_line true  $5 $1 $2 $3 }
+   | css uri ext name key     { T.mk_key        $5 $1 $2 $3 $4 }
+   | css uri ext OC tables CC { T.mk_line false $5 $1 $2 $3 "" }
+   | css uri ext OB tables CB { T.mk_line true  $5 $1 $2 $3 "" }
 ;
 
 tables: