Index: trunk/extensions/ParserWiki/ParserWiki.i18n.php |
— | — | @@ -1,206 +1,206 @@ |
2 | | -<?php
|
3 | | -/**
|
4 | | - * Internationalisation file for extension ParserWiki.
|
5 | | - *
|
6 | | - * @file
|
7 | | - * @ingroup Extensions
|
8 | | - */
|
9 | | -
|
10 | | -$messages = array();
|
11 | | -
|
12 | | -$messages['en'] = array(
|
13 | | - 'parserwiki-desc' => ' Allows to define a grammar in a wiki then use that grammar to input information to the same wiki',
|
14 | | -);
|
15 | | -
|
16 | | -/** Message documentation (Message documentation)
|
17 | | - * @author Umherirrender
|
18 | | - */
|
19 | | -$messages['qqq'] = array(
|
20 | | - 'parserwiki-desc' => '{{desc}}',
|
21 | | -);
|
22 | | -
|
23 | | -/** Gheg Albanian (Gegë)
|
24 | | - * @author Mdupont
|
25 | | - */
|
26 | | -$messages['aln'] = array(
|
27 | | - 'parserwiki-desc' => 'Lejon për të përcaktuar një gramatikë në një wiki atëherë përdorim që e ciklit të lartë të informatave të dhëna në të njëjtën wiki',
|
28 | | -);
|
29 | | -
|
30 | | -/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
|
31 | | - * @author Jim-by
|
32 | | - */
|
33 | | -$messages['be-tarask'] = array(
|
34 | | - 'parserwiki-desc' => 'Дазваляе вызначыць граматыку ў вікі, потым выкарыстоўваць гэту граматыку для ўводу інфармацыі ў такую самую вікі',
|
35 | | -);
|
36 | | -
|
37 | | -/** Breton (Brezhoneg)
|
38 | | - * @author Fulup
|
39 | | - */
|
40 | | -$messages['br'] = array(
|
41 | | - 'parserwiki-desc' => "Talvezout a ra da dermeniñ ur yezhadur en ur wiki ha d'e evit enporzhiañ titouroù er wiki-se",
|
42 | | -);
|
43 | | -
|
44 | | -/** German (Deutsch)
|
45 | | - * @author Kghbln
|
46 | | - */
|
47 | | -$messages['de'] = array(
|
48 | | - 'parserwiki-desc' => 'Ermöglicht es in einem Wiki Grammatiken zu erstellen und diese für die Eingabe von Informationen zu verwenden',
|
49 | | -);
|
50 | | -
|
51 | | -/** Lower Sorbian (Dolnoserbski)
|
52 | | - * @author Michawiki
|
53 | | - */
|
54 | | -$messages['dsb'] = array(
|
55 | | - 'parserwiki-desc' => 'Zmóžnja gramatiku we wikiju definěrowaś, aby se pótom ta gramatika wužywała, aby se zapódali informacije do togo samego wikija',
|
56 | | -);
|
57 | | -
|
58 | | -/** Spanish (Español)
|
59 | | - * @author Locos epraix
|
60 | | - */
|
61 | | -$messages['es'] = array(
|
62 | | - 'parserwiki-desc' => 'Permite definir una gramática en un wiki luego usar esa gramática para ingresar información a dicha wiki',
|
63 | | -);
|
64 | | -
|
65 | | -/** Finnish (Suomi)
|
66 | | - * @author Crt
|
67 | | - * @author Str4nd
|
68 | | - */
|
69 | | -$messages['fi'] = array(
|
70 | | - 'parserwiki-desc' => 'Mahdollistaa kieliopin määrittelyn wikissä ja käyttää määritettyä kielioppia saman wikin tiedonsyöttöön.',
|
71 | | -);
|
72 | | -
|
73 | | -/** French (Français)
|
74 | | - * @author Peter17
|
75 | | - */
|
76 | | -$messages['fr'] = array(
|
77 | | - 'parserwiki-desc' => "Permet de définir une grammaire dans un wiki et d'utiliser cette grammaire pour importer de l'information sur ce wiki",
|
78 | | -);
|
79 | | -
|
80 | | -/** Galician (Galego)
|
81 | | - * @author Gallaecio
|
82 | | - * @author Toliño
|
83 | | - */
|
84 | | -$messages['gl'] = array(
|
85 | | - 'parserwiki-desc' => 'Permite establecer unha gramática nun wiki e, a continuación, utilizar esa gramática para introducir información nese mesmo wiki',
|
86 | | -);
|
87 | | -
|
88 | | -/** Swiss German (Alemannisch)
|
89 | | - * @author Als-Holder
|
90 | | - */
|
91 | | -$messages['gsw'] = array(
|
92 | | - 'parserwiki-desc' => 'Erlaubt e Grammatik in eme Wiki z definiere un die Grammatik im glyyche Wiki z bruche go Informatione yyfiege',
|
93 | | -);
|
94 | | -
|
95 | | -/** Upper Sorbian (Hornjoserbsce)
|
96 | | - * @author Michawiki
|
97 | | - */
|
98 | | -$messages['hsb'] = array(
|
99 | | - 'parserwiki-desc' => 'Zmóžnja gramatiku we wikiju definować, zo by so ta gramatika wužiwało, zo bychu so informacije do samsneho wikija a zapodali',
|
100 | | -);
|
101 | | -
|
102 | | -/** Hungarian (Magyar)
|
103 | | - * @author Glanthor Reviol
|
104 | | - */
|
105 | | -$messages['hu'] = array(
|
106 | | - 'parserwiki-desc' => 'Lehetővé teszi nyelvtan definiálását egy wikin, majd ezen nyelvtan használatával információk bevitelét ugyanazon a wikin',
|
107 | | -);
|
108 | | -
|
109 | | -/** Interlingua (Interlingua)
|
110 | | - * @author McDutchie
|
111 | | - */
|
112 | | -$messages['ia'] = array(
|
113 | | - 'parserwiki-desc' => 'Permitte definir un grammatica in un wiki, postea usar iste grammatica pro inserer information in le mesme wiki',
|
114 | | -);
|
115 | | -
|
116 | | -/** Indonesian (Bahasa Indonesia)
|
117 | | - * @author Bennylin
|
118 | | - */
|
119 | | -$messages['id'] = array(
|
120 | | - 'parserwiki-desc' => 'Memungkinkan untuk mendefinisikan tata bahasa di wiki lalu menggunakan informasi tersebut untuk memasukkan informasi ke wiki yang sama',
|
121 | | -);
|
122 | | -
|
123 | | -/** Italian (Italiano)
|
124 | | - * @author Civvì
|
125 | | - */
|
126 | | -$messages['it'] = array(
|
127 | | - 'parserwiki-desc' => 'Consente di definire una grammatica in un wiki e quindi si utilizzare quella grammatica per inserire informazioni nel wiki stesso',
|
128 | | -);
|
129 | | -
|
130 | | -/** Japanese (日本語)
|
131 | | - * @author Fryed-peach
|
132 | | - */
|
133 | | -$messages['ja'] = array(
|
134 | | - 'parserwiki-desc' => 'ウィキ内で文法を定義し、定義した文法をそのウィキへ情報を入力するのに使えるようにする',
|
135 | | -);
|
136 | | -
|
137 | | -/** Luxembourgish (Lëtzebuergesch)
|
138 | | - * @author Robby
|
139 | | - */
|
140 | | -$messages['lb'] = array(
|
141 | | - 'parserwiki-desc' => 'Erlaabt et eng Grammaire an enger Wiki ze definéieren an déi Grammaire benotze fir Informatiounen an déi Wiki derbäizesetzen',
|
142 | | -);
|
143 | | -
|
144 | | -/** Macedonian (Македонски)
|
145 | | - * @author Bjankuloski06
|
146 | | - */
|
147 | | -$messages['mk'] = array(
|
148 | | - 'parserwiki-desc' => 'Овозможува утврдување на граматика во едно вики и употреба на таа граматика за внос на информации во тоа вики',
|
149 | | -);
|
150 | | -
|
151 | | -/** Dutch (Nederlands)
|
152 | | - * @author Siebrand
|
153 | | - */
|
154 | | -$messages['nl'] = array(
|
155 | | - 'parserwiki-desc' => 'Maakt het mogelijk grammatica te definiëren en deze grammatica dan te gebruiken om informatie in te voeren',
|
156 | | -);
|
157 | | -
|
158 | | -/** Norwegian (bokmål) (Norsk (bokmål))
|
159 | | - * @author Nghtwlkr
|
160 | | - */
|
161 | | -$messages['no'] = array(
|
162 | | - 'parserwiki-desc' => 'Gjør det mulig å definere en grammatikk i en wiki og deretter bruke denne grammatikken til å legge inn informasjon til den samme wikien',
|
163 | | -);
|
164 | | -
|
165 | | -/** Occitan (Occitan)
|
166 | | - * @author Cedric31
|
167 | | - */
|
168 | | -$messages['oc'] = array(
|
169 | | - 'parserwiki-desc' => "Permet de definir una gramatica dins un wiki e d'utilizar aquela gramatica per importar d'informacion sus aqueste wiki",
|
170 | | -);
|
171 | | -
|
172 | | -/** Polish (Polski)
|
173 | | - * @author Marcin Łukasz Kiejzik
|
174 | | - */
|
175 | | -$messages['pl'] = array(
|
176 | | - 'parserwiki-desc' => 'Pozwala na zdefiniowanie gramatyki w wiki, następnie użyj tej formy gramatycznej do wprowadzania gramatyki na tą samą wiki',
|
177 | | -);
|
178 | | -
|
179 | | -/** Piedmontese (Piemontèis)
|
180 | | - * @author Borichèt
|
181 | | - * @author Dragonòt
|
182 | | - */
|
183 | | -$messages['pms'] = array(
|
184 | | - 'parserwiki-desc' => "A përmët ëd definì na gramàtica ant na wiki peui ëd dovré cola gramàtica për anserì dl'anformassion an sla wiki midema",
|
185 | | -);
|
186 | | -
|
187 | | -/** Portuguese (Português)
|
188 | | - * @author Hamilton Abreu
|
189 | | - */
|
190 | | -$messages['pt'] = array(
|
191 | | - 'parserwiki-desc' => 'Permite definir uma gramática numa wiki e depois usá-la para inserir informação nessa mesma wiki',
|
192 | | -);
|
193 | | -
|
194 | | -/** Russian (Русский)
|
195 | | - * @author Александр Сигачёв
|
196 | | - */
|
197 | | -$messages['ru'] = array(
|
198 | | - 'parserwiki-desc' => 'Позволяет определить грамматику в вики, и затем использовать эту грамматику для ввода информации в эту же вики',
|
199 | | -);
|
200 | | -
|
201 | | -/** Tagalog (Tagalog)
|
202 | | - * @author AnakngAraw
|
203 | | - */
|
204 | | -$messages['tl'] = array(
|
205 | | - 'parserwiki-desc' => 'Nagpapahintulot na bigyang kahulugang ang isang balarila sa loob ng isang wiki at pagkaraan ay gamitin ang balarilang iyon upang magpasok ng kabatiran sa wiking iyon din',
|
206 | | -);
|
207 | | -
|
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for extension ParserWiki. |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +$messages = array(); |
| 11 | + |
| 12 | +$messages['en'] = array( |
| 13 | + 'parserwiki-desc' => ' Allows to define a grammar in a wiki then use that grammar to input information to the same wiki', |
| 14 | +); |
| 15 | + |
| 16 | +/** Message documentation (Message documentation) |
| 17 | + * @author Umherirrender |
| 18 | + */ |
| 19 | +$messages['qqq'] = array( |
| 20 | + 'parserwiki-desc' => '{{desc}}', |
| 21 | +); |
| 22 | + |
| 23 | +/** Gheg Albanian (Gegë) |
| 24 | + * @author Mdupont |
| 25 | + */ |
| 26 | +$messages['aln'] = array( |
| 27 | + 'parserwiki-desc' => 'Lejon për të përcaktuar një gramatikë në një wiki atëherë përdorim që e ciklit të lartë të informatave të dhëna në të njëjtën wiki', |
| 28 | +); |
| 29 | + |
| 30 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 31 | + * @author Jim-by |
| 32 | + */ |
| 33 | +$messages['be-tarask'] = array( |
| 34 | + 'parserwiki-desc' => 'Дазваляе вызначыць граматыку ў вікі, потым выкарыстоўваць гэту граматыку для ўводу інфармацыі ў такую самую вікі', |
| 35 | +); |
| 36 | + |
| 37 | +/** Breton (Brezhoneg) |
| 38 | + * @author Fulup |
| 39 | + */ |
| 40 | +$messages['br'] = array( |
| 41 | + 'parserwiki-desc' => "Talvezout a ra da dermeniñ ur yezhadur en ur wiki ha d'e evit enporzhiañ titouroù er wiki-se", |
| 42 | +); |
| 43 | + |
| 44 | +/** German (Deutsch) |
| 45 | + * @author Kghbln |
| 46 | + */ |
| 47 | +$messages['de'] = array( |
| 48 | + 'parserwiki-desc' => 'Ermöglicht es in einem Wiki Grammatiken zu erstellen und diese für die Eingabe von Informationen zu verwenden', |
| 49 | +); |
| 50 | + |
| 51 | +/** Lower Sorbian (Dolnoserbski) |
| 52 | + * @author Michawiki |
| 53 | + */ |
| 54 | +$messages['dsb'] = array( |
| 55 | + 'parserwiki-desc' => 'Zmóžnja gramatiku we wikiju definěrowaś, aby se pótom ta gramatika wužywała, aby se zapódali informacije do togo samego wikija', |
| 56 | +); |
| 57 | + |
| 58 | +/** Spanish (Español) |
| 59 | + * @author Locos epraix |
| 60 | + */ |
| 61 | +$messages['es'] = array( |
| 62 | + 'parserwiki-desc' => 'Permite definir una gramática en un wiki luego usar esa gramática para ingresar información a dicha wiki', |
| 63 | +); |
| 64 | + |
| 65 | +/** Finnish (Suomi) |
| 66 | + * @author Crt |
| 67 | + * @author Str4nd |
| 68 | + */ |
| 69 | +$messages['fi'] = array( |
| 70 | + 'parserwiki-desc' => 'Mahdollistaa kieliopin määrittelyn wikissä ja käyttää määritettyä kielioppia saman wikin tiedonsyöttöön.', |
| 71 | +); |
| 72 | + |
| 73 | +/** French (Français) |
| 74 | + * @author Peter17 |
| 75 | + */ |
| 76 | +$messages['fr'] = array( |
| 77 | + 'parserwiki-desc' => "Permet de définir une grammaire dans un wiki et d'utiliser cette grammaire pour importer de l'information sur ce wiki", |
| 78 | +); |
| 79 | + |
| 80 | +/** Galician (Galego) |
| 81 | + * @author Gallaecio |
| 82 | + * @author Toliño |
| 83 | + */ |
| 84 | +$messages['gl'] = array( |
| 85 | + 'parserwiki-desc' => 'Permite establecer unha gramática nun wiki e, a continuación, utilizar esa gramática para introducir información nese mesmo wiki', |
| 86 | +); |
| 87 | + |
| 88 | +/** Swiss German (Alemannisch) |
| 89 | + * @author Als-Holder |
| 90 | + */ |
| 91 | +$messages['gsw'] = array( |
| 92 | + 'parserwiki-desc' => 'Erlaubt e Grammatik in eme Wiki z definiere un die Grammatik im glyyche Wiki z bruche go Informatione yyfiege', |
| 93 | +); |
| 94 | + |
| 95 | +/** Upper Sorbian (Hornjoserbsce) |
| 96 | + * @author Michawiki |
| 97 | + */ |
| 98 | +$messages['hsb'] = array( |
| 99 | + 'parserwiki-desc' => 'Zmóžnja gramatiku we wikiju definować, zo by so ta gramatika wužiwało, zo bychu so informacije do samsneho wikija a zapodali', |
| 100 | +); |
| 101 | + |
| 102 | +/** Hungarian (Magyar) |
| 103 | + * @author Glanthor Reviol |
| 104 | + */ |
| 105 | +$messages['hu'] = array( |
| 106 | + 'parserwiki-desc' => 'Lehetővé teszi nyelvtan definiálását egy wikin, majd ezen nyelvtan használatával információk bevitelét ugyanazon a wikin', |
| 107 | +); |
| 108 | + |
| 109 | +/** Interlingua (Interlingua) |
| 110 | + * @author McDutchie |
| 111 | + */ |
| 112 | +$messages['ia'] = array( |
| 113 | + 'parserwiki-desc' => 'Permitte definir un grammatica in un wiki, postea usar iste grammatica pro inserer information in le mesme wiki', |
| 114 | +); |
| 115 | + |
| 116 | +/** Indonesian (Bahasa Indonesia) |
| 117 | + * @author Bennylin |
| 118 | + */ |
| 119 | +$messages['id'] = array( |
| 120 | + 'parserwiki-desc' => 'Memungkinkan untuk mendefinisikan tata bahasa di wiki lalu menggunakan informasi tersebut untuk memasukkan informasi ke wiki yang sama', |
| 121 | +); |
| 122 | + |
| 123 | +/** Italian (Italiano) |
| 124 | + * @author Civvì |
| 125 | + */ |
| 126 | +$messages['it'] = array( |
| 127 | + 'parserwiki-desc' => 'Consente di definire una grammatica in un wiki e quindi si utilizzare quella grammatica per inserire informazioni nel wiki stesso', |
| 128 | +); |
| 129 | + |
| 130 | +/** Japanese (日本語) |
| 131 | + * @author Fryed-peach |
| 132 | + */ |
| 133 | +$messages['ja'] = array( |
| 134 | + 'parserwiki-desc' => 'ウィキ内で文法を定義し、定義した文法をそのウィキへ情報を入力するのに使えるようにする', |
| 135 | +); |
| 136 | + |
| 137 | +/** Luxembourgish (Lëtzebuergesch) |
| 138 | + * @author Robby |
| 139 | + */ |
| 140 | +$messages['lb'] = array( |
| 141 | + 'parserwiki-desc' => 'Erlaabt et eng Grammaire an enger Wiki ze definéieren an déi Grammaire benotze fir Informatiounen an déi Wiki derbäizesetzen', |
| 142 | +); |
| 143 | + |
| 144 | +/** Macedonian (Македонски) |
| 145 | + * @author Bjankuloski06 |
| 146 | + */ |
| 147 | +$messages['mk'] = array( |
| 148 | + 'parserwiki-desc' => 'Овозможува утврдување на граматика во едно вики и употреба на таа граматика за внос на информации во тоа вики', |
| 149 | +); |
| 150 | + |
| 151 | +/** Dutch (Nederlands) |
| 152 | + * @author Siebrand |
| 153 | + */ |
| 154 | +$messages['nl'] = array( |
| 155 | + 'parserwiki-desc' => 'Maakt het mogelijk grammatica te definiëren en deze grammatica dan te gebruiken om informatie in te voeren', |
| 156 | +); |
| 157 | + |
| 158 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 159 | + * @author Nghtwlkr |
| 160 | + */ |
| 161 | +$messages['no'] = array( |
| 162 | + 'parserwiki-desc' => 'Gjør det mulig å definere en grammatikk i en wiki og deretter bruke denne grammatikken til å legge inn informasjon til den samme wikien', |
| 163 | +); |
| 164 | + |
| 165 | +/** Occitan (Occitan) |
| 166 | + * @author Cedric31 |
| 167 | + */ |
| 168 | +$messages['oc'] = array( |
| 169 | + 'parserwiki-desc' => "Permet de definir una gramatica dins un wiki e d'utilizar aquela gramatica per importar d'informacion sus aqueste wiki", |
| 170 | +); |
| 171 | + |
| 172 | +/** Polish (Polski) |
| 173 | + * @author Marcin Łukasz Kiejzik |
| 174 | + */ |
| 175 | +$messages['pl'] = array( |
| 176 | + 'parserwiki-desc' => 'Pozwala na zdefiniowanie gramatyki w wiki, następnie użyj tej formy gramatycznej do wprowadzania gramatyki na tą samą wiki', |
| 177 | +); |
| 178 | + |
| 179 | +/** Piedmontese (Piemontèis) |
| 180 | + * @author Borichèt |
| 181 | + * @author Dragonòt |
| 182 | + */ |
| 183 | +$messages['pms'] = array( |
| 184 | + 'parserwiki-desc' => "A përmët ëd definì na gramàtica ant na wiki peui ëd dovré cola gramàtica për anserì dl'anformassion an sla wiki midema", |
| 185 | +); |
| 186 | + |
| 187 | +/** Portuguese (Português) |
| 188 | + * @author Hamilton Abreu |
| 189 | + */ |
| 190 | +$messages['pt'] = array( |
| 191 | + 'parserwiki-desc' => 'Permite definir uma gramática numa wiki e depois usá-la para inserir informação nessa mesma wiki', |
| 192 | +); |
| 193 | + |
| 194 | +/** Russian (Русский) |
| 195 | + * @author Александр Сигачёв |
| 196 | + */ |
| 197 | +$messages['ru'] = array( |
| 198 | + 'parserwiki-desc' => 'Позволяет определить грамматику в вики, и затем использовать эту грамматику для ввода информации в эту же вики', |
| 199 | +); |
| 200 | + |
| 201 | +/** Tagalog (Tagalog) |
| 202 | + * @author AnakngAraw |
| 203 | + */ |
| 204 | +$messages['tl'] = array( |
| 205 | + 'parserwiki-desc' => 'Nagpapahintulot na bigyang kahulugang ang isang balarila sa loob ng isang wiki at pagkaraan ay gamitin ang balarilang iyon upang magpasok ng kabatiran sa wiking iyon din', |
| 206 | +); |
| 207 | + |
Property changes on: trunk/extensions/ParserWiki/ParserWiki.i18n.php |
___________________________________________________________________ |
Name: svn:eol-style |
208 | 208 | + native |
Index: trunk/extensions/ParserWiki/parserTests.txt |
— | — | @@ -1,37 +1,37 @@ |
2 | | -# Tests for the ParseEngine using maintenance/parserTests.php
|
3 | | -# Please make sure that the input parser XML is an exact duplicate of the test result
|
4 | | -
|
5 | | -!!article
|
6 | | -Grammar:WikiGrammar1_0
|
7 | | -!!text
|
8 | | -<grammar><tag tag=";; grammar for WikiGrammar v1.0 ;; only one parseObject at base level for the start rule / root node <"/><parseObject><assignment tag="grammar"><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject><tag tag=" ->"/><parseObject><reference tag="ruleList"/></parseObject><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/></assignment></parseObject><tag tag=">"/><tag tag=" ;; ignore whitespace, comments lines starting in # and tags "/><rule tag="tag"><tag tag=" ="/><tag tag=" <"/><parseObject><assignment tag="tag"><tag tag=" /"/><pattern tag="(?:\s+|;;[^\n]*)*~r"/><tag tag="/"/></assignment></parseObject><tag tag=">"/></rule><tag tag=" "/><rule tag="pattern"><tag tag=" ="/><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\/"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="pattern"><tag tag=" /"/><pattern tag="(?:[^\\\/]|\\.)*"/><tag tag="/"/></assignment></parseObject><tag tag=">"/><tag tag=" <"/><parseObject><assignment tag="tag"><tag tag=" /"/><pattern tag="\/"/><tag tag="/"/></assignment></parseObject><tag tag=">"/></sequence></parseObject><tag tag="]"/></rule><tag tag=" ;; This works a lot like polymorphism -> new feature "/><rule tag="parseObject"><tag tag=" ="/><tag tag=" ("/><parseObject><choice><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="->"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="reference"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="="/><tag tag="/"/></reference></parseObject><tag tag=" ->"/><parseObject><reference tag="pattern"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\("/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="choice"><tag tag=" /"/><pattern tag="\??"/><tag tag="/"/><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\)"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\["/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="sequence"><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\]"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="$"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="text"><tag tag=" ("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject></choice></parseObject><tag tag=")"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="$"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="<"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="assignment"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ["/><parseObject><sequence><tag tag=" 		("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="pattern"/></parseObject></choice></parseObject><tag tag=")"/><tag tag=" 		("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject></choice></parseObject><tag tag=")"/></sequence></parseObject><tag tag=" 	]"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag=">"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=" )"/></rule><tag tag=" ;; Lists work a lot like regEx +'s -> syntactic sugar "/><rule tag="objectList"><tag tag=" ="/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></rule><tag tag=" "/><rule tag="ruleList"><tag tag=" ="/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="rule"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="="/><tag tag="/"/></reference></parseObject><tag tag=" ->"/><parseObject><reference tag="parseObject"/></parseObject></sequence></parseObject><tag tag="]"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="ruleList"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></rule><tag/></grammar>
|
9 | | -!!endarticle
|
10 | | -
|
11 | | -!! test
|
12 | | -Generic Test
|
13 | | -!! input
|
14 | | -;; grammar for WikiGrammar v1.0
|
15 | | -;; only one parseObject at base level for the start rule / root node
|
16 | | -<grammar [->parseObject ->ruleList ->tag=//]>
|
17 | | -;; ignore whitespace, comments lines starting in # and tags
|
18 | | -tag = <tag /(?:\s+|;;[^\n]*)*~r/>
|
19 | | -pattern = [->tag=/\// <pattern /(?:[^\\\/]|\\.)*/> <tag /\//>]
|
20 | | -;; This works a lot like polymorphism -> new feature
|
21 | | -parseObject = (
|
22 | | - [->tag=/->/ <parseObject <reference /\w+/ (?[->tag=/=/ ->pattern])>>]
|
23 | | - [->tag=/\(/ <parseObject <choice /\??/ ->objectList>> ->tag=/\)/]
|
24 | | - [->tag=/\[/ <parseObject <sequence ->objectList>> ->tag=/\]/]
|
25 | | - [->tag=/$/ <parseObject <text (?->parseObject)>> ->tag=/$/]
|
26 | | - [->tag=/</ <parseObject <assignment /\w+/ [
|
27 | | - (?->pattern)
|
28 | | - (?->parseObject)
|
29 | | - ]>> ->tag=/>/]
|
30 | | -)
|
31 | | -;; Lists work a lot like regEx +'s -> syntactic sugar
|
32 | | -objectList = (?[->parseObject ->objectList])
|
33 | | -ruleList = (?[->tag=// <rule /\w+/ [->tag=/=/ ->parseObject]> ->ruleList])
|
34 | | -!! result
|
35 | | -<grammar><tag tag=";; grammar for WikiGrammar v1.0 ;; only one parseObject at base level for the start rule / root node <"/><parseObject><assignment tag="grammar"><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject><tag tag=" ->"/><parseObject><reference tag="ruleList"/></parseObject><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/></assignment></parseObject><tag tag=">"/><tag tag=" ;; ignore whitespace, comments lines starting in # and tags "/><rule tag="tag"><tag tag=" ="/><tag tag=" <"/><parseObject><assignment tag="tag"><tag tag=" /"/><pattern tag="(?:\s+|;;[^\n]*)*~r"/><tag tag="/"/></assignment></parseObject><tag tag=">"/></rule><tag tag=" "/><rule tag="pattern"><tag tag=" ="/><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\/"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="pattern"><tag tag=" /"/><pattern tag="(?:[^\\\/]|\\.)*"/><tag tag="/"/></assignment></parseObject><tag tag=">"/><tag tag=" <"/><parseObject><assignment tag="tag"><tag tag=" /"/><pattern tag="\/"/><tag tag="/"/></assignment></parseObject><tag tag=">"/></sequence></parseObject><tag tag="]"/></rule><tag tag=" ;; This works a lot like polymorphism -> new feature "/><rule tag="parseObject"><tag tag=" ="/><tag tag=" ("/><parseObject><choice><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="->"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="reference"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="="/><tag tag="/"/></reference></parseObject><tag tag=" ->"/><parseObject><reference tag="pattern"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\("/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="choice"><tag tag=" /"/><pattern tag="\??"/><tag tag="/"/><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\)"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\["/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="sequence"><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\]"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="$"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="text"><tag tag=" ("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject></choice></parseObject><tag tag=")"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="$"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="<"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="assignment"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ["/><parseObject><sequence><tag tag=" 		("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="pattern"/></parseObject></choice></parseObject><tag tag=")"/><tag tag=" 		("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject></choice></parseObject><tag tag=")"/></sequence></parseObject><tag tag=" 	]"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag=">"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=" )"/></rule><tag tag=" ;; Lists work a lot like regEx +'s -> syntactic sugar "/><rule tag="objectList"><tag tag=" ="/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></rule><tag tag=" "/><rule tag="ruleList"><tag tag=" ="/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="rule"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="="/><tag tag="/"/></reference></parseObject><tag tag=" ->"/><parseObject><reference tag="parseObject"/></parseObject></sequence></parseObject><tag tag="]"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="ruleList"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></rule><tag/></grammar>
|
36 | | -
|
37 | | -!! end
|
38 | | -
|
| 2 | +# Tests for the ParseEngine using maintenance/parserTests.php |
| 3 | +# Please make sure that the input parser XML is an exact duplicate of the test result |
| 4 | + |
| 5 | +!!article |
| 6 | +Grammar:WikiGrammar1_0 |
| 7 | +!!text |
| 8 | +<grammar><tag tag=";; grammar for WikiGrammar v1.0 ;; only one parseObject at base level for the start rule / root node <"/><parseObject><assignment tag="grammar"><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject><tag tag=" ->"/><parseObject><reference tag="ruleList"/></parseObject><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/></assignment></parseObject><tag tag=">"/><tag tag=" ;; ignore whitespace, comments lines starting in # and tags "/><rule tag="tag"><tag tag=" ="/><tag tag=" <"/><parseObject><assignment tag="tag"><tag tag=" /"/><pattern tag="(?:\s+|;;[^\n]*)*~r"/><tag tag="/"/></assignment></parseObject><tag tag=">"/></rule><tag tag=" "/><rule tag="pattern"><tag tag=" ="/><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\/"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="pattern"><tag tag=" /"/><pattern tag="(?:[^\\\/]|\\.)*"/><tag tag="/"/></assignment></parseObject><tag tag=">"/><tag tag=" <"/><parseObject><assignment tag="tag"><tag tag=" /"/><pattern tag="\/"/><tag tag="/"/></assignment></parseObject><tag tag=">"/></sequence></parseObject><tag tag="]"/></rule><tag tag=" ;; This works a lot like polymorphism -> new feature "/><rule tag="parseObject"><tag tag=" ="/><tag tag=" ("/><parseObject><choice><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="->"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="reference"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="="/><tag tag="/"/></reference></parseObject><tag tag=" ->"/><parseObject><reference tag="pattern"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\("/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="choice"><tag tag=" /"/><pattern tag="\??"/><tag tag="/"/><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\)"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\["/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="sequence"><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\]"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="$"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="text"><tag tag=" ("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject></choice></parseObject><tag tag=")"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="$"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="<"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="assignment"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ["/><parseObject><sequence><tag tag=" 		("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="pattern"/></parseObject></choice></parseObject><tag tag=")"/><tag tag=" 		("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject></choice></parseObject><tag tag=")"/></sequence></parseObject><tag tag=" 	]"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag=">"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=" )"/></rule><tag tag=" ;; Lists work a lot like regEx +'s -> syntactic sugar "/><rule tag="objectList"><tag tag=" ="/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></rule><tag tag=" "/><rule tag="ruleList"><tag tag=" ="/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="rule"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="="/><tag tag="/"/></reference></parseObject><tag tag=" ->"/><parseObject><reference tag="parseObject"/></parseObject></sequence></parseObject><tag tag="]"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="ruleList"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></rule><tag/></grammar> |
| 9 | +!!endarticle |
| 10 | + |
| 11 | +!! test |
| 12 | +Generic Test |
| 13 | +!! input |
| 14 | +;; grammar for WikiGrammar v1.0 |
| 15 | +;; only one parseObject at base level for the start rule / root node |
| 16 | +<grammar [->parseObject ->ruleList ->tag=//]> |
| 17 | +;; ignore whitespace, comments lines starting in # and tags |
| 18 | +tag = <tag /(?:\s+|;;[^\n]*)*~r/> |
| 19 | +pattern = [->tag=/\// <pattern /(?:[^\\\/]|\\.)*/> <tag /\//>] |
| 20 | +;; This works a lot like polymorphism -> new feature |
| 21 | +parseObject = ( |
| 22 | + [->tag=/->/ <parseObject <reference /\w+/ (?[->tag=/=/ ->pattern])>>] |
| 23 | + [->tag=/\(/ <parseObject <choice /\??/ ->objectList>> ->tag=/\)/] |
| 24 | + [->tag=/\[/ <parseObject <sequence ->objectList>> ->tag=/\]/] |
| 25 | + [->tag=/$/ <parseObject <text (?->parseObject)>> ->tag=/$/] |
| 26 | + [->tag=/</ <parseObject <assignment /\w+/ [ |
| 27 | + (?->pattern) |
| 28 | + (?->parseObject) |
| 29 | + ]>> ->tag=/>/] |
| 30 | +) |
| 31 | +;; Lists work a lot like regEx +'s -> syntactic sugar |
| 32 | +objectList = (?[->parseObject ->objectList]) |
| 33 | +ruleList = (?[->tag=// <rule /\w+/ [->tag=/=/ ->parseObject]> ->ruleList]) |
| 34 | +!! result |
| 35 | +<grammar><tag tag=";; grammar for WikiGrammar v1.0 ;; only one parseObject at base level for the start rule / root node <"/><parseObject><assignment tag="grammar"><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject><tag tag=" ->"/><parseObject><reference tag="ruleList"/></parseObject><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/></assignment></parseObject><tag tag=">"/><tag tag=" ;; ignore whitespace, comments lines starting in # and tags "/><rule tag="tag"><tag tag=" ="/><tag tag=" <"/><parseObject><assignment tag="tag"><tag tag=" /"/><pattern tag="(?:\s+|;;[^\n]*)*~r"/><tag tag="/"/></assignment></parseObject><tag tag=">"/></rule><tag tag=" "/><rule tag="pattern"><tag tag=" ="/><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\/"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="pattern"><tag tag=" /"/><pattern tag="(?:[^\\\/]|\\.)*"/><tag tag="/"/></assignment></parseObject><tag tag=">"/><tag tag=" <"/><parseObject><assignment tag="tag"><tag tag=" /"/><pattern tag="\/"/><tag tag="/"/></assignment></parseObject><tag tag=">"/></sequence></parseObject><tag tag="]"/></rule><tag tag=" ;; This works a lot like polymorphism -> new feature "/><rule tag="parseObject"><tag tag=" ="/><tag tag=" ("/><parseObject><choice><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="->"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="reference"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="="/><tag tag="/"/></reference></parseObject><tag tag=" ->"/><parseObject><reference tag="pattern"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\("/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="choice"><tag tag=" /"/><pattern tag="\??"/><tag tag="/"/><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\)"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\["/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="sequence"><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="\]"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="$"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="text"><tag tag=" ("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject></choice></parseObject><tag tag=")"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="$"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/><tag tag=" 	["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="<"/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="parseObject"><tag tag=" <"/><parseObject><assignment tag="assignment"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ["/><parseObject><sequence><tag tag=" 		("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="pattern"/></parseObject></choice></parseObject><tag tag=")"/><tag tag=" 		("/><parseObject><choice tag="?"><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject></choice></parseObject><tag tag=")"/></sequence></parseObject><tag tag=" 	]"/></assignment></parseObject><tag tag=">"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag=">"/><tag tag="/"/></reference></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=" )"/></rule><tag tag=" ;; Lists work a lot like regEx +'s -> syntactic sugar "/><rule tag="objectList"><tag tag=" ="/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="parseObject"/></parseObject><tag tag=" ->"/><parseObject><reference tag="objectList"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></rule><tag tag=" "/><rule tag="ruleList"><tag tag=" ="/><tag tag=" ("/><parseObject><choice tag="?"><tag tag="["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern/><tag tag="/"/></reference></parseObject><tag tag=" <"/><parseObject><assignment tag="rule"><tag tag=" /"/><pattern tag="\w+"/><tag tag="/"/><tag tag=" ["/><parseObject><sequence><tag tag="->"/><parseObject><reference tag="tag"><tag tag="="/><tag tag="/"/><pattern tag="="/><tag tag="/"/></reference></parseObject><tag tag=" ->"/><parseObject><reference tag="parseObject"/></parseObject></sequence></parseObject><tag tag="]"/></assignment></parseObject><tag tag=">"/><tag tag=" ->"/><parseObject><reference tag="ruleList"/></parseObject></sequence></parseObject><tag tag="]"/></choice></parseObject><tag tag=")"/></rule><tag/></grammar> |
| 36 | + |
| 37 | +!! end |
| 38 | + |
Property changes on: trunk/extensions/ParserWiki/parserTests.txt |
___________________________________________________________________ |
Name: svn:eol-style |
39 | 39 | + native |