44 #ifndef Included_RexxSource
45 #define Included_RexxSource
103 #define new_instruction(name, type) this->sourceNewObject(sizeof(RexxInstruction##type), The##type##InstructionBehaviour, KEYWORD_##name)
104 #define new_variable_instruction(name, type, size) this->sourceNewObject(size, The##type##InstructionBehaviour, KEYWORD_##name)
106 #define _interpret 0x00000002
107 #define _install 0x00000004
108 #define reclaimed 0x00000008
109 #define reclaim_possible 0x00000020
110 #define no_clause 0x00000040
136 void *
operator new(size_t);
137 inline void *
operator new(
size_t size,
void *ptr) {
return ptr;}
138 inline void operator delete(
void *) { ; }
139 inline void operator delete(
void *,
void *) { ; }
bool isMethod(RexxObject *o)
const size_t TRACE_DEBUG_MASK
const size_t TRACE_LABELS
const size_t TRACE_NORMAL
const size_t TRACE_IGNORE
const size_t TRACE_SETTING_MASK
const size_t TRACE_INTERMEDIATES
const size_t TRACE_ERRORS
const size_t TRACE_RESULTS
RexxObject * builtin_func(RexxActivation *, RexxObject **, size_t, size_t, RexxExpressionStack *)
const size_t TRACE_COMMANDS
const size_t TRACE_FAILURES
KeywordEntry(const char *n, int code)
RexxVariableBase * retriever(RexxString *)
void reset(size_t position)
RexxToken * nextRealToken()
virtual RexxObject * put(RexxObject *, RexxObject *)
virtual RexxObject * remove(RexxObject *key)
void addLast(RexxObject *value)
RexxObject * pushRexx(RexxObject *)
RexxInstruction * loopNew()
RexxDirectory * getImportedClasses()
RexxStemVariable * addStem(RexxString *)
RexxDirectory * class_dependencies
void resetPosition(size_t p)
RexxObject * subExpression(int)
static const size_t TRACE_COMMANDS
void pushDo(RexxInstruction *i)
void syntaxErrorAt(int errorcode, SourceLocation token_location)
static size_t resolveBuiltin(RexxString *)
static int condition(RexxToken *)
void createConstantGetterMethod(RexxString *name, RexxObject *value)
PackageClass * loadRequires(RexxActivity *activity, RexxString *target)
static const size_t TRACE_ERRORS
RexxToken * sourceNextToken(RexxToken *)
RexxList * sourceLiterals
static pbuiltin builtinTable[]
RexxDirectory * getPublicRoutines()
void setBufferedSource(RexxBuffer *newSource)
RexxToken * popOperator()
static KeywordEntry subKeywords[]
static int subDirective(RexxToken *)
RexxInstruction * labelNew()
void decodeExternalMethod(RexxString *methodName, RexxString *externalSpec, RexxString *&library, RexxString *&procedure)
static int keyDirective(RexxToken *)
RexxDirectory * public_routines
RexxObject * parseLogical(RexxToken *first, int terminators)
RexxCode * translateBlock(RexxDirectory *)
RexxInstruction * forwardNew()
static const size_t TRACE_INTERMEDIATES
RexxDirectory * getLocalRoutines()
void createAttributeGetterMethod(RexxString *name, RexxVariableBase *retriever, bool classMethod, AccessFlag privateMethod, ProtectedFlag protectedMethod, GuardFlag guardedMethod)
RexxInstruction * traceNew()
static const size_t TRACE_SETTING_MASK
RexxObject * collectionMessage(RexxToken *, RexxObject *, int)
void extensionDirective()
RexxInstruction * ifNew(int)
unsigned int locateToken(RexxToken *)
RexxString * programDirectory
void addClause(RexxInstruction *)
static KeywordEntry directives[]
static int precedence(RexxToken *)
RexxString * programExtension
RexxDirectory * getInstalledPublicRoutines()
void argList(RexxToken *, int, bool, size_t &, size_t &)
RexxCode * interpret(RexxString *, RexxDirectory *, size_t, RexxActivation *)
RexxMethod * createNativeMethod(RexxString *name, RexxString *library, RexxString *procedure)
RexxDirectory * getDefinedMethods()
void resolveDependencies()
RexxObject * expression(int)
RexxString * getProgramName()
void setSecurityManager(RexxObject *manager)
RexxInstruction * messageAssignmentNew(RexxExpressionMessage *, RexxObject *)
void startLocation(SourceLocation &)
void checkDuplicateMethod(RexxString *name, bool classMethod, int errorMsg)
void extractNameInformation()
RexxInstruction * exitNew()
RexxString * traceBack(RexxActivation *, SourceLocation &, size_t, bool)
RexxInstruction * findLabel(RexxString *)
RexxInstruction * topDo()
RexxInstruction * exposeNew()
void flatten(RexxEnvelope *)
RexxSource * parentSource
RexxInstruction * instruction()
static int subKeyword(RexxToken *)
RexxObject * fullSubExpression(int)
RexxDirectory * getInstalledPublicClasses()
void createAbstractMethod(RexxString *name, bool classMethod, AccessFlag privateMethod, ProtectedFlag protectedMethod, GuardFlag guardedMethod, bool isAttribute)
void syntaxError(int errorcode, RexxInstruction *i)
RexxObject * popNTerms(size_t)
RexxString * resolveProgramName(RexxActivity *activity, RexxString *name)
void syntaxError(int errorcode, RexxObject *a1)
RoutineClass * findPublicRoutine(RexxString *)
RexxInstruction * elseNew(RexxToken *)
RexxInstruction * raiseNew()
void install(RexxActivation *activation)
RexxInstruction * createLoop()
RexxObject * messageSubterm(int)
SourceLocation clauseLocation
RexxInstruction * assignmentNew(RexxToken *)
RexxArray * extractSource()
RexxToken * getToken(int, int)
RexxObject * messageTerm()
RexxToken * sourceLiteral(size_t, SourceLocation)
RexxObject * subTerm(int)
static const size_t TRACE_LABELS
RexxInstruction * messageAssignmentOpNew(RexxExpressionMessage *, RexxToken *, RexxObject *)
void addLabel(RexxInstruction *, RexxString *)
static bool isSymbolCharacter(codepoint_t ch)
RexxVariableBase * getRetriever(RexxString *)
RexxDirectory * getMethods()
ExtensionDirective * active_extension
void pushOperator(RexxToken *operatorToken)
RexxObject * functionCallMessage(RexxToken *, RexxObject *, int)
void libraryDirective(RexxString *name, RexxToken *token)
ClassDirective * active_class
RexxObject * toss(RexxObject *)
void syntaxErrorAt(int errorcode, RexxToken *token)
void errorLine(int, RexxInstruction *)
RexxInstruction * signalNew()
RexxObject * parseConditional(int *, int)
RexxInstruction * leaveNew(int)
RexxActivation * interpret_activation
static int resolveKeyword(RexxString *token, KeywordEntry *Table, int Table_Size)
RexxInstruction * addressNew()
static KeywordEntry parseOptions[]
RexxCompoundVariable * addCompound(RexxString *)
RexxDirectory * getRoutines()
RexxInstruction * numericNew()
void addReference(RexxObject *reference)
SecurityManager * getSecurityManager()
SecurityManager * securityManager
void endLocation(SourceLocation &)
void createAttributeSetterMethod(RexxString *name, RexxVariableBase *retriever, bool classMethod, AccessFlag privateMethod, ProtectedFlag protectedMethod, GuardFlag guardedMethod)
RexxInstruction * upperNew()
StackFrameClass * createStackFrame()
static KeywordEntry keywordInstructions[]
static KeywordEntry subDirectives[]
void pushSubTerm(RexxObject *)
RexxCode * translate(RexxDirectory *)
RexxInstruction * endNew()
RexxCode * generateCode(bool isMethod)
void syntaxError(int errorcode)
void addInstalledRoutine(RexxString *name, RoutineClass *routineObject, bool publicRoutine)
RexxObject * constantLogicalExpression()
static const size_t DEBUG_ON
void removeObj(RexxObject *object)
RexxList * loadedPackages
RexxInstruction * parseNew(int)
void blockSyntaxError(RexxInstruction *i)
void errorToken(int, RexxToken *)
RexxInstruction * instructionNew(int)
void argArray(RexxToken *, int, bool, RexxArray *&, RexxArray *&)
static RexxString * formatTraceSetting(size_t source)
RexxInstruction * useNew()
RexxInstruction * thenNew(RexxToken *, RexxInstructionIf *)
RexxCode * interpretMethod(RexxDirectory *, RexxActivation *)
RexxToken * topOperator()
static KeywordEntry builtinFunctions[]
void liveGeneral(int reason)
RexxInstruction * returnNew()
RexxInstruction * createDoLoop()
RexxString * getProgramFile()
void RexxInstructionForwardCreate(RexxInstructionForward *)
bool nextSpecial(unsigned int, SourceLocation &, bool advance=true)
RoutineClass * findRoutine(RexxString *)
void syntaxError(int errorcode, RexxObject *a1, RexxObject *a2, RexxObject *a3)
RexxInstruction * dropNew()
static const size_t TRACE_IGNORE
void position(size_t, size_t)
static const size_t DEBUG_OFF
static KeywordEntry conditionKeywords[]
void blockError(RexxInstruction *)
RexxInstruction * optionsNew()
void adjustLine(size_t, size_t)
void expose(RexxString *)
RexxInstruction * messageNew(RexxExpressionMessage *)
RexxInstruction * replyNew()
void createMethod(RexxString *name, bool classMethod, AccessFlag privateMethod, ProtectedFlag protectedMethod, GuardFlag guardedMethod, bool isAttribute)
RexxString * commonString(RexxString *)
void setPublicRoutines(RexxDirectory *r)
RexxInstruction * popDo()
RexxSource(RexxString *, RexxArray *)
void addInstalledClass(RexxString *name, RexxClass *classObject, bool publicClass)
void syntaxError(int errorcode, RexxObject *a1, RexxObject *a2)
RexxInstruction * interpretNew()
RexxString * getProgramExtension()
RexxInstruction * sourceNewObject(size_t, RexxBehaviour *, int)
RexxString * extract(SourceLocation &, bool=false)
size_t processVariableList(int)
RexxClass * findPublicClass(RexxString *name)
static int builtin(RexxToken *)
RexxString * getProgramDirectory()
RexxObject * constantExpression()
RexxInstruction * doNew()
PackageClass * getPackage()
void errorPosition(int, SourceLocation)
RexxDirectory * variables
RexxInstruction * commandNew()
RexxDirectory * getInstalledRoutines()
void pushTerm(RexxObject *)
static const size_t TRACE_NORMAL
RexxInstruction * nopNew()
void holdObject(RexxObject *object)
void addMethod(RexxString *name, RexxMethod *method, bool classMethod)
RexxObject * message(RexxObject *, bool, int)
RexxObject * variableOrMessageTerm()
void mergeRequired(RexxSource *)
RexxDirectory * getImportedRoutines()
RexxDirectory * installed_classes
void initBuffered(RexxBuffer *)
RexxSource(RESTORETYPE restoreType)
RexxInstruction * queueNew(int)
RexxInstruction * sayNew()
RexxString * packLiteral(size_t, size_t, int)
void setProgramName(RexxString *name)
RexxInstruction * assignmentOpNew(RexxToken *, RexxToken *)
RexxObject * popSubTerm()
void saveObject(RexxObject *object)
void setLocalRoutines(RexxDirectory *r)
RexxVariableBase * addVariable(RexxString *)
static const size_t TRACE_RESULTS
void needVariableOrDotSymbol(RexxToken *)
RexxIdentityTable * guard_variables
RexxDirectory * installed_public_classes
void checkDirective(int errorCode)
void processInstall(RexxActivation *)
RexxIdentityTable * savelist
void inheritSourceContext(RexxSource *source)
RexxInstruction * otherwiseNew(RexxToken *)
RexxInstruction * currentInstruction
RexxDirectory * getInstalledClasses()
RexxClass * findInstalledClass(RexxString *name)
void flushControl(RexxInstruction *)
RexxDirectory * merged_public_classes
static const size_t TRACE_OFF
RexxBuffer * sourceBuffer
RexxDirectory * merged_public_routines
RexxDirectory * exposed_variables
RexxInstruction * guardNew()
RexxInstruction * endIfNew(RexxInstructionIf *)
static int parseOption(RexxToken *)
void interpretLine(size_t)
static const size_t TRACE_DEBUG_MASK
static const size_t DEBUG_NOTRACE
RexxObject * parenExpression(RexxToken *)
void attributeDirective()
bool getEnableMacrospace()
static int translateChar(codepoint_t ch)
RexxQueue * namedSubTerms
RexxArray * words(RexxString *)
RexxClass * findClass(RexxString *)
static int characterTable[]
static const size_t DEBUG_IGNORE
void needVariable(RexxToken *)
RexxObject * addText(RexxToken *)
bool terminator(int, RexxObject *)
static const size_t TRACE_ALL
void syntaxError(int errorcode, RexxToken *token)
static bool parseTraceSetting(RexxString *, size_t &, size_t &, char &)
void addPackage(PackageClass *package)
static const size_t DEFAULT_TRACE_SETTING
static const size_t DEBUG_TOGGLE
static int keyword(RexxToken *)
RoutineClass * findLocalRoutine(RexxString *)
RexxInstruction * procedureNew()
static const size_t TRACE_FAILURES
RexxInstruction * selectNew()
RexxInstruction * callNew()
RexxBuffer * sourceIndices
RexxObject * push(RexxObject *obj)
const SourceLocation & getLocation()