/****************************************************************************
**
*W  intrprtr.h                  GAP source                   Martin Schönert
**
**
*Y  Copyright (C)  1996,  Lehrstuhl D für Mathematik,  RWTH Aachen,  Germany
*Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland
*Y  Copyright (C) 2002 The GAP Group
**
**  This file declares the functions of the immediate interpreter package.
**
**  The immediate interpreter package  is  the part  of the interpreter  that
**  interprets code immediately (while it is read).  Its functions are called
**  from the reader.  When it encounters  constructs that it cannot interpret
**  immediately, it switches into coding mode, and  delegates the work to the
**  coder.
*/

#ifndef libGAP_GAP_INTRPRTR_H
#define libGAP_GAP_INTRPRTR_H


/****************************************************************************
**
*V  IntrResult  . . . . . . . . . . . . . . . . . result value of interpreter
**
**  'IntrResult'  is the result value of  the interpreter, i.e., the value of
**  the  statement  that  was  last  interpreted (which   might  have been  a
**  return-value-statement).
*/
extern  libGAP_Obj             libGAP_IntrResult;


/****************************************************************************
**
*V  IntrIgnoring  . . . . . . . . . interpreter is currently ignoring actions
**
**  If 'IntrIgnoring'  is  non-zero,  the interpreter  is  currently ignoring
**  actions.  The interpreter switches to this mode for  the right operand of
**  'or' and 'and'  constructs where the  left operand already determines the
**  outcome.
**
**  This mode is also used in Info and Assert, when arguments are not printed. 
*/
extern libGAP_UInt libGAP_IntrIgnoring;


/****************************************************************************
**
*V  IntrCoding  . . . . . . . . . . . interpreter is currently coding actions
**
**  If 'IntrCoding' is non-zero, the interpreter is currently coding actions.
**  The interpreter  switches  to this  mode for  constructs  that it  cannot
**  directly interpret, such as loops or function bodies.
*/
extern libGAP_UInt libGAP_IntrCoding;

/****************************************************************************
**
*V  IntrReturning  . . . . . . . interpreter is currently exiting statements
**                                 enclosing a return;
**
**  If 'IntrReturning' is non-zero, the interpreter is currently exiting
**  statements enclosing a return statement. Actions from these statements
**  are ignored.
*/
extern libGAP_UInt libGAP_IntrReturning;

/****************************************************************************
**
*F  IntrBegin() . . . . . . . . . . . . . . . . . . . .  start an interpreter
*F  IntrEnd(<error>)  . . . . . . . . . . . . . . . . . . stop an interpreter
**
**  'IntrBegin( <frame> )' starts a new interpreter in context <frame>
**  if in doubt, pass TLS(BottomLVars) as <frame>
**
**  'IntrEnd(<error>)' stops the current interpreter.
**
**  If <error>  is non-zero a  syntax error was found by  the reader, and the
**  interpreter only clears up the mess.
**
**  If 'IntrEnd' returns  0, then no  return-statement or quit-statement  was
**  interpreted.  If  'IntrEnd' returns 1,  then a return-value-statement was
**  interpreted and in this case the  return value is stored in 'IntrResult'.
**  If  'IntrEnd' returns 2, then a  return-void-statement  was  interpreted.
**  If 'IntrEnd' returns 8, then a quit-statement was interpreted.
*/
extern  void            libGAP_IntrBegin ( libGAP_Obj frame );

extern  libGAP_ExecStatus             libGAP_IntrEnd (
            libGAP_UInt                error );


/****************************************************************************
**
*F  IntrFuncCallBegin() . . . . . . . . . . .  interpret function call, begin
*F  IntrFuncCallEnd(<funccall>,<options>,<nr>)  interpret function call, end
**
**  'IntrFuncCallBegin' is an action  to  interpret a  function call.  It  is
**  called by  the reader  when  it  encounters  the parenthesis  '(',  i.e.,
**  *after* the function expression is read.
**
**  'IntrFuncCallEnd'  is an  action to  interpret  a  function call.   It is
**  called by    the reader when it encounters     the parenthesis ')', i.e.,
**  *after* the argument expressions are read.  <funccall>  is 1 if this is a
**  function call, and 0 if this is a procedure call.  <nr>  is the number of
**  arguments. <options> is 1 if options were present after the ':' in which
**  case the options have been read already.
*/
extern  void            libGAP_IntrFuncCallBegin ( void );

extern  void            libGAP_IntrFuncCallEnd (
            libGAP_UInt                funccall,
	    libGAP_UInt                libGAP_options,
            libGAP_UInt                nr );

