Examples of Grammar


Examples of org.apache.xerces.validators.common.Grammar

        }
        return null;
    }
   
    DatatypeValidator getElementDeclTypeValidatorFromNS(String newSchemaURI, String localpart) throws Exception {
        Grammar grammar = fGrammarResolver.getGrammar(newSchemaURI);
        if (grammar != null && grammar instanceof SchemaGrammar) {
            SchemaGrammar sGrammar = (SchemaGrammar) grammar;
            int eltIndex = sGrammar.getElementDeclIndex(fStringPool.addSymbol(newSchemaURI),
                                                        fStringPool.addSymbol(localpart),
                                                        TOP_LEVEL_SCOPE);
View Full Code Here

Examples of org.apache.xerces.validators.common.Grammar

        }
        return null;
    }

    ComplexTypeInfo getElementDeclTypeInfoFromNS(String newSchemaURI, String localpart) throws Exception {
        Grammar grammar = fGrammarResolver.getGrammar(newSchemaURI);
        if (grammar != null && grammar instanceof SchemaGrammar) {
            SchemaGrammar sGrammar = (SchemaGrammar) grammar;
            int eltIndex = sGrammar.getElementDeclIndex(fStringPool.addSymbol(newSchemaURI),
                                                              fStringPool.addSymbol(localpart),
                                                              TOP_LEVEL_SCOPE);
View Full Code Here

Examples of org.apache.xerces.xni.grammars.Grammar

    }

    public void cacheGrammars(String s, Grammar agrammar[]) {
        if(!fPoolIsLocked) {
            for(int i = 0; i < agrammar.length; i++) {
                Grammar grammar = agrammar[i];
                if (cacheableNamespaces != null && grammar.getGrammarDescription().getNamespace() != null &&
                        cacheableNamespaces.indexOf(grammar.getGrammarDescription().getNamespace()) != -1) {
                    putGrammar(grammar);
                }
            }

        }
View Full Code Here

Examples of org.cfeclipse.cfmledit.dictionary.Grammar

public class GrammarTest {

  @Test
  public void testLoadLocation() throws IOException, JDOMException {
   
    Grammar g = new Grammar("railo3.xml");
   
    assertEquals(0, g.getTagCount());
    assertEquals(0, g.getFunctionCount());
    assertEquals(0, g.getScopeCount());
    assertEquals(0, g.getCFScopeCount());
   
    g.loadLocation();
   
    assertTrue("There should be more than 0 tags loaded now", g.getTagCount() > 0);
    assertTrue("There should be more than 0 functions loaded now", g.getFunctionCount() > 0);
    assertTrue("There should be more than 0 scopes loaded now", g.getScopeCount() > 0);
    assertTrue("There should be more than 0 CFScopes loaded now", g.getCFScopeCount() > 0);
   

  }
View Full Code Here

Examples of org.eclipse.xtext.Grammar

 
  @ValueConverter(rule = "QualifiedName")
  public IValueConverter<String> getQualifiedNameConverter() {
    boolean _equals = Objects.equal(this.qualifiedNameValueConverter, null);
    if (_equals) {
      Grammar _grammar = this.getGrammar();
      FQNConverter _fQNConverter = new FQNConverter(_grammar);
      this.qualifiedNameValueConverter = _fQNConverter;
    }
    return this.qualifiedNameValueConverter;
  }
View Full Code Here

Examples of org.jostraca.comp.antlr.preprocessor.Grammar

    protected Hashtable files;  // table of grammar files read in
    protected org.jostraca.comp.antlr.Tool antlrTool;

    public Hierarchy(org.jostraca.comp.antlr.Tool tool) {
        this.antlrTool = tool;
        LexerRoot = new Grammar(tool, "Lexer", null, null);
        ParserRoot = new Grammar(tool, "Parser", null, null);
        TreeParserRoot = new Grammar(tool, "TreeParser", null, null);
        symbols = new Hashtable(10);
        files = new Hashtable(10);

        LexerRoot.setPredefined(true);
        ParserRoot.setPredefined(true);
View Full Code Here

Examples of org.kohsuke.rngom.ast.builder.Grammar

    throw new Error("Missing return statement in function");
  }

  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");
  }
View Full Code Here

Examples of org.speakright.core.render.Grammar

  }

  @Test public void grammar()
  {
    String words = "kenny cartman [ter phil] (mister hat) (big gay al) [wendy]";
    Grammar gram = new Grammar("inline: " + words);
  }
View Full Code Here

Examples of persistence.antlr.preprocessor.Grammar

    protected Hashtable files;  // table of grammar files read in
    protected persistence.antlr.Tool antlrTool;

    public Hierarchy(persistence.antlr.Tool tool) {
        this.antlrTool = tool;
        LexerRoot = new Grammar(tool, "Lexer", null, null);
        ParserRoot = new Grammar(tool, "Parser", null, null);
        TreeParserRoot = new Grammar(tool, "TreeParser", null, null);
        symbols = new Hashtable(10);
        files = new Hashtable(10);

        LexerRoot.setPredefined(true);
        ParserRoot.setPredefined(true);
View Full Code Here

Examples of synalp.commons.grammar.Grammar

public class TestFiltering
{
  public static void main(String[] args)
  {
    Grammar grammar = Resources.loadGrammar(ResourcesBundleFile.KBGEN_GRAMMAR.getFile());
    SyntacticLexicon lexicon = Resources.loadLexicon(ResourcesBundleFile.KBGEN_LEXICON.getFile());
    TestSuite testSuite = Resources.loadTestSuite(ResourcesBundleFile.KBGEN_TESTSUITE.getFile());
   
    LoggerConfiguration.init();
    JeniLexicalSelection selection = new JeniLexicalSelection(grammar, lexicon);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.