Hello,
I'm trying to create a new test for SIP, and, in order to make a useful
test, I need to change the receiver uri.
So, I have add a new keyword (touri), paired with corresponding tokens on
p.y and l.l :
l.l
touri { return TOURI; }
p.y
%token <string> TOURI
In order to complete my work, I also create a function, wich is based on the
behavior for REQUEST :
touri : /* EMPTY */
| TOURI STRING {
DEBUG("to uri\n");
verifyToUri(&portset, $2);
FREE($2);
}
static void verifyToUri(Port_T port, char * touri) {
ASSERT(touri);
char * to = port->touri;
if (to == NULL) {
NEW(to);
port->touri = to;
}
if (touri != NULL) {
to=xstrdup(touri);
}
}
But, when I try ./monit -v validate, my only result is :
/etc/monit/ser.rc:7: Error: syntax error 'touri'
Can anyone give me some clues on "how to add keyword" please.