/****************************************************************************
**
*F  IntrFuncCallOptionsBegin() . . . .. . . . . .  interpret options, begin
*F  IntrFuncCallOptionsBeginElmName(<rnam>).  interpret options, begin element
*F  IntrFuncCallOptionsBeginElmExpr() . .. .  interpret options, begin element
*F  IntrFuncCallOptionsEndElm() . . .. .  . .  interpret options, end element
*F  IntrFuncCallOptionsEndElmEmpty() .. .  . .  interpret options, end element
*F  IntrFuncCallOptionsEnd(<nr>)  . . . . . . . .  interpret options, end
**
**  The net effect of all of these is to leave a record object on the stack
**  where IntrFuncCallEnd can use it
*/
extern void            libGAP_IntrFuncCallOptionsBegin ( void );

extern void            libGAP_IntrFuncCallOptionsBeginElmName ( libGAP_UInt rnam );

extern void            libGAP_IntrFuncCallOptionsBeginElmExpr ( void );

extern void            libGAP_IntrFuncCallOptionsEndElm ( void );

extern void            libGAP_IntrFuncCallOptionsEndElmEmpty ( void );

extern void            libGAP_IntrFuncCallOptionsEnd ( libGAP_UInt nr );

/****************************************************************************
**
*F  IntrFuncExprBegin(<narg>,<nloc>,<nams>,<startline>) .  interpret function expr, begin
*F  IntrFuncExprEnd(<nr>) . . . . . . . . . . .  interpret function expr, end
**
**  'IntrFuncExprBegin' is an action to interpret  a function expression.  It
**  is  called when   the reader  encounters  the  beginning  of  a  function
**  expression.  <narg> is the number of  arguments (-1 if the function takes
**  a variable number of arguments),  <nloc> is the  number of locals, <nams>
**  is a list of local variable names.
**
**  'IntrFuncExprEnd' is an action to interpret a function expression.  It is
**  called when the reader encounters the end  of a function expression. <nr>
**  is the number of statements in the body of the function.
*/
extern  void            libGAP_IntrFuncExprBegin (
            libGAP_Int                 narg,
            libGAP_Int                 nloc,
            libGAP_Obj                 nams,
	    libGAP_Int                 startLine);

extern  void            libGAP_IntrFuncExprEnd (
            libGAP_UInt                nr,
            libGAP_UInt                mapsto );


/****************************************************************************
**
*F  IntrIfBegin() . . . . . . . .  interpret if-statement, begin of statement
*F  IntrIfElif()  . . . . . . .  interpret if-statement, begin of elif-branch
*F  IntrIfElse()  . . . . . . .  interpret if-statement, begin of else-branch
*F  IntrIfBeginBody() . . . . . . . . . interpret if-statement, begin of body
*F  IntrIfEndBody(<nr>) . . . . . . . . . interpret if-statement, end of body
*F  IntrIfEnd(<nr>) . . . . . . . .  interpret if-statement, end of statement
**
**  'IntrIfBegin' is an  action to interpret  an if-statement.   It is called
**  when the reader encounters the   'if',  i.e., *before* the condition   is
**  read.
**
**  'IntrIfElif' is  an action to   interpret an if-statement.  It is  called
**  when the  reader encounters an  'elif', i.e.,  *before* the condition  is
**  read.
**
**  'IntrIfElse' is  an  action to interpret an   if-statement.  It is called
**  when the reader encounters an 'else'.
**
**  'IntrIfBeginBody'  is  an action to   interpret  an if-statement.  It  is
**  called when the reader encounters the beginning  of the statement body of
**  an 'if', 'elif', or 'else' branch, i.e., *after* the condition is read.
**
**  'IntrIfEndBody' is an action to interpret  an if-statement.  It is called
**  when the reader  encounters the end of  the  statements body of an  'if',
**  'elif', or 'else' branch.  <nr> is the number of statements in the body.
**
**  'IntrIfEnd' is an action to interpret an if-statement.  It is called when
**  the reader  encounters the end of the  statement.  <nr>  is the number of
**  'if', 'elif', or 'else' branches.
*/
extern  void            libGAP_IntrIfBegin ( void );

extern  void            libGAP_IntrIfElif ( void );

extern  void            libGAP_IntrIfElse ( void );

extern  void            libGAP_IntrIfBeginBody ( void );

extern  void            libGAP_IntrIfEndBody (
            libGAP_UInt                nr );

extern  void            libGAP_IntrIfEnd (
            libGAP_UInt                nr );


