99 #define line_delimiters "\r\n" 100 #define ctrl_z 0x1a // the end of file marker 187 const char *_current;
202 if (start[0] ==
'#' && start[1] ==
'!')
204 memcpy(start,
"--", 2);
210 indices->
copyData(&descriptor,
sizeof(descriptor));
213 scan = (
const char *)memchr(start,
ctrl_z, length);
216 length = scan - start;
223 descriptor.
position = _current - start;
227 while (scan !=
OREF_NULL && *scan ==
'\0')
234 _current = _current + length;
235 descriptor.
length = length;
241 descriptor.
length = scan - _current;
247 if (length > (
size_t)(scan - _current))
260 length -= scan - _current;
264 indices->
copyData(&descriptor,
sizeof(descriptor));
291 memcpy(begin,program_source->
getData(), 9);
294 begin[9]=end[3]=0x00;
297 memcpy(program_source->
getData(),
" ", 9);
522 const char *buffer_start;
801 const char *buffer_start;
805 return OREF_NULLSTRING;
830 return new_string(buffer_start + descriptors[_position].
position, descriptors[_position].length);
834 return OREF_NULLSTRING;
877 location = token_location;
893 location.
setEnd(token_location);
897 this->
flags &= ~reclaimed;
908 #define TRACE_OVERHEAD 16 912 #define INSTRUCTION_OVERHEAD 11 914 #define PREFIX_OFFSET (LINENUMBER + 1) 915 #define PREFIX_LENGTH 3 916 #define INDENT_SPACING 2 947 size_t indent,
bool trace)
961 if (
line == OREF_NULLSTRING)
1001 outlength = strlen(linenumber);
1002 linepointer = linenumber;
1012 buffer->
put(
LINENUMBER - outlength, linepointer, outlength);
1031 return OREF_NULLSTRING;
1035 line = OREF_NULLSTRING;
1126 source->
put(source_line, 1);
1140 source->
put(source_line, 1);
1148 source->
put(this->
get(counter), i);
1158 source->
put(source_line, i);
1234 size_t _line_number )
1287 bool result =
false;
1522 return routineObject;
1720 _requires->
install(activation);
1742 createdClasses->
put(newClass, index++);
1745 for (
size_t j = 1; j < index; j++)
1798 while (!this->
atEnd())
1855 next_install = current_class;
1917 #define DEFAULT_GUARD 0 1918 #define GUARDED_METHOD 1 1919 #define UNGUARDED_METHOD 2 1921 #define DEFAULT_PROTECTION 0 1922 #define PROTECTED_METHOD 1 1923 #define UNPROTECTED_METHOD 2 1925 #define DEFAULT_ACCESS_SCOPE 0 1926 #define PUBLIC_SCOPE 1 1927 #define PRIVATE_SCOPE 2 1995 this->active_class->setMetaClass(token->
value);
2007 this->active_class->setPublic();
2034 this->active_class->setSubClass(token->
value);
2052 this->active_class->setMixinClass(token->
value);
2072 this->active_class->addInherits(token->
value);
2156 bool Attribute =
false;
2157 bool abstractMethod =
false;
2201 if (externalname !=
OREF_NULL || abstractMethod)
2213 externalname = token->
value;
2292 if (abstractMethod || externalname !=
OREF_NULL)
2297 if (externalname !=
OREF_NULL || Attribute)
2301 abstractMethod =
true;
2338 addMethod(internalname, _method, Class);
2359 else if (abstractMethod)
2395 addMethod(internalname, _method, Class);
2569 procedure = methodName;
2578 if (_words->
size() == 3)
2583 else if (_words->
size() == 2)
2600 #define ATTRIBUTE_BOTH 0 2601 #define ATTRIBUTE_GET 1 2602 #define ATTRIBUTE_SET 2 2615 bool abstractMethod =
false;
2733 if (externalname !=
OREF_NULL || abstractMethod)
2745 externalname = token->
value;
2750 if (abstractMethod || externalname !=
OREF_NULL)
2754 abstractMethod =
true;
2792 addMethod(internalname, _method, Class);
2800 else if (abstractMethod)
2832 if (internalname == procedure)
2840 addMethod(internalname, _method, Class);
2843 else if (abstractMethod)
2881 if (internalname == procedure)
2892 else if (abstractMethod)
2939 if (!token->isSymbolOrLiteral())
2956 value = token->value->concat(second->
value);
2972 if (!token->isEndOfClause())
3007 bool privateMethod,
bool protectedMethod,
bool guardedMethod)
3020 _method->
setAttributes(privateMethod, protectedMethod, guardedMethod);
3041 bool classMethod,
bool privateMethod,
bool protectedMethod,
bool guardedMethod)
3046 _method->
setAttributes(privateMethod, protectedMethod, guardedMethod);
3066 bool classMethod,
bool privateMethod,
bool protectedMethod,
bool guardedMethod)
3071 _method->
setAttributes(privateMethod, protectedMethod, guardedMethod);
3091 bool classMethod,
bool privateMethod,
bool protectedMethod,
bool guardedMethod)
3097 _method->
setAttributes(privateMethod, protectedMethod, guardedMethod);
3181 externalname = token->
value;
3225 if (_words->
size() == 3)
3230 else if (_words->
size() == 2)
3268 if (_words->
size() == 3)
3273 else if (_words->
size() == 2)
3460 second = this->
popDo();
3474 second = this->
popDo();
3547 this->
pushDo(_instruction);
3592 type = _instruction->
getType();
3625 second = this->
topDo();
3641 if (this->
flags&no_clause)
3660 if (this->
flags&no_clause)
3681 if (this->
flags&no_clause)
3698 second = this->
topDo();
3705 second = this->
popDo();
3706 this->
pushDo(_instruction);
3715 if (this->
flags&no_clause)
3730 second = this->
topDo();
3738 this->
pushDo(_instruction);
3752 second = this->
popDo();
3775 second = this->
popDo();
3793 this->
pushDo(_instruction);
3797 this->
pushDo(_instruction);
3811 if (
isOfClass(FunctionCallTerm, _instruction))
3879 return _instruction;
3942 return _instruction;
3957 return _instruction;
3975 _instruction = this->
nopNew();
3980 _instruction = this->
dropNew();
3990 _instruction = this->
callNew();
4015 _instruction = this->
doNew();
4020 _instruction = this->
loopNew();
4025 _instruction = this->
exitNew();
4073 if (this->
flags&_interpret)
4081 if (this->
flags&_interpret)
4094 if (this->
flags&_interpret)
4102 if (this->
flags&_interpret)
4105 _instruction = this->
useNew();
4125 _instruction = this->
sayNew();
4150 _instruction = this->
elseNew(_first);
4155 _instruction = this->
endNew();
4172 return _instruction;
4260 const char * _position;
4267 end = _position + length;
4271 while (*_position !=
'.')
4276 stemName =
new_string(start, _position - start + 1);
4277 stemRetriever = this->
addStem(stemName);
4289 while (_position < end)
4291 if (*_position ==
'.')
4301 if (!(tail->
getLength() == 0 || (*start >=
'0' && *start <=
'9')))
4312 }
while (_position < end);
4607 _expression = this->
addText(token);
4611 _expression = this->
addText(token);
4657 _expression = this->
addText(token);
4661 _expression = this->
addText(token);
4752 while (!this->
terminator(terminators, token))
4911 argCount = this->
argList(_first, terminators);
4914 while (argCount > 0)
4946 arglist->
push(subexpr);
4973 while (total > realcount)
4998 _function =
new (argCount)
RexxExpressionFunction(name->value, argCount, this->subTerms, this->resolveBuiltin(name->value), name->isLiteral());
5072 messagename = token->
value;
5080 token = this->
getToken(terminators, 0);
5096 token = this->
getToken(terminators, 0);
5146 result = this->
addText(_first);
5323 term = this->
function(second, token, terminators);