Gpc not accepting non-standard (?) systax._(re)
Tue, 21 Oct 1997 23:24:18 +0200 (MEST)
According to richard.kerry@quantel.com:
>
> type
> ArgDefs = ArgDefTable value (
> ((' ', 1, 0), 0, OptionalArg, NullArg),
> (('Output_File ', 1, 11), 2, OptionalArg, FileArg),
> ... );
According to gpc-971001:
> test.pas:28: parse error before `Value'
> test.pas:29: invalid schema discriminants
Uh - sorry, gpc-971001 does not recognize `value' in this context any
more. This is connected with the requirement that "value" must be a
redefinable identifier according to ISO-7185 Standard Pascal - which
was not the case in earlier versions of GPC.
A fix follows below. (Due to other changes, the new line numbers are
in fact not correct, but `patch' won't care.;-)
Hope this helps,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005]
maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]
8< ---------------------------------------------------------------------------
--- gpc-971001/p/parse.y Wed Oct 1 23:32:34 1997
+++ gpc/p/parse.y Tue Oct 21 23:57:02 1997
@@ -1473,12 +1475,15 @@
{
if (! flag_what_pascal || (flag_what_pascal & B_D_PASCAL))
lex_const_equal = 1;
+ enable_keyword ("Value");
}
type_denoter absolute_or_value_specification
{
tree d, init = $8;
tree type = TREE_VALUE ($7);
+ disable_keyword ("Value");
+
immediate_size_expand = $4;
lex_caret = $3;
Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es