Statistics
| Branch: | Revision:

root / src / common / expressionyydefs.h @ e1750c09

History | View | Annotate | Download (1.27 KB)

1 01873262 Georg Kunz
//==========================================================================
2
//  EXPRESSIONYYDEFS.H - part of
3
//                     OMNeT++/OMNEST
4
//            Discrete System Simulation in C++
5
//
6
//  Author: Andras Varga
7
//
8
//==========================================================================
9
10
/*--------------------------------------------------------------*
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 __EXPRESSIONYYDEFS_H
18
#define __EXPRESSIONYYDEFS_H
19
20
#include "expression.h"
21
22
//
23
// misc bison/flex related stuff, shared among *.lex and *.y files
24
//
25
#ifdef YYLTYPE
26
#error 'YYLTYPE defined before expryydefs.h -- type clash?'
27
#endif
28
29
struct my_yyltype {
30
   int dummy;
31
   int first_line, first_column;
32
   int last_line, last_column;
33
   char *text;
34
};
35
#define YYLTYPE  struct my_yyltype
36
#define YYSTYPE  char*
37
38
39
#define xpos     expressionxpos
40
#define xprevpos expressionxprevpos
41
42
typedef struct {int li; int co;} LineColumn;
43
extern LineColumn xpos, xprevpos;
44
45
void doParseExpression(const char *text, OPP::Expression::Resolver *resolver, OPP::Expression::Elem *&elems, int& nelems);
46
47
#endif
48
49