Package org.apache.uima.ruta.ide.parser.ast

Examples of org.apache.uima.ruta.ide.parser.ast.RutaVariableDeclaration


      }
      addDeclaredType(shortName);
      return false;
    }
    if (s instanceof RutaVariableDeclaration) {
      RutaVariableDeclaration newVar = (RutaVariableDeclaration) s;
      if (knowsVariable(newVar.getName())) {
        IProblem problem = problemFactory.createIdConflictsWithVariableProblem(newVar);
        pr.reportProblem(problem);
        return false;
      }
      if (namespaces.containsKey(newVar.getName())) {
        IProblem problem = problemFactory.createIdConflictsWithTypeProblem(newVar);
        pr.reportProblem(problem);
        return false;
      }
      knownLocalVariables.peek().put(newVar.getName(), newVar.getKind());
      return false;
    }
    if (s instanceof RutaRegExpRule) {
      RutaRegExpRule rule = (RutaRegExpRule) s;
      Map<Expression, Map<Expression, Expression>> faMap = rule.getFeats();
View Full Code Here


      if (s instanceof RutaTypeDeclaration) {
        knownLocalTypeNames.add(((RutaTypeDeclaration) s).getName());
        return false;
      }
      if (s instanceof RutaVariableDeclaration) {
        RutaVariableDeclaration newVar = (RutaVariableDeclaration) s;
        if (knowsVariable(newVar.getName())) {
          IProblem problem = problemFactory.createIdConflictsWithVariableProblem(newVar);
          rep.reportProblem(problem);
          return false;
        }
        if (knownLocalTypeNames.contains(newVar.getName())) {
          IProblem problem = problemFactory.createIdConflictsWithTypeProblem(newVar);
          rep.reportProblem(problem);
          return false;
        }
        knownLocalVariables.peek().put(newVar.getName(), newVar.getKind());
        return false;
      }
      return true;
    }
View Full Code Here

        }
        return true;
      }

      if (s instanceof RutaVariableDeclaration) {
        RutaVariableDeclaration newVar = (RutaVariableDeclaration) s;
        // if (otherVariables.contains(newVar.getName())) {
        // IProblem problem = problemFactory
        // .createVarAlreadyDeclaredProblem(newVar);
        // rep.reportProblem(problem);
        // return false;
        // }
        if (shortTypes.contains(newVar.getName())) {
          IProblem problem = problemFactory.createIdConflictsWithTypeProblem(newVar);
          rep.reportProblem(problem);
          return false;
        }
        if ((newVar.getKind() & RutaTypeConstants.RUTA_TYPE_AT) != 0) {
          typeVariables.add(newVar.getName());
          return false;
        }
        otherVariables.add(newVar.getName());
        return false;
      }
      // if (s instanceof RutaFeatureDeclaration) {
      // RutaFeatureDeclaration fd = (RutaFeatureDeclaration) s;
      // }
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.ide.parser.ast.RutaVariableDeclaration

Copyright © 2018 www.massapicom. 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.