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