Example #1
0
 @Override
 public Boolean caseRuleCall(RuleCall object) {
   if (!visitedRuleCalls.add(object)) return isOptional(object);
   acceptor.accept(object);
   Set<Parameter> oldConfig = currentConfig;
   try {
     if (!object.getArguments().isEmpty()) {
       currentConfig =
           ParameterConfigHelper.getAssignedArguments(object, getParameterValues(object));
     } else {
       currentConfig = Collections.emptySet();
     }
     Boolean result = doSwitch(object.getRule()) || isOptional(object);
     visitedRuleCalls.remove(object);
     return result;
   } finally {
     currentConfig = oldConfig;
   }
 }
Example #2
0
 @Override
 public Boolean caseKeyword(Keyword object) {
   acceptor.accept(object);
   return isOptional(object);
 }
Example #3
0
 @Override
 public Boolean caseAssignment(Assignment object) {
   acceptor.accept(object);
   return doSwitch(object.getTerminal()) || isOptional(object);
 }