r5310 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5309‎ | r5310 | r5311 >
Date:23:31, 19 September 2004
Author:timwi
Status:old
Tags:
Comment:
* treat lines with only spaces in them like empty lines
* treat four opening curly brackets as a template in a template, not a template variable
followed by a '{'
Modified paths:
  • /trunk/flexbisonparse/wikilex.l (modified) (history)

Diff [purge]

Index: trunk/flexbisonparse/wikilex.l
@@ -134,6 +134,8 @@
135135 \| { COMMONTOKENS; debuglex ("PIPE "); return PIPE; }
136136 \{\{\{\{\{ { COMMONTOKENS; debuglex ("OPENPENTUPLECURLY "); return OPENPENTUPLECURLY; }
137137 \}\}\}\}\} { COMMONTOKENS; debuglex ("CLOSEPENTUPLECURLY "); return CLOSEPENTUPLECURLY; }
 138+\{\{\{\{ { COMMONTOKENS; debuglex ("OPENTEMPLATE "); yyless (2); return OPENTEMPLATE; }
 139+\}\}\}\} { COMMONTOKENS; debuglex ("CLOSETEMPLATE "); yyless (2); return CLOSETEMPLATE; }
138140 \{\{\{ { COMMONTOKENS; debuglex ("OPENTEMPLATEVAR "); return OPENTEMPLATEVAR; }
139141 \}\}\} { COMMONTOKENS; debuglex ("CLOSETEMPLATEVAR "); return CLOSETEMPLATEVAR; }
140142 \{\{ { COMMONTOKENS; debuglex ("OPENTEMPLATE "); return OPENTEMPLATE; }
@@ -145,6 +147,7 @@
146148 '''. { COMMONTOKENS; APOSTROPHE_CATASTROPHE (3, "APO3 ", APO3); }
147149 ''. { COMMONTOKENS; APOSTROPHE_CATASTROPHE (2, "APO2 ", APO2); }
148150 \n { BEGIN (INITIAL); debuglex ("NEWLINE\n"); return NEWLINE; }
 151+^" "*\n { BEGIN (INITIAL); debuglex ("NEWLINE\n"); return NEWLINE; }
149152 \r { /* ignore this one */ debuglex ("<13> "); }
150153
151154 ^" " { BEGIN(cannotbelistorheadingorpre); debuglex ("PRELINE "); return PRELINE; }

Status & tagging log