All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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 = <"> (attr())* ">" | t = "" ) (pcData())? ""
    {jjtThis.value = t;}
}

void
noscript():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (block() | text())* ""
    {jjtThis.value = t;}
}

void
style():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (pcData())? ""
    {jjtThis.value = t;}
}

void
html():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (head())? (body() | frameset())? ""
    {jjtThis.value = t;}
}

void
body():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) ( bodyContent() )* ""
    {jjtThis.value = t;}
}

void
bodyContent(): {}
{
  heading() | block() | address() | text()
}

void
heading(): {}
{
  h1() | h2() | h3() | h4() | h5() | h6()
}

void
block(): {}
{
  paragraph()  | list()     | preformatted() | div() | center()
| blockquote() | hr()       | table()        | noscript() | script()
| select()     | textarea() | frameset()     | bdo()
}

void
phrase(): {}
{
  emphasize()    | strong()   | definition() | code() | sampleOutput()
| keyboardText() | variable() | citation()   | span()
| input()        | isindex() 
}

void
special(): {}
{
  anchor() | img() | map() | br()
| basefont() | applet() | fontDefinition()
| iframe()   | object() | q()
}

void
fontDefinition():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (text())* ""
    {jjtThis.value = t;}
}

void
basefont():
{
    Token t;
}
{
    ( t = <"> (attr())* (">" | "/>") | t = "" | "/>") )
    {jjtThis.value = t;}
}

void
applet():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" )
      (param())* (pcData())* ""
    {jjtThis.value = t;}
}

void
param():
{
    Token t;
}
{
    ( t = <"> (attr())* (">" | "/>") | t = "" | "/>") )
    {jjtThis.value = t;}
}

void
textTag(): {}
{
  phrase() | special() | form() | font() | button() | label()
}

void
font(): {}
{
  teletype() | italic() | bold()      | underline()   | strike()
| big()      | small()  | subscript() | superscript() | abbr()
| s()        | acronym()| del()       | ins()
}

void
hr():
{
    Token t;
}
{
    ( t = <"> (attr())* (">" | "/>") | t = "" | "/>") )
    {jjtThis.value = t;}
}

void
br():
{
    Token t;
}
{
    ( t = <"> (attr())* (">" | "/>") | t = "" | "/>") )
    {jjtThis.value = t;}
}

void
img():
{
    Token t;
}
{
    ( t = <"> (attr())* (">" | "/>") | t = "" | "/>") )
    {jjtThis.value = t;}
}

void
button():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) ( block() | text() )* ""
    {jjtThis.value = t;}
}

void
h1():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (block() | text())* ""
    {jjtThis.value = t;}
}

void
h2(): {
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (block() | text())* ""
    {jjtThis.value = t;}
}

void
h3():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (block() | text())* ""
    {jjtThis.value = t;}
}

void
h4():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (block() | text())* ""
    {jjtThis.value = t;}
}

void
h5():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (block() | text())* ""
    {jjtThis.value = t;}
}

void
h6(): {
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (block() | text())* ""
    {jjtThis.value = t;}
}

void
address():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) (pcData())? ""
    {jjtThis.value = t;}
}

void
paragraph():
{
    Token t;
}
{
    ( t = <"> (attr())* ">" | t = "" ) ( text() )* "

" {jjtThis.value = t;} } void list(): {} { unorderedList() | orderedList() | defList() | menu() | dir() } void unorderedList(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (text())? (listItem())* "" {jjtThis.value = t;} } void orderedList(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (text())? (listItem())* "" {jjtThis.value = t;} } void defList(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (text())? (defListItem())* "" {jjtThis.value = t;} } void listItem(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() | list() )* "" (pcData())? {jjtThis.value = t;} } void defListItem(): {} { dt() | dd() } void dt(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" (pcData())? {jjtThis.value = t;} } void dd(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() | block() )* "" (pcData())? {jjtThis.value = t;} } void dir(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( listItem() )* "" {jjtThis.value = t;} } void menu(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( listItem() )* "" {jjtThis.value = t;} } void preformatted(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "
" {jjtThis.value = t;} } void div(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( bodyContent() )* "
" {jjtThis.value = t;} } void center(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( bodyContent() )* "" {jjtThis.value = t;} } void blockquote(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (block() | pcData())? "" {jjtThis.value = t;} } void q(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (pcData() | textTag() )* "" {jjtThis.value = t;} } void form(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (fieldset() | bodyContent() )* "" {jjtThis.value = t;} } void input(): { Token t; } { ( t = <"> (attr())* (">" | "/>") | t = "" | "/>") ) {jjtThis.value = t;} } void table(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (caption())? (colgroup() | col())* (thead() | tfoot() | tbody() | tr())* "" {jjtThis.value = t;} } void colgroup(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (col())* "" {jjtThis.value = t;} } void col(): { Token t; } { ( t = <"> (attr())* (">" | "/>") | t = "" | "/>") ) {jjtThis.value = t;} } void tbody(): { Token t = null; } { ( t = <"> (attr())* ">" | t = "" ) {jjtThis.value = t;} (tr())* "" } void thead(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) {jjtThis.value = t;} (tr())* "" } void tfoot(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) {jjtThis.value = t;} (tr())* "" } void caption(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (text())* "" {jjtThis.value = t;} } void tr(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (pcData())? (th()|td())* "" (pcData())? {jjtThis.value = t;} } void th(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (bodyContent())* "" (pcData())? {jjtThis.value = t;} } void td(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (bodyContent())* "" (pcData())? {jjtThis.value = t;} } void teletype(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void italic(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void bold(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void underline(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void strike(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void s(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void del(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( block() | text() )* "" {jjtThis.value = t;} } void ins(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( block() | text() )* "" {jjtThis.value = t;} } void big(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void small(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void subscript(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void superscript(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void emphasize(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void strong(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void definition(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void span(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void code(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void sampleOutput(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void abbr(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void acronym(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void bdo(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void keyboardText(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void variable(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void citation(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( text() )* "" {jjtThis.value = t;} } void select(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (pcData())? (selectOption())* "" {jjtThis.value = t;} } void selectOption(): {} { option() | optgroup() } void optgroup(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (optgroup() | option())* "" {jjtThis.value = t;} } void option(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (pcData())? "" {jjtThis.value = t;} } void textarea(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (pcData())? "" {jjtThis.value = t;} } void fieldset(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (legend())? ( block() | text() )* "" {jjtThis.value = t;} } void legend(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (text())* "" {jjtThis.value = t;} } void frameset(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (frameset() | frame() | noframes())* "" {jjtThis.value = t;} } void frame(): { Token t; } { ( t = <"> (attr())* (">" | "/>") | t = "" | "/>") ) {jjtThis.value = t;} } void noframes(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( body() | block() | text() )* "" {jjtThis.value = t;} } void iframe(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( block() | text() )* "" {jjtThis.value = t;} } void object(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( param() | block() | text() )* "" {jjtThis.value = t;} } void label(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) ( block() | text() )* "" {jjtThis.value = t;} } void anchor(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (text())* "" {jjtThis.value = t;} } void map(): { Token t; } { ( t = <"> (attr())* ">" | t = "" ) (area())* "" {jjtThis.value = t;} } void area(): { Token t; } { ( t = <"> (attr())* (">" | "/>") | t = "" | "/>") ) {jjtThis.value = t;} }



© 2015 - 2024 Weber Informatics LLC | Privacy Policy