mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-04 06:34:20 +00:00
Fixed: AS3 hilight and edit XML based on CData or comment only
This commit is contained in:
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
|
||||
### Added
|
||||
- Placeobject display and edit - raw editor on right side
|
||||
|
||||
### Fixed
|
||||
- AS3 hilight and edit XML based on CData or comment only
|
||||
|
||||
## [14.2.0] - 2021-03-12
|
||||
### Added
|
||||
- [#1645] Scrollbar to recent searches dropdown
|
||||
|
||||
Binary file not shown.
@@ -207,7 +207,7 @@ NamespaceSuffix = "#" {DecIntegerLiteral}
|
||||
|
||||
RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
|
||||
%state STRING, CHARLITERAL,XMLOPENTAG,XMLOPENTAGATTRIB,XMLINSTROPENTAG,XMLINSTRATTRIB,XMLCDATA,XMLCOMMENT,XML,OIDENTIFIER
|
||||
%state STRING, CHARLITERAL,XMLOPENTAG,XMLOPENTAGATTRIB,XMLINSTROPENTAG,XMLINSTRATTRIB,XMLCDATA,XMLCOMMENT,XML,OIDENTIFIER,XMLCDATAALONE,XMLCOMMENTALONE
|
||||
|
||||
%%
|
||||
|
||||
@@ -368,6 +368,12 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
string.setLength(0);
|
||||
return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTTAG_BEGIN, yytext());
|
||||
}
|
||||
{XmlCommentStart} {
|
||||
string.setLength(0); string.append(yytext() ); yybegin(XMLCOMMENTALONE);
|
||||
}
|
||||
{XmlCDataStart} {
|
||||
string.setLength(0); string.append(yytext() ); yybegin(XMLCDATAALONE);
|
||||
}
|
||||
"<{" { return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTVARTAG_BEGIN, yytext()); }
|
||||
/* identifiers */
|
||||
{Identifier} { return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.IDENTIFIER, yytext()); }
|
||||
@@ -412,7 +418,7 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
string.setLength(0);
|
||||
}
|
||||
return lex();
|
||||
}
|
||||
}
|
||||
{LineTerminator} { string.append(yytext()); yyline++;}
|
||||
{WhiteSpace} { string.append(yytext()); }
|
||||
}
|
||||
@@ -480,7 +486,7 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
|
||||
|
||||
<XMLCDATA> {
|
||||
{XmlCDataEnd} {
|
||||
{XmlCDataEnd} {
|
||||
string.append(yytext());
|
||||
yybegin(XML);
|
||||
String ret = string.toString();
|
||||
@@ -491,8 +497,20 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
[^] { string.append(yytext()); }
|
||||
}
|
||||
|
||||
<XMLCDATAALONE> {
|
||||
{XmlCDataEnd} {
|
||||
string.append(yytext());
|
||||
yybegin(YYINITIAL);
|
||||
String ret = string.toString();
|
||||
string.setLength(0);
|
||||
return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_CDATA, ret);
|
||||
}
|
||||
{LineTerminator} { string.append(yytext()); yyline++;}
|
||||
[^] { string.append(yytext()); }
|
||||
}
|
||||
|
||||
<XMLCOMMENT> {
|
||||
{XmlCommentEnd} {
|
||||
{XmlCommentEnd} {
|
||||
string.append(yytext());
|
||||
yybegin(XML);
|
||||
String ret = string.toString();
|
||||
@@ -503,8 +521,20 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
[^] { string.append(yytext());}
|
||||
}
|
||||
|
||||
<XMLCOMMENTALONE> {
|
||||
{XmlCommentEnd} {
|
||||
string.append(yytext());
|
||||
yybegin(YYINITIAL);
|
||||
String ret = string.toString();
|
||||
string.setLength(0);
|
||||
return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_COMMENT, ret);
|
||||
}
|
||||
{LineTerminator} { string.append(yytext()); yyline++;}
|
||||
[^] { string.append(yytext());}
|
||||
}
|
||||
|
||||
<XML> {
|
||||
{XmlCDataStart} {
|
||||
{XmlCDataStart} {
|
||||
String ret = string.toString(); string.setLength(0); string.append(yytext() ); yybegin(XMLCDATA);
|
||||
if (!ret.isEmpty()) return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, ret);
|
||||
}
|
||||
|
||||
@@ -2241,6 +2241,8 @@ public class ActionScript3Parser {
|
||||
|
||||
break;
|
||||
case XML_STARTTAG_BEGIN:
|
||||
case XML_CDATA:
|
||||
case XML_COMMENT:
|
||||
lexer.pushback(s);
|
||||
ret = xml(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, variables);
|
||||
break;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1666,7 +1666,14 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
+ "};\r\n"
|
||||
+ "}\r\n"
|
||||
+ "]]>\r\n"
|
||||
+ "</script>;\r\n",
|
||||
+ "</script>;\r\n"
|
||||
+ "var testCdata:XML = <![CDATA[\r\n"
|
||||
+ "hello from cdata;\r\n"
|
||||
+ "function(){\r\n"
|
||||
+ "here some code;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "]]>;\r\n"
|
||||
+ "var testComment:XML = <!-- myXML comment-->;\r\n",
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1545,6 +1545,8 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
@Test
|
||||
public void testXml() {
|
||||
decompileMethod("classic", "testXml", "var g:XML = null;\r\n"
|
||||
+ "var testCdata:XML = null;\r\n"
|
||||
+ "var testComment:XML = null;\r\n"
|
||||
+ "var name:String = \"ahoj\";\r\n"
|
||||
+ "var myXML:XML = <order id=\"604\">\r\n"
|
||||
+ "<book isbn=\"12345\">\r\n"
|
||||
@@ -1654,7 +1656,14 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
+ "};\r\n"
|
||||
+ "}\r\n"
|
||||
+ "]]>\r\n"
|
||||
+ "</script>;\r\n",
|
||||
+ "</script>;\r\n"
|
||||
+ "testCdata = <![CDATA[\r\n"
|
||||
+ "hello from cdata;\r\n"
|
||||
+ "function(){\r\n"
|
||||
+ "here some code;\r\n"
|
||||
+ "}\r\n"
|
||||
+ "]]>;\r\n"
|
||||
+ "testComment = <!-- myXML comment-->;\r\n",
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -16,7 +16,7 @@
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::timeStamp</name>
|
||||
<value>'12.03.2021'</value>
|
||||
<value>'13.03.2021'</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::air</name>
|
||||
|
||||
@@ -17,7 +17,17 @@ package tests
|
||||
k=myXML.book;
|
||||
k=myXML.book.(@isbn=="12345");
|
||||
|
||||
var g:XML=new XML("<script>\n\t\t\t\t<![CDATA[\n\t\t\t\t\tfunction() {\n\t\t\t\n\t\t\t\t\t\tFBAS = {\n\t\t\t\n\t\t\t\t\t\t\tsetSWFObjectID: function( swfObjectID ) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tFBAS.swfObjectID = swfObjectID;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tinit: function( opts ) {\n\t\t\t\t\t\t\t\tFB.init( FB.JSON.parse( opts ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tFB.Event.subscribe( \'auth.sessionChange\', function( response ) {\n\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( response.session );\n\t\t\t\t\t\t\t\t} );\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetCanvasAutoResize: function( autoSize, interval ) {\n\t\t\t\t\t\t\t\tFB.Canvas.setAutoResize( autoSize, interval );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetCanvasSize: function( width, height ) {\n\t\t\t\t\t\t\t\tFB.Canvas.setSize( { width: width, height: height } );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlogin: function( opts ) {\n\t\t\t\t\t\t\t\tFB.login( FBAS.handleUserLogin, FB.JSON.parse( opts ) );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\taddEventListener: function( event ) {\n\t\t\t\t\t\t\t\tFB.Event.subscribe( event, function( response ) {\n\t\t\t\t\t\t\t\t\tFBAS.getSwf().handleJsEvent( event, FB.JSON.stringify( response ) );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandleUserLogin: function( response ) {\n\t\t\t\t\t\t\t\tif( response.session == null ) {\n\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( null );\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( response.perms != null ) {\n\t\t\t\t\t\t\t\t\t// user is logged in and granted some permissions.\n\t\t\t\t\t\t\t\t\t// perms is a comma separated list of granted permissions\n\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( response.session, response.perms );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( response.session );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlogout: function() {\n\t\t\t\t\t\t\t\tFB.logout( FBAS.handleUserLogout );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandleUserLogout: function( response ) {\n\t\t\t\t\t\t\t\tswf = FBAS.getSwf();\n\t\t\t\t\t\t\t\tswf.logout();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tui: function( params ) {\n\t\t\t\t\t\t\t\tobj = FB.JSON.parse( params );\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmethod = obj.method;\n\t\t\t\t\t\t\t\tcb = function( response ) { FBAS.getSwf().uiResponse( FB.JSON.stringify( response ), method ); }\n\t\t\t\t\t\t\t\tFB.ui( obj, cb );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetSession: function() {\n\t\t\t\t\t\t\t\tsession = FB.getSession();\n\t\t\t\t\t\t\t\treturn FB.JSON.stringify( session );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetLoginStatus: function() {\n\t\t\t\t\t\t\t\tFB.getLoginStatus( function( response ) {\n\t\t\t\t\t\t\t\t\tif( response.session ) {\n\t\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( response.session );\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( null );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetSwf: function getSwf() {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn document.getElementById( FBAS.swfObjectID );\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdateSwfSession: function( session, extendedPermissions ) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tswf = FBAS.getSwf();\n\t\t\t\t\t\t\t\textendedPermissions = ( extendedPermissions == null ) ? \'\' : extendedPermissions;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( session == null ) {\n\t\t\t\t\t\t\t\t\tswf.sessionChange( null );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tswf.sessionChange( FB.JSON.stringify( session ), FB.JSON.stringify( extendedPermissions.split( \',\' ) ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t]]>\n\t\t\t</script>");
|
||||
var g:XML = new XML("<script>\n\t\t\t\t<![CDATA[\n\t\t\t\t\tfunction() {\n\t\t\t\n\t\t\t\t\t\tFBAS = {\n\t\t\t\n\t\t\t\t\t\t\tsetSWFObjectID: function( swfObjectID ) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tFBAS.swfObjectID = swfObjectID;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tinit: function( opts ) {\n\t\t\t\t\t\t\t\tFB.init( FB.JSON.parse( opts ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tFB.Event.subscribe( \'auth.sessionChange\', function( response ) {\n\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( response.session );\n\t\t\t\t\t\t\t\t} );\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetCanvasAutoResize: function( autoSize, interval ) {\n\t\t\t\t\t\t\t\tFB.Canvas.setAutoResize( autoSize, interval );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetCanvasSize: function( width, height ) {\n\t\t\t\t\t\t\t\tFB.Canvas.setSize( { width: width, height: height } );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlogin: function( opts ) {\n\t\t\t\t\t\t\t\tFB.login( FBAS.handleUserLogin, FB.JSON.parse( opts ) );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\taddEventListener: function( event ) {\n\t\t\t\t\t\t\t\tFB.Event.subscribe( event, function( response ) {\n\t\t\t\t\t\t\t\t\tFBAS.getSwf().handleJsEvent( event, FB.JSON.stringify( response ) );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandleUserLogin: function( response ) {\n\t\t\t\t\t\t\t\tif( response.session == null ) {\n\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( null );\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( response.perms != null ) {\n\t\t\t\t\t\t\t\t\t// user is logged in and granted some permissions.\n\t\t\t\t\t\t\t\t\t// perms is a comma separated list of granted permissions\n\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( response.session, response.perms );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( response.session );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlogout: function() {\n\t\t\t\t\t\t\t\tFB.logout( FBAS.handleUserLogout );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thandleUserLogout: function( response ) {\n\t\t\t\t\t\t\t\tswf = FBAS.getSwf();\n\t\t\t\t\t\t\t\tswf.logout();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tui: function( params ) {\n\t\t\t\t\t\t\t\tobj = FB.JSON.parse( params );\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmethod = obj.method;\n\t\t\t\t\t\t\t\tcb = function( response ) { FBAS.getSwf().uiResponse( FB.JSON.stringify( response ), method ); }\n\t\t\t\t\t\t\t\tFB.ui( obj, cb );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetSession: function() {\n\t\t\t\t\t\t\t\tsession = FB.getSession();\n\t\t\t\t\t\t\t\treturn FB.JSON.stringify( session );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetLoginStatus: function() {\n\t\t\t\t\t\t\t\tFB.getLoginStatus( function( response ) {\n\t\t\t\t\t\t\t\t\tif( response.session ) {\n\t\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( response.session );\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tFBAS.updateSwfSession( null );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetSwf: function getSwf() {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn document.getElementById( FBAS.swfObjectID );\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdateSwfSession: function( session, extendedPermissions ) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tswf = FBAS.getSwf();\n\t\t\t\t\t\t\t\textendedPermissions = ( extendedPermissions == null ) ? \'\' : extendedPermissions;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( session == null ) {\n\t\t\t\t\t\t\t\t\tswf.sessionChange( null );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tswf.sessionChange( FB.JSON.stringify( session ), FB.JSON.stringify( extendedPermissions.split( \',\' ) ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t]]>\n\t\t\t</script>");
|
||||
|
||||
var testCdata:XML = <![CDATA[
|
||||
hello from cdata;
|
||||
function(){
|
||||
here some code;
|
||||
}
|
||||
]]>;
|
||||
|
||||
var testComment:XML = <!-- myXML comment-->;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,6 +91,11 @@ EndOfLineComment = "//" {InputCharacter}* {LineTerminator}?
|
||||
IdentFirst = [\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}_$]
|
||||
IdentNext = {IdentFirst} | [\p{Nl}\p{Mn}\p{Mc}\p{Nd}\p{Pc}]
|
||||
|
||||
XmlCommentStart = "<!--"
|
||||
XmlCommentEnd = "-->"
|
||||
|
||||
XmlCDataStart = "<![CDATA["
|
||||
XmlCDataEnd = "]]>"
|
||||
|
||||
/* identifiers */
|
||||
Identifier = {IdentFirst}{IdentNext}*
|
||||
@@ -143,7 +148,7 @@ NamespaceSuffix = "#" {DecIntegerLiteral}
|
||||
|
||||
RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
|
||||
%state STRING, CHARLITERAL, XMLSTARTTAG, XML, OIDENTIFIER
|
||||
%state STRING, CHARLITERAL, XMLSTARTTAG, XML, OIDENTIFIER, XMLCOMMENT, XMLCDATA
|
||||
|
||||
%%
|
||||
|
||||
@@ -211,6 +216,15 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
}
|
||||
}
|
||||
|
||||
{XmlCommentStart} {
|
||||
yybegin(XMLCOMMENT);
|
||||
return token(TokenType.STRING);
|
||||
}
|
||||
{XmlCDataStart} {
|
||||
yybegin(XMLCDATA);
|
||||
return token(TokenType.STRING);
|
||||
}
|
||||
|
||||
/* operators */
|
||||
|
||||
"(" { return token(TokenType.OPERATOR, PARAN); }
|
||||
@@ -322,12 +336,6 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
}
|
||||
xmlTagName = s;
|
||||
}
|
||||
/*{XMLBeginTag} { yybegin(XMLSTARTTAG);
|
||||
tokenStart = yychar;
|
||||
tokenLength = yylength();
|
||||
String s=yytext();
|
||||
xmlTagName = s.substring(1);
|
||||
}*/
|
||||
/* identifiers */
|
||||
{Identifier}{NamespaceSuffix} { return token(TokenType.REGEX); }
|
||||
{Identifier} { return token(TokenType.IDENTIFIER); }
|
||||
@@ -406,6 +414,28 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
{LineTerminator} { yybegin(YYINITIAL); }
|
||||
}
|
||||
|
||||
<XMLCOMMENT> {
|
||||
{XmlCommentEnd} {
|
||||
yybegin(YYINITIAL);
|
||||
return token(TokenType.STRING);
|
||||
}
|
||||
~{XmlCommentEnd} {
|
||||
yypushback(3);
|
||||
return token(TokenType.STRING);
|
||||
}
|
||||
}
|
||||
|
||||
<XMLCDATA> {
|
||||
{XmlCDataEnd} {
|
||||
yybegin(YYINITIAL);
|
||||
return token(TokenType.STRING);
|
||||
}
|
||||
~{XmlCDataEnd} {
|
||||
yypushback(3);
|
||||
return token(TokenType.STRING);
|
||||
}
|
||||
}
|
||||
|
||||
/* error fallback */
|
||||
[^] { }
|
||||
<<EOF>> { return null; }
|
||||
|
||||
Reference in New Issue
Block a user