Index: trunk/flexbisonparse/wikiparse.y |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | textelement textelementnoboit textelementnobold textelementnoital textelementinlink |
38 | 38 | textnoboit textnobold textnoital textinlink textorempty zeroormorenewlines |
39 | 39 | zeroormorenewlinessave textintbl textelementintbl textintmpl textelementintmpl |
40 | | - template templatevar tablecaption |
| 40 | + template templatevar tablecaption linktrail linktrailtext |
41 | 41 | TEXT EXTENSION |
42 | 42 | %type <ad> ATTRIBUTE |
43 | 43 | %type <num> HEADING ENDHEADING EQUALS ATTRAPO ATTRQ |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | NEWLINE PRELINE LISTBULLET LISTNUMBERED LISTIDENT HEADING ENDHEADING APO5 APO3 APO2 TABLEBEGIN |
48 | 48 | TABLECELL TABLEHEAD TABLEROW TABLEEND TABLECAPTION ATTRIBUTE EQUALS ATTRAPO ATTRQ |
49 | 49 | OPENPENTUPLECURLY CLOSEPENTUPLECURLY OPENTEMPLATEVAR CLOSETEMPLATEVAR OPENTEMPLATE |
50 | | - CLOSETEMPLATE |
| 50 | + CLOSETEMPLATE LINKTRAIL |
51 | 51 | |
52 | 52 | %start article |
53 | 53 | |
— | — | @@ -136,21 +136,28 @@ |
137 | 137 | | listseries LISTNUMBERED { debugf ("listseries#6 "); $$ = nodeAddChild ($1, newNode (ListNumbered)); } |
138 | 138 | | listseries LISTIDENT { debugf ("listseries#6 "); $$ = nodeAddChild ($1, newNode (ListIdent)); } |
139 | 139 | |
140 | | -linketc : OPENDBLSQBR textinlink CLOSEDBLSQBR |
| 140 | +/* THIS IS BROKEN BEYOND BELIEF! */ |
| 141 | +linktrailtext : linktrailtext LINKTRAIL { $$ = $1 ; } |
| 142 | + | LINKTRAIL { } |
| 143 | + |
| 144 | +linktrail : CLOSEDBLSQBR linktrailtext { $$ = $2 } /* Don't know how to handle the trail; ignored so far */ |
| 145 | + | CLOSEDBLSQBR {} |
| 146 | + |
| 147 | +linketc : OPENDBLSQBR textinlink linktrail |
141 | 148 | { debugf ("linketc#1 "); $$ = nodeAddChild (newNodeI (LinkEtc, 0), nodeAddChild (newNode (LinkTarget), $2)); } |
142 | | - | OPENDBLSQBR textinlink PIPE CLOSEDBLSQBR |
| 149 | + | OPENDBLSQBR textinlink PIPE linktrail |
143 | 150 | { debugf ("linketc#2 "); $$ = nodeAddChild (newNodeI (LinkEtc, 1), nodeAddChild (newNode (LinkTarget), $2)); } |
144 | | - | OPENDBLSQBR textinlink pipeseries CLOSEDBLSQBR |
| 151 | + | OPENDBLSQBR textinlink pipeseries linktrail |
145 | 152 | { debugf ("linketc#3 "); $$ = nodeAddChild2 (newNodeI (LinkEtc, 0), nodeAddChild (newNode (LinkTarget), $2), $3); } |
146 | | - | OPENDBLSQBR textinlink pipeseries PIPE CLOSEDBLSQBR |
| 153 | + | OPENDBLSQBR textinlink pipeseries PIPE linktrail |
147 | 154 | { debugf ("linketc#4 "); $$ = nodeAddChild2 (newNodeI (LinkEtc, 1), nodeAddChild (newNode (LinkTarget), $2), $3); } |
148 | | - | OPENLINK textinlink CLOSEDBLSQBR |
| 155 | + | OPENLINK textinlink linktrail |
149 | 156 | { debugf ("linketc#5 "); $$ = nodeAddChild (newNodeI (LinkEtc, 2), nodeAddChild (newNode (LinkTarget), $2)); } |
150 | | - | OPENLINK textinlink PIPE CLOSEDBLSQBR |
| 157 | + | OPENLINK textinlink PIPE linktrail |
151 | 158 | { debugf ("linketc#6 "); $$ = nodeAddChild (newNodeI (LinkEtc, 3), nodeAddChild (newNode (LinkTarget), $2)); } |
152 | | - | OPENLINK textinlink pipeseries CLOSEDBLSQBR |
| 159 | + | OPENLINK textinlink pipeseries linktrail |
153 | 160 | { debugf ("linketc#7 "); $$ = nodeAddChild2 (newNodeI (LinkEtc, 2), nodeAddChild (newNode (LinkTarget), $2), $3); } |
154 | | - | OPENLINK textinlink pipeseries PIPE CLOSEDBLSQBR |
| 161 | + | OPENLINK textinlink pipeseries PIPE linktrail |
155 | 162 | { debugf ("linketc#8 "); $$ = nodeAddChild2 (newNodeI (LinkEtc, 3), nodeAddChild (newNode (LinkTarget), $2), $3); } |
156 | 163 | /* ... and now everything again with the CLOSEDBLSQBR missing, |
157 | 164 | * to take care of invalid mark-up. */ |
Index: trunk/flexbisonparse/wikilex.l |
— | — | @@ -128,6 +128,7 @@ |
129 | 129 | <inattributeapo>\'" "* { BEGIN (attributes); yylval.num = yyleng-1; debuglex2 ("ATTRAPO(%d) ", yyleng-1); return ATTRAPO; } |
130 | 130 | <inattributeq>\"" "* { BEGIN (attributes); yylval.num = yyleng-1; debuglex2 ("ATTRQ(%d) ", yyleng-1); return ATTRQ; } |
131 | 131 | |
| 132 | +[a-z] { COMMONTOKENS; debuglex ("LINKTRAIL "); return LINKTRAIL; } |
132 | 133 | "\[\[:" { COMMONTOKENS; debuglex ("OPENLINK "); return OPENLINK; } |
133 | 134 | "\[\[" { COMMONTOKENS; debuglex ("OPENDBLSQBR "); return OPENDBLSQBR; } |
134 | 135 | "\]\]" { COMMONTOKENS; debuglex ("CLOSEDBLSQBR "); return CLOSEDBLSQBR; } |
Index: trunk/flexbisonparse/parsetree.c |
— | — | @@ -898,3 +898,4 @@ |
899 | 899 | outputXMLHelper (node); |
900 | 900 | return fb_get_buffer(); |
901 | 901 | } |
| 902 | + |