com.sun.xml.internal.rngom.ast.builder.Scope Java Examples

The following examples show how to use com.sun.xml.internal.rngom.ast.builder.Scope. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
final public void Include(GrammarSection section, Scope scope, Annotations a) throws ParseException {
Token t;
String href;
String ns;
Include include = section.makeInclude();
  t = jj_consume_token(7);
  href = Literal();
  ns = Inherit();
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 11:
    jj_consume_token(11);
    a = IncludeBody(include, scope, a);
                                          topLevelComments(include);
    jj_consume_token(12);
    break;
  default:
    jj_la1[41] = jj_gen;
    ;
  }
  try {
    include.endInclude(parseable, resolve(href), ns, makeLocation(t), a);
  }
  catch (IllegalSchemaException e) { }
}
 
Example #2
Source File: SchemaBuilderImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope,
        Location loc, Annotations anno)
        throws BuildException {
    for (OpenIncludes inc = openIncludes;
            inc != null;
            inc = inc.parent) {
        if (inc.uri.equals(uri)) {
            error("recursive_include", uri, (Locator) loc);
            return pb.makeError();
        }
    }
    try {
        return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns);
    } catch (IllegalSchemaException e) {
        noteError();
        return pb.makeError();
    }
}
 
Example #3
Source File: SchemaBuilderImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope,
        Location loc, Annotations anno)
        throws BuildException {
    for (OpenIncludes inc = openIncludes;
            inc != null;
            inc = inc.parent) {
        if (inc.uri.equals(uri)) {
            error("recursive_include", uri, (Locator) loc);
            return pb.makeError();
        }
    }
    try {
        return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns);
    } catch (IllegalSchemaException e) {
        noteError();
        return pb.makeError();
    }
}
 
Example #4
Source File: SchemaBuilderImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope,
        Location loc, Annotations anno)
        throws BuildException {
    for (OpenIncludes inc = openIncludes;
            inc != null;
            inc = inc.parent) {
        if (inc.uri.equals(uri)) {
            error("recursive_include", uri, (Locator) loc);
            return pb.makeError();
        }
    }
    try {
        return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns);
    } catch (IllegalSchemaException e) {
        noteError();
        return pb.makeError();
    }
}
 
Example #5
Source File: SchemaBuilderImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope,
        Location loc, Annotations anno)
        throws BuildException {
    for (OpenIncludes inc = openIncludes;
            inc != null;
            inc = inc.parent) {
        if (inc.uri.equals(uri)) {
            error("recursive_include", uri, (Locator) loc);
            return pb.makeError();
        }
    }
    try {
        return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns);
    } catch (IllegalSchemaException e) {
        noteError();
        return pb.makeError();
    }
}
 
Example #6
Source File: CompactSyntax.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
final public void Include(GrammarSection section, Scope scope, Annotations a) throws ParseException {
Token t;
String href;
String ns;
Include include = section.makeInclude();
  t = jj_consume_token(7);
  href = Literal();
  ns = Inherit();
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 11:
    jj_consume_token(11);
    a = IncludeBody(include, scope, a);
                                          topLevelComments(include);
    jj_consume_token(12);
    break;
  default:
    jj_la1[41] = jj_gen;
    ;
  }
  try {
    include.endInclude(parseable, resolve(href), ns, makeLocation(t), a);
  }
  catch (IllegalSchemaException e) { }
}
 
Example #7
Source File: CompactSyntax.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
final public void Include(GrammarSection section, Scope scope, Annotations a) throws ParseException {
Token t;
String href;
String ns;
Include include = section.makeInclude();
  t = jj_consume_token(7);
  href = Literal();
  ns = Inherit();
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 11:
    jj_consume_token(11);
    a = IncludeBody(include, scope, a);
                                          topLevelComments(include);
    jj_consume_token(12);
    break;
  default:
    jj_la1[41] = jj_gen;
    ;
  }
  try {
    include.endInclude(parseable, resolve(href), ns, makeLocation(t), a);
  }
  catch (IllegalSchemaException e) { }
}
 
