> > Maybe:
> >
> > Animated_Move = {"int", &x,
> > "int", &y,
> > "keyword", "WARP", &warp_keyword};
>
> Right. I wasn't taking a table-driven parser quite as literally as that.
> I've never been a fan of that approach in the literal sense, but it's
> certainly one way.
I still have no clear idea if or how the parser should _interpret_ the
tokens it recognizes. A natural first step is to let the parser generate
the tokens for the interface functions need and let them interpret (i.e.
parse the contents of the tokens themselves, at least the free-form tokens
like integers or strings). So, if multiple commands accept, say a pair of
coordinates with or without the suffix 'p', they would get a structure
from the parser:
struct { char *intval; char suffix; }
Then call a function to extract the integer from intval and interpret the
resulting int and the suffix.
Later on we can intruduce a mechanism and the necessary definitions to the
parser to automate this and thus remove complexity from the interface
fucntion. For me that is a useful step to break down the complexity of
the parser rewrite into menegeable steps.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt