Project

General

Profile

Statistics
| Branch: | Revision:

root / src / nedxml / nedyydefs.h @ 79bb12dc

History | View | Annotate | Download (1.4 KB)

1 01873262 Georg Kunz
//==========================================================================
2
//  NEDYYDEFS.H - part of
3
//
4
//                     OMNeT++/OMNEST
5
//            Discrete System Simulation in C++
6
//
7
//==========================================================================
8
9
/*--------------------------------------------------------------*
10
  Copyright (C) 2002-2008 Andras Varga
11
  Copyright (C) 2006-2008 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 __NEDYYDEFS_H
18
#define __NEDYYDEFS_H
19
20
#include "nedxmldefs.h"
21
22
23
//
24
// misc bison/flex related stuff, shared among *.lex, *.y and nedparser.cc/h files
25
//
26
NAMESPACE_BEGIN
27
28
class NEDElement;
29
class NEDParser;
30
31
NAMESPACE_END
32
33
#ifdef YYLTYPE
34
#error 'YYLTYPE defined before nedyydefs.h -- type clash?'
35
#endif
36
37
struct my_yyltype {
38
   int dummy;
39
   int first_line, first_column;
40
   int last_line, last_column;
41
   char *text;
42
};
43
#define YYLTYPE  struct my_yyltype
44
#define YYSTYPE  OPP::NEDElement*
45
46
NAMESPACE_BEGIN
47
48
typedef struct {int li; int co;} LineColumn;
49
extern LineColumn pos, prevpos;
50
51
NAMESPACE_END
52
53
OPP::NEDElement *doParseNED2(OPP::NEDParser *p, const char *nedtext);
54
OPP::NEDElement *doParseNED1(OPP::NEDParser *p, const char *nedtext);
55
OPP::NEDElement *doParseMSG2(OPP::NEDParser *p, const char *nedtext);
56
57
#endif
58
59