27 #ifndef DYNGENPAR_INTEGER_CATEGORIES 28 #define DYNGENPAR_INTEGER_CATEGORIES 34 #include <QStringList> 57 Pgf(
const QString &fileName,
const QString &concreteName = QString());
67 DYNGENPAR_DECLARE_TYPEINFO(
Pgf, Q_MOVABLE_TYPE);
73 PgfParser(
const QString &fileName,
const QString &concreteName = QString());
76 void setInputFile(
const QString &fileName);
77 void setInputBytes(
const QByteArray &bytes);
78 void setInputString(
const QString &
string);
79 void setInputBuffer(QByteArray *buffer);
80 QString catName(
int cat)
const;
81 QString
functionName(
int id)
const {
return pgf.functionNames.at(
id);}
82 void filterCoercionsFromSyntaxTree(
Node &tree)
const;
85 void init() {
if (!loadPmcfg(pgf.
pmcfg)) qFatal(
"invalid PMCFG");}
87 DYNGENPAR_DECLARE_TYPEINFO(
PgfParser, Q_MOVABLE_TYPE);
representation of the information in .pgf files in a format we can process
QStringList catNames
names of categories, in general not unique
QHash< QString, QStringList > componentNames
names of category components
QList< QPair< QString, int > > suffixes
list of &+ suffixes with their IDs
QHash< QString, int > tokenHash
hash table for quick token lexing
int firstFunction
the function ID of the first non-coercion function
QStringList functionNames
names of functions, in general not unique
Pgf()
dummy default constructor for bindings
QString functionName(int id) const
Pmcfg pmcfg
the PMCFG (in (almost) standard form)
STATIC const char *const PreludeBind