private ExprCfg parseTerm(){
  ExprCfg term=parseSimpleTerm();
  while (true) {
    ExprToken token=scanToken();
switch (token) {
case LPAREN:
{
        ExprCfg[] args=parseArgs();
        ExprCfg expr=term.createMethod(args);
        if (expr == null)         throw error(L.l("Method call not supported in this context `{0}'.",term));
        term=expr;
        break;
      }
case DOT:
{
      int ch=skipWhitespace(read());
      if (!Character.isJavaIdentifierStart((char)ch))       throw error(L.l("Expected `]' at {0}.  Field references must be identifiers.",badChar(ch)));
      String field=readName(ch);
      term=term.createField(field);
      break;
    }
default :
  unreadToken();
return term;
}
}
}

private ExprCfg parseTerm ( ) { ExprCfg term = parseSimpleTerm ( ) ; while ( true ) { ExprToken token = scanToken ( ) ; switch ( token ) { case LPAREN : { ExprCfg [ ] args = parseArgs ( ) ; ExprCfg expr = term . createMethod ( args ) ; if ( expr == null ) throw error ( L . l ( "Method call not supported in this context `{0}'." , term ) ) ; term = expr ; break ; } case DOT : { int ch = skipWhitespace ( read ( ) ) ; if ( ! Character . isJavaIdentifierStart ( ( char ) ch ) ) throw error ( L . l ( "Expected `]' at {0}.  Field references must be identifiers." , badChar ( ch ) ) ) ; String field = readName ( ch ) ; term = term . createField ( field ) ; break ; } default : unreadToken ( ) ; return term ; } } }
term : : = simple - term : : = term ' [ ' expr ' ] ' : : = term . identifier