/****************************************************************************
**
*F  IntrForBegin()  . . . . . . . interpret for-statement, begin of statement
*F  IntrForIn() . . . . . . . . . . . . .  interpret for-statement, 'in'-read
*F  IntrForBeginBody()  . . . . . . .  interpret for-statement, begin of body
*F  IntrForEndBody(<nr>)  . . . . . . .  interpret for-statement, end of body
*F  IntrForEnd()  . . . . . . . . . interpret for-statement, end of statement
**
**  'IntrForBegin' is  an action to interpret  a for-statement.  It is called
**  when the   reader encounters the  'for', i.e.,  *before*  the variable is
**  read.
**
**  'IntrForIn' is an action to interpret a for-statement.  It is called when
**  the  reader encounters the 'in', i.e.,  *after* the variable is read, but
**  *before* the list expression is read.
**
**  'IntrForBeginBody'  is  an action to interpret   a for-statement.   It is
**  called when  the reader encounters  the beginning  of the statement body,
**  i.e., *after* the list expression is read.
**
**  'IntrForEndBody' is an action to interpret a for-statement.  It is called
**  when the  reader encounters the  end of the  statement body.  <nr> is the
**  number of statements in the body.
**
**  'IntrForEnd' is an  action  to interpret a  for-statement.   It is called
**  when the  reader encounters the end of  the statement,  i.e., immediately
**  after 'IntrForEndBody'.
**
**  Since loops cannot be interpreted immediately,  the interpreter calls the
**  coder  to create a  procedure (with no arguments) and  calls that.
*/
extern  void            libGAP_IntrForBegin ( void );

extern  void            libGAP_IntrForIn ( void );

extern  void            libGAP_IntrForBeginBody ( void );

extern  void            libGAP_IntrForEndBody (
            libGAP_UInt                nr );

extern  void            libGAP_IntrForEnd ( void );


/****************************************************************************
**
*F  IntrWhileBegin()  . . . . . interpret while-statement, begin of statement
*F  IntrWhileBeginBody()  . . . . .  interpret while-statement, begin of body
*F  IntrWhileEndBody(<nr>)  . . . . .  interpret while-statement, end of body
*F  IntrWhileEnd()  . . . . . . . interpret while-statement, end of statement
**
**  'IntrWhileBegin' is   an action to  interpret   a while-statement.  It is
**  called when the    reader encounters the    'while', i.e., *before*   the
**  condition is read.
**
**  'IntrWhileBeginBody' is an action  to interpret a while-statement.  It is
**  called when the reader encounters  the  beginning of the statement  body,
**  i.e., *after* the condition is read.
**
**  'IntrWhileEndBody' is  an action to interpret   a while-statement.  It is
**  called when the reader encounters the end of the statement body.  <nr> is
**  the number of statements in the body.
**
**  'IntrWhileEnd' is an action to interpret a while-statement.  It is called
**  when  the reader encounters  the  end of  the  statement, i.e., immediate
**  after 'IntrWhileEndBody'.
**
**  Since loops cannot be interpreted immediately,  the interpreter calls the
**  coder  to create a  procedure (with no arguments) and  calls that.
*/
extern  void            libGAP_IntrWhileBegin ( void );

extern  void            libGAP_IntrWhileBeginBody ( void );

extern  void            libGAP_IntrWhileEndBody (
            libGAP_UInt                nr );

extern  void            libGAP_IntrWhileEnd ( void );

extern void libGAP_IntrQualifiedExprBegin( libGAP_UInt access);

extern void libGAP_IntrQualifiedExprEnd( void);


/****************************************************************************
**
*F  IntrAtomicBegin()  . . . . . interpret atomic-statement, begin of statement
*F  IntrAtomicBeginBody()  . . . . .  interpret atomic-statement, begin of body
*F  IntrAtomicEndBody(<nr>)  . . . . .  interpret atomic-statement, end of body
*F  IntrAtomicEnd()  . . . . . . . interpret atomic-statement, end of statement
**
**  'IntrAtomicBegin' is   an action to  interpret   a atomic-statement.  It is
**  called when the    reader encounters the    'atomic', i.e., *before*   the
**  condition is read.
**
**  'IntrAtomicBeginBody' is an action  to interpret a atomic-statement.  It is
**  called when the reader encounters  the  beginning of the statement  body,
**  i.e., *after* the expressions to be locked have been read. <nrexprs> is the number of such 
**  expressions
**
**  'IntrAtomicEndBody' is  an action to interpret   a atomic-statement.  It is
**  called when the reader encounters the end of the statement body.  <nr> is
**  the number of statements in the body.
**
**  'IntrAtomicEnd' is an action to interpret a atomic-statement.  It is called
**  when  the reader encounters  the  end of  the  statement, i.e., immediate
**  after 'IntrAtomicEndBody'.
**
**  These functions are just placeholders for future HPC-GAP code
*/

extern  void            libGAP_IntrAtomicBegin ( void );

extern  void            libGAP_IntrAtomicBeginBody ( libGAP_UInt nrexprs );

