[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
YYLTYPE wrong in .h file
From: |
Frank Heckenbach |
Subject: |
YYLTYPE wrong in .h file |
Date: |
Sat, 17 May 2003 02:01:26 +0200 |
When using the `-d' option, definitions of YYLTYPE don't seem to be
visible in the .h file. E.g.:
%{
#define YYLTYPE int
%}
%locations
%%
foo: 'X';
This yields in the .h file:
[...]
#if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)
typedef struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
} YYLTYPE;
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
extern YYLTYPE yylloc;
Do I have to define YYLTYPE somewhere else in the grammar (but
where), or is this a bug, or is this the intended behaviour (i.e.,
do I have to define YYLTYPE myself in all files that include the .h
file, unlike YYSTYPE)?
PS: Small typo:
--- bison/doc/bison.texinfo.orig Sat May 17 01:54:09 2003
+++ bison/doc/bison.texinfo Sat May 17 01:54:11 2003
@@ -1727,7 +1727,7 @@
@}
@end group
@group
- | '-' exp %preg NEG @{ $$ = -$2; @}
+ | '-' exp %prec NEG @{ $$ = -$2; @}
| exp '^' exp @{ $$ = pow ($1, $3); @}
| '(' exp ')' @{ $$ = $2; @}
@end group
Frank
--
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- YYLTYPE wrong in .h file,
Frank Heckenbach <=