@Override
  public void inAElem(AElem node) {
    if (processingParsedAlt) {
      String currentElemName;
      if (node.getElemName() != null) {
        currentElemName = currentAlt + "." + node.getElemName().getText();
      } else {
        currentElemName = currentAlt + "." + node.getId().getText();
      }

      elems_position.put(currentElemName, new Integer(++counter));
    }

    if (node.getSpecifier() != null && node.getSpecifier() instanceof ATokenSpecifier) {
      return;
    }

    //    String name = ResolveIds.name( node.getId().getText() );

    String elemType = (String) ids.elemTypes.get(node);
    if (processingParsedAlt && elemType.startsWith("P")) {
      String elemName;
      if (node.getElemName() != null) {
        elemName = node.getElemName().getText();
      } else {
        elemName = node.getId().getText();
      }

      positionsMap.put(currentAlt + "." + elemName, elemType);
    }
  }
Ejemplo n.º 2
0
  public void caseAElem(final AElem elem) {
    blist = false;
    if ((elem.getUnOp() != null)
        && ((elem.getUnOp() instanceof AStarUnOp) || (elem.getUnOp() instanceof APlusUnOp))) {
      blist = true;
    }

    String elem_name =
        (elem.getElemName() != null ? elem.getElemName().getText() : elem.getId().getText());
    if (!blist) {
      listElems.add(elem_name);
    } else {
      listElemslist.add(elem_name);
    }

    listElemsGlobal.add(elem_name);
  }