Changeset 546

Show
Ignore:
Timestamp:
06/18/07 20:09:34 (2 years ago)
Author:
markm
Message:

errors from CFScript now bubble up to the CFMLParser

Location:
org.cfeclipse.cfml.core/trunk/src/org/cfeclipse/cfml/core/parser
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • org.cfeclipse.cfml.core/trunk/src/org/cfeclipse/cfml/core/parser/CFMLParser.java

    r544 r546  
    2525import org.antlr.runtime.*; 
    2626import org.antlr.runtime.tree.*; 
    27 import org.cfeclipse.cfml.core.parser.antlr.*; 
     27import org.cfeclipse.cfml.core.parser.antlr.ANTLRNoCaseStringStream; 
    2828 
    2929import java.util.*; 
    3030 
    31 public class CFMLParser extends org.cfeclipse.cfml.core.parser.antlr.CFMLParser 
     31/** 
     32 * @author mark 
     33 * 
     34 */ 
     35public class CFMLParser extends org.cfeclipse.cfml.core.parser.antlr.CFMLParser implements IErrorObserver 
    3236{ 
    3337        private ErrorObservable observable; 
     
    4145        } 
    4246         
     47        /** 
     48         * Add a error event observer 
     49         * @param observer the error observer 
     50         */ 
    4351        public void addObserver(IErrorObserver observer) 
    4452        { 
     
    4654        } 
    4755         
     56        /** 
     57         * Remove an error observer 
     58         * @param observer the error observer 
     59         */ 
    4860        public void removeObserver(IErrorObserver observer) 
    4961        { 
     
    5870                 
    5971                super.displayRecognitionError(tokenNames, e); 
     72        } 
     73 
     74        public void actionCFMLParserError(ErrorEvent event) 
     75        { 
     76                //bubble it up 
     77                getObservable().notifyObservers(event);          
    6078        } 
    6179 
     
    8199        } 
    82100         
    83         protected Tree parseCFScript(Token start, ParserRuleReturnScope stop) 
     101        /** 
     102         * Island parser for CFScript blocks 
     103         * @param start the token that it starts at 
     104         * @param stop the token that the cfscript stops at 
     105         */ 
     106        protected Tree parseCFScript(Token start, Token stop) 
    84107        { 
     108                Tree ast = null; 
    85109                org.antlr.runtime.BitSet bit = new org.antlr.runtime.BitSet(); 
    86110                bit.add(OTHER); 
    87                 List otherTokens = ((CommonTokenStream)input).getTokens(start.getTokenIndex(), stop.stop.getTokenIndex(), bit); 
     111                List otherTokens = ((CommonTokenStream)input).getTokens(start.getTokenIndex(), stop.getTokenIndex(), bit); 
    88112                 
    89113                StringBuffer buffer = new StringBuffer(); 
     
    97121        CFScriptLexer lexer = new CFScriptLexer(input); 
    98122         
     123        lexer.addObserver(this); 
     124         
    99125        CommonTokenStream tokens = new CommonTokenStream(lexer); 
    100126        CFScriptParser parser = new CFScriptParser(tokens); 
     127         
     128        parser.addObserver(this); 
    101129         
    102130        try 
    103131        { 
    104132                CFScriptParser.script_return root = parser.script(); 
    105                 Tree ast = (Tree)root.getTree(); 
    106                 return ast; 
     133                ast = (Tree)root.getTree(); 
    107134        } 
    108135        catch(RecognitionException exc) 
     
    111138                getObservable().notifyObservers(event); 
    112139        } 
     140         
     141        lexer.removeObserver(this); 
     142        parser.removeObserver(this); 
    113143                 
    114                 return null; 
     144                return ast; 
    115145        }        
    116146         
  • org.cfeclipse.cfml.core/trunk/src/org/cfeclipse/cfml/core/parser/antlr/CFMLLexer.java

    r544 r546  
    1 // $ANTLR 3.0 ./CFML.g 2007-06-18 17:05:29 
     1// $ANTLR 3.0 ./CFML.g 2007-06-19 11:37:01 
    22 
    33package org.cfeclipse.cfml.core.parser.antlr; 
     
    9090        try { 
    9191            int _type = END_TAG_OPEN; 
    92             // ./CFML.g:218:2: ({...}? => '</' TAG_NAME ) 
    93             // ./CFML.g:218:2: {...}? => '</' TAG_NAME 
     92            // ./CFML.g:217:2: ({...}? => '</' TAG_NAME ) 
     93            // ./CFML.g:217:2: {...}? => '</' TAG_NAME 
    9494            { 
    9595            if ( !( 
     
    120120        try { 
    121121            int _type = END_TAG_CLOSE; 
    122             // ./CFML.g:229:2: ({...}? => '>' ) 
    123             // ./CFML.g:229:2: {...}? => '>' 
     122            // ./CFML.g:228:2: ({...}? => '>' ) 
     123            // ./CFML.g:228:2: {...}? => '>' 
    124124            { 
    125125            if ( !(getMode() == ENDTAG_MODE) ) { 
     
    144144        try { 
    145145            int _type = START_TAG_OPEN; 
    146             // ./CFML.g:236:2: ({...}? => '<' TAG_NAME ) 
    147             // ./CFML.g:236:2: {...}? => '<' TAG_NAME 
     146            // ./CFML.g:235:2: ({...}? => '<' TAG_NAME ) 
     147            // ./CFML.g:235:2: {...}? => '<' TAG_NAME 
    148148            { 
    149149            if ( !( 
     
    173173        try { 
    174174            int _type = START_TAG_CLOSE; 
    175             // ./CFML.g:248:2: ({...}? => ( '/' )? '>' ) 
    176             // ./CFML.g:248:2: {...}? => ( '/' )? '>' 
     175            // ./CFML.g:247:2: ({...}? => ( '/' )? '>' ) 
     176            // ./CFML.g:247:2: {...}? => ( '/' )? '>' 
    177177            { 
    178178            if ( !(getMode() == STARTTAG_MODE) ) { 
    179179                throw new FailedPredicateException(input, "START_TAG_CLOSE", "getMode() == STARTTAG_MODE"); 
    180180            } 
    181             // ./CFML.g:249:2: ( '/' )? 
     181            // ./CFML.g:248:2: ( '/' )? 
    182182            int alt1=2; 
    183183            int LA1_0 = input.LA(1); 
     
    188188            switch (alt1) { 
    189189                case 1 : 
    190                     // ./CFML.g:249:2: '/' 
     190                    // ./CFML.g:248:2: '/' 
    191191                    { 
    192192                    match('/');  
     
    215215        try { 
    216216            int _type = TAG_ATTRIBUTE; 
    217             // ./CFML.g:255:2: ({...}? => ( LETTER | DIGIT | UNDERSCORE )+ ) 
    218             // ./CFML.g:255:2: {...}? => ( LETTER | DIGIT | UNDERSCORE )+ 
     217            // ./CFML.g:254:2: ({...}? => ( LETTER | DIGIT | UNDERSCORE )+ ) 
     218            // ./CFML.g:254:2: {...}? => ( LETTER | DIGIT | UNDERSCORE )+ 
    219219            { 
    220220            if ( !(getMode() == STARTTAG_MODE) ) { 
    221221                throw new FailedPredicateException(input, "TAG_ATTRIBUTE", "getMode() == STARTTAG_MODE"); 
    222222            } 
    223             // ./CFML.g:256:2: ( LETTER | DIGIT | UNDERSCORE )+ 
     223            // ./CFML.g:255:2: ( LETTER | DIGIT | UNDERSCORE )+ 
    224224            int cnt2=0; 
    225225            loop2: 
     
    276276        try { 
    277277            int _type = EQUALS; 
    278             // ./CFML.g:261:2: ({...}? => '=' ) 
    279             // ./CFML.g:261:2: {...}? => '=' 
     278            // ./CFML.g:260:2: ({...}? => '=' ) 
     279            // ./CFML.g:260:2: {...}? => '=' 
    280280            { 
    281281            if ( !(getMode() == STARTTAG_MODE) ) { 
     
    299299        try { 
    300300            int _type = ESCAPE_DOUBLE_QUOTE; 
    301             // ./CFML.g:267:2: ({...}? => '\"\"' ) 
    302             // ./CFML.g:267:2: {...}? => '\"\"' 
     301            // ./CFML.g:266:2: ({...}? => '\"\"' ) 
     302            // ./CFML.g:266:2: {...}? => '\"\"' 
    303303            { 
    304304            if ( !(getMode() == STARTTAG_MODE) ) { 
     
    323323        try { 
    324324            int _type = ESCAPE_SINGLE_QUOTE; 
    325             // ./CFML.g:273:2: ({...}? => '\\'\\'' ) 
    326             // ./CFML.g:273:2: {...}? => '\\'\\'' 
     325            // ./CFML.g:272:2: ({...}? => '\\'\\'' ) 
     326            // ./CFML.g:272:2: {...}? => '\\'\\'' 
    327327            { 
    328328            if ( !(getMode() == STARTTAG_MODE) ) { 
     
    347347        try { 
    348348            int _type = DOUBLE_QUOTE; 
    349             // ./CFML.g:279:2: ({...}? => '\"' ) 
    350             // ./CFML.g:279:2: {...}? => '\"' 
     349            // ./CFML.g:278:2: ({...}? => '\"' ) 
     350            // ./CFML.g:278:2: {...}? => '\"' 
    351351            { 
    352352            if ( !(getMode() == STARTTAG_MODE) ) { 
     
    370370        try { 
    371371            int _type = SINGLE_QUOTE; 
    372             // ./CFML.g:284:2: ({...}? => '\\'' ) 
    373             // ./CFML.g:284:2: {...}? => '\\'' 
     372            // ./CFML.g:283:2: ({...}? => '\\'' ) 
     373            // ./CFML.g:283:2: {...}? => '\\'' 
    374374            { 
    375375            if ( !(getMode() == STARTTAG_MODE) ) { 
     
    392392    traceIn("TAG_NAME", 11); 
    393393        try { 
    394             // ./CFML.g:292:2: ( ( LETTER ) ( TAG_IDENT ) ( ( COLON ) ( TAG_IDENT ) )? ) 
    395             // ./CFML.g:292:2: ( LETTER ) ( TAG_IDENT ) ( ( COLON ) ( TAG_IDENT ) )? 
    396             { 
    397             // ./CFML.g:292:2: ( LETTER ) 
    398             // ./CFML.g:292:3: LETTER 
     394            // ./CFML.g:291:2: ( ( LETTER ) ( TAG_IDENT ) ( ( COLON ) ( TAG_IDENT ) )? ) 
     395            // ./CFML.g:291:2: ( LETTER ) ( TAG_IDENT ) ( ( COLON ) ( TAG_IDENT ) )? 
     396            { 
     397            // ./CFML.g:291:2: ( LETTER ) 
     398            // ./CFML.g:291:3: LETTER 
    399399            { 
    400400            mLETTER();  
     
    402402            } 
    403403 
    404             // ./CFML.g:292:10: ( TAG_IDENT ) 
    405             // ./CFML.g:292:11: TAG_IDENT 
     404            // ./CFML.g:291:10: ( TAG_IDENT ) 
     405            // ./CFML.g:291:11: TAG_IDENT 
    406406            { 
    407407            mTAG_IDENT();  
     
    409409            } 
    410410 
    411             // ./CFML.g:292:21: ( ( COLON ) ( TAG_IDENT ) )? 
     411            // ./CFML.g:291:21: ( ( COLON ) ( TAG_IDENT ) )? 
    412412            int alt3=2; 
    413413            int LA3_0 = input.LA(1); 
     
    418418            switch (alt3) { 
    419419                case 1 : 
    420                     // ./CFML.g:292:22: ( COLON ) ( TAG_IDENT ) 
     420                    // ./CFML.g:291:22: ( COLON ) ( TAG_IDENT ) 
    421421                    { 
    422                     // ./CFML.g:292:22: ( COLON ) 
    423                     // ./CFML.g:292:23: COLON 
     422                    // ./CFML.g:291:22: ( COLON ) 
     423                    // ./CFML.g:291:23: COLON 
    424424                    { 
    425425                    mCOLON();  
     
    427427                    } 
    428428 
    429                     // ./CFML.g:292:29: ( TAG_IDENT ) 
    430                     // ./CFML.g:292:30: TAG_IDENT 
     429                    // ./CFML.g:291:29: ( TAG_IDENT ) 
     430                    // ./CFML.g:291:30: TAG_IDENT 
    431431                    { 
    432432                    mTAG_IDENT();  
     
    454454    traceIn("TAG_IDENT", 12); 
    455455        try { 
    456             // ./CFML.g:297:2: ( ( LETTER | DIGIT | UNDERSCORE )* ) 
    457             // ./CFML.g:297:2: ( LETTER | DIGIT | UNDERSCORE )* 
    458             { 
    459             // ./CFML.g:297:2: ( LETTER | DIGIT | UNDERSCORE )* 
     456            // ./CFML.g:296:2: ( ( LETTER | DIGIT | UNDERSCORE )* ) 
     457            // ./CFML.g:296:2: ( LETTER | DIGIT | UNDERSCORE )* 
     458            { 
     459            // ./CFML.g:296:2: ( LETTER | DIGIT | UNDERSCORE )* 
    460460            loop4: 
    461461            do { 
     
    505505    traceIn("DIGIT", 13); 
    506506        try { 
    507             // ./CFML.g:302:2: ( '0' .. '9' ) 
    508             // ./CFML.g:302:2: '0' .. '9' 
     507            // ./CFML.g:301:2: ( '0' .. '9' ) 
     508            // ./CFML.g:301:2: '0' .. '9' 
    509509            { 
    510510            matchRange('0','9');  
     
    523523    traceIn("LETTER", 14); 
    524524        try { 
    525             // ./CFML.g:307:2: ( 'a' .. 'z' | 'A' .. 'Z' ) 
     525            // ./CFML.g:306:2: ( 'a' .. 'z' | 'A' .. 'Z' ) 
    526526            // ./CFML.g: 
    527527            { 
     
    550550    traceIn("UNDERSCORE", 15); 
    551551        try { 
    552             // ./CFML.g:312:2: ( '_' ) 
    553             // ./CFML.g:312:2: '_' 
     552            // ./CFML.g:311:2: ( '_' ) 
     553            // ./CFML.g:311:2: '_' 
    554554            { 
    555555            match('_');  
     
    568568    traceIn("COLON", 16); 
    569569        try { 
    570             // ./CFML.g:317:2: ( ':' ) 
    571             // ./CFML.g:317:2: ':' 
     570            // ./CFML.g:316:2: ( ':' ) 
     571            // ./CFML.g:316:2: ':' 
    572572            { 
    573573            match(':');  
     
    587587        try { 
    588588            int _type = WS; 
    589             // ./CFML.g:324:2: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) ) 
    590             // ./CFML.g:324:2: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) 
     589            // ./CFML.g:323:2: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) ) 
     590            // ./CFML.g:323:2: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) 
    591591            { 
    592592            if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||(input.LA(1)>='\f' && input.LA(1)<='\r')||input.LA(1)==' ' ) { 
     
    619619        try { 
    620620            int _type = COMMENT; 
    621             // ./CFML.g:332:2: ( '<!---' ( options {greedy=false; } : . )* '--->' ) 
    622             // ./CFML.g:332:2: '<!---' ( options {greedy=false; } : . )* '--->' 
     621            // ./CFML.g:331:2: ( '<!---' ( options {greedy=false; } : . )* '--->' ) 
     622            // ./CFML.g:331:2: '<!---' ( options {greedy=false; } : . )* '--->' 
    623623            { 
    624624            match("<!---");  
    625625 
    626             // ./CFML.g:332:10: ( options {greedy=false; } : . )* 
     626            // ./CFML.g:331:10: ( options {greedy=false; } : . )* 
    627627            loop5: 
    628628            do { 
     
    667667                switch (alt5) { 
    668668                case 1 : 
    669                     // ./CFML.g:332:38: . 
     669                    // ./CFML.g:331:38: . 
    670670                    { 
    671671                    matchAny();  
     
    700700        try { 
    701701            int _type = OTHER; 
    702             // ./CFML.g:340:2: ({...}? => ( options {greedy=false; } : . ) ) 
    703             // ./CFML.g:340:2: {...}? => ( options {greedy=false; } : . ) 
     702            // ./CFML.g:339:2: ({...}? => ( options {greedy=false; } : . ) ) 
     703            // ./CFML.g:339:2: {...}? => ( options {greedy=false; } : . ) 
    704704            { 
    705705            if ( !(getMode() == NONE_MODE) ) { 
    706706                throw new FailedPredicateException(input, "OTHER", "getMode() == NONE_MODE"); 
    707707            } 
    708             // ./CFML.g:341:2: ( options {greedy=false; } : . ) 
    709             // ./CFML.g:341:29: . 
     708            // ./CFML.g:340:2: ( options {greedy=false; } : . ) 
     709            // ./CFML.g:340:29: . 
    710710            { 
    711711            matchAny();  
  • org.cfeclipse.cfml.core/trunk/src/org/cfeclipse/cfml/core/parser/antlr/CFMLParser.java

    r544 r546  
    1 // $ANTLR 3.0 ./CFML.g 2007-06-18 17:05:29 
     1// $ANTLR 3.0 ./CFML.g 2007-06-19 11:37:01 
    22 
    33package org.cfeclipse.cfml.core.parser.antlr; 
     
    116116        */ 
    117117         
    118         protected Tree parseCFScript(Token start, ParserRuleReturnScope stop) 
     118        protected Tree parseCFScript(Token start, Token stop) 
    119119        { 
    120                 System.out.println("inner method"); 
    121120                BitSet bit = new BitSet(); 
    122121                bit.add(OTHER); 
    123                 System.out.println(((CommonTokenStream)input).getTokens(start.getTokenIndex(), stop.stop.getTokenIndex(), bit)); 
     122                System.out.println(((CommonTokenStream)input).getTokens(start.getTokenIndex(), stop.getTokenIndex(), bit)); 
    124123                return null; 
    125124        } 
     
    132131 
    133132    // $ANTLR start cfml 
    134     // ./CFML.g:169:1: cfml : ( tag )* ; 
     133    // ./CFML.g:168:1: cfml : ( tag )* ; 
    135134    public final cfml_return cfml() throws RecognitionException { 
    136135    traceIn("cfml", 1); 
     
    145144 
    146145        try { 
    147             // ./CFML.g:171:2: ( ( tag )* ) 
    148             // ./CFML.g:171:2: ( tag )* 
     146            // ./CFML.g:170:2: ( ( tag )* ) 
     147            // ./CFML.g:170:2: ( tag )* 
    149148            { 
    150149            root_0 = (Object)adaptor.nil(); 
    151150 
    152             // ./CFML.g:171:2: ( tag )* 
     151            // ./CFML.g:170:2: ( tag )* 
    153152            loop1: 
    154153            do { 
     
    163162                switch (alt1) { 
    164163                case 1 : 
    165                     // ./CFML.g:171:2: tag 
     164                    // ./CFML.g:170:2: tag 
    166165                    { 
    167166                    pushFollow(FOLLOW_tag_in_cfml90); 
     
    205204 
    206205    // $ANTLR start tag 
    207     // ./CFML.g:174:1: tag : startTag ; 
     206    // ./CFML.g:173:1: tag : startTag ; 
    208207    public final tag_return tag() throws RecognitionException { 
    209208    traceIn("tag", 2); 
     
    218217 
    219218        try { 
    220             // ./CFML.g:176:3: ( startTag ) 
    221             // ./CFML.g:176:3: startTag 
     219            // ./CFML.g:175:3: ( startTag ) 
     220            // ./CFML.g:175:3: startTag 
    222221            { 
    223222            root_0 = (Object)adaptor.nil(); 
     
    254253 
    255254    // $ANTLR start startTag 
    256     // ./CFML.g:179:1: startTag : (sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) ) ; 
     255    // ./CFML.g:178:1: startTag : (sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) ) ; 
    257256    public final startTag_return startTag() throws RecognitionException { 
    258257    traceIn("startTag", 3); 
     
    273272        RewriteRuleSubtreeStream stream_tagContent=new RewriteRuleSubtreeStream(adaptor,"rule tagContent"); 
    274273        try { 
    275             // ./CFML.g:181:2: ( (sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) ) ) 
    276             // ./CFML.g:181:2: (sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) ) 
    277             { 
    278             // ./CFML.g:181:2: (sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) ) 
    279             // ./CFML.g:182:2: sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) 
     274            // ./CFML.g:180:2: ( (sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) ) ) 
     275            // ./CFML.g:180:2: (sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) ) 
     276            { 
     277            // ./CFML.g:180:2: (sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) ) 
     278            // ./CFML.g:181:2: sto= START_TAG_OPEN stc= START_TAG_CLOSE tc= tagContent ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) 
    280279            { 
    281280            sto=(Token)input.LT(1); 
     
    292291 
    293292            stream_tagContent.add(tc.getTree()); 
    294             // ./CFML.g:185:3: ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) 
    295             // ./CFML.g:186:3:  
     293            // ./CFML.g:184:3: ( -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) ) 
     294            // ./CFML.g:185:3:  
    296295            { 
    297296 
     
    306305 
    307306            root_0 = (Object)adaptor.nil(); 
    308             // 186:3: -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) 
     307            // 185:3: -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) 
    309308            if (isImportTag(sto)) { 
    310                 // ./CFML.g:186:27: ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) 
     309                // ./CFML.g:185:27: ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) 
    311310                { 
    312311                Object root_1 = (Object)adaptor.nil(); 
     
    320319 
    321320            } 
    322             else // 187:3: -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) 
     321            else // 186:3: -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) 
    323322            if (isCustomTag(sto)) { 
    324                 // ./CFML.g:187:27: ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) 
     323                // ./CFML.g:186:27: ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) 
    325324                { 
    326325                Object root_1 = (Object)adaptor.nil(); 
     
    334333 
    335334            } 
    336             else // 188:3: -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) 
     335            else // 187:3: -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) 
    337336            if (isColdFusionTag(sto)) { 
    338                 // ./CFML.g:188:31: ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) 
     337                // ./CFML.g:187:31: ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) 
    339338                { 
    340339                Object root_1 = (Object)adaptor.nil(); 
     
    343342                adaptor.addChild(root_1, stream_START_TAG_CLOSE.next()); 
    344343                adaptor.addChild(root_1,  
    345                                                                         (containsCFScript(sto) ? parseCFScript(stc, tc) : null) 
     344                                                                        (containsCFScript(sto) ? parseCFScript(stc, tc.stop) : null) 
    346345                                                                ); 
    347346                adaptor.addChild(root_1, stream_tagContent.next()); 
     
    351350 
    352351            } 
    353             else // 195:3: -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) 
    354             { 
    355                 // ./CFML.g:195:6: ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) 
     352            else // 194:3: -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) 
     353            { 
     354                // ./CFML.g:194:6: ^( START_TAG_OPEN START_TAG_CLOSE tagContent ) 
    356355                { 
    357356                Object root_1 = (Object)adaptor.nil(); 
     
    399398 
    400399    // $ANTLR start tagContent 
    401     // ./CFML.g:200:1: tagContent : ( tag )* ( endTag | EOF ) ; 
     400    // ./CFML.g:199:1: tagContent : ( tag )* ( endTag | EOF ) ; 
    402401    public final tagContent_return tagContent() throws RecognitionException { 
    403402    traceIn("tagContent", 4); 
     
    416415 
    417416        try { 
    418             // ./CFML.g:202:2: ( ( tag )* ( endTag | EOF ) ) 
    419             // ./CFML.g:202:2: ( tag )* ( endTag | EOF ) 
     417            // ./CFML.g:201:2: ( ( tag )* ( endTag | EOF ) ) 
     418            // ./CFML.g:201:2: ( tag )* ( endTag | EOF ) 
    420419            { 
    421420            root_0 = (Object)adaptor.nil(); 
    422421 
    423             // ./CFML.g:202:2: ( tag )* 
     422            // ./CFML.g:201:2: ( tag )* 
    424423            loop2: 
    425424            do { 
     
    434433                switch (alt2) { 
    435434                case 1 : 
    436                     // ./CFML.g:202:2: tag 
     435                    // ./CFML.g:201:2: tag 
    437436                    { 
    438437                    pushFollow(FOLLOW_tag_in_tagContent240); 
     
    450449            } while (true); 
    451450 
    452             // ./CFML.g:202:7: ( endTag | EOF ) 
     451            // ./CFML.g:201:7: ( endTag | EOF ) 
    453452            int alt3=2; 
    454453            int LA3_0 = input.LA(1); 
     
    462461            else { 
    463462                NoViableAltException nvae = 
    464                     new NoViableAltException("202:7: ( endTag | EOF )", 3, 0, input); 
     463                    new NoViableAltException("201:7: ( endTag | EOF )", 3, 0, input); 
    465464 
    466465                throw nvae; 
     
    468467            switch (alt3) { 
    469468                case 1 : 
    470                     // ./CFML.g:202:8: endTag 
     469                    // ./CFML.g:201:8: endTag 
    471470                    { 
    472471                    pushFollow(FOLLOW_endTag_in_tagContent244); 
     
    479478                    break; 
    480479                case 2 : 
    481                     // ./CFML.g:202:17: EOF 
     480                    // ./CFML.g:201:17: EOF 
    482481                    { 
    483482                    EOF5=(Token)input.LT(1); 
     
    515514 
    516515    // $ANTLR start endTag 
    517     // ./CFML.g:205:1: endTag : END_TAG_OPEN END_TAG_CLOSE ; 
     516    // ./CFML.g:204:1: endTag : END_TAG_OPEN END_TAG_CLOSE ; 
    518517    public final endTag_return endTag() throws RecognitionException { 
    519518    traceIn("endTag", 5); 
     
    530529 
    531530        try { 
    532             // ./CFML.g:210:2: ( END_TAG_OPEN END_TAG_CLOSE ) 
    533             // ./CFML.g:210:2: END_TAG_OPEN END_TAG_CLOSE 
     531            // ./CFML.g:209:2: ( END_TAG_OPEN END_TAG_CLOSE ) 
     532            // ./CFML.g:209:2: END_TAG_OPEN END_TAG_CLOSE 
    534533            { 
    535534            root_0 = (Object)adaptor.nil(); 
  • org.cfeclipse.cfml.core/trunk/src/org/cfeclipse/cfml/core/parser/antlr/CFScriptLexer.java

    r544 r546  
    1 // $ANTLR 3.0 ./CFScript.g 2007-06-18 17:05:29 
     1// $ANTLR 3.0 ./CFScript.g 2007-06-19 11:37:01 
    22 
    33package org.cfeclipse.cfml.core.parser.antlr; 
  • org.cfeclipse.cfml.core/trunk/src/org/cfeclipse/cfml/core/parser/antlr/CFScriptParser.java

    r544 r546  
    1 // $ANTLR 3.0 ./CFScript.g 2007-06-18 17:05:28 
     1// $ANTLR 3.0 ./CFScript.g 2007-06-19 11:37:01 
    22 
    33package org.cfeclipse.cfml.core.parser.antlr;