extern  void            libGAP_IntrAtomicEndBody (
            libGAP_Int                nrstats );

extern  void            libGAP_IntrAtomicEnd ( void );


/****************************************************************************
**
*F  IntrRepeatBegin() . . . .  interpret repeat-statement, begin of statement
*F  IntrRepeatBeginBody() . . . . . interpret repeat-statement, begin of body
*F  IntrRepeatEndBody(<nr>) . . . . . interpret repeat-statement, end of body
*F  IntrRepeatEnd() . . . . . .  interpret repeat-statement, end of statement
**
**  'IntrRepeatBegin"  is an action to interpret  a  repeat-statement.  It is
**  called when the read encounters the 'repeat'.
**
**  'IntrRepeatBeginBody' is an action  to interpret a  repeat-statement.  It
**  is called when the reader encounters the beginning of the statement body,
**  i.e., immediately after 'IntrRepeatBegin'.
**
**  'IntrRepeatEndBody' is an action  to interpret a repeat-statement.  It is
**  called when the reader  encounters the end of  the statement  body, i.e.,
**  *before* the condition is read.  <nr> is the  number of statements in the
**  body.
**
**  'IntrRepeatEnd' is  an  action to interpret  a repeat-statement.    It is
**  called when the reader encounters the end of the statement, i.e., *after*
**  the condition is read.
**
**  Since loops cannot be interpreted immediately,  the interpreter calls the
**  coder  to create a  procedure (with no arguments) and  calls that.
*/
extern  void            libGAP_IntrRepeatBegin ( void );

extern  void            libGAP_IntrRepeatBeginBody ( void );

extern  void            libGAP_IntrRepeatEndBody (
            libGAP_UInt                nr );

extern  void            libGAP_IntrRepeatEnd ( void );


/****************************************************************************
**
*F  IntrBreak() . . . . . . . . . . . . . . . . . . interpret break-statement
**
**  'IntrBreak'  is the action to interpret  a break-statement.  It is called
**  when the reader encounters a 'break;'.
**
**  Break-statements are  always coded (if  they are not ignored), since they
**  can only appear in loops.
*/
extern  void            libGAP_IntrBreak ( void );


/****************************************************************************
**
*F  IntrReturnObj() . . . . . . . . . . . .  interpret return-value-statement
**
**  'IntrReturnObj' is the action  to interpret a return-value-statement.  It
**  is  called when  the reader encounters  a  'return  <expr>;', but *after*
**  reading the expression <expr>.
*/
extern  void            libGAP_IntrReturnObj ( void );


/****************************************************************************
**
*F  IntrReturnVoid()  . . . . . . . . . . . . interpret return-void-statement
**
**  'IntrReturnVoid' is the action to interpret  a return-void-statement.  It
**  is called when the reader encounters a 'return;'.
*/
extern  void            libGAP_IntrReturnVoid ( void );


/****************************************************************************
**
*F  IntrQuit()  . . . . . . . . . . . . . . . . . .  interpret quit-statement
**
**  'IntrQuit' is the  action to interpret   a quit-statement.  It  is called
**  when the reader encounters a 'quit;'.
*/
extern  void            libGAP_IntrQuit ( void );

/****************************************************************************
**
*F  IntrQUIT()  . . . . . . . . . . . . . . . . . .  interpret QUIT-statement
**
**  'IntrQUIT' is the  action to interpret   a QUIT-statement.  It  is called
**  when the reader encounters a 'QUIT;'.
*/
extern  void            libGAP_IntrQUIT ( void );


/****************************************************************************
**
*F  IntrOrL() . . . . . . . . . .  interpret or-expression, left operand read
*F  IntrOr()  . . . . . . . . . . interpret or-expression, right operand read
**
**  'IntrOrL' is an action to interpret an or-expression.   It is called when
**  the reader encounters the 'or' keyword, i.e., *after* the left operand is
**  read by *before* the right operand is read.
**
**  'IntrOr' is an action to  interpret an or-expression.   It is called when
**  the reader encountered  the  end of  the  expression, i.e., *after*  both
**  operands are read.
*/
extern  void            libGAP_IntrOrL ( void );

extern  void            libGAP_IntrOr ( void );


/****************************************************************************
**
*F  IntrAndL()  . . . . . . . . . interpret and-expression, left operand read
*F  IntrAnd() . . . . . . . . .  interpret and-expression, right operand read
**
**  'IntrAndL' is  an action  to interpret an   and-expression.  It is called
**  when the reader  encounters the  'and'  keyword, i.e., *after*  the  left
**  operand is read by *before* the right operand is read.
**
**  'IntrAnd' is an action to interpret an and-expression.  It is called when
**  the reader encountered   the end of   the expression, i.e., *after*  both
**  operands are read.
*/
extern  void            libGAP_IntrAndL ( void );

