Search in sources :

Example 1 with RandomSubroutineDescriptor

use of cz.cuni.mff.d3s.trupple.parser.identifierstable.types.subroutine.builtin.RandomSubroutineDescriptor in project TrufflePascal by Aspect26.

the class IdentifiersTableTP method addBuiltinFunctions.

@Override
protected void addBuiltinFunctions() {
    super.addBuiltinFunctions();
    try {
        this.registerNewIdentifier("random", new RandomSubroutineDescriptor());
        this.registerNewIdentifier("randomize", new RandomizeSubroutineDescriptor());
        this.registerNewIdentifier("assign", new AssignSubroutineDescriptor());
    } catch (LexicalException e) {
        throw new PascalRuntimeException("Could not initialize extension builtin functions: " + e.getMessage());
    }
}
Also used : LexicalException(cz.cuni.mff.d3s.trupple.parser.exceptions.LexicalException) AssignSubroutineDescriptor(cz.cuni.mff.d3s.trupple.parser.identifierstable.types.subroutine.builtin.AssignSubroutineDescriptor) RandomSubroutineDescriptor(cz.cuni.mff.d3s.trupple.parser.identifierstable.types.subroutine.builtin.RandomSubroutineDescriptor) PascalRuntimeException(cz.cuni.mff.d3s.trupple.language.runtime.exceptions.PascalRuntimeException) RandomizeSubroutineDescriptor(cz.cuni.mff.d3s.trupple.parser.identifierstable.types.subroutine.builtin.RandomizeSubroutineDescriptor)

Aggregations

PascalRuntimeException (cz.cuni.mff.d3s.trupple.language.runtime.exceptions.PascalRuntimeException)1 LexicalException (cz.cuni.mff.d3s.trupple.parser.exceptions.LexicalException)1 AssignSubroutineDescriptor (cz.cuni.mff.d3s.trupple.parser.identifierstable.types.subroutine.builtin.AssignSubroutineDescriptor)1 RandomSubroutineDescriptor (cz.cuni.mff.d3s.trupple.parser.identifierstable.types.subroutine.builtin.RandomSubroutineDescriptor)1 RandomizeSubroutineDescriptor (cz.cuni.mff.d3s.trupple.parser.identifierstable.types.subroutine.builtin.RandomizeSubroutineDescriptor)1