Go to the documentation of this file.
17 #ifndef __OMNETPP_NEDXML_YYUTIL_H
18 #define __OMNETPP_NEDXML_YYUTIL_H
29 #define DETECT_PARSER_REENTRY() \
31 Guard() {if (parseInProgress) throw opp_runtime_error("non-reentrant parser invoked again while parsing"); parseInProgress = true;} \
32 ~Guard() {parseInProgress = false;} \
38 ASTNode *
createElementWithTag(ParseContext *np, ASTNodeFactory *factory,
int tagcode, ASTNode *parent=
nullptr);
41 void storePos(ParseContext *np, ASTNode *node, YYLoc
pos);
42 void storePos(ParseContext *np, ASTNode *node, YYLoc firstpos, YYLoc lastpos);
44 void swapAttributes(ASTNode *node,
const char *attr1,
const char *attr2);
50 const char *
toString(ParseContext *np, YYLoc);
55 return pos.first_line >
pos.last_line ||
56 (
pos.first_line ==
pos.last_line &&
pos.first_column >=
pos.last_column);
62 pos.first_column = fc;
ASTNode * getOrCreateElementWithTag(ParseContext *np, ASTNodeFactory *factory, int tagcode, ASTNode *parent)
std::string removeSpaces(ParseContext *np, YYLoc pos)
YYLoc makeEmptyYYLoc()
Definition: yyutil.h:68
ASTNode * createElementWithTag(ParseContext *np, ASTNodeFactory *factory, int tagcode, ASTNode *parent=nullptr)
const char * currentLocation(ParseContext *np)
YYLoc makeYYLoc(int fl, int fc, int ll, int lc)
Definition: yyutil.h:59
void storePos(ParseContext *np, ASTNode *node, YYLoc pos)
void swapAttributes(ASTNode *node, const char *attr1, const char *attr2)
Definition: astbuilder.h:25
YYLoc trimQuotes(YYLoc vectorpos)
void transferChildren(ASTNode *from, ASTNode *to)
std::string slashifyFilename(const char *fname)
YYLoc trimDoubleBraces(YYLoc vectorpos)
bool isEmpty(YYLoc pos)
Definition: yyutil.h:54
const char * toString(ParseContext *np, YYLoc)