extern  void            libGAP_IntrAnd ( void );


/****************************************************************************
**
*F  IntrNot() . . . . . . . . . . . . . . . . . . .  interpret not-expression
**
**  'IntrNot' is the action to interpret a not-expression.  It is called when
**  the reader encounters a not-expression, *after* the operand is read.
*/
extern  void            libGAP_IntrNot ( void );


/****************************************************************************
**
*F  IntrEq()  . . . . . . . . . . . . . . . . . . . .  interpret =-expression
*F  IntrNe()  . . . . . . . . . . . . . . . . . . . . interpret <>-expression
*F  IntrLt()  . . . . . . . . . . . . . . . . . . . . interpret  <-expression
*F  IntrGe()  . . . . . . . . . . . . . . . . . . . . interpret >=-expression
*F  IntrGt()  . . . . . . . . . . . . . . . . . . . . interpret >-expression
*F  IntrLe()  . . . . . . . . . . . . . . . . . . . . interpret <=-expression
**
**  'IntrEq', 'IntrNe', 'IntrLt', 'IntrGe', 'IntrGt',   and 'IntrLe' are  the
**  actions to interpret the respective operator expression.  They are called
**  by the reader *after* *both* operands are read.
*/
extern  void            libGAP_IntrEq ( void );

extern  void            libGAP_IntrNe ( void );

extern  void            libGAP_IntrLt ( void );

extern  void            libGAP_IntrGe ( void );

extern  void            libGAP_IntrGt ( void );

extern  void            libGAP_IntrLe ( void );


/****************************************************************************
**
*F  IntrIn()  . . . . . . . . . . . . . . . . . . . . interpret in-expression
**
**  'IntrIn'  is the action  to interpret an  in-expression.  It is called by
**  the reader *after* *both* operands are read.
*/
extern  void            libGAP_IntrIn ( void );


/****************************************************************************
**
*F  IntrSum() . . . . . . . . . . . . . . . . . . . .  interpret +-expression
*F  IntrAInv()  . . . . . . . . . . . . . . . .  interpret unary --expression
*F  IntrDiff()  . . . . . . . . . . . . . . . . . . .  interpret --expression
*F  IntrProd()  . . . . . . . . . . . . . . . . . . .  interpret *-expression
*F  IntrInv() . . . . . . . . . . . . . . . . . . .  interpret ^-1-expression
*F  IntrQuo() . . . . . . . . . . . . . . . . . . . .  interpret /-expression
*F  IntrMod()   . . . . . . . . . . . . . . . . . .  interpret mod-expression
*F  IntrPow() . . . . . . . . . . . . . . . . . . . .  interpret ^-expression
**
**  'IntrSum', 'IntrDiff',  'IntrProd',  'IntrQuo',  'IntrMod', and 'IntrPow'
**  are  the actions to interpret  the  respective operator expression.  They
**  are called by the reader *after* *both* operands are read.
*/
extern  void            libGAP_IntrSum ( void );

extern  void            libGAP_IntrAInv ( void );

extern  void            libGAP_IntrDiff ( void );

extern  void            libGAP_IntrProd ( void );

extern  void            libGAP_IntrInv ( void );

extern  void            libGAP_IntrQuo ( void );

extern  void            libGAP_IntrMod ( void );

extern  void            libGAP_IntrPow ( void );


/****************************************************************************
**
*F  IntrIntExpr(<str>)  . . . . . . . .  interpret literal integer expression
**
**  'IntrIntExpr' is the action  to  interpret a literal  integer expression.
**  <str> is the integer as a (null terminated) C character string.
*/
extern  void            libGAP_IntrIntExpr (
            libGAP_Char *              str );
extern  void            libGAP_IntrLongIntExpr (
            libGAP_Obj                 string );

/****************************************************************************
**
*F  IntrFloatExpr(<str>)  . . . . . . . .  interpret literal float expression
**
**  'IntrFloatExpr' is the action  to  interpret a literal  float expression.
**  <str> is the float as a (null terminated) C character string.
*/
extern  void            libGAP_IntrFloatExpr (
            libGAP_Char *              str );
extern  void            libGAP_IntrLongFloatExpr (
            libGAP_Obj                 string );

/****************************************************************************
**
*F  IntrTrueExpr()  . . . . . . . . . . . . interpret literal true expression
**
**  'IntrTrueExpr' is the action to interpret a literal true expression.
*/
extern  void            libGAP_IntrTrueExpr ( void );


/****************************************************************************
**
*F  IntrFalseExpr() . . . . . . . . . . .  interpret literal false expression
**
**  'IntrFalseExpr' is the action to interpret a literal false expression.
*/
extern  void            libGAP_IntrFalseExpr ( void );


