ack/mach/pdp
George Koehler 51e34acab1 Add a syntax to declare functions in a top table
Use the new syntax in the mips, pdp, powerpc tables to declare
functions before calling them.  These declarations prevent compiler
warnings about implicitly declaring functions.  They also provide
prototypes of the function parameters.

Also fix a warning in the powerpc table: use `bsearch(...) != NULL` to
avoid converting the pointer from bsearch() to an int.

The syntax for topgen is a block `{...}` among the parameters in the
top table.  It looks like the syntax of LLgen, but topgen doesn't
allow nested blocks, so declarations like `struct whatever {...};`
don't work.  The token OPEN_BRACKET that begins a declaration_block
doesn't conflict with the LETTER that begins a parameter_line or the
'%' that begins a separator.

Because a block writes a #line command to gen.h, a parameter line now
also writes a #line command to gen.h, so it doesn't get a wrong line
number from a previous block.
2019-10-30 18:36:55 -04:00
..
as Fix several compiler warnings by adding braces 2019-05-14 23:21:19 +08:00
cg ANSI C conversion 2019-05-11 01:10:47 +08:00
cv Include more headers to declare functions. 2019-03-22 15:59:35 -04:00
int Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
libem Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
libend Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
ncg Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
top Add a syntax to declare functions in a top table 2019-10-30 18:36:55 -04:00