Examples of Grammar


Examples of Dependencies.PR1.Grammar

        pack();
    }// </editor-fold>

    private void b1ActionPerformed(ActionEvent evt) throws IOException {
        Grammar g = new Grammar("src" + File.separator + "Gramatica_Logo.txt");
        String cadenaString = textArea.getText();
        StringTokenizer st = new StringTokenizer(cadenaString, "\n");
        String aux = "";
        while (st.hasMoreTokens()) {
            aux += st.nextToken() + "$";
View Full Code Here

Examples of antlr.preprocessor.Grammar

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

    public Hierarchy(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 beaver.spec.Grammar

    }
  }

  static public void compile(SrcReader src, Options opt, Log log) throws IOException, Parser.Exception, Grammar.Exception
  {
    Grammar grammar = ParserGenerator.parseGrammar(src, log);
    if (!log.hasErrors())
    {
      ParserGenerator.CompiledParser parser = ParserGenerator.compile(grammar, opt, log);
      if (!log.hasErrors())
      {
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.Grammar

    URI resourceURI = URI.createURI("platform:/resource/project/G.g4");
    Resource resource = createMock(Resource.class);
    expect(resource.getURI()).andReturn(resourceURI);

    Grammar grammar = createMock(Grammar.class);
    expect(grammar.eResource()).andReturn(resource);

    Rule rule = createMock(Rule.class);
    expect(rule.getName()).andReturn(ruleName);
    expect(rule.eContainer()).andReturn(grammar);
View Full Code Here

Examples of com.siemens.ct.exi.grammar.Grammar

  }
 
  public EXISerializer(OutputStream exiOutputStream, InputStream xsdInputStream) throws EXIException, IOException {
    final EXIFactory exiFactory = DefaultEXIFactory.newInstance();
    final GrammarFactory grammarFactory = GrammarFactory.newInstance();
    final Grammar g = grammarFactory.createGrammar(xsdInputStream);
    exiFactory.setGrammar(g);
    encoder = new SAXEncoder(exiFactory);
    encoder.setOutputStream(exiOutputStream);
  }
View Full Code Here

Examples of com.sonar.sslr.api.Grammar

        .withLexer(CppLexer.create(conf))
        .build();
  }

  public static Parser<Grammar> createConstantExpressionParser(CxxConfiguration conf) {
    Grammar grammar = CppGrammar.create();
    Parser<Grammar> parser = Parser.builder(grammar)
        .withLexer(CppLexer.create(conf))
        .build();
    parser.setRootRule(grammar.rule(CppGrammar.constantExpression));
    return parser;
  }
View Full Code Here

Examples of com.sun.msv.grammar.Grammar

            ObjectInputStream ois = new ObjectInputStream( is );
            final Expression exp = (Expression)ois.readObject();
            final ExpressionPool pool = (ExpressionPool)ois.readObject();
            ois.close();
       
            return new Grammar() {
                public Expression getTopLevel() { return exp; }
                public ExpressionPool getPool() { return pool; }
            };
        } catch( IOException e ) {
            throw new InternalError(e.getMessage());
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.xni.grammars.Grammar

        public Grammar retrieveGrammar(XMLGrammarDescription desc) {
            if (desc.getGrammarType() == XMLGrammarDescription.XML_SCHEMA) {
                final String tns = ((XMLSchemaDescription) desc).getTargetNamespace();
                if (fGrammarBucket != null) {
                    Grammar grammar = fGrammarBucket.getGrammar(tns);
                    if (grammar != null) {
                        return grammar;
                    }
                }
                if (SchemaSymbols.URI_SCHEMAFORSCHEMA.equals(tns)) {
View Full Code Here

Examples of com.sun.xml.internal.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 dk.brics.relaxng.Grammar

      Map<String,String> m2 = rngparser.getTopLevelNewNames();
      Map<String,SequenceNode> m3 = rrng2xg.getDefineNodes();
      for (Map.Entry<String,String> e : m1.entrySet())
        types.put(e.getKey(), m3.get(m2.get(e.getValue())));
    } else if (u.endsWith(".rrng") || u.endsWith(".rng")) {
      Grammar rrng = rngparser.parse(url);
      if (!rrng.check(System.err))
        throw new ParseException("Schema is not Restricted RELAX NG " + url);
      if (extend)
        rrng2xg.extend(rrng);
      else
        xg = rrng2xg.convert(rrng);
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.