/****************************************************************************
**
*F  IntrCharExpr(<chr>) . . . . . . .  interpret literal character expression
**
**  'IntrCharExpr' is the action to interpret a literal character expression.
**  <chr> is the C character.
*/
extern  void            libGAP_IntrCharExpr (
            libGAP_Char                chr );


/****************************************************************************
**
*F  IntrPermCycle(<nr>) . . . . . .  interpret literal permutation expression
*F  IntrPerm(<nr>)  . . . . . . . .  interpret literal permutation expression
*/
extern  void            libGAP_IntrPermCycle (
            libGAP_UInt                nrx,
            libGAP_UInt                nrc );

extern  void            libGAP_IntrPerm (
            libGAP_UInt                nrc );


/****************************************************************************
**
*F  IntrListExprBegin(<top>)  . . . . . . . . . .  interpret list expr, begin
*F  IntrListExprBeginElm(<pos>) . . . . .  interpret list expr, begin element
*F  IntrListExprEndElm()  . . . . . . . . .  interpret list expr, end element
*F  IntrListExprEnd(<nr>,<range>,<top>,<tilde>) . .  interpret list expr, end
*/
extern  void            libGAP_IntrListExprBegin (
            libGAP_UInt                top );

extern  void            libGAP_IntrListExprBeginElm (
            libGAP_UInt                pos );

extern  void            libGAP_IntrListExprEndElm ( void );

extern  void            libGAP_IntrListExprEnd (
            libGAP_UInt                nr,
            libGAP_UInt                range,
            libGAP_UInt                top,
            libGAP_UInt                tilde );


/****************************************************************************
**
*F  IntrStringExpr(<str>) . . . . . . . . interpret literal string expression
*/
extern  void            libGAP_IntrStringExpr (
            libGAP_Obj                 string );


/****************************************************************************
**
*F  IntrRecExprBegin(<top>) . . . . . . . . . .  interpret record expr, begin
*F  IntrRecExprBeginElmName(<rnam>) . .  interpret record expr, begin element
*F  IntrRecExprBeginElmExpr() . . . . .  interpret record expr, begin element
*F  IntrRecExprEndElmExpr() . . . . . . .  interpret record expr, end element
*F  IntrRecExprEnd(<nr>,<top>,<tilde>)  . . . . .  interpret record expr, end
*/
extern  void            libGAP_IntrRecExprBegin (
            libGAP_UInt                top );

extern  void            libGAP_IntrRecExprBeginElmName (
            libGAP_UInt                rnam );

extern  void            libGAP_IntrRecExprBeginElmExpr ( void );

extern  void            libGAP_IntrRecExprEndElm ( void );

extern  void            libGAP_IntrRecExprEnd (
            libGAP_UInt                nr,
            libGAP_UInt                top,
            libGAP_UInt                tilde );


/****************************************************************************
**
*F  IntrAssLVar(<lvar>) . . . . . . . . . . . . interpret assignment to local
*/
extern  void            libGAP_IntrAssLVar (
            libGAP_UInt                lvar );

extern  void            libGAP_IntrUnbLVar (
            libGAP_UInt                lvar );


/****************************************************************************
**
*F  IntrRefLVar(<lvar>) . . . . . . . . . . . .  interpret reference to local
*/
extern  void            libGAP_IntrRefLVar (
            libGAP_UInt                lvar );

extern  void            libGAP_IntrIsbLVar (
            libGAP_UInt                lvar );


/****************************************************************************
**
*F  IntrAssHVar(<hvar>) . . . . . . . . . . .  interpret assignment to higher
*/
extern  void            libGAP_IntrAssHVar (
            libGAP_UInt                hvar );

extern  void            libGAP_IntrUnbHVar (
            libGAP_UInt                hvar );


/****************************************************************************
**
*F  IntrRefHVar(<hvar>) . . . . . . . . . . . . interpret reference to higher
*/
extern  void            libGAP_IntrRefHVar (
            libGAP_UInt                hvar );

extern  void            libGAP_IntrIsbHVar (
            libGAP_UInt                hvar );


/****************************************************************************
**
*F  IntrAssDVar(<dvar>) . . . . . . . . . . . . interpret assignment to debug
*/
extern  void            libGAP_IntrAssDVar (
            libGAP_UInt                dvar,
            libGAP_UInt                depth );

extern  void            libGAP_IntrUnbDVar (
            libGAP_UInt                dvar,
            libGAP_UInt                depth );


/****************************************************************************
**
*F  IntrRefDVar(<dvar>) . . . . . . . . . . . .  interpret reference to debug
*/
extern  void            libGAP_IntrRefDVar (
            libGAP_UInt                dvar,
            libGAP_UInt                depth );

