Changeset 546
- Timestamp:
- 06/18/07 20:09:34 (2 years ago)
- Location:
- org.cfeclipse.cfml.core/trunk/src/org/cfeclipse/cfml/core/parser
- Files:
-
- 5 modified
-
CFMLParser.java (modified) (7 diffs)
-
antlr/CFMLLexer.java (modified) (26 diffs)
-
antlr/CFMLParser.java (modified) (24 diffs)
-
antlr/CFScriptLexer.java (modified) (1 diff)
-
antlr/CFScriptParser.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
org.cfeclipse.cfml.core/trunk/src/org/cfeclipse/cfml/core/parser/CFMLParser.java
r544 r546 25 25 import org.antlr.runtime.*; 26 26 import org.antlr.runtime.tree.*; 27 import org.cfeclipse.cfml.core.parser.antlr. *;27 import org.cfeclipse.cfml.core.parser.antlr.ANTLRNoCaseStringStream; 28 28 29 29 import java.util.*; 30 30 31 public class CFMLParser extends org.cfeclipse.cfml.core.parser.antlr.CFMLParser 31 /** 32 * @author mark 33 * 34 */ 35 public class CFMLParser extends org.cfeclipse.cfml.core.parser.antlr.CFMLParser implements IErrorObserver 32 36 { 33 37 private ErrorObservable observable; … … 41 45 } 42 46 47 /** 48 * Add a error event observer 49 * @param observer the error observer 50 */ 43 51 public void addObserver(IErrorObserver observer) 44 52 { … … 46 54 } 47 55 56 /** 57 * Remove an error observer 58 * @param observer the error observer 59 */ 48 60 public void removeObserver(IErrorObserver observer) 49 61 { … … 58 70 59 71 super.displayRecognitionError(tokenNames, e); 72 } 73 74 public void actionCFMLParserError(ErrorEvent event) 75 { 76 //bubble it up 77 getObservable().notifyObservers(event); 60 78 } 61 79 … … 81 99 } 82 100 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) 84 107 { 108 Tree ast = null; 85 109 org.antlr.runtime.BitSet bit = new org.antlr.runtime.BitSet(); 86 110 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); 88 112 89 113 StringBuffer buffer = new StringBuffer(); … … 97 121 CFScriptLexer lexer = new CFScriptLexer(input); 98 122 123 lexer.addObserver(this); 124 99 125 CommonTokenStream tokens = new CommonTokenStream(lexer); 100 126 CFScriptParser parser = new CFScriptParser(tokens); 127 128 parser.addObserver(this); 101 129 102 130 try 103 131 { 104 132 CFScriptParser.script_return root = parser.script(); 105 Tree ast = (Tree)root.getTree(); 106 return ast; 133 ast = (Tree)root.getTree(); 107 134 } 108 135 catch(RecognitionException exc) … … 111 138 getObservable().notifyObservers(event); 112 139 } 140 141 lexer.removeObserver(this); 142 parser.removeObserver(this); 113 143 114 return null;144 return ast; 115 145 } 116 146 -
org.cfeclipse.cfml.core/trunk/src/org/cfeclipse/cfml/core/parser/antlr/CFMLLexer.java
r544 r546 1 // $ANTLR 3.0 ./CFML.g 2007-06-1 8 17:05:291 // $ANTLR 3.0 ./CFML.g 2007-06-19 11:37:01 2 2 3 3 package org.cfeclipse.cfml.core.parser.antlr; … … 90 90 try { 91 91 int _type = END_TAG_OPEN; 92 // ./CFML.g:21 8:2: ({...}? => '</' TAG_NAME )93 // ./CFML.g:21 8:2: {...}? => '</' TAG_NAME92 // ./CFML.g:217:2: ({...}? => '</' TAG_NAME ) 93 // ./CFML.g:217:2: {...}? => '</' TAG_NAME 94 94 { 95 95 if ( !( … … 120 120 try { 121 121 int _type = END_TAG_CLOSE; 122 // ./CFML.g:22 9:2: ({...}? => '>' )123 // ./CFML.g:22 9:2: {...}? => '>'122 // ./CFML.g:228:2: ({...}? => '>' ) 123 // ./CFML.g:228:2: {...}? => '>' 124 124 { 125 125 if ( !(getMode() == ENDTAG_MODE) ) { … … 144 144 try { 145 145 int _type = START_TAG_OPEN; 146 // ./CFML.g:23 6:2: ({...}? => '<' TAG_NAME )147 // ./CFML.g:23 6:2: {...}? => '<' TAG_NAME146 // ./CFML.g:235:2: ({...}? => '<' TAG_NAME ) 147 // ./CFML.g:235:2: {...}? => '<' TAG_NAME 148 148 { 149 149 if ( !( … … 173 173 try { 174 174 int _type = START_TAG_CLOSE; 175 // ./CFML.g:24 8:2: ({...}? => ( '/' )? '>' )176 // ./CFML.g:24 8:2: {...}? => ( '/' )? '>'175 // ./CFML.g:247:2: ({...}? => ( '/' )? '>' ) 176 // ./CFML.g:247:2: {...}? => ( '/' )? '>' 177 177 { 178 178 if ( !(getMode() == STARTTAG_MODE) ) { 179 179 throw new FailedPredicateException(input, "START_TAG_CLOSE", "getMode() == STARTTAG_MODE"); 180 180 } 181 // ./CFML.g:24 9:2: ( '/' )?181 // ./CFML.g:248:2: ( '/' )? 182 182 int alt1=2; 183 183 int LA1_0 = input.LA(1); … … 188 188 switch (alt1) { 189 189 case 1 : 190 // ./CFML.g:24 9:2: '/'190 // ./CFML.g:248:2: '/' 191 191 { 192 192 match('/'); … … 215 215 try { 216 216 int _type = TAG_ATTRIBUTE; 217 // ./CFML.g:25 5:2: ({...}? => ( LETTER | DIGIT | UNDERSCORE )+ )218 // ./CFML.g:25 5:2: {...}? => ( LETTER | DIGIT | UNDERSCORE )+217 // ./CFML.g:254:2: ({...}? => ( LETTER | DIGIT | UNDERSCORE )+ ) 218 // ./CFML.g:254:2: {...}? => ( LETTER | DIGIT | UNDERSCORE )+ 219 219 { 220 220 if ( !(getMode() == STARTTAG_MODE) ) { 221 221 throw new FailedPredicateException(input, "TAG_ATTRIBUTE", "getMode() == STARTTAG_MODE"); 222 222 } 223 // ./CFML.g:25 6:2: ( LETTER | DIGIT | UNDERSCORE )+223 // ./CFML.g:255:2: ( LETTER | DIGIT | UNDERSCORE )+ 224 224 int cnt2=0; 225 225 loop2: … … 276 276 try { 277 277 int _type = EQUALS; 278 // ./CFML.g:26 1:2: ({...}? => '=' )279 // ./CFML.g:26 1:2: {...}? => '='278 // ./CFML.g:260:2: ({...}? => '=' ) 279 // ./CFML.g:260:2: {...}? => '=' 280 280 { 281 281 if ( !(getMode() == STARTTAG_MODE) ) { … … 299 299 try { 300 300 int _type = ESCAPE_DOUBLE_QUOTE; 301 // ./CFML.g:26 7:2: ({...}? => '\"\"' )302 // ./CFML.g:26 7:2: {...}? => '\"\"'301 // ./CFML.g:266:2: ({...}? => '\"\"' ) 302 // ./CFML.g:266:2: {...}? => '\"\"' 303 303 { 304 304 if ( !(getMode() == STARTTAG_MODE) ) { … … 323 323 try { 324 324 int _type = ESCAPE_SINGLE_QUOTE; 325 // ./CFML.g:27 3:2: ({...}? => '\\'\\'' )326 // ./CFML.g:27 3:2: {...}? => '\\'\\''325 // ./CFML.g:272:2: ({...}? => '\\'\\'' ) 326 // ./CFML.g:272:2: {...}? => '\\'\\'' 327 327 { 328 328 if ( !(getMode() == STARTTAG_MODE) ) { … … 347 347 try { 348 348 int _type = DOUBLE_QUOTE; 349 // ./CFML.g:27 9:2: ({...}? => '\"' )350 // ./CFML.g:27 9:2: {...}? => '\"'349 // ./CFML.g:278:2: ({...}? => '\"' ) 350 // ./CFML.g:278:2: {...}? => '\"' 351 351 { 352 352 if ( !(getMode() == STARTTAG_MODE) ) { … … 370 370 try { 371 371 int _type = SINGLE_QUOTE; 372 // ./CFML.g:28 4:2: ({...}? => '\\'' )373 // ./CFML.g:28 4:2: {...}? => '\\''372 // ./CFML.g:283:2: ({...}? => '\\'' ) 373 // ./CFML.g:283:2: {...}? => '\\'' 374 374 { 375 375 if ( !(getMode() == STARTTAG_MODE) ) { … … 392 392 traceIn("TAG_NAME", 11); 393 393 try { 394 // ./CFML.g:29 2:2: ( ( LETTER ) ( TAG_IDENT ) ( ( COLON ) ( TAG_IDENT ) )? )395 // ./CFML.g:29 2:2: ( LETTER ) ( TAG_IDENT ) ( ( COLON ) ( TAG_IDENT ) )?396 { 397 // ./CFML.g:29 2:2: ( LETTER )398 // ./CFML.g:29 2:3: LETTER394 // ./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 399 399 { 400 400 mLETTER(); … … 402 402 } 403 403 404 // ./CFML.g:29 2:10: ( TAG_IDENT )405 // ./CFML.g:29 2:11: TAG_IDENT404 // ./CFML.g:291:10: ( TAG_IDENT ) 405 // ./CFML.g:291:11: TAG_IDENT 406 406 { 407 407 mTAG_IDENT(); … … 409 409 } 410 410 411 // ./CFML.g:29 2:21: ( ( COLON ) ( TAG_IDENT ) )?411 // ./CFML.g:291:21: ( ( COLON ) ( TAG_IDENT ) )? 412 412 int alt3=2; 413 413 int LA3_0 = input.LA(1); … … 418 418 switch (alt3) { 419 419 case 1 : 420 // ./CFML.g:29 2:22: ( COLON ) ( TAG_IDENT )420 // ./CFML.g:291:22: ( COLON ) ( TAG_IDENT ) 421 421 { 422 // ./CFML.g:29 2:22: ( COLON )423 // ./CFML.g:29 2:23: COLON422 // ./CFML.g:291:22: ( COLON ) 423 // ./CFML.g:291:23: COLON 424 424 { 425 425 mCOLON(); … … 427 427 } 428 428 429 // ./CFML.g:29 2:29: ( TAG_IDENT )430 // ./CFML.g:29 2:30: TAG_IDENT429 // ./CFML.g:291:29: ( TAG_IDENT ) 430 // ./CFML.g:291:30: TAG_IDENT 431 431 { 432 432 mTAG_IDENT(); … … 454 454 traceIn("TAG_IDENT", 12); 455 455 try { 456 // ./CFML.g:29 7:2: ( ( LETTER | DIGIT | UNDERSCORE )* )457 // ./CFML.g:29 7:2: ( LETTER | DIGIT | UNDERSCORE )*458 { 459 // ./CFML.g:29 7: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 )* 460 460 loop4: 461 461 do { … … 505 505 traceIn("DIGIT", 13); 506 506 try { 507 // ./CFML.g:30 2:2: ( '0' .. '9' )508 // ./CFML.g:30 2:2: '0' .. '9'507 // ./CFML.g:301:2: ( '0' .. '9' ) 508 // ./CFML.g:301:2: '0' .. '9' 509 509 { 510 510 matchRange('0','9'); … … 523 523 traceIn("LETTER", 14); 524 524 try { 525 // ./CFML.g:30 7:2: ( 'a' .. 'z' | 'A' .. 'Z' )525 // ./CFML.g:306:2: ( 'a' .. 'z' | 'A' .. 'Z' ) 526 526 // ./CFML.g: 527 527 { … … 550 550 traceIn("UNDERSCORE", 15); 551 551 try { 552 // ./CFML.g:31 2:2: ( '_' )553 // ./CFML.g:31 2:2: '_'552 // ./CFML.g:311:2: ( '_' ) 553 // ./CFML.g:311:2: '_' 554 554 { 555 555 match('_'); … … 568 568 traceIn("COLON", 16); 569 569 try { 570 // ./CFML.g:31 7:2: ( ':' )571 // ./CFML.g:31 7:2: ':'570 // ./CFML.g:316:2: ( ':' ) 571 // ./CFML.g:316:2: ':' 572 572 { 573 573 match(':'); … … 587 587 try { 588 588 int _type = WS; 589 // ./CFML.g:32 4:2: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) )590 // ./CFML.g:32 4:2: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' )589 // ./CFML.g:323:2: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) ) 590 // ./CFML.g:323:2: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) 591 591 { 592 592 if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||(input.LA(1)>='\f' && input.LA(1)<='\r')||input.LA(1)==' ' ) { … … 619 619 try { 620 620 int _type = COMMENT; 621 // ./CFML.g:33 2:2: ( '<!---' ( options {greedy=false; } : . )* '--->' )622 // ./CFML.g:33 2:2: '<!---' ( options {greedy=false; } : . )* '--->'621 // ./CFML.g:331:2: ( '<!---' ( options {greedy=false; } : . )* '--->' ) 622 // ./CFML.g:331:2: '<!---' ( options {greedy=false; } : . )* '--->' 623 623 { 624 624 match("<!---"); 625 625 626 // ./CFML.g:33 2:10: ( options {greedy=false; } : . )*626 // ./CFML.g:331:10: ( options {greedy=false; } : . )* 627 627 loop5: 628 628 do { … … 667 667 switch (alt5) { 668 668 case 1 : 669 // ./CFML.g:33 2:38: .669 // ./CFML.g:331:38: . 670 670 { 671 671 matchAny(); … … 700 700 try { 701 701 int _type = OTHER; 702 // ./CFML.g:3 40:2: ({...}? => ( options {greedy=false; } : . ) )703 // ./CFML.g:3 40:2: {...}? => ( options {greedy=false; } : . )702 // ./CFML.g:339:2: ({...}? => ( options {greedy=false; } : . ) ) 703 // ./CFML.g:339:2: {...}? => ( options {greedy=false; } : . ) 704 704 { 705 705 if ( !(getMode() == NONE_MODE) ) { 706 706 throw new FailedPredicateException(input, "OTHER", "getMode() == NONE_MODE"); 707 707 } 708 // ./CFML.g:34 1:2: ( options {greedy=false; } : . )709 // ./CFML.g:34 1:29: .708 // ./CFML.g:340:2: ( options {greedy=false; } : . ) 709 // ./CFML.g:340:29: . 710 710 { 711 711 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-1 8 17:05:291 // $ANTLR 3.0 ./CFML.g 2007-06-19 11:37:01 2 2 3 3 package org.cfeclipse.cfml.core.parser.antlr; … … 116 116 */ 117 117 118 protected Tree parseCFScript(Token start, ParserRuleReturnScopestop)118 protected Tree parseCFScript(Token start, Token stop) 119 119 { 120 System.out.println("inner method");121 120 BitSet bit = new BitSet(); 122 121 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)); 124 123 return null; 125 124 } … … 132 131 133 132 // $ANTLR start cfml 134 // ./CFML.g:16 9:1: cfml : ( tag )* ;133 // ./CFML.g:168:1: cfml : ( tag )* ; 135 134 public final cfml_return cfml() throws RecognitionException { 136 135 traceIn("cfml", 1); … … 145 144 146 145 try { 147 // ./CFML.g:17 1:2: ( ( tag )* )148 // ./CFML.g:17 1:2: ( tag )*146 // ./CFML.g:170:2: ( ( tag )* ) 147 // ./CFML.g:170:2: ( tag )* 149 148 { 150 149 root_0 = (Object)adaptor.nil(); 151 150 152 // ./CFML.g:17 1:2: ( tag )*151 // ./CFML.g:170:2: ( tag )* 153 152 loop1: 154 153 do { … … 163 162 switch (alt1) { 164 163 case 1 : 165 // ./CFML.g:17 1:2: tag164 // ./CFML.g:170:2: tag 166 165 { 167 166 pushFollow(FOLLOW_tag_in_cfml90); … … 205 204 206 205 // $ANTLR start tag 207 // ./CFML.g:17 4:1: tag : startTag ;206 // ./CFML.g:173:1: tag : startTag ; 208 207 public final tag_return tag() throws RecognitionException { 209 208 traceIn("tag", 2); … … 218 217 219 218 try { 220 // ./CFML.g:17 6:3: ( startTag )221 // ./CFML.g:17 6:3: startTag219 // ./CFML.g:175:3: ( startTag ) 220 // ./CFML.g:175:3: startTag 222 221 { 223 222 root_0 = (Object)adaptor.nil(); … … 254 253 255 254 // $ANTLR start startTag 256 // ./CFML.g:17 9: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 ) ) ) ; 257 256 public final startTag_return startTag() throws RecognitionException { 258 257 traceIn("startTag", 3); … … 273 272 RewriteRuleSubtreeStream stream_tagContent=new RewriteRuleSubtreeStream(adaptor,"rule tagContent"); 274 273 try { 275 // ./CFML.g:18 1: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:18 1: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:18 1: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:18 2: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 ) ) 280 279 { 281 280 sto=(Token)input.LT(1); … … 292 291 293 292 stream_tagContent.add(tc.getTree()); 294 // ./CFML.g:18 5: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:18 6: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: 296 295 { 297 296 … … 306 305 307 306 root_0 = (Object)adaptor.nil(); 308 // 18 6:3: -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent )307 // 185:3: -> {isImportTag($sto)}? ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) 309 308 if (isImportTag(sto)) { 310 // ./CFML.g:18 6:27: ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent )309 // ./CFML.g:185:27: ^( IMPORTTAG[$sto] START_TAG_CLOSE tagContent ) 311 310 { 312 311 Object root_1 = (Object)adaptor.nil(); … … 320 319 321 320 } 322 else // 18 7:3: -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent )321 else // 186:3: -> {isCustomTag($sto)}? ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) 323 322 if (isCustomTag(sto)) { 324 // ./CFML.g:18 7:27: ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent )323 // ./CFML.g:186:27: ^( CUSTOMTAG[$sto] START_TAG_CLOSE tagContent ) 325 324 { 326 325 Object root_1 = (Object)adaptor.nil(); … … 334 333 335 334 } 336 else // 18 8:3: -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent )335 else // 187:3: -> {isColdFusionTag($sto)}? ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) 337 336 if (isColdFusionTag(sto)) { 338 // ./CFML.g:18 8:31: ^( CFTAG[$sto] START_TAG_CLOSE tagContent )337 // ./CFML.g:187:31: ^( CFTAG[$sto] START_TAG_CLOSE tagContent ) 339 338 { 340 339 Object root_1 = (Object)adaptor.nil(); … … 343 342 adaptor.addChild(root_1, stream_START_TAG_CLOSE.next()); 344 343 adaptor.addChild(root_1, 345 (containsCFScript(sto) ? parseCFScript(stc, tc ) : null)344 (containsCFScript(sto) ? parseCFScript(stc, tc.stop) : null) 346 345 ); 347 346 adaptor.addChild(root_1, stream_tagContent.next()); … … 351 350 352 351 } 353 else // 19 5:3: -> ^( START_TAG_OPEN START_TAG_CLOSE tagContent )354 { 355 // ./CFML.g:19 5: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 ) 356 355 { 357 356 Object root_1 = (Object)adaptor.nil(); … … 399 398 400 399 // $ANTLR start tagContent 401 // ./CFML.g: 200:1: tagContent : ( tag )* ( endTag | EOF ) ;400 // ./CFML.g:199:1: tagContent : ( tag )* ( endTag | EOF ) ; 402 401 public final tagContent_return tagContent() throws RecognitionException { 403 402 traceIn("tagContent", 4); … … 416 415 417 416 try { 418 // ./CFML.g:20 2:2: ( ( tag )* ( endTag | EOF ) )419 // ./CFML.g:20 2:2: ( tag )* ( endTag | EOF )417 // ./CFML.g:201:2: ( ( tag )* ( endTag | EOF ) ) 418 // ./CFML.g:201:2: ( tag )* ( endTag | EOF ) 420 419 { 421 420 root_0 = (Object)adaptor.nil(); 422 421 423 // ./CFML.g:20 2:2: ( tag )*422 // ./CFML.g:201:2: ( tag )* 424 423 loop2: 425 424 do { … … 434 433 switch (alt2) { 435 434 case 1 : 436 // ./CFML.g:20 2:2: tag435 // ./CFML.g:201:2: tag 437 436 { 438 437 pushFollow(FOLLOW_tag_in_tagContent240); … … 450 449 } while (true); 451 450 452 // ./CFML.g:20 2:7: ( endTag | EOF )451 // ./CFML.g:201:7: ( endTag | EOF ) 453 452 int alt3=2; 454 453 int LA3_0 = input.LA(1); … … 462 461 else { 463 462 NoViableAltException nvae = 464 new NoViableAltException("20 2:7: ( endTag | EOF )", 3, 0, input);463 new NoViableAltException("201:7: ( endTag | EOF )", 3, 0, input); 465 464 466 465 throw nvae; … … 468 467 switch (alt3) { 469 468 case 1 : 470 // ./CFML.g:20 2:8: endTag469 // ./CFML.g:201:8: endTag 471 470 { 472 471 pushFollow(FOLLOW_endTag_in_tagContent244); … … 479 478 break; 480 479 case 2 : 481 // ./CFML.g:20 2:17: EOF480 // ./CFML.g:201:17: EOF 482 481 { 483 482 EOF5=(Token)input.LT(1); … … 515 514 516 515 // $ANTLR start endTag 517 // ./CFML.g:20 5:1: endTag : END_TAG_OPEN END_TAG_CLOSE ;516 // ./CFML.g:204:1: endTag : END_TAG_OPEN END_TAG_CLOSE ; 518 517 public final endTag_return endTag() throws RecognitionException { 519 518 traceIn("endTag", 5); … … 530 529 531 530 try { 532 // ./CFML.g:2 10:2: ( END_TAG_OPEN END_TAG_CLOSE )533 // ./CFML.g:2 10:2: END_TAG_OPEN END_TAG_CLOSE531 // ./CFML.g:209:2: ( END_TAG_OPEN END_TAG_CLOSE ) 532 // ./CFML.g:209:2: END_TAG_OPEN END_TAG_CLOSE 534 533 { 535 534 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-1 8 17:05:291 // $ANTLR 3.0 ./CFScript.g 2007-06-19 11:37:01 2 2 3 3 package 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-1 8 17:05:281 // $ANTLR 3.0 ./CFScript.g 2007-06-19 11:37:01 2 2 3 3 package org.cfeclipse.cfml.core.parser.antlr;
