DynGenPar
Dynamic Generalized Parser
Classes | Typedefs | Enumerations | Functions | Variables
DynGenPar Namespace Reference

Classes

class  AbstractLexerStateData
 API for stateful lexers to save their state for rewinding. More...
 
class  Action
 interface for parser actions More...
 
class  ActionDeserializer
 interface for parser action deserializers More...
 
struct  ActionInfo
 data passed to parser actions More...
 
class  Alternative
 
class  ByteTokenSource
 
struct  Cfg
 An object representing a CFG (or a PMCFG in our internal representation) More...
 
struct  ConstrainedMultiPrediction
 multi-token predictions with next token constraints More...
 
class  FlexLexerTokenSource
 
struct  FullRule
 full rule as found in the initial graph More...
 
class  Function
 PMCFG function. More...
 
class  LexerState
 
class  ListTokenSource
 
struct  Match
 (possibly partial) match More...
 
struct  MultiPrediction
 multi-token predictions More...
 
struct  NextTokenConstraints
 rule constraints affecting the next token, for scannerless parsing More...
 
struct  Node
 node in the parse tree More...
 
class  Parser
 main class More...
 
struct  ParseState
 parse state struct, for bindings More...
 
struct  Pgf
 representation of the information in .pgf files in a format we can process More...
 
class  PgfParser
 parser for PGF grammars More...
 
struct  Pmcfg
 PMCFG. More...
 
struct  PmcfgComponentInfo
 attached to the parse trees as rule labels to allow obtaining syntax trees More...
 
class  PseudoCatScope
 
class  PseudoCatScopeData
 
class  Rule
 
class  Sequence
 component of a PMCFG function, a sequence of terms More...
 
class  StackItem
 
class  StackItemData
 
class  StackItemType0
 type 0 item: during match, we're waiting for a token to shift More...
 
class  StackItemType1
 type 1 item: during type 0 item processing, we're executing a reduce More...
 
class  StackItemType2
 type 2 item: during reduce, we're recursively executing another reduce More...
 
class  StackItemType3
 type 3 item: during matchRemaining, we're executing a match More...
 
class  StackItemType4
 type 4 item: during reduce, we're executing a matchRemaining More...
 
class  StackItemType5
 type 5 item: during match (of an MCFG constraint), we're executing a matchRemaining More...
 
class  StackItemType6
 type 6 item: during match, we're matching a P constraint More...
 
struct  Term
 term in the expression of a component of a PMCFG function More...
 
class  TextByteLexerStateData
 You should not have to use this class directly, ever. More...
 
class  TextByteTokenSource
 
struct  TextPosition
 text position More...
 
class  TokenSource
 

Typedefs

typedef QString Cat
 Category type: string or integer depending on DYNGENPAR_INTEGER_CATEGORIES. More...
 
typedef const CatCatArg
 Category type (string or integer) when passed as an argument. More...
 
typedef QHash< Cat, QList< Rule > > RuleSet
 
typedef QSet< CatTokenSet
 
typedef QSet< CatPredictions
 
typedef QMultiHash< QList< Cat >, MultiPredictionMultiPredictions
 
typedef QMultiHash< Cat, NextTokenConstraintsConstrainedPredictions
 
typedef QMultiHash< QList< Cat >, ConstrainedMultiPredictionConstrainedMultiPredictions
 

Enumerations

enum  PgfReservedTokens {
  PgfTokenEpsilon, PgfTokenLexError, PgfTokenVar, PgfTokenFloat,
  PgfTokenInt, PgfTokenString
}
 

Functions

uint qHash (const NextTokenConstraints &nextTokenConstraints)
 simple hash function for next token constraints More...
 
Node parseTreeToPmcfgSyntaxTree (const Node &parseTree)
 converts a parse tree obtained from a PMCFG to a PMCFG syntax tree More...
 
uint qHash (const PseudoCatScope &scope)
 

Variables

STATIC const char *const PreludeBind = "&+"
 

Typedef Documentation

◆ Cat

typedef QString DynGenPar::Cat

Category type: string or integer depending on DYNGENPAR_INTEGER_CATEGORIES.

If DYNGENPAR_INTEGER_CATEGORIES is defined, this typedef is defined as:

typedef int Cat;

instead.

Definition at line 71 of file dyngenpar.h.

◆ CatArg

typedef const Cat& DynGenPar::CatArg

Category type (string or integer) when passed as an argument.

If DYNGENPAR_INTEGER_CATEGORIES is defined, this typedef is defined as:

typedef int CatArg;

instead.

This typedef is used for maximum efficiency, to pass strings by reference, but integers by value.

Definition at line 83 of file dyngenpar.h.

◆ ConstrainedMultiPredictions

Definition at line 258 of file dyngenpar.h.

◆ ConstrainedPredictions

Definition at line 233 of file dyngenpar.h.

◆ MultiPredictions

Definition at line 232 of file dyngenpar.h.

◆ Predictions

typedef QSet<Cat> DynGenPar::Predictions

Definition at line 214 of file dyngenpar.h.

◆ RuleSet

typedef QHash<Cat, QList<Rule> > DynGenPar::RuleSet

Definition at line 186 of file dyngenpar.h.

◆ TokenSet

typedef QSet<Cat> DynGenPar::TokenSet

Definition at line 187 of file dyngenpar.h.

Enumeration Type Documentation

◆ PgfReservedTokens

Enumerator
PgfTokenEpsilon 
PgfTokenLexError 
PgfTokenVar 
PgfTokenFloat 
PgfTokenInt 
PgfTokenString 

Definition at line 41 of file pgf.h.

Function Documentation

◆ parseTreeToPmcfgSyntaxTree()

Node DynGenPar::parseTreeToPmcfgSyntaxTree ( const Node parseTree)

converts a parse tree obtained from a PMCFG to a PMCFG syntax tree

Definition at line 539 of file dyngenpar.cpp.

◆ qHash() [1/2]

uint DynGenPar::qHash ( const PseudoCatScope scope)
inline

Definition at line 392 of file dyngenpar.h.

◆ qHash() [2/2]

uint DynGenPar::qHash ( const NextTokenConstraints nextTokenConstraints)

simple hash function for next token constraints

Definition at line 452 of file dyngenpar.cpp.

Variable Documentation

◆ PreludeBind

STATIC const char* const DynGenPar::PreludeBind = "&+"

Definition at line 48 of file pgf.h.