OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | |
3 * Use of this source code is governed by a BSD-style license that can be | |
4 * found in the LICENSE file. | |
5 */ | |
6 | |
7 /* Common definitions for the generator of all instructions and the definitions | |
8 * of the DFA generated by the parse_dfa.py. */ | |
9 | |
10 #ifndef _TEST_DFA_H | |
11 #define _TEST_DFA_H | |
12 | |
13 #include <stdbool.h> | |
14 #include <stdint.h> | |
15 | |
16 struct state { | |
17 uint16_t transitions[256]; | |
18 bool is_final; | |
19 bool anyfield_begin; | |
20 bool anyfield_end; | |
21 }; | |
22 | |
23 extern struct state states[]; | |
24 | |
25 uint16_t NumStates(); | |
26 | |
27 void AddRange(int state_idx, | |
28 uint8_t byte_begin, | |
29 uint8_t byte_end, | |
30 uint16_t target); | |
31 | |
32 void InitTransitions(); | |
33 | |
34 extern uint16_t start_state; | |
35 | |
36 #endif /* _TEST_DFA_H */ | |
OLD | NEW |