msgyyutil.h Source File

NEDXML API: msgyyutil.h Source File
NEDXML API
msgyyutil.h
1//==========================================================================
2// msgyyutil.h -
3//
4// OMNeT++/OMNEST
5// Discrete System Simulation in C++
6//
7//==========================================================================
8
9/*--------------------------------------------------------------*
10 Copyright (C) 2002-2017 Andras Varga
11 Copyright (C) 2006-2017 OpenSim Ltd.
12
13 This file is distributed WITHOUT ANY WARRANTY. See the file
14 `license' for details on this and other legal matters.
15*--------------------------------------------------------------*/
16
17#ifndef __OMNETPP_NEDXML_MSGYYUTIL_H
18#define __OMNETPP_NEDXML_MSGYYUTIL_H
19
20#include "yyutil.h"
21#include "msgelements.h"
22
23namespace omnetpp {
24namespace nedxml {
25namespace msgyyutil { // for now
26
27ASTNode *createMsgElementWithTag(ParseContext *np, int tagcode, ASTNode *parent=nullptr);
28ASTNode *getOrCreateMsgElementWithTag(ParseContext *np, int tagcode, ASTNode *parent);
29
30PropertyElement *addProperty(ParseContext *np, ASTNode *node, const char *name); // directly under the node
31PropertyElement *storeSourceCode(ParseContext *np, ASTNode *node, YYLoc tokenpos);
32LiteralElement *createPropertyValue(ParseContext *np, YYLoc textpos);
33
34void addComment(ParseContext *np, ASTNode *node, const char *locId, const char *comment, const char *defaultValue);
35void storeFileComment(ParseContext *np, ASTNode *node);
36void storeBannerComment(ParseContext *np, ASTNode *node, YYLoc tokenpos);
37void storeRightComment(ParseContext *np, ASTNode *node, YYLoc tokenpos);
38void storeTrailingComment(ParseContext *np, ASTNode *node, YYLoc tokenpos);
39void storeBannerAndRightComments(ParseContext *np, ASTNode *node, YYLoc pos);
40void storeBannerAndRightComments(ParseContext *np, ASTNode *node, YYLoc firstpos, YYLoc lastpos);
41void storeInnerComments(ParseContext *np, ASTNode *node, YYLoc pos);
42
43} // namespace msgyyutil
44} // namespace nedxml
45} // namespace omnetpp
46
47
48#endif
49