Skip to content
Snippets Groups Projects
Commit c5576612 authored by Wuttke, Joachim's avatar Wuttke, Joachim Committed by Wuttke, Joachim
Browse files

cleanup

parent 2066e064
No related branches found
No related tags found
No related merge requests found
......@@ -148,33 +148,6 @@ class CNodeVal: public CNode {
};
//! Indexed variable node.
class CNodeIva: public CNode {
private:
RVar var;
RRef ref;
void npar_exec( int *np ) const;
public:
CNodeIva( RVar _var, RRef _ref=RRef( new CRef() ) ) : var(_var), ref(_ref) {}
const RObj tree_val( const CContext& ctx ) const;
void kdep_exec( bool *kd ) const { *kd = true; }
void set_coord( CCoord& ret, int k ) const;
string tree_info() const;
};
//! Indexed variable node.
class CNodeSessionNK: public CNode {
public:
const RObj tree_val( const CContext& ctx ) const;
void kdep_exec( bool *kd ) const { *kd = false; }
void set_coord( CCoord& ret, int k ) const { ret = CCoord("nk", ""); }
string tree_info() const { return "nk {number of online files}"; }
};
//! Index node base class.
class CNodeIdx: public CNode {
......@@ -213,6 +186,33 @@ class CNodeIdxK: public CNodeIdx {
};
//! Session-wide workspace information: NK = number of online files.
class CNodeSessionNK: public CNode {
public:
const RObj tree_val( const CContext& ctx ) const;
void kdep_exec( bool *kd ) const { *kd = false; }
void set_coord( CCoord& ret, int k ) const { ret = CCoord("nk", ""); }
string tree_info() const { return "nk {number of online files}"; }
};
//! Indexed variable node.
class CNodeIva: public CNode {
private:
RVar var;
RRef ref;
void npar_exec( int *np ) const;
public:
CNodeIva( RVar _var, RRef _ref=RRef( new CRef() ) ) : var(_var), ref(_ref) {}
const RObj tree_val( const CContext& ctx ) const;
void kdep_exec( bool *kd ) const { *kd = true; }
void set_coord( CCoord& ret, int k ) const;
string tree_info() const;
};
//! Identifier node.
class CNodeIdf: public CNode {
......
......@@ -104,7 +104,7 @@ range:
exp: /* scalar expression */
VAL { $$.t = $1.t; }
| REF bra3 { $$.t = RNode( new CNodeIva( $1.v, $2.r ) ); }
| REF bra3 { $$.t = RNode( new CNodeIva( $1.v, $2.r ) ); }
| IDF { $$.t = RNode( new CNodeIdf( (PCAST<const CObjStr>($1.o))->to_s() ) ); }
| DUMMY { $$.t = RNode( new CNodeDummy() ); }
| CEV bra2 '(' exp ')' { $$.t = RNode( new CNodeCev( $2.r, $4.t ) ); }
......@@ -121,7 +121,7 @@ exp: /* scalar expression */
$$.t = RNode( new CNodeFun2( (const CFunc*) $1.p, $3.t, $5.t ) ); }
| FNCT '(' exp ',' exp ',' exp ')' {
$$.t = RNode( new CNodeFun3((const CFunc*) $1.p, $3.t, $5.t, $7.t) );}
| GENI bra2 { $$.t = RNode( new CNodeGeni( (const CGeni*) $1.p, $2.r) ); }
| GENI bra2 { $$.t = RNode( new CNodeGeni( (const CGeni*) $1.p, $2.r) ); }
| GENI '(' exp ')' { $$.t = RNode( new CNodeGeni( (const CGeni*) $1.p, $3.t) ); }
| GENI '(' exp ',' exp ')' {
$$.t = RNode( new CNodeGeni( (const CGeni*) $1.p, $3.t, $5.t) ); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment