Fixes for gcc 4.3.
[ragel.git] / test / mailbox1.h
blobe7cd37cbe67a45208182bcc1c7863c636b8376ee
1 #ifndef _MAILBOX1_H
2 #define _MAILBOX1_H
4 #include <stdio.h>
5 #include <string.h>
6 #include "vector.h"
8 struct MBox
10 int cs;
12 Vector<char> headName;
13 Vector<char> headContent;
15 // Initialize the machine. Invokes any init statement blocks. Returns 0
16 // if the machine begins in a non-accepting state and 1 if the machine
17 // begins in an accepting state.
18 void init( );
20 // Execute the machine on a block of data. Returns -1 if after processing
21 // the data, the machine is in the error state and can never accept, 0 if
22 // the machine is in a non-accepting state and 1 if the machine is in an
23 // accepting state.
24 void execute( const char *data, int len );
26 // Indicate that there is no more data. Returns -1 if the machine finishes
27 // in the error state and does not accept, 0 if the machine finishes
28 // in any other non-accepting state and 1 if the machine finishes in an
29 // accepting state.
30 int finish( );
33 #endif