ack/util
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
..
ack Cut down some clang warnings 2019-10-30 18:36:38 -04:00
amisc * More ANSI C portability fixes. 2019-03-24 23:53:13 +08:00
arch * Fix merge conflict issue. 2019-06-16 01:19:15 +08:00
ass Read beyond buffer bugfix. 2019-03-31 00:53:09 +08:00
build Run all tests, even the ones which fail, and emit a test summary right at the 2016-12-01 23:03:30 +01:00
byacc Removed a whole bunch of old strcpy() prototypes in favour of <string.h>. 2019-02-10 13:20:04 +01:00
ceg Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
cgg Cut down some clang warnings 2019-10-30 18:36:38 -04:00
cmisc ANSI C conversion. 2019-05-11 01:14:01 +08:00
cpp Removed a whole bunch of old strcpy() prototypes in favour of <string.h>. 2019-02-10 13:20:04 +01:00
ego Cut down some clang warnings 2019-10-30 18:36:38 -04:00
flex Stop using mktemp() --- on Haiku, it always generates the same filenames, 2017-08-06 13:22:05 +02:00
grind Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
int Add util/int/switch.h to declare do_instr() and Do???() 2019-10-30 18:36:55 -04:00
led Adapt to new object API 2019-05-11 01:15:18 +08:00
LLgen LLgen: use size_t, reduce warnings, other small changes 2019-10-22 15:32:23 -04:00
make * Fix compilation warning. 2019-05-11 00:49:10 +08:00
mcgg Add the OPTIONS clause to the mcgg grammar; add an optional pass which converts 2018-09-22 11:19:00 +02:00
misc ANSI C conversion. 2019-05-11 01:15:51 +08:00
ncgg Cut down some clang warnings 2019-10-30 18:36:38 -04:00
opt Cut down some clang warnings 2019-10-30 18:36:38 -04:00
shf Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
topgen Add a syntax to declare functions in a top table 2019-10-30 18:36:55 -04:00