nablarch.test.tool.htmlcheck.parser.Html4.jjt Maven / Gradle / Ivy
The newest version!
options {
STATIC=false;
DEBUG_PARSER=false;
ERROR_REPORTING=false;
IGNORE_CASE = true;
}
PARSER_BEGIN(Parser)
package nablarch.test.tool.htmlcheck.parser;
public class
Parser
{
}
PARSER_END(Parser)
SKIP: {
|
}
SKIP: { "": DEFAULT }
TOKEN: {
| )* "\""
| "'" ( | )* "'"
>
| <#CHAR_WITHOUT_QUOT: ["\u0020"-"\u0026", "\u0028"-"\uFFFF"]>
| <#CHAR_WITHOUT_DQUOT: ["\u0020"-"\u0021", "\u0023"-"\uFFFF"] >
| | ".") ( ( | | "." | "-")*
( | | ".") )? >
| >
| )+ >
| <#HEXINT: ()+ >
| <#DIGIT: ["0"-"9"] >
| <#HEXDIGIT: ["0"-"9", "a"-"f"] >
| <#LCLETTER: ["a"-"z"] >
| <#WS: (" " | "\t" | "\f" | "\n" | "\r")+ >
| "html" "PUBLIC" ( )+ ()? ">" >
}
TOKEN: {
, "\u003F"-"\uFFFF"
])+ >
}
void
text(): {}
{
| | | textTag() | "\"" | "=" | "%" | "-" | "/"
}
void
pcData(): {}
{
( | | | |
| "\"" | "%" | "/" | "=" | ">" | "-" | br()
)+
}
void
attr(): {}
{
attrName() ( "=" )?
}
void
attrName():
{
Token t;
}
{
t =
{jjtThis.value = t;}
}
void
xmlDecl(): {}
{
<"> (attr())* "?>"
}
SimpleNode
document():
{
Token t;
}
{
(xmlDecl())? ()? html()
{ return jjtThis; }
}
void
head():
{
Token t;
}
{
( t = <"> (attr())* ">" | t = "" ) (headElement())* ""
{jjtThis.value = t;}
}
void
headElement(): {}
{
title()
| script()
| style()
| base()
| meta()
| link()
}
void
base():
{
Token t;
}
{
( t = <" > (attr())* (">" | "/>") | t = " " | "/>") )
{jjtThis.value = t;}
}
void
meta():
{
Token t;
}
{
( t = <"> (attr())* (">" | "/>") | t = "" | "/>") )
{jjtThis.value = t;}
}
void
isindex() :
{
Token t;
}
{
( t = <" > (attr())* (">" | "/>") | t = " " | "/>") )
{jjtThis.value = t;}
}
void
link():
{
Token t;
}
{
( t = <"> (attr())* (">" | "/>") | t = "" | "/>") )
{jjtThis.value = t;}
}
void
title():
{
Token t;
}
{
( t = <"> (attr())* ">" | t = "" ) (pcData())? " "
{jjtThis.value = t;}
}
void
script():
{
Token t;
}
{
( t = <""
{jjtThis.value = t;}
}
void
noscript():
{
Token t;
}
{
( t = <"