extern  void            libGAP_IntrIsbDVar (
            libGAP_UInt                dvar,
            libGAP_UInt                depth );


/****************************************************************************
**
*F  IntrAssGVar(<gvar>) . . . . . . . . . . .  interpret assignment to global
*/
extern  void            libGAP_IntrAssGVar (
            libGAP_UInt                gvar );

extern  void            libGAP_IntrUnbGVar (
            libGAP_UInt                gvar );


/****************************************************************************
**
*F  IntrRefGVar(<gvar>) . . . . . . . . . . . . interpret reference to global
*/
extern  void            libGAP_IntrRefGVar (
            libGAP_UInt                gvar );

extern  void            libGAP_IntrIsbGVar (
            libGAP_UInt                gvar );


/****************************************************************************
**
*F  IntrAssList() . . . . . . . . . . . . . .  interpret assignment to a list
*F  IntrAsssList()  . . . . . . . . . interpret multiple assignment to a list
*F  IntrAssListLevel(<level>) . . . . . interpret assignment to several lists
*F  IntrAsssListLevel(<level>)  . . intr multiple assignment to several lists
*/
extern  void            libGAP_IntrAssList ( libGAP_Int narg );

extern  void            libGAP_IntrAsssList ( void );

extern  void            libGAP_IntrAssListLevel ( libGAP_Int narg,
            libGAP_UInt                level );

extern  void            libGAP_IntrAsssListLevel (
            libGAP_UInt                level );

extern  void            libGAP_IntrUnbList (libGAP_Int narg );


/****************************************************************************
**
*F  IntrElmList() . . . . . . . . . . . . . . . interpret selection of a list
*F  IntrElmsList()  . . . . . . . . .  interpret multiple selection of a list
*F  IntrElmListLevel(<level>) . . . . .  interpret selection of several lists
*F  IntrElmsListLevel(<level>)  . .  intr multiple selection of several lists
*/
extern  void            libGAP_IntrElmList ( libGAP_Int narg);

extern  void            libGAP_IntrElmsList ( void );

extern  void            libGAP_IntrElmListLevel ( libGAP_Int narg,
            libGAP_UInt                level );

extern  void            libGAP_IntrElmsListLevel (
            libGAP_UInt                level );

extern  void            libGAP_IntrIsbList ( libGAP_Int narg );


/****************************************************************************
**
*F  IntrAssRecName(<rnam>)  . . . . . . . .  interpret assignment to a record
*F  IntrAssRecExpr()  . . . . . . . . . . .  interpret assignment to a record
*/
extern  void            libGAP_IntrAssRecName (
            libGAP_UInt                rnam );

extern  void            libGAP_IntrAssRecExpr ( void );

extern  void            libGAP_IntrUnbRecName (
            libGAP_UInt                rnam );

extern  void            libGAP_IntrUnbRecExpr ( void );


/****************************************************************************
**
*F  IntrElmRecName(<rnam>)  . . . . . . . . . interpret selection of a record
*F  IntrElmRecExpr()  . . . . . . . . . . . . interpret selection of a record
*/
extern  void            libGAP_IntrElmRecName (
            libGAP_UInt                rnam );

extern  void            libGAP_IntrElmRecExpr ( void );

extern  void            libGAP_IntrIsbRecName (
            libGAP_UInt                rnam );

extern  void            libGAP_IntrIsbRecExpr ( void );


/****************************************************************************
**
*F  IntrAssPosObj() . . . . . . . . . . . . . .  interpret assignment to a list
*F  IntrAsssPosObj()  . . . . . . . . . interpret multiple assignment to a list
*F  IntrAssPosObjLevel(<level>) . . . . . interpret assignment to several lists
*F  IntrAsssPosObjLevel(<level>)  . . intr multiple assignment to several lists
*/
extern  void            libGAP_IntrAssPosObj ( void );

extern  void            libGAP_IntrAsssPosObj ( void );

extern  void            libGAP_IntrAssPosObjLevel (
            libGAP_UInt                level );

extern  void            libGAP_IntrAsssPosObjLevel (
            libGAP_UInt                level );

extern  void            libGAP_IntrUnbPosObj ( void );


/****************************************************************************
**
*F  IntrElmPosObj() . . . . . . . . . . . . . . . interpret selection of a list
*F  IntrElmsPosObj()  . . . . . . . . .  interpret multiple selection of a list
*F  IntrElmPosObjLevel(<level>) . . . . .  interpret selection of several lists
*F  IntrElmsPosObjLevel(<level>)  . .  intr multiple selection of several lists
*/
extern  void            libGAP_IntrElmPosObj ( void );

extern  void            libGAP_IntrElmsPosObj ( void );

