My Project
Loading...
Searching...
No Matches
bison_compat.h File Reference

helper for bison locations More...

Go to the source code of this file.

Macros

#define YYLTYPE   loc_t
 
#define YYLTYPE_IS_DECLARED
 
#define YY_USER_INIT
 
#define YY_USER_ACTION
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 

Functions

ANN void clear_buffer (void *state, void *scan)
 

Detailed Description

helper for bison locations

Definition in file bison_compat.h.

Macro Definition Documentation

◆ YY_USER_ACTION

#define YY_USER_ACTION
Value:
yylloc->first.line = yylloc->last.line; \
yylloc->first.column = get_currpos(yyscanner); \
if (yylloc->last.line == get_currline(yyscanner)) \
yylloc->last.column = get_currpos(yyscanner) + yyleng; \
else { \
yylloc->last.line = get_currline(yyscanner); \
yylloc->last.column = get_currpos(yyscanner); \
}

Definition at line 15 of file bison_compat.h.

15#define YY_USER_ACTION \
16 yylloc->first.line = yylloc->last.line; \
17 yylloc->first.column = get_currpos(yyscanner); \
18 if (yylloc->last.line == get_currline(yyscanner)) \
19 yylloc->last.column = get_currpos(yyscanner) + yyleng; \
20 else { \
21 yylloc->last.line = get_currline(yyscanner); \
22 yylloc->last.column = get_currpos(yyscanner); \
23 }

◆ YY_USER_INIT

#define YY_USER_INIT
Value:
yylloc->first.line = yylloc->last.line = get_currline(yyscanner);\
yylloc->first.column = yylloc->last.column = get_currpos(yyscanner);

Definition at line 11 of file bison_compat.h.

11#define YY_USER_INIT \
12 yylloc->first.line = yylloc->last.line = get_currline(yyscanner);\
13 yylloc->first.column = yylloc->last.column = get_currpos(yyscanner);

◆ YYLLOC_DEFAULT

#define YYLLOC_DEFAULT ( Current,
Rhs,
N )
Value:
do \
if (N) { \
(Current).first.line = YYRHSLOC(Rhs, 1).first.line; \
(Current).first.column = YYRHSLOC(Rhs, 1).first.column; \
(Current).last.line = YYRHSLOC(Rhs, N).last.line; \
(Current).last.column = YYRHSLOC(Rhs, N).last.column; \
} else { \
(Current).first.line = (Current).last.line = YYRHSLOC(Rhs, 0).last.line; \
(Current).first.column = (Current).last.column = \
YYRHSLOC(Rhs, 0).last.column; \
} \
while (0)

Definition at line 25 of file bison_compat.h.

25#define YYLLOC_DEFAULT(Current, Rhs, N) \
26 do \
27 if (N) { \
28 (Current).first.line = YYRHSLOC(Rhs, 1).first.line; \
29 (Current).first.column = YYRHSLOC(Rhs, 1).first.column; \
30 (Current).last.line = YYRHSLOC(Rhs, N).last.line; \
31 (Current).last.column = YYRHSLOC(Rhs, N).last.column; \
32 } else { \
33 (Current).first.line = (Current).last.line = YYRHSLOC(Rhs, 0).last.line; \
34 (Current).first.column = (Current).last.column = \
35 YYRHSLOC(Rhs, 0).last.column; \
36 } \
37 while (0)

◆ YYLTYPE

#define YYLTYPE   loc_t

Definition at line 7 of file bison_compat.h.

◆ YYLTYPE_IS_DECLARED

#define YYLTYPE_IS_DECLARED

Definition at line 9 of file bison_compat.h.

Function Documentation

◆ clear_buffer()

ANN void clear_buffer ( void * state,
void * scan )