001    // $ANTLR 3.0.1 Creole10.g 2013-07-25 09:25:45
002    
003    /**
004     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
005     *
006     * This library is free software; you can redistribute it and/or modify it under
007     * the terms of the GNU Lesser General Public License as published by the Free
008     * Software Foundation; either version 2.1 of the License, or (at your option)
009     * any later version.
010     *
011     * This library is distributed in the hope that it will be useful, but WITHOUT
012     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
013     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
014     * details.
015     */
016    
017    package com.liferay.portal.parsers.creole.parser;
018    
019    import com.liferay.portal.kernel.util.StringBundler;
020    import com.liferay.portal.parsers.creole.ast.ASTNode;
021    import com.liferay.portal.parsers.creole.ast.BaseListNode;
022    import com.liferay.portal.parsers.creole.ast.BaseParentableNode;
023    import com.liferay.portal.parsers.creole.ast.BoldTextNode;
024    import com.liferay.portal.parsers.creole.ast.CollectionNode;
025    import com.liferay.portal.parsers.creole.ast.extension.TableOfContentsNode;
026    import com.liferay.portal.parsers.creole.ast.ForcedEndOfLineNode;
027    import com.liferay.portal.parsers.creole.ast.FormattedTextNode;
028    import com.liferay.portal.parsers.creole.ast.HeadingNode;
029    import com.liferay.portal.parsers.creole.ast.HorizontalNode;
030    import com.liferay.portal.parsers.creole.ast.ImageNode;
031    import com.liferay.portal.parsers.creole.ast.ItalicTextNode;
032    import com.liferay.portal.parsers.creole.ast.ItemNode;
033    import com.liferay.portal.parsers.creole.ast.LineNode;
034    import com.liferay.portal.parsers.creole.ast.ListNode;
035    import com.liferay.portal.parsers.creole.ast.link.interwiki.C2InterwikiLinkNode;
036    import com.liferay.portal.parsers.creole.ast.link.interwiki.DokuWikiInterwikiLinkNode;
037    import com.liferay.portal.parsers.creole.ast.link.interwiki.FlickrInterwikiLinkNode;
038    import com.liferay.portal.parsers.creole.ast.link.interwiki.GoogleInterwikiLinkNode;
039    import com.liferay.portal.parsers.creole.ast.link.interwiki.InterwikiLinkNode;
040    import com.liferay.portal.parsers.creole.ast.link.interwiki.JSPWikiInterwikiLinkNode;
041    import com.liferay.portal.parsers.creole.ast.link.interwiki.MeatballInterwikiLinkNode;
042    import com.liferay.portal.parsers.creole.ast.link.interwiki.MediaWikiInterwikiLinkNode;
043    import com.liferay.portal.parsers.creole.ast.link.interwiki.MoinMoinInterwikiLinkNode;
044    import com.liferay.portal.parsers.creole.ast.link.interwiki.OddmuseInterwikiLinkNode;
045    import com.liferay.portal.parsers.creole.ast.link.interwiki.OhanaInterwikiLinkNode;
046    import com.liferay.portal.parsers.creole.ast.link.interwiki.PmWikiInterwikiLinkNode;
047    import com.liferay.portal.parsers.creole.ast.link.interwiki.PukiWikiInterwikiLinkNode;
048    import com.liferay.portal.parsers.creole.ast.link.interwiki.PurpleWikiInterwikiLinkNode;
049    import com.liferay.portal.parsers.creole.ast.link.interwiki.RadeoxInterwikiLinkNode;
050    import com.liferay.portal.parsers.creole.ast.link.interwiki.SnipSnapInterwikiLinkNode;
051    import com.liferay.portal.parsers.creole.ast.link.interwiki.TWikiInterwikiLinkNode;
052    import com.liferay.portal.parsers.creole.ast.link.interwiki.TiddlyWikiInterwikiLinkNode;
053    import com.liferay.portal.parsers.creole.ast.link.interwiki.UsemodInterwikiLinkNode;
054    import com.liferay.portal.parsers.creole.ast.link.interwiki.WikipediaInterwikiLinkNode;
055    import com.liferay.portal.parsers.creole.ast.link.interwiki.XWikiInterwikiLinkNode;
056    import com.liferay.portal.parsers.creole.ast.link.LinkNode;
057    import com.liferay.portal.parsers.creole.ast.NoWikiSectionNode;
058    import com.liferay.portal.parsers.creole.ast.OrderedListItemNode;
059    import com.liferay.portal.parsers.creole.ast.OrderedListNode;
060    import com.liferay.portal.parsers.creole.ast.ParagraphNode;
061    import com.liferay.portal.parsers.creole.ast.ScapedNode;
062    import com.liferay.portal.parsers.creole.ast.table.TableCellNode;
063    import com.liferay.portal.parsers.creole.ast.table.TableDataNode;
064    import com.liferay.portal.parsers.creole.ast.table.TableHeaderNode;
065    import com.liferay.portal.parsers.creole.ast.table.TableNode;
066    import com.liferay.portal.parsers.creole.ast.UnorderedListItemNode;
067    import com.liferay.portal.parsers.creole.ast.UnorderedListNode;
068    import com.liferay.portal.parsers.creole.ast.UnformattedTextNode;
069    import com.liferay.portal.parsers.creole.ast.WikiPageNode;
070    
071    import java.util.Stack;
072    
073    /**
074    * This is a generated file from Creole10.g. DO NOT MODIFY THIS FILE MANUALLY!!
075    * If needed, modify the grammar and rerun the ant generation task
076    * (ant build-creole-parser)
077    */
078    
079    
080    import org.antlr.runtime.*;
081    import java.util.Stack;
082    import java.util.List;
083    import java.util.ArrayList;
084    import java.util.Map;
085    import java.util.HashMap;
086    @SuppressWarnings("all")
087    public class Creole10Parser extends Parser {
088        public static final String[] tokenNames = new String[] {
089            "<invalid>", "<EOR>", "<DOWN>", "<UP>", "FORCED_END_OF_LINE", "HEADING_SECTION", "HORIZONTAL_SECTION", "LIST_ITEM", "LIST_ITEM_PART", "NOWIKI_SECTION", "SCAPE_NODE", "TEXT_NODE", "UNORDERED_LIST", "UNFORMATTED_TEXT", "WIKI", "NEWLINE", "POUND", "STAR", "EQUAL", "PIPE", "ITAL", "LINK_OPEN", "IMAGE_OPEN", "NOWIKI_OPEN", "EXTENSION", "FORCED_LINEBREAK", "ESCAPE", "NOWIKI_BLOCK_CLOSE", "NOWIKI_CLOSE", "LINK_CLOSE", "IMAGE_CLOSE", "BLANKS", "DASH", "CR", "LF", "SPACE", "TABULATOR", "BRACE_CLOSE", "COLON_SLASH", "SLASH", "INSIGNIFICANT_CHAR", "':'", "'C'", "'2'", "'D'", "'o'", "'k'", "'u'", "'W'", "'i'", "'F'", "'l'", "'c'", "'r'", "'G'", "'g'", "'e'", "'J'", "'S'", "'P'", "'M'", "'a'", "'t'", "'b'", "'d'", "'n'", "'O'", "'m'", "'s'", "'h'", "'p'", "'R'", "'x'", "'T'", "'y'", "'U'", "'X'", "'<<TableOfContents>>'", "'<<TableOfContents title='", "'\\\"'", "'>>'"
090        };
091        public static final int BLANKS=31;
092        public static final int INSIGNIFICANT_CHAR=40;
093        public static final int FORCED_LINEBREAK=25;
094        public static final int UNORDERED_LIST=12;
095        public static final int STAR=17;
096        public static final int DASH=32;
097        public static final int POUND=16;
098        public static final int HEADING_SECTION=5;
099        public static final int NOWIKI_OPEN=23;
100        public static final int FORCED_END_OF_LINE=4;
101        public static final int HORIZONTAL_SECTION=6;
102        public static final int NOWIKI_BLOCK_CLOSE=27;
103        public static final int UNFORMATTED_TEXT=13;
104        public static final int NOWIKI_SECTION=9;
105        public static final int SPACE=35;
106        public static final int NOWIKI_CLOSE=28;
107        public static final int IMAGE_OPEN=22;
108        public static final int ITAL=20;
109        public static final int EOF=-1;
110        public static final int COLON_SLASH=38;
111        public static final int LIST_ITEM=7;
112        public static final int TEXT_NODE=11;
113        public static final int WIKI=14;
114        public static final int SLASH=39;
115        public static final int ESCAPE=26;
116        public static final int NEWLINE=15;
117        public static final int BRACE_CLOSE=37;
118        public static final int SCAPE_NODE=10;
119        public static final int IMAGE_CLOSE=30;
120        public static final int EQUAL=18;
121        public static final int TABULATOR=36;
122        public static final int LINK_CLOSE=29;
123        public static final int LIST_ITEM_PART=8;
124        public static final int PIPE=19;
125        public static final int LINK_OPEN=21;
126        public static final int CR=33;
127        public static final int EXTENSION=24;
128        public static final int LF=34;
129        protected static class CountLevel_scope {
130            int level;
131            String currentMarkup;
132            String groups;
133        }
134        protected Stack CountLevel_stack = new Stack();
135    
136    
137            public Creole10Parser(TokenStream input) {
138                super(input);
139                ruleMemo = new HashMap[128+1];
140             }
141            
142    
143        public String[] getTokenNames() { return tokenNames; }
144        public String getGrammarFileName() { return "Creole10.g"; }
145    
146    
147            public void displayRecognitionError(String[] tokenNames,RecognitionException e) {
148                    String header = getErrorHeader(e);
149                    String message = getErrorMessage(e, tokenNames);
150    
151                    _errors.add(header + " " + message);
152            }
153    
154            public List<String> getErrors() {
155                    return _errors;
156            }
157    
158            public WikiPageNode getWikiPageNode() {
159                    if (_wikipage == null)
160                            throw new IllegalStateException("No succesful parsing process");
161    
162                    return _wikipage;
163            }
164    
165            protected static final String GROUPING_SEPARATOR = "-";
166    
167            protected BaseParentableNode buildAndComposeListNode(BaseParentableNode baseParentableNode, ItemNode itemNode, boolean ordered) {
168                    BaseParentableNode listNode = null;
169                    
170                    if (ordered) {
171                            listNode = new OrderedListNode(baseParentableNode);
172                    } 
173                    else {
174                            listNode = new UnorderedListNode(baseParentableNode);
175                    }
176    
177                    itemNode.setBaseParentableNode(listNode);
178                    listNode.addChildASTNode(itemNode);
179    
180                    baseParentableNode.addChildASTNode(listNode);
181    
182                    return listNode;
183            }
184    
185            private List<String> _errors = new ArrayList<String>();
186            private WikiPageNode _wikipage;
187    
188    
189    
190    
191        // $ANTLR start wikipage
192        // Creole10.g:167:1: wikipage : ( whitespaces )? p= paragraphs EOF ;
193        public final void wikipage() throws RecognitionException {
194            CollectionNode p = null;
195    
196    
197            try {
198                // Creole10.g:168:2: ( ( whitespaces )? p= paragraphs EOF )
199                // Creole10.g:168:4: ( whitespaces )? p= paragraphs EOF
200                {
201                // Creole10.g:168:4: ( whitespaces )?
202                int alt1=2;
203                int LA1_0 = input.LA(1);
204    
205                if ( (LA1_0==NEWLINE||LA1_0==BLANKS) ) {
206                    alt1=1;
207                }
208                switch (alt1) {
209                    case 1 :
210                        // Creole10.g:168:6: whitespaces
211                        {
212                        pushFollow(FOLLOW_whitespaces_in_wikipage111);
213                        whitespaces();
214                        _fsp--;
215                        if (failed) return ;
216    
217                        }
218                        break;
219    
220                }
221    
222                pushFollow(FOLLOW_paragraphs_in_wikipage119);
223                p=paragraphs();
224                _fsp--;
225                if (failed) return ;
226                if ( backtracking==0 ) {
227                   _wikipage = new WikiPageNode(p); 
228                }
229                match(input,EOF,FOLLOW_EOF_in_wikipage124); if (failed) return ;
230    
231                }
232    
233            }
234            catch (RecognitionException re) {
235                reportError(re);
236                recover(input,re);
237            }
238            finally {
239            }
240            return ;
241        }
242        // $ANTLR end wikipage
243    
244    
245        // $ANTLR start paragraphs
246        // Creole10.g:170:1: paragraphs returns [CollectionNode sections = new CollectionNode()] : (p= paragraph )* ;
247        public final CollectionNode paragraphs() throws RecognitionException {
248            CollectionNode sections =  new CollectionNode();
249    
250            ASTNode p = null;
251    
252    
253            try {
254                // Creole10.g:171:2: ( (p= paragraph )* )
255                // Creole10.g:171:4: (p= paragraph )*
256                {
257                // Creole10.g:171:4: (p= paragraph )*
258                loop2:
259                do {
260                    int alt2=2;
261                    int LA2_0 = input.LA(1);
262    
263                    if ( ((LA2_0>=FORCED_END_OF_LINE && LA2_0<=WIKI)||(LA2_0>=POUND && LA2_0<=80)) ) {
264                        alt2=1;
265                    }
266    
267    
268                    switch (alt2) {
269                    case 1 :
270                        // Creole10.g:171:5: p= paragraph
271                        {
272                        pushFollow(FOLLOW_paragraph_in_paragraphs142);
273                        p=paragraph();
274                        _fsp--;
275                        if (failed) return sections;
276                        if ( backtracking==0 ) {
277    
278                                            if (p != null){ // at this moment we ignore paragraps with blanks
279                                                    sections.add(p);
280                                            }
281                                            
282                        }
283    
284                        }
285                        break;
286    
287                    default :
288                        break loop2;
289                    }
290                } while (true);
291    
292    
293                }
294    
295            }
296            catch (RecognitionException re) {
297                reportError(re);
298                recover(input,re);
299            }
300            finally {
301            }
302            return sections;
303        }
304        // $ANTLR end paragraphs
305    
306    
307        // $ANTLR start paragraph
308        // Creole10.g:177:1: paragraph returns [ASTNode node = null] : (n= nowiki_block | blanks paragraph_separator | ( blanks )? (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph ) ( paragraph_separator )? );
309        public final ASTNode paragraph() throws RecognitionException {
310            ASTNode node =  null;
311    
312            NoWikiSectionNode n = null;
313    
314            TableOfContentsNode tof = null;
315    
316            ASTNode h = null;
317    
318            ASTNode hn = null;
319    
320            ListNode l = null;
321    
322            TableNode t = null;
323    
324            ParagraphNode tp = null;
325    
326    
327            try {
328                // Creole10.g:178:2: (n= nowiki_block | blanks paragraph_separator | ( blanks )? (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph ) ( paragraph_separator )? )
329                int alt6=3;
330                switch ( input.LA(1) ) {
331                case NOWIKI_OPEN:
332                    {
333                    int LA6_1 = input.LA(2);
334    
335                    if ( (LA6_1==NEWLINE) ) {
336                        alt6=1;
337                    }
338                    else if ( ((LA6_1>=FORCED_END_OF_LINE && LA6_1<=WIKI)||(LA6_1>=POUND && LA6_1<=80)) ) {
339                        alt6=3;
340                    }
341                    else {
342                        if (backtracking>0) {failed=true; return node;}
343                        NoViableAltException nvae =
344                            new NoViableAltException("177:1: paragraph returns [ASTNode node = null] : (n= nowiki_block | blanks paragraph_separator | ( blanks )? (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph ) ( paragraph_separator )? );", 6, 1, input);
345    
346                        throw nvae;
347                    }
348                    }
349                    break;
350                case BLANKS:
351                    {
352                    switch ( input.LA(2) ) {
353                    case FORCED_END_OF_LINE:
354                    case HEADING_SECTION:
355                    case HORIZONTAL_SECTION:
356                    case LIST_ITEM:
357                    case LIST_ITEM_PART:
358                    case NOWIKI_SECTION:
359                    case SCAPE_NODE:
360                    case TEXT_NODE:
361                    case UNORDERED_LIST:
362                    case UNFORMATTED_TEXT:
363                    case WIKI:
364                    case POUND:
365                    case STAR:
366                    case EQUAL:
367                    case PIPE:
368                    case ITAL:
369                    case LINK_OPEN:
370                    case IMAGE_OPEN:
371                    case NOWIKI_OPEN:
372                    case EXTENSION:
373                    case FORCED_LINEBREAK:
374                    case ESCAPE:
375                    case NOWIKI_BLOCK_CLOSE:
376                    case NOWIKI_CLOSE:
377                    case LINK_CLOSE:
378                    case IMAGE_CLOSE:
379                    case BLANKS:
380                    case DASH:
381                    case CR:
382                    case LF:
383                    case SPACE:
384                    case TABULATOR:
385                    case BRACE_CLOSE:
386                    case COLON_SLASH:
387                    case SLASH:
388                    case INSIGNIFICANT_CHAR:
389                    case 41:
390                    case 42:
391                    case 43:
392                    case 44:
393                    case 45:
394                    case 46:
395                    case 47:
396                    case 48:
397                    case 49:
398                    case 50:
399                    case 51:
400                    case 52:
401                    case 53:
402                    case 54:
403                    case 55:
404                    case 56:
405                    case 57:
406                    case 58:
407                    case 59:
408                    case 60:
409                    case 61:
410                    case 62:
411                    case 63:
412                    case 64:
413                    case 65:
414                    case 66:
415                    case 67:
416                    case 68:
417                    case 69:
418                    case 70:
419                    case 71:
420                    case 72:
421                    case 73:
422                    case 74:
423                    case 75:
424                    case 76:
425                    case 77:
426                    case 78:
427                    case 79:
428                    case 80:
429                        {
430                        alt6=3;
431                        }
432                        break;
433                    case NEWLINE:
434                        {
435                        alt6=2;
436                        }
437                        break;
438                    case EOF:
439                        {
440                        alt6=2;
441                        }
442                        break;
443                    default:
444                        if (backtracking>0) {failed=true; return node;}
445                        NoViableAltException nvae =
446                            new NoViableAltException("177:1: paragraph returns [ASTNode node = null] : (n= nowiki_block | blanks paragraph_separator | ( blanks )? (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph ) ( paragraph_separator )? );", 6, 2, input);
447    
448                        throw nvae;
449                    }
450    
451                    }
452                    break;
453                case FORCED_END_OF_LINE:
454                case HEADING_SECTION:
455                case HORIZONTAL_SECTION:
456                case LIST_ITEM:
457                case LIST_ITEM_PART:
458                case NOWIKI_SECTION:
459                case SCAPE_NODE:
460                case TEXT_NODE:
461                case UNORDERED_LIST:
462                case UNFORMATTED_TEXT:
463                case WIKI:
464                case POUND:
465                case STAR:
466                case EQUAL:
467                case PIPE:
468                case ITAL:
469                case LINK_OPEN:
470                case IMAGE_OPEN:
471                case EXTENSION:
472                case FORCED_LINEBREAK:
473                case ESCAPE:
474                case NOWIKI_BLOCK_CLOSE:
475                case NOWIKI_CLOSE:
476                case LINK_CLOSE:
477                case IMAGE_CLOSE:
478                case DASH:
479                case CR:
480                case LF:
481                case SPACE:
482                case TABULATOR:
483                case BRACE_CLOSE:
484                case COLON_SLASH:
485                case SLASH:
486                case INSIGNIFICANT_CHAR:
487                case 41:
488                case 42:
489                case 43:
490                case 44:
491                case 45:
492                case 46:
493                case 47:
494                case 48:
495                case 49:
496                case 50:
497                case 51:
498                case 52:
499                case 53:
500                case 54:
501                case 55:
502                case 56:
503                case 57:
504                case 58:
505                case 59:
506                case 60:
507                case 61:
508                case 62:
509                case 63:
510                case 64:
511                case 65:
512                case 66:
513                case 67:
514                case 68:
515                case 69:
516                case 70:
517                case 71:
518                case 72:
519                case 73:
520                case 74:
521                case 75:
522                case 76:
523                case 77:
524                case 78:
525                case 79:
526                case 80:
527                    {
528                    alt6=3;
529                    }
530                    break;
531                default:
532                    if (backtracking>0) {failed=true; return node;}
533                    NoViableAltException nvae =
534                        new NoViableAltException("177:1: paragraph returns [ASTNode node = null] : (n= nowiki_block | blanks paragraph_separator | ( blanks )? (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph ) ( paragraph_separator )? );", 6, 0, input);
535    
536                    throw nvae;
537                }
538    
539                switch (alt6) {
540                    case 1 :
541                        // Creole10.g:178:4: n= nowiki_block
542                        {
543                        pushFollow(FOLLOW_nowiki_block_in_paragraph163);
544                        n=nowiki_block();
545                        _fsp--;
546                        if (failed) return node;
547                        if ( backtracking==0 ) {
548                           node = n; 
549                        }
550    
551                        }
552                        break;
553                    case 2 :
554                        // Creole10.g:179:4: blanks paragraph_separator
555                        {
556                        pushFollow(FOLLOW_blanks_in_paragraph170);
557                        blanks();
558                        _fsp--;
559                        if (failed) return node;
560                        pushFollow(FOLLOW_paragraph_separator_in_paragraph173);
561                        paragraph_separator();
562                        _fsp--;
563                        if (failed) return node;
564    
565                        }
566                        break;
567                    case 3 :
568                        // Creole10.g:180:4: ( blanks )? (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph ) ( paragraph_separator )?
569                        {
570                        // Creole10.g:180:4: ( blanks )?
571                        int alt3=2;
572                        int LA3_0 = input.LA(1);
573    
574                        if ( (LA3_0==BLANKS) ) {
575                            alt3=1;
576                        }
577                        switch (alt3) {
578                            case 1 :
579                                // Creole10.g:180:6: blanks
580                                {
581                                pushFollow(FOLLOW_blanks_in_paragraph180);
582                                blanks();
583                                _fsp--;
584                                if (failed) return node;
585    
586                                }
587                                break;
588    
589                        }
590    
591                        // Creole10.g:181:4: (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph )
592                        int alt4=6;
593                        switch ( input.LA(1) ) {
594                        case 77:
595                            {
596                            alt4=1;
597                            }
598                            break;
599                        case 78:
600                            {
601                            alt4=1;
602                            }
603                            break;
604                        case EQUAL:
605                            {
606                            alt4=2;
607                            }
608                            break;
609                        case DASH:
610                            {
611                            int LA4_4 = input.LA(2);
612    
613                            if ( ( input.LA(1) == DASH && input.LA(2) == DASH &&
614                                                            input.LA(3) == DASH && input.LA(4) == DASH ) ) {
615                                alt4=3;
616                            }
617                            else if ( (true) ) {
618                                alt4=6;
619                            }
620                            else {
621                                if (backtracking>0) {failed=true; return node;}
622                                NoViableAltException nvae =
623                                    new NoViableAltException("181:4: (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph )", 4, 4, input);
624    
625                                throw nvae;
626                            }
627                            }
628                            break;
629                        case POUND:
630                            {
631                            alt4=4;
632                            }
633                            break;
634                        case STAR:
635                            {
636                            int LA4_6 = input.LA(2);
637    
638                            if ( (!( input.LA(1) != STAR || (input.LA(1) == STAR && input.LA(2) == STAR) )) ) {
639                                alt4=4;
640                            }
641                            else if ( ( input.LA(1) != STAR || (input.LA(1) == STAR && input.LA(2) == STAR) ) ) {
642                                alt4=6;
643                            }
644                            else {
645                                if (backtracking>0) {failed=true; return node;}
646                                NoViableAltException nvae =
647                                    new NoViableAltException("181:4: (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph )", 4, 6, input);
648    
649                                throw nvae;
650                            }
651                            }
652                            break;
653                        case PIPE:
654                            {
655                            alt4=5;
656                            }
657                            break;
658                        case FORCED_END_OF_LINE:
659                        case HEADING_SECTION:
660                        case HORIZONTAL_SECTION:
661                        case LIST_ITEM:
662                        case LIST_ITEM_PART:
663                        case NOWIKI_SECTION:
664                        case SCAPE_NODE:
665                        case TEXT_NODE:
666                        case UNORDERED_LIST:
667                        case UNFORMATTED_TEXT:
668                        case WIKI:
669                        case ITAL:
670                        case LINK_OPEN:
671                        case IMAGE_OPEN:
672                        case NOWIKI_OPEN:
673                        case EXTENSION:
674                        case FORCED_LINEBREAK:
675                        case ESCAPE:
676                        case NOWIKI_BLOCK_CLOSE:
677                        case NOWIKI_CLOSE:
678                        case LINK_CLOSE:
679                        case IMAGE_CLOSE:
680                        case BLANKS:
681                        case CR:
682                        case LF:
683                        case SPACE:
684                        case TABULATOR:
685                        case BRACE_CLOSE:
686                        case COLON_SLASH:
687                        case SLASH:
688                        case INSIGNIFICANT_CHAR:
689                        case 41:
690                        case 42:
691                        case 43:
692                        case 44:
693                        case 45:
694                        case 46:
695                        case 47:
696                        case 48:
697                        case 49:
698                        case 50:
699                        case 51:
700                        case 52:
701                        case 53:
702                        case 54:
703                        case 55:
704                        case 56:
705                        case 57:
706                        case 58:
707                        case 59:
708                        case 60:
709                        case 61:
710                        case 62:
711                        case 63:
712                        case 64:
713                        case 65:
714                        case 66:
715                        case 67:
716                        case 68:
717                        case 69:
718                        case 70:
719                        case 71:
720                        case 72:
721                        case 73:
722                        case 74:
723                        case 75:
724                        case 76:
725                        case 79:
726                        case 80:
727                            {
728                            alt4=6;
729                            }
730                            break;
731                        default:
732                            if (backtracking>0) {failed=true; return node;}
733                            NoViableAltException nvae =
734                                new NoViableAltException("181:4: (tof= table_of_contents | h= heading | {...}?hn= horizontalrule | l= list | t= table | tp= text_paragraph )", 4, 0, input);
735    
736                            throw nvae;
737                        }
738    
739                        switch (alt4) {
740                            case 1 :
741                                // Creole10.g:181:6: tof= table_of_contents
742                                {
743                                pushFollow(FOLLOW_table_of_contents_in_paragraph194);
744                                tof=table_of_contents();
745                                _fsp--;
746                                if (failed) return node;
747                                if ( backtracking==0 ) {
748                                  node = tof;
749                                }
750    
751                                }
752                                break;
753                            case 2 :
754                                // Creole10.g:182:6: h= heading
755                                {
756                                pushFollow(FOLLOW_heading_in_paragraph208);
757                                h=heading();
758                                _fsp--;
759                                if (failed) return node;
760                                if ( backtracking==0 ) {
761                                   node = h;
762                                }
763    
764                                }
765                                break;
766                            case 3 :
767                                // Creole10.g:183:6: {...}?hn= horizontalrule
768                                {
769                                if ( !( input.LA(1) == DASH && input.LA(2) == DASH &&
770                                                            input.LA(3) == DASH && input.LA(4) == DASH ) ) {
771                                    if (backtracking>0) {failed=true; return node;}
772                                    throw new FailedPredicateException(input, "paragraph", " input.LA(1) == DASH && input.LA(2) == DASH &&\n\t\t\t\tinput.LA(3) == DASH && input.LA(4) == DASH ");
773                                }
774                                pushFollow(FOLLOW_horizontalrule_in_paragraph227);
775                                hn=horizontalrule();
776                                _fsp--;
777                                if (failed) return node;
778                                if ( backtracking==0 ) {
779                                  node = hn;
780                                }
781    
782                                }
783                                break;
784                            case 4 :
785                                // Creole10.g:186:6: l= list
786                                {
787                                pushFollow(FOLLOW_list_in_paragraph240);
788                                l=list();
789                                _fsp--;
790                                if (failed) return node;
791                                if ( backtracking==0 ) {
792                                  node = l;
793                                }
794    
795                                }
796                                break;
797                            case 5 :
798                                // Creole10.g:187:6: t= table
799                                {
800                                pushFollow(FOLLOW_table_in_paragraph253);
801                                t=table();
802                                _fsp--;
803                                if (failed) return node;
804                                if ( backtracking==0 ) {
805                                   node = t; 
806                                }
807    
808                                }
809                                break;
810                            case 6 :
811                                // Creole10.g:188:6: tp= text_paragraph
812                                {
813                                pushFollow(FOLLOW_text_paragraph_in_paragraph266);
814                                tp=text_paragraph();
815                                _fsp--;
816                                if (failed) return node;
817                                if ( backtracking==0 ) {
818                                  node = tp; 
819                                }
820    
821                                }
822                                break;
823    
824                        }
825    
826                        // Creole10.g:189:7: ( paragraph_separator )?
827                        int alt5=2;
828                        int LA5_0 = input.LA(1);
829    
830                        if ( (LA5_0==NEWLINE) ) {
831                            alt5=1;
832                        }
833                        else if ( (LA5_0==EOF) ) {
834                            int LA5_2 = input.LA(2);
835    
836                            if ( (LA5_2==EOF) ) {
837                                int LA5_4 = input.LA(3);
838    
839                                if ( (LA5_4==EOF) ) {
840                                    alt5=1;
841                                }
842                            }
843                            else if ( ((LA5_2>=FORCED_END_OF_LINE && LA5_2<=WIKI)||(LA5_2>=POUND && LA5_2<=80)) ) {
844                                alt5=1;
845                            }
846                        }
847                        switch (alt5) {
848                            case 1 :
849                                // Creole10.g:189:9: paragraph_separator
850                                {
851                                pushFollow(FOLLOW_paragraph_separator_in_paragraph279);
852                                paragraph_separator();
853                                _fsp--;
854                                if (failed) return node;
855    
856                                }
857                                break;
858    
859                        }
860    
861    
862                        }
863                        break;
864    
865                }
866            }
867            catch (RecognitionException re) {
868                reportError(re);
869                recover(input,re);
870            }
871            finally {
872            }
873            return node;
874        }
875        // $ANTLR end paragraph
876    
877    
878        // $ANTLR start text_paragraph
879        // Creole10.g:196:1: text_paragraph returns [ ParagraphNode paragraph = new ParagraphNode() ] : (tl= text_line | ( NOWIKI_OPEN ~ ( NEWLINE ) )=>nw= nowiki_inline (te= text_element )* text_lineseparator )+ ;
880        public final ParagraphNode text_paragraph() throws RecognitionException {
881            ParagraphNode paragraph =  new ParagraphNode();
882    
883            LineNode tl = null;
884    
885            NoWikiSectionNode nw = null;
886    
887            ASTNode te = null;
888    
889    
890            try {
891                // Creole10.g:197:2: ( (tl= text_line | ( NOWIKI_OPEN ~ ( NEWLINE ) )=>nw= nowiki_inline (te= text_element )* text_lineseparator )+ )
892                // Creole10.g:197:4: (tl= text_line | ( NOWIKI_OPEN ~ ( NEWLINE ) )=>nw= nowiki_inline (te= text_element )* text_lineseparator )+
893                {
894                // Creole10.g:197:4: (tl= text_line | ( NOWIKI_OPEN ~ ( NEWLINE ) )=>nw= nowiki_inline (te= text_element )* text_lineseparator )+
895                int cnt8=0;
896                loop8:
897                do {
898                    int alt8=3;
899                    switch ( input.LA(1) ) {
900                    case NOWIKI_OPEN:
901                        {
902                        int LA8_2 = input.LA(2);
903    
904                        if ( (synpred1()) ) {
905                            alt8=2;
906                        }
907    
908    
909                        }
910                        break;
911                    case BLANKS:
912                        {
913                        alt8=1;
914                        }
915                        break;
916                    case 77:
917                        {
918                        alt8=1;
919                        }
920                        break;
921                    case 78:
922                        {
923                        alt8=1;
924                        }
925                        break;
926                    case DASH:
927                        {
928                        alt8=1;
929                        }
930                        break;
931                    case STAR:
932                        {
933                        int LA8_7 = input.LA(2);
934    
935                        if ( ( input.LA(1) != STAR || (input.LA(1) == STAR && input.LA(2) == STAR) ) ) {
936                            alt8=1;
937                        }
938    
939    
940                        }
941                        break;
942                    case ITAL:
943                        {
944                        int LA8_8 = input.LA(2);
945    
946                        if ( ( input.LA(1) != STAR || (input.LA(1) == STAR && input.LA(2) == STAR) ) ) {
947                            alt8=1;
948                        }
949    
950    
951                        }
952                        break;
953                    case FORCED_END_OF_LINE:
954                    case HEADING_SECTION:
955                    case HORIZONTAL_SECTION:
956                    case LIST_ITEM:
957                    case LIST_ITEM_PART:
958                    case NOWIKI_SECTION:
959                    case SCAPE_NODE:
960                    case TEXT_NODE:
961                    case UNORDERED_LIST:
962                    case UNFORMATTED_TEXT:
963                    case WIKI:
964                    case NOWIKI_BLOCK_CLOSE:
965                    case NOWIKI_CLOSE:
966                    case LINK_CLOSE:
967                    case IMAGE_CLOSE:
968                    case CR:
969                    case LF:
970                    case SPACE:
971                    case TABULATOR:
972                    case BRACE_CLOSE:
973                    case COLON_SLASH:
974                    case SLASH:
975                    case INSIGNIFICANT_CHAR:
976                    case 41:
977                    case 42:
978                    case 43:
979                    case 44:
980                    case 45:
981                    case 46:
982                    case 47:
983                    case 48:
984                    case 49:
985                    case 50:
986                    case 51:
987                    case 52:
988                    case 53:
989                    case 54:
990                    case 55:
991                    case 56:
992                    case 57:
993                    case 58:
994                    case 59:
995                    case 60:
996                    case 61:
997                    case 62:
998                    case 63:
999                    case 64:
1000                    case 65:
1001                    case 66:
1002                    case 67:
1003                    case 68:
1004                    case 69:
1005                    case 70:
1006                    case 71:
1007                    case 72:
1008                    case 73:
1009                    case 74:
1010                    case 75:
1011                    case 76:
1012                    case 79:
1013                    case 80:
1014                        {
1015                        alt8=1;
1016                        }
1017                        break;
1018                    case FORCED_LINEBREAK:
1019                        {
1020                        alt8=1;
1021                        }
1022                        break;
1023                    case ESCAPE:
1024                        {
1025                        alt8=1;
1026                        }
1027                        break;
1028                    case LINK_OPEN:
1029                        {
1030                        alt8=1;
1031                        }
1032                        break;
1033                    case IMAGE_OPEN:
1034                        {
1035                        alt8=1;
1036                        }
1037                        break;
1038                    case EXTENSION:
1039                        {
1040                        alt8=1;
1041                        }
1042                        break;
1043    
1044                    }
1045    
1046                    switch (alt8) {
1047                    case 1 :
1048                        // Creole10.g:197:6: tl= text_line
1049                        {
1050                        pushFollow(FOLLOW_text_line_in_text_paragraph307);
1051                        tl=text_line();
1052                        _fsp--;
1053                        if (failed) return paragraph;
1054                        if ( backtracking==0 ) {
1055                            paragraph.addChildASTNode(tl);  
1056                        }
1057    
1058                        }
1059                        break;
1060                    case 2 :
1061                        // Creole10.g:198:5: ( NOWIKI_OPEN ~ ( NEWLINE ) )=>nw= nowiki_inline (te= text_element )* text_lineseparator
1062                        {
1063                        pushFollow(FOLLOW_nowiki_inline_in_text_paragraph339);
1064                        nw=nowiki_inline();
1065                        _fsp--;
1066                        if (failed) return paragraph;
1067                        if ( backtracking==0 ) {
1068                          paragraph.addChildASTNode(nw);
1069                        }
1070                        // Creole10.g:199:66: (te= text_element )*
1071                        loop7:
1072                        do {
1073                            int alt7=2;
1074                            int LA7_0 = input.LA(1);
1075    
1076                            if ( ((LA7_0>=FORCED_END_OF_LINE && LA7_0<=WIKI)||(LA7_0>=POUND && LA7_0<=80)) ) {
1077                                alt7=1;
1078                            }
1079    
1080    
1081                            switch (alt7) {
1082                            case 1 :
1083                                // Creole10.g:199:68: te= text_element
1084                                {
1085                                pushFollow(FOLLOW_text_element_in_text_paragraph350);
1086                                te=text_element();
1087                                _fsp--;
1088                                if (failed) return paragraph;
1089                                if ( backtracking==0 ) {
1090                                  paragraph.addChildASTNode(te);
1091                                }
1092    
1093                                }
1094                                break;
1095    
1096                            default :
1097                                break loop7;
1098                            }
1099                        } while (true);
1100    
1101                        pushFollow(FOLLOW_text_lineseparator_in_text_paragraph359);
1102                        text_lineseparator();
1103                        _fsp--;
1104                        if (failed) return paragraph;
1105    
1106                        }
1107                        break;
1108    
1109                    default :
1110                        if ( cnt8 >= 1 ) break loop8;
1111                        if (backtracking>0) {failed=true; return paragraph;}
1112                            EarlyExitException eee =
1113                                new EarlyExitException(8, input);
1114                            throw eee;
1115                    }
1116                    cnt8++;
1117                } while (true);
1118    
1119    
1120                }
1121    
1122            }
1123            catch (RecognitionException re) {
1124                reportError(re);
1125                recover(input,re);
1126            }
1127            finally {
1128            }
1129            return paragraph;
1130        }
1131        // $ANTLR end text_paragraph
1132    
1133    
1134        // $ANTLR start text_line
1135        // Creole10.g:202:1: text_line returns [LineNode line = new LineNode()] : first= text_firstelement (element= text_element )* text_lineseparator ;
1136        public final LineNode text_line() throws RecognitionException {
1137            LineNode line =  new LineNode();
1138    
1139            ASTNode first = null;
1140    
1141            ASTNode element = null;
1142    
1143    
1144            try {
1145                // Creole10.g:203:2: (first= text_firstelement (element= text_element )* text_lineseparator )
1146                // Creole10.g:203:4: first= text_firstelement (element= text_element )* text_lineseparator
1147                {
1148                pushFollow(FOLLOW_text_firstelement_in_text_line382);
1149                first=text_firstelement();
1150                _fsp--;
1151                if (failed) return line;
1152                if ( backtracking==0 ) {
1153    
1154                                                                                            if (first != null) { // recovering from errors
1155                                                                                                    line.addChildASTNode(first);
1156                                                                                            }
1157                                                                                    
1158                }
1159                // Creole10.g:208:9: (element= text_element )*
1160                loop9:
1161                do {
1162                    int alt9=2;
1163                    int LA9_0 = input.LA(1);
1164    
1165                    if ( ((LA9_0>=FORCED_END_OF_LINE && LA9_0<=WIKI)||(LA9_0>=POUND && LA9_0<=80)) ) {
1166                        alt9=1;
1167                    }
1168    
1169    
1170                    switch (alt9) {
1171                    case 1 :
1172                        // Creole10.g:208:11: element= text_element
1173                        {
1174                        pushFollow(FOLLOW_text_element_in_text_line401);
1175                        element=text_element();
1176                        _fsp--;
1177                        if (failed) return line;
1178                        if ( backtracking==0 ) {
1179    
1180                                                                                    if (element != null) // recovering from errors
1181                                                                                            line.addChildASTNode(element);
1182                                                                            
1183                        }
1184    
1185                        }
1186                        break;
1187    
1188                    default :
1189                        break loop9;
1190                    }
1191                } while (true);
1192    
1193                pushFollow(FOLLOW_text_lineseparator_in_text_line415);
1194                text_lineseparator();
1195                _fsp--;
1196                if (failed) return line;
1197    
1198                }
1199    
1200            }
1201            catch (RecognitionException re) {
1202                reportError(re);
1203                recover(input,re);
1204            }
1205            finally {
1206            }
1207            return line;
1208        }
1209        // $ANTLR end text_line
1210    
1211    
1212        // $ANTLR start text_firstelement
1213        // Creole10.g:214:1: text_firstelement returns [ASTNode item = null] : ({...}?tf= text_formattedelement | tu= text_first_unformattedelement );
1214        public final ASTNode text_firstelement() throws RecognitionException {
1215            ASTNode item =  null;
1216    
1217            FormattedTextNode tf = null;
1218    
1219            ASTNode tu = null;
1220    
1221    
1222            try {
1223                // Creole10.g:215:2: ({...}?tf= text_formattedelement | tu= text_first_unformattedelement )
1224                int alt10=2;
1225                int LA10_0 = input.LA(1);
1226    
1227                if ( (LA10_0==STAR||LA10_0==ITAL) ) {
1228                    alt10=1;
1229                }
1230                else if ( ((LA10_0>=FORCED_END_OF_LINE && LA10_0<=WIKI)||(LA10_0>=LINK_OPEN && LA10_0<=IMAGE_OPEN)||(LA10_0>=EXTENSION && LA10_0<=80)) ) {
1231                    alt10=2;
1232                }
1233                else {
1234                    if (backtracking>0) {failed=true; return item;}
1235                    NoViableAltException nvae =
1236                        new NoViableAltException("214:1: text_firstelement returns [ASTNode item = null] : ({...}?tf= text_formattedelement | tu= text_first_unformattedelement );", 10, 0, input);
1237    
1238                    throw nvae;
1239                }
1240                switch (alt10) {
1241                    case 1 :
1242                        // Creole10.g:215:4: {...}?tf= text_formattedelement
1243                        {
1244                        if ( !( input.LA(1) != STAR || (input.LA(1) == STAR && input.LA(2) == STAR) ) ) {
1245                            if (backtracking>0) {failed=true; return item;}
1246                            throw new FailedPredicateException(input, "text_firstelement", " input.LA(1) != STAR || (input.LA(1) == STAR && input.LA(2) == STAR) ");
1247                        }
1248                        pushFollow(FOLLOW_text_formattedelement_in_text_firstelement437);
1249                        tf=text_formattedelement();
1250                        _fsp--;
1251                        if (failed) return item;
1252                        if ( backtracking==0 ) {
1253                           item = tf; 
1254                        }
1255    
1256                        }
1257                        break;
1258                    case 2 :
1259                        // Creole10.g:217:4: tu= text_first_unformattedelement
1260                        {
1261                        pushFollow(FOLLOW_text_first_unformattedelement_in_text_firstelement448);
1262                        tu=text_first_unformattedelement();
1263                        _fsp--;
1264                        if (failed) return item;
1265                        if ( backtracking==0 ) {
1266                           item = tu; 
1267                        }
1268    
1269                        }
1270                        break;
1271    
1272                }
1273            }
1274            catch (RecognitionException re) {
1275                reportError(re);
1276                recover(input,re);
1277            }
1278            finally {
1279            }
1280            return item;
1281        }
1282        // $ANTLR end text_firstelement
1283    
1284    
1285        // $ANTLR start text_formattedelement
1286        // Creole10.g:219:1: text_formattedelement returns [FormattedTextNode item = null] : ( ital_markup ic= text_italcontent ( ( NEWLINE )? ital_markup )? | bold_markup bc= text_boldcontent ( ( NEWLINE )? bold_markup )? );
1287        public final FormattedTextNode text_formattedelement() throws RecognitionException {
1288            FormattedTextNode item =  null;
1289    
1290            CollectionNode ic = null;
1291    
1292            CollectionNode bc = null;
1293    
1294    
1295            try {
1296                // Creole10.g:220:2: ( ital_markup ic= text_italcontent ( ( NEWLINE )? ital_markup )? | bold_markup bc= text_boldcontent ( ( NEWLINE )? bold_markup )? )
1297                int alt15=2;
1298                int LA15_0 = input.LA(1);
1299    
1300                if ( (LA15_0==ITAL) ) {
1301                    alt15=1;
1302                }
1303                else if ( (LA15_0==STAR) ) {
1304                    alt15=2;
1305                }
1306                else {
1307                    if (backtracking>0) {failed=true; return item;}
1308                    NoViableAltException nvae =
1309                        new NoViableAltException("219:1: text_formattedelement returns [FormattedTextNode item = null] : ( ital_markup ic= text_italcontent ( ( NEWLINE )? ital_markup )? | bold_markup bc= text_boldcontent ( ( NEWLINE )? bold_markup )? );", 15, 0, input);
1310    
1311                    throw nvae;
1312                }
1313                switch (alt15) {
1314                    case 1 :
1315                        // Creole10.g:220:4: ital_markup ic= text_italcontent ( ( NEWLINE )? ital_markup )?
1316                        {
1317                        pushFollow(FOLLOW_ital_markup_in_text_formattedelement464);
1318                        ital_markup();
1319                        _fsp--;
1320                        if (failed) return item;
1321                        pushFollow(FOLLOW_text_italcontent_in_text_formattedelement470);
1322                        ic=text_italcontent();
1323                        _fsp--;
1324                        if (failed) return item;
1325                        if ( backtracking==0 ) {
1326                           item = new ItalicTextNode(ic); 
1327                        }
1328                        // Creole10.g:220:81: ( ( NEWLINE )? ital_markup )?
1329                        int alt12=2;
1330                        int LA12_0 = input.LA(1);
1331    
1332                        if ( (LA12_0==NEWLINE) ) {
1333                            int LA12_1 = input.LA(2);
1334    
1335                            if ( (LA12_1==ITAL) ) {
1336                                alt12=1;
1337                            }
1338                        }
1339                        else if ( (LA12_0==ITAL) ) {
1340                            alt12=1;
1341                        }
1342                        switch (alt12) {
1343                            case 1 :
1344                                // Creole10.g:220:83: ( NEWLINE )? ital_markup
1345                                {
1346                                // Creole10.g:220:83: ( NEWLINE )?
1347                                int alt11=2;
1348                                int LA11_0 = input.LA(1);
1349    
1350                                if ( (LA11_0==NEWLINE) ) {
1351                                    alt11=1;
1352                                }
1353                                switch (alt11) {
1354                                    case 1 :
1355                                        // Creole10.g:220:85: NEWLINE
1356                                        {
1357                                        match(input,NEWLINE,FOLLOW_NEWLINE_in_text_formattedelement479); if (failed) return item;
1358    
1359                                        }
1360                                        break;
1361    
1362                                }
1363    
1364                                pushFollow(FOLLOW_ital_markup_in_text_formattedelement485);
1365                                ital_markup();
1366                                _fsp--;
1367                                if (failed) return item;
1368    
1369                                }
1370                                break;
1371    
1372                        }
1373    
1374    
1375                        }
1376                        break;
1377                    case 2 :
1378                        // Creole10.g:221:4: bold_markup bc= text_boldcontent ( ( NEWLINE )? bold_markup )?
1379                        {
1380                        pushFollow(FOLLOW_bold_markup_in_text_formattedelement493);
1381                        bold_markup();
1382                        _fsp--;
1383                        if (failed) return item;
1384                        pushFollow(FOLLOW_text_boldcontent_in_text_formattedelement500);
1385                        bc=text_boldcontent();
1386                        _fsp--;
1387                        if (failed) return item;
1388                        if ( backtracking==0 ) {
1389                          item = new BoldTextNode(bc); 
1390                        }
1391                        // Creole10.g:221:79: ( ( NEWLINE )? bold_markup )?
1392                        int alt14=2;
1393                        int LA14_0 = input.LA(1);
1394    
1395                        if ( (LA14_0==NEWLINE) ) {
1396                            int LA14_1 = input.LA(2);
1397    
1398                            if ( (LA14_1==STAR) ) {
1399                                int LA14_4 = input.LA(3);
1400    
1401                                if ( (LA14_4==STAR) ) {
1402                                    alt14=1;
1403                                }
1404                            }
1405                        }
1406                        else if ( (LA14_0==STAR) ) {
1407                            int LA14_2 = input.LA(2);
1408    
1409                            if ( (LA14_2==STAR) ) {
1410                                alt14=1;
1411                            }
1412                        }
1413                        switch (alt14) {
1414                            case 1 :
1415                                // Creole10.g:221:81: ( NEWLINE )? bold_markup
1416                                {
1417                                // Creole10.g:221:81: ( NEWLINE )?
1418                                int alt13=2;
1419                                int LA13_0 = input.LA(1);
1420    
1421                                if ( (LA13_0==NEWLINE) ) {
1422                                    alt13=1;
1423                                }
1424                                switch (alt13) {
1425                                    case 1 :
1426                                        // Creole10.g:221:83: NEWLINE
1427                                        {
1428                                        match(input,NEWLINE,FOLLOW_NEWLINE_in_text_formattedelement509); if (failed) return item;
1429    
1430                                        }
1431                                        break;
1432    
1433                                }
1434    
1435                                pushFollow(FOLLOW_bold_markup_in_text_formattedelement515);
1436                                bold_markup();
1437                                _fsp--;
1438                                if (failed) return item;
1439    
1440                                }
1441                                break;
1442    
1443                        }
1444    
1445    
1446                        }
1447                        break;
1448    
1449                }
1450            }
1451            catch (RecognitionException re) {
1452                reportError(re);
1453                recover(input,re);
1454            }
1455            finally {
1456            }
1457            return item;
1458        }
1459        // $ANTLR end text_formattedelement
1460    
1461    
1462        // $ANTLR start text_boldcontent
1463        // Creole10.g:223:1: text_boldcontent returns [ CollectionNode text = new CollectionNode() ] : ( ( NEWLINE )? (p= text_boldcontentpart )* | EOF );
1464        public final CollectionNode text_boldcontent() throws RecognitionException {
1465            CollectionNode text =  new CollectionNode();
1466    
1467            FormattedTextNode p = null;
1468    
1469    
1470            try {
1471                // Creole10.g:224:2: ( ( NEWLINE )? (p= text_boldcontentpart )* | EOF )
1472                int alt18=2;
1473                int LA18_0 = input.LA(1);
1474    
1475                if ( ((LA18_0>=FORCED_END_OF_LINE && LA18_0<=80)) ) {
1476                    alt18=1;
1477                }
1478                else if ( (LA18_0==EOF) ) {
1479                    alt18=1;
1480                }
1481                else {
1482                    if (backtracking>0) {failed=true; return text;}
1483                    NoViableAltException nvae =
1484                        new NoViableAltException("223:1: text_boldcontent returns [ CollectionNode text = new CollectionNode() ] : ( ( NEWLINE )? (p= text_boldcontentpart )* | EOF );", 18, 0, input);
1485    
1486                    throw nvae;
1487                }
1488                switch (alt18) {
1489                    case 1 :
1490                        // Creole10.g:224:4: ( NEWLINE )? (p= text_boldcontentpart )*
1491                        {
1492                        // Creole10.g:224:4: ( NEWLINE )?
1493                        int alt16=2;
1494                        int LA16_0 = input.LA(1);
1495    
1496                        if ( (LA16_0==NEWLINE) ) {
1497                            alt16=1;
1498                        }
1499                        switch (alt16) {
1500                            case 1 :
1501                                // Creole10.g:224:6: NEWLINE
1502                                {
1503                                match(input,NEWLINE,FOLLOW_NEWLINE_in_text_boldcontent534); if (failed) return text;
1504    
1505                                }
1506                                break;
1507    
1508                        }
1509    
1510                        // Creole10.g:224:18: (p= text_boldcontentpart )*
1511                        loop17:
1512                        do {
1513                            int alt17=2;
1514                            switch ( input.LA(1) ) {
1515                            case STAR:
1516                                {
1517                                int LA17_2 = input.LA(2);
1518    
1519                                if ( ( input.LA(2) != STAR ) ) {
1520                                    alt17=1;
1521                                }
1522    
1523    
1524                                }
1525                                break;
1526                            case FORCED_END_OF_LINE:
1527                            case HEADING_SECTION:
1528                            case HORIZONTAL_SECTION:
1529                            case LIST_ITEM:
1530                            case LIST_ITEM_PART:
1531                            case NOWIKI_SECTION:
1532                            case SCAPE_NODE:
1533                            case TEXT_NODE:
1534                            case UNORDERED_LIST:
1535                            case UNFORMATTED_TEXT:
1536                            case WIKI:
1537                            case POUND:
1538                            case EQUAL:
1539                            case PIPE:
1540                            case NOWIKI_BLOCK_CLOSE:
1541                            case NOWIKI_CLOSE:
1542                            case LINK_CLOSE:
1543                            case IMAGE_CLOSE:
1544                            case BLANKS:
1545                            case DASH:
1546                            case CR:
1547                            case LF:
1548                            case SPACE:
1549                            case TABULATOR:
1550                            case BRACE_CLOSE:
1551                            case COLON_SLASH:
1552                            case SLASH:
1553                            case INSIGNIFICANT_CHAR:
1554                            case 41:
1555                            case 42:
1556                            case 43:
1557                            case 44:
1558                            case 45:
1559                            case 46:
1560                            case 47:
1561                            case 48:
1562                            case 49:
1563                            case 50:
1564                            case 51:
1565                            case 52:
1566                            case 53:
1567                            case 54:
1568                            case 55:
1569                            case 56:
1570                            case 57:
1571                            case 58:
1572                            case 59:
1573                            case 60:
1574                            case 61:
1575                            case 62:
1576                            case 63:
1577                            case 64:
1578                            case 65:
1579                            case 66:
1580                            case 67:
1581                            case 68:
1582                            case 69:
1583                            case 70:
1584                            case 71:
1585                            case 72:
1586                            case 73:
1587                            case 74:
1588                            case 75:
1589                            case 76:
1590                            case 77:
1591                            case 78:
1592                            case 79:
1593                            case 80:
1594                                {
1595                                alt17=1;
1596                                }
1597                                break;
1598                            case FORCED_LINEBREAK:
1599                                {
1600                                alt17=1;
1601                                }
1602                                break;
1603                            case ESCAPE:
1604                                {
1605                                alt17=1;
1606                                }
1607                                break;
1608                            case LINK_OPEN:
1609                                {
1610                                alt17=1;
1611                                }
1612                                break;
1613                            case IMAGE_OPEN:
1614                                {
1615                                alt17=1;
1616                                }
1617                                break;
1618                            case EXTENSION:
1619                                {
1620                                alt17=1;
1621                                }
1622                                break;
1623                            case NOWIKI_OPEN:
1624                                {
1625                                alt17=1;
1626                                }
1627                                break;
1628                            case ITAL:
1629                                {
1630                                alt17=1;
1631                                }
1632                                break;
1633    
1634                            }
1635    
1636                            switch (alt17) {
1637                            case 1 :
1638                                // Creole10.g:224:20: p= text_boldcontentpart
1639                                {
1640                                pushFollow(FOLLOW_text_boldcontentpart_in_text_boldcontent546);
1641                                p=text_boldcontentpart();
1642                                _fsp--;
1643                                if (failed) return text;
1644                                if ( backtracking==0 ) {
1645                                   text.add(p); 
1646                                }
1647    
1648                                }
1649                                break;
1650    
1651                            default :
1652                                break loop17;
1653                            }
1654                        } while (true);
1655    
1656    
1657                        }
1658                        break;
1659                    case 2 :
1660                        // Creole10.g:225:4: EOF
1661                        {
1662                        match(input,EOF,FOLLOW_EOF_in_text_boldcontent557); if (failed) return text;
1663    
1664                        }
1665                        break;
1666    
1667                }
1668            }
1669            catch (RecognitionException re) {
1670                reportError(re);
1671                recover(input,re);
1672            }
1673            finally {
1674            }
1675            return text;
1676        }
1677        // $ANTLR end text_boldcontent
1678    
1679    
1680        // $ANTLR start text_italcontent
1681        // Creole10.g:227:1: text_italcontent returns [ CollectionNode text = new CollectionNode() ] : ( ( NEWLINE )? (p= text_italcontentpart )* | EOF );
1682        public final CollectionNode text_italcontent() throws RecognitionException {
1683            CollectionNode text =  new CollectionNode();
1684    
1685            FormattedTextNode p = null;
1686    
1687    
1688            try {
1689                // Creole10.g:228:2: ( ( NEWLINE )? (p= text_italcontentpart )* | EOF )
1690                int alt21=2;
1691                int LA21_0 = input.LA(1);
1692    
1693                if ( ((LA21_0>=FORCED_END_OF_LINE && LA21_0<=80)) ) {
1694                    alt21=1;
1695                }
1696                else if ( (LA21_0==EOF) ) {
1697                    alt21=1;
1698                }
1699                else {
1700                    if (backtracking>0) {failed=true; return text;}
1701                    NoViableAltException nvae =
1702                        new NoViableAltException("227:1: text_italcontent returns [ CollectionNode text = new CollectionNode() ] : ( ( NEWLINE )? (p= text_italcontentpart )* | EOF );", 21, 0, input);
1703    
1704                    throw nvae;
1705                }
1706                switch (alt21) {
1707                    case 1 :
1708                        // Creole10.g:228:4: ( NEWLINE )? (p= text_italcontentpart )*
1709                        {
1710                        // Creole10.g:228:4: ( NEWLINE )?
1711                        int alt19=2;
1712                        int LA19_0 = input.LA(1);
1713    
1714                        if ( (LA19_0==NEWLINE) ) {
1715                            alt19=1;
1716                        }
1717                        switch (alt19) {
1718                            case 1 :
1719                                // Creole10.g:228:6: NEWLINE
1720                                {
1721                                match(input,NEWLINE,FOLLOW_NEWLINE_in_text_italcontent573); if (failed) return text;
1722    
1723                                }
1724                                break;
1725    
1726                        }
1727    
1728                        // Creole10.g:228:18: (p= text_italcontentpart )*
1729                        loop20:
1730                        do {
1731                            int alt20=2;
1732                            switch ( input.LA(1) ) {
1733                            case STAR:
1734                                {
1735                                alt20=1;
1736                                }
1737                                break;
1738                            case FORCED_END_OF_LINE:
1739                            case HEADING_SECTION:
1740                            case HORIZONTAL_SECTION:
1741                            case LIST_ITEM:
1742                            case LIST_ITEM_PART:
1743                            case NOWIKI_SECTION:
1744                            case SCAPE_NODE:
1745                            case TEXT_NODE:
1746                            case UNORDERED_LIST:
1747                            case UNFORMATTED_TEXT:
1748                            case WIKI:
1749                            case POUND:
1750                            case EQUAL:
1751                            case PIPE:
1752                            case NOWIKI_BLOCK_CLOSE:
1753                            case NOWIKI_CLOSE:
1754                            case LINK_CLOSE:
1755                            case IMAGE_CLOSE:
1756                            case BLANKS:
1757                            case DASH:
1758                            case CR:
1759                            case LF:
1760                            case SPACE:
1761                            case TABULATOR:
1762                            case BRACE_CLOSE:
1763                            case COLON_SLASH:
1764                            case SLASH:
1765                            case INSIGNIFICANT_CHAR:
1766                            case 41:
1767                            case 42:
1768                            case 43:
1769                            case 44:
1770                            case 45:
1771                            case 46:
1772                            case 47:
1773                            case 48:
1774                            case 49:
1775                            case 50:
1776                            case 51:
1777                            case 52:
1778                            case 53:
1779                            case 54:
1780                            case 55:
1781                            case 56:
1782                            case 57:
1783                            case 58:
1784                            case 59:
1785                            case 60:
1786                            case 61:
1787                            case 62:
1788                            case 63:
1789                            case 64:
1790                            case 65:
1791                            case 66:
1792                            case 67:
1793                            case 68:
1794                            case 69:
1795                            case 70:
1796                            case 71:
1797                            case 72:
1798                            case 73:
1799                            case 74:
1800                            case 75:
1801                            case 76:
1802                            case 77:
1803                            case 78:
1804                            case 79:
1805                            case 80:
1806                                {
1807                                alt20=1;
1808                                }
1809                                break;
1810                            case FORCED_LINEBREAK:
1811                                {
1812                                alt20=1;
1813                                }
1814                                break;
1815                            case ESCAPE:
1816                                {
1817                                alt20=1;
1818                                }
1819                                break;
1820                            case LINK_OPEN:
1821                                {
1822                                alt20=1;
1823                                }
1824                                break;
1825                            case IMAGE_OPEN:
1826                                {
1827                                alt20=1;
1828                                }
1829                                break;
1830                            case EXTENSION:
1831                                {
1832                                alt20=1;
1833                                }
1834                                break;
1835                            case NOWIKI_OPEN:
1836                                {
1837                                alt20=1;
1838                                }
1839                                break;
1840    
1841                            }
1842    
1843                            switch (alt20) {
1844                            case 1 :
1845                                // Creole10.g:228:20: p= text_italcontentpart
1846                                {
1847                                pushFollow(FOLLOW_text_italcontentpart_in_text_italcontent585);
1848                                p=text_italcontentpart();
1849                                _fsp--;
1850                                if (failed) return text;
1851                                if ( backtracking==0 ) {
1852                                   text.add(p); 
1853                                }
1854    
1855                                }
1856                                break;
1857    
1858                            default :
1859                                break loop20;
1860                            }
1861                        } while (true);
1862    
1863    
1864                        }
1865                        break;
1866                    case 2 :
1867                        // Creole10.g:229:4: EOF
1868                        {
1869                        match(input,EOF,FOLLOW_EOF_in_text_italcontent596); if (failed) return text;
1870    
1871                        }
1872                        break;
1873    
1874                }
1875            }
1876            catch (RecognitionException re) {
1877                reportError(re);
1878                recover(input,re);
1879            }
1880            finally {
1881            }
1882            return text;
1883        }
1884        // $ANTLR end text_italcontent
1885    
1886    
1887        // $ANTLR start text_element
1888        // Creole10.g:231:1: text_element returns [ASTNode item = null] : ( onestar tu1= text_unformattedelement | tu2= text_unformattedelement onestar | tf= text_formattedelement );
1889        public final ASTNode text_element() throws RecognitionException {
1890            ASTNode item =  null;
1891    
1892            ASTNode tu1 = null;
1893    
1894            ASTNode tu2 = null;
1895    
1896            FormattedTextNode tf = null;
1897    
1898    
1899            try {
1900                // Creole10.g:232:2: ( onestar tu1= text_unformattedelement | tu2= text_unformattedelement onestar | tf= text_formattedelement )
1901                int alt22=3;
1902                switch ( input.LA(1) ) {
1903                case STAR:
1904                    {
1905                    int LA22_1 = input.LA(2);
1906    
1907                    if ( ( input.LA(2) != STAR ) ) {
1908                        alt22=1;
1909                    }
1910                    else if ( (true) ) {
1911                        alt22=3;
1912                    }
1913                    else {
1914                        if (backtracking>0) {failed=true; return item;}
1915                        NoViableAltException nvae =
1916                            new NoViableAltException("231:1: text_element returns [ASTNode item = null] : ( onestar tu1= text_unformattedelement | tu2= text_unformattedelement onestar | tf= text_formattedelement );", 22, 1, input);
1917    
1918                        throw nvae;
1919                    }
1920                    }
1921                    break;
1922                case FORCED_END_OF_LINE:
1923                case HEADING_SECTION:
1924                case HORIZONTAL_SECTION:
1925                case LIST_ITEM:
1926                case LIST_ITEM_PART:
1927                case NOWIKI_SECTION:
1928                case SCAPE_NODE:
1929                case TEXT_NODE:
1930                case UNORDERED_LIST:
1931                case UNFORMATTED_TEXT:
1932                case WIKI:
1933                case POUND:
1934                case EQUAL:
1935                case PIPE:
1936                case NOWIKI_BLOCK_CLOSE:
1937                case NOWIKI_CLOSE:
1938                case LINK_CLOSE:
1939                case IMAGE_CLOSE:
1940                case BLANKS:
1941                case DASH:
1942                case CR:
1943                case LF:
1944                case SPACE:
1945                case TABULATOR:
1946                case BRACE_CLOSE:
1947                case COLON_SLASH:
1948                case SLASH:
1949                case INSIGNIFICANT_CHAR:
1950                case 41:
1951                case 42:
1952                case 43:
1953                case 44:
1954                case 45:
1955                case 46:
1956                case 47:
1957                case 48:
1958                case 49:
1959                case 50:
1960                case 51:
1961                case 52:
1962                case 53:
1963                case 54:
1964                case 55:
1965                case 56:
1966                case 57:
1967                case 58:
1968                case 59:
1969                case 60:
1970                case 61:
1971                case 62:
1972                case 63:
1973                case 64:
1974                case 65:
1975                case 66:
1976                case 67:
1977                case 68:
1978                case 69:
1979                case 70:
1980                case 71:
1981                case 72:
1982                case 73:
1983                case 74:
1984                case 75:
1985                case 76:
1986                case 77:
1987                case 78:
1988                case 79:
1989                case 80:
1990                    {
1991                    alt22=1;
1992                    }
1993                    break;
1994                case FORCED_LINEBREAK:
1995                    {
1996                    alt22=1;
1997                    }
1998                    break;
1999                case ESCAPE:
2000                    {
2001                    alt22=1;
2002                    }
2003                    break;
2004                case LINK_OPEN:
2005                    {
2006                    alt22=1;
2007                    }
2008                    break;
2009                case IMAGE_OPEN:
2010                    {
2011                    alt22=1;
2012                    }
2013                    break;
2014                case EXTENSION:
2015                    {
2016                    alt22=1;
2017                    }
2018                    break;
2019                case NOWIKI_OPEN:
2020                    {
2021                    alt22=1;
2022                    }
2023                    break;
2024                case ITAL:
2025                    {
2026                    alt22=3;
2027                    }
2028                    break;
2029                default:
2030                    if (backtracking>0) {failed=true; return item;}
2031                    NoViableAltException nvae =
2032                        new NoViableAltException("231:1: text_element returns [ASTNode item = null] : ( onestar tu1= text_unformattedelement | tu2= text_unformattedelement onestar | tf= text_formattedelement );", 22, 0, input);
2033    
2034                    throw nvae;
2035                }
2036    
2037                switch (alt22) {
2038                    case 1 :
2039                        // Creole10.g:232:4: onestar tu1= text_unformattedelement
2040                        {
2041                        pushFollow(FOLLOW_onestar_in_text_element610);
2042                        onestar();
2043                        _fsp--;
2044                        if (failed) return item;
2045                        pushFollow(FOLLOW_text_unformattedelement_in_text_element617);
2046                        tu1=text_unformattedelement();
2047                        _fsp--;
2048                        if (failed) return item;
2049                        if ( backtracking==0 ) {
2050                           item = tu1; 
2051                        }
2052    
2053                        }
2054                        break;
2055                    case 2 :
2056                        // Creole10.g:233:4: tu2= text_unformattedelement onestar
2057                        {
2058                        pushFollow(FOLLOW_text_unformattedelement_in_text_element628);
2059                        tu2=text_unformattedelement();
2060                        _fsp--;
2061                        if (failed) return item;
2062                        pushFollow(FOLLOW_onestar_in_text_element631);
2063                        onestar();
2064                        _fsp--;
2065                        if (failed) return item;
2066                        if ( backtracking==0 ) {
2067                           item = tu2; 
2068                        }
2069    
2070                        }
2071                        break;
2072                    case 3 :
2073                        // Creole10.g:234:4: tf= text_formattedelement
2074                        {
2075                        pushFollow(FOLLOW_text_formattedelement_in_text_element642);
2076                        tf=text_formattedelement();
2077                        _fsp--;
2078                        if (failed) return item;
2079                        if ( backtracking==0 ) {
2080                           item = tf; 
2081                        }
2082    
2083                        }
2084                        break;
2085    
2086                }
2087            }
2088            catch (RecognitionException re) {
2089                reportError(re);
2090                recover(input,re);
2091            }
2092            finally {
2093            }
2094            return item;
2095        }
2096        // $ANTLR end text_element
2097    
2098    
2099        // $ANTLR start text_boldcontentpart
2100        // Creole10.g:237:1: text_boldcontentpart returns [FormattedTextNode node = null] : ( ital_markup t= text_bolditalcontent ( ital_markup )? | tf= text_formattedcontent );
2101        public final FormattedTextNode text_boldcontentpart() throws RecognitionException {
2102            FormattedTextNode node =  null;
2103    
2104            ASTNode t = null;
2105    
2106            CollectionNode tf = null;
2107    
2108    
2109            try {
2110                // Creole10.g:238:2: ( ital_markup t= text_bolditalcontent ( ital_markup )? | tf= text_formattedcontent )
2111                int alt24=2;
2112                int LA24_0 = input.LA(1);
2113    
2114                if ( (LA24_0==ITAL) ) {
2115                    alt24=1;
2116                }
2117                else if ( ((LA24_0>=FORCED_END_OF_LINE && LA24_0<=WIKI)||(LA24_0>=POUND && LA24_0<=PIPE)||(LA24_0>=LINK_OPEN && LA24_0<=80)) ) {
2118                    alt24=2;
2119                }
2120                else {
2121                    if (backtracking>0) {failed=true; return node;}
2122                    NoViableAltException nvae =
2123                        new NoViableAltException("237:1: text_boldcontentpart returns [FormattedTextNode node = null] : ( ital_markup t= text_bolditalcontent ( ital_markup )? | tf= text_formattedcontent );", 24, 0, input);
2124    
2125                    throw nvae;
2126                }
2127                switch (alt24) {
2128                    case 1 :
2129                        // Creole10.g:238:4: ital_markup t= text_bolditalcontent ( ital_markup )?
2130                        {
2131                        pushFollow(FOLLOW_ital_markup_in_text_boldcontentpart659);
2132                        ital_markup();
2133                        _fsp--;
2134                        if (failed) return node;
2135                        pushFollow(FOLLOW_text_bolditalcontent_in_text_boldcontentpart666);
2136                        t=text_bolditalcontent();
2137                        _fsp--;
2138                        if (failed) return node;
2139                        if ( backtracking==0 ) {
2140                          node = new ItalicTextNode(t); 
2141                        }
2142                        // Creole10.g:238:84: ( ital_markup )?
2143                        int alt23=2;
2144                        int LA23_0 = input.LA(1);
2145    
2146                        if ( (LA23_0==ITAL) ) {
2147                            alt23=1;
2148                        }
2149                        switch (alt23) {
2150                            case 1 :
2151                                // Creole10.g:238:86: ital_markup
2152                                {
2153                                pushFollow(FOLLOW_ital_markup_in_text_boldcontentpart673);
2154                                ital_markup();
2155                                _fsp--;
2156                                if (failed) return node;
2157    
2158                                }
2159                                break;
2160    
2161                        }
2162    
2163    
2164                        }
2165                        break;
2166                    case 2 :
2167                        // Creole10.g:239:4: tf= text_formattedcontent
2168                        {
2169                        pushFollow(FOLLOW_text_formattedcontent_in_text_boldcontentpart685);
2170                        tf=text_formattedcontent();
2171                        _fsp--;
2172                        if (failed) return node;
2173                        if ( backtracking==0 ) {
2174                          node = new FormattedTextNode(tf); 
2175                        }
2176    
2177                        }
2178                        break;
2179    
2180                }
2181            }
2182            catch (RecognitionException re) {
2183                reportError(re);
2184                recover(input,re);
2185            }
2186            finally {
2187            }
2188            return node;
2189        }
2190        // $ANTLR end text_boldcontentpart
2191    
2192    
2193        // $ANTLR start text_italcontentpart
2194        // Creole10.g:241:1: text_italcontentpart returns [FormattedTextNode node = null] : ( bold_markup t= text_bolditalcontent ( bold_markup )? | tf= text_formattedcontent );
2195        public final FormattedTextNode text_italcontentpart() throws RecognitionException {
2196            FormattedTextNode node =  null;
2197    
2198            ASTNode t = null;
2199    
2200            CollectionNode tf = null;
2201    
2202    
2203            try {
2204                // Creole10.g:242:2: ( bold_markup t= text_bolditalcontent ( bold_markup )? | tf= text_formattedcontent )
2205                int alt26=2;
2206                int LA26_0 = input.LA(1);
2207    
2208                if ( (LA26_0==STAR) ) {
2209                    int LA26_1 = input.LA(2);
2210    
2211                    if ( (LA26_1==STAR) ) {
2212                        alt26=1;
2213                    }
2214                    else if ( ((LA26_1>=FORCED_END_OF_LINE && LA26_1<=WIKI)||LA26_1==POUND||(LA26_1>=EQUAL && LA26_1<=PIPE)||(LA26_1>=LINK_OPEN && LA26_1<=80)) ) {
2215                        alt26=2;
2216                    }
2217                    else {
2218                        if (backtracking>0) {failed=true; return node;}
2219                        NoViableAltException nvae =
2220                            new NoViableAltException("241:1: text_italcontentpart returns [FormattedTextNode node = null] : ( bold_markup t= text_bolditalcontent ( bold_markup )? | tf= text_formattedcontent );", 26, 1, input);
2221    
2222                        throw nvae;
2223                    }
2224                }
2225                else if ( ((LA26_0>=FORCED_END_OF_LINE && LA26_0<=WIKI)||LA26_0==POUND||(LA26_0>=EQUAL && LA26_0<=PIPE)||(LA26_0>=LINK_OPEN && LA26_0<=80)) ) {
2226                    alt26=2;
2227                }
2228                else {
2229                    if (backtracking>0) {failed=true; return node;}
2230                    NoViableAltException nvae =
2231                        new NoViableAltException("241:1: text_italcontentpart returns [FormattedTextNode node = null] : ( bold_markup t= text_bolditalcontent ( bold_markup )? | tf= text_formattedcontent );", 26, 0, input);
2232    
2233                    throw nvae;
2234                }
2235                switch (alt26) {
2236                    case 1 :
2237                        // Creole10.g:242:4: bold_markup t= text_bolditalcontent ( bold_markup )?
2238                        {
2239                        pushFollow(FOLLOW_bold_markup_in_text_italcontentpart701);
2240                        bold_markup();
2241                        _fsp--;
2242                        if (failed) return node;
2243                        pushFollow(FOLLOW_text_bolditalcontent_in_text_italcontentpart708);
2244                        t=text_bolditalcontent();
2245                        _fsp--;
2246                        if (failed) return node;
2247                        if ( backtracking==0 ) {
2248                           node = new BoldTextNode(t); 
2249                        }
2250                        // Creole10.g:242:82: ( bold_markup )?
2251                        int alt25=2;
2252                        int LA25_0 = input.LA(1);
2253    
2254                        if ( (LA25_0==STAR) ) {
2255                            int LA25_1 = input.LA(2);
2256    
2257                            if ( (LA25_1==STAR) ) {
2258                                alt25=1;
2259                            }
2260                        }
2261                        switch (alt25) {
2262                            case 1 :
2263                                // Creole10.g:242:84: bold_markup
2264                                {
2265                                pushFollow(FOLLOW_bold_markup_in_text_italcontentpart714);
2266                                bold_markup();
2267                                _fsp--;
2268                                if (failed) return node;
2269    
2270                                }
2271                                break;
2272    
2273                        }
2274    
2275    
2276                        }
2277                        break;
2278                    case 2 :
2279                        // Creole10.g:243:4: tf= text_formattedcontent
2280                        {
2281                        pushFollow(FOLLOW_text_formattedcontent_in_text_italcontentpart725);
2282                        tf=text_formattedcontent();
2283                        _fsp--;
2284                        if (failed) return node;
2285                        if ( backtracking==0 ) {
2286                          node = new FormattedTextNode(tf); 
2287                        }
2288    
2289                        }
2290                        break;
2291    
2292                }
2293            }
2294            catch (RecognitionException re) {
2295                reportError(re);
2296                recover(input,re);
2297            }
2298            finally {
2299            }
2300            return node;
2301        }
2302        // $ANTLR end text_italcontentpart
2303    
2304    
2305        // $ANTLR start text_bolditalcontent
2306        // Creole10.g:245:1: text_bolditalcontent returns [ASTNode items = null] : ( ( NEWLINE )? (tf= text_formattedcontent )? | EOF );
2307        public final ASTNode text_bolditalcontent() throws RecognitionException {
2308            ASTNode items =  null;
2309    
2310            CollectionNode tf = null;
2311    
2312    
2313            try {
2314                // Creole10.g:246:2: ( ( NEWLINE )? (tf= text_formattedcontent )? | EOF )
2315                int alt29=2;
2316                int LA29_0 = input.LA(1);
2317    
2318                if ( ((LA29_0>=FORCED_END_OF_LINE && LA29_0<=80)) ) {
2319                    alt29=1;
2320                }
2321                else if ( (LA29_0==EOF) ) {
2322                    alt29=1;
2323                }
2324                else {
2325                    if (backtracking>0) {failed=true; return items;}
2326                    NoViableAltException nvae =
2327                        new NoViableAltException("245:1: text_bolditalcontent returns [ASTNode items = null] : ( ( NEWLINE )? (tf= text_formattedcontent )? | EOF );", 29, 0, input);
2328    
2329                    throw nvae;
2330                }
2331                switch (alt29) {
2332                    case 1 :
2333                        // Creole10.g:246:4: ( NEWLINE )? (tf= text_formattedcontent )?
2334                        {
2335                        // Creole10.g:246:4: ( NEWLINE )?
2336                        int alt27=2;
2337                        int LA27_0 = input.LA(1);
2338    
2339                        if ( (LA27_0==NEWLINE) ) {
2340                            alt27=1;
2341                        }
2342                        switch (alt27) {
2343                            case 1 :
2344                                // Creole10.g:246:6: NEWLINE
2345                                {
2346                                match(input,NEWLINE,FOLLOW_NEWLINE_in_text_bolditalcontent743); if (failed) return items;
2347    
2348                                }
2349                                break;
2350    
2351                        }
2352    
2353                        // Creole10.g:246:18: (tf= text_formattedcontent )?
2354                        int alt28=2;
2355                        switch ( input.LA(1) ) {
2356                            case STAR:
2357                                {
2358                                int LA28_1 = input.LA(2);
2359    
2360                                if ( ( input.LA(2) != STAR ) ) {
2361                                    alt28=1;
2362                                }
2363                                }
2364                                break;
2365                            case FORCED_END_OF_LINE:
2366                            case HEADING_SECTION:
2367                            case HORIZONTAL_SECTION:
2368                            case LIST_ITEM:
2369                            case LIST_ITEM_PART:
2370                            case NOWIKI_SECTION:
2371                            case SCAPE_NODE:
2372                            case TEXT_NODE:
2373                            case UNORDERED_LIST:
2374                            case UNFORMATTED_TEXT:
2375                            case WIKI:
2376                            case POUND:
2377                            case EQUAL:
2378                            case PIPE:
2379                            case NOWIKI_BLOCK_CLOSE:
2380                            case NOWIKI_CLOSE:
2381                            case LINK_CLOSE:
2382                            case IMAGE_CLOSE:
2383                            case BLANKS:
2384                            case DASH:
2385                            case CR:
2386                            case LF:
2387                            case SPACE:
2388                            case TABULATOR:
2389                            case BRACE_CLOSE:
2390                            case COLON_SLASH:
2391                            case SLASH:
2392                            case INSIGNIFICANT_CHAR:
2393                            case 41:
2394                            case 42:
2395                            case 43:
2396                            case 44:
2397                            case 45:
2398                            case 46:
2399                            case 47:
2400                            case 48:
2401                            case 49:
2402                            case 50:
2403                            case 51:
2404                            case 52:
2405                            case 53:
2406                            case 54:
2407                            case 55:
2408                            case 56:
2409                            case 57:
2410                            case 58:
2411                            case 59:
2412                            case 60:
2413                            case 61:
2414                            case 62:
2415                            case 63:
2416                            case 64:
2417                            case 65:
2418                            case 66:
2419                            case 67:
2420                            case 68:
2421                            case 69:
2422                            case 70:
2423                            case 71:
2424                            case 72:
2425                            case 73:
2426                            case 74:
2427                            case 75:
2428                            case 76:
2429                            case 77:
2430                            case 78:
2431                            case 79:
2432                            case 80:
2433                                {
2434                                alt28=1;
2435                                }
2436                                break;
2437                            case FORCED_LINEBREAK:
2438                                {
2439                                alt28=1;
2440                                }
2441                                break;
2442                            case ESCAPE:
2443                                {
2444                                alt28=1;
2445                                }
2446                                break;
2447                            case LINK_OPEN:
2448                                {
2449                                alt28=1;
2450                                }
2451                                break;
2452                            case IMAGE_OPEN:
2453                                {
2454                                alt28=1;
2455                                }
2456                                break;
2457                            case EXTENSION:
2458                                {
2459                                alt28=1;
2460                                }
2461                                break;
2462                            case NOWIKI_OPEN:
2463                                {
2464                                alt28=1;
2465                                }
2466                                break;
2467                        }
2468    
2469                        switch (alt28) {
2470                            case 1 :
2471                                // Creole10.g:246:20: tf= text_formattedcontent
2472                                {
2473                                pushFollow(FOLLOW_text_formattedcontent_in_text_bolditalcontent754);
2474                                tf=text_formattedcontent();
2475                                _fsp--;
2476                                if (failed) return items;
2477                                if ( backtracking==0 ) {
2478                                  items = tf; 
2479                                }
2480    
2481                                }
2482                                break;
2483    
2484                        }
2485    
2486    
2487                        }
2488                        break;
2489                    case 2 :
2490                        // Creole10.g:247:4: EOF
2491                        {
2492                        match(input,EOF,FOLLOW_EOF_in_text_bolditalcontent764); if (failed) return items;
2493    
2494                        }
2495                        break;
2496    
2497                }
2498            }
2499            catch (RecognitionException re) {
2500                reportError(re);
2501                recover(input,re);
2502            }
2503            finally {
2504            }
2505            return items;
2506        }
2507        // $ANTLR end text_bolditalcontent
2508    
2509    
2510        // $ANTLR start text_formattedcontent
2511        // Creole10.g:249:1: text_formattedcontent returns [CollectionNode items = new CollectionNode ()] : onestar (t= text_unformattedelement onestar ( text_linebreak )? )+ ;
2512        public final CollectionNode text_formattedcontent() throws RecognitionException {
2513            CollectionNode items =  new CollectionNode ();
2514    
2515            ASTNode t = null;
2516    
2517    
2518            try {
2519                // Creole10.g:250:2: ( onestar (t= text_unformattedelement onestar ( text_linebreak )? )+ )
2520                // Creole10.g:250:4: onestar (t= text_unformattedelement onestar ( text_linebreak )? )+
2521                {
2522                pushFollow(FOLLOW_onestar_in_text_formattedcontent778);
2523                onestar();
2524                _fsp--;
2525                if (failed) return items;
2526                // Creole10.g:250:13: (t= text_unformattedelement onestar ( text_linebreak )? )+
2527                int cnt31=0;
2528                loop31:
2529                do {
2530                    int alt31=2;
2531                    switch ( input.LA(1) ) {
2532                    case FORCED_END_OF_LINE:
2533                    case HEADING_SECTION:
2534                    case HORIZONTAL_SECTION:
2535                    case LIST_ITEM:
2536                    case LIST_ITEM_PART:
2537                    case NOWIKI_SECTION:
2538                    case SCAPE_NODE:
2539                    case TEXT_NODE:
2540                    case UNORDERED_LIST:
2541                    case UNFORMATTED_TEXT:
2542                    case WIKI:
2543                    case POUND:
2544                    case EQUAL:
2545                    case PIPE:
2546                    case NOWIKI_BLOCK_CLOSE:
2547                    case NOWIKI_CLOSE:
2548                    case LINK_CLOSE:
2549                    case IMAGE_CLOSE:
2550                    case BLANKS:
2551                    case DASH:
2552                    case CR:
2553                    case LF:
2554                    case SPACE:
2555                    case TABULATOR:
2556                    case BRACE_CLOSE:
2557                    case COLON_SLASH:
2558                    case SLASH:
2559                    case INSIGNIFICANT_CHAR:
2560                    case 41:
2561                    case 42:
2562                    case 43:
2563                    case 44:
2564                    case 45:
2565                    case 46:
2566                    case 47:
2567                    case 48:
2568                    case 49:
2569                    case 50:
2570                    case 51:
2571                    case 52:
2572                    case 53:
2573                    case 54:
2574                    case 55:
2575                    case 56:
2576                    case 57:
2577                    case 58:
2578                    case 59:
2579                    case 60:
2580                    case 61:
2581                    case 62:
2582                    case 63:
2583                    case 64:
2584                    case 65:
2585                    case 66:
2586                    case 67:
2587                    case 68:
2588                    case 69:
2589                    case 70:
2590                    case 71:
2591                    case 72:
2592                    case 73:
2593                    case 74:
2594                    case 75:
2595                    case 76:
2596                    case 77:
2597                    case 78:
2598                    case 79:
2599                    case 80:
2600                        {
2601                        alt31=1;
2602                        }
2603                        break;
2604                    case FORCED_LINEBREAK:
2605                        {
2606                        alt31=1;
2607                        }
2608                        break;
2609                    case ESCAPE:
2610                        {
2611                        alt31=1;
2612                        }
2613                        break;
2614                    case LINK_OPEN:
2615                        {
2616                        alt31=1;
2617                        }
2618                        break;
2619                    case IMAGE_OPEN:
2620                        {
2621                        alt31=1;
2622                        }
2623                        break;
2624                    case EXTENSION:
2625                        {
2626                        alt31=1;
2627                        }
2628                        break;
2629                    case NOWIKI_OPEN:
2630                        {
2631                        alt31=1;
2632                        }
2633                        break;
2634    
2635                    }
2636    
2637                    switch (alt31) {
2638                    case 1 :
2639                        // Creole10.g:250:15: t= text_unformattedelement onestar ( text_linebreak )?
2640                        {
2641                        pushFollow(FOLLOW_text_unformattedelement_in_text_formattedcontent787);
2642                        t=text_unformattedelement();
2643                        _fsp--;
2644                        if (failed) return items;
2645                        if ( backtracking==0 ) {
2646                          items.add(t); 
2647                        }
2648                        pushFollow(FOLLOW_onestar_in_text_formattedcontent792);
2649                        onestar();
2650                        _fsp--;
2651                        if (failed) return items;
2652                        // Creole10.g:250:81: ( text_linebreak )?
2653                        int alt30=2;
2654                        int LA30_0 = input.LA(1);
2655    
2656                        if ( (LA30_0==NEWLINE) ) {
2657                            int LA30_1 = input.LA(2);
2658    
2659                            if ( ( input.LA(2) != DASH && input.LA(2) != POUND &&
2660                                            input.LA(2) != EQUAL && input.LA(2) != NEWLINE ) ) {
2661                                alt30=1;
2662                            }
2663                        }
2664                        else if ( (LA30_0==EOF) ) {
2665                            int LA30_2 = input.LA(2);
2666    
2667                            if ( ( input.LA(2) != DASH && input.LA(2) != POUND &&
2668                                            input.LA(2) != EQUAL && input.LA(2) != NEWLINE ) ) {
2669                                alt30=1;
2670                            }
2671                        }
2672                        switch (alt30) {
2673                            case 1 :
2674                                // Creole10.g:250:83: text_linebreak
2675                                {
2676                                pushFollow(FOLLOW_text_linebreak_in_text_formattedcontent797);
2677                                text_linebreak();
2678                                _fsp--;
2679                                if (failed) return items;
2680    
2681                                }
2682                                break;
2683    
2684                        }
2685    
2686    
2687                        }
2688                        break;
2689    
2690                    default :
2691                        if ( cnt31 >= 1 ) break loop31;
2692                        if (backtracking>0) {failed=true; return items;}
2693                            EarlyExitException eee =
2694                                new EarlyExitException(31, input);
2695                            throw eee;
2696                    }
2697                    cnt31++;
2698                } while (true);
2699    
2700    
2701                }
2702    
2703            }
2704            catch (RecognitionException re) {
2705                reportError(re);
2706                recover(input,re);
2707            }
2708            finally {
2709            }
2710            return items;
2711        }
2712        // $ANTLR end text_formattedcontent
2713    
2714    
2715        // $ANTLR start text_linebreak
2716        // Creole10.g:252:1: text_linebreak : {...}? text_lineseparator ;
2717        public final void text_linebreak() throws RecognitionException {
2718            try {
2719                // Creole10.g:253:2: ({...}? text_lineseparator )
2720                // Creole10.g:253:4: {...}? text_lineseparator
2721                {
2722                if ( !( input.LA(2) != DASH && input.LA(2) != POUND &&
2723                            input.LA(2) != EQUAL && input.LA(2) != NEWLINE ) ) {
2724                    if (backtracking>0) {failed=true; return ;}
2725                    throw new FailedPredicateException(input, "text_linebreak", " input.LA(2) != DASH && input.LA(2) != POUND &&\n\t\tinput.LA(2) != EQUAL && input.LA(2) != NEWLINE ");
2726                }
2727                pushFollow(FOLLOW_text_lineseparator_in_text_linebreak817);
2728                text_lineseparator();
2729                _fsp--;
2730                if (failed) return ;
2731    
2732                }
2733    
2734            }
2735            catch (RecognitionException re) {
2736                reportError(re);
2737                recover(input,re);
2738            }
2739            finally {
2740            }
2741            return ;
2742        }
2743        // $ANTLR end text_linebreak
2744    
2745    
2746        // $ANTLR start text_inlineelement
2747        // Creole10.g:257:1: text_inlineelement returns [ASTNode element = null ] : (tf= text_first_inlineelement | nwi= nowiki_inline );
2748        public final ASTNode text_inlineelement() throws RecognitionException {
2749            ASTNode element =  null;
2750    
2751            ASTNode tf = null;
2752    
2753            NoWikiSectionNode nwi = null;
2754    
2755    
2756            try {
2757                // Creole10.g:258:2: (tf= text_first_inlineelement | nwi= nowiki_inline )
2758                int alt32=2;
2759                int LA32_0 = input.LA(1);
2760    
2761                if ( ((LA32_0>=LINK_OPEN && LA32_0<=IMAGE_OPEN)||LA32_0==EXTENSION) ) {
2762                    alt32=1;
2763                }
2764                else if ( (LA32_0==NOWIKI_OPEN) ) {
2765                    alt32=2;
2766                }
2767                else {
2768                    if (backtracking>0) {failed=true; return element;}
2769                    NoViableAltException nvae =
2770                        new NoViableAltException("257:1: text_inlineelement returns [ASTNode element = null ] : (tf= text_first_inlineelement | nwi= nowiki_inline );", 32, 0, input);
2771    
2772                    throw nvae;
2773                }
2774                switch (alt32) {
2775                    case 1 :
2776                        // Creole10.g:258:4: tf= text_first_inlineelement
2777                        {
2778                        pushFollow(FOLLOW_text_first_inlineelement_in_text_inlineelement835);
2779                        tf=text_first_inlineelement();
2780                        _fsp--;
2781                        if (failed) return element;
2782                        if ( backtracking==0 ) {
2783                          element = tf; 
2784                        }
2785    
2786                        }
2787                        break;
2788                    case 2 :
2789                        // Creole10.g:259:4: nwi= nowiki_inline
2790                        {
2791                        pushFollow(FOLLOW_nowiki_inline_in_text_inlineelement846);
2792                        nwi=nowiki_inline();
2793                        _fsp--;
2794                        if (failed) return element;
2795                        if ( backtracking==0 ) {
2796                          element = nwi; 
2797                        }
2798    
2799                        }
2800                        break;
2801    
2802                }
2803            }
2804            catch (RecognitionException re) {
2805                reportError(re);
2806                recover(input,re);
2807            }
2808            finally {
2809            }
2810            return element;
2811        }
2812        // $ANTLR end text_inlineelement
2813    
2814    
2815        // $ANTLR start text_first_inlineelement
2816        // Creole10.g:261:1: text_first_inlineelement returns [ASTNode element = null] : (l= link | i= image | e= extension );
2817        public final ASTNode text_first_inlineelement() throws RecognitionException {
2818            ASTNode element =  null;
2819    
2820            LinkNode l = null;
2821    
2822            ImageNode i = null;
2823    
2824            ASTNode e = null;
2825    
2826    
2827            try {
2828                // Creole10.g:262:2: (l= link | i= image | e= extension )
2829                int alt33=3;
2830                switch ( input.LA(1) ) {
2831                case LINK_OPEN:
2832                    {
2833                    alt33=1;
2834                    }
2835                    break;
2836                case IMAGE_OPEN:
2837                    {
2838                    alt33=2;
2839                    }
2840                    break;
2841                case EXTENSION:
2842                    {
2843                    alt33=3;
2844                    }
2845                    break;
2846                default:
2847                    if (backtracking>0) {failed=true; return element;}
2848                    NoViableAltException nvae =
2849                        new NoViableAltException("261:1: text_first_inlineelement returns [ASTNode element = null] : (l= link | i= image | e= extension );", 33, 0, input);
2850    
2851                    throw nvae;
2852                }
2853    
2854                switch (alt33) {
2855                    case 1 :
2856                        // Creole10.g:263:3: l= link
2857                        {
2858                        pushFollow(FOLLOW_link_in_text_first_inlineelement867);
2859                        l=link();
2860                        _fsp--;
2861                        if (failed) return element;
2862                        if ( backtracking==0 ) {
2863                          element = l;
2864                        }
2865    
2866                        }
2867                        break;
2868                    case 2 :
2869                        // Creole10.g:264:4: i= image
2870                        {
2871                        pushFollow(FOLLOW_image_in_text_first_inlineelement878);
2872                        i=image();
2873                        _fsp--;
2874                        if (failed) return element;
2875                        if ( backtracking==0 ) {
2876                          element = i;
2877                        }
2878    
2879                        }
2880                        break;
2881                    case 3 :
2882                        // Creole10.g:265:4: e= extension
2883                        {
2884                        pushFollow(FOLLOW_extension_in_text_first_inlineelement888);
2885                        e=extension();
2886                        _fsp--;
2887                        if (failed) return element;
2888                        if ( backtracking==0 ) {
2889                          element = e;
2890                        }
2891    
2892                        }
2893                        break;
2894    
2895                }
2896            }
2897            catch (RecognitionException re) {
2898                reportError(re);
2899                recover(input,re);
2900            }
2901            finally {
2902            }
2903            return element;
2904        }
2905        // $ANTLR end text_first_inlineelement
2906    
2907    
2908        // $ANTLR start text_first_unformattedelement
2909        // Creole10.g:267:1: text_first_unformattedelement returns [ASTNode item = null] : (tfu= text_first_unformatted | tfi= text_first_inlineelement );
2910        public final ASTNode text_first_unformattedelement() throws RecognitionException {
2911            ASTNode item =  null;
2912    
2913            CollectionNode tfu = null;
2914    
2915            ASTNode tfi = null;
2916    
2917    
2918            try {
2919                // Creole10.g:268:2: (tfu= text_first_unformatted | tfi= text_first_inlineelement )
2920                int alt34=2;
2921                int LA34_0 = input.LA(1);
2922    
2923                if ( ((LA34_0>=FORCED_END_OF_LINE && LA34_0<=WIKI)||(LA34_0>=FORCED_LINEBREAK && LA34_0<=80)) ) {
2924                    alt34=1;
2925                }
2926                else if ( ((LA34_0>=LINK_OPEN && LA34_0<=IMAGE_OPEN)||LA34_0==EXTENSION) ) {
2927                    alt34=2;
2928                }
2929                else {
2930                    if (backtracking>0) {failed=true; return item;}
2931                    NoViableAltException nvae =
2932                        new NoViableAltException("267:1: text_first_unformattedelement returns [ASTNode item = null] : (tfu= text_first_unformatted | tfi= text_first_inlineelement );", 34, 0, input);
2933    
2934                    throw nvae;
2935                }
2936                switch (alt34) {
2937                    case 1 :
2938                        // Creole10.g:268:4: tfu= text_first_unformatted
2939                        {
2940                        pushFollow(FOLLOW_text_first_unformatted_in_text_first_unformattedelement908);
2941                        tfu=text_first_unformatted();
2942                        _fsp--;
2943                        if (failed) return item;
2944                        if ( backtracking==0 ) {
2945                          item = new UnformattedTextNode(tfu);
2946                        }
2947    
2948                        }
2949                        break;
2950                    case 2 :
2951                        // Creole10.g:269:4: tfi= text_first_inlineelement
2952                        {
2953                        pushFollow(FOLLOW_text_first_inlineelement_in_text_first_unformattedelement919);
2954                        tfi=text_first_inlineelement();
2955                        _fsp--;
2956                        if (failed) return item;
2957                        if ( backtracking==0 ) {
2958                           item = tfi; 
2959                        }
2960    
2961                        }
2962                        break;
2963    
2964                }
2965            }
2966            catch (RecognitionException re) {
2967                reportError(re);
2968                recover(input,re);
2969            }
2970            finally {
2971            }
2972            return item;
2973        }
2974        // $ANTLR end text_first_unformattedelement
2975    
2976    
2977        // $ANTLR start text_first_unformatted
2978        // Creole10.g:271:1: text_first_unformatted returns [CollectionNode items = new CollectionNode()] : (t= text_first_unformmatted_text | ( forced_linebreak | e= escaped )+ );
2979        public final CollectionNode text_first_unformatted() throws RecognitionException {
2980            CollectionNode items =  new CollectionNode();
2981    
2982            StringBundler t = null;
2983    
2984            ScapedNode e = null;
2985    
2986    
2987            try {
2988                // Creole10.g:272:2: (t= text_first_unformmatted_text | ( forced_linebreak | e= escaped )+ )
2989                int alt36=2;
2990                int LA36_0 = input.LA(1);
2991    
2992                if ( ((LA36_0>=FORCED_END_OF_LINE && LA36_0<=WIKI)||(LA36_0>=NOWIKI_BLOCK_CLOSE && LA36_0<=80)) ) {
2993                    alt36=1;
2994                }
2995                else if ( ((LA36_0>=FORCED_LINEBREAK && LA36_0<=ESCAPE)) ) {
2996                    alt36=2;
2997                }
2998                else {
2999                    if (backtracking>0) {failed=true; return items;}
3000                    NoViableAltException nvae =
3001                        new NoViableAltException("271:1: text_first_unformatted returns [CollectionNode items = new CollectionNode()] : (t= text_first_unformmatted_text | ( forced_linebreak | e= escaped )+ );", 36, 0, input);
3002    
3003                    throw nvae;
3004                }
3005                switch (alt36) {
3006                    case 1 :
3007                        // Creole10.g:272:6: t= text_first_unformmatted_text
3008                        {
3009                        pushFollow(FOLLOW_text_first_unformmatted_text_in_text_first_unformatted941);
3010                        t=text_first_unformmatted_text();
3011                        _fsp--;
3012                        if (failed) return items;
3013                        if ( backtracking==0 ) {
3014                          items.add(new UnformattedTextNode(t.toString()));
3015                        }
3016    
3017                        }
3018                        break;
3019                    case 2 :
3020                        // Creole10.g:273:5: ( forced_linebreak | e= escaped )+
3021                        {
3022                        // Creole10.g:273:5: ( forced_linebreak | e= escaped )+
3023                        int cnt35=0;
3024                        loop35:
3025                        do {
3026                            int alt35=3;
3027                            int LA35_0 = input.LA(1);
3028    
3029                            if ( (LA35_0==FORCED_LINEBREAK) ) {
3030                                alt35=1;
3031                            }
3032                            else if ( (LA35_0==ESCAPE) ) {
3033                                int LA35_3 = input.LA(2);
3034    
3035                                if ( ((LA35_3>=FORCED_END_OF_LINE && LA35_3<=80)) ) {
3036                                    alt35=2;
3037                                }
3038    
3039    
3040                            }
3041    
3042    
3043                            switch (alt35) {
3044                            case 1 :
3045                                // Creole10.g:273:6: forced_linebreak
3046                                {
3047                                pushFollow(FOLLOW_forced_linebreak_in_text_first_unformatted950);
3048                                forced_linebreak();
3049                                _fsp--;
3050                                if (failed) return items;
3051                                if ( backtracking==0 ) {
3052                                   items.add(new ForcedEndOfLineNode()); 
3053                                }
3054    
3055                                }
3056                                break;
3057                            case 2 :
3058                                // Creole10.g:274:5: e= escaped
3059                                {
3060                                pushFollow(FOLLOW_escaped_in_text_first_unformatted962);
3061                                e=escaped();
3062                                _fsp--;
3063                                if (failed) return items;
3064                                if ( backtracking==0 ) {
3065                                  items.add(e);
3066                                }
3067    
3068                                }
3069                                break;
3070    
3071                            default :
3072                                if ( cnt35 >= 1 ) break loop35;
3073                                if (backtracking>0) {failed=true; return items;}
3074                                    EarlyExitException eee =
3075                                        new EarlyExitException(35, input);
3076                                    throw eee;
3077                            }
3078                            cnt35++;
3079                        } while (true);
3080    
3081    
3082                        }
3083                        break;
3084    
3085                }
3086            }
3087            catch (RecognitionException re) {
3088                reportError(re);
3089                recover(input,re);
3090            }
3091            finally {
3092            }
3093            return items;
3094        }
3095        // $ANTLR end text_first_unformatted
3096    
3097    
3098        // $ANTLR start text_first_unformmatted_text
3099        // Creole10.g:277:1: text_first_unformmatted_text returns [StringBundler text = new StringBundler()] : (c=~ ( POUND | STAR | EQUAL | PIPE | ITAL | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+ ;
3100        public final StringBundler text_first_unformmatted_text() throws RecognitionException {
3101            StringBundler text =  new StringBundler();
3102    
3103            Token c=null;
3104    
3105            try {
3106                // Creole10.g:278:2: ( (c=~ ( POUND | STAR | EQUAL | PIPE | ITAL | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+ )
3107                // Creole10.g:279:3: (c=~ ( POUND | STAR | EQUAL | PIPE | ITAL | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+
3108                {
3109                // Creole10.g:279:3: (c=~ ( POUND | STAR | EQUAL | PIPE | ITAL | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+
3110                int cnt37=0;
3111                loop37:
3112                do {
3113                    int alt37=2;
3114                    int LA37_0 = input.LA(1);
3115    
3116                    if ( ((LA37_0>=FORCED_END_OF_LINE && LA37_0<=WIKI)||(LA37_0>=NOWIKI_BLOCK_CLOSE && LA37_0<=80)) ) {
3117                        alt37=1;
3118                    }
3119    
3120    
3121                    switch (alt37) {
3122                    case 1 :
3123                        // Creole10.g:279:4: c=~ ( POUND | STAR | EQUAL | PIPE | ITAL | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF )
3124                        {
3125                        c=(Token)input.LT(1);
3126                        if ( (input.LA(1)>=FORCED_END_OF_LINE && input.LA(1)<=WIKI)||(input.LA(1)>=NOWIKI_BLOCK_CLOSE && input.LA(1)<=80) ) {
3127                            input.consume();
3128                            errorRecovery=false;failed=false;
3129                        }
3130                        else {
3131                            if (backtracking>0) {failed=true; return text;}
3132                            MismatchedSetException mse =
3133                                new MismatchedSetException(null,input);
3134                            recoverFromMismatchedSet(input,mse,FOLLOW_set_in_text_first_unformmatted_text990);    throw mse;
3135                        }
3136    
3137                        if ( backtracking==0 ) {
3138                          text.append(c.getText()); 
3139                        }
3140    
3141                        }
3142                        break;
3143    
3144                    default :
3145                        if ( cnt37 >= 1 ) break loop37;
3146                        if (backtracking>0) {failed=true; return text;}
3147                            EarlyExitException eee =
3148                                new EarlyExitException(37, input);
3149                            throw eee;
3150                    }
3151                    cnt37++;
3152                } while (true);
3153    
3154    
3155                }
3156    
3157            }
3158            catch (RecognitionException re) {
3159                reportError(re);
3160                recover(input,re);
3161            }
3162            finally {
3163            }
3164            return text;
3165        }
3166        // $ANTLR end text_first_unformmatted_text
3167    
3168    
3169        // $ANTLR start text_unformattedelement
3170        // Creole10.g:293:1: text_unformattedelement returns [ASTNode contents = null] : (text= text_unformatted | ti= text_inlineelement );
3171        public final ASTNode text_unformattedelement() throws RecognitionException {
3172            ASTNode contents =  null;
3173    
3174            CollectionNode text = null;
3175    
3176            ASTNode ti = null;
3177    
3178    
3179            try {
3180                // Creole10.g:294:2: (text= text_unformatted | ti= text_inlineelement )
3181                int alt38=2;
3182                int LA38_0 = input.LA(1);
3183    
3184                if ( ((LA38_0>=FORCED_END_OF_LINE && LA38_0<=WIKI)||LA38_0==POUND||(LA38_0>=EQUAL && LA38_0<=PIPE)||(LA38_0>=FORCED_LINEBREAK && LA38_0<=80)) ) {
3185                    alt38=1;
3186                }
3187                else if ( ((LA38_0>=LINK_OPEN && LA38_0<=EXTENSION)) ) {
3188                    alt38=2;
3189                }
3190                else {
3191                    if (backtracking>0) {failed=true; return contents;}
3192                    NoViableAltException nvae =
3193                        new NoViableAltException("293:1: text_unformattedelement returns [ASTNode contents = null] : (text= text_unformatted | ti= text_inlineelement );", 38, 0, input);
3194    
3195                    throw nvae;
3196                }
3197                switch (alt38) {
3198                    case 1 :
3199                        // Creole10.g:294:4: text= text_unformatted
3200                        {
3201                        pushFollow(FOLLOW_text_unformatted_in_text_unformattedelement1104);
3202                        text=text_unformatted();
3203                        _fsp--;
3204                        if (failed) return contents;
3205                        if ( backtracking==0 ) {
3206                           contents = text; 
3207                        }
3208    
3209                        }
3210                        break;
3211                    case 2 :
3212                        // Creole10.g:295:4: ti= text_inlineelement
3213                        {
3214                        pushFollow(FOLLOW_text_inlineelement_in_text_unformattedelement1115);
3215                        ti=text_inlineelement();
3216                        _fsp--;
3217                        if (failed) return contents;
3218                        if ( backtracking==0 ) {
3219                           contents = ti; 
3220                        }
3221    
3222                        }
3223                        break;
3224    
3225                }
3226            }
3227            catch (RecognitionException re) {
3228                reportError(re);
3229                recover(input,re);
3230            }
3231            finally {
3232            }
3233            return contents;
3234        }
3235        // $ANTLR end text_unformattedelement
3236    
3237    
3238        // $ANTLR start text_unformatted
3239        // Creole10.g:298:1: text_unformatted returns [CollectionNode items = new CollectionNode()] : (contents= text_unformated_text | ( forced_linebreak | e= escaped )+ );
3240        public final CollectionNode text_unformatted() throws RecognitionException {
3241            CollectionNode items =  new CollectionNode();
3242    
3243            StringBundler contents = null;
3244    
3245            ScapedNode e = null;
3246    
3247    
3248            try {
3249                // Creole10.g:299:2: (contents= text_unformated_text | ( forced_linebreak | e= escaped )+ )
3250                int alt40=2;
3251                int LA40_0 = input.LA(1);
3252    
3253                if ( ((LA40_0>=FORCED_END_OF_LINE && LA40_0<=WIKI)||LA40_0==POUND||(LA40_0>=EQUAL && LA40_0<=PIPE)||(LA40_0>=NOWIKI_BLOCK_CLOSE && LA40_0<=80)) ) {
3254                    alt40=1;
3255                }
3256                else if ( ((LA40_0>=FORCED_LINEBREAK && LA40_0<=ESCAPE)) ) {
3257                    alt40=2;
3258                }
3259                else {
3260                    if (backtracking>0) {failed=true; return items;}
3261                    NoViableAltException nvae =
3262                        new NoViableAltException("298:1: text_unformatted returns [CollectionNode items = new CollectionNode()] : (contents= text_unformated_text | ( forced_linebreak | e= escaped )+ );", 40, 0, input);
3263    
3264                    throw nvae;
3265                }
3266                switch (alt40) {
3267                    case 1 :
3268                        // Creole10.g:299:5: contents= text_unformated_text
3269                        {
3270                        pushFollow(FOLLOW_text_unformated_text_in_text_unformatted1137);
3271                        contents=text_unformated_text();
3272                        _fsp--;
3273                        if (failed) return items;
3274                        if ( backtracking==0 ) {
3275                          items.add(new UnformattedTextNode(contents.toString())); 
3276                        }
3277    
3278                        }
3279                        break;
3280                    case 2 :
3281                        // Creole10.g:300:5: ( forced_linebreak | e= escaped )+
3282                        {
3283                        // Creole10.g:300:5: ( forced_linebreak | e= escaped )+
3284                        int cnt39=0;
3285                        loop39:
3286                        do {
3287                            int alt39=3;
3288                            int LA39_0 = input.LA(1);
3289    
3290                            if ( (LA39_0==FORCED_LINEBREAK) ) {
3291                                alt39=1;
3292                            }
3293                            else if ( (LA39_0==ESCAPE) ) {
3294                                alt39=2;
3295                            }
3296    
3297    
3298                            switch (alt39) {
3299                            case 1 :
3300                                // Creole10.g:300:6: forced_linebreak
3301                                {
3302                                pushFollow(FOLLOW_forced_linebreak_in_text_unformatted1146);
3303                                forced_linebreak();
3304                                _fsp--;
3305                                if (failed) return items;
3306                                if ( backtracking==0 ) {
3307                                   items.add(new ForcedEndOfLineNode()); 
3308                                }
3309    
3310                                }
3311                                break;
3312                            case 2 :
3313                                // Creole10.g:301:5: e= escaped
3314                                {
3315                                pushFollow(FOLLOW_escaped_in_text_unformatted1158);
3316                                e=escaped();
3317                                _fsp--;
3318                                if (failed) return items;
3319                                if ( backtracking==0 ) {
3320                                  items.add(e);
3321                                }
3322    
3323                                }
3324                                break;
3325    
3326                            default :
3327                                if ( cnt39 >= 1 ) break loop39;
3328                                if (backtracking>0) {failed=true; return items;}
3329                                    EarlyExitException eee =
3330                                        new EarlyExitException(39, input);
3331                                    throw eee;
3332                            }
3333                            cnt39++;
3334                        } while (true);
3335    
3336    
3337                        }
3338                        break;
3339    
3340                }
3341            }
3342            catch (RecognitionException re) {
3343                reportError(re);
3344                recover(input,re);
3345            }
3346            finally {
3347            }
3348            return items;
3349        }
3350        // $ANTLR end text_unformatted
3351    
3352    
3353        // $ANTLR start text_unformated_text
3354        // Creole10.g:304:1: text_unformated_text returns [StringBundler text = new StringBundler()] : (c=~ ( ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+ ;
3355        public final StringBundler text_unformated_text() throws RecognitionException {
3356            StringBundler text =  new StringBundler();
3357    
3358            Token c=null;
3359    
3360            try {
3361                // Creole10.g:305:1: ( (c=~ ( ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+ )
3362                // Creole10.g:306:2: (c=~ ( ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+
3363                {
3364                // Creole10.g:306:2: (c=~ ( ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+
3365                int cnt41=0;
3366                loop41:
3367                do {
3368                    int alt41=2;
3369                    int LA41_0 = input.LA(1);
3370    
3371                    if ( ((LA41_0>=FORCED_END_OF_LINE && LA41_0<=WIKI)||LA41_0==POUND||(LA41_0>=EQUAL && LA41_0<=PIPE)||(LA41_0>=NOWIKI_BLOCK_CLOSE && LA41_0<=80)) ) {
3372                        alt41=1;
3373                    }
3374    
3375    
3376                    switch (alt41) {
3377                    case 1 :
3378                        // Creole10.g:306:3: c=~ ( ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF )
3379                        {
3380                        c=(Token)input.LT(1);
3381                        if ( (input.LA(1)>=FORCED_END_OF_LINE && input.LA(1)<=WIKI)||input.LA(1)==POUND||(input.LA(1)>=EQUAL && input.LA(1)<=PIPE)||(input.LA(1)>=NOWIKI_BLOCK_CLOSE && input.LA(1)<=80) ) {
3382                            input.consume();
3383                            errorRecovery=false;failed=false;
3384                        }
3385                        else {
3386                            if (backtracking>0) {failed=true; return text;}
3387                            MismatchedSetException mse =
3388                                new MismatchedSetException(null,input);
3389                            recoverFromMismatchedSet(input,mse,FOLLOW_set_in_text_unformated_text1183);    throw mse;
3390                        }
3391    
3392                        if ( backtracking==0 ) {
3393                           text.append(c.getText());
3394                        }
3395    
3396                        }
3397                        break;
3398    
3399                    default :
3400                        if ( cnt41 >= 1 ) break loop41;
3401                        if (backtracking>0) {failed=true; return text;}
3402                            EarlyExitException eee =
3403                                new EarlyExitException(41, input);
3404                            throw eee;
3405                    }
3406                    cnt41++;
3407                } while (true);
3408    
3409    
3410                }
3411    
3412            }
3413            catch (RecognitionException re) {
3414                reportError(re);
3415                recover(input,re);
3416            }
3417            finally {
3418            }
3419            return text;
3420        }
3421        // $ANTLR end text_unformated_text
3422    
3423        protected static class heading_scope {
3424            CollectionNode items;
3425            int nestedLevel;
3426            String text;
3427        }
3428        protected Stack heading_stack = new Stack();
3429    
3430    
3431        // $ANTLR start heading
3432        // Creole10.g:320:1: heading returns [ASTNode header] : heading_markup heading_content ( heading_markup )? ( blanks )? paragraph_separator ;
3433        public final ASTNode heading() throws RecognitionException {
3434            heading_stack.push(new heading_scope());
3435            ASTNode header = null;
3436    
3437    
3438                            ((heading_scope)heading_stack.peek()).items = new CollectionNode();
3439                            ((heading_scope)heading_stack.peek()).text = new String();
3440                    
3441            try {
3442                // Creole10.g:330:2: ( heading_markup heading_content ( heading_markup )? ( blanks )? paragraph_separator )
3443                // Creole10.g:330:4: heading_markup heading_content ( heading_markup )? ( blanks )? paragraph_separator
3444                {
3445                pushFollow(FOLLOW_heading_markup_in_heading1285);
3446                heading_markup();
3447                _fsp--;
3448                if (failed) return header;
3449                if ( backtracking==0 ) {
3450                  ((heading_scope)heading_stack.peek()).nestedLevel++;
3451                }
3452                pushFollow(FOLLOW_heading_content_in_heading1290);
3453                heading_content();
3454                _fsp--;
3455                if (failed) return header;
3456                if ( backtracking==0 ) {
3457                   header = new HeadingNode(((heading_scope)heading_stack.peek()).items,((heading_scope)heading_stack.peek()).nestedLevel); 
3458                }
3459                // Creole10.g:330:134: ( heading_markup )?
3460                int alt42=2;
3461                int LA42_0 = input.LA(1);
3462    
3463                if ( (LA42_0==EQUAL) ) {
3464                    alt42=1;
3465                }
3466                switch (alt42) {
3467                    case 1 :
3468                        // Creole10.g:330:136: heading_markup
3469                        {
3470                        pushFollow(FOLLOW_heading_markup_in_heading1297);
3471                        heading_markup();
3472                        _fsp--;
3473                        if (failed) return header;
3474    
3475                        }
3476                        break;
3477    
3478                }
3479    
3480                // Creole10.g:330:155: ( blanks )?
3481                int alt43=2;
3482                int LA43_0 = input.LA(1);
3483    
3484                if ( (LA43_0==BLANKS) ) {
3485                    alt43=1;
3486                }
3487                switch (alt43) {
3488                    case 1 :
3489                        // Creole10.g:330:157: blanks
3490                        {
3491                        pushFollow(FOLLOW_blanks_in_heading1305);
3492                        blanks();
3493                        _fsp--;
3494                        if (failed) return header;
3495    
3496                        }
3497                        break;
3498    
3499                }
3500    
3501                pushFollow(FOLLOW_paragraph_separator_in_heading1312);
3502                paragraph_separator();
3503                _fsp--;
3504                if (failed) return header;
3505    
3506                }
3507    
3508            }
3509            catch (RecognitionException re) {
3510                reportError(re);
3511                recover(input,re);
3512            }
3513            finally {
3514                heading_stack.pop();
3515            }
3516            return header;
3517        }
3518        // $ANTLR end heading
3519    
3520    
3521        // $ANTLR start heading_content
3522        // Creole10.g:333:1: heading_content : ( heading_markup heading_content ( heading_markup )? | ht= heading_text );
3523        public final void heading_content() throws RecognitionException {
3524            CollectionNode ht = null;
3525    
3526    
3527            try {
3528                // Creole10.g:334:2: ( heading_markup heading_content ( heading_markup )? | ht= heading_text )
3529                int alt45=2;
3530                int LA45_0 = input.LA(1);
3531    
3532                if ( (LA45_0==EQUAL) ) {
3533                    alt45=1;
3534                }
3535                else if ( (LA45_0==EOF||(LA45_0>=FORCED_END_OF_LINE && LA45_0<=STAR)||(LA45_0>=PIPE && LA45_0<=FORCED_LINEBREAK)||(LA45_0>=NOWIKI_BLOCK_CLOSE && LA45_0<=80)) ) {
3536                    alt45=2;
3537                }
3538                else {
3539                    if (backtracking>0) {failed=true; return ;}
3540                    NoViableAltException nvae =
3541                        new NoViableAltException("333:1: heading_content : ( heading_markup heading_content ( heading_markup )? | ht= heading_text );", 45, 0, input);
3542    
3543                    throw nvae;
3544                }
3545                switch (alt45) {
3546                    case 1 :
3547                        // Creole10.g:334:4: heading_markup heading_content ( heading_markup )?
3548                        {
3549                        pushFollow(FOLLOW_heading_markup_in_heading_content1322);
3550                        heading_markup();
3551                        _fsp--;
3552                        if (failed) return ;
3553                        if ( backtracking==0 ) {
3554                          ((heading_scope)heading_stack.peek()).nestedLevel++;
3555                        }
3556                        pushFollow(FOLLOW_heading_content_in_heading_content1327);
3557                        heading_content();
3558                        _fsp--;
3559                        if (failed) return ;
3560                        // Creole10.g:334:64: ( heading_markup )?
3561                        int alt44=2;
3562                        int LA44_0 = input.LA(1);
3563    
3564                        if ( (LA44_0==EQUAL) ) {
3565                            alt44=1;
3566                        }
3567                        switch (alt44) {
3568                            case 1 :
3569                                // Creole10.g:334:66: heading_markup
3570                                {
3571                                pushFollow(FOLLOW_heading_markup_in_heading_content1332);
3572                                heading_markup();
3573                                _fsp--;
3574                                if (failed) return ;
3575    
3576                                }
3577                                break;
3578    
3579                        }
3580    
3581    
3582                        }
3583                        break;
3584                    case 2 :
3585                        // Creole10.g:335:4: ht= heading_text
3586                        {
3587                        pushFollow(FOLLOW_heading_text_in_heading_content1344);
3588                        ht=heading_text();
3589                        _fsp--;
3590                        if (failed) return ;
3591                        if ( backtracking==0 ) {
3592                          ((heading_scope)heading_stack.peek()).items = ht;
3593                        }
3594    
3595                        }
3596                        break;
3597    
3598                }
3599            }
3600            catch (RecognitionException re) {
3601                reportError(re);
3602                recover(input,re);
3603            }
3604            finally {
3605            }
3606            return ;
3607        }
3608        // $ANTLR end heading_content
3609    
3610    
3611        // $ANTLR start heading_text
3612        // Creole10.g:338:1: heading_text returns [CollectionNode items = null] : te= heading_cellcontent ;
3613        public final CollectionNode heading_text() throws RecognitionException {
3614            CollectionNode items =  null;
3615    
3616            CollectionNode te = null;
3617    
3618    
3619            try {
3620                // Creole10.g:339:2: (te= heading_cellcontent )
3621                // Creole10.g:339:4: te= heading_cellcontent
3622                {
3623                pushFollow(FOLLOW_heading_cellcontent_in_heading_text1365);
3624                te=heading_cellcontent();
3625                _fsp--;
3626                if (failed) return items;
3627                if ( backtracking==0 ) {
3628                  items = te;
3629                }
3630    
3631                }
3632    
3633            }
3634            catch (RecognitionException re) {
3635                reportError(re);
3636                recover(input,re);
3637            }
3638            finally {
3639            }
3640            return items;
3641        }
3642        // $ANTLR end heading_text
3643    
3644    
3645        // $ANTLR start heading_cellcontent
3646        // Creole10.g:342:1: heading_cellcontent returns [CollectionNode items = new CollectionNode()] : onestar (tcp= heading_cellcontentpart onestar )* ;
3647        public final CollectionNode heading_cellcontent() throws RecognitionException {
3648            CollectionNode items =  new CollectionNode();
3649    
3650            ASTNode tcp = null;
3651    
3652    
3653            try {
3654                // Creole10.g:343:2: ( onestar (tcp= heading_cellcontentpart onestar )* )
3655                // Creole10.g:343:4: onestar (tcp= heading_cellcontentpart onestar )*
3656                {
3657                pushFollow(FOLLOW_onestar_in_heading_cellcontent1382);
3658                onestar();
3659                _fsp--;
3660                if (failed) return items;
3661                // Creole10.g:343:13: (tcp= heading_cellcontentpart onestar )*
3662                loop46:
3663                do {
3664                    int alt46=2;
3665                    int LA46_0 = input.LA(1);
3666    
3667                    if ( ((LA46_0>=FORCED_END_OF_LINE && LA46_0<=WIKI)||(LA46_0>=POUND && LA46_0<=STAR)||(LA46_0>=PIPE && LA46_0<=FORCED_LINEBREAK)||(LA46_0>=NOWIKI_BLOCK_CLOSE && LA46_0<=80)) ) {
3668                        alt46=1;
3669                    }
3670    
3671    
3672                    switch (alt46) {
3673                    case 1 :
3674                        // Creole10.g:343:15: tcp= heading_cellcontentpart onestar
3675                        {
3676                        pushFollow(FOLLOW_heading_cellcontentpart_in_heading_cellcontent1391);
3677                        tcp=heading_cellcontentpart();
3678                        _fsp--;
3679                        if (failed) return items;
3680                        if ( backtracking==0 ) {
3681    
3682    
3683                                                                            if (tcp != null) { // some AST Node could be NULL if bad CREOLE syntax is wrotten
3684                                                                                    items.add(tcp);
3685                                                                            }
3686    
3687                                                                            
3688                        }
3689                        pushFollow(FOLLOW_onestar_in_heading_cellcontent1402);
3690                        onestar();
3691                        _fsp--;
3692                        if (failed) return items;
3693    
3694                        }
3695                        break;
3696    
3697                    default :
3698                        break loop46;
3699                    }
3700                } while (true);
3701    
3702    
3703                }
3704    
3705            }
3706            catch (RecognitionException re) {
3707                reportError(re);
3708                recover(input,re);
3709            }
3710            finally {
3711            }
3712            return items;
3713        }
3714        // $ANTLR end heading_cellcontent
3715    
3716    
3717        // $ANTLR start heading_cellcontentpart
3718        // Creole10.g:352:1: heading_cellcontentpart returns [ASTNode node = null] : (tf= heading_formattedelement | tu= heading_unformattedelement );
3719        public final ASTNode heading_cellcontentpart() throws RecognitionException {
3720            ASTNode node =  null;
3721    
3722            ASTNode tf = null;
3723    
3724            ASTNode tu = null;
3725    
3726    
3727            try {
3728                // Creole10.g:353:2: (tf= heading_formattedelement | tu= heading_unformattedelement )
3729                int alt47=2;
3730                switch ( input.LA(1) ) {
3731                case ITAL:
3732                    {
3733                    alt47=1;
3734                    }
3735                    break;
3736                case STAR:
3737                    {
3738                    int LA47_2 = input.LA(2);
3739    
3740                    if ( (LA47_2==STAR) ) {
3741                        alt47=1;
3742                    }
3743                    else if ( (LA47_2==EOF||(LA47_2>=FORCED_END_OF_LINE && LA47_2<=POUND)||(LA47_2>=EQUAL && LA47_2<=FORCED_LINEBREAK)||(LA47_2>=NOWIKI_BLOCK_CLOSE && LA47_2<=80)) ) {
3744                        alt47=2;
3745                    }
3746                    else {
3747                        if (backtracking>0) {failed=true; return node;}
3748                        NoViableAltException nvae =
3749                            new NoViableAltException("352:1: heading_cellcontentpart returns [ASTNode node = null] : (tf= heading_formattedelement | tu= heading_unformattedelement );", 47, 2, input);
3750    
3751                        throw nvae;
3752                    }
3753                    }
3754                    break;
3755                case FORCED_END_OF_LINE:
3756                case HEADING_SECTION:
3757                case HORIZONTAL_SECTION:
3758                case LIST_ITEM:
3759                case LIST_ITEM_PART:
3760                case NOWIKI_SECTION:
3761                case SCAPE_NODE:
3762                case TEXT_NODE:
3763                case UNORDERED_LIST:
3764                case UNFORMATTED_TEXT:
3765                case WIKI:
3766                case POUND:
3767                case PIPE:
3768                case LINK_OPEN:
3769                case IMAGE_OPEN:
3770                case NOWIKI_OPEN:
3771                case EXTENSION:
3772                case FORCED_LINEBREAK:
3773                case NOWIKI_BLOCK_CLOSE:
3774                case NOWIKI_CLOSE:
3775                case LINK_CLOSE:
3776                case IMAGE_CLOSE:
3777                case BLANKS:
3778                case DASH:
3779                case CR:
3780                case LF:
3781                case SPACE:
3782                case TABULATOR:
3783                case BRACE_CLOSE:
3784                case COLON_SLASH:
3785                case SLASH:
3786                case INSIGNIFICANT_CHAR:
3787                case 41:
3788                case 42:
3789                case 43:
3790                case 44:
3791                case 45:
3792                case 46:
3793                case 47:
3794                case 48:
3795                case 49:
3796                case 50:
3797                case 51:
3798                case 52:
3799                case 53:
3800                case 54:
3801                case 55:
3802                case 56:
3803                case 57:
3804                case 58:
3805                case 59:
3806                case 60:
3807                case 61:
3808                case 62:
3809                case 63:
3810                case 64:
3811                case 65:
3812                case 66:
3813                case 67:
3814                case 68:
3815                case 69:
3816                case 70:
3817                case 71:
3818                case 72:
3819                case 73:
3820                case 74:
3821                case 75:
3822                case 76:
3823                case 77:
3824                case 78:
3825                case 79:
3826                case 80:
3827                    {
3828                    alt47=2;
3829                    }
3830                    break;
3831                default:
3832                    if (backtracking>0) {failed=true; return node;}
3833                    NoViableAltException nvae =
3834                        new NoViableAltException("352:1: heading_cellcontentpart returns [ASTNode node = null] : (tf= heading_formattedelement | tu= heading_unformattedelement );", 47, 0, input);
3835    
3836                    throw nvae;
3837                }
3838    
3839                switch (alt47) {
3840                    case 1 :
3841                        // Creole10.g:353:4: tf= heading_formattedelement
3842                        {
3843                        pushFollow(FOLLOW_heading_formattedelement_in_heading_cellcontentpart1423);
3844                        tf=heading_formattedelement();
3845                        _fsp--;
3846                        if (failed) return node;
3847                        if ( backtracking==0 ) {
3848                          node =tf;
3849                        }
3850    
3851                        }
3852                        break;
3853                    case 2 :
3854                        // Creole10.g:354:4: tu= heading_unformattedelement
3855                        {
3856                        pushFollow(FOLLOW_heading_unformattedelement_in_heading_cellcontentpart1434);
3857                        tu=heading_unformattedelement();
3858                        _fsp--;
3859                        if (failed) return node;
3860                        if ( backtracking==0 ) {
3861                          node =tu;
3862                        }
3863    
3864                        }
3865                        break;
3866    
3867                }
3868            }
3869            catch (RecognitionException re) {
3870                reportError(re);
3871                recover(input,re);
3872            }
3873            finally {
3874            }
3875            return node;
3876        }
3877        // $ANTLR end heading_cellcontentpart
3878    
3879    
3880        // $ANTLR start heading_formattedelement
3881        // Creole10.g:356:1: heading_formattedelement returns [ASTNode content = null] : ( ital_markup (tic= heading_italcontent )? ( ital_markup )? | bold_markup (tbc= heading_boldcontent )? ( bold_markup )? );
3882        public final ASTNode heading_formattedelement() throws RecognitionException {
3883            ASTNode content =  null;
3884    
3885            CollectionNode tic = null;
3886    
3887            CollectionNode tbc = null;
3888    
3889    
3890            try {
3891                // Creole10.g:357:2: ( ital_markup (tic= heading_italcontent )? ( ital_markup )? | bold_markup (tbc= heading_boldcontent )? ( bold_markup )? )
3892                int alt52=2;
3893                int LA52_0 = input.LA(1);
3894    
3895                if ( (LA52_0==ITAL) ) {
3896                    alt52=1;
3897                }
3898                else if ( (LA52_0==STAR) ) {
3899                    alt52=2;
3900                }
3901                else {
3902                    if (backtracking>0) {failed=true; return content;}
3903                    NoViableAltException nvae =
3904                        new NoViableAltException("356:1: heading_formattedelement returns [ASTNode content = null] : ( ital_markup (tic= heading_italcontent )? ( ital_markup )? | bold_markup (tbc= heading_boldcontent )? ( bold_markup )? );", 52, 0, input);
3905    
3906                    throw nvae;
3907                }
3908                switch (alt52) {
3909                    case 1 :
3910                        // Creole10.g:357:4: ital_markup (tic= heading_italcontent )? ( ital_markup )?
3911                        {
3912                        pushFollow(FOLLOW_ital_markup_in_heading_formattedelement1450);
3913                        ital_markup();
3914                        _fsp--;
3915                        if (failed) return content;
3916                        // Creole10.g:357:18: (tic= heading_italcontent )?
3917                        int alt48=2;
3918                        switch ( input.LA(1) ) {
3919                            case STAR:
3920                                {
3921                                alt48=1;
3922                                }
3923                                break;
3924                            case ITAL:
3925                                {
3926                                alt48=1;
3927                                }
3928                                break;
3929                            case LINK_OPEN:
3930                                {
3931                                alt48=1;
3932                                }
3933                                break;
3934                            case IMAGE_OPEN:
3935                                {
3936                                alt48=1;
3937                                }
3938                                break;
3939                            case NOWIKI_OPEN:
3940                                {
3941                                alt48=1;
3942                                }
3943                                break;
3944                            case EOF:
3945                                {
3946                                alt48=1;
3947                                }
3948                                break;
3949                            case BLANKS:
3950                                {
3951                                alt48=1;
3952                                }
3953                                break;
3954                            case FORCED_END_OF_LINE:
3955                            case HEADING_SECTION:
3956                            case HORIZONTAL_SECTION:
3957                            case LIST_ITEM:
3958                            case LIST_ITEM_PART:
3959                            case NOWIKI_SECTION:
3960                            case SCAPE_NODE:
3961                            case TEXT_NODE:
3962                            case UNORDERED_LIST:
3963                            case UNFORMATTED_TEXT:
3964                            case WIKI:
3965                            case POUND:
3966                            case PIPE:
3967                            case EXTENSION:
3968                            case FORCED_LINEBREAK:
3969                            case NOWIKI_BLOCK_CLOSE:
3970                            case NOWIKI_CLOSE:
3971                            case LINK_CLOSE:
3972                            case IMAGE_CLOSE:
3973                            case DASH:
3974                            case CR:
3975                            case LF:
3976                            case SPACE:
3977                            case TABULATOR:
3978                            case BRACE_CLOSE:
3979                            case COLON_SLASH:
3980                            case SLASH:
3981                            case INSIGNIFICANT_CHAR:
3982                            case 41:
3983                            case 42:
3984                            case 43:
3985                            case 44:
3986                            case 45:
3987                            case 46:
3988                            case 47:
3989                            case 48:
3990                            case 49:
3991                            case 50:
3992                            case 51:
3993                            case 52:
3994                            case 53:
3995                            case 54:
3996                            case 55:
3997                            case 56:
3998                            case 57:
3999                            case 58:
4000                            case 59:
4001                            case 60:
4002                            case 61:
4003                            case 62:
4004                            case 63:
4005                            case 64:
4006                            case 65:
4007                            case 66:
4008                            case 67:
4009                            case 68:
4010                            case 69:
4011                            case 70:
4012                            case 71:
4013                            case 72:
4014                            case 73:
4015                            case 74:
4016                            case 75:
4017                            case 76:
4018                            case 77:
4019                            case 78:
4020                            case 79:
4021                            case 80:
4022                                {
4023                                alt48=1;
4024                                }
4025                                break;
4026                        }
4027    
4028                        switch (alt48) {
4029                            case 1 :
4030                                // Creole10.g:357:20: tic= heading_italcontent
4031                                {
4032                                pushFollow(FOLLOW_heading_italcontent_in_heading_formattedelement1460);
4033                                tic=heading_italcontent();
4034                                _fsp--;
4035                                if (failed) return content;
4036                                if ( backtracking==0 ) {
4037                                   content = new ItalicTextNode(tic); 
4038                                }
4039    
4040                                }
4041                                break;
4042    
4043                        }
4044    
4045                        // Creole10.g:357:96: ( ital_markup )?
4046                        int alt49=2;
4047                        int LA49_0 = input.LA(1);
4048    
4049                        if ( (LA49_0==ITAL) ) {
4050                            alt49=1;
4051                        }
4052                        switch (alt49) {
4053                            case 1 :
4054                                // Creole10.g:357:98: ital_markup
4055                                {
4056                                pushFollow(FOLLOW_ital_markup_in_heading_formattedelement1469);
4057                                ital_markup();
4058                                _fsp--;
4059                                if (failed) return content;
4060    
4061                                }
4062                                break;
4063    
4064                        }
4065    
4066    
4067                        }
4068                        break;
4069                    case 2 :
4070                        // Creole10.g:358:4: bold_markup (tbc= heading_boldcontent )? ( bold_markup )?
4071                        {
4072                        pushFollow(FOLLOW_bold_markup_in_heading_formattedelement1477);
4073                        bold_markup();
4074                        _fsp--;
4075                        if (failed) return content;
4076                        // Creole10.g:358:16: (tbc= heading_boldcontent )?
4077                        int alt50=2;
4078                        switch ( input.LA(1) ) {
4079                            case STAR:
4080                                {
4081                                alt50=1;
4082                                }
4083                                break;
4084                            case ITAL:
4085                                {
4086                                alt50=1;
4087                                }
4088                                break;
4089                            case LINK_OPEN:
4090                                {
4091                                alt50=1;
4092                                }
4093                                break;
4094                            case IMAGE_OPEN:
4095                                {
4096                                alt50=1;
4097                                }
4098                                break;
4099                            case NOWIKI_OPEN:
4100                                {
4101                                alt50=1;
4102                                }
4103                                break;
4104                            case BLANKS:
4105                                {
4106                                alt50=1;
4107                                }
4108                                break;
4109                            case EOF:
4110                                {
4111                                alt50=1;
4112                                }
4113                                break;
4114                            case FORCED_END_OF_LINE:
4115                            case HEADING_SECTION:
4116                            case HORIZONTAL_SECTION:
4117                            case LIST_ITEM:
4118                            case LIST_ITEM_PART:
4119                            case NOWIKI_SECTION:
4120                            case SCAPE_NODE:
4121                            case TEXT_NODE:
4122                            case UNORDERED_LIST:
4123                            case UNFORMATTED_TEXT:
4124                            case WIKI:
4125                            case POUND:
4126                            case PIPE:
4127                            case EXTENSION:
4128                            case FORCED_LINEBREAK:
4129                            case NOWIKI_BLOCK_CLOSE:
4130                            case NOWIKI_CLOSE:
4131                            case LINK_CLOSE:
4132                            case IMAGE_CLOSE:
4133                            case DASH:
4134                            case CR:
4135                            case LF:
4136                            case SPACE:
4137                            case TABULATOR:
4138                            case BRACE_CLOSE:
4139                            case COLON_SLASH:
4140                            case SLASH:
4141                            case INSIGNIFICANT_CHAR:
4142                            case 41:
4143                            case 42:
4144                            case 43:
4145                            case 44:
4146                            case 45:
4147                            case 46:
4148                            case 47:
4149                            case 48:
4150                            case 49:
4151                            case 50:
4152                            case 51:
4153                            case 52:
4154                            case 53:
4155                            case 54:
4156                            case 55:
4157                            case 56:
4158                            case 57:
4159                            case 58:
4160                            case 59:
4161                            case 60:
4162                            case 61:
4163                            case 62:
4164                            case 63:
4165                            case 64:
4166                            case 65:
4167                            case 66:
4168                            case 67:
4169                            case 68:
4170                            case 69:
4171                            case 70:
4172                            case 71:
4173                            case 72:
4174                            case 73:
4175                            case 74:
4176                            case 75:
4177                            case 76:
4178                            case 77:
4179                            case 78:
4180                            case 79:
4181                            case 80:
4182                                {
4183                                alt50=1;
4184                                }
4185                                break;
4186                        }
4187    
4188                        switch (alt50) {
4189                            case 1 :
4190                                // Creole10.g:358:18: tbc= heading_boldcontent
4191                                {
4192                                pushFollow(FOLLOW_heading_boldcontent_in_heading_formattedelement1484);
4193                                tbc=heading_boldcontent();
4194                                _fsp--;
4195                                if (failed) return content;
4196                                if ( backtracking==0 ) {
4197                                  content = new BoldTextNode(tbc);
4198                                }
4199    
4200                                }
4201                                break;
4202    
4203                        }
4204    
4205                        // Creole10.g:358:90: ( bold_markup )?
4206                        int alt51=2;
4207                        int LA51_0 = input.LA(1);
4208    
4209                        if ( (LA51_0==STAR) ) {
4210                            int LA51_1 = input.LA(2);
4211    
4212                            if ( (LA51_1==STAR) ) {
4213                                alt51=1;
4214                            }
4215                        }
4216                        switch (alt51) {
4217                            case 1 :
4218                                // Creole10.g:358:92: bold_markup
4219                                {
4220                                pushFollow(FOLLOW_bold_markup_in_heading_formattedelement1494);
4221                                bold_markup();
4222                                _fsp--;
4223                                if (failed) return content;
4224    
4225                                }
4226                                break;
4227    
4228                        }
4229    
4230    
4231                        }
4232                        break;
4233    
4234                }
4235            }
4236            catch (RecognitionException re) {
4237                reportError(re);
4238                recover(input,re);
4239            }
4240            finally {
4241            }
4242            return content;
4243        }
4244        // $ANTLR end heading_formattedelement
4245    
4246    
4247        // $ANTLR start heading_boldcontent
4248        // Creole10.g:360:1: heading_boldcontent returns [CollectionNode items = new CollectionNode()] : ( onestar (tb= heading_boldcontentpart onestar )+ | EOF );
4249        public final CollectionNode heading_boldcontent() throws RecognitionException {
4250            CollectionNode items =  new CollectionNode();
4251    
4252            ASTNode tb = null;
4253    
4254    
4255            try {
4256                // Creole10.g:361:2: ( onestar (tb= heading_boldcontentpart onestar )+ | EOF )
4257                int alt54=2;
4258                int LA54_0 = input.LA(1);
4259    
4260                if ( ((LA54_0>=FORCED_END_OF_LINE && LA54_0<=WIKI)||(LA54_0>=POUND && LA54_0<=STAR)||(LA54_0>=PIPE && LA54_0<=FORCED_LINEBREAK)||(LA54_0>=NOWIKI_BLOCK_CLOSE && LA54_0<=80)) ) {
4261                    alt54=1;
4262                }
4263                else if ( (LA54_0==EOF) ) {
4264                    alt54=2;
4265                }
4266                else {
4267                    if (backtracking>0) {failed=true; return items;}
4268                    NoViableAltException nvae =
4269                        new NoViableAltException("360:1: heading_boldcontent returns [CollectionNode items = new CollectionNode()] : ( onestar (tb= heading_boldcontentpart onestar )+ | EOF );", 54, 0, input);
4270    
4271                    throw nvae;
4272                }
4273                switch (alt54) {
4274                    case 1 :
4275                        // Creole10.g:361:4: onestar (tb= heading_boldcontentpart onestar )+
4276                        {
4277                        pushFollow(FOLLOW_onestar_in_heading_boldcontent1511);
4278                        onestar();
4279                        _fsp--;
4280                        if (failed) return items;
4281                        // Creole10.g:361:13: (tb= heading_boldcontentpart onestar )+
4282                        int cnt53=0;
4283                        loop53:
4284                        do {
4285                            int alt53=2;
4286                            switch ( input.LA(1) ) {
4287                            case STAR:
4288                                {
4289                                alt53=1;
4290                                }
4291                                break;
4292                            case BLANKS:
4293                                {
4294                                alt53=1;
4295                                }
4296                                break;
4297                            case ITAL:
4298                                {
4299                                alt53=1;
4300                                }
4301                                break;
4302                            case FORCED_END_OF_LINE:
4303                            case HEADING_SECTION:
4304                            case HORIZONTAL_SECTION:
4305                            case LIST_ITEM:
4306                            case LIST_ITEM_PART:
4307                            case NOWIKI_SECTION:
4308                            case SCAPE_NODE:
4309                            case TEXT_NODE:
4310                            case UNORDERED_LIST:
4311                            case UNFORMATTED_TEXT:
4312                            case WIKI:
4313                            case POUND:
4314                            case PIPE:
4315                            case EXTENSION:
4316                            case FORCED_LINEBREAK:
4317                            case NOWIKI_BLOCK_CLOSE:
4318                            case NOWIKI_CLOSE:
4319                            case LINK_CLOSE:
4320                            case IMAGE_CLOSE:
4321                            case DASH:
4322                            case CR:
4323                            case LF:
4324                            case SPACE:
4325                            case TABULATOR:
4326                            case BRACE_CLOSE:
4327                            case COLON_SLASH:
4328                            case SLASH:
4329                            case INSIGNIFICANT_CHAR:
4330                            case 41:
4331                            case 42:
4332                            case 43:
4333                            case 44:
4334                            case 45:
4335                            case 46:
4336                            case 47:
4337                            case 48:
4338                            case 49:
4339                            case 50:
4340                            case 51:
4341                            case 52:
4342                            case 53:
4343                            case 54:
4344                            case 55:
4345                            case 56:
4346                            case 57:
4347                            case 58:
4348                            case 59:
4349                            case 60:
4350                            case 61:
4351                            case 62:
4352                            case 63:
4353                            case 64:
4354                            case 65:
4355                            case 66:
4356                            case 67:
4357                            case 68:
4358                            case 69:
4359                            case 70:
4360                            case 71:
4361                            case 72:
4362                            case 73:
4363                            case 74:
4364                            case 75:
4365                            case 76:
4366                            case 77:
4367                            case 78:
4368                            case 79:
4369                            case 80:
4370                                {
4371                                alt53=1;
4372                                }
4373                                break;
4374                            case LINK_OPEN:
4375                                {
4376                                alt53=1;
4377                                }
4378                                break;
4379                            case IMAGE_OPEN:
4380                                {
4381                                alt53=1;
4382                                }
4383                                break;
4384                            case NOWIKI_OPEN:
4385                                {
4386                                alt53=1;
4387                                }
4388                                break;
4389    
4390                            }
4391    
4392                            switch (alt53) {
4393                            case 1 :
4394                                // Creole10.g:361:15: tb= heading_boldcontentpart onestar
4395                                {
4396                                pushFollow(FOLLOW_heading_boldcontentpart_in_heading_boldcontent1520);
4397                                tb=heading_boldcontentpart();
4398                                _fsp--;
4399                                if (failed) return items;
4400                                if ( backtracking==0 ) {
4401                                   items.add(tb); 
4402                                }
4403                                pushFollow(FOLLOW_onestar_in_heading_boldcontent1525);
4404                                onestar();
4405                                _fsp--;
4406                                if (failed) return items;
4407    
4408                                }
4409                                break;
4410    
4411                            default :
4412                                if ( cnt53 >= 1 ) break loop53;
4413                                if (backtracking>0) {failed=true; return items;}
4414                                    EarlyExitException eee =
4415                                        new EarlyExitException(53, input);
4416                                    throw eee;
4417                            }
4418                            cnt53++;
4419                        } while (true);
4420    
4421    
4422                        }
4423                        break;
4424                    case 2 :
4425                        // Creole10.g:362:4: EOF
4426                        {
4427                        match(input,EOF,FOLLOW_EOF_in_heading_boldcontent1533); if (failed) return items;
4428    
4429                        }
4430                        break;
4431    
4432                }
4433            }
4434            catch (RecognitionException re) {
4435                reportError(re);
4436                recover(input,re);
4437            }
4438            finally {
4439            }
4440            return items;
4441        }
4442        // $ANTLR end heading_boldcontent
4443    
4444    
4445        // $ANTLR start heading_italcontent
4446        // Creole10.g:364:1: heading_italcontent returns [CollectionNode items = new CollectionNode()] : ( onestar (ti= heading_italcontentpart onestar )+ | EOF );
4447        public final CollectionNode heading_italcontent() throws RecognitionException {
4448            CollectionNode items =  new CollectionNode();
4449    
4450            ASTNode ti = null;
4451    
4452    
4453            try {
4454                // Creole10.g:365:2: ( onestar (ti= heading_italcontentpart onestar )+ | EOF )
4455                int alt56=2;
4456                int LA56_0 = input.LA(1);
4457    
4458                if ( ((LA56_0>=FORCED_END_OF_LINE && LA56_0<=WIKI)||(LA56_0>=POUND && LA56_0<=STAR)||(LA56_0>=PIPE && LA56_0<=FORCED_LINEBREAK)||(LA56_0>=NOWIKI_BLOCK_CLOSE && LA56_0<=80)) ) {
4459                    alt56=1;
4460                }
4461                else if ( (LA56_0==EOF) ) {
4462                    alt56=2;
4463                }
4464                else {
4465                    if (backtracking>0) {failed=true; return items;}
4466                    NoViableAltException nvae =
4467                        new NoViableAltException("364:1: heading_italcontent returns [CollectionNode items = new CollectionNode()] : ( onestar (ti= heading_italcontentpart onestar )+ | EOF );", 56, 0, input);
4468    
4469                    throw nvae;
4470                }
4471                switch (alt56) {
4472                    case 1 :
4473                        // Creole10.g:365:4: onestar (ti= heading_italcontentpart onestar )+
4474                        {
4475                        pushFollow(FOLLOW_onestar_in_heading_italcontent1547);
4476                        onestar();
4477                        _fsp--;
4478                        if (failed) return items;
4479                        // Creole10.g:365:13: (ti= heading_italcontentpart onestar )+
4480                        int cnt55=0;
4481                        loop55:
4482                        do {
4483                            int alt55=2;
4484                            switch ( input.LA(1) ) {
4485                            case ITAL:
4486                                {
4487                                alt55=1;
4488                                }
4489                                break;
4490                            case STAR:
4491                                {
4492                                alt55=1;
4493                                }
4494                                break;
4495                            case BLANKS:
4496                                {
4497                                alt55=1;
4498                                }
4499                                break;
4500                            case FORCED_END_OF_LINE:
4501                            case HEADING_SECTION:
4502                            case HORIZONTAL_SECTION:
4503                            case LIST_ITEM:
4504                            case LIST_ITEM_PART:
4505                            case NOWIKI_SECTION:
4506                            case SCAPE_NODE:
4507                            case TEXT_NODE:
4508                            case UNORDERED_LIST:
4509                            case UNFORMATTED_TEXT:
4510                            case WIKI:
4511                            case POUND:
4512                            case PIPE:
4513                            case EXTENSION:
4514                            case FORCED_LINEBREAK:
4515                            case NOWIKI_BLOCK_CLOSE:
4516                            case NOWIKI_CLOSE:
4517                            case LINK_CLOSE:
4518                            case IMAGE_CLOSE:
4519                            case DASH:
4520                            case CR:
4521                            case LF:
4522                            case SPACE:
4523                            case TABULATOR:
4524                            case BRACE_CLOSE:
4525                            case COLON_SLASH:
4526                            case SLASH:
4527                            case INSIGNIFICANT_CHAR:
4528                            case 41:
4529                            case 42:
4530                            case 43:
4531                            case 44:
4532                            case 45:
4533                            case 46:
4534                            case 47:
4535                            case 48:
4536                            case 49:
4537                            case 50:
4538                            case 51:
4539                            case 52:
4540                            case 53:
4541                            case 54:
4542                            case 55:
4543                            case 56:
4544                            case 57:
4545                            case 58:
4546                            case 59:
4547                            case 60:
4548                            case 61:
4549                            case 62:
4550                            case 63:
4551                            case 64:
4552                            case 65:
4553                            case 66:
4554                            case 67:
4555                            case 68:
4556                            case 69:
4557                            case 70:
4558                            case 71:
4559                            case 72:
4560                            case 73:
4561                            case 74:
4562                            case 75:
4563                            case 76:
4564                            case 77:
4565                            case 78:
4566                            case 79:
4567                            case 80:
4568                                {
4569                                alt55=1;
4570                                }
4571                                break;
4572                            case LINK_OPEN:
4573                                {
4574                                alt55=1;
4575                                }
4576                                break;
4577                            case IMAGE_OPEN:
4578                                {
4579                                alt55=1;
4580                                }
4581                                break;
4582                            case NOWIKI_OPEN:
4583                                {
4584                                alt55=1;
4585                                }
4586                                break;
4587    
4588                            }
4589    
4590                            switch (alt55) {
4591                            case 1 :
4592                                // Creole10.g:365:15: ti= heading_italcontentpart onestar
4593                                {
4594                                pushFollow(FOLLOW_heading_italcontentpart_in_heading_italcontent1556);
4595                                ti=heading_italcontentpart();
4596                                _fsp--;
4597                                if (failed) return items;
4598                                if ( backtracking==0 ) {
4599                                   items.add(ti); 
4600                                }
4601                                pushFollow(FOLLOW_onestar_in_heading_italcontent1561);
4602                                onestar();
4603                                _fsp--;
4604                                if (failed) return items;
4605    
4606                                }
4607                                break;
4608    
4609                            default :
4610                                if ( cnt55 >= 1 ) break loop55;
4611                                if (backtracking>0) {failed=true; return items;}
4612                                    EarlyExitException eee =
4613                                        new EarlyExitException(55, input);
4614                                    throw eee;
4615                            }
4616                            cnt55++;
4617                        } while (true);
4618    
4619    
4620                        }
4621                        break;
4622                    case 2 :
4623                        // Creole10.g:366:4: EOF
4624                        {
4625                        match(input,EOF,FOLLOW_EOF_in_heading_italcontent1569); if (failed) return items;
4626    
4627                        }
4628                        break;
4629    
4630                }
4631            }
4632            catch (RecognitionException re) {
4633                reportError(re);
4634                recover(input,re);
4635            }
4636            finally {
4637            }
4638            return items;
4639        }
4640        // $ANTLR end heading_italcontent
4641    
4642    
4643        // $ANTLR start heading_boldcontentpart
4644        // Creole10.g:368:1: heading_boldcontentpart returns [ASTNode node = null] : (tf= heading_formattedcontent | ital_markup tb= heading_bolditalcontent ( ital_markup )? );
4645        public final ASTNode heading_boldcontentpart() throws RecognitionException {
4646            ASTNode node =  null;
4647    
4648            CollectionNode tf = null;
4649    
4650            CollectionNode tb = null;
4651    
4652    
4653            try {
4654                // Creole10.g:369:2: (tf= heading_formattedcontent | ital_markup tb= heading_bolditalcontent ( ital_markup )? )
4655                int alt58=2;
4656                int LA58_0 = input.LA(1);
4657    
4658                if ( ((LA58_0>=FORCED_END_OF_LINE && LA58_0<=WIKI)||(LA58_0>=POUND && LA58_0<=STAR)||(LA58_0>=PIPE && LA58_0<=FORCED_LINEBREAK)||(LA58_0>=NOWIKI_BLOCK_CLOSE && LA58_0<=80)) ) {
4659                    alt58=1;
4660                }
4661                else {
4662                    if (backtracking>0) {failed=true; return node;}
4663                    NoViableAltException nvae =
4664                        new NoViableAltException("368:1: heading_boldcontentpart returns [ASTNode node = null] : (tf= heading_formattedcontent | ital_markup tb= heading_bolditalcontent ( ital_markup )? );", 58, 0, input);
4665    
4666                    throw nvae;
4667                }
4668                switch (alt58) {
4669                    case 1 :
4670                        // Creole10.g:369:4: tf= heading_formattedcontent
4671                        {
4672                        pushFollow(FOLLOW_heading_formattedcontent_in_heading_boldcontentpart1587);
4673                        tf=heading_formattedcontent();
4674                        _fsp--;
4675                        if (failed) return node;
4676                        if ( backtracking==0 ) {
4677                          node = tf; 
4678                        }
4679    
4680                        }
4681                        break;
4682                    case 2 :
4683                        // Creole10.g:370:4: ital_markup tb= heading_bolditalcontent ( ital_markup )?
4684                        {
4685                        pushFollow(FOLLOW_ital_markup_in_heading_boldcontentpart1594);
4686                        ital_markup();
4687                        _fsp--;
4688                        if (failed) return node;
4689                        pushFollow(FOLLOW_heading_bolditalcontent_in_heading_boldcontentpart1601);
4690                        tb=heading_bolditalcontent();
4691                        _fsp--;
4692                        if (failed) return node;
4693                        if ( backtracking==0 ) {
4694                           node = new ItalicTextNode(tb);  
4695                        }
4696                        // Creole10.g:370:94: ( ital_markup )?
4697                        int alt57=2;
4698                        int LA57_0 = input.LA(1);
4699    
4700                        if ( (LA57_0==ITAL) ) {
4701                            alt57=1;
4702                        }
4703                        switch (alt57) {
4704                            case 1 :
4705                                // Creole10.g:370:96: ital_markup
4706                                {
4707                                pushFollow(FOLLOW_ital_markup_in_heading_boldcontentpart1608);
4708                                ital_markup();
4709                                _fsp--;
4710                                if (failed) return node;
4711    
4712                                }
4713                                break;
4714    
4715                        }
4716    
4717    
4718                        }
4719                        break;
4720    
4721                }
4722            }
4723            catch (RecognitionException re) {
4724                reportError(re);
4725                recover(input,re);
4726            }
4727            finally {
4728            }
4729            return node;
4730        }
4731        // $ANTLR end heading_boldcontentpart
4732    
4733    
4734        // $ANTLR start heading_italcontentpart
4735        // Creole10.g:372:1: heading_italcontentpart returns [ASTNode node = null] : ( bold_markup tb= heading_bolditalcontent ( bold_markup )? | tf= heading_formattedcontent );
4736        public final ASTNode heading_italcontentpart() throws RecognitionException {
4737            ASTNode node =  null;
4738    
4739            CollectionNode tb = null;
4740    
4741            CollectionNode tf = null;
4742    
4743    
4744            try {
4745                // Creole10.g:373:2: ( bold_markup tb= heading_bolditalcontent ( bold_markup )? | tf= heading_formattedcontent )
4746                int alt60=2;
4747                int LA60_0 = input.LA(1);
4748    
4749                if ( (LA60_0==STAR) ) {
4750                    int LA60_1 = input.LA(2);
4751    
4752                    if ( (LA60_1==STAR) ) {
4753                        alt60=1;
4754                    }
4755                    else if ( (LA60_1==EOF||(LA60_1>=FORCED_END_OF_LINE && LA60_1<=POUND)||(LA60_1>=EQUAL && LA60_1<=FORCED_LINEBREAK)||(LA60_1>=NOWIKI_BLOCK_CLOSE && LA60_1<=80)) ) {
4756                        alt60=2;
4757                    }
4758                    else {
4759                        if (backtracking>0) {failed=true; return node;}
4760                        NoViableAltException nvae =
4761                            new NoViableAltException("372:1: heading_italcontentpart returns [ASTNode node = null] : ( bold_markup tb= heading_bolditalcontent ( bold_markup )? | tf= heading_formattedcontent );", 60, 1, input);
4762    
4763                        throw nvae;
4764                    }
4765                }
4766                else if ( ((LA60_0>=FORCED_END_OF_LINE && LA60_0<=WIKI)||LA60_0==POUND||(LA60_0>=PIPE && LA60_0<=FORCED_LINEBREAK)||(LA60_0>=NOWIKI_BLOCK_CLOSE && LA60_0<=80)) ) {
4767                    alt60=2;
4768                }
4769                else {
4770                    if (backtracking>0) {failed=true; return node;}
4771                    NoViableAltException nvae =
4772                        new NoViableAltException("372:1: heading_italcontentpart returns [ASTNode node = null] : ( bold_markup tb= heading_bolditalcontent ( bold_markup )? | tf= heading_formattedcontent );", 60, 0, input);
4773    
4774                    throw nvae;
4775                }
4776                switch (alt60) {
4777                    case 1 :
4778                        // Creole10.g:373:4: bold_markup tb= heading_bolditalcontent ( bold_markup )?
4779                        {
4780                        pushFollow(FOLLOW_bold_markup_in_heading_italcontentpart1625);
4781                        bold_markup();
4782                        _fsp--;
4783                        if (failed) return node;
4784                        pushFollow(FOLLOW_heading_bolditalcontent_in_heading_italcontentpart1632);
4785                        tb=heading_bolditalcontent();
4786                        _fsp--;
4787                        if (failed) return node;
4788                        if ( backtracking==0 ) {
4789                          node = new BoldTextNode(tb); 
4790                        }
4791                        // Creole10.g:373:90: ( bold_markup )?
4792                        int alt59=2;
4793                        int LA59_0 = input.LA(1);
4794    
4795                        if ( (LA59_0==STAR) ) {
4796                            int LA59_1 = input.LA(2);
4797    
4798                            if ( (LA59_1==STAR) ) {
4799                                alt59=1;
4800                            }
4801                        }
4802                        switch (alt59) {
4803                            case 1 :
4804                                // Creole10.g:373:92: bold_markup
4805                                {
4806                                pushFollow(FOLLOW_bold_markup_in_heading_italcontentpart1639);
4807                                bold_markup();
4808                                _fsp--;
4809                                if (failed) return node;
4810    
4811                                }
4812                                break;
4813    
4814                        }
4815    
4816    
4817                        }
4818                        break;
4819                    case 2 :
4820                        // Creole10.g:374:4: tf= heading_formattedcontent
4821                        {
4822                        pushFollow(FOLLOW_heading_formattedcontent_in_heading_italcontentpart1651);
4823                        tf=heading_formattedcontent();
4824                        _fsp--;
4825                        if (failed) return node;
4826                        if ( backtracking==0 ) {
4827                           node = tf; 
4828                        }
4829    
4830                        }
4831                        break;
4832    
4833                }
4834            }
4835            catch (RecognitionException re) {
4836                reportError(re);
4837                recover(input,re);
4838            }
4839            finally {
4840            }
4841            return node;
4842        }
4843        // $ANTLR end heading_italcontentpart
4844    
4845    
4846        // $ANTLR start heading_bolditalcontent
4847        // Creole10.g:376:1: heading_bolditalcontent returns [CollectionNode elements = null] : ( onestar (tfc= heading_formattedcontent onestar )? | EOF );
4848        public final CollectionNode heading_bolditalcontent() throws RecognitionException {
4849            CollectionNode elements =  null;
4850    
4851            CollectionNode tfc = null;
4852    
4853    
4854            try {
4855                // Creole10.g:377:2: ( onestar (tfc= heading_formattedcontent onestar )? | EOF )
4856                int alt62=2;
4857                int LA62_0 = input.LA(1);
4858    
4859                if ( ((LA62_0>=FORCED_END_OF_LINE && LA62_0<=FORCED_LINEBREAK)||(LA62_0>=NOWIKI_BLOCK_CLOSE && LA62_0<=80)) ) {
4860                    alt62=1;
4861                }
4862                else if ( (LA62_0==EOF) ) {
4863                    alt62=1;
4864                }
4865                else {
4866                    if (backtracking>0) {failed=true; return elements;}
4867                    NoViableAltException nvae =
4868                        new NoViableAltException("376:1: heading_bolditalcontent returns [CollectionNode elements = null] : ( onestar (tfc= heading_formattedcontent onestar )? | EOF );", 62, 0, input);
4869    
4870                    throw nvae;
4871                }
4872                switch (alt62) {
4873                    case 1 :
4874                        // Creole10.g:377:4: onestar (tfc= heading_formattedcontent onestar )?
4875                        {
4876                        pushFollow(FOLLOW_onestar_in_heading_bolditalcontent1667);
4877                        onestar();
4878                        _fsp--;
4879                        if (failed) return elements;
4880                        // Creole10.g:377:13: (tfc= heading_formattedcontent onestar )?
4881                        int alt61=2;
4882                        switch ( input.LA(1) ) {
4883                            case ITAL:
4884                                {
4885                                alt61=1;
4886                                }
4887                                break;
4888                            case LINK_OPEN:
4889                                {
4890                                alt61=1;
4891                                }
4892                                break;
4893                            case IMAGE_OPEN:
4894                                {
4895                                alt61=1;
4896                                }
4897                                break;
4898                            case NOWIKI_OPEN:
4899                                {
4900                                alt61=1;
4901                                }
4902                                break;
4903                            case STAR:
4904                                {
4905                                alt61=1;
4906                                }
4907                                break;
4908                            case BLANKS:
4909                                {
4910                                alt61=1;
4911                                }
4912                                break;
4913                            case FORCED_END_OF_LINE:
4914                            case HEADING_SECTION:
4915                            case HORIZONTAL_SECTION:
4916                            case LIST_ITEM:
4917                            case LIST_ITEM_PART:
4918                            case NOWIKI_SECTION:
4919                            case SCAPE_NODE:
4920                            case TEXT_NODE:
4921                            case UNORDERED_LIST:
4922                            case UNFORMATTED_TEXT:
4923                            case WIKI:
4924                            case POUND:
4925                            case PIPE:
4926                            case EXTENSION:
4927                            case FORCED_LINEBREAK:
4928                            case NOWIKI_BLOCK_CLOSE:
4929                            case NOWIKI_CLOSE:
4930                            case LINK_CLOSE:
4931                            case IMAGE_CLOSE:
4932                            case DASH:
4933                            case CR:
4934                            case LF:
4935                            case SPACE:
4936                            case TABULATOR:
4937                            case BRACE_CLOSE:
4938                            case COLON_SLASH:
4939                            case SLASH:
4940                            case INSIGNIFICANT_CHAR:
4941                            case 41:
4942                            case 42:
4943                            case 43:
4944                            case 44:
4945                            case 45:
4946                            case 46:
4947                            case 47:
4948                            case 48:
4949                            case 49:
4950                            case 50:
4951                            case 51:
4952                            case 52:
4953                            case 53:
4954                            case 54:
4955                            case 55:
4956                            case 56:
4957                            case 57:
4958                            case 58:
4959                            case 59:
4960                            case 60:
4961                            case 61:
4962                            case 62:
4963                            case 63:
4964                            case 64:
4965                            case 65:
4966                            case 66:
4967                            case 67:
4968                            case 68:
4969                            case 69:
4970                            case 70:
4971                            case 71:
4972                            case 72:
4973                            case 73:
4974                            case 74:
4975                            case 75:
4976                            case 76:
4977                            case 77:
4978                            case 78:
4979                            case 79:
4980                            case 80:
4981                                {
4982                                alt61=1;
4983                                }
4984                                break;
4985                        }
4986    
4987                        switch (alt61) {
4988                            case 1 :
4989                                // Creole10.g:377:15: tfc= heading_formattedcontent onestar
4990                                {
4991                                pushFollow(FOLLOW_heading_formattedcontent_in_heading_bolditalcontent1676);
4992                                tfc=heading_formattedcontent();
4993                                _fsp--;
4994                                if (failed) return elements;
4995                                if ( backtracking==0 ) {
4996                                   elements = tfc; 
4997                                }
4998                                pushFollow(FOLLOW_onestar_in_heading_bolditalcontent1681);
4999                                onestar();
5000                                _fsp--;
5001                                if (failed) return elements;
5002    
5003                                }
5004                                break;
5005    
5006                        }
5007    
5008    
5009                        }
5010                        break;
5011                    case 2 :
5012                        // Creole10.g:378:4: EOF
5013                        {
5014                        match(input,EOF,FOLLOW_EOF_in_heading_bolditalcontent1689); if (failed) return elements;
5015    
5016                        }
5017                        break;
5018    
5019                }
5020            }
5021            catch (RecognitionException re) {
5022                reportError(re);
5023                recover(input,re);
5024            }
5025            finally {
5026            }
5027            return elements;
5028        }
5029        // $ANTLR end heading_bolditalcontent
5030    
5031    
5032        // $ANTLR start heading_formattedcontent
5033        // Creole10.g:380:1: heading_formattedcontent returns [CollectionNode elements = new CollectionNode()] : (tu= heading_unformattedelement )+ ;
5034        public final CollectionNode heading_formattedcontent() throws RecognitionException {
5035            CollectionNode elements =  new CollectionNode();
5036    
5037            ASTNode tu = null;
5038    
5039    
5040            try {
5041                // Creole10.g:381:2: ( (tu= heading_unformattedelement )+ )
5042                // Creole10.g:381:4: (tu= heading_unformattedelement )+
5043                {
5044                // Creole10.g:381:4: (tu= heading_unformattedelement )+
5045                int cnt63=0;
5046                loop63:
5047                do {
5048                    int alt63=2;
5049                    switch ( input.LA(1) ) {
5050                    case STAR:
5051                        {
5052                        alt63=1;
5053                        }
5054                        break;
5055                    case BLANKS:
5056                        {
5057                        alt63=1;
5058                        }
5059                        break;
5060                    case ITAL:
5061                        {
5062                        alt63=1;
5063                        }
5064                        break;
5065                    case FORCED_END_OF_LINE:
5066                    case HEADING_SECTION:
5067                    case HORIZONTAL_SECTION:
5068                    case LIST_ITEM:
5069                    case LIST_ITEM_PART:
5070                    case NOWIKI_SECTION:
5071                    case SCAPE_NODE:
5072                    case TEXT_NODE:
5073                    case UNORDERED_LIST:
5074                    case UNFORMATTED_TEXT:
5075                    case WIKI:
5076                    case POUND:
5077                    case PIPE:
5078                    case EXTENSION:
5079                    case FORCED_LINEBREAK:
5080                    case NOWIKI_BLOCK_CLOSE:
5081                    case NOWIKI_CLOSE:
5082                    case LINK_CLOSE:
5083                    case IMAGE_CLOSE:
5084                    case DASH:
5085                    case CR:
5086                    case LF:
5087                    case SPACE:
5088                    case TABULATOR:
5089                    case BRACE_CLOSE:
5090                    case COLON_SLASH:
5091                    case SLASH:
5092                    case INSIGNIFICANT_CHAR:
5093                    case 41:
5094                    case 42:
5095                    case 43:
5096                    case 44:
5097                    case 45:
5098                    case 46:
5099                    case 47:
5100                    case 48:
5101                    case 49:
5102                    case 50:
5103                    case 51:
5104                    case 52:
5105                    case 53:
5106                    case 54:
5107                    case 55:
5108                    case 56:
5109                    case 57:
5110                    case 58:
5111                    case 59:
5112                    case 60:
5113                    case 61:
5114                    case 62:
5115                    case 63:
5116                    case 64:
5117                    case 65:
5118                    case 66:
5119                    case 67:
5120                    case 68:
5121                    case 69:
5122                    case 70:
5123                    case 71:
5124                    case 72:
5125                    case 73:
5126                    case 74:
5127                    case 75:
5128                    case 76:
5129                    case 77:
5130                    case 78:
5131                    case 79:
5132                    case 80:
5133                        {
5134                        alt63=1;
5135                        }
5136                        break;
5137                    case LINK_OPEN:
5138                        {
5139                        alt63=1;
5140                        }
5141                        break;
5142                    case IMAGE_OPEN:
5143                        {
5144                        alt63=1;
5145                        }
5146                        break;
5147                    case NOWIKI_OPEN:
5148                        {
5149                        alt63=1;
5150                        }
5151                        break;
5152    
5153                    }
5154    
5155                    switch (alt63) {
5156                    case 1 :
5157                        // Creole10.g:381:6: tu= heading_unformattedelement
5158                        {
5159                        pushFollow(FOLLOW_heading_unformattedelement_in_heading_formattedcontent1709);
5160                        tu=heading_unformattedelement();
5161                        _fsp--;
5162                        if (failed) return elements;
5163                        if ( backtracking==0 ) {
5164                           elements.add(tu); 
5165                        }
5166    
5167                        }
5168                        break;
5169    
5170                    default :
5171                        if ( cnt63 >= 1 ) break loop63;
5172                        if (backtracking>0) {failed=true; return elements;}
5173                            EarlyExitException eee =
5174                                new EarlyExitException(63, input);
5175                            throw eee;
5176                    }
5177                    cnt63++;
5178                } while (true);
5179    
5180    
5181                }
5182    
5183            }
5184            catch (RecognitionException re) {
5185                reportError(re);
5186                recover(input,re);
5187            }
5188            finally {
5189            }
5190            return elements;
5191        }
5192        // $ANTLR end heading_formattedcontent
5193    
5194    
5195        // $ANTLR start heading_unformattedelement
5196        // Creole10.g:383:1: heading_unformattedelement returns [ASTNode content = null] : (tu= heading_unformatted_text | ti= heading_inlineelement );
5197        public final ASTNode heading_unformattedelement() throws RecognitionException {
5198            ASTNode content =  null;
5199    
5200            StringBundler tu = null;
5201    
5202            ASTNode ti = null;
5203    
5204    
5205            try {
5206                // Creole10.g:384:2: (tu= heading_unformatted_text | ti= heading_inlineelement )
5207                int alt64=2;
5208                int LA64_0 = input.LA(1);
5209    
5210                if ( ((LA64_0>=FORCED_END_OF_LINE && LA64_0<=WIKI)||(LA64_0>=POUND && LA64_0<=STAR)||(LA64_0>=PIPE && LA64_0<=ITAL)||(LA64_0>=EXTENSION && LA64_0<=FORCED_LINEBREAK)||(LA64_0>=NOWIKI_BLOCK_CLOSE && LA64_0<=80)) ) {
5211                    alt64=1;
5212                }
5213                else if ( ((LA64_0>=LINK_OPEN && LA64_0<=NOWIKI_OPEN)) ) {
5214                    alt64=2;
5215                }
5216                else {
5217                    if (backtracking>0) {failed=true; return content;}
5218                    NoViableAltException nvae =
5219                        new NoViableAltException("383:1: heading_unformattedelement returns [ASTNode content = null] : (tu= heading_unformatted_text | ti= heading_inlineelement );", 64, 0, input);
5220    
5221                    throw nvae;
5222                }
5223                switch (alt64) {
5224                    case 1 :
5225                        // Creole10.g:384:4: tu= heading_unformatted_text
5226                        {
5227                        pushFollow(FOLLOW_heading_unformatted_text_in_heading_unformattedelement1732);
5228                        tu=heading_unformatted_text();
5229                        _fsp--;
5230                        if (failed) return content;
5231                        if ( backtracking==0 ) {
5232                          content = new UnformattedTextNode(tu.toString());
5233                        }
5234    
5235                        }
5236                        break;
5237                    case 2 :
5238                        // Creole10.g:385:4: ti= heading_inlineelement
5239                        {
5240                        pushFollow(FOLLOW_heading_inlineelement_in_heading_unformattedelement1744);
5241                        ti=heading_inlineelement();
5242                        _fsp--;
5243                        if (failed) return content;
5244                        if ( backtracking==0 ) {
5245                          content = ti;
5246                        }
5247    
5248                        }
5249                        break;
5250    
5251                }
5252            }
5253            catch (RecognitionException re) {
5254                reportError(re);
5255                recover(input,re);
5256            }
5257            finally {
5258            }
5259            return content;
5260        }
5261        // $ANTLR end heading_unformattedelement
5262    
5263    
5264        // $ANTLR start heading_inlineelement
5265        // Creole10.g:387:1: heading_inlineelement returns [ASTNode element = null] : (l= link | i= image | nwi= nowiki_inline );
5266        public final ASTNode heading_inlineelement() throws RecognitionException {
5267            ASTNode element =  null;
5268    
5269            LinkNode l = null;
5270    
5271            ImageNode i = null;
5272    
5273            NoWikiSectionNode nwi = null;
5274    
5275    
5276            try {
5277                // Creole10.g:388:2: (l= link | i= image | nwi= nowiki_inline )
5278                int alt65=3;
5279                switch ( input.LA(1) ) {
5280                case LINK_OPEN:
5281                    {
5282                    alt65=1;
5283                    }
5284                    break;
5285                case IMAGE_OPEN:
5286                    {
5287                    alt65=2;
5288                    }
5289                    break;
5290                case NOWIKI_OPEN:
5291                    {
5292                    alt65=3;
5293                    }
5294                    break;
5295                default:
5296                    if (backtracking>0) {failed=true; return element;}
5297                    NoViableAltException nvae =
5298                        new NoViableAltException("387:1: heading_inlineelement returns [ASTNode element = null] : (l= link | i= image | nwi= nowiki_inline );", 65, 0, input);
5299    
5300                    throw nvae;
5301                }
5302    
5303                switch (alt65) {
5304                    case 1 :
5305                        // Creole10.g:388:4: l= link
5306                        {
5307                        pushFollow(FOLLOW_link_in_heading_inlineelement1764);
5308                        l=link();
5309                        _fsp--;
5310                        if (failed) return element;
5311                        if ( backtracking==0 ) {
5312                          element = l; 
5313                        }
5314    
5315                        }
5316                        break;
5317                    case 2 :
5318                        // Creole10.g:389:4: i= image
5319                        {
5320                        pushFollow(FOLLOW_image_in_heading_inlineelement1774);
5321                        i=image();
5322                        _fsp--;
5323                        if (failed) return element;
5324                        if ( backtracking==0 ) {
5325                          element = i; 
5326                        }
5327    
5328                        }
5329                        break;
5330                    case 3 :
5331                        // Creole10.g:390:4: nwi= nowiki_inline
5332                        {
5333                        pushFollow(FOLLOW_nowiki_inline_in_heading_inlineelement1785);
5334                        nwi=nowiki_inline();
5335                        _fsp--;
5336                        if (failed) return element;
5337                        if ( backtracking==0 ) {
5338                          element = nwi; 
5339                        }
5340    
5341                        }
5342                        break;
5343    
5344                }
5345            }
5346            catch (RecognitionException re) {
5347                reportError(re);
5348                recover(input,re);
5349            }
5350            finally {
5351            }
5352            return element;
5353        }
5354        // $ANTLR end heading_inlineelement
5355    
5356    
5357        // $ANTLR start heading_unformatted_text
5358        // Creole10.g:393:1: heading_unformatted_text returns [StringBundler text = new StringBundler()] : (c=~ ( LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EQUAL | ESCAPE | NEWLINE | EOF ) )+ ;
5359        public final StringBundler heading_unformatted_text() throws RecognitionException {
5360            StringBundler text =  new StringBundler();
5361    
5362            Token c=null;
5363    
5364            try {
5365                // Creole10.g:394:2: ( (c=~ ( LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EQUAL | ESCAPE | NEWLINE | EOF ) )+ )
5366                // Creole10.g:394:4: (c=~ ( LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EQUAL | ESCAPE | NEWLINE | EOF ) )+
5367                {
5368                // Creole10.g:394:4: (c=~ ( LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EQUAL | ESCAPE | NEWLINE | EOF ) )+
5369                int cnt66=0;
5370                loop66:
5371                do {
5372                    int alt66=2;
5373                    switch ( input.LA(1) ) {
5374                    case STAR:
5375                        {
5376                        alt66=1;
5377                        }
5378                        break;
5379                    case BLANKS:
5380                        {
5381                        alt66=1;
5382                        }
5383                        break;
5384                    case ITAL:
5385                        {
5386                        alt66=1;
5387                        }
5388                        break;
5389                    case FORCED_END_OF_LINE:
5390                    case HEADING_SECTION:
5391                    case HORIZONTAL_SECTION:
5392                    case LIST_ITEM:
5393                    case LIST_ITEM_PART:
5394                    case NOWIKI_SECTION:
5395                    case SCAPE_NODE:
5396                    case TEXT_NODE:
5397                    case UNORDERED_LIST:
5398                    case UNFORMATTED_TEXT:
5399                    case WIKI:
5400                    case POUND:
5401                    case PIPE:
5402                    case EXTENSION:
5403                    case FORCED_LINEBREAK:
5404                    case NOWIKI_BLOCK_CLOSE:
5405                    case NOWIKI_CLOSE:
5406                    case LINK_CLOSE:
5407                    case IMAGE_CLOSE:
5408                    case DASH:
5409                    case CR:
5410                    case LF:
5411                    case SPACE:
5412                    case TABULATOR:
5413                    case BRACE_CLOSE:
5414                    case COLON_SLASH:
5415                    case SLASH:
5416                    case INSIGNIFICANT_CHAR:
5417                    case 41:
5418                    case 42:
5419                    case 43:
5420                    case 44:
5421                    case 45:
5422                    case 46:
5423                    case 47:
5424                    case 48:
5425                    case 49:
5426                    case 50:
5427                    case 51:
5428                    case 52:
5429                    case 53:
5430                    case 54:
5431                    case 55:
5432                    case 56:
5433                    case 57:
5434                    case 58:
5435                    case 59:
5436                    case 60:
5437                    case 61:
5438                    case 62:
5439                    case 63:
5440                    case 64:
5441                    case 65:
5442                    case 66:
5443                    case 67:
5444                    case 68:
5445                    case 69:
5446                    case 70:
5447                    case 71:
5448                    case 72:
5449                    case 73:
5450                    case 74:
5451                    case 75:
5452                    case 76:
5453                    case 77:
5454                    case 78:
5455                    case 79:
5456                    case 80:
5457                        {
5458                        alt66=1;
5459                        }
5460                        break;
5461    
5462                    }
5463    
5464                    switch (alt66) {
5465                    case 1 :
5466                        // Creole10.g:394:6: c=~ ( LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EQUAL | ESCAPE | NEWLINE | EOF )
5467                        {
5468                        c=(Token)input.LT(1);
5469                        if ( (input.LA(1)>=FORCED_END_OF_LINE && input.LA(1)<=WIKI)||(input.LA(1)>=POUND && input.LA(1)<=STAR)||(input.LA(1)>=PIPE && input.LA(1)<=ITAL)||(input.LA(1)>=EXTENSION && input.LA(1)<=FORCED_LINEBREAK)||(input.LA(1)>=NOWIKI_BLOCK_CLOSE && input.LA(1)<=80) ) {
5470                            input.consume();
5471                            errorRecovery=false;failed=false;
5472                        }
5473                        else {
5474                            if (backtracking>0) {failed=true; return text;}
5475                            MismatchedSetException mse =
5476                                new MismatchedSetException(null,input);
5477                            recoverFromMismatchedSet(input,mse,FOLLOW_set_in_heading_unformatted_text1808);    throw mse;
5478                        }
5479    
5480                        if ( backtracking==0 ) {
5481                          text.append(c.getText());
5482                        }
5483    
5484                        }
5485                        break;
5486    
5487                    default :
5488                        if ( cnt66 >= 1 ) break loop66;
5489                        if (backtracking>0) {failed=true; return text;}
5490                            EarlyExitException eee =
5491                                new EarlyExitException(66, input);
5492                            throw eee;
5493                    }
5494                    cnt66++;
5495                } while (true);
5496    
5497    
5498                }
5499    
5500            }
5501            catch (RecognitionException re) {
5502                reportError(re);
5503                recover(input,re);
5504            }
5505            finally {
5506            }
5507            return text;
5508        }
5509        // $ANTLR end heading_unformatted_text
5510    
5511        protected static class list_scope {
5512            BaseListNode currentParent;
5513            ListNode root;
5514            Stack<ItemNode> parents;
5515            int lastLevel = 1;
5516        }
5517        protected Stack list_stack = new Stack();
5518    
5519    
5520        // $ANTLR start list
5521        // Creole10.g:400:1: list returns [ListNode listNode = null] : (elem= list_elems )+ ( end_of_list )? ;
5522        public final ListNode list() throws RecognitionException {
5523            list_stack.push(new list_scope());
5524            ListNode listNode =  null;
5525    
5526    
5527                            ((list_scope)list_stack.peek()).root = new ListNode();
5528    
5529                            if (input.LA(1) == POUND) {
5530                                    ((list_scope)list_stack.peek()).currentParent = new OrderedListNode(((list_scope)list_stack.peek()).root);
5531                            }
5532                            else {
5533                                    ((list_scope)list_stack.peek()).currentParent = new UnorderedListNode(((list_scope)list_stack.peek()).root);
5534                            }
5535    
5536                            ((list_scope)list_stack.peek()).root.addChildASTNode(((list_scope)list_stack.peek()).currentParent);
5537    
5538                            ((list_scope)list_stack.peek()).parents = new Stack<ItemNode>();
5539                    
5540            try {
5541                // Creole10.g:424:2: ( (elem= list_elems )+ ( end_of_list )? )
5542                // Creole10.g:424:4: (elem= list_elems )+ ( end_of_list )?
5543                {
5544                // Creole10.g:424:4: (elem= list_elems )+
5545                int cnt67=0;
5546                loop67:
5547                do {
5548                    int alt67=2;
5549                    int LA67_0 = input.LA(1);
5550    
5551                    if ( (LA67_0==POUND) ) {
5552                        alt67=1;
5553                    }
5554                    else if ( (LA67_0==STAR) ) {
5555                        alt67=1;
5556                    }
5557    
5558    
5559                    switch (alt67) {
5560                    case 1 :
5561                        // Creole10.g:424:6: elem= list_elems
5562                        {
5563                        pushFollow(FOLLOW_list_elems_in_list1882);
5564                        list_elems();
5565                        _fsp--;
5566                        if (failed) return listNode;
5567    
5568                        }
5569                        break;
5570    
5571                    default :
5572                        if ( cnt67 >= 1 ) break loop67;
5573                        if (backtracking>0) {failed=true; return listNode;}
5574                            EarlyExitException eee =
5575                                new EarlyExitException(67, input);
5576                            throw eee;
5577                    }
5578                    cnt67++;
5579                } while (true);
5580    
5581                // Creole10.g:424:28: ( end_of_list )?
5582                int alt68=2;
5583                int LA68_0 = input.LA(1);
5584    
5585                if ( (LA68_0==NEWLINE) ) {
5586                    alt68=1;
5587                }
5588                else if ( (LA68_0==EOF) ) {
5589                    alt68=1;
5590                }
5591                switch (alt68) {
5592                    case 1 :
5593                        // Creole10.g:424:30: end_of_list
5594                        {
5595                        pushFollow(FOLLOW_end_of_list_in_list1890);
5596                        end_of_list();
5597                        _fsp--;
5598                        if (failed) return listNode;
5599    
5600                        }
5601                        break;
5602    
5603                }
5604    
5605    
5606                }
5607    
5608                if ( backtracking==0 ) {
5609    
5610                            listNode = ((list_scope)list_stack.peek()).root;
5611                    
5612                }
5613            }
5614            catch (RecognitionException re) {
5615                reportError(re);
5616                recover(input,re);
5617            }
5618            finally {
5619                list_stack.pop();
5620            }
5621            return listNode;
5622        }
5623        // $ANTLR end list
5624    
5625    
5626        // $ANTLR start list_elems
5627        // Creole10.g:427:1: list_elems : (om= list_ordelem_markup elem= list_elem | um= list_unordelem_markup elem= list_elem );
5628        public final void list_elems() throws RecognitionException {
5629            CountLevel_stack.push(new CountLevel_scope());
5630    
5631            list_ordelem_markup_return om = null;
5632    
5633            CollectionNode elem = null;
5634    
5635            list_unordelem_markup_return um = null;
5636    
5637    
5638    
5639                            ((CountLevel_scope)CountLevel_stack.peek()).level = 0;
5640                    
5641            try {
5642                // Creole10.g:432:2: (om= list_ordelem_markup elem= list_elem | um= list_unordelem_markup elem= list_elem )
5643                int alt69=2;
5644                int LA69_0 = input.LA(1);
5645    
5646                if ( (LA69_0==POUND) ) {
5647                    alt69=1;
5648                }
5649                else if ( (LA69_0==STAR) ) {
5650                    alt69=2;
5651                }
5652                else {
5653                    if (backtracking>0) {failed=true; return ;}
5654                    NoViableAltException nvae =
5655                        new NoViableAltException("427:1: list_elems : (om= list_ordelem_markup elem= list_elem | um= list_unordelem_markup elem= list_elem );", 69, 0, input);
5656    
5657                    throw nvae;
5658                }
5659                switch (alt69) {
5660                    case 1 :
5661                        // Creole10.g:432:4: om= list_ordelem_markup elem= list_elem
5662                        {
5663                        pushFollow(FOLLOW_list_ordelem_markup_in_list_elems1920);
5664                        om=list_ordelem_markup();
5665                        _fsp--;
5666                        if (failed) return ;
5667                        if ( backtracking==0 ) {
5668                          ++((CountLevel_scope)CountLevel_stack.peek()).level;((CountLevel_scope)CountLevel_stack.peek()).currentMarkup = input.toString(om.start,om.stop);((CountLevel_scope)CountLevel_stack.peek()).groups += input.toString(om.start,om.stop);
5669                        }
5670                        pushFollow(FOLLOW_list_elem_in_list_elems1932);
5671                        elem=list_elem();
5672                        _fsp--;
5673                        if (failed) return ;
5674                        if ( backtracking==0 ) {
5675                            
5676    
5677                                                            Stack<ItemNode> parents = ((list_scope)list_stack.peek()).parents;
5678    
5679                                                            ItemNode top = parents.isEmpty()?null:parents.peek();
5680    
5681                                                            BaseParentableNode baseParentableNode = ((list_scope)list_stack.peek()).currentParent;
5682    
5683                                                            if (top == null) {
5684                                                                    OrderedListItemNode node = new OrderedListItemNode(((CountLevel_scope)CountLevel_stack.peek()).level, baseParentableNode, elem);
5685                                                                    baseParentableNode.addChildASTNode(node);
5686    
5687                                                                    parents.push(node);
5688    
5689                                                            }
5690                                                            else if (((CountLevel_scope)CountLevel_stack.peek()).level > ((list_scope)list_stack.peek()).lastLevel) {          
5691                                                                    OrderedListNode orderedListNode = new OrderedListNode(top);
5692    
5693                                                                    OrderedListItemNode node = new OrderedListItemNode(((CountLevel_scope)CountLevel_stack.peek()).level, orderedListNode, elem);
5694                                                                    orderedListNode.addChildASTNode(node);
5695    
5696                                                                    top.addChildASTNode(orderedListNode);
5697    
5698                                                                    parents.push(node);
5699                                                            } 
5700                                                            else if (((CountLevel_scope)CountLevel_stack.peek()).level < ((list_scope)list_stack.peek()).lastLevel) {
5701                                                                    ItemNode in = parents.peek();
5702    
5703                                                                    while (in.getLevel() > ((CountLevel_scope)CountLevel_stack.peek()).level) {
5704                                                                            in = parents.pop();
5705                                                                            --((list_scope)list_stack.peek()).lastLevel;
5706                                                                    }
5707    
5708                                                                    top = in;
5709    
5710                                                                    baseParentableNode = top.getBaseParentableNode();
5711    
5712                                                                    OrderedListItemNode node = new OrderedListItemNode(((CountLevel_scope)CountLevel_stack.peek()).level, baseParentableNode, elem);
5713    
5714                                                                    if (baseParentableNode instanceof UnorderedListItemNode) {
5715                                                                            buildAndComposeListNode(baseParentableNode, node, true);
5716                                                                    }
5717                                                                    else if (baseParentableNode instanceof UnorderedListNode) {
5718                                                                            baseParentableNode = ((UnorderedListNode)baseParentableNode).getBaseParentableNode();
5719    
5720                                                                            buildAndComposeListNode(baseParentableNode, node, true);
5721                                                                    }
5722                                                                    else if (baseParentableNode instanceof OrderedListNode && top instanceof UnorderedListItemNode) {
5723                                                                            baseParentableNode = ((OrderedListNode)baseParentableNode).getBaseParentableNode();
5724    
5725                                                                            buildAndComposeListNode(baseParentableNode, node, true);
5726                                                                    }
5727                                                                    else {
5728                                                                            baseParentableNode.addChildASTNode(node);
5729                                                                    }
5730    
5731                                                                    parents.push(node);
5732    
5733                                                            }
5734                                                            else {
5735                                                                    baseParentableNode = top.getBaseParentableNode();
5736    
5737                                                                    OrderedListItemNode node = new OrderedListItemNode(((CountLevel_scope)CountLevel_stack.peek()).level, baseParentableNode, elem);
5738    
5739                                                                    if (baseParentableNode instanceof UnorderedListItemNode) {
5740                                                                            buildAndComposeListNode(baseParentableNode, node, true);
5741                                                                    } 
5742                                                                    else if (baseParentableNode instanceof UnorderedListNode) {
5743                                                                            baseParentableNode = ((UnorderedListNode)baseParentableNode).getBaseParentableNode();
5744    
5745                                                                            buildAndComposeListNode(baseParentableNode, node, true);
5746                                                                    } 
5747                                                                    else if (baseParentableNode instanceof OrderedListNode && top instanceof UnorderedListItemNode) {
5748                                                                            baseParentableNode = ((OrderedListNode)baseParentableNode).getBaseParentableNode();
5749    
5750                                                                            buildAndComposeListNode(baseParentableNode, node, true);
5751                                                                    } 
5752                                                                    else {
5753                                                                            baseParentableNode.addChildASTNode(node);
5754                                                                    }
5755    
5756                                                                    parents.pop();
5757                                                                    parents.push(node);
5758                                                            }
5759    
5760                                                            ((list_scope)list_stack.peek()).lastLevel = ((CountLevel_scope)CountLevel_stack.peek()).level;
5761                                                    
5762                        }
5763    
5764                        }
5765                        break;
5766                    case 2 :
5767                        // Creole10.g:520:4: um= list_unordelem_markup elem= list_elem
5768                        {
5769                        pushFollow(FOLLOW_list_unordelem_markup_in_list_elems1943);
5770                        um=list_unordelem_markup();
5771                        _fsp--;
5772                        if (failed) return ;
5773                        if ( backtracking==0 ) {
5774                          ++((CountLevel_scope)CountLevel_stack.peek()).level; ((CountLevel_scope)CountLevel_stack.peek()).currentMarkup = input.toString(um.start,um.stop);((CountLevel_scope)CountLevel_stack.peek()).groups += input.toString(um.start,um.stop);
5775                        }
5776                        pushFollow(FOLLOW_list_elem_in_list_elems1955);
5777                        elem=list_elem();
5778                        _fsp--;
5779                        if (failed) return ;
5780                        if ( backtracking==0 ) {
5781    
5782    
5783                                                            Stack<ItemNode> parents = ((list_scope)list_stack.peek()).parents;
5784    
5785                                                            ItemNode top = parents.isEmpty()?null:parents.peek();
5786    
5787                                                            BaseParentableNode baseParentableNode = ((list_scope)list_stack.peek()).currentParent;
5788    
5789                                                            if (top == null) {
5790                                                                    UnorderedListItemNode node = new UnorderedListItemNode(((CountLevel_scope)CountLevel_stack.peek()).level, baseParentableNode, elem);
5791                                                                    baseParentableNode.addChildASTNode(node);
5792    
5793                                                                    parents.push(node);
5794    
5795                                                            } 
5796                                                            else if (((CountLevel_scope)CountLevel_stack.peek()).level > ((list_scope)list_stack.peek()).lastLevel) {
5797                                                                    UnorderedListNode unorderedListNode = new UnorderedListNode(top);
5798    
5799                                                                    UnorderedListItemNode node = new UnorderedListItemNode(((CountLevel_scope)CountLevel_stack.peek()).level, unorderedListNode, elem);
5800                                                                    unorderedListNode.addChildASTNode(node);
5801    
5802                                                                    top.addChildASTNode(unorderedListNode);
5803    
5804                                                                    parents.push(node);
5805    
5806                                                            } 
5807                                                            else if (((CountLevel_scope)CountLevel_stack.peek()).level < ((list_scope)list_stack.peek()).lastLevel) {
5808                                                                    ItemNode in = parents.peek();
5809    
5810                                                                    while (in.getLevel() > ((CountLevel_scope)CountLevel_stack.peek()).level) {
5811                                                                            in = parents.pop();
5812                                                                            --((list_scope)list_stack.peek()).lastLevel;
5813                                                                    }
5814    
5815                                                                    top = in;
5816    
5817                                                                    baseParentableNode = top.getBaseParentableNode();
5818    
5819                                                                    UnorderedListItemNode node = new UnorderedListItemNode(((CountLevel_scope)CountLevel_stack.peek()).level, baseParentableNode, elem);
5820    
5821                                                                    if (baseParentableNode instanceof OrderedListItemNode) {
5822                                                                            buildAndComposeListNode(baseParentableNode, node, false);
5823                                                                    } 
5824                                                                    else if (baseParentableNode instanceof OrderedListNode) {
5825                                                                            baseParentableNode = ((OrderedListNode)baseParentableNode).getBaseParentableNode();
5826    
5827                                                                            buildAndComposeListNode(baseParentableNode, node, false);
5828                                                                    }
5829                                                                    else if (baseParentableNode instanceof UnorderedListNode && top instanceof OrderedListItemNode) {
5830                                                                            baseParentableNode = ((UnorderedListNode)baseParentableNode).getBaseParentableNode();
5831    
5832                                                                            buildAndComposeListNode(baseParentableNode, node, false);
5833                                                                    } 
5834                                                                    else {
5835                                                                            baseParentableNode.addChildASTNode(node);
5836                                                                    }
5837    
5838                                                                    parents.push(node);
5839    
5840                                                            } 
5841                                                            else {
5842                                                                    baseParentableNode = top.getBaseParentableNode();
5843    
5844                                                                    UnorderedListItemNode node = new UnorderedListItemNode(((CountLevel_scope)CountLevel_stack.peek()).level, baseParentableNode, elem);
5845    
5846                                                                    if (baseParentableNode instanceof OrderedListItemNode) {
5847                                                                            buildAndComposeListNode(baseParentableNode, node, false);
5848                                                                    } 
5849                                                                    else if (baseParentableNode instanceof OrderedListNode ) {
5850                                                                            baseParentableNode = ((OrderedListNode)baseParentableNode).getBaseParentableNode();
5851    
5852                                                                            buildAndComposeListNode(baseParentableNode, node, false);
5853                                                                    } 
5854                                                                    else if (baseParentableNode instanceof UnorderedListNode && top instanceof OrderedListItemNode) {
5855                                                                            baseParentableNode = ((UnorderedListNode)baseParentableNode).getBaseParentableNode();
5856    
5857                                                                            buildAndComposeListNode(baseParentableNode, node, false);
5858                                                                    } 
5859                                                                    else {
5860                                                                            baseParentableNode.addChildASTNode(node);
5861                                                                    }
5862    
5863                                                                    parents.pop();
5864                                                                    parents.push(node);
5865                                                            }
5866    
5867                                                            ((list_scope)list_stack.peek()).lastLevel = ((CountLevel_scope)CountLevel_stack.peek()).level;
5868                                                    
5869                        }
5870    
5871                        }
5872                        break;
5873    
5874                }
5875            }
5876            catch (RecognitionException re) {
5877                reportError(re);
5878                recover(input,re);
5879            }
5880            finally {
5881                CountLevel_stack.pop();
5882    
5883            }
5884            return ;
5885        }
5886        // $ANTLR end list_elems
5887    
5888    
5889        // $ANTLR start list_elem
5890        // Creole10.g:610:1: list_elem returns [CollectionNode items = null] : (m= list_elem_markup )* c= list_elemcontent list_elemseparator ;
5891        public final CollectionNode list_elem() throws RecognitionException {
5892            CollectionNode items =  null;
5893    
5894            list_elem_markup_return m = null;
5895    
5896            CollectionNode c = null;
5897    
5898    
5899            try {
5900                // Creole10.g:611:2: ( (m= list_elem_markup )* c= list_elemcontent list_elemseparator )
5901                // Creole10.g:611:4: (m= list_elem_markup )* c= list_elemcontent list_elemseparator
5902                {
5903                // Creole10.g:611:4: (m= list_elem_markup )*
5904                loop70:
5905                do {
5906                    int alt70=2;
5907                    int LA70_0 = input.LA(1);
5908    
5909                    if ( (LA70_0==STAR) ) {
5910                        alt70=1;
5911                    }
5912                    else if ( (LA70_0==POUND) ) {
5913                        alt70=1;
5914                    }
5915    
5916    
5917                    switch (alt70) {
5918                    case 1 :
5919                        // Creole10.g:611:6: m= list_elem_markup
5920                        {
5921                        pushFollow(FOLLOW_list_elem_markup_in_list_elem1978);
5922                        m=list_elem_markup();
5923                        _fsp--;
5924                        if (failed) return items;
5925                        if ( backtracking==0 ) {
5926    
5927                                                         ++((CountLevel_scope)CountLevel_stack.peek()).level;
5928                                                         if (!input.toString(m.start,m.stop).equals(((CountLevel_scope)CountLevel_stack.peek()).currentMarkup)) {
5929                                                                            ((CountLevel_scope)CountLevel_stack.peek()).groups+= GROUPING_SEPARATOR;
5930                                                         }
5931                                                         ((CountLevel_scope)CountLevel_stack.peek()).groups+= input.toString(m.start,m.stop);
5932                                                         ((CountLevel_scope)CountLevel_stack.peek()).currentMarkup = input.toString(m.start,m.stop);
5933                                                      
5934                        }
5935    
5936                        }
5937                        break;
5938    
5939                    default :
5940                        break loop70;
5941                    }
5942                } while (true);
5943    
5944                pushFollow(FOLLOW_list_elemcontent_in_list_elem1989);
5945                c=list_elemcontent();
5946                _fsp--;
5947                if (failed) return items;
5948                if ( backtracking==0 ) {
5949                  items = c; 
5950                }
5951                pushFollow(FOLLOW_list_elemseparator_in_list_elem1994);
5952                list_elemseparator();
5953                _fsp--;
5954                if (failed) return items;
5955    
5956                }
5957    
5958            }
5959            catch (RecognitionException re) {
5960                reportError(re);
5961                recover(input,re);
5962            }
5963            finally {
5964            }
5965            return items;
5966        }
5967        // $ANTLR end list_elem
5968    
5969        public static class list_elem_markup_return extends ParserRuleReturnScope {
5970        };
5971    
5972        // $ANTLR start list_elem_markup
5973        // Creole10.g:620:1: list_elem_markup : ( list_ordelem_markup | list_unordelem_markup );
5974        public final list_elem_markup_return list_elem_markup() throws RecognitionException {
5975            list_elem_markup_return retval = new list_elem_markup_return();
5976            retval.start = input.LT(1);
5977    
5978            try {
5979                // Creole10.g:621:2: ( list_ordelem_markup | list_unordelem_markup )
5980                int alt71=2;
5981                int LA71_0 = input.LA(1);
5982    
5983                if ( (LA71_0==POUND) ) {
5984                    alt71=1;
5985                }
5986                else if ( (LA71_0==STAR) ) {
5987                    alt71=2;
5988                }
5989                else {
5990                    if (backtracking>0) {failed=true; return retval;}
5991                    NoViableAltException nvae =
5992                        new NoViableAltException("620:1: list_elem_markup : ( list_ordelem_markup | list_unordelem_markup );", 71, 0, input);
5993    
5994                    throw nvae;
5995                }
5996                switch (alt71) {
5997                    case 1 :
5998                        // Creole10.g:621:4: list_ordelem_markup
5999                        {
6000                        pushFollow(FOLLOW_list_ordelem_markup_in_list_elem_markup2004);
6001                        list_ordelem_markup();
6002                        _fsp--;
6003                        if (failed) return retval;
6004    
6005                        }
6006                        break;
6007                    case 2 :
6008                        // Creole10.g:622:4: list_unordelem_markup
6009                        {
6010                        pushFollow(FOLLOW_list_unordelem_markup_in_list_elem_markup2009);
6011                        list_unordelem_markup();
6012                        _fsp--;
6013                        if (failed) return retval;
6014    
6015                        }
6016                        break;
6017    
6018                }
6019                retval.stop = input.LT(-1);
6020    
6021            }
6022            catch (RecognitionException re) {
6023                reportError(re);
6024                recover(input,re);
6025            }
6026            finally {
6027            }
6028            return retval;
6029        }
6030        // $ANTLR end list_elem_markup
6031    
6032    
6033        // $ANTLR start list_elemcontent
6034        // Creole10.g:624:1: list_elemcontent returns [CollectionNode items = new CollectionNode()] : onestar (part= list_elemcontentpart onestar )* ;
6035        public final CollectionNode list_elemcontent() throws RecognitionException {
6036            CollectionNode items =  new CollectionNode();
6037    
6038            ASTNode part = null;
6039    
6040    
6041            try {
6042                // Creole10.g:625:2: ( onestar (part= list_elemcontentpart onestar )* )
6043                // Creole10.g:625:4: onestar (part= list_elemcontentpart onestar )*
6044                {
6045                pushFollow(FOLLOW_onestar_in_list_elemcontent2023);
6046                onestar();
6047                _fsp--;
6048                if (failed) return items;
6049                // Creole10.g:625:13: (part= list_elemcontentpart onestar )*
6050                loop72:
6051                do {
6052                    int alt72=2;
6053                    int LA72_0 = input.LA(1);
6054    
6055                    if ( ((LA72_0>=FORCED_END_OF_LINE && LA72_0<=WIKI)||(LA72_0>=POUND && LA72_0<=80)) ) {
6056                        alt72=1;
6057                    }
6058    
6059    
6060                    switch (alt72) {
6061                    case 1 :
6062                        // Creole10.g:625:15: part= list_elemcontentpart onestar
6063                        {
6064                        pushFollow(FOLLOW_list_elemcontentpart_in_list_elemcontent2032);
6065                        part=list_elemcontentpart();
6066                        _fsp--;
6067                        if (failed) return items;
6068                        if ( backtracking==0 ) {
6069                           items.add(part); 
6070                        }
6071                        pushFollow(FOLLOW_onestar_in_list_elemcontent2037);
6072                        onestar();
6073                        _fsp--;
6074                        if (failed) return items;
6075    
6076                        }
6077                        break;
6078    
6079                    default :
6080                        break loop72;
6081                    }
6082                } while (true);
6083    
6084    
6085                }
6086    
6087            }
6088            catch (RecognitionException re) {
6089                reportError(re);
6090                recover(input,re);
6091            }
6092            finally {
6093            }
6094            return items;
6095        }
6096        // $ANTLR end list_elemcontent
6097    
6098    
6099        // $ANTLR start list_elemcontentpart
6100        // Creole10.g:627:1: list_elemcontentpart returns [ASTNode node = null] : (tuf= text_unformattedelement | tf= list_formatted_elem );
6101        public final ASTNode list_elemcontentpart() throws RecognitionException {
6102            ASTNode node =  null;
6103    
6104            ASTNode tuf = null;
6105    
6106            CollectionNode tf = null;
6107    
6108    
6109            try {
6110                // Creole10.g:628:2: (tuf= text_unformattedelement | tf= list_formatted_elem )
6111                int alt73=2;
6112                int LA73_0 = input.LA(1);
6113    
6114                if ( ((LA73_0>=FORCED_END_OF_LINE && LA73_0<=WIKI)||LA73_0==POUND||(LA73_0>=EQUAL && LA73_0<=PIPE)||(LA73_0>=LINK_OPEN && LA73_0<=80)) ) {
6115                    alt73=1;
6116                }
6117                else if ( (LA73_0==STAR||LA73_0==ITAL) ) {
6118                    alt73=2;
6119                }
6120                else {
6121                    if (backtracking>0) {failed=true; return node;}
6122                    NoViableAltException nvae =
6123                        new NoViableAltException("627:1: list_elemcontentpart returns [ASTNode node = null] : (tuf= text_unformattedelement | tf= list_formatted_elem );", 73, 0, input);
6124    
6125                    throw nvae;
6126                }
6127                switch (alt73) {
6128                    case 1 :
6129                        // Creole10.g:628:4: tuf= text_unformattedelement
6130                        {
6131                        pushFollow(FOLLOW_text_unformattedelement_in_list_elemcontentpart2058);
6132                        tuf=text_unformattedelement();
6133                        _fsp--;
6134                        if (failed) return node;
6135                        if ( backtracking==0 ) {
6136    
6137                                                    if (tuf instanceof CollectionNode)
6138                                                            node = new UnformattedTextNode(tuf);
6139                                                    else
6140                                                            node = tuf;
6141                                                    
6142                        }
6143    
6144                        }
6145                        break;
6146                    case 2 :
6147                        // Creole10.g:634:4: tf= list_formatted_elem
6148                        {
6149                        pushFollow(FOLLOW_list_formatted_elem_in_list_elemcontentpart2069);
6150                        tf=list_formatted_elem();
6151                        _fsp--;
6152                        if (failed) return node;
6153                        if ( backtracking==0 ) {
6154                           node = new FormattedTextNode(tf);
6155                        }
6156    
6157                        }
6158                        break;
6159    
6160                }
6161            }
6162            catch (RecognitionException re) {
6163                reportError(re);
6164                recover(input,re);
6165            }
6166            finally {
6167            }
6168            return node;
6169        }
6170        // $ANTLR end list_elemcontentpart
6171    
6172    
6173        // $ANTLR start list_formatted_elem
6174        // Creole10.g:636:1: list_formatted_elem returns [CollectionNode contents = new CollectionNode()] : ( bold_markup onestar (boldContents= list_boldcontentpart onestar )* ( bold_markup )? | ital_markup onestar (italContents= list_italcontentpart onestar )* ( ital_markup )? );
6175        public final CollectionNode list_formatted_elem() throws RecognitionException {
6176            CollectionNode contents =  new CollectionNode();
6177    
6178            ASTNode boldContents = null;
6179    
6180            ASTNode italContents = null;
6181    
6182    
6183            try {
6184                // Creole10.g:637:2: ( bold_markup onestar (boldContents= list_boldcontentpart onestar )* ( bold_markup )? | ital_markup onestar (italContents= list_italcontentpart onestar )* ( ital_markup )? )
6185                int alt78=2;
6186                int LA78_0 = input.LA(1);
6187    
6188                if ( (LA78_0==STAR) ) {
6189                    alt78=1;
6190                }
6191                else if ( (LA78_0==ITAL) ) {
6192                    alt78=2;
6193                }
6194                else {
6195                    if (backtracking>0) {failed=true; return contents;}
6196                    NoViableAltException nvae =
6197                        new NoViableAltException("636:1: list_formatted_elem returns [CollectionNode contents = new CollectionNode()] : ( bold_markup onestar (boldContents= list_boldcontentpart onestar )* ( bold_markup )? | ital_markup onestar (italContents= list_italcontentpart onestar )* ( ital_markup )? );", 78, 0, input);
6198    
6199                    throw nvae;
6200                }
6201                switch (alt78) {
6202                    case 1 :
6203                        // Creole10.g:637:4: bold_markup onestar (boldContents= list_boldcontentpart onestar )* ( bold_markup )?
6204                        {
6205                        pushFollow(FOLLOW_bold_markup_in_list_formatted_elem2085);
6206                        bold_markup();
6207                        _fsp--;
6208                        if (failed) return contents;
6209                        pushFollow(FOLLOW_onestar_in_list_formatted_elem2088);
6210                        onestar();
6211                        _fsp--;
6212                        if (failed) return contents;
6213                        // Creole10.g:637:26: (boldContents= list_boldcontentpart onestar )*
6214                        loop74:
6215                        do {
6216                            int alt74=2;
6217                            switch ( input.LA(1) ) {
6218                            case FORCED_END_OF_LINE:
6219                            case HEADING_SECTION:
6220                            case HORIZONTAL_SECTION:
6221                            case LIST_ITEM:
6222                            case LIST_ITEM_PART:
6223                            case NOWIKI_SECTION:
6224                            case SCAPE_NODE:
6225                            case TEXT_NODE:
6226                            case UNORDERED_LIST:
6227                            case UNFORMATTED_TEXT:
6228                            case WIKI:
6229                            case POUND:
6230                            case EQUAL:
6231                            case PIPE:
6232                            case NOWIKI_BLOCK_CLOSE:
6233                            case NOWIKI_CLOSE:
6234                            case LINK_CLOSE:
6235                            case IMAGE_CLOSE:
6236                            case BLANKS:
6237                            case DASH:
6238                            case CR:
6239                            case LF:
6240                            case SPACE:
6241                            case TABULATOR:
6242                            case BRACE_CLOSE:
6243                            case COLON_SLASH:
6244                            case SLASH:
6245                            case INSIGNIFICANT_CHAR:
6246                            case 41:
6247                            case 42:
6248                            case 43:
6249                            case 44:
6250                            case 45:
6251                            case 46:
6252                            case 47:
6253                            case 48:
6254                            case 49:
6255                            case 50:
6256                            case 51:
6257                            case 52:
6258                            case 53:
6259                            case 54:
6260                            case 55:
6261                            case 56:
6262                            case 57:
6263                            case 58:
6264                            case 59:
6265                            case 60:
6266                            case 61:
6267                            case 62:
6268                            case 63:
6269                            case 64:
6270                            case 65:
6271                            case 66:
6272                            case 67:
6273                            case 68:
6274                            case 69:
6275                            case 70:
6276                            case 71:
6277                            case 72:
6278                            case 73:
6279                            case 74:
6280                            case 75:
6281                            case 76:
6282                            case 77:
6283                            case 78:
6284                            case 79:
6285                            case 80:
6286                                {
6287                                alt74=1;
6288                                }
6289                                break;
6290                            case FORCED_LINEBREAK:
6291                                {
6292                                alt74=1;
6293                                }
6294                                break;
6295                            case ESCAPE:
6296                                {
6297                                alt74=1;
6298                                }
6299                                break;
6300                            case LINK_OPEN:
6301                                {
6302                                alt74=1;
6303                                }
6304                                break;
6305                            case IMAGE_OPEN:
6306                                {
6307                                alt74=1;
6308                                }
6309                                break;
6310                            case EXTENSION:
6311                                {
6312                                alt74=1;
6313                                }
6314                                break;
6315                            case NOWIKI_OPEN:
6316                                {
6317                                alt74=1;
6318                                }
6319                                break;
6320                            case ITAL:
6321                                {
6322                                alt74=1;
6323                                }
6324                                break;
6325    
6326                            }
6327    
6328                            switch (alt74) {
6329                            case 1 :
6330                                // Creole10.g:637:28: boldContents= list_boldcontentpart onestar
6331                                {
6332                                pushFollow(FOLLOW_list_boldcontentpart_in_list_formatted_elem2097);
6333                                boldContents=list_boldcontentpart();
6334                                _fsp--;
6335                                if (failed) return contents;
6336                                if ( backtracking==0 ) {
6337    
6338                                                                            BoldTextNode add = null;
6339                                                                            if (boldContents instanceof CollectionNode){
6340                                                                                 add = new BoldTextNode(boldContents);
6341                                                                            }
6342                                                                            else {
6343                                                                                CollectionNode c = new CollectionNode();
6344                                                                                c.add(boldContents);
6345                                                                                add = new BoldTextNode(c);
6346                                                                            }
6347                                                                            contents.add(add);
6348                                                                            
6349                                }
6350                                pushFollow(FOLLOW_onestar_in_list_formatted_elem2106);
6351                                onestar();
6352                                _fsp--;
6353                                if (failed) return contents;
6354    
6355                                }
6356                                break;
6357    
6358                            default :
6359                                break loop74;
6360                            }
6361                        } while (true);
6362    
6363                        // Creole10.g:650:3: ( bold_markup )?
6364                        int alt75=2;
6365                        int LA75_0 = input.LA(1);
6366    
6367                        if ( (LA75_0==STAR) ) {
6368                            int LA75_1 = input.LA(2);
6369    
6370                            if ( (LA75_1==STAR) ) {
6371                                alt75=1;
6372                            }
6373                        }
6374                        switch (alt75) {
6375                            case 1 :
6376                                // Creole10.g:650:5: bold_markup
6377                                {
6378                                pushFollow(FOLLOW_bold_markup_in_list_formatted_elem2115);
6379                                bold_markup();
6380                                _fsp--;
6381                                if (failed) return contents;
6382    
6383                                }
6384                                break;
6385    
6386                        }
6387    
6388    
6389                        }
6390                        break;
6391                    case 2 :
6392                        // Creole10.g:651:4: ital_markup onestar (italContents= list_italcontentpart onestar )* ( ital_markup )?
6393                        {
6394                        pushFollow(FOLLOW_ital_markup_in_list_formatted_elem2123);
6395                        ital_markup();
6396                        _fsp--;
6397                        if (failed) return contents;
6398                        pushFollow(FOLLOW_onestar_in_list_formatted_elem2128);
6399                        onestar();
6400                        _fsp--;
6401                        if (failed) return contents;
6402                        // Creole10.g:651:28: (italContents= list_italcontentpart onestar )*
6403                        loop76:
6404                        do {
6405                            int alt76=2;
6406                            switch ( input.LA(1) ) {
6407                            case STAR:
6408                                {
6409                                alt76=1;
6410                                }
6411                                break;
6412                            case FORCED_END_OF_LINE:
6413                            case HEADING_SECTION:
6414                            case HORIZONTAL_SECTION:
6415                            case LIST_ITEM:
6416                            case LIST_ITEM_PART:
6417                            case NOWIKI_SECTION:
6418                            case SCAPE_NODE:
6419                            case TEXT_NODE:
6420                            case UNORDERED_LIST:
6421                            case UNFORMATTED_TEXT:
6422                            case WIKI:
6423                            case POUND:
6424                            case EQUAL:
6425                            case PIPE:
6426                            case NOWIKI_BLOCK_CLOSE:
6427                            case NOWIKI_CLOSE:
6428                            case LINK_CLOSE:
6429                            case IMAGE_CLOSE:
6430                            case BLANKS:
6431                            case DASH:
6432                            case CR:
6433                            case LF:
6434                            case SPACE:
6435                            case TABULATOR:
6436                            case BRACE_CLOSE:
6437                            case COLON_SLASH:
6438                            case SLASH:
6439                            case INSIGNIFICANT_CHAR:
6440                            case 41:
6441                            case 42:
6442                            case 43:
6443                            case 44:
6444                            case 45:
6445                            case 46:
6446                            case 47:
6447                            case 48:
6448                            case 49:
6449                            case 50:
6450                            case 51:
6451                            case 52:
6452                            case 53:
6453                            case 54:
6454                            case 55:
6455                            case 56:
6456                            case 57:
6457                            case 58:
6458                            case 59:
6459                            case 60:
6460                            case 61:
6461                            case 62:
6462                            case 63:
6463                            case 64:
6464                            case 65:
6465                            case 66:
6466                            case 67:
6467                            case 68:
6468                            case 69:
6469                            case 70:
6470                            case 71:
6471                            case 72:
6472                            case 73:
6473                            case 74:
6474                            case 75:
6475                            case 76:
6476                            case 77:
6477                            case 78:
6478                            case 79:
6479                            case 80:
6480                                {
6481                                alt76=1;
6482                                }
6483                                break;
6484                            case FORCED_LINEBREAK:
6485                                {
6486                                alt76=1;
6487                                }
6488                                break;
6489                            case ESCAPE:
6490                                {
6491                                alt76=1;
6492                                }
6493                                break;
6494                            case LINK_OPEN:
6495                                {
6496                                alt76=1;
6497                                }
6498                                break;
6499                            case IMAGE_OPEN:
6500                                {
6501                                alt76=1;
6502                                }
6503                                break;
6504                            case EXTENSION:
6505                                {
6506                                alt76=1;
6507                                }
6508                                break;
6509                            case NOWIKI_OPEN:
6510                                {
6511                                alt76=1;
6512                                }
6513                                break;
6514    
6515                            }
6516    
6517                            switch (alt76) {
6518                            case 1 :
6519                                // Creole10.g:651:30: italContents= list_italcontentpart onestar
6520                                {
6521                                pushFollow(FOLLOW_list_italcontentpart_in_list_formatted_elem2137);
6522                                italContents=list_italcontentpart();
6523                                _fsp--;
6524                                if (failed) return contents;
6525                                if ( backtracking==0 ) {
6526    
6527                                                                            ItalicTextNode add = null;
6528                                                                            if (italContents instanceof CollectionNode){
6529                                                                                add = new ItalicTextNode(italContents);
6530                                                                            }
6531                                                                            else {
6532                                                                                  CollectionNode c = new CollectionNode();
6533                                                                                  c.add(italContents);
6534                                                                                  add = new ItalicTextNode(c);
6535                                                                            }
6536                                                                            contents.add(add);
6537                                                                            
6538                                }
6539                                pushFollow(FOLLOW_onestar_in_list_formatted_elem2146);
6540                                onestar();
6541                                _fsp--;
6542                                if (failed) return contents;
6543    
6544                                }
6545                                break;
6546    
6547                            default :
6548                                break loop76;
6549                            }
6550                        } while (true);
6551    
6552                        // Creole10.g:663:3: ( ital_markup )?
6553                        int alt77=2;
6554                        int LA77_0 = input.LA(1);
6555    
6556                        if ( (LA77_0==ITAL) ) {
6557                            alt77=1;
6558                        }
6559                        switch (alt77) {
6560                            case 1 :
6561                                // Creole10.g:663:5: ital_markup
6562                                {
6563                                pushFollow(FOLLOW_ital_markup_in_list_formatted_elem2155);
6564                                ital_markup();
6565                                _fsp--;
6566                                if (failed) return contents;
6567    
6568                                }
6569                                break;
6570    
6571                        }
6572    
6573    
6574                        }
6575                        break;
6576    
6577                }
6578            }
6579            catch (RecognitionException re) {
6580                reportError(re);
6581                recover(input,re);
6582            }
6583            finally {
6584            }
6585            return contents;
6586        }
6587        // $ANTLR end list_formatted_elem
6588    
6589        protected static class list_boldcontentpart_scope {
6590            List<ASTNode> elements;
6591        }
6592        protected Stack list_boldcontentpart_stack = new Stack();
6593    
6594    
6595        // $ANTLR start list_boldcontentpart
6596        // Creole10.g:666:1: list_boldcontentpart returns [ASTNode contents = null] : ( ital_markup c= list_bolditalcontent ( ital_markup )? | (t= text_unformattedelement )+ );
6597        public final ASTNode list_boldcontentpart() throws RecognitionException {
6598            list_boldcontentpart_stack.push(new list_boldcontentpart_scope());
6599            ASTNode contents =  null;
6600    
6601            ASTNode c = null;
6602    
6603            ASTNode t = null;
6604    
6605    
6606    
6607                    ((list_boldcontentpart_scope)list_boldcontentpart_stack.peek()).elements = new ArrayList<ASTNode>();
6608    
6609            try {
6610                // Creole10.g:673:2: ( ital_markup c= list_bolditalcontent ( ital_markup )? | (t= text_unformattedelement )+ )
6611                int alt81=2;
6612                int LA81_0 = input.LA(1);
6613    
6614                if ( (LA81_0==ITAL) ) {
6615                    alt81=1;
6616                }
6617                else if ( ((LA81_0>=FORCED_END_OF_LINE && LA81_0<=WIKI)||LA81_0==POUND||(LA81_0>=EQUAL && LA81_0<=PIPE)||(LA81_0>=LINK_OPEN && LA81_0<=80)) ) {
6618                    alt81=2;
6619                }
6620                else {
6621                    if (backtracking>0) {failed=true; return contents;}
6622                    NoViableAltException nvae =
6623                        new NoViableAltException("666:1: list_boldcontentpart returns [ASTNode contents = null] : ( ital_markup c= list_bolditalcontent ( ital_markup )? | (t= text_unformattedelement )+ );", 81, 0, input);
6624    
6625                    throw nvae;
6626                }
6627                switch (alt81) {
6628                    case 1 :
6629                        // Creole10.g:673:4: ital_markup c= list_bolditalcontent ( ital_markup )?
6630                        {
6631                        pushFollow(FOLLOW_ital_markup_in_list_boldcontentpart2181);
6632                        ital_markup();
6633                        _fsp--;
6634                        if (failed) return contents;
6635                        pushFollow(FOLLOW_list_bolditalcontent_in_list_boldcontentpart2188);
6636                        c=list_bolditalcontent();
6637                        _fsp--;
6638                        if (failed) return contents;
6639                        if ( backtracking==0 ) {
6640                          contents = new ItalicTextNode(c);
6641                        }
6642                        // Creole10.g:673:86: ( ital_markup )?
6643                        int alt79=2;
6644                        int LA79_0 = input.LA(1);
6645    
6646                        if ( (LA79_0==ITAL) ) {
6647                            alt79=1;
6648                        }
6649                        switch (alt79) {
6650                            case 1 :
6651                                // Creole10.g:673:88: ital_markup
6652                                {
6653                                pushFollow(FOLLOW_ital_markup_in_list_boldcontentpart2195);
6654                                ital_markup();
6655                                _fsp--;
6656                                if (failed) return contents;
6657    
6658                                }
6659                                break;
6660    
6661                        }
6662    
6663    
6664                        }
6665                        break;
6666                    case 2 :
6667                        // Creole10.g:674:4: (t= text_unformattedelement )+
6668                        {
6669                        // Creole10.g:674:4: (t= text_unformattedelement )+
6670                        int cnt80=0;
6671                        loop80:
6672                        do {
6673                            int alt80=2;
6674                            switch ( input.LA(1) ) {
6675                            case FORCED_END_OF_LINE:
6676                            case HEADING_SECTION:
6677                            case HORIZONTAL_SECTION:
6678                            case LIST_ITEM:
6679                            case LIST_ITEM_PART:
6680                            case NOWIKI_SECTION:
6681                            case SCAPE_NODE:
6682                            case TEXT_NODE:
6683                            case UNORDERED_LIST:
6684                            case UNFORMATTED_TEXT:
6685                            case WIKI:
6686                            case POUND:
6687                            case EQUAL:
6688                            case PIPE:
6689                            case NOWIKI_BLOCK_CLOSE:
6690                            case NOWIKI_CLOSE:
6691                            case LINK_CLOSE:
6692                            case IMAGE_CLOSE:
6693                            case BLANKS:
6694                            case DASH:
6695                            case CR:
6696                            case LF:
6697                            case SPACE:
6698                            case TABULATOR:
6699                            case BRACE_CLOSE:
6700                            case COLON_SLASH:
6701                            case SLASH:
6702                            case INSIGNIFICANT_CHAR:
6703                            case 41:
6704                            case 42:
6705                            case 43:
6706                            case 44:
6707                            case 45:
6708                            case 46:
6709                            case 47:
6710                            case 48:
6711                            case 49:
6712                            case 50:
6713                            case 51:
6714                            case 52:
6715                            case 53:
6716                            case 54:
6717                            case 55:
6718                            case 56:
6719                            case 57:
6720                            case 58:
6721                            case 59:
6722                            case 60:
6723                            case 61:
6724                            case 62:
6725                            case 63:
6726                            case 64:
6727                            case 65:
6728                            case 66:
6729                            case 67:
6730                            case 68:
6731                            case 69:
6732                            case 70:
6733                            case 71:
6734                            case 72:
6735                            case 73:
6736                            case 74:
6737                            case 75:
6738                            case 76:
6739                            case 77:
6740                            case 78:
6741                            case 79:
6742                            case 80:
6743                                {
6744                                alt80=1;
6745                                }
6746                                break;
6747                            case FORCED_LINEBREAK:
6748                                {
6749                                alt80=1;
6750                                }
6751                                break;
6752                            case ESCAPE:
6753                                {
6754                                alt80=1;
6755                                }
6756                                break;
6757                            case LINK_OPEN:
6758                                {
6759                                alt80=1;
6760                                }
6761                                break;
6762                            case IMAGE_OPEN:
6763                                {
6764                                alt80=1;
6765                                }
6766                                break;
6767                            case EXTENSION:
6768                                {
6769                                alt80=1;
6770                                }
6771                                break;
6772                            case NOWIKI_OPEN:
6773                                {
6774                                alt80=1;
6775                                }
6776                                break;
6777    
6778                            }
6779    
6780                            switch (alt80) {
6781                            case 1 :
6782                                // Creole10.g:674:6: t= text_unformattedelement
6783                                {
6784                                pushFollow(FOLLOW_text_unformattedelement_in_list_boldcontentpart2209);
6785                                t=text_unformattedelement();
6786                                _fsp--;
6787                                if (failed) return contents;
6788                                if ( backtracking==0 ) {
6789                                   ((list_boldcontentpart_scope)list_boldcontentpart_stack.peek()).elements.add(t); 
6790                                }
6791    
6792                                }
6793                                break;
6794    
6795                            default :
6796                                if ( cnt80 >= 1 ) break loop80;
6797                                if (backtracking>0) {failed=true; return contents;}
6798                                    EarlyExitException eee =
6799                                        new EarlyExitException(80, input);
6800                                    throw eee;
6801                            }
6802                            cnt80++;
6803                        } while (true);
6804    
6805                        if ( backtracking==0 ) {
6806                          contents = new CollectionNode(((list_boldcontentpart_scope)list_boldcontentpart_stack.peek()).elements); 
6807                        }
6808    
6809                        }
6810                        break;
6811    
6812                }
6813            }
6814            catch (RecognitionException re) {
6815                reportError(re);
6816                recover(input,re);
6817            }
6818            finally {
6819                list_boldcontentpart_stack.pop();
6820            }
6821            return contents;
6822        }
6823        // $ANTLR end list_boldcontentpart
6824    
6825    
6826        // $ANTLR start list_bolditalcontent
6827        // Creole10.g:678:1: list_bolditalcontent returns [ASTNode text = null] : (t= text_unformattedelement )+ ;
6828        public final ASTNode list_bolditalcontent() throws RecognitionException {
6829            ASTNode text =  null;
6830    
6831            ASTNode t = null;
6832    
6833    
6834            try {
6835                // Creole10.g:679:2: ( (t= text_unformattedelement )+ )
6836                // Creole10.g:679:4: (t= text_unformattedelement )+
6837                {
6838                // Creole10.g:679:4: (t= text_unformattedelement )+
6839                int cnt82=0;
6840                loop82:
6841                do {
6842                    int alt82=2;
6843                    switch ( input.LA(1) ) {
6844                    case FORCED_END_OF_LINE:
6845                    case HEADING_SECTION:
6846                    case HORIZONTAL_SECTION:
6847                    case LIST_ITEM:
6848                    case LIST_ITEM_PART:
6849                    case NOWIKI_SECTION:
6850                    case SCAPE_NODE:
6851                    case TEXT_NODE:
6852                    case UNORDERED_LIST:
6853                    case UNFORMATTED_TEXT:
6854                    case WIKI:
6855                    case POUND:
6856                    case EQUAL:
6857                    case PIPE:
6858                    case NOWIKI_BLOCK_CLOSE:
6859                    case NOWIKI_CLOSE:
6860                    case LINK_CLOSE:
6861                    case IMAGE_CLOSE:
6862                    case BLANKS:
6863                    case DASH:
6864                    case CR:
6865                    case LF:
6866                    case SPACE:
6867                    case TABULATOR:
6868                    case BRACE_CLOSE:
6869                    case COLON_SLASH:
6870                    case SLASH:
6871                    case INSIGNIFICANT_CHAR:
6872                    case 41:
6873                    case 42:
6874                    case 43:
6875                    case 44:
6876                    case 45:
6877                    case 46:
6878                    case 47:
6879                    case 48:
6880                    case 49:
6881                    case 50:
6882                    case 51:
6883                    case 52:
6884                    case 53:
6885                    case 54:
6886                    case 55:
6887                    case 56:
6888                    case 57:
6889                    case 58:
6890                    case 59:
6891                    case 60:
6892                    case 61:
6893                    case 62:
6894                    case 63:
6895                    case 64:
6896                    case 65:
6897                    case 66:
6898                    case 67:
6899                    case 68:
6900                    case 69:
6901                    case 70:
6902                    case 71:
6903                    case 72:
6904                    case 73:
6905                    case 74:
6906                    case 75:
6907                    case 76:
6908                    case 77:
6909                    case 78:
6910                    case 79:
6911                    case 80:
6912                        {
6913                        alt82=1;
6914                        }
6915                        break;
6916                    case FORCED_LINEBREAK:
6917                        {
6918                        alt82=1;
6919                        }
6920                        break;
6921                    case ESCAPE:
6922                        {
6923                        alt82=1;
6924                        }
6925                        break;
6926                    case LINK_OPEN:
6927                        {
6928                        alt82=1;
6929                        }
6930                        break;
6931                    case IMAGE_OPEN:
6932                        {
6933                        alt82=1;
6934                        }
6935                        break;
6936                    case EXTENSION:
6937                        {
6938                        alt82=1;
6939                        }
6940                        break;
6941                    case NOWIKI_OPEN:
6942                        {
6943                        alt82=1;
6944                        }
6945                        break;
6946    
6947                    }
6948    
6949                    switch (alt82) {
6950                    case 1 :
6951                        // Creole10.g:679:6: t= text_unformattedelement
6952                        {
6953                        pushFollow(FOLLOW_text_unformattedelement_in_list_bolditalcontent2240);
6954                        t=text_unformattedelement();
6955                        _fsp--;
6956                        if (failed) return text;
6957                        if ( backtracking==0 ) {
6958                           text = t; 
6959                        }
6960    
6961                        }
6962                        break;
6963    
6964                    default :
6965                        if ( cnt82 >= 1 ) break loop82;
6966                        if (backtracking>0) {failed=true; return text;}
6967                            EarlyExitException eee =
6968                                new EarlyExitException(82, input);
6969                            throw eee;
6970                    }
6971                    cnt82++;
6972                } while (true);
6973    
6974    
6975                }
6976    
6977            }
6978            catch (RecognitionException re) {
6979                reportError(re);
6980                recover(input,re);
6981            }
6982            finally {
6983            }
6984            return text;
6985        }
6986        // $ANTLR end list_bolditalcontent
6987    
6988        protected static class list_italcontentpart_scope {
6989            List<ASTNode> elements;
6990        }
6991        protected Stack list_italcontentpart_stack = new Stack();
6992    
6993    
6994        // $ANTLR start list_italcontentpart
6995        // Creole10.g:682:1: list_italcontentpart returns [ASTNode contents = null] : ( bold_markup c= list_bolditalcontent ( bold_markup )? | (t= text_unformattedelement )+ );
6996        public final ASTNode list_italcontentpart() throws RecognitionException {
6997            list_italcontentpart_stack.push(new list_italcontentpart_scope());
6998            ASTNode contents =  null;
6999    
7000            ASTNode c = null;
7001    
7002            ASTNode t = null;
7003    
7004    
7005    
7006                    ((list_italcontentpart_scope)list_italcontentpart_stack.peek()).elements = new ArrayList<ASTNode>();
7007    
7008            try {
7009                // Creole10.g:689:2: ( bold_markup c= list_bolditalcontent ( bold_markup )? | (t= text_unformattedelement )+ )
7010                int alt85=2;
7011                int LA85_0 = input.LA(1);
7012    
7013                if ( (LA85_0==STAR) ) {
7014                    alt85=1;
7015                }
7016                else if ( ((LA85_0>=FORCED_END_OF_LINE && LA85_0<=WIKI)||LA85_0==POUND||(LA85_0>=EQUAL && LA85_0<=PIPE)||(LA85_0>=LINK_OPEN && LA85_0<=80)) ) {
7017                    alt85=2;
7018                }
7019                else {
7020                    if (backtracking>0) {failed=true; return contents;}
7021                    NoViableAltException nvae =
7022                        new NoViableAltException("682:1: list_italcontentpart returns [ASTNode contents = null] : ( bold_markup c= list_bolditalcontent ( bold_markup )? | (t= text_unformattedelement )+ );", 85, 0, input);
7023    
7024                    throw nvae;
7025                }
7026                switch (alt85) {
7027                    case 1 :
7028                        // Creole10.g:689:4: bold_markup c= list_bolditalcontent ( bold_markup )?
7029                        {
7030                        pushFollow(FOLLOW_bold_markup_in_list_italcontentpart2268);
7031                        bold_markup();
7032                        _fsp--;
7033                        if (failed) return contents;
7034                        pushFollow(FOLLOW_list_bolditalcontent_in_list_italcontentpart2275);
7035                        c=list_bolditalcontent();
7036                        _fsp--;
7037                        if (failed) return contents;
7038                        if ( backtracking==0 ) {
7039                           contents = new BoldTextNode(c); 
7040                        }
7041                        // Creole10.g:689:86: ( bold_markup )?
7042                        int alt83=2;
7043                        int LA83_0 = input.LA(1);
7044    
7045                        if ( (LA83_0==STAR) ) {
7046                            int LA83_1 = input.LA(2);
7047    
7048                            if ( (LA83_1==STAR) ) {
7049                                alt83=1;
7050                            }
7051                        }
7052                        switch (alt83) {
7053                            case 1 :
7054                                // Creole10.g:689:88: bold_markup
7055                                {
7056                                pushFollow(FOLLOW_bold_markup_in_list_italcontentpart2282);
7057                                bold_markup();
7058                                _fsp--;
7059                                if (failed) return contents;
7060    
7061                                }
7062                                break;
7063    
7064                        }
7065    
7066    
7067                        }
7068                        break;
7069                    case 2 :
7070                        // Creole10.g:690:4: (t= text_unformattedelement )+
7071                        {
7072                        // Creole10.g:690:4: (t= text_unformattedelement )+
7073                        int cnt84=0;
7074                        loop84:
7075                        do {
7076                            int alt84=2;
7077                            switch ( input.LA(1) ) {
7078                            case FORCED_END_OF_LINE:
7079                            case HEADING_SECTION:
7080                            case HORIZONTAL_SECTION:
7081                            case LIST_ITEM:
7082                            case LIST_ITEM_PART:
7083                            case NOWIKI_SECTION:
7084                            case SCAPE_NODE:
7085                            case TEXT_NODE:
7086                            case UNORDERED_LIST:
7087                            case UNFORMATTED_TEXT:
7088                            case WIKI:
7089                            case POUND:
7090                            case EQUAL:
7091                            case PIPE:
7092                            case NOWIKI_BLOCK_CLOSE:
7093                            case NOWIKI_CLOSE:
7094                            case LINK_CLOSE:
7095                            case IMAGE_CLOSE:
7096                            case BLANKS:
7097                            case DASH:
7098                            case CR:
7099                            case LF:
7100                            case SPACE:
7101                            case TABULATOR:
7102                            case BRACE_CLOSE:
7103                            case COLON_SLASH:
7104                            case SLASH:
7105                            case INSIGNIFICANT_CHAR:
7106                            case 41:
7107                            case 42:
7108                            case 43:
7109                            case 44:
7110                            case 45:
7111                            case 46:
7112                            case 47:
7113                            case 48:
7114                            case 49:
7115                            case 50:
7116                            case 51:
7117                            case 52:
7118                            case 53:
7119                            case 54:
7120                            case 55:
7121                            case 56:
7122                            case 57:
7123                            case 58:
7124                            case 59:
7125                            case 60:
7126                            case 61:
7127                            case 62:
7128                            case 63:
7129                            case 64:
7130                            case 65:
7131                            case 66:
7132                            case 67:
7133                            case 68:
7134                            case 69:
7135                            case 70:
7136                            case 71:
7137                            case 72:
7138                            case 73:
7139                            case 74:
7140                            case 75:
7141                            case 76:
7142                            case 77:
7143                            case 78:
7144                            case 79:
7145                            case 80:
7146                                {
7147                                alt84=1;
7148                                }
7149                                break;
7150                            case FORCED_LINEBREAK:
7151                                {
7152                                alt84=1;
7153                                }
7154                                break;
7155                            case ESCAPE:
7156                                {
7157                                alt84=1;
7158                                }
7159                                break;
7160                            case LINK_OPEN:
7161                                {
7162                                alt84=1;
7163                                }
7164                                break;
7165                            case IMAGE_OPEN:
7166                                {
7167                                alt84=1;
7168                                }
7169                                break;
7170                            case EXTENSION:
7171                                {
7172                                alt84=1;
7173                                }
7174                                break;
7175                            case NOWIKI_OPEN:
7176                                {
7177                                alt84=1;
7178                                }
7179                                break;
7180    
7181                            }
7182    
7183                            switch (alt84) {
7184                            case 1 :
7185                                // Creole10.g:690:6: t= text_unformattedelement
7186                                {
7187                                pushFollow(FOLLOW_text_unformattedelement_in_list_italcontentpart2296);
7188                                t=text_unformattedelement();
7189                                _fsp--;
7190                                if (failed) return contents;
7191                                if ( backtracking==0 ) {
7192                                   ((list_italcontentpart_scope)list_italcontentpart_stack.peek()).elements.add(t); 
7193                                }
7194    
7195                                }
7196                                break;
7197    
7198                            default :
7199                                if ( cnt84 >= 1 ) break loop84;
7200                                if (backtracking>0) {failed=true; return contents;}
7201                                    EarlyExitException eee =
7202                                        new EarlyExitException(84, input);
7203                                    throw eee;
7204                            }
7205                            cnt84++;
7206                        } while (true);
7207    
7208                        if ( backtracking==0 ) {
7209                           contents = new CollectionNode(((list_italcontentpart_scope)list_italcontentpart_stack.peek()).elements); 
7210                        }
7211    
7212                        }
7213                        break;
7214    
7215                }
7216            }
7217            catch (RecognitionException re) {
7218                reportError(re);
7219                recover(input,re);
7220            }
7221            finally {
7222                list_italcontentpart_stack.pop();
7223            }
7224            return contents;
7225        }
7226        // $ANTLR end list_italcontentpart
7227    
7228    
7229        // $ANTLR start table
7230        // Creole10.g:694:1: table returns [TableNode table = new TableNode()] : (tr= table_row )+ ;
7231        public final TableNode table() throws RecognitionException {
7232            TableNode table =  new TableNode();
7233    
7234            CollectionNode tr = null;
7235    
7236    
7237            try {
7238                // Creole10.g:695:2: ( (tr= table_row )+ )
7239                // Creole10.g:695:4: (tr= table_row )+
7240                {
7241                // Creole10.g:695:4: (tr= table_row )+
7242                int cnt86=0;
7243                loop86:
7244                do {
7245                    int alt86=2;
7246                    int LA86_0 = input.LA(1);
7247    
7248                    if ( (LA86_0==PIPE) ) {
7249                        alt86=1;
7250                    }
7251    
7252    
7253                    switch (alt86) {
7254                    case 1 :
7255                        // Creole10.g:695:6: tr= table_row
7256                        {
7257                        pushFollow(FOLLOW_table_row_in_table2324);
7258                        tr=table_row();
7259                        _fsp--;
7260                        if (failed) return table;
7261                        if ( backtracking==0 ) {
7262                          table.addChildASTNode(tr);
7263                        }
7264    
7265                        }
7266                        break;
7267    
7268                    default :
7269                        if ( cnt86 >= 1 ) break loop86;
7270                        if (backtracking>0) {failed=true; return table;}
7271                            EarlyExitException eee =
7272                                new EarlyExitException(86, input);
7273                            throw eee;
7274                    }
7275                    cnt86++;
7276                } while (true);
7277    
7278    
7279                }
7280    
7281            }
7282            catch (RecognitionException re) {
7283                reportError(re);
7284                recover(input,re);
7285            }
7286            finally {
7287            }
7288            return table;
7289        }
7290        // $ANTLR end table
7291    
7292    
7293        // $ANTLR start table_row
7294        // Creole10.g:697:1: table_row returns [CollectionNode row = new CollectionNode()] : (tc= table_cell )+ table_rowseparator ;
7295        public final CollectionNode table_row() throws RecognitionException {
7296            CollectionNode row =  new CollectionNode();
7297    
7298            TableCellNode tc = null;
7299    
7300    
7301            try {
7302                // Creole10.g:698:2: ( (tc= table_cell )+ table_rowseparator )
7303                // Creole10.g:698:4: (tc= table_cell )+ table_rowseparator
7304                {
7305                // Creole10.g:698:4: (tc= table_cell )+
7306                int cnt87=0;
7307                loop87:
7308                do {
7309                    int alt87=2;
7310                    int LA87_0 = input.LA(1);
7311    
7312                    if ( (LA87_0==PIPE) ) {
7313                        alt87=1;
7314                    }
7315    
7316    
7317                    switch (alt87) {
7318                    case 1 :
7319                        // Creole10.g:698:6: tc= table_cell
7320                        {
7321                        pushFollow(FOLLOW_table_cell_in_table_row2350);
7322                        tc=table_cell();
7323                        _fsp--;
7324                        if (failed) return row;
7325                        if ( backtracking==0 ) {
7326                           row.add(tc); 
7327                        }
7328    
7329                        }
7330                        break;
7331    
7332                    default :
7333                        if ( cnt87 >= 1 ) break loop87;
7334                        if (backtracking>0) {failed=true; return row;}
7335                            EarlyExitException eee =
7336                                new EarlyExitException(87, input);
7337                            throw eee;
7338                    }
7339                    cnt87++;
7340                } while (true);
7341    
7342                pushFollow(FOLLOW_table_rowseparator_in_table_row2358);
7343                table_rowseparator();
7344                _fsp--;
7345                if (failed) return row;
7346    
7347                }
7348    
7349            }
7350            catch (RecognitionException re) {
7351                reportError(re);
7352                recover(input,re);
7353            }
7354            finally {
7355            }
7356            return row;
7357        }
7358        // $ANTLR end table_row
7359    
7360    
7361        // $ANTLR start table_cell
7362        // Creole10.g:700:1: table_cell returns [TableCellNode cell = null] : ({...}?th= table_headercell | tc= table_normalcell );
7363        public final TableCellNode table_cell() throws RecognitionException {
7364            TableCellNode cell =  null;
7365    
7366            TableHeaderNode th = null;
7367    
7368            TableDataNode tc = null;
7369    
7370    
7371            try {
7372                // Creole10.g:701:2: ({...}?th= table_headercell | tc= table_normalcell )
7373                int alt88=2;
7374                int LA88_0 = input.LA(1);
7375    
7376                if ( (LA88_0==PIPE) ) {
7377                    int LA88_1 = input.LA(2);
7378    
7379                    if ( (LA88_1==EQUAL) ) {
7380                        int LA88_2 = input.LA(3);
7381    
7382                        if ( ( input.LA(2) == EQUAL ) ) {
7383                            alt88=1;
7384                        }
7385                        else if ( (true) ) {
7386                            alt88=2;
7387                        }
7388                        else {
7389                            if (backtracking>0) {failed=true; return cell;}
7390                            NoViableAltException nvae =
7391                                new NoViableAltException("700:1: table_cell returns [TableCellNode cell = null] : ({...}?th= table_headercell | tc= table_normalcell );", 88, 2, input);
7392    
7393                            throw nvae;
7394                        }
7395                    }
7396                    else if ( (LA88_1==EOF||(LA88_1>=FORCED_END_OF_LINE && LA88_1<=STAR)||(LA88_1>=PIPE && LA88_1<=80)) ) {
7397                        alt88=2;
7398                    }
7399                    else {
7400                        if (backtracking>0) {failed=true; return cell;}
7401                        NoViableAltException nvae =
7402                            new NoViableAltException("700:1: table_cell returns [TableCellNode cell = null] : ({...}?th= table_headercell | tc= table_normalcell );", 88, 1, input);
7403    
7404                        throw nvae;
7405                    }
7406                }
7407                else {
7408                    if (backtracking>0) {failed=true; return cell;}
7409                    NoViableAltException nvae =
7410                        new NoViableAltException("700:1: table_cell returns [TableCellNode cell = null] : ({...}?th= table_headercell | tc= table_normalcell );", 88, 0, input);
7411    
7412                    throw nvae;
7413                }
7414                switch (alt88) {
7415                    case 1 :
7416                        // Creole10.g:701:4: {...}?th= table_headercell
7417                        {
7418                        if ( !( input.LA(2) == EQUAL ) ) {
7419                            if (backtracking>0) {failed=true; return cell;}
7420                            throw new FailedPredicateException(input, "table_cell", " input.LA(2) == EQUAL ");
7421                        }
7422                        pushFollow(FOLLOW_table_headercell_in_table_cell2379);
7423                        th=table_headercell();
7424                        _fsp--;
7425                        if (failed) return cell;
7426                        if ( backtracking==0 ) {
7427                          cell = th;
7428                        }
7429    
7430                        }
7431                        break;
7432                    case 2 :
7433                        // Creole10.g:702:4: tc= table_normalcell
7434                        {
7435                        pushFollow(FOLLOW_table_normalcell_in_table_cell2390);
7436                        tc=table_normalcell();
7437                        _fsp--;
7438                        if (failed) return cell;
7439                        if ( backtracking==0 ) {
7440                          cell = tc; 
7441                        }
7442    
7443                        }
7444                        break;
7445    
7446                }
7447            }
7448            catch (RecognitionException re) {
7449                reportError(re);
7450                recover(input,re);
7451            }
7452            finally {
7453            }
7454            return cell;
7455        }
7456        // $ANTLR end table_cell
7457    
7458    
7459        // $ANTLR start table_headercell
7460        // Creole10.g:704:1: table_headercell returns [TableHeaderNode header = null] : table_headercell_markup tc= table_cellcontent ;
7461        public final TableHeaderNode table_headercell() throws RecognitionException {
7462            TableHeaderNode header =  null;
7463    
7464            CollectionNode tc = null;
7465    
7466    
7467            try {
7468                // Creole10.g:705:2: ( table_headercell_markup tc= table_cellcontent )
7469                // Creole10.g:705:4: table_headercell_markup tc= table_cellcontent
7470                {
7471                pushFollow(FOLLOW_table_headercell_markup_in_table_headercell2406);
7472                table_headercell_markup();
7473                _fsp--;
7474                if (failed) return header;
7475                pushFollow(FOLLOW_table_cellcontent_in_table_headercell2413);
7476                tc=table_cellcontent();
7477                _fsp--;
7478                if (failed) return header;
7479                if ( backtracking==0 ) {
7480                  header = new TableHeaderNode(tc);
7481                }
7482    
7483                }
7484    
7485            }
7486            catch (RecognitionException re) {
7487                reportError(re);
7488                recover(input,re);
7489            }
7490            finally {
7491            }
7492            return header;
7493        }
7494        // $ANTLR end table_headercell
7495    
7496    
7497        // $ANTLR start table_normalcell
7498        // Creole10.g:707:1: table_normalcell returns [TableDataNode cell = null] : table_cell_markup tc= table_cellcontent ;
7499        public final TableDataNode table_normalcell() throws RecognitionException {
7500            TableDataNode cell =  null;
7501    
7502            CollectionNode tc = null;
7503    
7504    
7505            try {
7506                // Creole10.g:708:2: ( table_cell_markup tc= table_cellcontent )
7507                // Creole10.g:708:4: table_cell_markup tc= table_cellcontent
7508                {
7509                pushFollow(FOLLOW_table_cell_markup_in_table_normalcell2429);
7510                table_cell_markup();
7511                _fsp--;
7512                if (failed) return cell;
7513                pushFollow(FOLLOW_table_cellcontent_in_table_normalcell2436);
7514                tc=table_cellcontent();
7515                _fsp--;
7516                if (failed) return cell;
7517                if ( backtracking==0 ) {
7518                   cell = new TableDataNode(tc); 
7519                }
7520    
7521                }
7522    
7523            }
7524            catch (RecognitionException re) {
7525                reportError(re);
7526                recover(input,re);
7527            }
7528            finally {
7529            }
7530            return cell;
7531        }
7532        // $ANTLR end table_normalcell
7533    
7534    
7535        // $ANTLR start table_cellcontent
7536        // Creole10.g:710:1: table_cellcontent returns [CollectionNode items = new CollectionNode()] : onestar (tcp= table_cellcontentpart onestar )* ;
7537        public final CollectionNode table_cellcontent() throws RecognitionException {
7538            CollectionNode items =  new CollectionNode();
7539    
7540            ASTNode tcp = null;
7541    
7542    
7543            try {
7544                // Creole10.g:711:2: ( onestar (tcp= table_cellcontentpart onestar )* )
7545                // Creole10.g:711:4: onestar (tcp= table_cellcontentpart onestar )*
7546                {
7547                pushFollow(FOLLOW_onestar_in_table_cellcontent2452);
7548                onestar();
7549                _fsp--;
7550                if (failed) return items;
7551                // Creole10.g:711:13: (tcp= table_cellcontentpart onestar )*
7552                loop89:
7553                do {
7554                    int alt89=2;
7555                    int LA89_0 = input.LA(1);
7556    
7557                    if ( ((LA89_0>=FORCED_END_OF_LINE && LA89_0<=WIKI)||(LA89_0>=POUND && LA89_0<=EQUAL)||(LA89_0>=ITAL && LA89_0<=80)) ) {
7558                        alt89=1;
7559                    }
7560    
7561    
7562                    switch (alt89) {
7563                    case 1 :
7564                        // Creole10.g:711:15: tcp= table_cellcontentpart onestar
7565                        {
7566                        pushFollow(FOLLOW_table_cellcontentpart_in_table_cellcontent2461);
7567                        tcp=table_cellcontentpart();
7568                        _fsp--;
7569                        if (failed) return items;
7570                        if ( backtracking==0 ) {
7571    
7572                                            if (tcp != null) {
7573                                                    items.add(tcp);
7574                                            }
7575                                    
7576                        }
7577                        pushFollow(FOLLOW_onestar_in_table_cellcontent2468);
7578                        onestar();
7579                        _fsp--;
7580                        if (failed) return items;
7581    
7582                        }
7583                        break;
7584    
7585                    default :
7586                        break loop89;
7587                    }
7588                } while (true);
7589    
7590    
7591                }
7592    
7593            }
7594            catch (RecognitionException re) {
7595                reportError(re);
7596                recover(input,re);
7597            }
7598            finally {
7599            }
7600            return items;
7601        }
7602        // $ANTLR end table_cellcontent
7603    
7604    
7605        // $ANTLR start table_cellcontentpart
7606        // Creole10.g:718:1: table_cellcontentpart returns [ASTNode node = null] : (tf= table_formattedelement | tu= table_unformattedelement );
7607        public final ASTNode table_cellcontentpart() throws RecognitionException {
7608            ASTNode node =  null;
7609    
7610            ASTNode tf = null;
7611    
7612            ASTNode tu = null;
7613    
7614    
7615            try {
7616                // Creole10.g:719:2: (tf= table_formattedelement | tu= table_unformattedelement )
7617                int alt90=2;
7618                int LA90_0 = input.LA(1);
7619    
7620                if ( (LA90_0==STAR||LA90_0==ITAL) ) {
7621                    alt90=1;
7622                }
7623                else if ( ((LA90_0>=FORCED_END_OF_LINE && LA90_0<=WIKI)||LA90_0==POUND||LA90_0==EQUAL||(LA90_0>=LINK_OPEN && LA90_0<=80)) ) {
7624                    alt90=2;
7625                }
7626                else {
7627                    if (backtracking>0) {failed=true; return node;}
7628                    NoViableAltException nvae =
7629                        new NoViableAltException("718:1: table_cellcontentpart returns [ASTNode node = null] : (tf= table_formattedelement | tu= table_unformattedelement );", 90, 0, input);
7630    
7631                    throw nvae;
7632                }
7633                switch (alt90) {
7634                    case 1 :
7635                        // Creole10.g:719:4: tf= table_formattedelement
7636                        {
7637                        pushFollow(FOLLOW_table_formattedelement_in_table_cellcontentpart2489);
7638                        tf=table_formattedelement();
7639                        _fsp--;
7640                        if (failed) return node;
7641                        if ( backtracking==0 ) {
7642                          node =tf;
7643                        }
7644    
7645                        }
7646                        break;
7647                    case 2 :
7648                        // Creole10.g:720:4: tu= table_unformattedelement
7649                        {
7650                        pushFollow(FOLLOW_table_unformattedelement_in_table_cellcontentpart2500);
7651                        tu=table_unformattedelement();
7652                        _fsp--;
7653                        if (failed) return node;
7654                        if ( backtracking==0 ) {
7655                          node =tu;
7656                        }
7657    
7658                        }
7659                        break;
7660    
7661                }
7662            }
7663            catch (RecognitionException re) {
7664                reportError(re);
7665                recover(input,re);
7666            }
7667            finally {
7668            }
7669            return node;
7670        }
7671        // $ANTLR end table_cellcontentpart
7672    
7673    
7674        // $ANTLR start table_formattedelement
7675        // Creole10.g:722:1: table_formattedelement returns [ASTNode content = null] : ( ital_markup (tic= table_italcontent )? ( ital_markup )? | bold_markup (tbc= table_boldcontent )? ( bold_markup )? );
7676        public final ASTNode table_formattedelement() throws RecognitionException {
7677            ASTNode content =  null;
7678    
7679            CollectionNode tic = null;
7680    
7681            CollectionNode tbc = null;
7682    
7683    
7684            try {
7685                // Creole10.g:723:2: ( ital_markup (tic= table_italcontent )? ( ital_markup )? | bold_markup (tbc= table_boldcontent )? ( bold_markup )? )
7686                int alt95=2;
7687                int LA95_0 = input.LA(1);
7688    
7689                if ( (LA95_0==ITAL) ) {
7690                    alt95=1;
7691                }
7692                else if ( (LA95_0==STAR) ) {
7693                    alt95=2;
7694                }
7695                else {
7696                    if (backtracking>0) {failed=true; return content;}
7697                    NoViableAltException nvae =
7698                        new NoViableAltException("722:1: table_formattedelement returns [ASTNode content = null] : ( ital_markup (tic= table_italcontent )? ( ital_markup )? | bold_markup (tbc= table_boldcontent )? ( bold_markup )? );", 95, 0, input);
7699    
7700                    throw nvae;
7701                }
7702                switch (alt95) {
7703                    case 1 :
7704                        // Creole10.g:723:4: ital_markup (tic= table_italcontent )? ( ital_markup )?
7705                        {
7706                        pushFollow(FOLLOW_ital_markup_in_table_formattedelement2516);
7707                        ital_markup();
7708                        _fsp--;
7709                        if (failed) return content;
7710                        // Creole10.g:723:18: (tic= table_italcontent )?
7711                        int alt91=2;
7712                        switch ( input.LA(1) ) {
7713                            case STAR:
7714                                {
7715                                alt91=1;
7716                                }
7717                                break;
7718                            case FORCED_END_OF_LINE:
7719                            case HEADING_SECTION:
7720                            case HORIZONTAL_SECTION:
7721                            case LIST_ITEM:
7722                            case LIST_ITEM_PART:
7723                            case NOWIKI_SECTION:
7724                            case SCAPE_NODE:
7725                            case TEXT_NODE:
7726                            case UNORDERED_LIST:
7727                            case UNFORMATTED_TEXT:
7728                            case WIKI:
7729                            case POUND:
7730                            case EQUAL:
7731                            case NOWIKI_BLOCK_CLOSE:
7732                            case NOWIKI_CLOSE:
7733                            case LINK_CLOSE:
7734                            case IMAGE_CLOSE:
7735                            case BLANKS:
7736                            case DASH:
7737                            case CR:
7738                            case LF:
7739                            case SPACE:
7740                            case TABULATOR:
7741                            case BRACE_CLOSE:
7742                            case COLON_SLASH:
7743                            case SLASH:
7744                            case INSIGNIFICANT_CHAR:
7745                            case 41:
7746                            case 42:
7747                            case 43:
7748                            case 44:
7749                            case 45:
7750                            case 46:
7751                            case 47:
7752                            case 48:
7753                            case 49:
7754                            case 50:
7755                            case 51:
7756                            case 52:
7757                            case 53:
7758                            case 54:
7759                            case 55:
7760                            case 56:
7761                            case 57:
7762                            case 58:
7763                            case 59:
7764                            case 60:
7765                            case 61:
7766                            case 62:
7767                            case 63:
7768                            case 64:
7769                            case 65:
7770                            case 66:
7771                            case 67:
7772                            case 68:
7773                            case 69:
7774                            case 70:
7775                            case 71:
7776                            case 72:
7777                            case 73:
7778                            case 74:
7779                            case 75:
7780                            case 76:
7781                            case 77:
7782                            case 78:
7783                            case 79:
7784                            case 80:
7785                                {
7786                                alt91=1;
7787                                }
7788                                break;
7789                            case FORCED_LINEBREAK:
7790                                {
7791                                alt91=1;
7792                                }
7793                                break;
7794                            case ESCAPE:
7795                                {
7796                                alt91=1;
7797                                }
7798                                break;
7799                            case LINK_OPEN:
7800                                {
7801                                alt91=1;
7802                                }
7803                                break;
7804                            case IMAGE_OPEN:
7805                                {
7806                                alt91=1;
7807                                }
7808                                break;
7809                            case EXTENSION:
7810                                {
7811                                alt91=1;
7812                                }
7813                                break;
7814                            case NOWIKI_OPEN:
7815                                {
7816                                alt91=1;
7817                                }
7818                                break;
7819                            case EOF:
7820                                {
7821                                alt91=1;
7822                                }
7823                                break;
7824                        }
7825    
7826                        switch (alt91) {
7827                            case 1 :
7828                                // Creole10.g:723:20: tic= table_italcontent
7829                                {
7830                                pushFollow(FOLLOW_table_italcontent_in_table_formattedelement2526);
7831                                tic=table_italcontent();
7832                                _fsp--;
7833                                if (failed) return content;
7834                                if ( backtracking==0 ) {
7835                                   content = new ItalicTextNode(tic); 
7836                                }
7837    
7838                                }
7839                                break;
7840    
7841                        }
7842    
7843                        // Creole10.g:723:94: ( ital_markup )?
7844                        int alt92=2;
7845                        int LA92_0 = input.LA(1);
7846    
7847                        if ( (LA92_0==ITAL) ) {
7848                            alt92=1;
7849                        }
7850                        switch (alt92) {
7851                            case 1 :
7852                                // Creole10.g:723:96: ital_markup
7853                                {
7854                                pushFollow(FOLLOW_ital_markup_in_table_formattedelement2535);
7855                                ital_markup();
7856                                _fsp--;
7857                                if (failed) return content;
7858    
7859                                }
7860                                break;
7861    
7862                        }
7863    
7864    
7865                        }
7866                        break;
7867                    case 2 :
7868                        // Creole10.g:724:4: bold_markup (tbc= table_boldcontent )? ( bold_markup )?
7869                        {
7870                        pushFollow(FOLLOW_bold_markup_in_table_formattedelement2543);
7871                        bold_markup();
7872                        _fsp--;
7873                        if (failed) return content;
7874                        // Creole10.g:724:16: (tbc= table_boldcontent )?
7875                        int alt93=2;
7876                        switch ( input.LA(1) ) {
7877                            case STAR:
7878                                {
7879                                int LA93_1 = input.LA(2);
7880    
7881                                if ( ( input.LA(2) != STAR ) ) {
7882                                    alt93=1;
7883                                }
7884                                }
7885                                break;
7886                            case FORCED_END_OF_LINE:
7887                            case HEADING_SECTION:
7888                            case HORIZONTAL_SECTION:
7889                            case LIST_ITEM:
7890                            case LIST_ITEM_PART:
7891                            case NOWIKI_SECTION:
7892                            case SCAPE_NODE:
7893                            case TEXT_NODE:
7894                            case UNORDERED_LIST:
7895                            case UNFORMATTED_TEXT:
7896                            case WIKI:
7897                            case POUND:
7898                            case EQUAL:
7899                            case NOWIKI_BLOCK_CLOSE:
7900                            case NOWIKI_CLOSE:
7901                            case LINK_CLOSE:
7902                            case IMAGE_CLOSE:
7903                            case BLANKS:
7904                            case DASH:
7905                            case CR:
7906                            case LF:
7907                            case SPACE:
7908                            case TABULATOR:
7909                            case BRACE_CLOSE:
7910                            case COLON_SLASH:
7911                            case SLASH:
7912                            case INSIGNIFICANT_CHAR:
7913                            case 41:
7914                            case 42:
7915                            case 43:
7916                            case 44:
7917                            case 45:
7918                            case 46:
7919                            case 47:
7920                            case 48:
7921                            case 49:
7922                            case 50:
7923                            case 51:
7924                            case 52:
7925                            case 53:
7926                            case 54:
7927                            case 55:
7928                            case 56:
7929                            case 57:
7930                            case 58:
7931                            case 59:
7932                            case 60:
7933                            case 61:
7934                            case 62:
7935                            case 63:
7936                            case 64:
7937                            case 65:
7938                            case 66:
7939                            case 67:
7940                            case 68:
7941                            case 69:
7942                            case 70:
7943                            case 71:
7944                            case 72:
7945                            case 73:
7946                            case 74:
7947                            case 75:
7948                            case 76:
7949                            case 77:
7950                            case 78:
7951                            case 79:
7952                            case 80:
7953                                {
7954                                alt93=1;
7955                                }
7956                                break;
7957                            case FORCED_LINEBREAK:
7958                                {
7959                                alt93=1;
7960                                }
7961                                break;
7962                            case ESCAPE:
7963                                {
7964                                alt93=1;
7965                                }
7966                                break;
7967                            case LINK_OPEN:
7968                                {
7969                                alt93=1;
7970                                }
7971                                break;
7972                            case IMAGE_OPEN:
7973                                {
7974                                alt93=1;
7975                                }
7976                                break;
7977                            case EXTENSION:
7978                                {
7979                                alt93=1;
7980                                }
7981                                break;
7982                            case NOWIKI_OPEN:
7983                                {
7984                                alt93=1;
7985                                }
7986                                break;
7987                            case ITAL:
7988                                {
7989                                alt93=1;
7990                                }
7991                                break;
7992                            case EOF:
7993                                {
7994                                alt93=1;
7995                                }
7996                                break;
7997                        }
7998    
7999                        switch (alt93) {
8000                            case 1 :
8001                                // Creole10.g:724:18: tbc= table_boldcontent
8002                                {
8003                                pushFollow(FOLLOW_table_boldcontent_in_table_formattedelement2550);
8004                                tbc=table_boldcontent();
8005                                _fsp--;
8006                                if (failed) return content;
8007                                if ( backtracking==0 ) {
8008                                  content = new BoldTextNode(tbc);
8009                                }
8010    
8011                                }
8012                                break;
8013    
8014                        }
8015    
8016                        // Creole10.g:724:88: ( bold_markup )?
8017                        int alt94=2;
8018                        int LA94_0 = input.LA(1);
8019    
8020                        if ( (LA94_0==STAR) ) {
8021                            int LA94_1 = input.LA(2);
8022    
8023                            if ( (LA94_1==STAR) ) {
8024                                alt94=1;
8025                            }
8026                        }
8027                        switch (alt94) {
8028                            case 1 :
8029                                // Creole10.g:724:90: bold_markup
8030                                {
8031                                pushFollow(FOLLOW_bold_markup_in_table_formattedelement2560);
8032                                bold_markup();
8033                                _fsp--;
8034                                if (failed) return content;
8035    
8036                                }
8037                                break;
8038    
8039                        }
8040    
8041    
8042                        }
8043                        break;
8044    
8045                }
8046            }
8047            catch (RecognitionException re) {
8048                reportError(re);
8049                recover(input,re);
8050            }
8051            finally {
8052            }
8053            return content;
8054        }
8055        // $ANTLR end table_formattedelement
8056    
8057    
8058        // $ANTLR start table_boldcontent
8059        // Creole10.g:726:1: table_boldcontent returns [CollectionNode items = new CollectionNode()] : ( onestar (tb= table_boldcontentpart onestar )+ | EOF );
8060        public final CollectionNode table_boldcontent() throws RecognitionException {
8061            CollectionNode items =  new CollectionNode();
8062    
8063            ASTNode tb = null;
8064    
8065    
8066            try {
8067                // Creole10.g:727:2: ( onestar (tb= table_boldcontentpart onestar )+ | EOF )
8068                int alt97=2;
8069                int LA97_0 = input.LA(1);
8070    
8071                if ( ((LA97_0>=FORCED_END_OF_LINE && LA97_0<=WIKI)||(LA97_0>=POUND && LA97_0<=EQUAL)||(LA97_0>=ITAL && LA97_0<=80)) ) {
8072                    alt97=1;
8073                }
8074                else if ( (LA97_0==EOF) ) {
8075                    alt97=2;
8076                }
8077                else {
8078                    if (backtracking>0) {failed=true; return items;}
8079                    NoViableAltException nvae =
8080                        new NoViableAltException("726:1: table_boldcontent returns [CollectionNode items = new CollectionNode()] : ( onestar (tb= table_boldcontentpart onestar )+ | EOF );", 97, 0, input);
8081    
8082                    throw nvae;
8083                }
8084                switch (alt97) {
8085                    case 1 :
8086                        // Creole10.g:727:4: onestar (tb= table_boldcontentpart onestar )+
8087                        {
8088                        pushFollow(FOLLOW_onestar_in_table_boldcontent2577);
8089                        onestar();
8090                        _fsp--;
8091                        if (failed) return items;
8092                        // Creole10.g:727:13: (tb= table_boldcontentpart onestar )+
8093                        int cnt96=0;
8094                        loop96:
8095                        do {
8096                            int alt96=2;
8097                            switch ( input.LA(1) ) {
8098                            case ITAL:
8099                                {
8100                                alt96=1;
8101                                }
8102                                break;
8103                            case FORCED_END_OF_LINE:
8104                            case HEADING_SECTION:
8105                            case HORIZONTAL_SECTION:
8106                            case LIST_ITEM:
8107                            case LIST_ITEM_PART:
8108                            case NOWIKI_SECTION:
8109                            case SCAPE_NODE:
8110                            case TEXT_NODE:
8111                            case UNORDERED_LIST:
8112                            case UNFORMATTED_TEXT:
8113                            case WIKI:
8114                            case POUND:
8115                            case EQUAL:
8116                            case NOWIKI_BLOCK_CLOSE:
8117                            case NOWIKI_CLOSE:
8118                            case LINK_CLOSE:
8119                            case IMAGE_CLOSE:
8120                            case BLANKS:
8121                            case DASH:
8122                            case CR:
8123                            case LF:
8124                            case SPACE:
8125                            case TABULATOR:
8126                            case BRACE_CLOSE:
8127                            case COLON_SLASH:
8128                            case SLASH:
8129                            case INSIGNIFICANT_CHAR:
8130                            case 41:
8131                            case 42:
8132                            case 43:
8133                            case 44:
8134                            case 45:
8135                            case 46:
8136                            case 47:
8137                            case 48:
8138                            case 49:
8139                            case 50:
8140                            case 51:
8141                            case 52:
8142                            case 53:
8143                            case 54:
8144                            case 55:
8145                            case 56:
8146                            case 57:
8147                            case 58:
8148                            case 59:
8149                            case 60:
8150                            case 61:
8151                            case 62:
8152                            case 63:
8153                            case 64:
8154                            case 65:
8155                            case 66:
8156                            case 67:
8157                            case 68:
8158                            case 69:
8159                            case 70:
8160                            case 71:
8161                            case 72:
8162                            case 73:
8163                            case 74:
8164                            case 75:
8165                            case 76:
8166                            case 77:
8167                            case 78:
8168                            case 79:
8169                            case 80:
8170                                {
8171                                alt96=1;
8172                                }
8173                                break;
8174                            case FORCED_LINEBREAK:
8175                                {
8176                                alt96=1;
8177                                }
8178                                break;
8179                            case ESCAPE:
8180                                {
8181                                alt96=1;
8182                                }
8183                                break;
8184                            case LINK_OPEN:
8185                                {
8186                                alt96=1;
8187                                }
8188                                break;
8189                            case IMAGE_OPEN:
8190                                {
8191                                alt96=1;
8192                                }
8193                                break;
8194                            case EXTENSION:
8195                                {
8196                                alt96=1;
8197                                }
8198                                break;
8199                            case NOWIKI_OPEN:
8200                                {
8201                                alt96=1;
8202                                }
8203                                break;
8204    
8205                            }
8206    
8207                            switch (alt96) {
8208                            case 1 :
8209                                // Creole10.g:727:15: tb= table_boldcontentpart onestar
8210                                {
8211                                pushFollow(FOLLOW_table_boldcontentpart_in_table_boldcontent2586);
8212                                tb=table_boldcontentpart();
8213                                _fsp--;
8214                                if (failed) return items;
8215                                if ( backtracking==0 ) {
8216                                   items.add(tb); 
8217                                }
8218                                pushFollow(FOLLOW_onestar_in_table_boldcontent2591);
8219                                onestar();
8220                                _fsp--;
8221                                if (failed) return items;
8222    
8223                                }
8224                                break;
8225    
8226                            default :
8227                                if ( cnt96 >= 1 ) break loop96;
8228                                if (backtracking>0) {failed=true; return items;}
8229                                    EarlyExitException eee =
8230                                        new EarlyExitException(96, input);
8231                                    throw eee;
8232                            }
8233                            cnt96++;
8234                        } while (true);
8235    
8236    
8237                        }
8238                        break;
8239                    case 2 :
8240                        // Creole10.g:728:4: EOF
8241                        {
8242                        match(input,EOF,FOLLOW_EOF_in_table_boldcontent2599); if (failed) return items;
8243    
8244                        }
8245                        break;
8246    
8247                }
8248            }
8249            catch (RecognitionException re) {
8250                reportError(re);
8251                recover(input,re);
8252            }
8253            finally {
8254            }
8255            return items;
8256        }
8257        // $ANTLR end table_boldcontent
8258    
8259    
8260        // $ANTLR start table_italcontent
8261        // Creole10.g:730:1: table_italcontent returns [CollectionNode items = new CollectionNode()] : ( onestar (ti= table_italcontentpart onestar )+ | EOF );
8262        public final CollectionNode table_italcontent() throws RecognitionException {
8263            CollectionNode items =  new CollectionNode();
8264    
8265            ASTNode ti = null;
8266    
8267    
8268            try {
8269                // Creole10.g:731:2: ( onestar (ti= table_italcontentpart onestar )+ | EOF )
8270                int alt99=2;
8271                int LA99_0 = input.LA(1);
8272    
8273                if ( ((LA99_0>=FORCED_END_OF_LINE && LA99_0<=WIKI)||(LA99_0>=POUND && LA99_0<=EQUAL)||(LA99_0>=LINK_OPEN && LA99_0<=80)) ) {
8274                    alt99=1;
8275                }
8276                else if ( (LA99_0==EOF) ) {
8277                    alt99=2;
8278                }
8279                else {
8280                    if (backtracking>0) {failed=true; return items;}
8281                    NoViableAltException nvae =
8282                        new NoViableAltException("730:1: table_italcontent returns [CollectionNode items = new CollectionNode()] : ( onestar (ti= table_italcontentpart onestar )+ | EOF );", 99, 0, input);
8283    
8284                    throw nvae;
8285                }
8286                switch (alt99) {
8287                    case 1 :
8288                        // Creole10.g:731:4: onestar (ti= table_italcontentpart onestar )+
8289                        {
8290                        pushFollow(FOLLOW_onestar_in_table_italcontent2613);
8291                        onestar();
8292                        _fsp--;
8293                        if (failed) return items;
8294                        // Creole10.g:731:13: (ti= table_italcontentpart onestar )+
8295                        int cnt98=0;
8296                        loop98:
8297                        do {
8298                            int alt98=2;
8299                            switch ( input.LA(1) ) {
8300                            case STAR:
8301                                {
8302                                alt98=1;
8303                                }
8304                                break;
8305                            case FORCED_END_OF_LINE:
8306                            case HEADING_SECTION:
8307                            case HORIZONTAL_SECTION:
8308                            case LIST_ITEM:
8309                            case LIST_ITEM_PART:
8310                            case NOWIKI_SECTION:
8311                            case SCAPE_NODE:
8312                            case TEXT_NODE:
8313                            case UNORDERED_LIST:
8314                            case UNFORMATTED_TEXT:
8315                            case WIKI:
8316                            case POUND:
8317                            case EQUAL:
8318                            case NOWIKI_BLOCK_CLOSE:
8319                            case NOWIKI_CLOSE:
8320                            case LINK_CLOSE:
8321                            case IMAGE_CLOSE:
8322                            case BLANKS:
8323                            case DASH:
8324                            case CR:
8325                            case LF:
8326                            case SPACE:
8327                            case TABULATOR:
8328                            case BRACE_CLOSE:
8329                            case COLON_SLASH:
8330                            case SLASH:
8331                            case INSIGNIFICANT_CHAR:
8332                            case 41:
8333                            case 42:
8334                            case 43:
8335                            case 44:
8336                            case 45:
8337                            case 46:
8338                            case 47:
8339                            case 48:
8340                            case 49:
8341                            case 50:
8342                            case 51:
8343                            case 52:
8344                            case 53:
8345                            case 54:
8346                            case 55:
8347                            case 56:
8348                            case 57:
8349                            case 58:
8350                            case 59:
8351                            case 60:
8352                            case 61:
8353                            case 62:
8354                            case 63:
8355                            case 64:
8356                            case 65:
8357                            case 66:
8358                            case 67:
8359                            case 68:
8360                            case 69:
8361                            case 70:
8362                            case 71:
8363                            case 72:
8364                            case 73:
8365                            case 74:
8366                            case 75:
8367                            case 76:
8368                            case 77:
8369                            case 78:
8370                            case 79:
8371                            case 80:
8372                                {
8373                                alt98=1;
8374                                }
8375                                break;
8376                            case FORCED_LINEBREAK:
8377                                {
8378                                alt98=1;
8379                                }
8380                                break;
8381                            case ESCAPE:
8382                                {
8383                                alt98=1;
8384                                }
8385                                break;
8386                            case LINK_OPEN:
8387                                {
8388                                alt98=1;
8389                                }
8390                                break;
8391                            case IMAGE_OPEN:
8392                                {
8393                                alt98=1;
8394                                }
8395                                break;
8396                            case EXTENSION:
8397                                {
8398                                alt98=1;
8399                                }
8400                                break;
8401                            case NOWIKI_OPEN:
8402                                {
8403                                alt98=1;
8404                                }
8405                                break;
8406    
8407                            }
8408    
8409                            switch (alt98) {
8410                            case 1 :
8411                                // Creole10.g:731:15: ti= table_italcontentpart onestar
8412                                {
8413                                pushFollow(FOLLOW_table_italcontentpart_in_table_italcontent2622);
8414                                ti=table_italcontentpart();
8415                                _fsp--;
8416                                if (failed) return items;
8417                                if ( backtracking==0 ) {
8418                                   items.add(ti); 
8419                                }
8420                                pushFollow(FOLLOW_onestar_in_table_italcontent2627);
8421                                onestar();
8422                                _fsp--;
8423                                if (failed) return items;
8424    
8425                                }
8426                                break;
8427    
8428                            default :
8429                                if ( cnt98 >= 1 ) break loop98;
8430                                if (backtracking>0) {failed=true; return items;}
8431                                    EarlyExitException eee =
8432                                        new EarlyExitException(98, input);
8433                                    throw eee;
8434                            }
8435                            cnt98++;
8436                        } while (true);
8437    
8438    
8439                        }
8440                        break;
8441                    case 2 :
8442                        // Creole10.g:732:4: EOF
8443                        {
8444                        match(input,EOF,FOLLOW_EOF_in_table_italcontent2635); if (failed) return items;
8445    
8446                        }
8447                        break;
8448    
8449                }
8450            }
8451            catch (RecognitionException re) {
8452                reportError(re);
8453                recover(input,re);
8454            }
8455            finally {
8456            }
8457            return items;
8458        }
8459        // $ANTLR end table_italcontent
8460    
8461    
8462        // $ANTLR start table_boldcontentpart
8463        // Creole10.g:734:1: table_boldcontentpart returns [ASTNode node = null] : (tf= table_formattedcontent | ital_markup tb= table_bolditalcontent ( ital_markup )? );
8464        public final ASTNode table_boldcontentpart() throws RecognitionException {
8465            ASTNode node =  null;
8466    
8467            CollectionNode tf = null;
8468    
8469            CollectionNode tb = null;
8470    
8471    
8472            try {
8473                // Creole10.g:735:2: (tf= table_formattedcontent | ital_markup tb= table_bolditalcontent ( ital_markup )? )
8474                int alt101=2;
8475                int LA101_0 = input.LA(1);
8476    
8477                if ( ((LA101_0>=FORCED_END_OF_LINE && LA101_0<=WIKI)||LA101_0==POUND||LA101_0==EQUAL||(LA101_0>=LINK_OPEN && LA101_0<=80)) ) {
8478                    alt101=1;
8479                }
8480                else if ( (LA101_0==ITAL) ) {
8481                    alt101=2;
8482                }
8483                else {
8484                    if (backtracking>0) {failed=true; return node;}
8485                    NoViableAltException nvae =
8486                        new NoViableAltException("734:1: table_boldcontentpart returns [ASTNode node = null] : (tf= table_formattedcontent | ital_markup tb= table_bolditalcontent ( ital_markup )? );", 101, 0, input);
8487    
8488                    throw nvae;
8489                }
8490                switch (alt101) {
8491                    case 1 :
8492                        // Creole10.g:735:4: tf= table_formattedcontent
8493                        {
8494                        pushFollow(FOLLOW_table_formattedcontent_in_table_boldcontentpart2653);
8495                        tf=table_formattedcontent();
8496                        _fsp--;
8497                        if (failed) return node;
8498                        if ( backtracking==0 ) {
8499                          node = tf; 
8500                        }
8501    
8502                        }
8503                        break;
8504                    case 2 :
8505                        // Creole10.g:736:4: ital_markup tb= table_bolditalcontent ( ital_markup )?
8506                        {
8507                        pushFollow(FOLLOW_ital_markup_in_table_boldcontentpart2660);
8508                        ital_markup();
8509                        _fsp--;
8510                        if (failed) return node;
8511                        pushFollow(FOLLOW_table_bolditalcontent_in_table_boldcontentpart2667);
8512                        tb=table_bolditalcontent();
8513                        _fsp--;
8514                        if (failed) return node;
8515                        if ( backtracking==0 ) {
8516                           node = new ItalicTextNode(tb);  
8517                        }
8518                        // Creole10.g:736:92: ( ital_markup )?
8519                        int alt100=2;
8520                        int LA100_0 = input.LA(1);
8521    
8522                        if ( (LA100_0==ITAL) ) {
8523                            alt100=1;
8524                        }
8525                        switch (alt100) {
8526                            case 1 :
8527                                // Creole10.g:736:94: ital_markup
8528                                {
8529                                pushFollow(FOLLOW_ital_markup_in_table_boldcontentpart2674);
8530                                ital_markup();
8531                                _fsp--;
8532                                if (failed) return node;
8533    
8534                                }
8535                                break;
8536    
8537                        }
8538    
8539    
8540                        }
8541                        break;
8542    
8543                }
8544            }
8545            catch (RecognitionException re) {
8546                reportError(re);
8547                recover(input,re);
8548            }
8549            finally {
8550            }
8551            return node;
8552        }
8553        // $ANTLR end table_boldcontentpart
8554    
8555    
8556        // $ANTLR start table_italcontentpart
8557        // Creole10.g:738:1: table_italcontentpart returns [ASTNode node = null] : ( bold_markup tb= table_bolditalcontent ( bold_markup )? | tf= table_formattedcontent );
8558        public final ASTNode table_italcontentpart() throws RecognitionException {
8559            ASTNode node =  null;
8560    
8561            CollectionNode tb = null;
8562    
8563            CollectionNode tf = null;
8564    
8565    
8566            try {
8567                // Creole10.g:739:2: ( bold_markup tb= table_bolditalcontent ( bold_markup )? | tf= table_formattedcontent )
8568                int alt103=2;
8569                int LA103_0 = input.LA(1);
8570    
8571                if ( (LA103_0==STAR) ) {
8572                    alt103=1;
8573                }
8574                else if ( ((LA103_0>=FORCED_END_OF_LINE && LA103_0<=WIKI)||LA103_0==POUND||LA103_0==EQUAL||(LA103_0>=LINK_OPEN && LA103_0<=80)) ) {
8575                    alt103=2;
8576                }
8577                else {
8578                    if (backtracking>0) {failed=true; return node;}
8579                    NoViableAltException nvae =
8580                        new NoViableAltException("738:1: table_italcontentpart returns [ASTNode node = null] : ( bold_markup tb= table_bolditalcontent ( bold_markup )? | tf= table_formattedcontent );", 103, 0, input);
8581    
8582                    throw nvae;
8583                }
8584                switch (alt103) {
8585                    case 1 :
8586                        // Creole10.g:739:4: bold_markup tb= table_bolditalcontent ( bold_markup )?
8587                        {
8588                        pushFollow(FOLLOW_bold_markup_in_table_italcontentpart2691);
8589                        bold_markup();
8590                        _fsp--;
8591                        if (failed) return node;
8592                        pushFollow(FOLLOW_table_bolditalcontent_in_table_italcontentpart2698);
8593                        tb=table_bolditalcontent();
8594                        _fsp--;
8595                        if (failed) return node;
8596                        if ( backtracking==0 ) {
8597                          node = new BoldTextNode(tb); 
8598                        }
8599                        // Creole10.g:739:88: ( bold_markup )?
8600                        int alt102=2;
8601                        int LA102_0 = input.LA(1);
8602    
8603                        if ( (LA102_0==STAR) ) {
8604                            int LA102_1 = input.LA(2);
8605    
8606                            if ( (LA102_1==STAR) ) {
8607                                alt102=1;
8608                            }
8609                        }
8610                        switch (alt102) {
8611                            case 1 :
8612                                // Creole10.g:739:90: bold_markup
8613                                {
8614                                pushFollow(FOLLOW_bold_markup_in_table_italcontentpart2705);
8615                                bold_markup();
8616                                _fsp--;
8617                                if (failed) return node;
8618    
8619                                }
8620                                break;
8621    
8622                        }
8623    
8624    
8625                        }
8626                        break;
8627                    case 2 :
8628                        // Creole10.g:740:4: tf= table_formattedcontent
8629                        {
8630                        pushFollow(FOLLOW_table_formattedcontent_in_table_italcontentpart2717);
8631                        tf=table_formattedcontent();
8632                        _fsp--;
8633                        if (failed) return node;
8634                        if ( backtracking==0 ) {
8635                           node = tf; 
8636                        }
8637    
8638                        }
8639                        break;
8640    
8641                }
8642            }
8643            catch (RecognitionException re) {
8644                reportError(re);
8645                recover(input,re);
8646            }
8647            finally {
8648            }
8649            return node;
8650        }
8651        // $ANTLR end table_italcontentpart
8652    
8653    
8654        // $ANTLR start table_bolditalcontent
8655        // Creole10.g:742:1: table_bolditalcontent returns [CollectionNode elements = null] : ( onestar (tfc= table_formattedcontent onestar )? | EOF );
8656        public final CollectionNode table_bolditalcontent() throws RecognitionException {
8657            CollectionNode elements =  null;
8658    
8659            CollectionNode tfc = null;
8660    
8661    
8662            try {
8663                // Creole10.g:743:2: ( onestar (tfc= table_formattedcontent onestar )? | EOF )
8664                int alt105=2;
8665                int LA105_0 = input.LA(1);
8666    
8667                if ( ((LA105_0>=FORCED_END_OF_LINE && LA105_0<=EQUAL)||(LA105_0>=ITAL && LA105_0<=80)) ) {
8668                    alt105=1;
8669                }
8670                else if ( (LA105_0==EOF||LA105_0==PIPE) ) {
8671                    alt105=1;
8672                }
8673                else {
8674                    if (backtracking>0) {failed=true; return elements;}
8675                    NoViableAltException nvae =
8676                        new NoViableAltException("742:1: table_bolditalcontent returns [CollectionNode elements = null] : ( onestar (tfc= table_formattedcontent onestar )? | EOF );", 105, 0, input);
8677    
8678                    throw nvae;
8679                }
8680                switch (alt105) {
8681                    case 1 :
8682                        // Creole10.g:743:4: onestar (tfc= table_formattedcontent onestar )?
8683                        {
8684                        pushFollow(FOLLOW_onestar_in_table_bolditalcontent2733);
8685                        onestar();
8686                        _fsp--;
8687                        if (failed) return elements;
8688                        // Creole10.g:743:13: (tfc= table_formattedcontent onestar )?
8689                        int alt104=2;
8690                        switch ( input.LA(1) ) {
8691                            case FORCED_END_OF_LINE:
8692                            case HEADING_SECTION:
8693                            case HORIZONTAL_SECTION:
8694                            case LIST_ITEM:
8695                            case LIST_ITEM_PART:
8696                            case NOWIKI_SECTION:
8697                            case SCAPE_NODE:
8698                            case TEXT_NODE:
8699                            case UNORDERED_LIST:
8700                            case UNFORMATTED_TEXT:
8701                            case WIKI:
8702                            case POUND:
8703                            case EQUAL:
8704                            case NOWIKI_BLOCK_CLOSE:
8705                            case NOWIKI_CLOSE:
8706                            case LINK_CLOSE:
8707                            case IMAGE_CLOSE:
8708                            case BLANKS:
8709                            case DASH:
8710                            case CR:
8711                            case LF:
8712                            case SPACE:
8713                            case TABULATOR:
8714                            case BRACE_CLOSE:
8715                            case COLON_SLASH:
8716                            case SLASH:
8717                            case INSIGNIFICANT_CHAR:
8718                            case 41:
8719                            case 42:
8720                            case 43:
8721                            case 44:
8722                            case 45:
8723                            case 46:
8724                            case 47:
8725                            case 48:
8726                            case 49:
8727                            case 50:
8728                            case 51:
8729                            case 52:
8730                            case 53:
8731                            case 54:
8732                            case 55:
8733                            case 56:
8734                            case 57:
8735                            case 58:
8736                            case 59:
8737                            case 60:
8738                            case 61:
8739                            case 62:
8740                            case 63:
8741                            case 64:
8742                            case 65:
8743                            case 66:
8744                            case 67:
8745                            case 68:
8746                            case 69:
8747                            case 70:
8748                            case 71:
8749                            case 72:
8750                            case 73:
8751                            case 74:
8752                            case 75:
8753                            case 76:
8754                            case 77:
8755                            case 78:
8756                            case 79:
8757                            case 80:
8758                                {
8759                                alt104=1;
8760                                }
8761                                break;
8762                            case FORCED_LINEBREAK:
8763                                {
8764                                alt104=1;
8765                                }
8766                                break;
8767                            case ESCAPE:
8768                                {
8769                                alt104=1;
8770                                }
8771                                break;
8772                            case LINK_OPEN:
8773                                {
8774                                alt104=1;
8775                                }
8776                                break;
8777                            case IMAGE_OPEN:
8778                                {
8779                                alt104=1;
8780                                }
8781                                break;
8782                            case EXTENSION:
8783                                {
8784                                alt104=1;
8785                                }
8786                                break;
8787                            case NOWIKI_OPEN:
8788                                {
8789                                alt104=1;
8790                                }
8791                                break;
8792                        }
8793    
8794                        switch (alt104) {
8795                            case 1 :
8796                                // Creole10.g:743:15: tfc= table_formattedcontent onestar
8797                                {
8798                                pushFollow(FOLLOW_table_formattedcontent_in_table_bolditalcontent2742);
8799                                tfc=table_formattedcontent();
8800                                _fsp--;
8801                                if (failed) return elements;
8802                                if ( backtracking==0 ) {
8803                                   elements = tfc; 
8804                                }
8805                                pushFollow(FOLLOW_onestar_in_table_bolditalcontent2747);
8806                                onestar();
8807                                _fsp--;
8808                                if (failed) return elements;
8809    
8810                                }
8811                                break;
8812    
8813                        }
8814    
8815    
8816                        }
8817                        break;
8818                    case 2 :
8819                        // Creole10.g:744:4: EOF
8820                        {
8821                        match(input,EOF,FOLLOW_EOF_in_table_bolditalcontent2755); if (failed) return elements;
8822    
8823                        }
8824                        break;
8825    
8826                }
8827            }
8828            catch (RecognitionException re) {
8829                reportError(re);
8830                recover(input,re);
8831            }
8832            finally {
8833            }
8834            return elements;
8835        }
8836        // $ANTLR end table_bolditalcontent
8837    
8838    
8839        // $ANTLR start table_formattedcontent
8840        // Creole10.g:746:1: table_formattedcontent returns [CollectionNode elements = new CollectionNode()] : (tu= table_unformattedelement )+ ;
8841        public final CollectionNode table_formattedcontent() throws RecognitionException {
8842            CollectionNode elements =  new CollectionNode();
8843    
8844            ASTNode tu = null;
8845    
8846    
8847            try {
8848                // Creole10.g:747:2: ( (tu= table_unformattedelement )+ )
8849                // Creole10.g:747:4: (tu= table_unformattedelement )+
8850                {
8851                // Creole10.g:747:4: (tu= table_unformattedelement )+
8852                int cnt106=0;
8853                loop106:
8854                do {
8855                    int alt106=2;
8856                    switch ( input.LA(1) ) {
8857                    case FORCED_END_OF_LINE:
8858                    case HEADING_SECTION:
8859                    case HORIZONTAL_SECTION:
8860                    case LIST_ITEM:
8861                    case LIST_ITEM_PART:
8862                    case NOWIKI_SECTION:
8863                    case SCAPE_NODE:
8864                    case TEXT_NODE:
8865                    case UNORDERED_LIST:
8866                    case UNFORMATTED_TEXT:
8867                    case WIKI:
8868                    case POUND:
8869                    case EQUAL:
8870                    case NOWIKI_BLOCK_CLOSE:
8871                    case NOWIKI_CLOSE:
8872                    case LINK_CLOSE:
8873                    case IMAGE_CLOSE:
8874                    case BLANKS:
8875                    case DASH:
8876                    case CR:
8877                    case LF:
8878                    case SPACE:
8879                    case TABULATOR:
8880                    case BRACE_CLOSE:
8881                    case COLON_SLASH:
8882                    case SLASH:
8883                    case INSIGNIFICANT_CHAR:
8884                    case 41:
8885                    case 42:
8886                    case 43:
8887                    case 44:
8888                    case 45:
8889                    case 46:
8890                    case 47:
8891                    case 48:
8892                    case 49:
8893                    case 50:
8894                    case 51:
8895                    case 52:
8896                    case 53:
8897                    case 54:
8898                    case 55:
8899                    case 56:
8900                    case 57:
8901                    case 58:
8902                    case 59:
8903                    case 60:
8904                    case 61:
8905                    case 62:
8906                    case 63:
8907                    case 64:
8908                    case 65:
8909                    case 66:
8910                    case 67:
8911                    case 68:
8912                    case 69:
8913                    case 70:
8914                    case 71:
8915                    case 72:
8916                    case 73:
8917                    case 74:
8918                    case 75:
8919                    case 76:
8920                    case 77:
8921                    case 78:
8922                    case 79:
8923                    case 80:
8924                        {
8925                        alt106=1;
8926                        }
8927                        break;
8928                    case FORCED_LINEBREAK:
8929                        {
8930                        alt106=1;
8931                        }
8932                        break;
8933                    case ESCAPE:
8934                        {
8935                        alt106=1;
8936                        }
8937                        break;
8938                    case LINK_OPEN:
8939                        {
8940                        alt106=1;
8941                        }
8942                        break;
8943                    case IMAGE_OPEN:
8944                        {
8945                        alt106=1;
8946                        }
8947                        break;
8948                    case EXTENSION:
8949                        {
8950                        alt106=1;
8951                        }
8952                        break;
8953                    case NOWIKI_OPEN:
8954                        {
8955                        alt106=1;
8956                        }
8957                        break;
8958    
8959                    }
8960    
8961                    switch (alt106) {
8962                    case 1 :
8963                        // Creole10.g:747:6: tu= table_unformattedelement
8964                        {
8965                        pushFollow(FOLLOW_table_unformattedelement_in_table_formattedcontent2775);
8966                        tu=table_unformattedelement();
8967                        _fsp--;
8968                        if (failed) return elements;
8969                        if ( backtracking==0 ) {
8970                           elements.add(tu); 
8971                        }
8972    
8973                        }
8974                        break;
8975    
8976                    default :
8977                        if ( cnt106 >= 1 ) break loop106;
8978                        if (backtracking>0) {failed=true; return elements;}
8979                            EarlyExitException eee =
8980                                new EarlyExitException(106, input);
8981                            throw eee;
8982                    }
8983                    cnt106++;
8984                } while (true);
8985    
8986    
8987                }
8988    
8989            }
8990            catch (RecognitionException re) {
8991                reportError(re);
8992                recover(input,re);
8993            }
8994            finally {
8995            }
8996            return elements;
8997        }
8998        // $ANTLR end table_formattedcontent
8999    
9000    
9001        // $ANTLR start table_unformattedelement
9002        // Creole10.g:749:1: table_unformattedelement returns [ASTNode content = null] : (tu= table_unformatted | ti= table_inlineelement );
9003        public final ASTNode table_unformattedelement() throws RecognitionException {
9004            ASTNode content =  null;
9005    
9006            CollectionNode tu = null;
9007    
9008            ASTNode ti = null;
9009    
9010    
9011            try {
9012                // Creole10.g:750:2: (tu= table_unformatted | ti= table_inlineelement )
9013                int alt107=2;
9014                int LA107_0 = input.LA(1);
9015    
9016                if ( ((LA107_0>=FORCED_END_OF_LINE && LA107_0<=WIKI)||LA107_0==POUND||LA107_0==EQUAL||(LA107_0>=FORCED_LINEBREAK && LA107_0<=80)) ) {
9017                    alt107=1;
9018                }
9019                else if ( ((LA107_0>=LINK_OPEN && LA107_0<=EXTENSION)) ) {
9020                    alt107=2;
9021                }
9022                else {
9023                    if (backtracking>0) {failed=true; return content;}
9024                    NoViableAltException nvae =
9025                        new NoViableAltException("749:1: table_unformattedelement returns [ASTNode content = null] : (tu= table_unformatted | ti= table_inlineelement );", 107, 0, input);
9026    
9027                    throw nvae;
9028                }
9029                switch (alt107) {
9030                    case 1 :
9031                        // Creole10.g:750:4: tu= table_unformatted
9032                        {
9033                        pushFollow(FOLLOW_table_unformatted_in_table_unformattedelement2798);
9034                        tu=table_unformatted();
9035                        _fsp--;
9036                        if (failed) return content;
9037                        if ( backtracking==0 ) {
9038                          content = new UnformattedTextNode(tu);
9039                        }
9040    
9041                        }
9042                        break;
9043                    case 2 :
9044                        // Creole10.g:751:4: ti= table_inlineelement
9045                        {
9046                        pushFollow(FOLLOW_table_inlineelement_in_table_unformattedelement2810);
9047                        ti=table_inlineelement();
9048                        _fsp--;
9049                        if (failed) return content;
9050                        if ( backtracking==0 ) {
9051                          content = ti;
9052                        }
9053    
9054                        }
9055                        break;
9056    
9057                }
9058            }
9059            catch (RecognitionException re) {
9060                reportError(re);
9061                recover(input,re);
9062            }
9063            finally {
9064            }
9065            return content;
9066        }
9067        // $ANTLR end table_unformattedelement
9068    
9069    
9070        // $ANTLR start table_inlineelement
9071        // Creole10.g:753:1: table_inlineelement returns [ASTNode element = null] : (l= link | i= image | e= extension | nw= nowiki_inline );
9072        public final ASTNode table_inlineelement() throws RecognitionException {
9073            ASTNode element =  null;
9074    
9075            LinkNode l = null;
9076    
9077            ImageNode i = null;
9078    
9079            ASTNode e = null;
9080    
9081            NoWikiSectionNode nw = null;
9082    
9083    
9084            try {
9085                // Creole10.g:754:2: (l= link | i= image | e= extension | nw= nowiki_inline )
9086                int alt108=4;
9087                switch ( input.LA(1) ) {
9088                case LINK_OPEN:
9089                    {
9090                    alt108=1;
9091                    }
9092                    break;
9093                case IMAGE_OPEN:
9094                    {
9095                    alt108=2;
9096                    }
9097                    break;
9098                case EXTENSION:
9099                    {
9100                    alt108=3;
9101                    }
9102                    break;
9103                case NOWIKI_OPEN:
9104                    {
9105                    alt108=4;
9106                    }
9107                    break;
9108                default:
9109                    if (backtracking>0) {failed=true; return element;}
9110                    NoViableAltException nvae =
9111                        new NoViableAltException("753:1: table_inlineelement returns [ASTNode element = null] : (l= link | i= image | e= extension | nw= nowiki_inline );", 108, 0, input);
9112    
9113                    throw nvae;
9114                }
9115    
9116                switch (alt108) {
9117                    case 1 :
9118                        // Creole10.g:754:4: l= link
9119                        {
9120                        pushFollow(FOLLOW_link_in_table_inlineelement2830);
9121                        l=link();
9122                        _fsp--;
9123                        if (failed) return element;
9124                        if ( backtracking==0 ) {
9125                          element = l; 
9126                        }
9127    
9128                        }
9129                        break;
9130                    case 2 :
9131                        // Creole10.g:755:4: i= image
9132                        {
9133                        pushFollow(FOLLOW_image_in_table_inlineelement2840);
9134                        i=image();
9135                        _fsp--;
9136                        if (failed) return element;
9137                        if ( backtracking==0 ) {
9138                          element = i; 
9139                        }
9140    
9141                        }
9142                        break;
9143                    case 3 :
9144                        // Creole10.g:756:4: e= extension
9145                        {
9146                        pushFollow(FOLLOW_extension_in_table_inlineelement2851);
9147                        e=extension();
9148                        _fsp--;
9149                        if (failed) return element;
9150                        if ( backtracking==0 ) {
9151                          element = e; 
9152                        }
9153    
9154                        }
9155                        break;
9156                    case 4 :
9157                        // Creole10.g:757:4: nw= nowiki_inline
9158                        {
9159                        pushFollow(FOLLOW_nowiki_inline_in_table_inlineelement2861);
9160                        nw=nowiki_inline();
9161                        _fsp--;
9162                        if (failed) return element;
9163                        if ( backtracking==0 ) {
9164                          element = nw; 
9165                        }
9166    
9167                        }
9168                        break;
9169    
9170                }
9171            }
9172            catch (RecognitionException re) {
9173                reportError(re);
9174                recover(input,re);
9175            }
9176            finally {
9177            }
9178            return element;
9179        }
9180        // $ANTLR end table_inlineelement
9181    
9182    
9183        // $ANTLR start table_unformatted
9184        // Creole10.g:759:1: table_unformatted returns [CollectionNode text = new CollectionNode()] : (t= table_unformatted_text | ( forced_linebreak | e= escaped )+ );
9185        public final CollectionNode table_unformatted() throws RecognitionException {
9186            CollectionNode text =  new CollectionNode();
9187    
9188            StringBundler t = null;
9189    
9190            ScapedNode e = null;
9191    
9192    
9193            try {
9194                // Creole10.g:760:2: (t= table_unformatted_text | ( forced_linebreak | e= escaped )+ )
9195                int alt110=2;
9196                int LA110_0 = input.LA(1);
9197    
9198                if ( ((LA110_0>=FORCED_END_OF_LINE && LA110_0<=WIKI)||LA110_0==POUND||LA110_0==EQUAL||(LA110_0>=NOWIKI_BLOCK_CLOSE && LA110_0<=80)) ) {
9199                    alt110=1;
9200                }
9201                else if ( ((LA110_0>=FORCED_LINEBREAK && LA110_0<=ESCAPE)) ) {
9202                    alt110=2;
9203                }
9204                else {
9205                    if (backtracking>0) {failed=true; return text;}
9206                    NoViableAltException nvae =
9207                        new NoViableAltException("759:1: table_unformatted returns [CollectionNode text = new CollectionNode()] : (t= table_unformatted_text | ( forced_linebreak | e= escaped )+ );", 110, 0, input);
9208    
9209                    throw nvae;
9210                }
9211                switch (alt110) {
9212                    case 1 :
9213                        // Creole10.g:760:5: t= table_unformatted_text
9214                        {
9215                        pushFollow(FOLLOW_table_unformatted_text_in_table_unformatted2882);
9216                        t=table_unformatted_text();
9217                        _fsp--;
9218                        if (failed) return text;
9219                        if ( backtracking==0 ) {
9220                           text.add(new UnformattedTextNode(t.toString()));
9221                        }
9222    
9223                        }
9224                        break;
9225                    case 2 :
9226                        // Creole10.g:761:5: ( forced_linebreak | e= escaped )+
9227                        {
9228                        // Creole10.g:761:5: ( forced_linebreak | e= escaped )+
9229                        int cnt109=0;
9230                        loop109:
9231                        do {
9232                            int alt109=3;
9233                            int LA109_0 = input.LA(1);
9234    
9235                            if ( (LA109_0==FORCED_LINEBREAK) ) {
9236                                alt109=1;
9237                            }
9238                            else if ( (LA109_0==ESCAPE) ) {
9239                                alt109=2;
9240                            }
9241    
9242    
9243                            switch (alt109) {
9244                            case 1 :
9245                                // Creole10.g:761:6: forced_linebreak
9246                                {
9247                                pushFollow(FOLLOW_forced_linebreak_in_table_unformatted2891);
9248                                forced_linebreak();
9249                                _fsp--;
9250                                if (failed) return text;
9251                                if ( backtracking==0 ) {
9252                                  text.add(new ForcedEndOfLineNode());
9253                                }
9254    
9255                                }
9256                                break;
9257                            case 2 :
9258                                // Creole10.g:762:5: e= escaped
9259                                {
9260                                pushFollow(FOLLOW_escaped_in_table_unformatted2903);
9261                                e=escaped();
9262                                _fsp--;
9263                                if (failed) return text;
9264                                if ( backtracking==0 ) {
9265                                  text.add(e);
9266                                }
9267    
9268                                }
9269                                break;
9270    
9271                            default :
9272                                if ( cnt109 >= 1 ) break loop109;
9273                                if (backtracking>0) {failed=true; return text;}
9274                                    EarlyExitException eee =
9275                                        new EarlyExitException(109, input);
9276                                    throw eee;
9277                            }
9278                            cnt109++;
9279                        } while (true);
9280    
9281    
9282                        }
9283                        break;
9284    
9285                }
9286            }
9287            catch (RecognitionException re) {
9288                reportError(re);
9289                recover(input,re);
9290            }
9291            finally {
9292            }
9293            return text;
9294        }
9295        // $ANTLR end table_unformatted
9296    
9297    
9298        // $ANTLR start table_unformatted_text
9299        // Creole10.g:765:1: table_unformatted_text returns [StringBundler text = new StringBundler()] : (c=~ ( PIPE | ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+ ;
9300        public final StringBundler table_unformatted_text() throws RecognitionException {
9301            StringBundler text =  new StringBundler();
9302    
9303            Token c=null;
9304    
9305            try {
9306                // Creole10.g:766:2: ( (c=~ ( PIPE | ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+ )
9307                // Creole10.g:766:4: (c=~ ( PIPE | ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+
9308                {
9309                // Creole10.g:766:4: (c=~ ( PIPE | ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF ) )+
9310                int cnt111=0;
9311                loop111:
9312                do {
9313                    int alt111=2;
9314                    int LA111_0 = input.LA(1);
9315    
9316                    if ( ((LA111_0>=FORCED_END_OF_LINE && LA111_0<=WIKI)||LA111_0==POUND||LA111_0==EQUAL||(LA111_0>=NOWIKI_BLOCK_CLOSE && LA111_0<=80)) ) {
9317                        alt111=1;
9318                    }
9319    
9320    
9321                    switch (alt111) {
9322                    case 1 :
9323                        // Creole10.g:766:6: c=~ ( PIPE | ITAL | STAR | LINK_OPEN | IMAGE_OPEN | NOWIKI_OPEN | EXTENSION | FORCED_LINEBREAK | ESCAPE | NEWLINE | EOF )
9324                        {
9325                        c=(Token)input.LT(1);
9326                        if ( (input.LA(1)>=FORCED_END_OF_LINE && input.LA(1)<=WIKI)||input.LA(1)==POUND||input.LA(1)==EQUAL||(input.LA(1)>=NOWIKI_BLOCK_CLOSE && input.LA(1)<=80) ) {
9327                            input.consume();
9328                            errorRecovery=false;failed=false;
9329                        }
9330                        else {
9331                            if (backtracking>0) {failed=true; return text;}
9332                            MismatchedSetException mse =
9333                                new MismatchedSetException(null,input);
9334                            recoverFromMismatchedSet(input,mse,FOLLOW_set_in_table_unformatted_text2929);    throw mse;
9335                        }
9336    
9337                        if ( backtracking==0 ) {
9338                          text.append(c.getText());
9339                        }
9340    
9341                        }
9342                        break;
9343    
9344                    default :
9345                        if ( cnt111 >= 1 ) break loop111;
9346                        if (backtracking>0) {failed=true; return text;}
9347                            EarlyExitException eee =
9348                                new EarlyExitException(111, input);
9349                            throw eee;
9350                    }
9351                    cnt111++;
9352                } while (true);
9353    
9354    
9355                }
9356    
9357            }
9358            catch (RecognitionException re) {
9359                reportError(re);
9360                recover(input,re);
9361            }
9362            finally {
9363            }
9364            return text;
9365        }
9366        // $ANTLR end table_unformatted_text
9367    
9368    
9369        // $ANTLR start nowiki_block
9370        // Creole10.g:780:1: nowiki_block returns [NoWikiSectionNode nowikiNode] : nowikiblock_open_markup contents= nowiki_block_contents nowikiblock_close_markup paragraph_separator ;
9371        public final NoWikiSectionNode nowiki_block() throws RecognitionException {
9372            NoWikiSectionNode nowikiNode = null;
9373    
9374            nowiki_block_contents_return contents = null;
9375    
9376    
9377            try {
9378                // Creole10.g:781:2: ( nowikiblock_open_markup contents= nowiki_block_contents nowikiblock_close_markup paragraph_separator )
9379                // Creole10.g:781:4: nowikiblock_open_markup contents= nowiki_block_contents nowikiblock_close_markup paragraph_separator
9380                {
9381                pushFollow(FOLLOW_nowikiblock_open_markup_in_nowiki_block3026);
9382                nowikiblock_open_markup();
9383                _fsp--;
9384                if (failed) return nowikiNode;
9385                pushFollow(FOLLOW_nowiki_block_contents_in_nowiki_block3033);
9386                contents=nowiki_block_contents();
9387                _fsp--;
9388                if (failed) return nowikiNode;
9389                if ( backtracking==0 ) {
9390                  nowikiNode = new NoWikiSectionNode(input.toString(contents.start,contents.stop).toString());
9391                }
9392                pushFollow(FOLLOW_nowikiblock_close_markup_in_nowiki_block3039);
9393                nowikiblock_close_markup();
9394                _fsp--;
9395                if (failed) return nowikiNode;
9396                pushFollow(FOLLOW_paragraph_separator_in_nowiki_block3042);
9397                paragraph_separator();
9398                _fsp--;
9399                if (failed) return nowikiNode;
9400    
9401                }
9402    
9403            }
9404            catch (RecognitionException re) {
9405                reportError(re);
9406                recover(input,re);
9407            }
9408            finally {
9409            }
9410            return nowikiNode;
9411        }
9412        // $ANTLR end nowiki_block
9413    
9414    
9415        // $ANTLR start nowikiblock_open_markup
9416        // Creole10.g:785:1: nowikiblock_open_markup : nowiki_open_markup newline ;
9417        public final void nowikiblock_open_markup() throws RecognitionException {
9418            try {
9419                // Creole10.g:786:2: ( nowiki_open_markup newline )
9420                // Creole10.g:786:4: nowiki_open_markup newline
9421                {
9422                pushFollow(FOLLOW_nowiki_open_markup_in_nowikiblock_open_markup3053);
9423                nowiki_open_markup();
9424                _fsp--;
9425                if (failed) return ;
9426                pushFollow(FOLLOW_newline_in_nowikiblock_open_markup3056);
9427                newline();
9428                _fsp--;
9429                if (failed) return ;
9430    
9431                }
9432    
9433            }
9434            catch (RecognitionException re) {
9435                reportError(re);
9436                recover(input,re);
9437            }
9438            finally {
9439            }
9440            return ;
9441        }
9442        // $ANTLR end nowikiblock_open_markup
9443    
9444    
9445        // $ANTLR start nowikiblock_close_markup
9446        // Creole10.g:789:1: nowikiblock_close_markup : NOWIKI_BLOCK_CLOSE ;
9447        public final void nowikiblock_close_markup() throws RecognitionException {
9448            try {
9449                // Creole10.g:790:2: ( NOWIKI_BLOCK_CLOSE )
9450                // Creole10.g:790:4: NOWIKI_BLOCK_CLOSE
9451                {
9452                match(input,NOWIKI_BLOCK_CLOSE,FOLLOW_NOWIKI_BLOCK_CLOSE_in_nowikiblock_close_markup3067); if (failed) return ;
9453    
9454                }
9455    
9456            }
9457            catch (RecognitionException re) {
9458                reportError(re);
9459                recover(input,re);
9460            }
9461            finally {
9462            }
9463            return ;
9464        }
9465        // $ANTLR end nowikiblock_close_markup
9466    
9467    
9468        // $ANTLR start nowiki_inline
9469        // Creole10.g:793:1: nowiki_inline returns [NoWikiSectionNode nowiki = null] : nowiki_open_markup t= nowiki_inline_contents nowiki_close_markup ;
9470        public final NoWikiSectionNode nowiki_inline() throws RecognitionException {
9471            NoWikiSectionNode nowiki =  null;
9472    
9473            StringBundler t = null;
9474    
9475    
9476            try {
9477                // Creole10.g:794:2: ( nowiki_open_markup t= nowiki_inline_contents nowiki_close_markup )
9478                // Creole10.g:794:4: nowiki_open_markup t= nowiki_inline_contents nowiki_close_markup
9479                {
9480                pushFollow(FOLLOW_nowiki_open_markup_in_nowiki_inline3082);
9481                nowiki_open_markup();
9482                _fsp--;
9483                if (failed) return nowiki;
9484                pushFollow(FOLLOW_nowiki_inline_contents_in_nowiki_inline3089);
9485                t=nowiki_inline_contents();
9486                _fsp--;
9487                if (failed) return nowiki;
9488                pushFollow(FOLLOW_nowiki_close_markup_in_nowiki_inline3093);
9489                nowiki_close_markup();
9490                _fsp--;
9491                if (failed) return nowiki;
9492                if ( backtracking==0 ) {
9493                  nowiki = new NoWikiSectionNode(t.toString());
9494                }
9495    
9496                }
9497    
9498            }
9499            catch (RecognitionException re) {
9500                reportError(re);
9501                recover(input,re);
9502            }
9503            finally {
9504            }
9505            return nowiki;
9506        }
9507        // $ANTLR end nowiki_inline
9508    
9509        public static class nowiki_block_contents_return extends ParserRuleReturnScope {
9510            public StringBundler contents = new StringBundler();
9511        };
9512    
9513        // $ANTLR start nowiki_block_contents
9514        // Creole10.g:797:1: nowiki_block_contents returns [StringBundler contents = new StringBundler()] : (c=~ ( NOWIKI_BLOCK_CLOSE | EOF ) )* ;
9515        public final nowiki_block_contents_return nowiki_block_contents() throws RecognitionException {
9516            nowiki_block_contents_return retval = new nowiki_block_contents_return();
9517            retval.start = input.LT(1);
9518    
9519            Token c=null;
9520    
9521            try {
9522                // Creole10.g:798:2: ( (c=~ ( NOWIKI_BLOCK_CLOSE | EOF ) )* )
9523                // Creole10.g:798:3: (c=~ ( NOWIKI_BLOCK_CLOSE | EOF ) )*
9524                {
9525                // Creole10.g:798:3: (c=~ ( NOWIKI_BLOCK_CLOSE | EOF ) )*
9526                loop112:
9527                do {
9528                    int alt112=2;
9529                    int LA112_0 = input.LA(1);
9530    
9531                    if ( ((LA112_0>=FORCED_END_OF_LINE && LA112_0<=ESCAPE)||(LA112_0>=NOWIKI_CLOSE && LA112_0<=80)) ) {
9532                        alt112=1;
9533                    }
9534    
9535    
9536                    switch (alt112) {
9537                    case 1 :
9538                        // Creole10.g:798:4: c=~ ( NOWIKI_BLOCK_CLOSE | EOF )
9539                        {
9540                        c=(Token)input.LT(1);
9541                        if ( (input.LA(1)>=FORCED_END_OF_LINE && input.LA(1)<=ESCAPE)||(input.LA(1)>=NOWIKI_CLOSE && input.LA(1)<=80) ) {
9542                            input.consume();
9543                            errorRecovery=false;failed=false;
9544                        }
9545                        else {
9546                            if (backtracking>0) {failed=true; return retval;}
9547                            MismatchedSetException mse =
9548                                new MismatchedSetException(null,input);
9549                            recoverFromMismatchedSet(input,mse,FOLLOW_set_in_nowiki_block_contents3111);    throw mse;
9550                        }
9551    
9552                        if ( backtracking==0 ) {
9553                          retval.contents.append(c.getText());
9554                        }
9555    
9556                        }
9557                        break;
9558    
9559                    default :
9560                        break loop112;
9561                    }
9562                } while (true);
9563    
9564    
9565                }
9566    
9567                retval.stop = input.LT(-1);
9568    
9569            }
9570            catch (RecognitionException re) {
9571                reportError(re);
9572                recover(input,re);
9573            }
9574            finally {
9575            }
9576            return retval;
9577        }
9578        // $ANTLR end nowiki_block_contents
9579    
9580    
9581        // $ANTLR start nowiki_inline_contents
9582        // Creole10.g:801:1: nowiki_inline_contents returns [StringBundler text = new StringBundler()] : (c=~ ( NOWIKI_CLOSE | NEWLINE | EOF ) )* ;
9583        public final StringBundler nowiki_inline_contents() throws RecognitionException {
9584            StringBundler text =  new StringBundler();
9585    
9586            Token c=null;
9587    
9588            try {
9589                // Creole10.g:802:2: ( (c=~ ( NOWIKI_CLOSE | NEWLINE | EOF ) )* )
9590                // Creole10.g:802:4: (c=~ ( NOWIKI_CLOSE | NEWLINE | EOF ) )*
9591                {
9592                // Creole10.g:802:4: (c=~ ( NOWIKI_CLOSE | NEWLINE | EOF ) )*
9593                loop113:
9594                do {
9595                    int alt113=2;
9596                    int LA113_0 = input.LA(1);
9597    
9598                    if ( ((LA113_0>=FORCED_END_OF_LINE && LA113_0<=WIKI)||(LA113_0>=POUND && LA113_0<=NOWIKI_BLOCK_CLOSE)||(LA113_0>=LINK_CLOSE && LA113_0<=80)) ) {
9599                        alt113=1;
9600                    }
9601    
9602    
9603                    switch (alt113) {
9604                    case 1 :
9605                        // Creole10.g:802:5: c=~ ( NOWIKI_CLOSE | NEWLINE | EOF )
9606                        {
9607                        c=(Token)input.LT(1);
9608                        if ( (input.LA(1)>=FORCED_END_OF_LINE && input.LA(1)<=WIKI)||(input.LA(1)>=POUND && input.LA(1)<=NOWIKI_BLOCK_CLOSE)||(input.LA(1)>=LINK_CLOSE && input.LA(1)<=80) ) {
9609                            input.consume();
9610                            errorRecovery=false;failed=false;
9611                        }
9612                        else {
9613                            if (backtracking>0) {failed=true; return text;}
9614                            MismatchedSetException mse =
9615                                new MismatchedSetException(null,input);
9616                            recoverFromMismatchedSet(input,mse,FOLLOW_set_in_nowiki_inline_contents3144);    throw mse;
9617                        }
9618    
9619                        if ( backtracking==0 ) {
9620                           text.append(c.getText()); 
9621                        }
9622    
9623                        }
9624                        break;
9625    
9626                    default :
9627                        break loop113;
9628                    }
9629                } while (true);
9630    
9631    
9632                }
9633    
9634            }
9635            catch (RecognitionException re) {
9636                reportError(re);
9637                recover(input,re);
9638            }
9639            finally {
9640            }
9641            return text;
9642        }
9643        // $ANTLR end nowiki_inline_contents
9644    
9645    
9646        // $ANTLR start horizontalrule
9647        // Creole10.g:809:1: horizontalrule returns [ASTNode horizontal = null] : horizontalrule_markup ( blanks )? paragraph_separator ;
9648        public final ASTNode horizontalrule() throws RecognitionException {
9649            ASTNode horizontal =  null;
9650    
9651            try {
9652                // Creole10.g:810:2: ( horizontalrule_markup ( blanks )? paragraph_separator )
9653                // Creole10.g:810:4: horizontalrule_markup ( blanks )? paragraph_separator
9654                {
9655                pushFollow(FOLLOW_horizontalrule_markup_in_horizontalrule3180);
9656                horizontalrule_markup();
9657                _fsp--;
9658                if (failed) return horizontal;
9659                // Creole10.g:810:27: ( blanks )?
9660                int alt114=2;
9661                int LA114_0 = input.LA(1);
9662    
9663                if ( (LA114_0==BLANKS) ) {
9664                    alt114=1;
9665                }
9666                switch (alt114) {
9667                    case 1 :
9668                        // Creole10.g:810:29: blanks
9669                        {
9670                        pushFollow(FOLLOW_blanks_in_horizontalrule3185);
9671                        blanks();
9672                        _fsp--;
9673                        if (failed) return horizontal;
9674    
9675                        }
9676                        break;
9677    
9678                }
9679    
9680                pushFollow(FOLLOW_paragraph_separator_in_horizontalrule3191);
9681                paragraph_separator();
9682                _fsp--;
9683                if (failed) return horizontal;
9684                if ( backtracking==0 ) {
9685                  horizontal = new HorizontalNode();
9686                }
9687    
9688                }
9689    
9690            }
9691            catch (RecognitionException re) {
9692                reportError(re);
9693                recover(input,re);
9694            }
9695            finally {
9696            }
9697            return horizontal;
9698        }
9699        // $ANTLR end horizontalrule
9700    
9701    
9702        // $ANTLR start link
9703        // Creole10.g:817:1: link returns [LinkNode link = null] : link_open_markup a= link_address ( link_description_markup d= link_description )? link_close_markup ;
9704        public final LinkNode link() throws RecognitionException {
9705            LinkNode link =  null;
9706    
9707            LinkNode a = null;
9708    
9709            CollectionNode d = null;
9710    
9711    
9712            try {
9713                // Creole10.g:818:2: ( link_open_markup a= link_address ( link_description_markup d= link_description )? link_close_markup )
9714                // Creole10.g:818:4: link_open_markup a= link_address ( link_description_markup d= link_description )? link_close_markup
9715                {
9716                pushFollow(FOLLOW_link_open_markup_in_link3212);
9717                link_open_markup();
9718                _fsp--;
9719                if (failed) return link;
9720                pushFollow(FOLLOW_link_address_in_link3218);
9721                a=link_address();
9722                _fsp--;
9723                if (failed) return link;
9724                if ( backtracking==0 ) {
9725                  link = a; 
9726                }
9727                // Creole10.g:818:59: ( link_description_markup d= link_description )?
9728                int alt115=2;
9729                int LA115_0 = input.LA(1);
9730    
9731                if ( (LA115_0==PIPE) ) {
9732                    alt115=1;
9733                }
9734                switch (alt115) {
9735                    case 1 :
9736                        // Creole10.g:818:60: link_description_markup d= link_description
9737                        {
9738                        pushFollow(FOLLOW_link_description_markup_in_link3224);
9739                        link_description_markup();
9740                        _fsp--;
9741                        if (failed) return link;
9742                        pushFollow(FOLLOW_link_description_in_link3232);
9743                        d=link_description();
9744                        _fsp--;
9745                        if (failed) return link;
9746                        if ( backtracking==0 ) {
9747    
9748                                            if (link == null) { // recover from possible errors
9749                                                link = new LinkNode();
9750                                            }
9751                                            link.setAltCollectionNode(d);
9752    
9753                                            
9754                        }
9755    
9756                        }
9757                        break;
9758    
9759                }
9760    
9761                pushFollow(FOLLOW_link_close_markup_in_link3240);
9762                link_close_markup();
9763                _fsp--;
9764                if (failed) return link;
9765    
9766                }
9767    
9768            }
9769            catch (RecognitionException re) {
9770                reportError(re);
9771                recover(input,re);
9772            }
9773            finally {
9774            }
9775            return link;
9776        }
9777        // $ANTLR end link
9778    
9779    
9780        // $ANTLR start link_address
9781        // Creole10.g:828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );
9782        public final LinkNode link_address() throws RecognitionException {
9783            LinkNode link = null;
9784    
9785            InterwikiLinkNode li = null;
9786    
9787            StringBundler p = null;
9788    
9789            StringBundler lu = null;
9790    
9791    
9792            try {
9793                // Creole10.g:829:2: (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri )
9794                int alt116=2;
9795                switch ( input.LA(1) ) {
9796                case 42:
9797                    {
9798                    int LA116_1 = input.LA(2);
9799    
9800                    if ( (LA116_1==43) ) {
9801                        int LA116_16 = input.LA(3);
9802    
9803                        if ( (LA116_16==41) ) {
9804                            int LA116_34 = input.LA(4);
9805    
9806                            if ( ((LA116_34>=FORCED_END_OF_LINE && LA116_34<=WIKI)||(LA116_34>=POUND && LA116_34<=EQUAL)||(LA116_34>=ITAL && LA116_34<=NOWIKI_CLOSE)||(LA116_34>=IMAGE_CLOSE && LA116_34<=80)) ) {
9807                                alt116=1;
9808                            }
9809                            else if ( (LA116_34==PIPE||LA116_34==LINK_CLOSE) ) {
9810                                alt116=2;
9811                            }
9812                            else {
9813                                if (backtracking>0) {failed=true; return link;}
9814                                NoViableAltException nvae =
9815                                    new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 34, input);
9816    
9817                                throw nvae;
9818                            }
9819                        }
9820                        else if ( ((LA116_16>=FORCED_END_OF_LINE && LA116_16<=WIKI)||(LA116_16>=POUND && LA116_16<=INSIGNIFICANT_CHAR)||(LA116_16>=42 && LA116_16<=80)) ) {
9821                            alt116=2;
9822                        }
9823                        else {
9824                            if (backtracking>0) {failed=true; return link;}
9825                            NoViableAltException nvae =
9826                                new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 16, input);
9827    
9828                            throw nvae;
9829                        }
9830                    }
9831                    else if ( ((LA116_1>=FORCED_END_OF_LINE && LA116_1<=WIKI)||(LA116_1>=POUND && LA116_1<=42)||(LA116_1>=44 && LA116_1<=80)) ) {
9832                        alt116=2;
9833                    }
9834                    else {
9835                        if (backtracking>0) {failed=true; return link;}
9836                        NoViableAltException nvae =
9837                            new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 1, input);
9838    
9839                        throw nvae;
9840                    }
9841                    }
9842                    break;
9843                case 44:
9844                    {
9845                    int LA116_2 = input.LA(2);
9846    
9847                    if ( (LA116_2==45) ) {
9848                        int LA116_17 = input.LA(3);
9849    
9850                        if ( (LA116_17==46) ) {
9851                            int LA116_35 = input.LA(4);
9852    
9853                            if ( (LA116_35==47) ) {
9854                                int LA116_55 = input.LA(5);
9855    
9856                                if ( (LA116_55==48) ) {
9857                                    int LA116_74 = input.LA(6);
9858    
9859                                    if ( (LA116_74==49) ) {
9860                                        int LA116_93 = input.LA(7);
9861    
9862                                        if ( (LA116_93==46) ) {
9863                                            int LA116_109 = input.LA(8);
9864    
9865                                            if ( (LA116_109==49) ) {
9866                                                int LA116_120 = input.LA(9);
9867    
9868                                                if ( (LA116_120==41) ) {
9869                                                    int LA116_34 = input.LA(10);
9870    
9871                                                    if ( ((LA116_34>=FORCED_END_OF_LINE && LA116_34<=WIKI)||(LA116_34>=POUND && LA116_34<=EQUAL)||(LA116_34>=ITAL && LA116_34<=NOWIKI_CLOSE)||(LA116_34>=IMAGE_CLOSE && LA116_34<=80)) ) {
9872                                                        alt116=1;
9873                                                    }
9874                                                    else if ( (LA116_34==PIPE||LA116_34==LINK_CLOSE) ) {
9875                                                        alt116=2;
9876                                                    }
9877                                                    else {
9878                                                        if (backtracking>0) {failed=true; return link;}
9879                                                        NoViableAltException nvae =
9880                                                            new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 34, input);
9881    
9882                                                        throw nvae;
9883                                                    }
9884                                                }
9885                                                else if ( ((LA116_120>=FORCED_END_OF_LINE && LA116_120<=WIKI)||(LA116_120>=POUND && LA116_120<=INSIGNIFICANT_CHAR)||(LA116_120>=42 && LA116_120<=80)) ) {
9886                                                    alt116=2;
9887                                                }
9888                                                else {
9889                                                    if (backtracking>0) {failed=true; return link;}
9890                                                    NoViableAltException nvae =
9891                                                        new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 120, input);
9892    
9893                                                    throw nvae;
9894                                                }
9895                                            }
9896                                            else if ( ((LA116_109>=FORCED_END_OF_LINE && LA116_109<=WIKI)||(LA116_109>=POUND && LA116_109<=48)||(LA116_109>=50 && LA116_109<=80)) ) {
9897                                                alt116=2;
9898                                            }
9899                                            else {
9900                                                if (backtracking>0) {failed=true; return link;}
9901                                                NoViableAltException nvae =
9902                                                    new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 109, input);
9903    
9904                                                throw nvae;
9905                                            }
9906                                        }
9907                                        else if ( ((LA116_93>=FORCED_END_OF_LINE && LA116_93<=WIKI)||(LA116_93>=POUND && LA116_93<=45)||(LA116_93>=47 && LA116_93<=80)) ) {
9908                                            alt116=2;
9909                                        }
9910                                        else {
9911                                            if (backtracking>0) {failed=true; return link;}
9912                                            NoViableAltException nvae =
9913                                                new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 93, input);
9914    
9915                                            throw nvae;
9916                                        }
9917                                    }
9918                                    else if ( ((LA116_74>=FORCED_END_OF_LINE && LA116_74<=WIKI)||(LA116_74>=POUND && LA116_74<=48)||(LA116_74>=50 && LA116_74<=80)) ) {
9919                                        alt116=2;
9920                                    }
9921                                    else {
9922                                        if (backtracking>0) {failed=true; return link;}
9923                                        NoViableAltException nvae =
9924                                            new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 74, input);
9925    
9926                                        throw nvae;
9927                                    }
9928                                }
9929                                else if ( ((LA116_55>=FORCED_END_OF_LINE && LA116_55<=WIKI)||(LA116_55>=POUND && LA116_55<=47)||(LA116_55>=49 && LA116_55<=80)) ) {
9930                                    alt116=2;
9931                                }
9932                                else {
9933                                    if (backtracking>0) {failed=true; return link;}
9934                                    NoViableAltException nvae =
9935                                        new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 55, input);
9936    
9937                                    throw nvae;
9938                                }
9939                            }
9940                            else if ( ((LA116_35>=FORCED_END_OF_LINE && LA116_35<=WIKI)||(LA116_35>=POUND && LA116_35<=46)||(LA116_35>=48 && LA116_35<=80)) ) {
9941                                alt116=2;
9942                            }
9943                            else {
9944                                if (backtracking>0) {failed=true; return link;}
9945                                NoViableAltException nvae =
9946                                    new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 35, input);
9947    
9948                                throw nvae;
9949                            }
9950                        }
9951                        else if ( ((LA116_17>=FORCED_END_OF_LINE && LA116_17<=WIKI)||(LA116_17>=POUND && LA116_17<=45)||(LA116_17>=47 && LA116_17<=80)) ) {
9952                            alt116=2;
9953                        }
9954                        else {
9955                            if (backtracking>0) {failed=true; return link;}
9956                            NoViableAltException nvae =
9957                                new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 17, input);
9958    
9959                            throw nvae;
9960                        }
9961                    }
9962                    else if ( ((LA116_2>=FORCED_END_OF_LINE && LA116_2<=WIKI)||(LA116_2>=POUND && LA116_2<=44)||(LA116_2>=46 && LA116_2<=80)) ) {
9963                        alt116=2;
9964                    }
9965                    else {
9966                        if (backtracking>0) {failed=true; return link;}
9967                        NoViableAltException nvae =
9968                            new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 2, input);
9969    
9970                        throw nvae;
9971                    }
9972                    }
9973                    break;
9974                case 50:
9975                    {
9976                    int LA116_3 = input.LA(2);
9977    
9978                    if ( (LA116_3==51) ) {
9979                        int LA116_18 = input.LA(3);
9980    
9981                        if ( (LA116_18==49) ) {
9982                            int LA116_36 = input.LA(4);
9983    
9984                            if ( (LA116_36==52) ) {
9985                                int LA116_56 = input.LA(5);
9986    
9987                                if ( (LA116_56==46) ) {
9988                                    int LA116_75 = input.LA(6);
9989    
9990                                    if ( (LA116_75==53) ) {
9991                                        int LA116_94 = input.LA(7);
9992    
9993                                        if ( (LA116_94==41) ) {
9994                                            int LA116_34 = input.LA(8);
9995    
9996                                            if ( ((LA116_34>=FORCED_END_OF_LINE && LA116_34<=WIKI)||(LA116_34>=POUND && LA116_34<=EQUAL)||(LA116_34>=ITAL && LA116_34<=NOWIKI_CLOSE)||(LA116_34>=IMAGE_CLOSE && LA116_34<=80)) ) {
9997                                                alt116=1;
9998                                            }
9999                                            else if ( (LA116_34==PIPE||LA116_34==LINK_CLOSE) ) {
10000                                                alt116=2;
10001                                            }
10002                                            else {
10003                                                if (backtracking>0) {failed=true; return link;}
10004                                                NoViableAltException nvae =
10005                                                    new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 34, input);
10006    
10007                                                throw nvae;
10008                                            }
10009                                        }
10010                                        else if ( ((LA116_94>=FORCED_END_OF_LINE && LA116_94<=WIKI)||(LA116_94>=POUND && LA116_94<=INSIGNIFICANT_CHAR)||(LA116_94>=42 && LA116_94<=80)) ) {
10011                                            alt116=2;
10012                                        }
10013                                        else {
10014                                            if (backtracking>0) {failed=true; return link;}
10015                                            NoViableAltException nvae =
10016                                                new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 94, input);
10017    
10018                                            throw nvae;
10019                                        }
10020                                    }
10021                                    else if ( ((LA116_75>=FORCED_END_OF_LINE && LA116_75<=WIKI)||(LA116_75>=POUND && LA116_75<=52)||(LA116_75>=54 && LA116_75<=80)) ) {
10022                                        alt116=2;
10023                                    }
10024                                    else {
10025                                        if (backtracking>0) {failed=true; return link;}
10026                                        NoViableAltException nvae =
10027                                            new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 75, input);
10028    
10029                                        throw nvae;
10030                                    }
10031                                }
10032                                else if ( ((LA116_56>=FORCED_END_OF_LINE && LA116_56<=WIKI)||(LA116_56>=POUND && LA116_56<=45)||(LA116_56>=47 && LA116_56<=80)) ) {
10033                                    alt116=2;
10034                                }
10035                                else {
10036                                    if (backtracking>0) {failed=true; return link;}
10037                                    NoViableAltException nvae =
10038                                        new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 56, input);
10039    
10040                                    throw nvae;
10041                                }
10042                            }
10043                            else if ( ((LA116_36>=FORCED_END_OF_LINE && LA116_36<=WIKI)||(LA116_36>=POUND && LA116_36<=51)||(LA116_36>=53 && LA116_36<=80)) ) {
10044                                alt116=2;
10045                            }
10046                            else {
10047                                if (backtracking>0) {failed=true; return link;}
10048                                NoViableAltException nvae =
10049                                    new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 36, input);
10050    
10051                                throw nvae;
10052                            }
10053                        }
10054                        else if ( ((LA116_18>=FORCED_END_OF_LINE && LA116_18<=WIKI)||(LA116_18>=POUND && LA116_18<=48)||(LA116_18>=50 && LA116_18<=80)) ) {
10055                            alt116=2;
10056                        }
10057                        else {
10058                            if (backtracking>0) {failed=true; return link;}
10059                            NoViableAltException nvae =
10060                                new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 18, input);
10061    
10062                            throw nvae;
10063                        }
10064                    }
10065                    else if ( ((LA116_3>=FORCED_END_OF_LINE && LA116_3<=WIKI)||(LA116_3>=POUND && LA116_3<=50)||(LA116_3>=52 && LA116_3<=80)) ) {
10066                        alt116=2;
10067                    }
10068                    else {
10069                        if (backtracking>0) {failed=true; return link;}
10070                        NoViableAltException nvae =
10071                            new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 3, input);
10072    
10073                        throw nvae;
10074                    }
10075                    }
10076                    break;
10077                case 54:
10078                    {
10079                    int LA116_4 = input.LA(2);
10080    
10081                    if ( (LA116_4==45) ) {
10082                        int LA116_19 = input.LA(3);
10083    
10084                        if ( (LA116_19==45) ) {
10085                            int LA116_37 = input.LA(4);
10086    
10087                            if ( (LA116_37==55) ) {
10088                                int LA116_57 = input.LA(5);
10089    
10090                                if ( (LA116_57==51) ) {
10091                                    int LA116_76 = input.LA(6);
10092    
10093                                    if ( (LA116_76==56) ) {
10094                                        int LA116_95 = input.LA(7);
10095    
10096                                        if ( (LA116_95==41) ) {
10097                                            int LA116_34 = input.LA(8);
10098    
10099                                            if ( ((LA116_34>=FORCED_END_OF_LINE && LA116_34<=WIKI)||(LA116_34>=POUND && LA116_34<=EQUAL)||(LA116_34>=ITAL && LA116_34<=NOWIKI_CLOSE)||(LA116_34>=IMAGE_CLOSE && LA116_34<=80)) ) {
10100                                                alt116=1;
10101                                            }
10102                                            else if ( (LA116_34==PIPE||LA116_34==LINK_CLOSE) ) {
10103                                                alt116=2;
10104                                            }
10105                                            else {
10106                                                if (backtracking>0) {failed=true; return link;}
10107                                                NoViableAltException nvae =
10108                                                    new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 34, input);
10109    
10110                                                throw nvae;
10111                                            }
10112                                        }
10113                                        else if ( ((LA116_95>=FORCED_END_OF_LINE && LA116_95<=WIKI)||(LA116_95>=POUND && LA116_95<=INSIGNIFICANT_CHAR)||(LA116_95>=42 && LA116_95<=80)) ) {
10114                                            alt116=2;
10115                                        }
10116                                        else {
10117                                            if (backtracking>0) {failed=true; return link;}
10118                                            NoViableAltException nvae =
10119                                                new NoViableAltException("828:1: link_address returns [LinkNode link =null] : (li= link_interwiki_uri ':' p= link_interwiki_pagename | lu= link_uri );", 116, 95, input);
10120    
10121                                            throw nvae;
10122                                        }
10123                                    }
10124                                    else if ( ((LA116_76>=FORCED_END_OF_LINE && LA116_76<=WIKI)||(LA116_76>=POUND && LA116_76<=55)||(LA116_76>=57 && LA116_76<=80)) ) {