/** * Method to change definition of built-in token - more precisely * using this method allows to modify token string recognized by the parser * (i.e. sin(x) to sinus(x)). * Procedure affects only tokens classified to built-in functions, built-in * constants, built-in units, built-in random variables. * @param currentToken Current token name * @param newToken New token name */ public static final void modifyBuiltinToken(String currentToken, String newToken) { if (currentToken == null) return; if (currentToken.length() == 0) return; if (newToken == null) return; if (newToken.length() == 0) return; synchronized (tokensToModify) { for (TokenModification tm : tokensToModify) if (tm.currentToken.equals(currentToken)) return; TokenModification tma = new TokenModification(); tma.currentToken = currentToken; tma.newToken = newToken; tma.newTokenDescription = null; tokensToModify.add(tma); optionsChangesetNumber++; } } /**
/** * Method to change definition of built-in token - more precisely * using this method allows to modify token string recognized by the parser * (i.e. sin(x) to sinus(x)). * Procedure affects only tokens classified to built-in functions, built-in * constants, built-in units, built-in random variables. * @param currentToken Current token name * @param newToken New token name * @param newTokenDescription New token description (if null the previous one will be used) */ public static final void modifyBuiltinToken(String currentToken, String newToken, String newTokenDescription) { if (currentToken == null) return; if (currentToken.length() == 0) return; if (newToken == null) return; if (newToken.length() == 0) return; synchronized (tokensToModify) { for (TokenModification tm : tokensToModify) if (tm.currentToken.equals(currentToken)) return; TokenModification tma = new TokenModification(); tma.currentToken = currentToken; tma.newToken = newToken; tma.newTokenDescription = newTokenDescription; tokensToModify.add(tma); optionsChangesetNumber++; } } /**