Example #8
Source File: CompactSyntax.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern GrammarExpr(Scope scope, Annotations a) throws ParseException {
Token t;
Grammar g;
  t = jj_consume_token(10);
                g = sb.makeGrammar(scope);
  jj_consume_token(11);
  a = GrammarBody(g, g, a);
                               topLevelComments(g);
  jj_consume_token(12);
  {if (true) return g.endGrammar(makeLocation(t), a);}
  throw new Error("Missing return statement in function");
}
 
Example #9
Source File: CompactSyntax.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern ElementExpr(Scope scope, Annotations a) throws ParseException {
Token t;
ParsedNameClass nc;
ParsedPattern p;
  t = jj_consume_token(26);
  nc = NameClass(IN_ELEMENT, null);
  jj_consume_token(11);
  p = Expr(false, scope, null, null);
  p = afterComments(p);
  jj_consume_token(12);
  {if (true) return sb.makeElement(nc, p, makeLocation(t), a);}
  throw new Error("Missing return statement in function");
}
 
Example #10
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern GrammarExpr(Scope scope, Annotations a) throws ParseException {
Token t;
Grammar g;
  t = jj_consume_token(10);
                g = sb.makeGrammar(scope);
  jj_consume_token(11);
  a = GrammarBody(g, g, a);
                               topLevelComments(g);
  jj_consume_token(12);
  {if (true) return g.endGrammar(makeLocation(t), a);}
  throw new Error("Missing return statement in function");
}
 
Example #11
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern TopLevelGrammar(Scope scope) throws ParseException {
Annotations a = getTopLevelCommentsAsAnnotations();
Grammar g;
ParsedPattern p;
  g = sb.makeGrammar(scope);
  a = GrammarBody(g, g, a);
  p = afterComments(g.endGrammar(sb.makeLocation(sourceUri, 1, 1), a));
  jj_consume_token(0);
  {if (true) return p;}
  throw new Error("Missing return statement in function");
}
 
Example #12
Source File: CompactSyntax.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern IdentifierExpr(Scope scope, Annotations a) throws ParseException {
LocatedString name;
  name = Identifier();
  if(scope==null) {
    error("ref_outside_grammar",name.getToken());
    {if (true) return sb.makeErrorPattern();}
  } else {
    {if (true) return scope.makeRef(name.getString(), name.getLocation(), a);}
  }
  throw new Error("Missing return statement in function");
}
 
Example #13
Source File: CompactSyntax.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
final public Annotations IncludeBody(GrammarSection section, Scope scope, Annotations a) throws ParseException {
ParsedElementAnnotation e;
  label_15:
  while (true) {
    if (jj_2_5(2)) {
      ;
    } else {
      break label_15;
    }
    e = AnnotationElementNotKeyword();
   if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e);
  }
  label_16:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 1:
    case 5:
    case 6:
    case DOCUMENTATION:
    case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    case IDENTIFIER:
    case ESCAPED_IDENTIFIER:
      ;
      break;
    default:
      jj_la1[42] = jj_gen;
      break label_16;
    }
    IncludeComponent(section, scope);
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #14
Source File: CompactSyntax.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
final public void Div(GrammarSection section, Scope scope, Annotations a) throws ParseException {
Token t;
Div div = section.makeDiv();
  t = jj_consume_token(6);
  jj_consume_token(11);
  a = GrammarBody(div, scope, a);
                                               topLevelComments(div);
  jj_consume_token(12);
  div.endDiv(makeLocation(t), a);
}
 
