WSF
WsfGrammar::Parser Class Reference

#include <Parser.h>

Collaboration diagram for WsfGrammar::Parser:

Public Types

enum  {
  _EOF = 0 , _string_literal = 1 , _label = 2 , _word = 3 ,
  _gt = 4 , _lt = 5 , _star = 6 , _question = 7 ,
  _plus = 8 , _alternate = 9 , _colon = 10 , _comma = 11 ,
  _assign = 12 , _dot = 13
}
typedef std::vector< std::string > StringVector

Public Member Functions

void SynErr (int n)
void Get ()
void Expect (int n)
bool StartOf (int s)
void ExpectWeak (int n, int follow)
bool WeakSeparator (int n, int syFol, int repFol)
bool HasVarAssign ()
std::string Str (Token *t)
void Unescape (std::string &s)
std::string Strlit (Token *t)
void Clear ()
 Parser (Scanner *scanner)
 ~Parser ()
void SemErr (const wchar_t *msg)
void StringLiteral (std::string &s)
void PlainWord (std::string &s)
void Parameter (M::Expr &p)
void Rule (M::Expr &r)
void SequencePart (M::Expr &s)
void Sequence (M::Expr &s)
void Action (M::Expr &r)
void Alternates (M::Expr &a)
void Recurrence (M::Expr &lhs)
void RuleExpr (M::Expr &r)
void ActionRHS (M::Expr &rhsRule)
void ActionExpr (M::Expr &r)
void WsfGrammar ()
void Parse ()
void InitParse ()

Public Attributes

int maxT
Scannerscanner
Errorserrors
Tokent
Tokenla
M::Expr mRootRule
float mPriority

Static Public Attributes

static const int cLARGE_NUMBER = 0x7fffffff

Member Typedef Documentation

◆ StringVector

typedef std::vector<std::string> WsfGrammar::Parser::StringVector

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
_EOF 
_string_literal 
_label 
_word 
_gt 
_lt 
_star 
_question 
_plus 
_alternate 
_colon 
_comma 
_assign 
_dot 

Constructor & Destructor Documentation

◆ Parser()

WsfGrammar::Parser::Parser ( Scanner * scanner)

References errors, la, maxT, scanner, and t.

◆ ~Parser()

WsfGrammar::Parser::~Parser ( )

References errors.

Member Function Documentation

◆ Action()

◆ ActionExpr()

◆ ActionRHS()

◆ Alternates()

◆ Clear()

void WsfGrammar::Parser::Clear ( )
inline

◆ Expect()

void WsfGrammar::Parser::Expect ( int n)

◆ ExpectWeak()

void WsfGrammar::Parser::ExpectWeak ( int n,
int follow )

References Get(), la, StartOf(), and SynErr().

◆ Get()

◆ HasVarAssign()

bool WsfGrammar::Parser::HasVarAssign ( )
inline

References _assign, WsfGrammar::Token::kind, and scanner.

Referenced by ActionExpr().

◆ InitParse()

void WsfGrammar::Parser::InitParse ( )

References WsfGrammar::coco_string_create(), Get(), la, and t.

Referenced by Parse().

◆ Parameter()

void WsfGrammar::Parser::Parameter ( M::Expr & p)

References _label, Get(), la, WsfGrammar::M::Expr::mLabel, Rule(), Str(), and t.

Referenced by Rule(), and RuleExpr().

◆ Parse()

void WsfGrammar::Parser::Parse ( )

◆ PlainWord()

void WsfGrammar::Parser::PlainWord ( std::string & s)

◆ Recurrence()

◆ Rule()

◆ RuleExpr()

void WsfGrammar::Parser::RuleExpr ( M::Expr & r)

◆ SemErr()

void WsfGrammar::Parser::SemErr ( const wchar_t * msg)

References errors, and t.

◆ Sequence()

void WsfGrammar::Parser::Sequence ( M::Expr & s)

◆ SequencePart()

void WsfGrammar::Parser::SequencePart ( M::Expr & s)

References Rule().

Referenced by Sequence().

◆ StartOf()

bool WsfGrammar::Parser::StartOf ( int s)

References la.

Referenced by ExpectWeak(), Rule(), RuleExpr(), Sequence(), and WeakSeparator().

◆ Str()

std::string WsfGrammar::Parser::Str ( Token * t)
inline

References t.

Referenced by Parameter(), and Strlit().

◆ StringLiteral()

void WsfGrammar::Parser::StringLiteral ( std::string & s)

References _string_literal, Expect(), Strlit(), and t.

Referenced by PlainWord().

◆ Strlit()

std::string WsfGrammar::Parser::Strlit ( Token * t)
inline

References Str(), t, and Unescape().

Referenced by PlainWord(), Recurrence(), Rule(), RuleExpr(), and StringLiteral().

◆ SynErr()

void WsfGrammar::Parser::SynErr ( int n)

◆ Unescape()

void WsfGrammar::Parser::Unescape ( std::string & s)
inline

Referenced by Strlit().

◆ WeakSeparator()

bool WsfGrammar::Parser::WeakSeparator ( int n,
int syFol,
int repFol )

References Get(), la, StartOf(), and SynErr().

◆ WsfGrammar()

void WsfGrammar::Parser::WsfGrammar ( )

References WsfGrammar::M::cRT_ROOT, la, mRootRule, and RuleExpr().

Referenced by Parse().

Member Data Documentation

◆ cLARGE_NUMBER

const int WsfGrammar::Parser::cLARGE_NUMBER = 0x7fffffff
static

◆ errors

Errors* WsfGrammar::Parser::errors

◆ la

◆ maxT

int WsfGrammar::Parser::maxT

Referenced by Get(), and Parser().

◆ mPriority

float WsfGrammar::Parser::mPriority

Referenced by Clear().

◆ mRootRule

M::Expr WsfGrammar::Parser::mRootRule

◆ scanner

Scanner* WsfGrammar::Parser::scanner

Referenced by Get(), HasVarAssign(), and Parser().

◆ t


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved