diff options
Diffstat (limited to 'bitbake/lib/bb/parse/parse_c/bitbakeparser.py')
-rw-r--r-- | bitbake/lib/bb/parse/parse_c/bitbakeparser.py | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/bitbake/lib/bb/parse/parse_c/bitbakeparser.py b/bitbake/lib/bb/parse/parse_c/bitbakeparser.py new file mode 100644 index 0000000000..ed7b13eef9 --- /dev/null +++ b/bitbake/lib/bb/parse/parse_c/bitbakeparser.py | |||
@@ -0,0 +1,133 @@ | |||
1 | """ | ||
2 | |||
3 | BitBake C Parser Python Code | ||
4 | |||
5 | Copyright (C) 2005 Holger Hans Peter Freyther | ||
6 | |||
7 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
8 | of this software and associated documentation files (the "Software"), to deal | ||
9 | in the Software without restriction, including without limitation the rights | ||
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
11 | copies of the Software, and to permit persons to whom the Software is | ||
12 | furnished to do so, subject to the following conditions: | ||
13 | |||
14 | The above copyright notice and this permission notice shall be included in all | ||
15 | copies or substantial portions of the Software. | ||
16 | |||
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT | ||
20 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
21 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
22 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR | ||
23 | THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
24 | """ | ||
25 | |||
26 | __version__ = "0xdeadbeef" | ||
27 | |||
28 | class CParser: | ||
29 | """ | ||
30 | The C-based Parser for Bitbake | ||
31 | """ | ||
32 | def __init__(self, data, type): | ||
33 | """ | ||
34 | Constructor | ||
35 | """ | ||
36 | self._data = data | ||
37 | |||
38 | def _syntax_error(self, file, line): | ||
39 | """ | ||
40 | lemon/flex reports an syntax error to us and we will | ||
41 | raise an exception | ||
42 | """ | ||
43 | pass | ||
44 | |||
45 | def _export(self, data): | ||
46 | """ | ||
47 | EXPORT VAR = "MOO" | ||
48 | we will now export VAR | ||
49 | """ | ||
50 | pass | ||
51 | |||
52 | def _assign(self, key, value): | ||
53 | """ | ||
54 | VAR = "MOO" | ||
55 | we will assign moo to VAR | ||
56 | """ | ||
57 | pass | ||
58 | |||
59 | def _assign(self, key, value): | ||
60 | """ | ||
61 | """ | ||
62 | pass | ||
63 | |||
64 | def _append(self, key, value): | ||
65 | """ | ||
66 | VAR += "MOO" | ||
67 | we will append " MOO" to var | ||
68 | """ | ||
69 | pass | ||
70 | |||
71 | def _prepend(self, key, value): | ||
72 | """ | ||
73 | VAR =+ "MOO" | ||
74 | we will prepend "MOO " to var | ||
75 | """ | ||
76 | pass | ||
77 | |||
78 | def _immediate(self, key, value): | ||
79 | """ | ||
80 | VAR := "MOO ${CVSDATE}" | ||
81 | we will assign immediately and expand vars | ||
82 | """ | ||
83 | pass | ||
84 | |||
85 | def _conditional(self, key, value): | ||
86 | """ | ||
87 | """ | ||
88 | pass | ||
89 | |||
90 | def _add_task(self, task, before = None, after = None): | ||
91 | """ | ||
92 | """ | ||
93 | pass | ||
94 | |||
95 | def _include(self, file): | ||
96 | """ | ||
97 | """ | ||
98 | pass | ||
99 | |||
100 | def _inherit(self, file): | ||
101 | """ | ||
102 | """ | ||
103 | pass | ||
104 | |||
105 | def _shell_procedure(self, name, body): | ||
106 | """ | ||
107 | """ | ||
108 | pass | ||
109 | |||
110 | def _python_procedure(self, name, body): | ||
111 | """ | ||
112 | """ | ||
113 | pass | ||
114 | |||
115 | def _fakeroot_procedure(self, name, body): | ||
116 | """ | ||
117 | """ | ||
118 | pass | ||
119 | |||
120 | def _def_procedure(self, a, b, c): | ||
121 | """ | ||
122 | """ | ||
123 | pass | ||
124 | |||
125 | def _export_func(self, name): | ||
126 | """ | ||
127 | """ | ||
128 | pass | ||
129 | |||
130 | def _add_handler(self, handler): | ||
131 | """ | ||
132 | """ | ||
133 | pass | ||