extern  void            libGAP_IntrElmPosObjLevel (
            libGAP_UInt                level );

extern  void            libGAP_IntrElmsPosObjLevel (
            libGAP_UInt                level );

extern  void            libGAP_IntrIsbPosObj ( void );


/****************************************************************************
**
*F  IntrAssComObjName(<rnam>) . . . . . . . .  interpret assignment to a record
*F  IntrAssComObjExpr() . . . . . . . . . . .  interpret assignment to a record
*/
extern  void            libGAP_IntrAssComObjName (
            libGAP_UInt                rnam );

extern  void            libGAP_IntrAssComObjExpr ( void );

extern  void            libGAP_IntrUnbComObjName (
            libGAP_UInt                rnam );

extern  void            libGAP_IntrUnbComObjExpr ( void );


/****************************************************************************
**
*F  IntrElmComObjName(<rnam>) . . . . . . . . . interpret selection of a record
*F  IntrElmComObjExpr() . . . . . . . . . . . . interpret selection of a record
*/
extern  void            libGAP_IntrElmComObjName (
            libGAP_UInt                rnam );

extern  void            libGAP_IntrElmComObjExpr ( void );

extern  void            libGAP_IntrIsbComObjName (
            libGAP_UInt                rnam );

extern  void            libGAP_IntrIsbComObjExpr ( void );

/****************************************************************************
**
*F  IntrEmpty() . . . . . . . . . . . . .  Interpret an empty statement body
**
*/

extern void             libGAP_IntrEmpty ( void );

/****************************************************************************
**
*F  IntrInfoBegin() . . . . . . . . .  start interpretation of Info statement
*F  IntrInfoMiddle()  . . . . . .  shift to interpreting printable arguments
*F  IntrInfoEnd( <narg> ) . . Info statement complete, <narg> things to print
*V  InfoDecision . . . . . . . . . . .  fopy of the InfoDecision GAP function
*V  InfoDoPrint  . . . . . . . . . . .  fopy of the InfoDoPrint GAP function
*/

extern void             libGAP_IntrInfoBegin ( void );
extern void             libGAP_IntrInfoMiddle( void );
extern void             libGAP_IntrInfoEnd   (
           libGAP_UInt                   narg );
extern libGAP_Obj              libGAP_InfoDecision;
extern libGAP_Obj              libGAP_InfoDoPrint;


/****************************************************************************
**
*F  IntrAssertBegin() . . . . . . .  start interpretation of Assert statement
*F  IntrAsseerAfterLevel()  . . called after the first argument has been read
**
**  At this stage, we can decide whether to evaluate the second argument --
**   the check in question
**
*F  IntrAssertAfterCondition() called after the second argument has been read
**
**  At this point we know whether there is an assertion failure. We still need
**  to read the third argument if any, to decide what to do about it One of:
**
*F  IntrAssertEnd2Args() . . . .  called after reading the closing parenthesis
*F  IntrAssertEnd3Args() . . . .  called after reading the closing parenthesis
**
*V  CurrentAssertionLevel . . . .  . . . . . . . . . . . . copy of GAP variable
*/

extern void             libGAP_IntrAssertBegin ( void );
extern void             libGAP_IntrAssertAfterLevel ( void );
extern void             libGAP_IntrAssertAfterCondition ( void );
extern void             libGAP_IntrAssertEnd2Args ( void );
extern void             libGAP_IntrAssertEnd3Args ( void );

extern libGAP_Obj              libGAP_CurrentAssertionLevel;

/****************************************************************************
**
*F  IntrSaveWSBegin() . . . . . . . . . . . . . Start interpeting a save WS
**
*F  IntrSaveWSEnd() . . . . . . . . . . . . . . Actually save the workspace
**
**  'IntrSaveWSBegin' is called when the reader starts reading a
**  SaveWorkspace command. 
*/

extern void              libGAP_IntrSaveWSBegin ( void );

extern void              libGAP_IntrSaveWSEnd ( void );     

/****************************************************************************
*F  IntrContinue() . . . . . . . . . . . . . . . interpret continue-statement
*/
extern void            libGAP_IntrContinue ( void );

/****************************************************************************
*F  PushVoidObj() . . . . . . . . . . . . . .  push void value onto the stack
*/
extern void            libGAP_PushVoidObj ( void );

/****************************************************************************
**

*F * * * * * * * * * * * * * initialize package * * * * * * * * * * * * * * *
*/


/****************************************************************************
**

*F  InitInfoIntrprtr()  . . . . . . . . . . . . . . . table of init functions
*/
libGAP_StructInitInfo * libGAP_InitInfoIntrprtr ( void );


#endif // GAP_INTRPRTR_H

/****************************************************************************
**

*E  intrprtr.h  . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
*/
