Hi!
I have a special question to Frank and/or Peter: can you tell me a place (in the Web or in the gpc-sources) where I can find all supported keywords of gpc. The best way are they sorted to any supported dialect by gpc (e.g. UCSD,Borland,ISO7186 ...). I need this information for the pindent project.
Thanx
Thorsten
Thorsten Hindermann wrote:
I have a special question to Frank and/or Peter: can you tell me a place (in the Web or in the gpc-sources) where I can find all supported keywords of gpc. The best way are they sorted to any supported dialect by gpc (e.g. UCSD,Borland,ISO7186 ...). I need this information for the pindent project.
Exactly, in the GPC sources. The file gpc.gperf contains all keywords with dialect information -- but the latter use some macros (declared in gpc-defs.h).
If you were writing your program in C and assume that everyone who will compile it has the GPC sources, you could just include this file. Since both probably is not the case, it might be better to generate a Pascal file from it.
There's a script (script/gperf2texi) which does a similar thing to generate a documentation file (doc/keyword.texi). A similar script could be written to produce Pascal code. If you don't feel like doing that (or don't like writing `sed' scripts ;-), I might be persuaded to do it if I know which output format you need...
Frank
Hi Frank!
Frank Heckenbach wrote:
Thorsten Hindermann wrote:
Exactly, in the GPC sources. The file gpc.gperf contains all keywords with dialect information -- but the latter use some macros (declared in gpc-defs.h).
Thanx for the answer. :-)
If you were writing your program in C and assume that everyone who will compile it has the GPC sources, you could just include this file. Since both probably is not the case, it might be better to generate a Pascal file from it.
Eike and I write pindent with gpc.
There's a script (script/gperf2texi) which does a similar thing to generate a documentation file (doc/keyword.texi). A similar script
This file contains all information we need (much enough keywords :-) )
could be written to produce Pascal code. If you don't feel like doing that (or don't like writing `sed' scripts ;-), I might be persuaded to do it if I know which output format you need...
Thanx, but you don't write the sed-script :-))))
Thorsten
Thorsten Hindermann wrote:
There's a script (script/gperf2texi) which does a similar thing to generate a documentation file (doc/keyword.texi). A similar script
This file contains all information we need (much enough keywords :-) )
could be written to produce Pascal code. If you don't feel like doing that (or don't like writing `sed' scripts ;-), I might be persuaded to do it if I know which output format you need...
Thanx, but you don't write the sed-script :-))))
But wait. Are you going to translate this file manually? Not a good idea, I think: Keywords change sometimes (usually get added -- especially in GPC ;-), and keeping up is (a) work and (b) error-prone.
So I think, in the longer run, a sed script is the easier way -- especially since the hard part of the script (parsing the gpc.gperf file) exists already. Changing the script to a new output format (a Pascal array declaration or whatever) is not too hard...
Frank