diff options
Diffstat (limited to 'bitbake/lib/bb/parse/parse_c/lexer.h')
-rw-r--r-- | bitbake/lib/bb/parse/parse_c/lexer.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/bitbake/lib/bb/parse/parse_c/lexer.h b/bitbake/lib/bb/parse/parse_c/lexer.h new file mode 100644 index 0000000000..1edf72dcf5 --- /dev/null +++ b/bitbake/lib/bb/parse/parse_c/lexer.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | Copyright (C) 2005 Holger Hans Peter Freyther | ||
3 | |||
4 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
5 | of this software and associated documentation files (the "Software"), to deal | ||
6 | in the Software without restriction, including without limitation the rights | ||
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
8 | copies of the Software, and to permit persons to whom the Software is | ||
9 | furnished to do so, subject to the following conditions: | ||
10 | |||
11 | The above copyright notice and this permission notice shall be included in all | ||
12 | copies or substantial portions of the Software. | ||
13 | |||
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT | ||
17 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
18 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
19 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR | ||
20 | THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
21 | |||
22 | */ | ||
23 | |||
24 | #ifndef LEXER_H | ||
25 | #define LEXER_H | ||
26 | |||
27 | struct lex_t { | ||
28 | void *parser; | ||
29 | void *scanner; | ||
30 | void* (*parse)(void*, int, token_t, lex_t*); | ||
31 | |||
32 | void accept(int token, const char* string = 0); | ||
33 | void input(char *buf, int *result, int_max_size); | ||
34 | int line()const; | ||
35 | const char* filename()const; | ||
36 | private: | ||
37 | const char* m_fileName; | ||
38 | }; | ||
39 | |||
40 | |||
41 | #endif | ||