GrParser

Analyses the syntax and produce the data for the VM The parser analyses the lexemes generated by the lexer and produce machine code.

Members

Functions

addGetInstruction
void addGetInstruction(GrVariable variable, GrType expectedType, bool allowOptimization)

Add a load opcode, or optimize a previous store.

dump
void dump()
Undocumented in source. Be warned that the author may not have intended to support it.
generateFunctionInputs
void generateFunctionInputs()

Generate opcodes to fetch the function or the task's parameters

getAnonymousFunction
GrFunction getAnonymousFunction(string name, GrType[] signature, uint fileId)
Undocumented in source. Be warned that the author may not have intended to support it.
getFunction
GrFunction getFunction(string mangledName, uint fileId, bool isPublic)
Undocumented in source. Be warned that the author may not have intended to support it.
getFunction
GrFunction getFunction(string name, GrType[] signature, uint fileId, bool isPublic)
Undocumented in source. Be warned that the author may not have intended to support it.
parseFunction
void parseFunction(GrFunction func)

Parse the body of global functions

parseScript
void parseScript(GrData data, GrLexer lexer, int options)
Undocumented in source. Be warned that the author may not have intended to support it.
removeFunction
void removeFunction(string name)

Remove a declared function

solveFunctionCalls
void solveFunctionCalls(uint[] opcodes)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

anonymousFunctions
GrFunction[] anonymousFunctions;
Undocumented in source.
breaksJumps
uint[][] breaksJumps;
Undocumented in source.
continuesDestinations
uint[] continuesDestinations;
Undocumented in source.
continuesJumps
uint[][] continuesJumps;
Undocumented in source.
current
uint current;
Undocumented in source.
currentFunction
GrFunction currentFunction;
events
GrFunction[] events;
Undocumented in source.
fconsts
GrFloat[] fconsts;
Undocumented in source.
fglobalsCount
uint fglobalsCount;

Number of int based global variables declared. +//// Number of string based global variables declared

functionCalls
GrFunctionCall[] functionCalls;
Undocumented in source.
functionStack
GrFunction[] functionStack;
functions
GrFunction[] functions;
functionsQueue
GrFunction[] functionsQueue;
Undocumented in source.
globalVariables
GrVariable[] globalVariables;
Undocumented in source.
iconsts
GrInt[] iconsts;
Undocumented in source.
iglobalsCount
uint iglobalsCount;

Number of int based global variables declared. +//// Number of float based global variables declared

instanciatedFunctions
GrFunction[] instanciatedFunctions;
Undocumented in source.
isTypeChecking
bool isTypeChecking;
Undocumented in source.
lexemes
GrLexeme[] lexemes;
Undocumented in source.
oglobalsCount
uint oglobalsCount;

Number of int based global variables declared.

sconsts
GrString[] sconsts;
Undocumented in source.
scopeLevel
uint scopeLevel;
Undocumented in source.
sglobalsCount
uint sglobalsCount;

Number of int based global variables declared. +//// Number of ptr based global variables declared

templatedFunctions
GrTemplateFunction[] templatedFunctions;
Undocumented in source.

Meta