/*------------------------------------------------------------------*/ /* expr.h */ /*------------------------------------------------------------------*/ #ifndef EXPR_INCLUDED #define EXPR_INCLUDED typedef struct Expr *Expr_T; /* These functions are called by the Parser module: */ Expr_T Expr_newNumber(int iNumber); /* Return a new "number" Expr_T whose number is iNumber. It is a checked runtime error for iNumber to be anything but 0 or 1. */ Expr_T Expr_newInputRef(int iIndex); /* Return a new "input reference" Expr_T that references the Circuit input whose index is iIndex. It is a checked runtime error for iIndex to be negative. */ Expr_T Expr_newFlipFlopRef(int iIndex); /* Return a new "flip flop reference" Expr_T that references the Circuit flip flop whose index is iIndex. It is a checked runtime error for iIndex to be negative. */ Expr_T Expr_newNot(Expr_T oRightExpr); /* Return a new "not" Expr_T whose subexpression is oRightExpr. It is a checked runtime error for oRightExpr to be NULL. */ Expr_T Expr_newAnd(Expr_T oLeftExpr, Expr_T oRightExpr); /* Return a new "and" Expr_T whose left subexpression is oLeftExpr and whose right subexpression is oRightExpr. It is a checked runtime error for oLeftExpr or oRightExpr to be NULL. */ Expr_T Expr_newOr(Expr_T oLeftExpr, Expr_T oRightExpr); /* Return a new "or" Expr_T whose left subexpression is oLeftExpr and whose right subexpression is oRightExpr. It is a checked runtime error for oLeftExpr or oRightExpr to be NULL. */ #endif