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);
YYLoc trimDoubleBraces(YYLoc vectorpos)
int last_line
Definition: yydefs.h:40
ASTNode * getOrCreateElementWithTag(ParseContext *np, ASTNodeFactory *factory, int tagcode, ASTNode *parent)
bool isEmpty(YYLoc pos)
Definition: yyutil.h:54
int last_column
Definition: yydefs.h:40
int first_column
Definition: yydefs.h:39
void transferChildren(ASTNode *from, ASTNode *to)
std::string removeSpaces(ParseContext *np, YYLoc pos)
int first_line
Definition: yydefs.h:39
const char * toString(ParseContext *np, YYLoc)
YYLoc makeEmptyYYLoc()
Definition: yyutil.h:68
const char * currentLocation(ParseContext *np)
void storePos(ParseContext *np, ASTNode *node, YYLoc pos)
YYLoc trimQuotes(YYLoc vectorpos)
std::string slashifyFilename(const char *fname)
YYLoc makeYYLoc(int fl, int fc, int ll, int lc)
Definition: yyutil.h:59
Definition: astbuilder.h:25
ASTNode * createElementWithTag(ParseContext *np, ASTNodeFactory *factory, int tagcode, ASTNode *parent=nullptr)
void swapAttributes(ASTNode *node, const char *attr1, const char *attr2)