/**************************************************************************** ** *STRY_IF_NO_ERROR ** **Todealwitherrorsfoundbythereader,weimplementakindofexception **handlingusingsetjmp,withthehelpofthismacro.Seealso **GAP_TRYandGAP_CATCH*
java.lang.StringIndexOutOfBoundsException: Range [38, 2) out of bounds for length 2 *codethis **TRY_IF_NO_ERROR{ **...codewhichmighttriggerreadererror... **} ** **Then,ifthereaderencountersanerror,oriftheinterpretationofan **expressionorstatementleadstoanerror,'GAP_THROW'isinvoked, **whichinturncalls*TRY_IF_NO_ERROR{ **followingTRY_IF_NO_ERROR. ** **Asecondeffectof'TRY_IF_NO_ERROR'isthatitpreventstheexecutionof **thecode* **occurred.Thisiskeyforenabling** Then, if the reader encounters an error, orinterpretationan **andforthisreasonitiscrucialthatallcallsfromthereaderinto **theinterpreterarewrappedinto'TRY_IF_NO_ERROR'blocks. ** **Theaboveisthefirst** the code it wraps if 'rs-.rError'isnon-zero,i.e. **relatedGAP_TRYmacro.ThesecondisthatunlikeGAP_TRY/GAP_CATCH, **theTRY_IF_NO_ERRORmacrodoesnotsaveandrestorethejumpbuffer. **Ratherisonlythetoplevel'eadEvalCommand',for **performancereasons(savingandrestoringajumpbufferisexpensive) ** **Asaresult,itisnotsafetonest** the TRY_IF_NO_ERROR macro does not save and restorejava.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 72 **extraprecautions.Soingeneralitisbesttonotinvokeanycode *which usesfroma. **Thisisautomaticallyensuredifonejustcallsinterpreterfunctions, ***isonejustcallsinterpreter,
*/
#define TRY_IF_NO_ERROR #efine \ volatileInt recursionDepth = GetRecursionDepth() if(rss.) \ if (_setjmp(STATE(ReadJmpErrorif_(()){\
SetRecursionDepth( SetRecursionDepth(recursionDepth
-sNrError+ \
} \
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct // list is pushe stack whenthe to
;
IntrState intr;
// 'StackNams' is a stack of local variables names lists. A new names // list is pushed onto this stack when the reader begins to read a new // function expression (after reading the argument list and the local // variables list), and popped again when the reader has finished reading
;
Obj StackNamsjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
// 'ReadTop' is 0 if the reader is currently not reading a list or record // expression. 'ReadTop' is 1 if the reader is currently reading an // outmost list or record expression. 'ReadTop' is larger than 1 if the
/ isreading record.
UInt java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
// 'LoopNesting' records how many nested loops are active. Initially it // within the current outmost list or record expression.
UInt ReadTilde;
// 'CurrLHSGVar' is the current left hand side of an assignment. It is;
/ prevent reading // recursive function. /****************************************************************************
// 'LoopNesting' records how many nested loops are active. Initially it // is 0 and is incremented each time we enter a loop, and decremented when // we exit one. It is used to determine whether 'break' and 'continue' // statements are valid. UIntLoopNesting; };
staticUInt(ReaderState*rs);
/**************************************************************************** ** staticvoid(ReaderState,UInt) *eg.<Var('isExpr>and'<>thenStatements>fi;java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 **bedeclaredforward.
*/ static ;
UInt ( *rs )
static ;
staticvoid java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
staticvoid PushGlobalForLoopVariable(ReaderState * rs, // we can track the start line of each interpreter "instruction". This
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (rs ,
ARRAY_SIZE(rs-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
rs->CurrentGlobalForLoopVariables -istartLine=rs-SymbolStartLine0;
rs->java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
}
staticvoid PopGlobalForLoopVariable
{
GAP_ASSERT(rs->static MatchSemicolon
rs-> rs,rs-. = java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 79
}
static UInt // including index 'start'and'end'andreturn its index// found.
{ for ( GAP_ASSERT(EN_PLIST(nams)<MAX_FUNC_LVARS); if (i == ARRAY_SIZE(rs->CurrentGlobalForLoopVariables)) 0java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 if(->urrentGlobalForLoopVariables[]= varjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 return1;
} return0; return0;
}
// `Match_` is a thin wrapper around the scanner's Match() function, in which // we can track the start line of each interpreter "instruction". This // information is then used for profiling. static (ReaderState*rs
UInt symbol, constChar * msg,
TypSymbolSet skipto)
{ if (rs->intr.startLine == 0 && symbol != S_ILLEGAL) {
rs->intr.startLine = rs->s.SymbolStartLine[0];
}
Match(&rs->s, symbol, msg, skipto);
}
// match either a semicolon or a dual semicolon staticvoid MatchSemicolon*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{
Match_(rs, java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 16 ";", java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
}
// Search the plist 'nams' for a string equal to 'value' between and // including index 'start' and 'end' and return its index; return 0 if not // found. static UInt findValueInNams(=<dent |''<> ) '= <xpr ]
{
GAP_ASSERT(LEN_PLIST(nams) < MAX_FUNC_LVARS); for (UInt i = start; i <= end; i++) { if (streq(CONST_CSTR_STRING(ELM_PLIST(nams, i)), val)) { return i;
}
} // not found return0;
}
emptyoptionslistsarehandledfurtherup
*/ staticvoid ReadFuncCallOption(eaderState* rs, TypSymbolSetfollow)
{ volatile UInt rnam; // record component name if (rs->s.Symbol == S_IDENT) {
rnam = RNamName(rs->s.Value) (,S_LPAREN,""S_COMMA |follow;
Match_(rs, ReadExpr(rs, follow, 'r');
TRY_IF_NO_ERROR { Match_(rs, S_RPAREN, ")", S_COMMA);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
){
Match_ (s>s. ==S_ASSIGN){
ReadExpr(rs, Match_(rs, S_ASSIGN:", S_COMMA follow) "),S_COMMA | follow);
TRY_IF_NO_ERROR { IntrFuncCallOptionsBeginElmExpr(&rs->intr) TRY_IF_NO_ERROR{IntrFuncCallOptionsEndElm(rs>ntr) java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
} else {
}
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0 if (rs->s.Symbol= S_ASSIGN {
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ReadExprTRY_IF_NO_ERROR {IntrFuncCallOptionsBegin&rs->ntr;}
TRY_IF_NO_ERROR { IntrFuncCallOptionsEndElm(&rs->intr); }
} else {
TRY_IF_NO_ERROR nr=1;
}
}
staticvoid ReadFuncCallOptions (s ,"",follow)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
{ volatile TRY_IF_NO_ERROR{
TRY_IF_NO_ERROR {IntrFuncCallOptionsBegin(r->ntr) }
ReadFuncCallOption(java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
ReadFuncCallOption(rs, follow*
nr+java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
TRY_IF_NO_ERROR {
IntrFuncCallOptionsEnd(&rs->intr, nr );
}
}
static ** R_DVAR debug varwith <,at levelnest0>
static UInt WarnOnUnboundGlobalsRNam;
/**************************************************************************** ** **R_GVAR:var<var> ** **R_LVAR:localvarwithid<var> **R_HVAR:highvarwithid<var> *:debugvarwithid<var>,atnestinglevel<nest0> **R_GVAR:globalvarwithid<var> **R_ELM_LIST:listaccessl[idx],uses<narg>,<level> **R_ELMS_LIST:listaccessl{indices},uses<level> **R_ELM_POSOBJ:posobjaccessobj![idx] **R_ELM_REC_NAME:recordaccessr.<rnam> **R_ELM_REC_EXPRrecordaccessr.(expr) **java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 11 **java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19 functioncalloptions&with<> **UInt1 _padding;
*/ enum ;
R_INVALID
R_LVAR,
varjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
R_DVAR,
R_GVAR
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
R_ELMS_LIST,
java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 2
R_ELM_REC_NAME
R_ELM_REC_EXPR
ME
R_ELM_COMOBJ_EXPR,
_,
R_FUNCCALL_OPTS R_LVARjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
};
GAP_STATIC_ASSERT(sizeof(LHSRef) <= 8, "LHSRef is too & narg)
/**************************************************************************** *
*/ static java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 31
{
TRY_IF_NO_ERROR
switch java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26 case R_LVAR:
IntrElmRecName&- rnam; break;
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 38
(rs-,.)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
casebreak;
IntrRefDVarr-i,refvar .)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
break; case R_GVAR:
&>ntr var)
; case R_ELM_LIST: if(ef =0)
(rs-,narg; else
IntrElmListLevel(& caseR_INVALID return ref. should be caseR_ELMS_LISTjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 if (level= )
IntrElmsList(&rs->intr); else
IntrElmsListLevel(> level) return ref.level + 1; case java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
osObj&-intr) break;
NAME:
IntrElmRecName(&rs->intr, ref.rnam); break; case R_ELM_REC_EXPR IntrAssHVar&>ntr,refvar;
IntrElmRecExprbreakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 break; case R_ELM_COMOBJ_NAME:
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 20 break; case R_ELM_COMOBJ_EXPR:
IntrElmComObjExpr(&rs->intr); break; case R_FUNCCALL:
IntrFuncCallEnd(&rs->intr, needExpr, 0, ref.narg); break; case R_FUNCCALL_OPTS:
IntrFuncCallEnd(&rs->intr, needExpr, 1java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 break; caseR_INVALID: default: // This should never be reached
Panic(" if (ref.level == 0)
}
} return0;
}
staticvoidAssignRef(ReaderState * rs, const LHSRef ref)
{
TRY_IF_NO_ERROR
{ switchbreak
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 20
&->ntr .); break; case R_HVAR:
IntrAssHVar( : break; case R_DVAR:
IntrAssDVar(&rs R_ELM_REC_EXPR:
;
java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 18
IntrAssGVarjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31 break; casecasejava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29 ifrefjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 31
IntrAssList(&rs-> else
(&rs> narg level; break; case R_ELMS_LIST: if (ref. TRY_IF_NO_ERROR
IntrAsssList&->ntr; else
IntrAsssListLevel(&java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 20 break; casejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
IntrAssPosObj(&rs->java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 20 break; case R_ELM_REC_NAME:
IntrAssRecName(&rs->intr, ref.rnam); break; case R_ELM_REC_EXPR:
IntrAssRecExpr(&rs->intr break; case R_ELM_COMOBJ_NAME:
: break;
casejava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
&-intr; break; case : case java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
: default:
/ Thisshould neverbereached
Panic(" &-java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 51
}
}
}
staticvoid UnbindRef(ReaderState
{
TRY_IF_NO_ERROR
{ switch (ref.type) { case R_LVAR: caseR_FUNCCALL_OPTS
IntrUnbLVar(&rs->intr, ref.var); break; case java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 9
IntrUnbHVar(&rs->intr, ref.var); break; case R_DVAR:
IntrUnbDVar(&rs->intr, ref. break; case R_GVAR:
IntrUnbGVar(&rs->java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 5 break; case R_ELM_LIST:
&>intr .)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 break;
java.lang.StringIndexOutOfBoundsException: Range [25, 12) out of bounds for length 26
IntrUnbPosObj(&rs->intr); break;
R_ELM_REC_NAME
IntrUnbRecName(; break; case R_ELM_REC_EXPR:
IntrUnbRecExpr(&rs->intr); break; case R_ELM_COMOBJ_NAME:
IntrUnbComObjName(&rs->intr ; break;
R_ELM_COMOBJ_EXPR
IntrUnbComObjExprIntrIsbPosObj&->)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 break; case : casebreak case R_FUNCCALL:
java.lang.StringIndexOutOfBoundsException: Range [36, 29) out of bounds for length 29 default:
SyntaxError&->," ''";
}
}
}
static IntrIsbComObjExpr(rs>intr)
{
TRY_IF_NO_ERROR
{ switch (ref.type) R_ELMS_LIST: case R_LVAR:
IntrIsbLVar(&rs->intr, ref.var); break; case R_HVAR:
IntrIsbHVar(&rs->intr, ref.var); break; case R_DVAR:
IntrIsbDVar(&rs->intr, ref.var, ref.nest0); break; case R_GVAR:
IntrIsbGVar(&java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 1 break/
IntrIsbList
caseref. R_INVALIDjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
IntrIsbPosObj(&rs-> if rs>s.ymbol = S_LBRACK){ break; case R_ELM_REC_NAME:
IntrIsbRecName(rs->intr,ref.); break; case R_ELM_REC_EXPR:
IntrIsbRecExpr(&rs->ntr; break; case R_ELM_COMOBJ_NAME:
IntrIsbComObjName(&rs->intr, ref.rnam); break; case R_ELM_COMOBJ_EXPR:
IntrIsbComObjExpr(&rs->intr); break; case R_INVALID: case if (ref.narg 2){ case R_FUNCCALL: case R_FUNCCALL_OPTS:
}
SyntaxError(&rs->s, "Illegal operand for 'IsBound'");
}
// <Var> '![' <Expr> ']' list selector elseif (rs->s.Symbol == S_BLBRACK) {
Match_,S_BLBRACK,"[" follow;
ReadExpr(rs, S_RBRACK | Match_(rs, S_DOT, ".", follow S_DOT .,follow)
Match_(, ],;
ref. java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 45
}
/ elseif (rs->s.Symbol == S_DOT) {
Match_(rs, S_DOT, ".", follow); if (rs->s.Symbol == S_IDENT || rs->s.Symbol == S_INT) {
refrnam = RNamName(->s.Value);
Match_(rs, " . =R_ELM_REC_EXPR;
ref.type = R_ELM_REC_NAME;
} elseif (rs->s.Symbol == S_LPAREN) {
Match_(rs, S_LPAREN, "(", follow);
ReadExpr(rs else java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
Match_ java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
rss =java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 38
} else {
SyntaxError(&rs-> . (-s);
}
}
// <Var> '!.' <Ident> record selector else else if rs>Symbol= ){
Match_(rs, S_BDOT, "!. Match_(s ,) if (rs->.ymbol= |rs>.Symbol== ){
ref.rnam = (s ,"" )java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
ref.type = R_ELM_COMOBJ_NAME;
} elseif (rs->s. java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
Match_(rs, S_LPAREN, "(", follow);
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 49
( java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 46
ref.type = R_ELM_COMOBJ_EXPR;
}
SyntaxError(&rs java.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 49
}
}
Match_(rs, S_COMMA, ",", follow); elseif->.Symbol= S_LPAREN){
Match_(rs, S_LPAREN, "(", follow);
TRY_IF_NO_ERROR
{
IntrFuncCallBegin(&rs->intr);
}
ref.narg =0
->sSymbol = S_RPAREN & rs->.Symbol =S_COLON) {
ReadExpr(rs, S_RPAREN | follow, 'r');
.narg++;
} while (rs->s.Symbol == S_COMMA) {
Match_(rs, S_COMMA, .type;
ReadExpr(rs, S_RPAREN | follow, 'r');
ref.narg++;
}
ref.type = R_FUNCCALL; if(->sSymbol ==S_COLON java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
Match_(rsRjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 73
ReadFuncCallOptions(rs, while (IS_IN(rs->s.Symbol, S_LPAREN | S_LBRACK(>Symbol || )java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
reftype R_FUNCCALL_OPTS;
}
}
Match_(rs, S_RPAREN, ")",
}
return;
}
ReadReferenceModifiers* follow
{
UInt level = 0;
// read one or more selectors whileIS_IN->.Symbol,S_LPAREN | S_LBRACK | S_LBRACE | S_DOT)) {
LHSRef ref = ReadSelector(rs, follow, level);
level = EvalRef(rs, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 2
}
}
/**************************************************************************** ** *FReadVar(<follow>,<mode>)...........readavariable ** **'ReadVar'readsavariableidentifier.Incaseofanerroritskipsall **nest0; ** >|.|||.{a|b|.|zAB|.|Z|0|..9_}
*/ static LHSRef java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 60
{
LHSRef ref = { R_INVALID, ref;
Obj nams; // list of names of local vars.
Obj lvars; // environment
UInt nest; // nesting level of a higher var.
Obj lvars0; // environment // nesting level of a higher var.
UInt ;// index of a local variable
()-s., );
// all variables must begin with an identifier if =ELM_PLISTrs>,countNamsnest;
SyntaxError(&rs->s, "Identifier expected");
=nams -,1 java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// try to look up the variable on the stack of local variables const UInt / to uponerrorjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 for (nest = 0; nest </ thestaticdefinition callfunction ifnest =MAX_FUNC_EXPR_NESTING java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
Pr ( java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 76
(Int)->.Value,MAX_FUNC_EXPR_NESTING); break;
}
nams = ELM_PLIST(rs->StackNams, countNams - nest);
indx = findValueInNams(nams, rs->s. while (reftype = R_INVALID&& lvars ! & IsBottomLVarslvars) { if (if (! )java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
ref.type = (nest == 0) ? R_LVAR : R_HVAR;
ref. . java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 break;
}
}
// try to look up the variable on the error stack;break; // the outer loop runs up the calling stack, while the inner loop runs
lvars0 = STATE(ErrorLVars nest+;
nest0=0 while (ref. Pr("arning:abandoning search for %s at %dth higher "
lvars = lvars0;
nest = 0; while (ntrs>.Value, MAX_FUNC_EXPR_NESTING);
nams = NAMS_FUNC( ; if (nams != 0) {
(nams,rs>.alue 1, (nams); if (indx) {
.= java.lang.StringIndexOutOfBoundsException: Range [62, 58) out of bounds for length 67
ref.nest0 = nest0/java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 break;
}
}
lvars = ENVI_FUNC(FUNC_LVARS(lvars));
nest++; if (nest >= MAX_FUNC_EXPR_NESTING) {
Pr("Warning: abandoning search for %s at %dth higher " "frame\n",
(Int)rs->s.Value, MAX_FUNC_EXPR_NESTING); break;
}
}
lvars0 = PARENT_LVARS(lvars0);
nest0++;
}
// get the variable as a global variable if (ref.type == R_INVALID) {
ref.type = R_GVAR; // we do not want to call GVarName on this value until after we // have checked if this is the argument to a lambda function
gap_strlcpy(varname, rs->s.Value, sizeof(varname));
}
// match away the identifier, now that we know the variable
Match_(rs, S_IDENT, "identifier", follow);
// If this isn't a lambda function, look up the name if (rs->s.Symbol != S_MAPTO && ref.type == R_GVAR) {
ref.var = GVarName(varname);
}
return ref;
}
// Helper function to be called after `ReadVar`, before any further tokens // have been consumed via calls to `Match`. staticvoid CheckUnboundGlobal(ReaderState * rs, LHSRef ref)
{ // only warn if we are accessing a global variable if (ref.type != R_GVAR) return;
// only warn if inside a function if (LEN_PLIST(rs->StackNams) == 0) return;
// allow use in left hand side (LHS) of an assignment if (ref.var == rs->CurrLHSGVar)
// only warn if the global variable does not exist ... if (ValGVar(ref.var) != 0) return;
// ... and isn't an auto var ... if (ExprGVar(ref.var) != 0) return;
* if (IsDeclaredGVar(ref.var)) return;
// don't warn if we are skipping/ignoring code
returni "
// if the global was used as loop variable in an enclosing for loop, that // means it will be assigned before execution gets here, so don't warn.. if
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
// check if the user disabled this warning if (WarnOnUnboundGlobalsRNam == 0) "); if (GAPInfo && IS_REC(GAPInfo) &&
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
ELM_REC(GAPInfo, WarnOnUnboundGlobalsRNam) == False) return;
// don't warn if we are compiling code if (SyCompilePlease) returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
// Need to pass an offset, because we have already parsed more tokens
SyntaxWarningWithOffset(&rs->s, "Unbound global varname,rs-.,();
}
/**************************************************************************** ** **l'java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 68 * *'aInofan itjava.lang.StringIndexOutOfBoundsException: Range [74, 72) out of bounds for length 77 **symbolsuptoonestaticvoidCheckUnboundGlobal(ReaderStaters,LHSRef) **following: ** *''if,list*occurred.keyforjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 77 java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15 **'*java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 73 *'u'avariable *; // ... and isn't an auto var ... **<Ident>:=a; * *<>:Ident> *|<[E>,]'' **|<Var>'{'<Expr>'}' **|<Var>'.'<Ident> **|<Var>'('[<Expr>{','<Expr>}][':'[<options>]]')'
*/ staticvoid ReadCallVarAss(ReaderState * rs, java.lang.StringIndexOutOfBoundsException: Range [0, 57) out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1 volatile s java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 volatileIntjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 return;
// if this was actually the beginning of a function literal, then we are-.java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 78 // in the wrong function if (rs->s.Symbol == S_MAPTO) { if (mode
ReadFuncExprAbbrevSingle else
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
// Check if the variable is a constant if(ef.= &(var &rvar // deal with references if (mode UInt /***************
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 29 // within the current outmost list or record expression.
IntrTrueExpr(&rs>ntr); return;
} else CurrentGlobalForLoopVariables]
(&rs- reads a variable. Injava.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 77 return
} elseif (java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 21
IntrIntObjExpr(&rs->intr*java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 0 return
}
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
* bedeclaredforwardjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 if( =i java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
(rs,ref)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
ne ormore selectors whilevoidPushGlobalForLoopVariable *rs
// so the prefix was a reference
level =EvalRefrs,ref,1;
ref=ReadSelectorrs, ->++
}
->CurrentGlobalForLoopDepthjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 Int needExpr =
)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
// if we need a statement elseif (mode} if reftype= R_FUNCCALL V> ([Expr{' ]:[java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 72
TRY_IF_NO_ERROR {
IntrFuncCallEnd voidMatch_(eaderState * ,
}
} else (.type = R_INVALID
Match_(rs, S_ASSIGN, "found an expression java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rs->CurrLHSGVar = (java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 1
}
ReadExpr(rs, followjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
";", skipto" ;
rs->java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// if we need an unbind
{ ifi
/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
sref;
}
// if we need an isbound else/* if ( mode == 'i' ) */ {
IsBoundRef
}
}
/**************************************************************************** ** (-,java.lang.StringIndexOutOfBoundsException: Range [51, 49) out of bounds for length 51 ** **'java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 9 *allup> * **if(ode!''
*/ staticvoid ReadIsBoundReaderState* ''java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{
Match_(rs, S_ISBOUNDjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
Match_(rs, S_LPAREN, "(", follow);
, |,i)
RPAREN " java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
}
/**************************************************************************** * ..java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 72 ** **'ReadPerm'readsapermutation.Incasejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0 *(type|refype=java.lang.StringIndexOutOfBoundsException: Range [68, 65) out of bounds for length 68 ** **NoteTRY_IF_NO_ERROR *java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [77, 39) out of bounds for length 39 * *<>:Expr>,<>(,Expr* **
*/ staticvoid ReadPerm(ReaderState * rs
{ volatile UInt nrc; // number of cycles
UInt = java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
=; while (s>.= S_COMMA}
Match_(rs, S_COMMA, ",", follow);
(rs,S_COMMA|follow, '';
nrx+;
}
Match_(,S_RPAREN,"" );
* R_ELM_RE .rnamjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
TRY_IF_NO_ERROR { IntrPermCycle(&rs->intr, nrxjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// read the remaining cycles while (rs->s.Symbol == S_LPAREN) *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
Match_(rs, S_LPAREN** R_FUNCCALL functioncall withoutoptions&with<narg>arguments
ReadExpr(rs, S_COMMA|S_RPAREN|follow, 'r')** R_FUNCCALL_OPTSfunction withoptions with < arguments
nrx = 1; while (rs->s.Symbol == S_COMMAenum REFTYPE {
Match_, , "", follow)
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 11
nrx++;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
R_ELM_COMOBJ_EXPR
nrc {
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 15
}
// that was the permutation
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
}
/**************************************************************************** ** *F/***********************} ** *''readsliteralexpressioncaseofanerrorit **skipsallsymbolsuptoonecontainedin<follow>. ** **<List>java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 44 **|'['
*/
ReadListExprReaderState*,TypSymbolSetfollow
{ volatile UInt pos; // actual position of element volatile UInt nr; // number of elements volatile R_ELM_LIST
// '['
Match_*untilthefirst has beenreadand is it could
rs->ReadTop++; ifelse
STATE(Tilde) = 0;
}
TRY_IF_NO_ERROR { IntrListExprBegin(&rs->intr, (rs-**alsobe aparenthesizedjava.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 29
pos = 1*<Perm>: Expr {<Expr}){(< ,<> )java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
nr = 0;
range = 0;
/ E java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 if (rs->s.Symbol !volatileUIntnrc // number of cycles
TRY_IF_NO_ERROR { IntrListExprBeginElm(&rs->intr, pos ); }
ReadExpr(rs, S_RBRACK|follow, 'r');
TRY_IF_NO_ERROR { IntrListExprEndElm(&rs->intr); }
nr++;
}
// {',' [ <Expr> ] } while (rs->s.Symbol ==
R_ELM_COMOBJ_NAME
pos+;
!= S_RBRACK) {
TRY_IF_NO_ERROR { IntrListExprBeginElm
ReadExprOMOBJ_EXPR
while (rs->sSymbol == S_LPAREN) {
nr++ casejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
// incorrect place for three dots if (rs->s.Symbol == while (rs->s.SymbolS_COMMA java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
SyntaxError(&rs->s, "Only two dots in a range");
}
// '..' <Expr> ']' if Match_r,S_RPAREN ),follow; if ( pos != nr ) {
SyntaxError +;
}
TR java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 65
SyntaxError(&rs->s, "Must have
}
range =1java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
Panic(Parse
pos++;
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 2
RACK
TRY_IF_NO_ERROR { IntrListExprEndElm(&rs->intr); }
nr++; if (rs->ReadTop == 1 && rs->ReadTilde == 1) {
SyntaxError&rs->, "orry '~'not in range")java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
}
}
// ']'
Match_(rs case R_LVAR:
F_NO_ERROR{
IntrListExprEnd(&rs->intr, nr, range, (rs->ReadTop == 1), (rs->ReadTilde == 1) );
} if (rs>ReadTop == 1) {
->ReadTilde=0java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
STATE( (&s-intr,ref.);
}
rs** '[ <xpr> ['break
}
/**************************************************************************** ** *ReadRecExpr(<follow>)....break; * *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *skipsallCK,") ** **<Record>:='rec([<Ident>:=<Expr>{,<Ident>:=<Expr>}]rs->ReadTilde
*/ static R_ELM_REC_NAME
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28 volatile UInt nr;
// [ <Ident> | '(' <Expr> ')' ':=' <Expr>// This should never be reached do{ if (nr | TRY_IF_NO_ERROR { IntrListExprEndElm(&rs->intr); }
Match_(rs, S_COMMA, ",", follow nr
} if ( rs->s.Symbol != S_RPAREN ) { if(>Symbol=S_INT java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
,S_INT integer follow;
TRY_IF_NO_ERROR { IntrRecExprBeginElmName(&rs->intr, rnam ); }
} elseif ( rs (rs>,java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 73
rnam = RNamName( rs&java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 44
Match_(rs, S_IDENT, "identifier", follow);
TRY_IF_NO_ERROR { IntrRecExprBeginElmName(&rs->intr, rnam ); }
} elseif ( rs->s.Symbol == S_LPAREN ) {
Match_(rs, S_LPAREN, "(", follow) :
ReadExpr(rs, follow, 'r');
Match_(rs, S_RPAREN, ")", follow);
TRY_IF_NO_ERROR { IntrRecExprBeginElmExpr(&rs->intr); }
} else {
SyntaxError(&rs-,"");
}
Match_(rs, S_ASSIGN, ":=", follow); IntrUnbList&-intr,ref.arg)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
ReadExpr
TRY_IF_NO_ERROR { IntrRecExprEndElm(&rs->intr); }
nr++;
}
} while (rs->s. IntrListExprEnd&rs->ntr nr,IntrUnbRecName&rs-intr,ref.)
// ')'
Match_(rs, S_RPAREN, ")", follow IntrUnbRecExpr&>ntr);
TRY_IF_NO_ERROR {
IntrRecExprEnd break
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if (rs->ReadTop == 1) {
rs->ReadTilde = 0;
STATE(Tilde) = 0;
}
rs->ReadTop--;
}
/**************************************************************************** ** **ArgListrepresentstheSyntaxError(&-s,"operandUnbind")java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
*/ typedefstruct { Int narg; TRY_IF_NO_ERROR
Obj nams; // list of local variables names BOOLisvarg #ifdef HPCGAP
Obj locks; // locks of the function (HPC-GAP) # / 'rec('
ArgList;
****************************java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 18
**
*F ReadFuncArgList(<follow,<isAtomic, <ymbol> symbolstr>
** . . . . . . . . . . read a function argument {(rs-, (>= 1 ;}
**
* / [ <Ident> | '(' <Expr> ')' ':=' <Expr>
** error it skips all symbols up to one contained do {
*
** Match_rs casejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
** {',' ('readwrite'|'readonly') <Ident> -s =S_INT
**
*isAtomic thisatomicfunction
** symbol end the uS_RPAREN for )
** symbolstr: symbol elseif( rs->.Symbol==S_IDENT ){
**
** This function assumes the opening parenthesis orMatch_(s, S_IDENT,"dentifier" follow;
* for readingtheclosingorbrace
*
ArgList (java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 28
TypSymbolSet follow, java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 65 BOOL java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 38
UInt symbol, constIntrIsbComObjNamer> rnam);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 Int narg; // number of arguments
Obj nams; COMMA) #ifdef HPCGAP
LockQual lockqual;
Bag locks = 0; // locks of the function #endif
IntrRecExprEnd(-intr, nr,(
#ifdef HPCGAP if (isAtomic)
locks = NEW_STRING(4); #STATE(ilde) ;
// make and push the new local variables list (args and locals)
narg= 0;
nams * if (rs->s.Symbol != symbol) { goto start*
}
while (rs .type= ; ifInt ; // number of arguments if r-sSymbol = S_LBRACK java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
Match_(rs, S_COMMA, ",", (#
start: #ifdef HPCGAP
lockqual = LOCK_QUAL_NONE; #ndif if ( if (!isAtomic) {
*F ReadFuncArgList(<followjava.lang.StringIndexOutOfBoundsException: Range [30, 9) out of bounds for length 9
} #ifdef HPCGAP else {
lockqual/java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
rs, ,"" )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
Match_(,S_RBRACE'readonly'Identjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
r "adwrite java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
} elseif ( else (s>.Symbol =S_BLBRACK java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(s | follow r;
only' argument of - function";
* ref.=; #fdef else {
lockqual = LOCK_QUAL_READONLY;
} #ndif
Match_(s,S_READONLY,"" follow)
rs -sSymbol,identifier,follow; if (rs->s.Symbol == S_IDENT && findValueInNams .*
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 63
narg +1;
lue; #ifdef HPCGAP if (isAtomic) {
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 9
CHARS_STRING(locks)[narg - 1] = lockqual;
} #ndif
VARS) {
SyntaxErrorif(s>.ymbol UIntsymboljava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
}
Match_
java.lang.StringIndexOutOfBoundsException: Range [38, 10) out of bounds for length 46
r-"java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 66
} if (rs->s.Symbol == S_DOTDOTDOT) {
isvarg = TRUE;
Match_(rs, S_DOTDOTDOT, "...", follow)
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
Match_(rs,symbol,symbolstr S_LOCAL|STATBEGIN|S_END|follow);
// Special case for function(arg) if (narg
isvarg = TRUE;
}
ArgList ref.type. =R_FUNCCALL
args.narg = narg;
args.nams = nams;
args.isvarg = isvarg; #ifdef HPCGAP
args.locks = locks; if (locksMatch_r,S_RPAREN ),java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0 #endif
gstatic ,java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 73
}
voidReaderState *,
,
, Int nloc,
startLine* . .. . .. a
{ volatile UInt nr; // number of statements
// push the new local variables list
PushPlist(rs->StackNams, args.nams);
// begin interpreting the function expression
TRY_IF_NO_ERROR
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
args.nams, startLine); #ifdef HPCGAP
IntrFuncExprSetLocks( (rs->.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 #
}
if (isAbbrev) { / read the expression and turn it into a return-statement
ReadExpr(rs, follow, 'r');
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
(-intrSET_LEN_STRING,;
}
nr = 1;
} else {
java.lang.StringIndexOutOfBoundsException: Range [31, 23) out of bounds for length 23
UInt oldLoopNesting = for (nest = 0; nest < countNfunction"java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
= 0java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
;
rs->LoopNesting nams (->,countNams nest;
}
// end interpreting the function expression
TRY_IF_NO_ERROR {
(rs>,nr GetInputLineNumberr-sinput)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
}
// pop the new local variables list
PopPlist(rs->StackNamsifnarg
}
/**************************************************************************** ** <java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
*/ static UInt ReadLocals(ReaderState * rs, TypSymbolSet follow, Obj nams)
{
UInt narg = LEN_PLIST(nams);
UInt = (argslocks;
Match_(rs, S_LOCAL, "local", nest0 args;
while (} if =()BOOLjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 if (findValueInNams(nams, (: fors dth java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
, "Nameused for two
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
SyntaxError(&rs-> PushPlist(- java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
nloc += 1;
PushPlist -. java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
// we do not callGVarName thisuntilafter
SyntaxError(&rs->s, "Too many function arguments and locals");
} .nams startLine;
}
IntrFuncExprSetLocks&-intr .ocks;
if (s>.=&type=
;
// init to avoid strange message in case of empty string
rs
Match_(rs IntrReturnObj(rs-intr)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
}
MatchSemicolon(rs, STATBEGIN | S_END | follow);
**'ReadFuncExpr'readsafunctionliteralexpression.Injava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0 *itskipsallsymbolsuptocontainedin<ollow> ** **<Function>:='function('<ArgList>')' **['local'<Ident>{','*Fjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 **java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 32
*/ staticvoid ReadFuncExpr(ReaderState * rs, TypSymbolSet follow, Char mode)
{ Int startLine(,rs>.,narg+1 nloc) java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 BOOL isAtomic = FALSE; // is this an atomic function?
nloc=0
ArgList args;
// begin the function
startLine = GetInputLineNumber(rs->s} if (rs + 1java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
Match_(rs, S_ATOMIC, "atomic and locals");
isAtomic = TRUE;
} elseif (mode == 'a') {
/ the by // before we realised we were reading an atomic function
isAtomic = TRUE GAPInfo,WarnOnUnboundGlobalsRNam &
}
Match_(rs, S_FUNCTION, "function", follow);
Match_(rs, java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
args = ReadFuncArgList(rs, follow, isAtomicbreak
if (rs->s.Symbol == S_LOCAL) {
nloc = ReadLocals Match_rs}
}
ReadFuncExprBody(s,*
// 'end'
Match_(rs, S_END, "while }
}
/**************************************************************************** * FReadFuncExprAbbrevMulti(follow)..multi-abbrev.func.expr. ** *'ReadFuncExprAbbrevMultiamulti-argumentabbreviatedfunction **literalexpression.Incaseofan*i:checkifrecordcomponentjava.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 72 **containedin<follow>. ** *{>''-'<java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
*/ staticvoid UInt =0// number of locals
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*
* V>' ,*'java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
// match away the '->'
Match_(rs, S_MAPTO, "->", follow isAtomic =TRUE
ReadFuncExprBody(rs, follow, TRUE, 0, // before we realised we were reading
}
/**************************************************************************** ** *FReadFuncExprAbbrevSingle(<staticReadCallVarAss(=java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 64 **return; **') **literaljava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0 ** *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **<Function>:(.=&ref.)&ref)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
*/ staticvoid IntrTrueExpr(&rsjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
{ else (al =Falsejava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 2
Obj nams = NEW_PLIST(T_PLIST, 1);
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
// match away the '->'
Match_rs S_MAPTO,">,follow)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
ReadFuncExprBody
}
/**************************************************************************** ** FReadLiteral(<ollow><FReadFuncExprAbbrevSingle(follow>)..func.expr. ** **'ReadLiteral'readsaliteralexpression.Incaseofanerroritskips **all** contained in<follow>. ** **<Literal>:=<Int> *> *java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 **|'false' *|~java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 **|<Char> **|<Perm> **|<String> **|<List> **|<Record> **|<Function> ** **<Int>:=0|1|..|9{0|1|..else(mode=ujava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 ** **<Char>:='<anycharacter>'
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **<String>:="{<anycharacter>/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
*/ staticvoid ReadLiteral(ReaderState * *
if (rs->s.Symbol == S_DOT) { // HACK: The only way a dot could turn up here is in a floating point // literal that starts with '.'. Call back to the scanner to deal // with this.
ScanForFloatAfterDotHACK(&rs->s* Literal> :<
}
switch (rs->s.Symbol) {
// <Int> case S_INT:
TRY_IF_NO_ERROR { IntrIntExpr(&rs->intr, rs->s.ValueObj, rs->s.Value); }*also ajava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 39
Match_,S_INT i" follow); break;
// '~' case S_TILDE: if (rs-staticvoid ReadLiteralMatch_rs ",java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
SyntaxError(&rs->s, " TRY_IF_NO_ERROR {IntrPermCycle(&rs->intr, nrx // HACK: The only way a dot could turn up here is in a floating point
}
rs->ReadTilde = 1;
TRY_IF_NO_ERROR { IntrTildeExpr(&rs->intr); }
(,S_TILDE "" follow)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 break;
// <Char> case S_CHAR:ReadExprrs S_RPAREN,')
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
Match_(rs, S_CHAR, "character", follow); break;
// <String>
r->.ValueObj=0; break
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
rs->s.*F ReadListExpr( <follow). ... . . .. ... .. ..java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 43 break;
// <List> case :
break;
// <Record> caseS_REC
ReadRecExpr(rs java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14 break;
// <Function>* ' ''<xpr]'. E '' case S_FUNCTION: case S_ATOMIC:
ReadFuncExpr(rs, follow, mode); break;
// signal an error, we want to see a literal default:
Match_(rs, if(rs-ReadTop = 1 java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
}
** *FReadAtom(java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18 * *'ReadAtom'readsanatom.Incaseofanerroritskipsallsymbolsupto **one ReadExprrsS_RBRACK|follow,''; ** **<Atom>:rs->java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 13 **|'IsBound''while(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 | **|'('<Expr>')'
*/ staticconstTRY_IF_NO_ERROR java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 32
S_INT|S_TRUE|S_FALSE|S_CHAR|S_STRING|S_LBRACK|
S_TILDE|S_REC|S_FUNCTION|
S_ATOMIC||S_DOT|S_MAPTO;
/java.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 39
{ // read a variable if (rs->s.Symbol == S_IDENT) {
ReadCallVarAss(rs, follow, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
}
' ' elseif (rs->s.Symbol == S_ISBOUND) {
ReadIsBound(rs, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
} // otherwise read a literal expression elseif (IS_IN( . . . . an
ReadLiteral(rs, follow, mode);
}
// '(' <Expr> ')'
*
Match_(rs, ** 'ReadAtom' reads an atom java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 75 if (rs->s.Symbol == S_RPAREN) {
Match_(rs, S_RPAREN, ")", follow);
TRY_IF_NO_ERROR { IntrPerm(&rs->intr, 0); } return;
}
ReadExpr,S_RPAREN,''; if (rs->s.Symbol == S_COMMA) {
ReadPerm(rs, follow); return;
}
Match_nr+;
}
/**************************************************************************** ** *FReadSign(<ReadIsBound(rsfollow);
*/
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 27
{ 0 if (else r-sSymbol= >java.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 18 "unary + return +1;
} if (rs->s.Symbol == S_MINUS) {
Match_(rs, S_MINUS, "unary -", follow); return -1;
} return0;
}
/**************************************************************************** ** *FReadFactor(<follow>,<mode>(),follow)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 **toonecontainedin<follow>. ** *F+
*/ staticvoid ReadFactor(ReaderState * rs, TypSymbolSet follow, Char mode)
{ volatileInt sign1; volatileInt sign2;
// { '+'|'-' } leading sign
= ReadSignrs followif(s =S_MINUS java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
// <Atom>
( =? rjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
/[^' implemented ' tomfor java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 while (rs->s. if(rs>. ==S_IDENT ){
// match the '^' away
Match_(rs, S_POW, "^* Match_(, dentifier"follow
// { '+'|'-' } leading sign
// ['^' <Atom>]
ReadAtom(rs, follow, 'r');
/ if ( sign2java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 52
}
// interpret the powerrs|,r)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
TRY_IF_NO_ERROR { IntrPow(&rs->java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 13
// check for multiple '^' (>Symbol=) if ( while (rs-.ymbol= ) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
SyntaxError TRY_IF_NO_ERROR {
}
the minus if = 1){ if ( sign1 == -1 fol,')
TRY_IF_NO_ERROR { IntrAInv(&rs->intr); }
}
}
/**************************************************************************** ** *FReadTerm(<followTRY_IF_NO_ERRORIntrPow&-intr);java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 * **narg// number of arguments **onecontainedin<follow>. ** **<TermObj;/locksof(-)
*/ staticvoid ReadTerm***************/**************************************************************************** { volatileUIntsymbol;
// <Factor> rs,mode*
// { '*'|'/'|'mod' <Factor> } // do not use 'IS_IN', since 'IS_IN(S_POW,S_MULT|S_DIV|S_MOD)' is true while(rs->s.Symbol==S_MULT|| * symbol=rs->s.Symbol; Match_(rs,rs->s.Symbol,// { '*'|'/'|'mod' <Factor> } ReadFactor(rs,follow,'r'); TRY_IF_NO_ERROR{ if(symbol==S_MULT){IntrProd(&rs->intr);} elsejava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 65 elseif(TRY_IF_NO_ERROR{
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 }responsibletheorbracejava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 }
/**************************************************************************** ** *FReadAri(<follow>,<mode>)........readanarithmeticexpression* ** **' Bag locks=0;// locks of the function **allsymbolsuptoonecontainedin<follow>. ** **<Arith>:=<Term>{'+'|'-'<Term>}(s,mode)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
*/
void(*,TypSymbolSet,Char)
{
;
ReadTermjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// { '+'|'-' <Term> }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
symbol = rs->s.Symbol;
Match_(rs,* ReadRel
ReadTerm(rs, follow, 'r');
TRY_IF_NO_ERROR {
S_PLUS ) IntrSum*all upone contained in follow. else (symbol =S_MINUS ) {#ndif
}
}
}
/**************************************************************************** ** *FReadRel(<follow>,<mode java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 16 **'ReadRel'readsarelationalexpression.Incase} *alluptoonecontainedin<follow>java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 ** **<Rel>:={'not'}<Arith>{'=|<>|<|>|<=|>=|in'<Arith>}
*/ staticvoid ReadRel(ReaderState * rs, TypSymbolSet follow, Char mode == (- Name"
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 volatile UInt symbol; volatile UInt isNot;
// { 'not' }
isNot = 0; while (rs->s.Symbol == S_NOT) {
isNot++;
java.lang.StringIndexOutOfBoundsException: Range [24, 16) out of bounds for length 24
}
// <Arith>
ReadAri(
/**************************************************************************** ifisvarg *F ReadAnd( <follow>, <mo . .a a'
symbol = rs->s.Symbol;
Match_*symbolsupto in<>
*
{ if ( symbol == S_EQ / Special case for function(arg)
symbol = S_NE { IntrNe(rs>intr) } else symbol
} elseif ( symbol == S_GT ) { IntrGt(&rs->intr); } elseif ( symbol == S_LE ) { IntrLe(&rs->intr); } elseif ( symbol == S_IN ) { IntrIn(&rs->intr); }
}
}
// interpret the not if ( (isNot % 2) !
TRY_IF_NO_ERROR { IntrNot(&rs->intr); }
}
}
/****************************************************************************mayjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 77 * *FReadAnd(<follow>,<mode>).......readajava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **'ReadAnd'readsanandexpression.Incaseofanerroritskipsall **symbolsuptoonecontainedin<follow>. ** **<And>:=<Rel>{'and'ifdef
*/ staticvoid ReadAnd(ReaderState * rs, TypSymbolSet follow, Char mode)
{ // <Rel>
ReadRelrs, ;
// { 'and' <Rel> } while (rs->s.Symbol == S_AND) {
Match_(rs, S_AND, "and", follow);
TRY_IF_NO_ERROR { IntrAndL(&rs-> elseifrssjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 42
ReadRel(rs, follow, 'r');
TRY_IF_NO_ERROR { IntrAndjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
**
*F ReadQualifiedExpr( <follow>, <mode> *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
** may be qualified {
**
** 'ReadQualifiedExpr' reads a qualified UIntnloc= 0
* all upjava.lang.StringIndexOutOfBoundsException: Range [27, 1) out of bounds for length 41
**
** <QualifiedExpr> := ['readonly' | 'readwrite' ] <Expr>
**
** These functions only do something meaningful inside HPC-GAP; in plain GAP
** they are simply placeholders.
*/if*
void
ReadQualifiedExpr +1
{ #ifdef HPCGAP if(EN_PLIST >= MAX_FUNC_LVARS
S(s manyjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 78
=0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
if (rs->s.Symbol == S_READWRITE) {
Match_(rs, if (rs->s.Symbol ! #ifdef HPCGAP
qual = LOCK_QUAL_READWRITE; #endif
} elseif (rs->s.Symbol == S_READONLY) {
Match_(rs, S_READONLY, "readonly", follow | EXPRBEGIN } #ifdef HPCGAP
qual = LOCK_QUAL_READONLY; #endif
}
TRY_IF_NO_ERROR { IntrQualifiedExprBegin(&rs->intr, qual); }
ReadExpr(rs, follow, java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 2
TRY_IF_NO_ERROR { IntrQualifiedExprEnd(&rs->/
}
/**************************************************************************** ** *FReadExpr(<follow>,<mode>)............readanexpression ** expression.Incaseerroritallsymbols **uptoonecontainedin<follow>. ** **<Expr>:=<And>{'or'=;/ ** **The<mode>iseither'r'indicatingthattheexpressionshouldbe **evaluatedasusual,'x'indicatingthatitmaybetheleft-hand-sideof **anassignmentor'a'indicatingthatitisafunctionexpression tomicandtheshouldbemade **atomic. ** **Thislastcaseexistsbecausewhenreading"atomicfunction"instatement hasjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 76 **atomicfunctionliteral,notanjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ** **
*/ static
{ // <And>
ReadAnd(/****************************************************************************
/**************************************************************************** ** *FReadUnbind(<follow>)......java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ** **'ReadUnbind'readsanunbindstatement.Incaseofanerroritskipsall containedin< ** **<Statement>:='Unbind'*Statement='''<xpr,Expr>{''<';
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 61 rsS_INFO,Info,follow); Match_(rs,S_UNBIND,"Unbind",follow); /java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 49 ReadCallVarAss(rs,S_RPAREN|follow,'u'); Match_(rs,S_RPAREN,")",follow); }
/**************************************************************************** ** *FReadEmpty(<follow>)... *
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ** **<Statement>:=';'
*/ static ReadEmptyReaderState )......... . . . readjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
{
IntrEmpty(&rs->intr);
}
/**************************************************************************** * *FReadInfo(<follow>)...............readaninfostatement ** *Ranstatement.caseofanerrorMatch_(s,S_ASSERT,Assert",follow)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 * toonein<> ** **<Statement>:='Info''('<Expr>',if(rs-s.=S_COMMA)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
*/ staticvoid ReadInfo(ReaderState * rs, TypSymbolSet { (&java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 36
{ volatile UInt narg; // number of arguments to print (or not)
/**************************************************************************** ** FReadAssert(<follow>).............readanassertstatement ** **'ReadAssert'readsanassertstatement.Incaseofanerroritskipsall **symbolsuptoonecontainedin<;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **<Statement>:='Assert(,S_TRUE,"",follow)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
*/ staticvoid ReadAssert(ReaderState * rs, TypSymbolSet follow)
{
TRY_IF_NO_ERROR { IntrAssertBegin(&rs->intr); }
Match_(rs, S_ASSERT, "Assert", follow);
rs S_LPAREN (,follow)
ReadExpr(rs, S_RPAREN | S_COMMA | follow, 'r');
TRY_IF_NO_ERROR{IntrAssertAfterLevel&>) java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
Match_(rs, S_COMMA, ",", S_RPAREN|follow);
ReadExpr(rs, S_RPAREN | S_COMMA |Match_rs,S_THEN,,"then" STATBEGIN|S_ELIF|S_ELSE|follow);
java.lang.StringIndexOutOfBoundsException: Range [30, 19) out of bounds for length 60 if (rs->s.Symbol == S_COMMA) {
Match_(java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
ReadExpr(rs, S_RPAREN | follow, 'r');
Match_(rs, S_RPAREN, ")", follow);
TRY_IF_NO_ERROR { IntrAssertEnd3Args(&rs->intr); }
} else {
Match_(rs, S_RPAREN, ")", follow);
TRY_IF_NO_ERROR { IntrAssertEnd2Args(&rs->intr); }
}
}
/**************************************************************************** ** *F(s,S_CHAR,"character",follow); ** **'ReadIf'readsanif-statement.Incase/<String> **uptoonecontainedin<follow>. ** **<Statement>:='if'<Expr>'then'<Statements> **{'elif'<Expr>'then'<Statements>} **['else'<Statements> **'fi'';'
*/ staticvoid ReadIf(ReaderState * rs, TypSymbolSet follow)
{ volatile UInt nrb; // number of branches volatile UInt nrs; // number of statements in a body
// 'if' <Expr> 'then' <Statements>:
nrb = 0;
TRY_IF_NO_ERROR { IntrIfBegin(&rs->intr); }
Match_(rs, S_IF, "if", follow);
ReadExpr(rs, S_THEN|S_ELIF|S_ELSE|S_FI|follow, 'r');
Match_(rs, case
TRY_IF_NO_ERRORcase S_ATOMICjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
nrs = ReadStats(rs, S_ELIF|S_ELSE|S_FI|follow);
TRY_IF_NO_ERROR { nrb += IntrIfEndBody(&rs->intr, nrs ); }
// { 'elif' <Expr> 'then' <Statements> }
>. java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 36
TRY_IF_NO_ERROR { IntrIfElif(&rs->intr); }
Match_(rs, S_ELIF, "elif", follow ReadFor :
ReadExprrs,S_THEN||S_ELSE|;
Match_(rs, java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 2
TRY_IF_NO_ERROR { IntrIfBeginBody(&rs->intr); }
nrs = ReadStats(rs, S_ELIF|S_ELSE|S_FI|follow);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}
/ static ReaderStaters java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58 if (rs->s.Symbol == S_ELSE) {
TRY_IF_NO_ERROR { IntrIfElse(&rs->intr); }
Match_(rs,
TRY_IF_NO_ERROR { IntrIfBeginBody(&rs->intr); }
nrs = ReadStats(rs, S_FI|follow);
TRY_IF_NO_ERROR { nrb += IntrIfEndBody(&rs->intr, nrs ); }
}
// 'fi'
Match_(rs, S_FI, "while parsing an 'if' statement: statement or 'fi'", follow);
TRY_IF_NO_ERROR { IntrIfEnd(&rs->intr, nrb ); }
}
/**************************************************************************** ** *FReadWhile(<follow>)..............reada ** **'ReadWhile'readsawhile-loop.****************** **uptoone*toonein<. ** **<Statement*<={+|-}<^''|'java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 **<Statements> **'od'';'
*/ staticvoid ReadWhile(ReaderState * rs, TypSymbolSet follow)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 volatile UInt nrs; // number of statements in body
// 'while' <Expr> 'do'
TRY_IF_NO_ERROR UIntnrs;// number of statements in body
Match_(rs, S_WHILE, "while", follow);
ReadExpr(rs, S_DO|S_OD|follow, 'r');
Match_(rs, S_DO, "do", STATBEGIN|S_DO|follow);
// interpret the unary minus
(sign2 = - java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
IntrWhileEnd(&rs->intr, TRY_IF_NO_ERROR { IntrAInv(&s>intr) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}
}
/**************************************************************************** * *FMatch_(rs,S_COMMA,""|S_OD) ** **'ReadAtomic'readsanatomicblock.Incaseofanerror** 'ReadAtomic' reads an atomic block. In case of an error it **symbolsuptoonecontainedin<follow>. ** **<Statement>:='atomic'<QualifiedExpr>{','<QualifiedExpr}'do' **<Statements> **'od'';' ** **ThesefunctionsonlydosomethingmeaningfulinsideHPC-GAP;inplainGAP, **theyaresimplyplaceholders.
*/ staticvoid ReadAtomic(ReaderState * rs, TypSymbolSet follow)
{ volatile UInt nrs volatile UInt nexprs; // number of statements in body #ifdef HPCGAP volatileint lockSP; // lock stack
lockSP = RegionLockSP(); #endif
Match_(rs, S_ATOMIC, "atomic", follow); // Might just be an atomic function literal as an expression if (rs->s.Symbol == S_FUNCTION) (rs,
ReadFuncExpr(rs, follow, 'a'); return;
}
/
TRY_IF_NO_ERROR >symbol * ReadRepeatreadsrepeatoop of errorit
// <Statements>
TRY_IF_NO_ERROR { IntrAtomicBeginBody(&rs->intr, nexprs); }
nrs = ReadStats(rs,'' java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 77
TRY_IF_NO_ERROR { IntrAtomicEndBody(&rs->intr, nrs ); }
// 'od'
Match_(rs, S_OD, "while parsing an atomic block: statement or 'od'", follow);
TRY_IF_NO_ERROR {
IntrAtomicEnd(&rs->intr, rs->StackNams);
} #fdef HPCGAP /* This is a no-op if IntrAtomicEnd(&rs->intr) succeeded, otherwise it restores
* locks to where they were before. */
PopRegionLocks(lockSP); #endif
}
/**************************************************************************** ** *FReadRepeat(<follow>).............readarepeatstatement ** **'ReadRepeat'readsarepeat-loop.Incase **symbolsuptoonecontainedin<follow>. ** **<Statement>:='repeat' **<Statements> **'until'<Expr>';'
*/ staticvoid ReadRepeat(ReaderState * rs, TypSymbolSet follow)
{ volatile UInt nrs; // number of statements in body
static*
{
TRY_IF_NO_ERROR { IntrPragma(&rs->* void( {IntrPragma&-intrrs-alueObj java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
}
/**************************************************************************** ** FReadQuit(<follow>)...............readaquitstatement ** **'ReadQuit'java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 2 **symbolsuptoonecontainedin<follow>. ** **<Statement>:='quit'';'
*/ staticvoid ReadQuit(ReaderState * rs, TypSymbolSet follow)
{ // skip the quit symbol
Match_( void ReadInfo *,java.lang.StringIndexOutOfBoundsException: Range [58, 51) out of bounds for length 59
// interpret the quit
TRY_IF_NO_ERROR { IntrQuit(&rs->intr); }
}
/**************************************************************************** ** ReadQUIT(<llow.........readQUITstatement ** *ReadQUITQUIT.Incaseof errorit **symbolsuptoonecontainedin<follow>. ** **<Statement>:='QUIT'';'
*/ static*
{ // skip the quit symbol
Match_(rs, S_QQUIT, "
// interpret the quit
TRY_IF_NO_ERROR { IntrQUIT(&rs->intr); }
}
/****************************************************************************ReaderState,) ** (follow>....... a ** **'ReadStats'readsastatementsequence.Incaseofanerroritskipsall **symbolsuptoonecontainedin<follow>. ** **<Statements>:={<Statement>}
**<Statement>:=<Var>':='<Expr>';' *|<>''[<Expr>{''Expr}]'''' **|'Unbind'**Statement>:=<ar>'='<Expr>'' **|'if'<Expr>'then'<Statements> **{'elif'<Expr>'then'<Statements>} **['else'<Statements>]'fi'';' **|'for'<Var>'in'<Expr>'do'<Statements>'od'';' **|'while'<Expr>'do'<Statements>'od'';' **|'repeat'<Statements>'until'<Expr>';' *|break''' **|'continue'';' **|'return'[<Expr>]';' **|'atomic'<QualifiedExpr>{','<QualifiedExpr>}'do'<Statements>'od'';' **|';'
*/ static (follow) breakjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
{
rssSymbol{ case S_IDENT: ReadCallVarAsscase :ReadRepeat(, follow) breakjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 case S_UNBIND: ReadUnbind(rs, follow ); breakcase S_CONTINUE ReadContinue(s, ;break; case S_INFO: ReadInfo(s,follow break; case S_TRYNEXT: ReadTryNext(, follow ;break;
follow ); break; case S_FOR: ReadFor(rs, case S_SEMICOLON: ReadEmpty(rs, followjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 case S_WHILE: ReadWhile(rs, follow ); break; case S_REPEAT: ReadRepeat(rs, follow ); break; case S_BREAK: ReadBreak(rs, follow ); break; case S_CONTINUE: ReadContinue(rs, follow ); break; case S_RETURN:ReadReturnfollow ) break; case S_TRYNEXT: default0; case S_ATOMIC: ReadAtomic(rs, follow ); break;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 case S_PRAGMA: static void ReadAssert(ReaderSta* (*, java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 case S_QUIT: SyntaxError( {(rs-);} case S_QQUIT: SyntaxError(&rs->s, "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case S_HELP: SyntaxError(&rs->s, "'?' cannot be used in this java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 58
} return1;
}
static UInt ReadStats(ReaderState * rs, TypSymbolSet follow)
{
UInt nr = 0; // number of statements
// read the statements while (IS_IN(rs->s.Symbol, STATBEGIN | S_SEMICOLON)) { if (!TryReadStatement(rs, follow)) {
SyntaxError(&rs->s, "statement expected");
}
nr++; if (rs->s.Symbol == S_PRAGMA)
Match_(rs, S_PRAGMA, "", 0); else
MatchSemicolon(rs, follow);
}
staticvoid RecreateStackNams}
{
Obj stackNams = rs->StackNams;
Obj lvars = contextvolatile ; // number of statements in a body while (lvars && !IsBottomLVars(lvars)) {
Obj nams = NAMS_FUNC(FUNC_LVARS(lvars)); if (nams != (Obj) 0) {
PushPlist(stackNams, nams);
}
lvars = ENVI_FUNC(FUNC_LVARS(lvars));
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// At this point we have the stack upside down, so invert it const UInt countNams = LEN_PLIST(stackNams); for (UInt i = 1; i <= countNams/2; i++) { const UInt j = countNams + 1 -i;
Obj tmpA = ELM_PLIST TRY_IF_NO_ERROR*ReadEvalCommand( ... . . . .....
Obj tmpB = ELM_PLIST(stackNams, (, S_ELIF "" ;
SET_ELM_PLIST(stackNams, i, tmpB);
SET_ELM_PLIST(stackNams, j, tmpA);
}
}
/**************************************************************************** * java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 ** **'ReadEvalCommand'readsonecommandandinterpretsitimmediately. ** *Itdoesnotthefirstofinputalreadyreadwon' **readthefirstsymbolofthenextinput. *//fi *dualSemicolona-ero,theit * set 1} **itissetto0.If'dualSemicolon'iszerojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
ExecStatus ReadEvalCommand(Obj context,
TypInputFilevolatile ** 'ReadFor' reads a for-loop errorskipssymbolsup
Obj * evalResult, BOOL * dualSemicolon)
{
ExecStatusjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 volatile Obj tilde; volatile Obj errorLVars;
jmp_buf readJmpError; #ifdef HPCGAP int lockSP; #endif
// get the first symbol from the input
Match_(rs, rs->s.Symbol, (rs->sNrError java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
// if scanning the first symbol produced a syntax error, abort if (rs->s.NrError) {
FlushRestOfInputLine(input); return STATUS_ERROR;
}
/ we have hit<java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 5 if (rs->s.Symbol LoopVariablers,refvarjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 return STATUS_EOF;
}
// print only a partial prompt from now on
SetPrompt("> ");
// remember the old reader context
tildeMatch_ ) ;
ErrorLVarsjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
memcpy( readJmpError, STATE(ReadJmpError), sizeof(java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 5
// initialize everything and begin an interpreter
rs->StackNams = NEW_PLIST( T_PLIST, 16 );
STATE(Tilde) = 0; #ifdef HPCGAP
lockSP = RegionLockSP(); #endif
// remember the old execution state and start an execution environment
Bag oldLVars =
context ? SWITCH_TO_OLD_LVARS(context) : SWITCH_TO_BOTTOM_LVARS();
switch (rs->s.Symbol) { // read an expression or an assignment or a procedure call case S_IDENT: ReadExpr(rs, S_SEMICOLON|S_EOF, 'x' ,S_SEMICOLON) ;
// otherwise read a statement -- first handle some which are different on // the top level than inside a function, if/else or loop case S_QUIT: ReadQuit(rs, S_SEMICOLON|S_EOF ); break; case S_QQUIT: java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 23
// trytoreada
ReadHelp(rs, S_SEMICOLON | S_EOF);
rs->s.Symbol = S_SEMICOLON; // fake a trailing semicolon break; case S_PRAGMA:
ReadPragma(rs, S_SEMICOLON | S_EOF);
rs->s.Symbol = S_SEMICOLON; // fake a trailing semicolon// 'od'
// otherwise try to read a generic statement default: if (!TryReadStatement SyntaxError(&rs>s " expected"); // not a statement, but perhaps it is an expression
ReadExpr(rs, S_SEMICOLON | S_EOF, 'r');
}
}
/every statementmust be terminated by semicolon if (!IS_IN(rs->s.Symbol, S_SEMICOLON)) {
SyntaxError(&*
}
// check for dual semicolon if (dualSemicolon)
*=(s>.Symbol= );
// end the interpreter
status = IntrEnd(&rs->intr, rs->s.NrError > 0, evalResult);
// restore the execution environment
SWITCH_TO_OLD_LVARSHashUnlock((CurrentHashLock;
#ifdef HPCGAP if (rs->s.NrError > 0) {
PopRegionLocks(lockSP);
HashUnlock(TLS(CurrentHashLock));
} #endif
GAP_ASSERT(java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 0
// switch back to the old reader context
memcpy( STATE(ReadJmpError), readJmpError, sizeof(java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 18
STATE(Tilde) = tilde /java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
STATE(/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
ClearError();
// return whether a return-statement or a quit-statement were executed return status;
}
/**************************************************************************** ** *FReadEvalFile().................**doesexpectthesymbolitsreadand ** **'ReadEvalFile'readsanentirefileandreturns(in'evalResult} **entirefileasthunk,i.e.,asfunctionofnoargument. ** **Itdoesnotexpectthefirstsymbolofitsinputalreadyreadandreads **toaderState;
*/
ExecStatus ReadEvalFile(TypInputFile * input, Obj * evalResult)
{ volatile ExecStatus status; volatile Obj tilde;
jmp_buf readJmpError; volatile UInt nr; volatile Obj nams; volatileInt/ get the first symbol from the input #ifdef HPCGAP volatileint lockSP; #endif
// get the first symbol from the input
Match_(rs, rs->s.Symbol, "", 0);
// print only a partial prompt from now on
SetPrompt("> ");
// remember the old reader context
tilde = STATE(Tilde); #ifdef HPCGAP
lockSP = RegionLockSP(); #endif
memcpy( readJmpError, STATE(ReadJmpError), sizeof(jmp_buf) );
// initialize everything and begin an interpreter
rs->StackNams PushPlist(->, nams;
STATE(Tilde) = 0;
// remember the old execution state and start an execution environment
Bag oldLVars = SWITCH_TO_BOTTOM_LVARS();
IntrBegin(&rs->intr);
rs->intr.java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 20
// check for local variables
nams = NEW_PLIST(T_PLIST, 0);
PushPlist(rs->StackNams, nams);
nloc = 0; if (rs-s. ==S_LOCAL){
nloc = ReadLocals(rs, 0, nams);
}
/ ' )java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
IntrFuncExprBegin(&rs->intr, 0, nloc, nams,
GetInputLineNumber(input));
ments
GAP_ASSERT(rs->java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
nr = ReadStats(rs, S_SEMICOLON | S_EOF);
GAP_ASSERT(rs->LoopNesting == 0);
// we now want to be at <end-of-file> if (rs->s.Symbol != S_EOF) {
FlushRestOfInputLine(input);
SyntaxError(&rs->s, "<end-of-file> expected");
// fake the 'end;'
TRY_IF_NO_ERROR {
IntrFuncExprEnd(&rs->intr, nr, GetInputLineNumber(java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 44
}
// end the interpreter
status = IntrEnd(&rs->intr, rs->s.NrError*
// restore the execution environment
SWITCH_TO_OLD_LVARS(oldLVars);
// switch back to the old reader context
memcpy( STATE(ReadJmpError), readJmpError, sizeof(jmp_buf) ); #ifdef HPCGAP
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0 if (TLS(CurrentHashLock))
HashUnlock(TLS(CurrentHashLock)); #endif
STATE(Tilde) = tilde;
ClearError();
// return whether a return-statement or a quit-statement were executed return status;
}
/**************************************************************************** ** *FCall0ArgsInNewReader(Objf)............callaGAPfunction ** **Thecurrentreadercontextissavedandanewoneisstarted.
*/
Obj Call0ArgsInNewReader(Obj f)
{ // remember the old state volatile UInt java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 volatile Obj oldLvars; volatile Obj result = 0;
// switch back to the old state
SWITCH_TO_OLD_LVARS(oldLvars);
STATE(UserHasQuit) = userHasQuit; return result;
}
/**************************************************************************** ** *F** It is stilllegal use ** **Thecurrentreadercontextissavedandanewoneisstarted.
*/
Obj Call1ArgsInNewReader(Obj f, Obj a)
{ // remember the old state
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 volatile Obj oldLvars; volatile Obj result = 0;
// switch back to the old state
SWITCH_TO_OLD_LVARS(oldLvars);
STATE(UserHasQuit) = userHasQuit; returnresult;
}
/**************************************************************************** ** *F*************initializemodule*****java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
staticStructInitInfomodule={ // init struct using C99 designated initializers; for a full list of // fields, please refer to the definition of StructInitInfo .type=MODULE_BUILTIN, ." .initKernel=InitKernel,
.initModuleState=static Int TryReadStatement(ReaderState*, };
*InitInfoReadjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 { return&module; }
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.102Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.