Example #15
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public void GrammarComponent(GrammarSection section, Scope scope) throws ParseException {
ParsedElementAnnotation e;
Annotations a;
  a = Annotations();
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 5:
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    Definition(section, scope, a);
    break;
  case 7:
    Include(section, scope, a);
    break;
  case 6:
    Div(section, scope, a);
    break;
  default:
    jj_la1[38] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  label_14:
  while (true) {
    if (jj_2_4(2)) {
      ;
    } else {
      break label_14;
    }
    e = AnnotationElementNotKeyword();
                                                  section.topLevelAnnotation(e);
  }
}
 
Example #16
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public void Start(GrammarSection section, Scope scope, Annotations a) throws ParseException {
Token t;
GrammarSection.Combine combine;
ParsedPattern p;
  t = jj_consume_token(5);
  combine = AssignOp();
  p = Expr(false, scope, null, null);
  section.define(GrammarSection.START, combine, p, makeLocation(t), a);
}
 
Example #17
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public void Definition(GrammarSection section, Scope scope, Annotations a) throws ParseException {
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    Define(section, scope, a);
    break;
  case 5:
    Start(section, scope, a);
    break;
  default:
    jj_la1[39] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
}
 
Example #18
Source File: CompactSyntax.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern GrammarExpr(Scope scope, Annotations a) throws ParseException {
Token t;
Grammar g;
  t = jj_consume_token(10);
                g = sb.makeGrammar(scope);
  jj_consume_token(11);
  a = GrammarBody(g, g, a);
                               topLevelComments(g);
  jj_consume_token(12);
  {if (true) return g.endGrammar(makeLocation(t), a);}
  throw new Error("Missing return statement in function");
}
 
Example #19
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public Annotations GrammarBody(GrammarSection section, Scope scope, Annotations a) throws ParseException {
ParsedElementAnnotation e;
  label_12:
  while (true) {
    if (jj_2_3(2)) {
      ;
    } else {
      break label_12;
    }
    e = AnnotationElementNotKeyword();
   if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e);
  }
  label_13:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 1:
    case 5:
    case 6:
    case 7:
    case DOCUMENTATION:
    case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    case IDENTIFIER:
    case ESCAPED_IDENTIFIER:
      ;
      break;
    default:
      jj_la1[37] = jj_gen;
      break label_13;
    }
    GrammarComponent(section, scope);
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #20
Source File: CompactSyntax.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern GrammarExpr(Scope scope, Annotations a) throws ParseException {
Token t;
Grammar g;
  t = jj_consume_token(10);
                g = sb.makeGrammar(scope);
  jj_consume_token(11);
  a = GrammarBody(g, g, a);
                               topLevelComments(g);
  jj_consume_token(12);
  {if (true) return g.endGrammar(makeLocation(t), a);}
  throw new Error("Missing return statement in function");
}
 
Example #21
Source File: CompactSyntax.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
final public Annotations IncludeBody(GrammarSection section, Scope scope, Annotations a) throws ParseException {
ParsedElementAnnotation e;
  label_15:
  while (true) {
    if (jj_2_5(2)) {
      ;
    } else {
      break label_15;
    }
    e = AnnotationElementNotKeyword();
   if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e);
  }
  label_16:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 1:
    case 5:
    case 6:
    case DOCUMENTATION:
    case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
    case IDENTIFIER:
    case ESCAPED_IDENTIFIER:
      ;
      break;
    default:
      jj_la1[42] = jj_gen;
      break label_16;
    }
    IncludeComponent(section, scope);
  }
  {if (true) return a;}
  throw new Error("Missing return statement in function");
}
 
Example #22
Source File: CompactSyntax.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
final public void IncludeComponent(GrammarSection section, Scope scope) throws ParseException {
ParsedElementAnnotation e;
Annotations a;
  a = Annotations();
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case 5:
  case IDENTIFIER:
  case ESCAPED_IDENTIFIER:
    Definition(section, scope, a);
    break;
  case 6:
    IncludeDiv(section, scope, a);
    break;
  default:
    jj_la1[43] = jj_gen;
    jj_consume_token(-1);
    throw new ParseException();
  }
  label_17:
  while (true) {
    if (jj_2_6(2)) {
      ;
    } else {
      break label_17;
    }
    e = AnnotationElementNotKeyword();
                                                  section.topLevelAnnotation(e);
  }
}
 
