MixRule Struct Reference


Public Member Functions

bool isInfix () const
 Return true iff this is an infix rule.
bool isPrefix () const
bool isClosed () const
bool isPostfix () const
bool isHole (size_t pos)
bool isKwd (size_t pos)
bool isInitialHole (size_t pos)
bool isFinalHole (size_t pos)
bool hasLeadingHole ()
bool hasTrailingHole ()
 MixRule (SyntacticCategory _sc, const std::string &_nm, int _prec, Associativity _assoc=assoc_none)
void PrettyPrint (INOstream &out) const

Static Public Member Functions

static shared_ptr< MixRulemake (SyntacticCategory _sc, const std::string &_nm, int _prec, Associativity _assoc=assoc_none)

Data Fields

std::string name
 Summary name of this mix rule.
MixElemVec rhs
 Exploded elements of the right-hand side of the production.
int fixity
 Fixity - extracted mainly for doc and debug purposes.
SyntacticCategory sc
 The syntactic category that this rule matches.
int prec
 Precedence for this production (infix only).
Associativity assoc
 Associativity for this rule.

Detailed Description

Definition at line 217 of file MixFix.cxx.


Constructor & Destructor Documentation

MixRule::MixRule ( SyntacticCategory  _sc,
const std::string &  _nm,
int  _prec,
Associativity  _assoc = assoc_none 
) [inline]

Definition at line 274 of file MixFix.cxx.

References assoc, name, prec, and sc.

Referenced by make().


Member Function Documentation

bool MixRule::hasLeadingHole (  )  [inline]

Definition at line 260 of file MixFix.cxx.

References fixity, infix, and postfix.

bool MixRule::hasTrailingHole (  )  [inline]

Definition at line 264 of file MixFix.cxx.

References fixity, infix, and prefix.

bool MixRule::isClosed (  )  const [inline]

Definition at line 241 of file MixFix.cxx.

References closed, and fixity.

bool MixRule::isFinalHole ( size_t  pos  )  [inline]

Definition at line 256 of file MixFix.cxx.

References isHole(), and rhs.

bool MixRule::isHole ( size_t  pos  )  [inline]

Definition at line 244 of file MixFix.cxx.

References msc_keyword, rhs, and sc.

Referenced by isFinalHole(), and isInitialHole().

bool MixRule::isInfix (  )  const [inline]

Return true iff this is an infix rule.

Definition at line 239 of file MixFix.cxx.

References fixity, and infix.

bool MixRule::isInitialHole ( size_t  pos  )  [inline]

Definition at line 252 of file MixFix.cxx.

References isHole().

bool MixRule::isKwd ( size_t  pos  )  [inline]

Definition at line 248 of file MixFix.cxx.

References msc_keyword, rhs, and sc.

bool MixRule::isPostfix (  )  const [inline]

Definition at line 242 of file MixFix.cxx.

References fixity, and postfix.

bool MixRule::isPrefix (  )  const [inline]

Definition at line 240 of file MixFix.cxx.

References fixity, and prefix.

static shared_ptr<MixRule> MixRule::make ( SyntacticCategory  _sc,
const std::string &  _nm,
int  _prec,
Associativity  _assoc = assoc_none 
) [inline, static]

Definition at line 285 of file MixFix.cxx.

References MixRule().

void MixRule::PrettyPrint ( INOstream out  )  const

Definition at line 378 of file MixFix.cxx.

References assoc, assoc_left, assoc_none, assoc_right, closed, fixity, infix, name, postfix, prec, and prefix.

Referenced by operator<<().


Field Documentation

Associativity MixRule::assoc

Associativity for this rule.

This can only be assoc_left or assoc_right for infix rules.

Definition at line 236 of file MixFix.cxx.

Referenced by MixRule(), and PrettyPrint().

int MixRule::fixity

Fixity - extracted mainly for doc and debug purposes.

Definition at line 225 of file MixFix.cxx.

Referenced by hasLeadingHole(), hasTrailingHole(), isClosed(), isInfix(), isPostfix(), isPrefix(), and PrettyPrint().

std::string MixRule::name

Summary name of this mix rule.

Definition at line 219 of file MixFix.cxx.

Referenced by MixRule(), and PrettyPrint().

int MixRule::prec

Precedence for this production (infix only).

Definition at line 231 of file MixFix.cxx.

Referenced by MixRule(), and PrettyPrint().

MixElemVec MixRule::rhs

Exploded elements of the right-hand side of the production.

Definition at line 222 of file MixFix.cxx.

Referenced by isFinalHole(), isHole(), and isKwd().

SyntacticCategory MixRule::sc

The syntactic category that this rule matches.

Definition at line 228 of file MixFix.cxx.

Referenced by isHole(), isKwd(), and MixRule().


The documentation for this struct was generated from the following file:
Generated on Fri May 18 07:59:18 2012 for BitC Compiler by  doxygen 1.4.7