ack/util/ego/share/parser.h
George Koehler 9037d137f5 Add prototypes, void in util/ego/share
This uncovers a problem in il/il_aux.c: it passes 3 arguments to
getlines(), but the function expects 4 arguments.  I add FALSE as the
4th argument.  TRUE would fill in the list of mesregs.  IL uses
mesregs during phase 1, but this call to getlines() is in phase 2.
TRUE would leak memory unless I added a call to Ldeleteset(mesregs).
So I pass FALSE.

Functions passed to go() now have a `void *` parameter because
no_action() now takes a `void *`.
2017-11-15 17:19:56 -05:00

20 lines
742 B
C

/* $Id$ */
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
bool parse(line_p l, offset nbytes, line_p *l_out, int level,
void (*action0)(line_p l1, line_p l2, offset size));
/*
* This is a recursive descent parser for
* EM expressions.
* It tries to recognize EM code that loads exactly
* 'nbytes' bytes on the stack.
* 'l' is the last instruction of this code.
* On toplevel, when an expression has been
* recognized, the procedure-parameter
* 'action0' is called, with parameters: the first and
* last instruction of the expression and the number of
* bytes recognized.
*/