Example #23
Source File: CompactSyntax.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final public void IncludeDiv(GrammarSection section, Scope scope, Annotations a) throws ParseException {
Token t;
Div div = section.makeDiv();
  t = jj_consume_token(6);
  jj_consume_token(11);
  a = IncludeBody(div, scope, a);
                                               topLevelComments(div);
  jj_consume_token(12);
  div.endDiv(makeLocation(t), a);
}
 
Example #24
Source File: CompactSyntax.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern AttributeExpr(Scope scope, Annotations a) throws ParseException {
Token t;
ParsedNameClass nc;
ParsedPattern p;
  t = jj_consume_token(27);
  nc = NameClass(IN_ATTRIBUTE, null);
  jj_consume_token(11);
  p = Expr(false, scope, null, null);
  p = afterComments(p);
  jj_consume_token(12);
  {if (true) return sb.makeAttribute(nc, p, makeLocation(t), a);}
  throw new Error("Missing return statement in function");
}
 
Example #25
Source File: CompactSyntax.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
final public void Start(GrammarSection section, Scope scope, Annotations a) throws ParseException {
Token t;
GrammarSection.Combine combine;
ParsedPattern p;
  t = jj_consume_token(5);
  combine = AssignOp();
  p = Expr(false, scope, null, null);
  section.define(GrammarSection.START, combine, p, makeLocation(t), a);
}
 
Example #26
Source File: CompactSyntax.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
final public void Define(GrammarSection section, Scope scope, Annotations a) throws ParseException {
LocatedString name;
GrammarSection.Combine combine;
ParsedPattern p;
  name = Identifier();
  combine = AssignOp();
  p = Expr(false, scope, null, null);
  section.define(name.getString(), combine, p, name.getLocation(), a);
}
 
Example #27
Source File: CompactSyntax.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
final public void Div(GrammarSection section, Scope scope, Annotations a) throws ParseException {
Token t;
Div div = section.makeDiv();
  t = jj_consume_token(6);
  jj_consume_token(11);
  a = GrammarBody(div, scope, a);
                                               topLevelComments(div);
  jj_consume_token(12);
  div.endDiv(makeLocation(t), a);
}
 
Example #28
Source File: CompactSyntax.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
final public void IncludeDiv(GrammarSection section, Scope scope, Annotations a) throws ParseException {
Token t;
Div div = section.makeDiv();
  t = jj_consume_token(6);
  jj_consume_token(11);
  a = IncludeBody(div, scope, a);
                                               topLevelComments(div);
  jj_consume_token(12);
  div.endDiv(makeLocation(t), a);
}
 
Example #29
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern ParentExpr(Scope scope, Annotations a) throws ParseException {
LocatedString name;
  jj_consume_token(34);
           a = addCommentsToChildAnnotations(a);
  name = Identifier();
  if(scope==null) {
    error("parent_ref_outside_grammar",name.getToken());
    {if (true) return sb.makeErrorPattern();}
  } else {
    {if (true) return scope.makeParentRef(name.getString(), name.getLocation(), a);}
  }
  throw new Error("Missing return statement in function");
}
 
Example #30
Source File: CompactSyntax.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
final public ParsedPattern ExternalRefExpr(Scope scope, Annotations a) throws ParseException {
Token t;
String href;
String ns;
  t = jj_consume_token(33);
  href = Literal();
  ns = Inherit();
  try {
    {if (true) return sb.makeExternalRef(parseable, resolve(href), ns, scope, makeLocation(t), a);}
  }
  catch (IllegalSchemaException e) {
    {if (true) return sb.makeErrorPattern();}
  }
  throw new Error("Missing return statement in function");
}