**
** This file is part of GAP, a system for computational discrete algebra.
**
** Copyright of GAP belongs to its developers, whose names are too numerous
** to list here. Please refer to the COPYRIGHT file for details.
**
** SPDX-License-Identifier: GPL-2.0-or-later
*
** This module contains the functions
*/
/**************************************************************************** ** *STRY_IF_NO_ERROR ** **Todealwitherrorsfoundby**Tousethisconstruct,writecodelike: **handlingusingsetjmp,withthehelpofthismacro.Seealso **GAP_TRYandGAP_CATCHintrycatch.hfortwocloselyrelatedmacros. ** **Tousethisconstruct,writecodelikethis: *java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 **...codewhichmighttriggerreadererror... **} *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 iftheofjava.lang.StringIndexOutOfBoundsException: Range [75, 76) out of bounds for length 75 **expressionorstatementleadstoanerror,'GAP_THROW'isinvoked, **whichinturncalls'longjmp'toreturntorightaftertheblock **followingTRY_IF_NO_ERROR. ** **Asecond* >s.'non-zeroi.ifanyerrors **occurred.Thisiskeyforenablinggracefulerrorrecoveryinthereader, **andforthisreasonitiscrucialthatallcallsfromthereaderinto **theinterpreterarewrappedinto'TRY_IF_NO_ERROR'blocks. ** **TheaboveisthefirstmajorthisdoneatinRjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 **relatedGAP_TRYmacro.ThesecondisthatunlikeGAP_TRY/GAP_CATCH, thejumpbuffer. **Ratherthisisonlydoneatthetoplevelin'ReadEvalCommand',for **performancereasons(savingandrestoringajumpbufferisexpensive) ** **Asaresult,itisnotsafetonestTRY_IF_NO_ERRORconstructswithout **extraprecautions.Soingeneralit*againTRY_IF_NO_ERRORfrominsideTRY_IF_NO_ERRORblock. **whichagainusesTRY_IF_NO_ERRORfrominsideaTRY_IF_NO_ERRORblock. *Thisautomaticallyensuredifoneinterpreterfunctions, **astheinterpreterdoesnotuseTRY_IF_NO_ERROR.
*/
// 'StackNams' is a stack of local variables names lists. A new names
d ontothis stack when readerbegins to read a new
ScannerState sjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 // the function expression (after reading the 'end').
Obj StackNams;
// '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 // reader is currently reading a nested list or record expression.
UIntReadTop;
// 'ReadTilde' is 1 if the reader has read a reference to a '~' symbol; // within the current outmost list or record expression.
UInt ReadTildejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// 'CurrLHSGVar' is the current left hand side of an assignment. It is // used to prevent undefined global variable warnings, when reading a // recursive function.
UInt CurrLHSGVar /reader currently a nestedlistor expression
java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 // 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.
UInt LoopNesting;
};
typedefstruct /used to undefined globalvariablewarnings,when a
/**************************************************************************** **
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 )'Expr>and'f<>fi;' **is<Statements>.Thefunctions'ReadExpr'and'ReadStats'musttherefore **bedeclaredforward.
*/ static java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
ReadStatsReaderState *,TypSymbolSet followjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
staticvoid
staticjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
staticvoid PushGlobalForLoopVariableReaderState*rs var
{ if (rs->CurrentGlobalForLoopDepth <
* ., '>(<Expr>) is < 'if <xpr then<Statements fi'
rs->CurrentGlobalForLoopVariables[rs->CurrentGlobalForLoopDepth] = var;
rs->CurrentGlobalForLoopDepth++;
}
static UInt GlobalComesFromEnclosingForLoop(ReaderState * rs, UInt var)
{ for (UInt i = 0; i < rs->CurrentGlobalForLoopDepth; i++) { if (i == ARRAY_SIZE(rs->CurrentGlobalForLoopVariables)) return0; if (rs->CurrentGlobalForLoopVariablesstatic ReadStatsReaderState , TypSymbolSetfollow; return1java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
} 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. staticvoid Match_({
UInt symbol, constChar*msg,
TypSymbolSet skipto)
{ if (rs->intr.startLine == 0 && symbol != S_ILLEGAL) {
rs>ntr.startLine = -s.[0]java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
}
Match(&rs->s, symbol, msg, skiptojava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
// match either a semicolon or a dual semicolon void (ReaderState*rs,TypSymbolSet skipto)
{
Match_(, -sSymbol = S_DUALSEMICOLON? S_DUALSEMICOLON : S_SEMICOLON, ";", skipto);
}
// 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(Obj
{
L) )java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 for (return; if ( rsCi =var) return i;
}
} // not found 0
}
/* This function reads the options part at the end of a function call Thesyntaxis
<options>:=<option>[,<options>] <option>:I>|(Expr>''[''<>java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
emptyoptionslistsarehandledjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 9
*/ static*
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(-.= java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
rnam = RNamName(rs->s.Value)
Match_rsjava.lang.StringIndexOutOfBoundsException: Range [56, 26) out of bounds for length 56
TRY_IF_NO_ERROR { IntrFuncCallOptionsBeginElmName(&rs->intr, rnam); }
} elsevoid R , java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
Match_rs (, |)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 34
| follow
TRY_IF_NO_ERROR}
} else {
SyntaxError(&rs->s, S_LPAREN java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
} ifr-sSymbol= java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
, "=,|)
ReadExpr(rs, S_COMMA) java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 52
&-i;}
} else {
TRY_IF_NO_ERROR { IntrFuncCallOptionsEndElmEmpty}
}
}
staticvoid ReadFuncCallOptions(ReaderState s =){
{ volatile UInt nr;
(rs>) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
ReadFuncCallOption(java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 5
nr 1java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 while (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
Match_r,S_COMMA ," ;
ReadFuncCallOption(rs, follow);
nr++;
}
{
IntrFuncCallOptionsEnd{&s>;}
}
}
static Obj
static UInt WarnOnUnboundGlobalsRNam;
/**************************************************************************** ** *+; ** **java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5 **R_HVAR:} **:varidvar>nesting<> *globalwithid<java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 **R_ELM_LIST:listaccessl[idx]* **R_ELMS_LIST:listaccessl{indices},uses<level> **R_ELM_POSOBJ:posobjaccess*R_DVARjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 73 **R_ELM_REC_NAME:recordaccessr.<rnam> **R_ELM_REC_EXPRrecordaccessr.(expr) **R_ELM_COMOBJ_NAME:comobjaccessobj.<rnam> **R_ELM_COMOBJ_EXPR:comobjaccessobj.(expr) **R_FUNCCALLfunctioncallwithoutoptions&with<narg>arguments **R_FUNCCALL_OPTSfunctioncallwithoptionsandwith<narg>arguments
*/ enum REFTYPE {
R_INVALID,
R_LVAR,
R_HVAR,
R_DVAR,
R_GVAR,
R_ELM_LIST,
R_ELMS_LIST,
R_ELM_POSOBJ,
R_ELM_REC_NAME,
R_ELM_REC_EXPR,
R_ELM_COMOBJ_NAME,
R_ELM_COMOBJ_EXPR,
** R_FUNCCALLfunction callwithout <arg arguments
R_FUNCCALL_OPTS,
};
typedefstruct {
UInt1 type;
java.lang.StringIndexOutOfBoundsException: Range [18, 9) out of bounds for length 19 union {
UInt2 nest0
UInt2 level;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 6 union {
UInt4 ;
UInt4 narg;
UInt4 rnam;
};
} LHSRef;
GAP_STATIC_ASSERT(R_ELM_LIST,
/**************************************************************************** *,
*/ static UInt EvalRef(ReaderState * rs, const,
{
R_ELM_COMOBJ_NA,
{ switch FUNCCALL case:
IntrRefLVar(&rs->intr, ref.var); break; case R_HVAR:
IntrRefHVar(&rs->intr, ref.var); break; case R_DVAR:
IntrRefDVar(&rs->intr,UInt2 ; break;
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 11
(rs-,ref.; break; case R_ELM_LIST:
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
IntrElmList(rs->intr, ref.) else
IntrElmListLevel(&rs->intr, ref.narg, refjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return ref** case R_ELMS_LIST: if(ref.level == 0)
IntrElmsList(&rs->intr); else
IntrElmsListLevel(&rs->intr, ref.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 1 return ref.level{ case R_ELM_POSOBJ:
IntrElmPosObj(&rs->intr); break; case R_ELM_REC_NAME:
(rs->intr, ref.); break; case R_ELM_REC_EXPR:
IntrElmRecExpr(&rs->intr); break; case R_ELM_COMOBJ_NAME IntrRefHVar&rs-intr,ref.ar;
IntrElmComObjName(&rs->intr, ref.rnam) break;
; case R_ELM_COMOBJ_EXPR (&s>ntr, .var, ref.est0;
IntrElmComObjExpr(&rs->intr); breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
IntrRefGVar(rs-i,ref.)
IntrFuncCallEndbreak break; caseif (.level= 0)
IntrFuncCallEnd( IntrElmList&rs-intr,ref.)
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 case : default:
/This never reached
Panic( R_ELMS_LIST:
}
} if (ref. ==0java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
staticvoid AssignRef (rs-intr,ref.;
{
TRY_IF_NO_ERROR
{ switch (ref.type) { case IntrElmPosObj(rs>)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
case R_ELM_REC_java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 break; case R_HVAR:
IntrAssHVar(rs-intr .)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 break; case R_DVAR:
IntrAssDVar(&rs- java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 break; case R_GVAR:
IntrAssGVar(&rs->intr, ref.var); break;
_LIST: if (ref.level = java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 62
IntrAssList(&rs->intr, ref.narg); else
IntrAssListLevel(&rs->intr, ref.narg, ref.level); break;
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 13 else java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 57
IntrAsssListLevel(&rs->intr, ref.level);
; case R_ELM_POSOBJ
IntrAssPosObj(&rs->intrIntrAssLVar(rs->,refvarjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 break; caseR_ELM_REC_NAME
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 18 break; case : break; break; case R_ELM_COMOBJ_NAME:
IntrAssComObjName(&rs->intr, ref.rnam); break; case R_ELM_COMOBJ_EXPR:
IntrAssComObjExpr(&rs->intr); break; case R_INVALID: case R_FUNCCALL:
R_FUNCCALL_OPTS: default: // This should never be reached
(ref.level == 0)
}
}
}
staticvoid UnbindRef( IntrAssListLevel-intr, ref., ref.level)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
{
{ switch (&sintr)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 case R_LVAR:
IntrUnbLVar(&rs->intr, ref.var); break;
R_HVAR:
IntrUnbHVar(&rs->intr, ref.var); break; case R_DVAR:
IntrUnbDVar(&rs->intr, ref.var, java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 18 break; case R_ELM_LIST
IntrUnbList(&java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 18 break;
R_ELM_POSOBJ:
IntrUnbPosObj(&rs->intr); break; case R_ELM_REC_NAME: IntrAssComObjExpr(rs>)
IntrUnbRecName(&rs case R_INVALID: break; case R_ELM_REC_EXPR:
IntrUnbRecExpr(case R_FUNCCALL_OPTS break;
/This should reached
IntrUnbComObjName(rs>intr, ref.rnam); break; case R_ELM_COMOBJ_EXPR:
IntrUnbComObjExpr(&rs->intr); break;
case java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
: default:
SyntaxError(&rs->s, "java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 44
}
}
}
staticvoid IsBoundRefjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 18
{ switch (ref.type) { case R_LVAR:
IntrIsbLVar(&rs->intr, ref.varIntrUnbList(rs-intr,ref.arg; break; case R_HVAR
case R_ELM_POSOBJ: break; case R_DVAR:
IntrIsbDVar(&rs->intr, ref.var, case : break case R_GVAR:
IntrIsbGVar(&rs->intr, ref.var); break; case R_ELM_LIST:
IntrIsbList(&rs->intr, ref.narg); breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 case:
(rs>ntr; break; case R_ELM_REC_NAME:
IntrIsbRecName(&rs-> caseR_INVALID break; case R_ELM_REC_EXPR:
IntrIsbRecExpr(&rs->intr break; case R_ELM_COMOBJ_NAME:
IntrIsbComObjName(&rs->intr, ref.rnam); (rs> IllegaloperandforUnbind") break; case
&-; break; case R_INVALID: case case R_FUNCCALL: case R_FUNCCALL_OPTS: default:
SyntaxErrorjava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 55
}
}
}
/**************************************************************************** **
*/ static LHSRef case R_ELM_LIST:
{ volatile LHSRef
.ype=;
// <Var> '[' <Expr> ']' list selector
(-.= ){
Match_(rs, ;
ReadExprR_ELM_REC_NAME
ref.narg &> rnamjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 while (rs->srs>)
Match_(rs, S_COMMA, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [34, 29) out of bounds for length 41
}
>2
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
Match_(rs, S_RBRACK, "]", followjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 65
ref.type = R_ELM_LIST;
ref.level }
}
// <Var> '{' <Expr> '}' sublist selector elseif (rs->.Symbol = S_LBRACE) {
Match_(rs, S_LBRACE, "{", follow* static ReaderState*, , java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
Match_(rs, java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
ref.java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
ref.level = r->sSymbol =){
}
// <Var> '![' <Expr> ']' list selectorMatch_rs java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 42 elseif (java.lang.StringIndexOutOfBoundsException: Range [45, 15) out of bounds for length 45
(, java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 44
| r;
Match_(rs, S_RBRACK, "]", follow);
ref java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 26
}
// <Var> '.' <Ident> record selector elseif (rs (rs,, ![, )
Match_(rs, ,"" follow; if (rs->sMatch_rs S_RBRACK, "", follow);
ref.rnam = RNamName(rs->s.Value);
Match_(rs, rs->s.Symbol, "identifier", follow);
ref.type = R_ELM_REC_NAME;
} elseif (rs->s.Symbol / <Var> '.' <Ident> record selector
. rs
ReadExpr(rs, S_RPAREN | follow, 'r');
S_RPAREN,"),follow);
ref.type java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
}
{
SyntaxError(&rs->s, "Record component name expected");
}
}
// <Var> '!.' <Ident> record selector elseif(rs->.Symbol= S_BDOT) {
Match_(rs, S_BDOT, "!.", follow); if (rs->s.java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 9
refrnam=RNamNamers>.Value
Match_(rs, rs-> }
ref.type = java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
} else(->. =S_LPAREN java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
r,S_LPAREN,"(", follow)
ReadExpr(rs>. =S_IDENT| -s = S_INT java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
Match_r,S_RPAREN ),follow;
ref.type = R_ELM_COMOBJ_EXPR;
} else {
SyntaxError(&rs->s, "Record component java.lang.StringIndexOutOfBoundsException: Range [0, 54) out of bounds for length 41
}
}
ReadExpr(rs, (rs> = java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
ref.narg++;
}
ref.type = R_FUNCCALL; if (rs-> ;
if (rs.! &>! java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 66 if (ref;
ReadFuncCallOptions(rs, S_RPAREN | follow)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 41
ref = R_FUNCCALL_OPTS
}
}
Match_(rs, S_RPAREN, ")", follow);
}
// read one or more selectors while (IS_IN(rs-s., S_LPAREN |S_LBRACK |S_LBRACE|S_DOT) {
LHSRef ref = ReadSelector(rs, follow, level);
level = EvalRef ref.type =R_FUNCCALL_OPTS;
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
/**************************************************************************** ** *ref; ** **'static void(ReaderState*rs,TypSymbolSet) **symbols((rs>java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 73 ** **<Ident>:=a|b|..|z|A|B|..|Z{a|b|..|z|A}
*/ static LHSRef ReadVar(ReaderState * rs, TypSymbolSet follow)
{
LHSRef ref = { R_INVALID, 0, {0}, {0} };
Obj nams; // list of names of local vars.
Obj lvars; // environment
UInt nest; // nesting level of a higher var.
Obj lvars0; // environment
UIntnest0 // nesting level of a higher var.
UInt indx; // index of a local variable
** <Ident>:=a||.z|AB..Z b.||.|Z0.| }
// all variables must begin with an identifier if (rs->s.SymbolReadVar(ReaderState * rs, TypSymbolSet follow)
SyntaxError(&rs->s, "Identifier expected"); return;
}
// try to look up the variable on the stack of local variables const UInt countNams = LEN_PLIST(rs->StackNams); for (nest = 0; nest < countNams; nest++) { if (nest >= UInt nest0;
indx Intrs>.alue MAX_FUNC_EXPR_NESTING break;
}
nams ELM_PLIST(->StackNams - nest)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
indx findValueInNams(, rs>s.Value,1, LEN_PLIST(nams)); if (indx != 0) {
ref.type = (nest == }
ref.var = (nest << MAX_FUNC_LVARS_BITS) + indx; break;
}
}
/ try look the variable on the stack; // the outer loop runs up the calling stack, while the inner loop runs
/up static definition stackforeachcall function
lvars0 = STATE(ErrorLVars); (> MAX_FUNC_EXPR_NESTING){
nest0 = 0; while(ref.type == R_INVALID && lvars0 != 0 && !IsBottomLVars(lvars0)) {
lvars IntrssValue java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 56
nest = 0;
(.= && lvars !0&!() {
nams = NAMS_FUNC(FUNC_LVARS(lvars)); if(nams =0){
indx = findValueInNams(nams, rs->s.Value, 1, LEN_PLIST(nams)); if (indx) {
reftype =R_DVAR;
ref.var = (nest << MAX_FUNC_LVARS_BITS) + indx;
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
}
lvars// up the static definition stack for each call function
+ if (nest ;
Pr" java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 70 "frame\n",
I)-sValue java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 60 break
}
}
lvars0 = indx = findValueInNams -s.,1 LEN_PLIST)
nest0++;
}
// get the variable as a global variablerefvar =(nest << MAX_FUNC_LVARS_BITS) + indx; 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( -sValue sizeofvarname);
}
// match away the identifier, now that we know the variable
Match_(rs, S_IDENT, "java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 2
// If this isn't a lambda function, look up the name if (rs->s.Symbol != S_MAPTO &&**
ref.var = GVarName(varname);
}
return ref;
}
// Helper function to be called after `ReadVar`, before any further tokens // have been consumed via calls to `Match`. voidCheckUnboundGlobal*rs refjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
{ // only warn if we are accessing a global variable if (ref.type != R_GVAR) return;
onlyinside afunction if (LEN_PLIST(rs->StackNams* i:check if variablevariable,recordcomponent list*occurredThisjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 77 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( '' unbind return;
// ... and isn't an auto var ...
returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
// ... and was not "declared" via DeclareGlobalName if * return* Var =<
// don't warn if we are skipping/ignoring code
njava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 2 return;
// if the global was used as loop variable in an enclosing for loop, that
{
((, varvolatileLHSRef=r,; return;
// check if the user disabled this warning if(arnOnUnboundGlobalsRNam 0
WarnOnUnboundGlobalsRNam = RNamName("WarnOnUnboundGlobals"); if (GAPInforss.++;
ISB_REC(GAPInfo, WarnOnUnboundGlobalsRNam) &&
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 34 return;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 / 'StackNams' is a stack of local variables names lists. A new names returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
// Need to pass an offset, because we have already parsed more tokens
SyntaxWarningWithOffset ref java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 76
}
/**************************************************************************** ** *FReadCallVarAss(<follow>,<mode>)..........readavariableTRY_IF_NO_ERROR{ ** caseofanerroritskipsall **symbolsuptoonecontainedin<follow/isreturn; **following ** :checkifjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 **'r':reference * m=i'/java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 **void(
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *** ** **<Var>:= **|<Var>'['<Expr>[,<Expr=(rs>+ V>''< EvalRef(rs, ref, neejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 **|<Var>'.'<Ident> **|<ar>'[<Expr>',<Expr>}]['[<ptions>]]')'
*/
} volatile if(ef =) return;
// if this was actually the beginning of a function literal, then we are // in the wrong function if (rs} if
(,) else voidjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 13 return;
}
// Check if the variable is a constant if (ref.type == R_GVAR && // including index 'start' and 'end' and return its index; return 0 if not // deal with references if (mode if ((java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
TRY_IF_NO_ERROR *java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 if UnbindRef(s ref;
IntrTrueExpr(&rs->intr);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
syntaxis
IntrFalseExpr(&rs->intr); return:>[<java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 5
} elsejava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
IntrIntObjExpr-,) return;
}
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
is *
( ! i'// Not inside 'IsBound'
CheckUnboundGlobal(rs, ref);
// followed by one or more selectors ReadIsBound( (,,) while (IS_IN java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 71
/sothe was reference
UIntjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ref = ReadSelector(rs Match_(rs, S_" )
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// if we need a reference
m = r| =''* Int =mode= r |(-,)
java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 5
}
// if we need a statement elseif (mode == 's' || (mode == 'x'&&rs-s==S_ASSIGN java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 if(.type =R_FUNCCALL| .=R_FUNCCALL_OPTS java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
{
(rs>, 0 . =R_FUNCCALL_OPTS narg);
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 else {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
UInt rs> if (*
rs->CurrLHSGVar = (ref* Perm = ( <Expr { Expr}){ (<Expr>{<java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 2
}
ReadExpr java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 46
AssignRef(rs, ref);
rs->CurrLHSGVar = currLHSGVar;
}
}
// if we need an unbind elseif ( mode == 'u' ) {
! )java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
SyntaxError(&rs->s, "'Unbind': argument should be followed by
}
UnbindRef(rs nrx =1java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
// if we need an isboundReadExprrs |S_RPAREN, r)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 else/* if ( mode == 'i' ) */ {
IsBoundRef rs S_RPAREN,),follow
*R_ELM_REC_NAME:recordaccessr<java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}
/**************************************************************************** * *FReadIsBound(<follow>)...........readanisboundexpression java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 11 *R_ELM_LIST, **R_ELM_POSOBJjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 ** **<Atom>:='IsBound''('java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
*/ staticvoid ReadIsBound(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
Match_(rs, S_ISBOUND, "IsBound", UInt4 rnam;
Match_(rs, S_LPAREN, "(", follow);
} LHSRef;
Match_(rs, java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
/**************************************************************************** *java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 27 *FReadPerm(<follow>)................readapermutation ** **'ReadPerm'readsapermutation.Instaticvoid(rsTypSymbolSetfollow) **uptoone; ** **Note// '[' *untiltheexpressionhasbeenacommaisfoundit bejava.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 29 ** *=(<xpr>{Expr>Expr>{Expr>})} **
*/ static / ]
{
; java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 73
// read the first cycle (first expression has already been read)
nrx = 1; while (rs->s.Symbol == S_COMMA) {
Match_(rs, S_COMMA, ",", follow);
ReadExpr(rs, S_COMMA|S_RPAREN|java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
nrx++;
}
Match_(rs, S_RPAREN, ")", follow);
nrc = 1;
TRY_IF_NO_ERROR { IntrPermCycle(&rs->intr, if (rs->s.Symbol != S_COMMA && rs->s.Symbol
// read the remaining cycles
. =java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
Match_,S_LPAREN ("}
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 5
nrx = 1;
== S_COMMA){
Match_(rs, S_COMMA, " R_FUNCCALL_OPTS:
ReadExpr
nrx++;
}
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 42
+java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 65
}
// that was the permutation
;
}
/**************************************************************************** *} *FReadListExpr(< ReadExpr(rs, S_RB ** **'ReadListExpr'readsalistliteralexpression.In(sS,'allowed; **skipsjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 21 *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **<List>:='['[<rs; |'E'java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
*/ staticvoid
{ volatileFjava.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 77 volatile UInt nr; &>ntr,refvar)
*
// '[' "
rs->ReadTop++;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 16
STATE(Tilde) = 0;
}
TRY_IF_NO_ERROR { IntrListExprBegin(&rs->intr, (rs->ReadTop ==
pos = 1;
nr = 0;
range = 0;
/ Expr ] if (rs->s.Symbol != S_COMMA && rs->s.Symbol != S_RBRACK) {
IntrAssPosObj>)
java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
nr++;
}
// {',' [ <Expr> ] } while (rs->s.Symbol == S_COMMA) ( , IntrAssComObjName(&rsjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
Match_(rs -= {
pos++ - java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 if (rs->s. default
TRY_IF_NO_ERROR { java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
ReadExpr(rsPanic"errorin ";
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 62
nr
}
}
// incorrect place for three dots if (rs rs-s. = ){
SyntaxError({
}
// '..' <Expr> ']' Match_(rs,java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 47 if (rs->s.Symbol == S_DOTDOT) { if ( pos != nr ) {
SyntaxError&rs->s "Must have no unbound entries in range");
} if ( 2 < nr ) {
SyntaxError(&rs->s, "Must have at most 2 entries before '..'");
}
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 18
caseR_DVAR:
pos+java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
R_GVARjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 20
ReadExpr(rs, S_RBRACK|follow, 'r');
TRY_IF_NO_ERROR { IntrListExprEndElm java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 65
nr++;
s"expected;
SyntaxError(&rs->sMatch_rs java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 43
}
// ']'
Match_ break;
O_ERROR {
(rs>, rs rnam
}
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 28
rs->ReadTilde = 0;
STATE(Tilde) = 0;
rs>ReadTop-;
}
/**************************************************************************** ** *FReadRecExpr(<follow>).java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 ** **'java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 16 **skipsallsymbolsuptoonecontainedin<follow>.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **{
*/ staticvoid{
{ volatile UInt ;// does function have varargs? volatile nr
/
Match_r, };
Match_(rs, S_LPAREN, "(", follow|java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 0
rs>+; if ( rs->ReadTop == 1 ) {
rs->ReadTilde = 0;
STATE<> > <ymbol> <ymbolstr>
}
TRY_IF_NO_ERROR {IntrRecExprBegin&-intr, (rs-ReadTop = 1)) }
nr = 0;
/java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 do{ if (nr || rs->s.Symbol*
Match_(, R_DVARjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
} if ( rs->s.Symbol != S_RPAREN ) { if(rs>.Symbol = ){
rnam = RNamName( rs->s.Value );
Match_(rs, S_INT, "integer", follow);
:The symbolof arglist(sually ,but S_RBRACE
case lambdafunctions.
> = java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
rnam = RNamName( rs->s.Value );
(s, S_IDENT "" follow)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
TRY_IF_NO_ERROR { IntrRecExprBeginElmName(&rs->intr, rnam ); }
} else*
// ')'
Match_(case:
O_ERROR java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
IntrRecExprEnd(rs>, nr java.lang.StringIndexOutOfBoundsException: Range [40, 16) out of bounds for length 16
}
if(>ReadTop= 1) java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
rs->ReadTilde = 0;
STATE(ilde) =0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
rs->ReadTop--;
}
/**************************************************************************** * **java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*/ typedefstruct {
narg// number of arguments
Obj nams; // list of local variables names // does function have varargs?
ifdefHPCGAP
Objlocks;// locks of the function (HPC-GAP)
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
/**************************************************************************** * >, *.readafunctionargumentlist. *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0 **erroritskipsallsymbolsup else if (rs->s.Symbol == S_LBRACE ** ''<> **{','('readwrite'|'readonly')<Ident>levelsS_READWRITE,"adwrite"follow)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 ** *.type *#java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0 java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 34 (-s=|-# * **This(rs-s"usedtwoarguments"); **(sS_RPAREN,"" Match_(rs, S_RPAREN, ")", follow)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 52
*/
static java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
TypSymbolSet follow, BOOL isAtomic,java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 constChar * symbolstr)
{ Int narg; // number of argumentsif
Obj( java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 46 #Match_ ) java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
LockQual lockqual;
Bag locks = 0; SyntaxError SyntaxError(s>,Record name "); #endif BOOL /
#ifdef HPCGAP if ijava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
), ,java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 66 #endif
// make and push the new local variables list (args and locals)java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 49
narg = 0;
nams = NEW_PLIST(T_PLIST, 0); if (rs->s.Symbol != symbol) { goto start;
}
while(>.Symbol= java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 if (isvarg) {
-,can)
}
Match_ ref
start: #ifdef return ar; voidReadReferenceModifiersReaderState*,TypSymbolSet)
lockqual = LOCK_QUAL_NONE; #endif UIntlevel=0 if (rs->s.Symbol == S_READWRITE) { if (!isAtomic) (*sjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
,
} #ifdef HPCGAP else {
lockqualInt)
} #endif
Match_(rs, S_READWRITE, "readwrite", follow);
} elseif (rs->s.Symbol == S_READONLY) { if (!isAtomic) {
SyntaxError(&rs->s
} #ifdef HPCGAP else {
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
Match_(rs, S_READONLY, "readonly", follow);
} ifsjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
SyntaxError( #
}
=1
PushPlist( / java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 #fdef HPCGAP if (isAtomic) {
GrowString(locks, narg);
(ocks,narg)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
CHARS_STRING(locks)[narg - 1] = lockqual;
} #endif if (LEN_PLIST(nams) >= "oo many function arguments""java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
rs->LoopNesting
()-s, ); if ( java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
SyntaxError(&rs->s, "Three dots required for variadic argument list");
} if (rs->s.Symbol
isvarg =TRUE;
Match_(rs, S_DOTDOTDOT, ".java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
}
Match_(rsjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// Special case for function(arg)
(arg/
isvarg (java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 31
}
ArgList args;
args. whiletype==R_INVALID&java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 26
args.nams = nams;
args.isvarg = isvarg;
ifdef HPCGAP
. =locks; if (locks)
MakeImmutable.)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 #endif returnargs
}
staticvoid ReadFuncExprBody(ReaderState * rs,
TypSymbolSet follow,
isAbbrev, Int nloc,
ArgList args, Int startLine)
volatile
// push the new local variables list
PushPlistrs- java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
(nams,MakeImmString(rs-s.Value // get the variable as a global variable
TRY_IF_NO_ERROR {
// we do not wantonjava.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 71
args,)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 #ifdef HPCGAP
(&s>,args.)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}
if (isAbbrev) { // read the expression and turn it into a return-statement
ReadExpr(rs, follow, 'r');
TRY_IF_NO_ERROR {
(rs>ntr;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
{ // <Statements>
UInt oldLoopNesting // only warn if inside a function
(LEN_PLIST(rs>*F ReadFuncExpr( <follow> ) java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
rs->LoopNesting =
}
// end interpreting the function expression
// only theglobalvariabledoesnot ..
* skipsallsymbols one <.
}
while (1) { if (rs->s.Symbol == S_IDENT) { if (findValueInNamsnams -sValue, 1,narg+nloc){
SyntaxError(&rs->s, "Name used for two locals");
} if (findValueInNams(nams, rs->s.Value, 1, narg)) UInt 0;// number of locals
SyntaxError(&rs->s, "Name used for java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
nloc=1;
PushPlist(nams, MakeImmString(rs->s.Value)); if (LEN_PLIST(nams) >= MAX_FUNC_LVARS) {
SyntaxError(&rs->s, "Too many function argumentsjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
}
}
Match_(rs, S_IDENT, "identifier", STATBEGIN /inthisjava.lang.StringIndexOutOfBoundsException: Range [5, 27) out of bounds for length 5
if
;
// init to avoid strange message in case of empty string
(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
MatchSemicolon(rs, ( *
return nloc;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/**************************************************************************** ** *FReadFuncExpr(<follow>)..* ** **'ReadFuncExpr'readsafunctionliteralexpression.Incaseofanerror **itskipsallsymbolsuptoonecontainedin<follow>. ** **<Function**'' toavariable *['java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 69 **<Statements> **'end'
*/ staticvoid ReadFuncExpr(ReaderState * rs, TypSymbolSet * <Function>:=''<ArgList> }''> <xpr>
{ Int startLine; // line number of function keyword
isAtomic /this java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 60
nloc=0; // number of locals
*< =a|.zAB|.Z { a|b{
// begin the function
startLine * Var: <dent if (rs->s.Symbol ,>]java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
Match_,, ajava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 47
isAtomic=;
} elseif (mode == 'a') { // in this case the atomic keyword was matched away by ReadAtomic
an atomicfunction
isAtomic=;
}
Match_(rs, S_FUNCTION,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Match_(rs, S_LPAREN, "(", S_IDENT|S_RPAREN|S_LOCAL|STATBEGIN|S_END|follow);
ReadFuncExprBody(rs, follow, FALSE, nloc// in the wrong function
Match_(rs, ReadFuncExprAbbrevSingle follow)
}
/**************************************************************************** ** *
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **'ReadFuncExprAbbrevMulti'readsamulti-java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 31 **literalexpression.Incaseofanerroritskipsallsymbolsuptoone **containedin<follow>.
**<IntrFalseExpr(&s>;
*/
( java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 74
. 1
Match_
ArgList args = ReadFuncArgList(rs, follow, java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 5
// match away the '->'
Match_(rs, S_MAPTO, "->", follow);
java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 77 * *Rjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 2 **literalexpression.Incaseofanerroritskipsallsymbolsuptoone ** =<-'<xprjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
*/
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 75
(, found ~ // make and push the new local variables list
Objnams (_,1)
PushPlistrs>=(. == ?refvar:)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
ArgList args;
java.lang.StringIndexOutOfBoundsException: Range [30, 27) out of bounds for length 42
args.
args.isvarg = FALSE; #ifdef HPCGAP
args.locks = 0; #
// match away the '->' (,ref;
Match_(rs, S_MAPTO, "->", follow);
ReadFuncExprBody(rs, follow, java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 28
}
/**************************************************************************** ** *FReadLiteral(<follow>,<java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 2 **
java.lang.StringIndexOutOfBoundsException: Range [0, 68) out of bounds for length 1 **allsymbolsuptoonecontainedin<follow>. ** *<>:Int> **'sBound'''<)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 **|'true' *|'alse' **|'~' **|<Char> **|<Perm> **|<String> **|<List> **|<Record> |java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27 ** **<Int>:=0|1|..|9{0|1|..|9} ** **<Char>:='<anycharacter>' ** *Sjava.lang.StringIndexOutOfBoundsException: Range [14, 11) out of bounds for length 40
*/
void (S_RPAREN""follow;
{ 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;
}
switch (rs->s.Symbol ;
// <Int> case S_INT:
{ java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 13
Match_(rs, S_INT, "integer", follow nrx+java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
;
// <Float>break case S_FLOAT:
TRY_IF_NO_ERROR { IntrFloatExpr(&rs->intr, rs->s.ValueObj case S_STRING:
Match_ GAP_ASSERT(s-sValueObj ! ); break;
// '~' caseS_TILDE: if(rs->ReadTop==0){ SyntaxError(&rs->s,"'~'notallowedhere"); } rs->ReadTilde=1; UInt;// actual position of element Match_(rs,S_TILDE,"~",follow); break;
// <String> caseS_STRING: GAP_ASSERT(rs->s.ValueObj!=0); TRY_IF_NO_ERROR{*java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 76 Match_(rs,S_STRING,"",follow); rss+;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// <List> java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 ReadListExpr(rs,follow)**<Literal> break;
// <Record> caseS_REC: ReadRecExpr(rs,; break;
// <Function> caseS_FUNCTION: S_FLOATjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 57 java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 39 break;
// signal an error, we want to see a literal default: // 'IsBound(Var>'java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 } }
/**************************************************************************** ** mode)......atom *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 . SyntaxError(&rs->s, haveat2entries.') **onecontainedin<follow>. ** **<Atom>:=<Var> **|'IsBound''('<Var>')' **|(rs|follow,r)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 **|'('<Expr>')'
*/ staticconst UInt LiteralExprStateMask = ( +java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
S_INT|S_TRUE|S_FALSE|S_CHAR|S_STRING|S_LBRACK|
S_TILDE|S_REC|S_FUNCTION|
|S_DOTS_MAPTO;
staticvoid ReadAtom(ReaderState * rs, TypSymbolSet
{ // read a variable if (rs->s. java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ReadCallVarAss(rs, follow, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// 'IsBound' '(' <Var> ')' elseif (rs- java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 90
,follow);
} // otherwise read a literal expression elseif (IS_IN(rs- }
ReadLiteral(rs, follow, mode);
}
// '(' <Expr> ')' if (s>. = java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 18
Match_(rs, Match_(rs, S_PLUS, + if (rs->s.SymbolFfollow) . . ...
Match_(rs, S_RPAREN, ")", follow);
TRY_IF_NO_ERROR { IntrPerm(&rs->intr, 0); } return;
}
ReadExpr(s,S_RPAREN| r) if (rs->s.Symbol == S_COMMA) {
ReadPerm(rs return;
}
Match_(rs,S_RPAREN,"" follow;
}
// otherwise signal an error else {
Match_(, S_INT,"expression*
}
ReadReferenceModifiers(rs, follow);
}
/**************************************************************************** ** *FReadSign(<follow>).....*<rs-ReadTop+java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
*/ staticInt ReadSign(ReaderState * rs, TypSymbolSet follow)
{ if (rs->s.Symbol == S_PLUS) {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return +1;
}
r->.Symbol=S_MINUS){
Match_(rs, S_MINUS, "unary -", follow);
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
} return0;
}
/**************************************************************************** ** FReadFactor(</ ['^' <Atom> ] implemented as {'^' <Atom> } for better error message<Atom>]{'<}forerrorjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 ** *rsS_IDENT,",)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 **toonecontainedin<follow>.
**<actor>:='+'|''<Atom>''{+''-}A
*/ static/ interpret the unary minus
{ volatileInt sign1; volatileInt sign2;
// { '+'|'-' } leading sign
sign1 Match_(,S_ASSIGN, "=,follow)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
// interpret the unary minus if ( sign2 == -1 ) {
TRY_IF_NO_ERROR { IntrAInv(&rs->intr); }
}
// interpret the power
{(rs>ntr);}
// check for multiple '^' if (rs->s.Symbol/
SyntaxError(&rs->s, "'^' is not associative");
}
}
// interpret the unary minus if ( sign1 == -1 ) {
TRY_IF_NO_ERROR { IntrAInv(&rs->intr); }
}
}
*******************************************java.lang.StringIndexOutOfBoundsException: Range [77, 64) out of bounds for length 64
**
*F ReadTerm( <follow>, <mode> ) . . . . . . . . . . . . . . . . read a term
**
** 'ReadTerm' reads a term. In case of an error ReadFactor(,follow );
* contained <follow.
**
** <Term> := <Factor> { '*'|'/'|'mod' <Factor> }
*/ static ** error itskipsall symbols up to one java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 36
{ volatile UInt symbol**
// <Factor>
(s follow, mode);
// { '*'|'/'|'mod' <Factor> } // do not use 'IS_IN', since 'IS_IN(S_POW,S_MULT|S_DIV|S_MOD)' is true
** isAtomicIsthis function
rs->s.Symbol == S_DIV || ** {
symbol = rs->s.Symbol;
Match_(rs, rs->s.Symbol, "*, /, or mod", follow);
ReadFactor(rs, follow, 'r') if ( symbol == S_DIV ) { IntrQuo(&rs->intr); }
{ if ( symbol == S_MULT ) { IntrProd(&rs->intr); } elseif ( symbol == S_DIV ) { IntrQuo( } elseif ( symbol == S_MOD ) { IntrMod(&rs->intr); }
}
}
}
/**************************************************************************** ** *FBOOLisAtomic, *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **Char*symbolstr) **allsymbolsuptoonecontainedin<follow>. ** **<Arith>:=<Term>{'+'|'-'<Term>}
*/ staticvoid java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 6
{
UInt symbol;
*********************************
**
F
*
** 'ReadRel' reads a relational expression. In case of an error it skips
symbols to contained in <ollow> if(symbol = S_MINUS){IntrDiffndif
** <Rel}
*/ staticvoid ReadRel(ReaderState * rs, SyntaxError&-s 'readwrite' - function";
{ volatile UInt symbol; volatile UInt isNot;
// { 'not' }
isNot = 0; while (rs->s.Symbol == S_NOT) {
isNot++;
Match_(rs, S_NOT, "not", follow);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
*symbols follow.
ReadAri(rs, follow, (isNot == 0 ? mode : 'r')) SyntaxError(rs>, "readonly'argumentofnonatomicfunction"java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
// { '=|<>|<|>|<=|>=|in' <Arith> } if (IS_IN(rs->s.Symbol, S_EQ | =LOCK_QUAL_READONLYjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
symbol#ndif
Match_(rs rs-sSymbol "comparison operator" follow;
ReadAri(rs, follow, 'r');
TRY_IF_NO_ERROR { if(symbol == S_EQ){SyntaxError&>," used for two arguments"java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 elseif ( symbol == S_NE ) { IntrNe(&rs->intr); } elseif (symbol = S_LT ) { IntrLtrs-intr); elseif( ==S_GE){IntrGe(&rs-intr;} elseif ( symbol == S_GT ) { IntrGt(&rs->intr); } elseif ( symbol == S_LE ) { // { 'not' } elseif ( java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 14
}
}
// interpret the not if ( (isNot % 2) != 0 ) {
TRY_IF_NO_ERROR { java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
}
/**************************************************************************** ** *FReadQualifiedExpr(<follow **bequalifiedwithreadonlyorreadwrite ** **'ReadQualifiedExpr'readsaqualifiedexpression.Incaseofanerrorit **skipsallsymbolsuptoonecontainedin<follow>. ** * ** **Thesefunctionsonly// begin interpreting the function expression **theyaresimplyplaceholders.
*/ staticvoid
ReadQualifiedExpr( IntrFuncExprSetLocks(java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
{
HPCGAP
LockQual =LOCK_QUAL_NONE #lse volatileUIntqual=0; #endif if (rs->s.Symbol == S_READWRITE) {
Match_(rs (rs, follow,mode)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 #ifdef HPCGAP
qual = LOCK_QUAL_READWRITE;
if-. =){
rs readonly, |) #ifdef HPCGAP
qual = LOCK_QUAL_READONLY; #endif
}T {
TRY_IF_NO_ERROR { IntrQualifiedExprBegin(&rs->intr, qual); }
ReadExpr(rs, follow, mode);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
}
/**************************************************************************** ** F(follow,<ode>)........readan ** **'ReadExpr'readsanexpression.Incaseofanerrorit**skips symbols Match_(rs, S_LOCAL, "lo",follow); **SyntaxError&->Nameusedfor)
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 static ** **The<mode>iseither'r'indicatingPushPlist(ams,(>Value) **evaluatedas volatile UInt qual0; **anassignmentor'a'indicating#endif **followingan; **atomic. ** *(,S_COMMA,"",follow); **contexttheatomichasbeenmatchedawaybeforewecanseethatitisan **atomicfunctionliteral,notanatomicstatement. ** **
*/
* 'java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
{ // <And>
ReadAnd(rs* Function> : function '< )java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
/**************************************************************************** ** *FReadUnbind(<follow>)............readanunbindstatement ** **'ReadUnbind'readsanunbindstatement.Incaseofanerroritskipsall **symbolsupto // before wewewerereadinganatomicfunction ** *Statement>='nbind'''<ar')'*following"keywordthatfunctionbemade
*/ staticvoid
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
Match_(rs, S_UNBIND, "Unbind", follow);
Match_(rs, S_LPAREN, "(", follow** context theatomic beenmatched away before we can see that it is an
ReadCallVarAss(rs, S_RPAREN|follow, 'u');
Match_(rs, S_RPAREN, ")", follow);
}
/**************************************************************************** ** *java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0 ** ***java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 21 *
/**************************************************************************** ** * ** **'ReadAssert'readsanassertstatementvoid(*F ReadLiteral( <follow>, <mode>.an **symbolsuptoonecontainedin<follow>. ** **<Statement>:='Assert''('<Expr>','<Expr>[','<Expr>]'**
*/
( , TypSymbolSetjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
{
TRY_IF_NO_ERROR { IntrAssertBegin(&rs->intr); }
r,S_ASSERT " ;
Match_(rs, S_LPAREN, "(", follow);
ReadExpr(rs, S_RPAREN | S_COMMA | follow, 'r');
TRY_IF_NO_ERROR { IntrAssertAfterLevel(&rs->intr); }
Match_(rs** symbolsup contained<ollow.
ReadExpr(rs, S_RPAREN | S_COMMA | follow, 'r');
TRY_IF_NO_ERROR { IntrAssertAfterCondition(&rs->intr); }
rs-Symbol= S_COMMA){
Match_(rs, S_COMMA, "", 0);
ReadExpr(rs, S_RPAREN | follow, 'r*<>: 0||.9 {01|.|9 }
Match_(rs, S_RPAREN, ")", follow);
TRY_IF_NO_ERROR {IntrAssertEnd3Argsrs
} else {
Match_(rs, S_RPARENvoid(*java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
/**************************************************************************** ** *FReadIf(<follow>)......java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ** *'eadIfanstatementanjava.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 53 **uptoonecontainedin<follow>. **java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 77 **<Statement>:='if'</ <Float> **{'elif'<Expr>'then'<Statements>} **['else'<Statements>] ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ic** { volatileUIntnrb;// number of branches
// 'if' <Expr> 'then' <Statements> nrb=0; TRY_IF_NO_ERROR{IntrIfBegin(&rs->intr);} Match_(rs,S_IF,"if",follow)Match_(rs,,"") ReadExpr(rs,S_THEN|S_ELIF|S_ELSE|S_FI|follow,'r'); (,,S_ELIFS_FI|java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 68 TRY_IF_NO_ERROR{IntrIfBeginBody(&rs->intr);} nrs=ReadStats(rs,S_ELIF|S_ELSE|S_FI|follow); TRY_IF_NO_ERROR{nrb+=IntrIfEndBody(&rs->intr,nrs);}
// { 'elif' <Expr> 'then' <Statements> } while(rs->s.Symbol==S_ELIF){ TRY_IF_NO_ERROR{(r-intr)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 Match_(rs,S_ELIF,"elif",follow); ReadExpr(rs,S_THEN|S_ELIF|java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 14 Match_(rs,S_THEN,"then",STATBEGIN|S_ELIF|S_ELSE|S_FI|follow); TRY_IF_NO_ERROR{IntrIfBeginBody(&rs->intr);} nrs=ReadStats(rs,S_ELIF|S_ELSE|S_FI|follow); TRY_IF_NO_ERROR{nrb+=IntrIfEndBody(&rs->intr,nrs);} }
// <Var> volatile LHSRef ref = ReadVar(rs, java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 20
)
EvalRef(rs, ref, 1);
CheckUnboundGlobal(rs, ref);
// 'in' <Expr>
Match_(rs, S_IN, "in", S_DO|S_OD|follow);
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 45
ReadExpr(rs, S_DO|S_OD|follow, 'S_INTS_TRUE|||S_STRING|_BRACK|
// 'do' <Statements>
Match_(rs, S_DO, "do", STATBEGIN|S_OD|follow); if (ref.type == R_GVAR)
PushGlobalForLoopVariable(rs, void(ReaderState,TypSymbolSet ,Charmode)*toone contained f.
rs->LoopNesting++;
TRY_IF_NO_ERROR (&rs-intr;}
nrs = ReadStats(rs, S_OD|follow);
TRY_IF_NO_ERROR { IntrForEndBody(&rs->intr, nrs ); }
rs->LoopNesting--;
* java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
PopGlobalForLoopVariable // 'IsBound' '(' <Var> ')'
/ od
Match_(}
TRY_IF_NO_ERROR {
&rs->ntr,rs>)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
}
)) { volatileUIntnrs;// number of statements in body
// 'while' <Expr> 'do' TRY_IF_NO_ERROR{IntrWhileBegin(&rs->intr,rs->StackNams);} Match_(rs,S_WHILE,"while",follow); ReadExpr(rs,S_DO|S_OD|follow,'r'); Match_(rs,S_DO,"do",STATBEGIN|java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// <Statements>
java.lang.StringIndexOutOfBoundsException: Range [57, 22) out of bounds for length 22 TRY_IF_NO_ERROR{IntrWhileBeginBody&rs->intr)} "; TRY_IF_NO_ERROR{IntrWhileEndBody(&rs->intr,nrs);} rs->LoopNesting--;
// 'od' Match_(rs,S_OD,"whileparsinga'while'java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 13 TRY_IF_NO_ERROR{ IntrWhileEnd(&rs->intr,rs->StackNams); } }
*************************** ** *FReadAtomic(<follow>)...............readanatomic** 'ReadFactor' reads a factor. In case of an error it skips all symbols ** **'ReadAtomic'readsanatomicblock.Incaseofanerroritskipsall
** *Int; **<Statements> **'od'';' ** **Thesefunctionsonlydo{ **theyaresimplyplaceholders.
*/
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
{ volatile nrs // number of statements in body volatile UInt // ['^' <Atom> ] implemented as {'^' <Atom> } for better error message #ifdef HPCGAP volatileint lockSP; // lock stack
lockSP = Match_(rs S_POW,""follow) #endif
Match_(, S_ATOMIC "",follow)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 // Might just be an atomic function literal as an expression if (rs->s.Symbol == S_FUNCTION) { // 'od' return if sign2= -){
// 'od'
Match_(rs, S_OD, "while parsing an atomic block: statement or 'od'", follow);
TRY_IF_NO_ERROR {
IntrAtomicEnd(&rs->intr, rs->StackNams);
} #ifdef 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 arepeat-oop.Incaseanitskipsall **symbolsuponecontainedjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 49 ** **<tatement>java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 *Statements> **'until'<Expr>';'
*/
voideaderState , follow)
{ volatile UInt nrs; // number of statements in body
// 'repeat'
TRY_IF_NO_ERROR { IntrRepeatBegin(&rs->intr, rs->StackNams); }
Match_(rs, S_REPEATjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/**************************************************************************** ** *F// { '+'|'-' <Term> } * **'ReadBreak'readsabreak-statement.Incaseofanerroritskipsall **symbolsuptoonecontainedin<follow>. **java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 **<Statement>:='break'';'
*/ staticvoid ReadBreak(ReaderState * rs, TypSymbolSet follow)
{
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 2
&s>,"break not enclosed in a ";
// skip the break symbol
Match_(rs, S_BREAK, "break", follow);
// interpret the break statement
TRY_IF_NO_ERROR { IntrBreak(&rs->intr); }
}
/**************************************************************************** ** *FReadContinue(<follow>)............readacontinuestatement * '-statement.skips **allsymbolsuptoonecontainedin<followjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ** **<Statement#ifdef
*/
taticndif
{*
rs>oopNesting
SyntaxError(&rs->sMatch_ readonly" | EXPRBEGIN);
// skip the continue symbolHPCGAP
Match_(rs, S_CONTINUE, " qual ;
// interpret the continue statement
TRY_IF_NO_ERROR {>intr, qual;
}
/**************************************************************************** ** *FReadReturn ** **'ReadReturn'reads* *isused* *alljava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 54 ** **<Statement>:='return'[<Expr>]';' ** **Itisstilllegaltouseparenthesisbuttheyarenolongerrequired, **areturnstatementisnotafunctioncallandshouldnotlooklikeone.
*/ static
{ // skip the return symbol
Match_(rs, S_RETURN, "return", follow);
// 'return' with no expression following if ( else
TRY_IF_NO_ERROR { IntrReturnVoid(&rsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
/**************************************************************************** ** *FReadQuit(<follow>)...............*java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 77 ** **'ReadQuit'readsaquitstatement.Incaseofanerroritskipsall **symbolsuptoonecontainedin<follow>. ** **<Statement>:='quit'';'
*/ staticvoid ReadQuit(ReaderState * rs, TypSymbolSet follow)
{ // skip the quit symbol
Match_(rs, S_QUIT, "quit", follow);
// interpret the quit
TRY_IF_NO_ERROR { IntrQuit(&rs->intr); }
}
/**************************************************************************** ** *FReadQUIT(<follow>)...............readaUIT*FReadQUITfllow)..........readaQUITstatement *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **'ReadQUIT'readsaQUITstatement.Incaseofanerroritskipsall **symbolsuptoonecontainedin<follow>. ** **<Statement>:='QUIT'';'
*/ staticvoidReadQUIT(*rs TypSymbolSetfollow)
{ // skip the quit symbol
Match_(rs, S_QQUIT, "QUIT", follow)*F ReadStats<follow> .... . . .. ..read statementsequence
// interpret the quit
TRY_IF_NO_ERROR { IntrQUIT(&rs->intr); }
}
/**************************************************************************** ** *FReadStats(<follow>)..............readastatementsequence ** **'ReadStats'readsastatementsequence.Incaseofanerror **symbolsuptoonecontainedin<follow>. ** *Var>(Expr,<>}]); ** *<=V:; **|<Var>'('[<Expr>{','<Expr>}]')'';' **|'Unbind''('<Var>')'';' **|'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'**''; **|';'
*/ staticInt TryReadStatement(ReaderState * rs, TypSymbolSet follow)
{ switch (rs->s.Symbol) { case S_IDENT: ReadCallVarAss(rs, follow,'s'); break; case S_UNBIND: ReadUnbind(rs, follow ); break; case S_INFO: / case S_ASSERT:ReadAssertrs, ;break; case S_IF: ReadIf(rs, follow ); break; case S_FOR: ReadFor(rs, follow ); break; case S_WHILE: ReadWhile(rs, follow switch(->.) { caseS_REPEAT rs ) break; case S_BREAK: ReadBreak(rs, follow ); break;
: r,follow) ; case S_RETURN: ReadReturn(rs,( ); ;
: rs, ) ; case S_ATOMIC: case S_IF: ReadIf(rs, ;
); break; case S_PRAGMA: ReadPragma(rs, follow ); break; case S_QUIT: SyntaxError(&rs->s, "'quit;' cannot be used in this context"); break; case S_QQUIT: SyntaxError(&s>,' cannot beused in this java.lang.StringIndexOutOfBoundsException: Range [0, 81) out of bounds for length 60 case S_HELP: SyntaxError(&rs->s, "'?' S_RETURN (rs, ) ;
:return0;
} return1;
}
UIntReadStatsReaderState *,TypSymbolSet followjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
{
UInt nr = 0; // number of statements
// read the statements while (IS_IN(rs->s.Symbol, STATBEGIN | rs, S_COMMA|follow,''; if(TryReadStatement defaultreturn;
SyntaxError SyntaxError(&rs->s, "statement);
}
nr+TRY_IF_NO_ERROR (&java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (rs->s.Symbol == S_PRAGMA)
Match_(rs, S_PRAGMA, "", 0); else
MatchSemicolon(rs, follow);
}
staticvoid RecreateStackNams(ReaderState * rs, Obj context)
{
Obj stackNams = rs->** <Statement> := 'if' >'Statements>
Obj lvars = context; while (lvars &&*F ** *** **** **read andevaluatesymbols*** ****** **
Obj nams = NAMS_FUNC(FUNC_LVARS(lvars)); if (nams != (Obj) 0) {
PushPlist(stackNams, nams);
}
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 <= / 'if' <Expr> 'then' <Statements> const UInt j = countNams + 1 -i;
Obj tmpA = ELM_PLIST(stackNams, i);
Obj tmpB =(tackNamsj;
SET_ELM_PLIST(stackNams, i, tmpB);
SET_ELM_PLIST(stackNams, j, tmpA);
}
}
/**************************************************************************** ** *...........readonecommand ** **'ReadEvalCommand'readsonecommandandinterpretsitimmediately(,java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 72 ** **Itdoesnotexpectthefirstsymbolof*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **readthefirstsymbolofthenextinput. ** **If'dualSemicolon'isanon-zeropointer,thentheintegeritpointsto **willbesetto **itissetto0.If'dualSemicolon'iszerothenitisignored.
*/
* willbe toifjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
TypInputFile * input,
Obj * evalResult,
java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 56
{
ExecStatus caseallup volatile Obj tilde; volatile Obj errorLVars;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 2 #ifdef HPCGAP int lockSP; #
// remember the old execution state and start an execution environment
Bag oldLVars =
context ? SWITCH_TO_OLD_LVARS(context) : SWITCH_TO_BOTTOM_LVARS();
if (context)
RecreateStackNams(rs, context*' awhileloop java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 77
switch (rs->s.Symbol) { // read an expression or an assignment or a procedure call case S_IDENT: ReadExpr(rs, S_SEMICOLON|S_EOF, 'x'
// 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: ReadQUIT(rs, S_SEMICOLON|S_EOF ;break; case S_HELP:
ReadHelp(rs,S_SEMICOLON| S_EOF);
rs->s.Symbol = S_SEMICOLON; // fake a trailing semicolon break; case S_PRAGMA:
ReadPragma(rs, (, S_DO,"do,STATBEGIN||)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
rs->s.Symbol = java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0 break;
otherwise try to read a generic statement default: if (!TryReadStatement(rs, S_SEMICOLON | S_EOF)) { // not a statement, but perhaps it is an expression
ReadExpr(rs, S_SEMICOLON | S_EOF, 'r');
}
}
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14 if (!IS_IN(rs->s.Symboljava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
-,;java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}
// check for dual semicolon if (dualSemicolon)
*dualSemicolon = (rs->s.Symbol/ a
// end the interpreter
status = IntrEnd(&rs->intr, rs->s.NrError > 0, evalResult);
// restore the execution environment
SWITCH_TO_OLD_LVARS(oldLVars);
#ifdef HPCGAP if-.>) java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
PopRegionLocks(lockSP); if
TLS));
} #endif
GAP_ASSERT(rs->LoopNesting/
// switch back to the old reader context
memcpy( STATE(ReadJmpError), readJmpError, sizeof(jmp_buf) );
STATE(Tilde) = tilde;
STATE(ErrorLVars) = errorLVars;
ClearError();
// return whether a return-statement or a quit-statement were executed return status;
}
/**************************************************************************** ** *java.lang.StringIndexOutOfBoundsException: Range [8, 2) out of bounds for length 15 ** **'ReadEvalFile'readsanentirefileandreturns(in'evalResult')the **entire/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 ** *Itdoesnotthefirstofinputalreadyreads **totheendoftheinput(unlessanerrorhappens).
*/
ExecStatus ReadEvalFile(TypInputFile * input, Obj * evalResult)
{ volatile ExecStatus status; volatile Obj tilde;
jmp_buf readJmpError; volatile UInt nr; volatile Obj nams; volatileInt nloc; #ifdef HPCGAP volatileint lockSP; #endif
);
=inputjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
ClearError();
/
java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
// 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
// initialize everything and begin an interpreter
rs->StackNams = NEW_PLIST( T_PLIST, 16 );
STATE(Tilde) = 0;
// remember the old execution state and start an execution environment
Bag oldLVars = SWITCH_TO_BOTTOM_LVARS();
IntrBegin(&rs->intr);
rs->intr.** '>''
// check for local variables * TypSymbolSetjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 0java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
rsStackNams)
nloc = 0; ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nloc = ReadLocals(rs, 0, Match_rs S_REPEAT r,follow
}
// fake the 'function ()'
IntrFuncExprBegin(&rs->intr, 0, nloc, nams,
GetInputLineNumber(input));
// read the statements
GAP_ASSERT(rs->LoopNesting == 0);
nr = ReadStats(rs, if (rs->s.Symbol == S_LOCAL-Symbol= java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
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(input));
}
// end the interpreter
status = IntrEnd(&rs->intr, rs->s.NrError > 0, evalResult);
// restore the execution environment
SWITCH_TO_OLD_LVARS(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 2
// switch back to the old reader context
memcpy( STATE(ReadJmpError), readJmpError, sizeof(jmp_buf) ); #ifdef HPCGAP
PopRegionLockslockSP; 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 userHasQuit = STATE(UserHasQuit); volatile Obj oldLvars; volatile Obj result = 0;
GAP_TRY
{
result = CALL_0ARGS(f);
}
GAP_CATCH
{
ClearError();
}
// switch back to the old state
SWITCH_TO_OLD_LVARS(oldLvars);
STATE(UserHasQuit) = userHasQuitjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 return result;
}
/**************************************************************************** ** *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 ** **Thecurrentreadercontextissavedandanewoneisstarted.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 ObjCall1ArgsInNewReader(Objf,Obja) { // remember the old state volatileUIntuserHasQuit=STATE(UserHasQuit); volatileObjoldLvars; volatileObjresult=0;
/ STATE(UserHasQuit)=java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 oldLvarsS_RETURN,return"
GAP_TRY { java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 34 } GAP_CATCH { ClearError(); }
// switch back to the old state SWITCH_TO_OLD_LVARS(oldLvars); STATE(UserHasQuit)=userHasQuit; returnresult; }
/**************************************************************************** ** *F*************initializemodule**java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
*/
/**************************************************************************** ** *FInitInfoRead().................tableofinitfunctions
*/ static StructInitInfo module = { // init struct using C99 designated initializers; for a full list of // fields, please refer to the definition of StructInitInfo
.type = MODULE_BUILTIN,
.name = "read",
.initKernel = InitKernel,
¤ 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.103Bemerkung:
¤
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.