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;} \
36 ASTNode *
createElementWithTag(ParseContext *np, ASTNodeFactory *factory,
int tagcode, ASTNode *parent=
nullptr);
39 void storePos(ParseContext *np, ASTNode *node, YYLoc
pos);
40 void storePos(ParseContext *np, ASTNode *node, YYLoc firstpos, YYLoc lastpos);
42 void swapAttributes(ASTNode *node,
const char *attr1,
const char *attr2);
48 const char *
toString(ParseContext *np, YYLoc);
53 return pos.first_line >
pos.last_line ||
54 (
pos.first_line ==
pos.last_line &&
pos.first_column >=
pos.last_column);
60 pos.first_column = fc;