[mercury-users] need help: Mercury+C
Peter Ross
petdr at cs.mu.OZ.AU
Wed Sep 2 13:14:18 AEST 1998
On 02-Sep-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 01-Sep-1998, tcklnbrg <at at ingenuity-sw.com> wrote:
>
> >
> > The tokenize(..) c code in lexer.c does open and "read-only" a file.
> > Does this mean that the Mercury function that corresponds to c
> > tokenize(..)
> > in file lexer.c, must be declared with the 2 extra io__state args?
>
> Maybe. You will need to have some sort of state arguments to represent
> the state of the lexer, so io__state is a good choice to start with.
>
You should have a pair of arguments which are (di, uo) and that
represent the "state of the world". These are needed to ensure that the
code is never backtracked over.
Pete.
More information about the users
mailing list