summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-11-17 22:21:42 +0000
committerRichard Purdie <richard@openedhand.com>2007-11-17 22:21:42 +0000
commit636e360eea3a0faadd669a409b76fae372c6c38b (patch)
tree19efa4ed475df669bbbbfac8c69a76415d1a8030 /bitbake
parent688eca78c088dc45957dde6cc74204f5ac83e5ca (diff)
downloadpoky-636e360eea3a0faadd669a409b76fae372c6c38b.tar.gz
Remove broken c based parser code
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3192 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/parse/parse_c/BBHandler.py188
-rw-r--r--bitbake/lib/bb/parse/parse_c/Makefile36
-rw-r--r--bitbake/lib/bb/parse/parse_c/README.build12
-rw-r--r--bitbake/lib/bb/parse/parse_c/__init__.py28
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakec.pyx253
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakeparser.cc1157
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakeparser.h29
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakeparser.y179
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakescanner.cc3209
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakescanner.l319
-rw-r--r--bitbake/lib/bb/parse/parse_c/lexer.h48
-rw-r--r--bitbake/lib/bb/parse/parse_c/lexerc.h19
-rw-r--r--bitbake/lib/bb/parse/parse_c/python_output.h56
-rw-r--r--bitbake/lib/bb/parse/parse_c/token.h96
14 files changed, 0 insertions, 5629 deletions
diff --git a/bitbake/lib/bb/parse/parse_c/BBHandler.py b/bitbake/lib/bb/parse/parse_c/BBHandler.py
deleted file mode 100644
index b430e1f4e5..0000000000
--- a/bitbake/lib/bb/parse/parse_c/BBHandler.py
+++ /dev/null
@@ -1,188 +0,0 @@
1# ex:ts=4:sw=4:sts=4:et
2# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
3"""class for handling .bb files (using a C++ parser)
4
5 Reads a .bb file and obtains its metadata (using a C++ parser)
6
7 Copyright (C) 2006 Tim Robert Ansell
8 Copyright (C) 2006 Holger Hans Peter Freyther
9
10 This program is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free Software
12 Foundation; either version 2 of the License, or (at your option) any later
13 version.
14
15 Permission is hereby granted, free of charge, to any person obtaining a copy
16 of this software and associated documentation files (the "Software"), to deal
17 in the Software without restriction, including without limitation the rights
18 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19 copies of the Software, and to permit persons to whom the Software is
20 furnished to do so, subject to the following conditions:
21
22 The above copyright notice and this permission notice shall be included in all
23 copies or substantial portions of the Software.
24
25 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
28 SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
29 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
30 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
31 THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32"""
33
34import os, sys
35
36# The Module we will use here
37import bb
38
39from bitbakec import parsefile
40
41#
42# This is the Python Part of the Native Parser Implementation.
43# We will only parse .bbclass, .inc and .bb files but no
44# configuration files.
45# supports, init and handle are the public methods used by
46# parser module
47#
48# The rest of the methods are internal implementation details.
49
50def _init(fn, d):
51 """
52 Initialize the data implementation with values of
53 the environment and data from the file.
54 """
55 pass
56
57#
58# public
59#
60def supports(fn, data):
61 return fn[-3:] == ".bb" or fn[-8:] == ".bbclass" or fn[-4:] == ".inc" or fn[-5:] == ".conf"
62
63def init(fn, data):
64 if not bb.data.getVar('TOPDIR', data):
65 bb.data.setVar('TOPDIR', os.getcwd(), data)
66 if not bb.data.getVar('BBPATH', data):
67 bb.data.setVar('BBPATH', os.path.join(sys.prefix, 'share', 'bitbake'), data)
68
69def handle_inherit(d):
70 """
71 Handle inheriting of classes. This will load all default classes.
72 It could be faster, it could detect infinite loops but this is todo
73 Also this delayed loading of bb.parse could impose a penalty
74 """
75 from bb.parse import handle
76
77 files = (data.getVar('INHERIT', d, True) or "").split()
78 if not "base" in i:
79 files[0:0] = ["base"]
80
81 __inherit_cache = data.getVar('__inherit_cache', d) or []
82 for f in files:
83 file = data.expand(f, d)
84 if file[0] != "/" and file[-8:] != ".bbclass":
85 file = os.path.join('classes', '%s.bbclass' % file)
86
87 if not file in __inherit_cache:
88 debug(2, "BB %s:%d: inheriting %s" % (fn, lineno, file))
89 __inherit_cache.append( file )
90
91 try:
92 handle(file, d, True)
93 except IOError:
94 print "Failed to inherit %s" % file
95 data.setVar('__inherit_cache', __inherit_cache, d)
96
97
98def handle(fn, d, include):
99 from bb import data, parse
100
101 (root, ext) = os.path.splitext(os.path.basename(fn))
102 base_name = "%s%s" % (root,ext)
103
104 # initialize with some data
105 init(fn,d)
106
107 # check if we include or are the beginning
108 oldfile = None
109 if include:
110 oldfile = d.getVar('FILE', False)
111 is_conf = False
112 elif ext == ".conf":
113 is_conf = True
114 data.inheritFromOS(d)
115
116 # find the file
117 if not os.path.isabs(fn):
118 abs_fn = bb.which(d.getVar('BBPATH', True), fn)
119 else:
120 abs_fn = fn
121
122 # check if the file exists
123 if not os.path.exists(abs_fn):
124 raise IOError("file '%(fn)s' not found" % locals() )
125
126 # now we know the file is around mark it as dep
127 if include:
128 parse.mark_dependency(d, abs_fn)
129
130 # manipulate the bbpath
131 if ext != ".bbclass" and ext != ".conf":
132 old_bb_path = data.getVar('BBPATH', d)
133 data.setVar('BBPATH', os.path.dirname(abs_fn) + (":%s" %old_bb_path) , d)
134
135 # handle INHERITS and base inherit
136 if ext != ".bbclass" and ext != ".conf":
137 data.setVar('FILE', fn, d)
138 handle_interit(d)
139
140 # now parse this file - by defering it to C++
141 parsefile(abs_fn, d, is_conf)
142
143 # Finish it up
144 if include == 0:
145 data.expandKeys(d)
146 data.update_data(d)
147 #### !!! XXX Finish it up by executing the anonfunc
148
149
150 # restore the original FILE
151 if oldfile:
152 d.setVar('FILE', oldfile)
153
154 # restore bbpath
155 if ext != ".bbclass" and ext != ".conf":
156 data.setVar('BBPATH', old_bb_path, d )
157
158
159 return d
160
161
162# Needed for BitBake files...
163__pkgsplit_cache__={}
164def vars_from_file(mypkg, d):
165 if not mypkg:
166 return (None, None, None)
167 if mypkg in __pkgsplit_cache__:
168 return __pkgsplit_cache__[mypkg]
169
170 myfile = os.path.splitext(os.path.basename(mypkg))
171 parts = myfile[0].split('_')
172 __pkgsplit_cache__[mypkg] = parts
173 exp = 3 - len(parts)
174 tmplist = []
175 while exp != 0:
176 exp -= 1
177 tmplist.append(None)
178 parts.extend(tmplist)
179 return parts
180
181
182
183
184# Inform bitbake that we are a parser
185# We need to define all three
186from bb.parse import handlers
187handlers.append( {'supports' : supports, 'handle': handle, 'init' : init})
188del handlers
diff --git a/bitbake/lib/bb/parse/parse_c/Makefile b/bitbake/lib/bb/parse/parse_c/Makefile
deleted file mode 100644
index 77daccb72d..0000000000
--- a/bitbake/lib/bb/parse/parse_c/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
1
2buil: bitbakec.so
3 echo "Done"
4
5bitbakescanner.cc: bitbakescanner.l
6 flex -t bitbakescanner.l > bitbakescanner.cc
7
8bitbakeparser.cc: bitbakeparser.y python_output.h
9 lemon bitbakeparser.y
10 mv bitbakeparser.c bitbakeparser.cc
11
12bitbakec.c: bitbakec.pyx
13 pyrexc bitbakec.pyx
14
15bitbakec-processed.c: bitbakec.c
16 cat bitbakec.c | sed -e"s/__pyx_f_8bitbakec_//" > bitbakec-processed.c
17
18bitbakec.o: bitbakec-processed.c
19 gcc -c bitbakec-processed.c -o bitbakec.o -fPIC -I/usr/include/python2.4
20
21bitbakeparser.o: bitbakeparser.cc
22 g++ -c bitbakeparser.cc -fPIC -I/usr/include/python2.4
23
24bitbakescanner.o: bitbakescanner.cc
25 g++ -c bitbakescanner.cc -fPIC -I/usr/include/python2.4
26
27bitbakec.so: bitbakec.o bitbakeparser.o bitbakescanner.o
28 g++ -shared -fPIC bitbakeparser.o bitbakescanner.o bitbakec.o -o bitbakec.so
29
30clean:
31 rm -f *.out
32 rm -f *.cc
33 rm -f bitbakec.c
34 rm -f bitbakec-processed.c
35 rm -f *.o
36 rm -f *.so
diff --git a/bitbake/lib/bb/parse/parse_c/README.build b/bitbake/lib/bb/parse/parse_c/README.build
deleted file mode 100644
index eb6ad8c862..0000000000
--- a/bitbake/lib/bb/parse/parse_c/README.build
+++ /dev/null
@@ -1,12 +0,0 @@
1To ease portability (lemon, flex, etc) we keep the
2result of flex and lemon in the source code. We agree
3to not manually change the scanner and parser.
4
5
6
7How we create the files:
8 flex -t bitbakescanner.l > bitbakescanner.cc
9 lemon bitbakeparser.y
10 mv bitbakeparser.c bitbakeparser.cc
11
12Now manually create two files
diff --git a/bitbake/lib/bb/parse/parse_c/__init__.py b/bitbake/lib/bb/parse/parse_c/__init__.py
deleted file mode 100644
index bbb318e51f..0000000000
--- a/bitbake/lib/bb/parse/parse_c/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
1# ex:ts=4:sw=4:sts=4:et
2# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
3#
4# Copyright (C) 2006 Holger Hans Peter Freyther
5#
6# Permission is hereby granted, free of charge, to any person obtaining a copy
7# of this software and associated documentation files (the "Software"), to deal
8# in the Software without restriction, including without limitation the rights
9# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10# copies of the Software, and to permit persons to whom the Software is
11# furnished to do so, subject to the following conditions:
12#
13# The above copyright notice and this permission notice shall be included in all
14# copies or substantial portions of the Software.
15#
16# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
19# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
22# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23#
24
25__version__ = '0.1'
26__all__ = [ 'BBHandler' ]
27
28import BBHandler
diff --git a/bitbake/lib/bb/parse/parse_c/bitbakec.pyx b/bitbake/lib/bb/parse/parse_c/bitbakec.pyx
deleted file mode 100644
index c666e9b6b1..0000000000
--- a/bitbake/lib/bb/parse/parse_c/bitbakec.pyx
+++ /dev/null
@@ -1,253 +0,0 @@
1# ex:ts=4:sw=4:sts=4:et
2# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
3
4cdef extern from "stdio.h":
5 ctypedef int FILE
6 FILE *fopen(char*, char*)
7 int fclose(FILE *fp)
8
9cdef extern from "string.h":
10 int strlen(char*)
11
12cdef extern from "lexerc.h":
13 ctypedef struct lex_t:
14 void* parser
15 void* scanner
16 char* name
17 FILE* file
18 int config
19 void* data
20
21 int lineError
22 int errorParse
23
24 cdef extern int parse(FILE*, char*, object, int)
25
26def parsefile(object file, object data, object config):
27 #print "parsefile: 1", file, data
28
29 # Open the file
30 cdef FILE* f
31
32 f = fopen(file, "r")
33 #print "parsefile: 2 opening file"
34 if (f == NULL):
35 raise IOError("No such file %s." % file)
36
37 #print "parsefile: 3 parse"
38 parse(f, file, data, config)
39
40 # Close the file
41 fclose(f)
42
43
44cdef public void e_assign(lex_t* container, char* key, char* what):
45 #print "e_assign", key, what
46 if what == NULL:
47 print "FUTURE Warning empty string: use \"\""
48 what = ""
49
50 d = <object>container.data
51 d.setVar(key, what)
52
53cdef public void e_export(lex_t* c, char* what):
54 #print "e_export", what
55 #exp:
56 # bb.data.setVarFlag(key, "export", 1, data)
57 d = <object>c.data
58 d.setVarFlag(what, "export", 1)
59
60cdef public void e_immediate(lex_t* c, char* key, char* what):
61 #print "e_immediate", key, what
62 #colon:
63 # val = bb.data.expand(groupd["value"], data)
64 d = <object>c.data
65 d.setVar(key, d.expand(what,d))
66
67cdef public void e_cond(lex_t* c, char* key, char* what):
68 #print "e_cond", key, what
69 #ques:
70 # val = bb.data.getVar(key, data)
71 # if val == None:
72 # val = groupd["value"]
73 if what == NULL:
74 print "FUTURE warning: Use \"\" for", key
75 what = ""
76
77 d = <object>c.data
78 d.setVar(key, (d.getVar(key,False) or what))
79
80cdef public void e_prepend(lex_t* c, char* key, char* what):
81 #print "e_prepend", key, what
82 #prepend:
83 # val = "%s %s" % (groupd["value"], (bb.data.getVar(key, data) or ""))
84 d = <object>c.data
85 d.setVar(key, what + " " + (d.getVar(key,0) or ""))
86
87cdef public void e_append(lex_t* c, char* key, char* what):
88 #print "e_append", key, what
89 #append:
90 # val = "%s %s" % ((bb.data.getVar(key, data) or ""), groupd["value"])
91 d = <object>c.data
92 d.setVar(key, (d.getVar(key,0) or "") + " " + what)
93
94cdef public void e_precat(lex_t* c, char* key, char* what):
95 #print "e_precat", key, what
96 #predot:
97 # val = "%s%s" % (groupd["value"], (bb.data.getVar(key, data) or ""))
98 d = <object>c.data
99 d.setVar(key, what + (d.getVar(key,0) or ""))
100
101cdef public void e_postcat(lex_t* c, char* key, char* what):
102 #print "e_postcat", key, what
103 #postdot:
104 # val = "%s%s" % ((bb.data.getVar(key, data) or ""), groupd["value"])
105 d = <object>c.data
106 d.setVar(key, (d.getVar(key,0) or "") + what)
107
108cdef public int e_addtask(lex_t* c, char* name, char* before, char* after) except -1:
109 #print "e_addtask", name
110 # func = m.group("func")
111 # before = m.group("before")
112 # after = m.group("after")
113 # if func is None:
114 # return
115 # var = "do_" + func
116 #
117 # data.setVarFlag(var, "task", 1, d)
118 #
119 # if after is not None:
120 # # set up deps for function
121 # data.setVarFlag(var, "deps", after.split(), d)
122 # if before is not None:
123 # # set up things that depend on this func
124 # data.setVarFlag(var, "postdeps", before.split(), d)
125 # return
126
127 if c.config == 1:
128 from bb.parse import ParseError
129 raise ParseError("No tasks allowed in config files")
130 return -1
131
132 d = <object>c.data
133 do = "do_%s" % name
134 d.setVarFlag(do, "task", 1)
135
136 if before != NULL and strlen(before) > 0:
137 #print "Before", before
138 d.setVarFlag(do, "postdeps", ("%s" % before).split())
139 if after != NULL and strlen(after) > 0:
140 #print "After", after
141 d.setVarFlag(do, "deps", ("%s" % after).split())
142
143 return 0
144
145cdef public int e_addhandler(lex_t* c, char* h) except -1:
146 #print "e_addhandler", h
147 # data.setVarFlag(h, "handler", 1, d)
148 if c.config == 1:
149 from bb.parse import ParseError
150 raise ParseError("No handlers allowed in config files")
151 return -1
152
153 d = <object>c.data
154 d.setVarFlag(h, "handler", 1)
155 return 0
156
157cdef public int e_export_func(lex_t* c, char* function) except -1:
158 #print "e_export_func", function
159 if c.config == 1:
160 from bb.parse import ParseError
161 raise ParseError("No functions allowed in config files")
162 return -1
163
164 return 0
165
166cdef public int e_inherit(lex_t* c, char* file) except -1:
167 #print "e_inherit", file
168
169 if c.config == 1:
170 from bb.parse import ParseError
171 raise ParseError("No inherits allowed in config files")
172 return -1
173
174 return 0
175
176cdef public void e_include(lex_t* c, char* file):
177 from bb.parse import handle
178 d = <object>c.data
179
180 try:
181 handle(d.expand(file,d), d, True)
182 except IOError:
183 print "Could not include file", file
184
185
186cdef public int e_require(lex_t* c, char* file) except -1:
187 #print "e_require", file
188 from bb.parse import handle
189 d = <object>c.data
190
191 try:
192 handle(d.expand(file,d), d, True)
193 except IOError:
194 print "ParseError", file
195 from bb.parse import ParseError
196 raise ParseError("Could not include required file %s" % file)
197 return -1
198
199 return 0
200
201cdef public int e_proc(lex_t* c, char* key, char* what) except -1:
202 #print "e_proc", key, what
203 if c.config == 1:
204 from bb.parse import ParseError
205 raise ParseError("No inherits allowed in config files")
206 return -1
207
208 return 0
209
210cdef public int e_proc_python(lex_t* c, char* key, char* what) except -1:
211 #print "e_proc_python"
212 if c.config == 1:
213 from bb.parse import ParseError
214 raise ParseError("No pythin allowed in config files")
215 return -1
216
217 if key != NULL:
218 pass
219 #print "Key", key
220 if what != NULL:
221 pass
222 #print "What", what
223
224 return 0
225
226cdef public int e_proc_fakeroot(lex_t* c, char* key, char* what) except -1:
227 #print "e_fakeroot", key, what
228
229 if c.config == 1:
230 from bb.parse import ParseError
231 raise ParseError("No fakeroot allowed in config files")
232 return -1
233
234 return 0
235
236cdef public int e_def(lex_t* c, char* a, char* b, char* d) except -1:
237 #print "e_def", a, b, d
238
239 if c.config == 1:
240 from bb.parse import ParseError
241 raise ParseError("No defs allowed in config files")
242 return -1
243
244 return 0
245
246cdef public int e_parse_error(lex_t* c) except -1:
247 print "e_parse_error", c.name, "line:", lineError, "parse:", errorParse
248
249
250 from bb.parse import ParseError
251 raise ParseError("There was an parse error, sorry unable to give more information at the current time. File: %s Line: %d" % (c.name,lineError) )
252 return -1
253
diff --git a/bitbake/lib/bb/parse/parse_c/bitbakeparser.cc b/bitbake/lib/bb/parse/parse_c/bitbakeparser.cc
deleted file mode 100644
index 9d9793f8df..0000000000
--- a/bitbake/lib/bb/parse/parse_c/bitbakeparser.cc
+++ /dev/null
@@ -1,1157 +0,0 @@
1/* Driver template for the LEMON parser generator.
2** The author disclaims copyright to this source code.
3*/
4/* First off, code is include which follows the "include" declaration
5** in the input file. */
6#include <stdio.h>
7#line 43 "bitbakeparser.y"
8
9#include "token.h"
10#include "lexer.h"
11#include "python_output.h"
12#line 14 "bitbakeparser.c"
13/* Next is all token values, in a form suitable for use by makeheaders.
14** This section will be null unless lemon is run with the -m switch.
15*/
16/*
17** These constants (all generated automatically by the parser generator)
18** specify the various kinds of tokens (terminals) that the parser
19** understands.
20**
21** Each symbol here is a terminal symbol in the grammar.
22*/
23/* Make sure the INTERFACE macro is defined.
24*/
25#ifndef INTERFACE
26# define INTERFACE 1
27#endif
28/* The next thing included is series of defines which control
29** various aspects of the generated parser.
30** YYCODETYPE is the data type used for storing terminal
31** and nonterminal numbers. "unsigned char" is
32** used if there are fewer than 250 terminals
33** and nonterminals. "int" is used otherwise.
34** YYNOCODE is a number of type YYCODETYPE which corresponds
35** to no legal terminal or nonterminal number. This
36** number is used to fill in empty slots of the hash
37** table.
38** YYFALLBACK If defined, this indicates that one or more tokens
39** have fall-back values which should be used if the
40** original value of the token will not parse.
41** YYACTIONTYPE is the data type used for storing terminal
42** and nonterminal numbers. "unsigned char" is
43** used if there are fewer than 250 rules and
44** states combined. "int" is used otherwise.
45** bbparseTOKENTYPE is the data type used for minor tokens given
46** directly to the parser from the tokenizer.
47** YYMINORTYPE is the data type used for all minor tokens.
48** This is typically a union of many types, one of
49** which is bbparseTOKENTYPE. The entry in the union
50** for base tokens is called "yy0".
51** YYSTACKDEPTH is the maximum depth of the parser's stack.
52** bbparseARG_SDECL A static variable declaration for the %extra_argument
53** bbparseARG_PDECL A parameter declaration for the %extra_argument
54** bbparseARG_STORE Code to store %extra_argument into yypParser
55** bbparseARG_FETCH Code to extract %extra_argument from yypParser
56** YYNSTATE the combined number of states.
57** YYNRULE the number of rules in the grammar
58** YYERRORSYMBOL is the code number of the error symbol. If not
59** defined, then do no error processing.
60*/
61#define YYCODETYPE unsigned char
62#define YYNOCODE 44
63#define YYACTIONTYPE unsigned char
64#define bbparseTOKENTYPE token_t
65typedef union {
66 bbparseTOKENTYPE yy0;
67 int yy87;
68} YYMINORTYPE;
69#define YYSTACKDEPTH 100
70#define bbparseARG_SDECL lex_t* lex;
71#define bbparseARG_PDECL ,lex_t* lex
72#define bbparseARG_FETCH lex_t* lex = yypParser->lex
73#define bbparseARG_STORE yypParser->lex = lex
74#define YYNSTATE 82
75#define YYNRULE 45
76#define YYERRORSYMBOL 30
77#define YYERRSYMDT yy87
78#define YY_NO_ACTION (YYNSTATE+YYNRULE+2)
79#define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1)
80#define YY_ERROR_ACTION (YYNSTATE+YYNRULE)
81
82/* Next are that tables used to determine what action to take based on the
83** current state and lookahead token. These tables are used to implement
84** functions that take a state number and lookahead value and return an
85** action integer.
86**
87** Suppose the action integer is N. Then the action is determined as
88** follows
89**
90** 0 <= N < YYNSTATE Shift N. That is, push the lookahead
91** token onto the stack and goto state N.
92**
93** YYNSTATE <= N < YYNSTATE+YYNRULE Reduce by rule N-YYNSTATE.
94**
95** N == YYNSTATE+YYNRULE A syntax error has occurred.
96**
97** N == YYNSTATE+YYNRULE+1 The parser accepts its input.
98**
99** N == YYNSTATE+YYNRULE+2 No such action. Denotes unused
100** slots in the yy_action[] table.
101**
102** The action table is constructed as a single large table named yy_action[].
103** Given state S and lookahead X, the action is computed as
104**
105** yy_action[ yy_shift_ofst[S] + X ]
106**
107** If the index value yy_shift_ofst[S]+X is out of range or if the value
108** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
109** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
110** and that yy_default[S] should be used instead.
111**
112** The formula above is for computing the action when the lookahead is
113** a terminal symbol. If the lookahead is a non-terminal (as occurs after
114** a reduce action) then the yy_reduce_ofst[] array is used in place of
115** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
116** YY_SHIFT_USE_DFLT.
117**
118** The following are the tables generated in this section:
119**
120** yy_action[] A single table containing all actions.
121** yy_lookahead[] A table containing the lookahead for each entry in
122** yy_action. Used to detect hash collisions.
123** yy_shift_ofst[] For each state, the offset into yy_action for
124** shifting terminals.
125** yy_reduce_ofst[] For each state, the offset into yy_action for
126** shifting non-terminals after a reduce.
127** yy_default[] Default action for each state.
128*/
129static const YYACTIONTYPE yy_action[] = {
130 /* 0 */ 82, 3, 7, 8, 38, 22, 39, 24, 26, 32,
131 /* 10 */ 34, 28, 30, 2, 21, 40, 53, 70, 55, 44,
132 /* 20 */ 60, 65, 67, 128, 1, 36, 69, 77, 42, 46,
133 /* 30 */ 11, 66, 13, 15, 17, 19, 64, 62, 9, 7,
134 /* 40 */ 74, 38, 45, 81, 59, 57, 38, 38, 73, 76,
135 /* 50 */ 5, 68, 52, 50, 14, 31, 47, 71, 48, 10,
136 /* 60 */ 72, 33, 23, 49, 6, 41, 51, 78, 75, 16,
137 /* 70 */ 4, 54, 35, 25, 18, 80, 79, 56, 27, 37,
138 /* 80 */ 58, 12, 61, 29, 43, 63, 20,
139};
140static const YYCODETYPE yy_lookahead[] = {
141 /* 0 */ 0, 1, 2, 3, 23, 4, 25, 6, 7, 8,
142 /* 10 */ 9, 10, 11, 33, 34, 15, 16, 1, 18, 14,
143 /* 20 */ 20, 21, 22, 31, 32, 24, 26, 27, 13, 14,
144 /* 30 */ 4, 19, 6, 7, 8, 9, 39, 40, 1, 2,
145 /* 40 */ 24, 23, 12, 25, 37, 38, 23, 23, 25, 25,
146 /* 50 */ 42, 19, 35, 36, 5, 5, 12, 24, 13, 34,
147 /* 60 */ 41, 5, 5, 12, 28, 12, 35, 1, 41, 5,
148 /* 70 */ 29, 1, 5, 5, 5, 41, 24, 17, 5, 41,
149 /* 80 */ 37, 5, 19, 5, 12, 39, 5,
150};
151#define YY_SHIFT_USE_DFLT (-20)
152static const signed char yy_shift_ofst[] = {
153 /* 0 */ -20, 0, -20, 41, -20, 36, -20, -20, 37, -20,
154 /* 10 */ 26, 76, -20, 49, -20, 64, -20, 69, -20, 81,
155 /* 20 */ -20, 1, 57, -20, 68, -20, 73, -20, 78, -20,
156 /* 30 */ 50, -20, 56, -20, 67, -20, -20, -19, -20, -20,
157 /* 40 */ 53, 15, 72, 5, 30, -20, 44, 45, 51, -20,
158 /* 50 */ 53, -20, -20, 70, -20, 60, -20, 60, -20, -20,
159 /* 60 */ 63, -20, 63, -20, -20, 12, -20, 32, -20, 16,
160 /* 70 */ 33, -20, 23, -20, -20, 24, -20, 66, 52, -20,
161 /* 80 */ 18, -20,
162};
163#define YY_REDUCE_USE_DFLT (-21)
164static const signed char yy_reduce_ofst[] = {
165 /* 0 */ -8, -20, -21, -21, 8, -21, -21, -21, 25, -21,
166 /* 10 */ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
167 /* 20 */ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
168 /* 30 */ -21, -21, -21, -21, -21, -21, 38, -21, -21, -21,
169 /* 40 */ 17, -21, -21, -21, -21, -21, -21, -21, -21, -21,
170 /* 50 */ 31, -21, -21, -21, -21, 7, -21, 43, -21, -21,
171 /* 60 */ -3, -21, 46, -21, -21, -21, -21, -21, -21, -21,
172 /* 70 */ -21, 19, -21, -21, 27, -21, -21, -21, -21, 34,
173 /* 80 */ -21, -21,
174};
175static const YYACTIONTYPE yy_default[] = {
176 /* 0 */ 84, 127, 83, 85, 125, 126, 124, 86, 127, 85,
177 /* 10 */ 127, 127, 87, 127, 88, 127, 89, 127, 90, 127,
178 /* 20 */ 91, 127, 127, 92, 127, 93, 127, 94, 127, 95,
179 /* 30 */ 127, 96, 127, 97, 127, 98, 119, 127, 118, 120,
180 /* 40 */ 127, 101, 127, 102, 127, 99, 127, 103, 127, 100,
181 /* 50 */ 106, 104, 105, 127, 107, 127, 108, 111, 109, 110,
182 /* 60 */ 127, 112, 115, 113, 114, 127, 116, 127, 117, 127,
183 /* 70 */ 127, 119, 127, 121, 119, 127, 122, 127, 127, 119,
184 /* 80 */ 127, 123,
185};
186#define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0]))
187
188/* The next table maps tokens into fallback tokens. If a construct
189** like the following:
190**
191** %fallback ID X Y Z.
192**
193** appears in the grammer, then ID becomes a fallback token for X, Y,
194** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
195** but it does not parse, the type of the token is changed to ID and
196** the parse is retried before an error is thrown.
197*/
198#ifdef YYFALLBACK
199static const YYCODETYPE yyFallback[] = {
200};
201#endif /* YYFALLBACK */
202
203/* The following structure represents a single element of the
204** parser's stack. Information stored includes:
205**
206** + The state number for the parser at this level of the stack.
207**
208** + The value of the token stored at this level of the stack.
209** (In other words, the "major" token.)
210**
211** + The semantic value stored at this level of the stack. This is
212** the information used by the action routines in the grammar.
213** It is sometimes called the "minor" token.
214*/
215struct yyStackEntry {
216 int stateno; /* The state-number */
217 int major; /* The major token value. This is the code
218 ** number for the token at this stack level */
219 YYMINORTYPE minor; /* The user-supplied minor token value. This
220 ** is the value of the token */
221};
222typedef struct yyStackEntry yyStackEntry;
223
224/* The state of the parser is completely contained in an instance of
225** the following structure */
226struct yyParser {
227 int yyidx; /* Index of top element in stack */
228 int yyerrcnt; /* Shifts left before out of the error */
229 bbparseARG_SDECL /* A place to hold %extra_argument */
230 yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
231};
232typedef struct yyParser yyParser;
233
234#ifndef NDEBUG
235#include <stdio.h>
236static FILE *yyTraceFILE = 0;
237static char *yyTracePrompt = 0;
238#endif /* NDEBUG */
239
240#ifndef NDEBUG
241/*
242** Turn parser tracing on by giving a stream to which to write the trace
243** and a prompt to preface each trace message. Tracing is turned off
244** by making either argument NULL
245**
246** Inputs:
247** <ul>
248** <li> A FILE* to which trace output should be written.
249** If NULL, then tracing is turned off.
250** <li> A prefix string written at the beginning of every
251** line of trace output. If NULL, then tracing is
252** turned off.
253** </ul>
254**
255** Outputs:
256** None.
257*/
258void bbparseTrace(FILE *TraceFILE, char *zTracePrompt){
259 yyTraceFILE = TraceFILE;
260 yyTracePrompt = zTracePrompt;
261 if( yyTraceFILE==0 ) yyTracePrompt = 0;
262 else if( yyTracePrompt==0 ) yyTraceFILE = 0;
263}
264#endif /* NDEBUG */
265
266#ifndef NDEBUG
267/* For tracing shifts, the names of all terminals and nonterminals
268** are required. The following table supplies these names */
269static const char *const yyTokenName[] = {
270 "$", "SYMBOL", "VARIABLE", "EXPORT",
271 "OP_ASSIGN", "STRING", "OP_PREDOT", "OP_POSTDOT",
272 "OP_IMMEDIATE", "OP_COND", "OP_PREPEND", "OP_APPEND",
273 "TSYMBOL", "BEFORE", "AFTER", "ADDTASK",
274 "ADDHANDLER", "FSYMBOL", "EXPORT_FUNC", "ISYMBOL",
275 "INHERIT", "INCLUDE", "REQUIRE", "PROC_BODY",
276 "PROC_OPEN", "PROC_CLOSE", "PYTHON", "FAKEROOT",
277 "DEF_BODY", "DEF_ARGS", "error", "program",
278 "statements", "statement", "variable", "task",
279 "tasks", "func", "funcs", "inherit",
280 "inherits", "proc_body", "def_body",
281};
282#endif /* NDEBUG */
283
284#ifndef NDEBUG
285/* For tracing reduce actions, the names of all rules are required.
286*/
287static const char *const yyRuleName[] = {
288 /* 0 */ "program ::= statements",
289 /* 1 */ "statements ::= statements statement",
290 /* 2 */ "statements ::=",
291 /* 3 */ "variable ::= SYMBOL",
292 /* 4 */ "variable ::= VARIABLE",
293 /* 5 */ "statement ::= EXPORT variable OP_ASSIGN STRING",
294 /* 6 */ "statement ::= EXPORT variable OP_PREDOT STRING",
295 /* 7 */ "statement ::= EXPORT variable OP_POSTDOT STRING",
296 /* 8 */ "statement ::= EXPORT variable OP_IMMEDIATE STRING",
297 /* 9 */ "statement ::= EXPORT variable OP_COND STRING",
298 /* 10 */ "statement ::= variable OP_ASSIGN STRING",
299 /* 11 */ "statement ::= variable OP_PREDOT STRING",
300 /* 12 */ "statement ::= variable OP_POSTDOT STRING",
301 /* 13 */ "statement ::= variable OP_PREPEND STRING",
302 /* 14 */ "statement ::= variable OP_APPEND STRING",
303 /* 15 */ "statement ::= variable OP_IMMEDIATE STRING",
304 /* 16 */ "statement ::= variable OP_COND STRING",
305 /* 17 */ "task ::= TSYMBOL BEFORE TSYMBOL AFTER TSYMBOL",
306 /* 18 */ "task ::= TSYMBOL AFTER TSYMBOL BEFORE TSYMBOL",
307 /* 19 */ "task ::= TSYMBOL",
308 /* 20 */ "task ::= TSYMBOL BEFORE TSYMBOL",
309 /* 21 */ "task ::= TSYMBOL AFTER TSYMBOL",
310 /* 22 */ "tasks ::= tasks task",
311 /* 23 */ "tasks ::= task",
312 /* 24 */ "statement ::= ADDTASK tasks",
313 /* 25 */ "statement ::= ADDHANDLER SYMBOL",
314 /* 26 */ "func ::= FSYMBOL",
315 /* 27 */ "funcs ::= funcs func",
316 /* 28 */ "funcs ::= func",
317 /* 29 */ "statement ::= EXPORT_FUNC funcs",
318 /* 30 */ "inherit ::= ISYMBOL",
319 /* 31 */ "inherits ::= inherits inherit",
320 /* 32 */ "inherits ::= inherit",
321 /* 33 */ "statement ::= INHERIT inherits",
322 /* 34 */ "statement ::= INCLUDE ISYMBOL",
323 /* 35 */ "statement ::= REQUIRE ISYMBOL",
324 /* 36 */ "proc_body ::= proc_body PROC_BODY",
325 /* 37 */ "proc_body ::=",
326 /* 38 */ "statement ::= variable PROC_OPEN proc_body PROC_CLOSE",
327 /* 39 */ "statement ::= PYTHON SYMBOL PROC_OPEN proc_body PROC_CLOSE",
328 /* 40 */ "statement ::= PYTHON PROC_OPEN proc_body PROC_CLOSE",
329 /* 41 */ "statement ::= FAKEROOT SYMBOL PROC_OPEN proc_body PROC_CLOSE",
330 /* 42 */ "def_body ::= def_body DEF_BODY",
331 /* 43 */ "def_body ::=",
332 /* 44 */ "statement ::= SYMBOL DEF_ARGS def_body",
333};
334#endif /* NDEBUG */
335
336/*
337** This function returns the symbolic name associated with a token
338** value.
339*/
340const char *bbparseTokenName(int tokenType){
341#ifndef NDEBUG
342 if( tokenType>0 && tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){
343 return yyTokenName[tokenType];
344 }else{
345 return "Unknown";
346 }
347#else
348 return "";
349#endif
350}
351
352/*
353** This function allocates a new parser.
354** The only argument is a pointer to a function which works like
355** malloc.
356**
357** Inputs:
358** A pointer to the function used to allocate memory.
359**
360** Outputs:
361** A pointer to a parser. This pointer is used in subsequent calls
362** to bbparse and bbparseFree.
363*/
364void *bbparseAlloc(void *(*mallocProc)(size_t)){
365 yyParser *pParser;
366 pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
367 if( pParser ){
368 pParser->yyidx = -1;
369 }
370 return pParser;
371}
372
373/* The following function deletes the value associated with a
374** symbol. The symbol can be either a terminal or nonterminal.
375** "yymajor" is the symbol code, and "yypminor" is a pointer to
376** the value.
377*/
378static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){
379 switch( yymajor ){
380 /* Here is inserted the actions which take place when a
381 ** terminal or non-terminal is destroyed. This can happen
382 ** when the symbol is popped from the stack during a
383 ** reduce or during error processing or when a parser is
384 ** being destroyed before it is finished parsing.
385 **
386 ** Note: during a reduce, the only symbols destroyed are those
387 ** which appear on the RHS of the rule, but which are not used
388 ** inside the C code.
389 */
390 case 1:
391 case 2:
392 case 3:
393 case 4:
394 case 5:
395 case 6:
396 case 7:
397 case 8:
398 case 9:
399 case 10:
400 case 11:
401 case 12:
402 case 13:
403 case 14:
404 case 15:
405 case 16:
406 case 17:
407 case 18:
408 case 19:
409 case 20:
410 case 21:
411 case 22:
412 case 23:
413 case 24:
414 case 25:
415 case 26:
416 case 27:
417 case 28:
418 case 29:
419#line 50 "bitbakeparser.y"
420{ (yypminor->yy0).release_this (); }
421#line 423 "bitbakeparser.c"
422 break;
423 default: break; /* If no destructor action specified: do nothing */
424 }
425}
426
427/*
428** Pop the parser's stack once.
429**
430** If there is a destructor routine associated with the token which
431** is popped from the stack, then call it.
432**
433** Return the major token number for the symbol popped.
434*/
435static int yy_pop_parser_stack(yyParser *pParser){
436 YYCODETYPE yymajor;
437 yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
438
439 if( pParser->yyidx<0 ) return 0;
440#ifndef NDEBUG
441 if( yyTraceFILE && pParser->yyidx>=0 ){
442 fprintf(yyTraceFILE,"%sPopping %s\n",
443 yyTracePrompt,
444 yyTokenName[yytos->major]);
445 }
446#endif
447 yymajor = yytos->major;
448 yy_destructor( yymajor, &yytos->minor);
449 pParser->yyidx--;
450 return yymajor;
451}
452
453/*
454** Deallocate and destroy a parser. Destructors are all called for
455** all stack elements before shutting the parser down.
456**
457** Inputs:
458** <ul>
459** <li> A pointer to the parser. This should be a pointer
460** obtained from bbparseAlloc.
461** <li> A pointer to a function used to reclaim memory obtained
462** from malloc.
463** </ul>
464*/
465void bbparseFree(
466 void *p, /* The parser to be deleted */
467 void (*freeProc)(void*) /* Function used to reclaim memory */
468){
469 yyParser *pParser = (yyParser*)p;
470 if( pParser==0 ) return;
471 while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
472 (*freeProc)((void*)pParser);
473}
474
475/*
476** Find the appropriate action for a parser given the terminal
477** look-ahead token iLookAhead.
478**
479** If the look-ahead token is YYNOCODE, then check to see if the action is
480** independent of the look-ahead. If it is, return the action, otherwise
481** return YY_NO_ACTION.
482*/
483static int yy_find_shift_action(
484 yyParser *pParser, /* The parser */
485 int iLookAhead /* The look-ahead token */
486){
487 int i;
488 int stateno = pParser->yystack[pParser->yyidx].stateno;
489
490 /* if( pParser->yyidx<0 ) return YY_NO_ACTION; */
491 i = yy_shift_ofst[stateno];
492 if( i==YY_SHIFT_USE_DFLT ){
493 return yy_default[stateno];
494 }
495 if( iLookAhead==YYNOCODE ){
496 return YY_NO_ACTION;
497 }
498 i += iLookAhead;
499 if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
500#ifdef YYFALLBACK
501 int iFallback; /* Fallback token */
502 if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
503 && (iFallback = yyFallback[iLookAhead])!=0 ){
504#ifndef NDEBUG
505 if( yyTraceFILE ){
506 fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
507 yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
508 }
509#endif
510 return yy_find_shift_action(pParser, iFallback);
511 }
512#endif
513 return yy_default[stateno];
514 }else{
515 return yy_action[i];
516 }
517}
518
519/*
520** Find the appropriate action for a parser given the non-terminal
521** look-ahead token iLookAhead.
522**
523** If the look-ahead token is YYNOCODE, then check to see if the action is
524** independent of the look-ahead. If it is, return the action, otherwise
525** return YY_NO_ACTION.
526*/
527static int yy_find_reduce_action(
528 int stateno, /* Current state number */
529 int iLookAhead /* The look-ahead token */
530){
531 int i;
532 /* int stateno = pParser->yystack[pParser->yyidx].stateno; */
533
534 i = yy_reduce_ofst[stateno];
535 if( i==YY_REDUCE_USE_DFLT ){
536 return yy_default[stateno];
537 }
538 if( iLookAhead==YYNOCODE ){
539 return YY_NO_ACTION;
540 }
541 i += iLookAhead;
542 if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
543 return yy_default[stateno];
544 }else{
545 return yy_action[i];
546 }
547}
548
549/*
550** Perform a shift action.
551*/
552static void yy_shift(
553 yyParser *yypParser, /* The parser to be shifted */
554 int yyNewState, /* The new state to shift in */
555 int yyMajor, /* The major token to shift in */
556 YYMINORTYPE *yypMinor /* Pointer ot the minor token to shift in */
557){
558 yyStackEntry *yytos;
559 yypParser->yyidx++;
560 if( yypParser->yyidx>=YYSTACKDEPTH ){
561 bbparseARG_FETCH;
562 yypParser->yyidx--;
563#ifndef NDEBUG
564 if( yyTraceFILE ){
565 fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
566 }
567#endif
568 while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
569 /* Here code is inserted which will execute if the parser
570 ** stack every overflows */
571 bbparseARG_STORE; /* Suppress warning about unused %extra_argument var */
572 return;
573 }
574 yytos = &yypParser->yystack[yypParser->yyidx];
575 yytos->stateno = yyNewState;
576 yytos->major = yyMajor;
577 yytos->minor = *yypMinor;
578#ifndef NDEBUG
579 if( yyTraceFILE && yypParser->yyidx>0 ){
580 int i;
581 fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
582 fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
583 for(i=1; i<=yypParser->yyidx; i++)
584 fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
585 fprintf(yyTraceFILE,"\n");
586 }
587#endif
588}
589
590/* The following table contains information about every rule that
591** is used during the reduce.
592*/
593static const struct {
594 YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
595 unsigned char nrhs; /* Number of right-hand side symbols in the rule */
596} yyRuleInfo[] = {
597 { 31, 1 },
598 { 32, 2 },
599 { 32, 0 },
600 { 34, 1 },
601 { 34, 1 },
602 { 33, 4 },
603 { 33, 4 },
604 { 33, 4 },
605 { 33, 4 },
606 { 33, 4 },
607 { 33, 3 },
608 { 33, 3 },
609 { 33, 3 },
610 { 33, 3 },
611 { 33, 3 },
612 { 33, 3 },
613 { 33, 3 },
614 { 35, 5 },
615 { 35, 5 },
616 { 35, 1 },
617 { 35, 3 },
618 { 35, 3 },
619 { 36, 2 },
620 { 36, 1 },
621 { 33, 2 },
622 { 33, 2 },
623 { 37, 1 },
624 { 38, 2 },
625 { 38, 1 },
626 { 33, 2 },
627 { 39, 1 },
628 { 40, 2 },
629 { 40, 1 },
630 { 33, 2 },
631 { 33, 2 },
632 { 33, 2 },
633 { 41, 2 },
634 { 41, 0 },
635 { 33, 4 },
636 { 33, 5 },
637 { 33, 4 },
638 { 33, 5 },
639 { 42, 2 },
640 { 42, 0 },
641 { 33, 3 },
642};
643
644static void yy_accept(yyParser*); /* Forward Declaration */
645
646/*
647** Perform a reduce action and the shift that must immediately
648** follow the reduce.
649*/
650static void yy_reduce(
651 yyParser *yypParser, /* The parser */
652 int yyruleno /* Number of the rule by which to reduce */
653){
654 int yygoto; /* The next state */
655 int yyact; /* The next action */
656 YYMINORTYPE yygotominor; /* The LHS of the rule reduced */
657 yyStackEntry *yymsp; /* The top of the parser's stack */
658 int yysize; /* Amount to pop the stack */
659 bbparseARG_FETCH;
660 yymsp = &yypParser->yystack[yypParser->yyidx];
661#ifndef NDEBUG
662 if( yyTraceFILE && yyruleno>=0
663 && yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){
664 fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
665 yyRuleName[yyruleno]);
666 }
667#endif /* NDEBUG */
668
669#ifndef NDEBUG
670 /* Silence complaints from purify about yygotominor being uninitialized
671 ** in some cases when it is copied into the stack after the following
672 ** switch. yygotominor is uninitialized when a rule reduces that does
673 ** not set the value of its left-hand side nonterminal. Leaving the
674 ** value of the nonterminal uninitialized is utterly harmless as long
675 ** as the value is never used. So really the only thing this code
676 ** accomplishes is to quieten purify.
677 */
678 memset(&yygotominor, 0, sizeof(yygotominor));
679#endif
680
681 switch( yyruleno ){
682 /* Beginning here are the reduction cases. A typical example
683 ** follows:
684 ** case 0:
685 ** #line <lineno> <grammarfile>
686 ** { ... } // User supplied code
687 ** #line <lineno> <thisfile>
688 ** break;
689 */
690 case 3:
691#line 60 "bitbakeparser.y"
692{ yygotominor.yy0.assignString( (char*)yymsp[0].minor.yy0.string() );
693 yymsp[0].minor.yy0.assignString( 0 );
694 yymsp[0].minor.yy0.release_this(); }
695#line 697 "bitbakeparser.c"
696 break;
697 case 4:
698#line 64 "bitbakeparser.y"
699{
700 yygotominor.yy0.assignString( (char*)yymsp[0].minor.yy0.string() );
701 yymsp[0].minor.yy0.assignString( 0 );
702 yymsp[0].minor.yy0.release_this(); }
703#line 705 "bitbakeparser.c"
704 break;
705 case 5:
706#line 70 "bitbakeparser.y"
707{ e_assign( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
708 e_export( lex, yymsp[-2].minor.yy0.string() );
709 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor);
710 yy_destructor(4,&yymsp[-1].minor);
711}
712#line 714 "bitbakeparser.c"
713 break;
714 case 6:
715#line 74 "bitbakeparser.y"
716{ e_precat( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
717 e_export( lex, yymsp[-2].minor.yy0.string() );
718 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor);
719 yy_destructor(6,&yymsp[-1].minor);
720}
721#line 723 "bitbakeparser.c"
722 break;
723 case 7:
724#line 78 "bitbakeparser.y"
725{ e_postcat( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
726 e_export( lex, yymsp[-2].minor.yy0.string() );
727 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor);
728 yy_destructor(7,&yymsp[-1].minor);
729}
730#line 732 "bitbakeparser.c"
731 break;
732 case 8:
733#line 82 "bitbakeparser.y"
734{ e_immediate ( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
735 e_export( lex, yymsp[-2].minor.yy0.string() );
736 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor);
737 yy_destructor(8,&yymsp[-1].minor);
738}
739#line 741 "bitbakeparser.c"
740 break;
741 case 9:
742#line 86 "bitbakeparser.y"
743{ e_cond( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
744 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor);
745 yy_destructor(9,&yymsp[-1].minor);
746}
747#line 749 "bitbakeparser.c"
748 break;
749 case 10:
750#line 90 "bitbakeparser.y"
751{ e_assign( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
752 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(4,&yymsp[-1].minor);
753}
754#line 756 "bitbakeparser.c"
755 break;
756 case 11:
757#line 93 "bitbakeparser.y"
758{ e_precat( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
759 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(6,&yymsp[-1].minor);
760}
761#line 763 "bitbakeparser.c"
762 break;
763 case 12:
764#line 96 "bitbakeparser.y"
765{ e_postcat( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
766 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(7,&yymsp[-1].minor);
767}
768#line 770 "bitbakeparser.c"
769 break;
770 case 13:
771#line 99 "bitbakeparser.y"
772{ e_prepend( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
773 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(10,&yymsp[-1].minor);
774}
775#line 777 "bitbakeparser.c"
776 break;
777 case 14:
778#line 102 "bitbakeparser.y"
779{ e_append( lex, yymsp[-2].minor.yy0.string() , yymsp[0].minor.yy0.string() );
780 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(11,&yymsp[-1].minor);
781}
782#line 784 "bitbakeparser.c"
783 break;
784 case 15:
785#line 105 "bitbakeparser.y"
786{ e_immediate( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
787 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(8,&yymsp[-1].minor);
788}
789#line 791 "bitbakeparser.c"
790 break;
791 case 16:
792#line 108 "bitbakeparser.y"
793{ e_cond( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
794 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(9,&yymsp[-1].minor);
795}
796#line 798 "bitbakeparser.c"
797 break;
798 case 17:
799#line 112 "bitbakeparser.y"
800{ e_addtask( lex, yymsp[-4].minor.yy0.string(), yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() );
801 yymsp[-4].minor.yy0.release_this(); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(13,&yymsp[-3].minor);
802 yy_destructor(14,&yymsp[-1].minor);
803}
804#line 806 "bitbakeparser.c"
805 break;
806 case 18:
807#line 115 "bitbakeparser.y"
808{ e_addtask( lex, yymsp[-4].minor.yy0.string(), yymsp[0].minor.yy0.string(), yymsp[-2].minor.yy0.string());
809 yymsp[-4].minor.yy0.release_this(); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(14,&yymsp[-3].minor);
810 yy_destructor(13,&yymsp[-1].minor);
811}
812#line 814 "bitbakeparser.c"
813 break;
814 case 19:
815#line 118 "bitbakeparser.y"
816{ e_addtask( lex, yymsp[0].minor.yy0.string(), NULL, NULL);
817 yymsp[0].minor.yy0.release_this();}
818#line 820 "bitbakeparser.c"
819 break;
820 case 20:
821#line 121 "bitbakeparser.y"
822{ e_addtask( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string(), NULL);
823 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(13,&yymsp[-1].minor);
824}
825#line 827 "bitbakeparser.c"
826 break;
827 case 21:
828#line 124 "bitbakeparser.y"
829{ e_addtask( lex, yymsp[-2].minor.yy0.string(), NULL, yymsp[0].minor.yy0.string());
830 yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(14,&yymsp[-1].minor);
831}
832#line 834 "bitbakeparser.c"
833 break;
834 case 25:
835#line 131 "bitbakeparser.y"
836{ e_addhandler( lex, yymsp[0].minor.yy0.string()); yymsp[0].minor.yy0.release_this (); yy_destructor(16,&yymsp[-1].minor);
837}
838#line 840 "bitbakeparser.c"
839 break;
840 case 26:
841#line 133 "bitbakeparser.y"
842{ e_export_func( lex, yymsp[0].minor.yy0.string()); yymsp[0].minor.yy0.release_this(); }
843#line 845 "bitbakeparser.c"
844 break;
845 case 30:
846#line 138 "bitbakeparser.y"
847{ e_inherit( lex, yymsp[0].minor.yy0.string() ); yymsp[0].minor.yy0.release_this (); }
848#line 850 "bitbakeparser.c"
849 break;
850 case 34:
851#line 144 "bitbakeparser.y"
852{ e_include( lex, yymsp[0].minor.yy0.string() ); yymsp[0].minor.yy0.release_this(); yy_destructor(21,&yymsp[-1].minor);
853}
854#line 856 "bitbakeparser.c"
855 break;
856 case 35:
857#line 147 "bitbakeparser.y"
858{ e_require( lex, yymsp[0].minor.yy0.string() ); yymsp[0].minor.yy0.release_this(); yy_destructor(22,&yymsp[-1].minor);
859}
860#line 862 "bitbakeparser.c"
861 break;
862 case 36:
863#line 150 "bitbakeparser.y"
864{ /* concatenate body lines */
865 yygotominor.yy0.assignString( token_t::concatString(yymsp[-1].minor.yy0.string(), yymsp[0].minor.yy0.string()) );
866 yymsp[-1].minor.yy0.release_this ();
867 yymsp[0].minor.yy0.release_this ();
868 }
869#line 871 "bitbakeparser.c"
870 break;
871 case 37:
872#line 155 "bitbakeparser.y"
873{ yygotominor.yy0.assignString(0); }
874#line 876 "bitbakeparser.c"
875 break;
876 case 38:
877#line 157 "bitbakeparser.y"
878{ e_proc( lex, yymsp[-3].minor.yy0.string(), yymsp[-1].minor.yy0.string() );
879 yymsp[-3].minor.yy0.release_this(); yymsp[-1].minor.yy0.release_this(); yy_destructor(24,&yymsp[-2].minor);
880 yy_destructor(25,&yymsp[0].minor);
881}
882#line 884 "bitbakeparser.c"
883 break;
884 case 39:
885#line 160 "bitbakeparser.y"
886{ e_proc_python ( lex, yymsp[-3].minor.yy0.string(), yymsp[-1].minor.yy0.string() );
887 yymsp[-3].minor.yy0.release_this(); yymsp[-1].minor.yy0.release_this(); yy_destructor(26,&yymsp[-4].minor);
888 yy_destructor(24,&yymsp[-2].minor);
889 yy_destructor(25,&yymsp[0].minor);
890}
891#line 893 "bitbakeparser.c"
892 break;
893 case 40:
894#line 163 "bitbakeparser.y"
895{ e_proc_python( lex, NULL, yymsp[-1].minor.yy0.string());
896 yymsp[-1].minor.yy0.release_this (); yy_destructor(26,&yymsp[-3].minor);
897 yy_destructor(24,&yymsp[-2].minor);
898 yy_destructor(25,&yymsp[0].minor);
899}
900#line 902 "bitbakeparser.c"
901 break;
902 case 41:
903#line 167 "bitbakeparser.y"
904{ e_proc_fakeroot( lex, yymsp[-3].minor.yy0.string(), yymsp[-1].minor.yy0.string() );
905 yymsp[-3].minor.yy0.release_this (); yymsp[-1].minor.yy0.release_this (); yy_destructor(27,&yymsp[-4].minor);
906 yy_destructor(24,&yymsp[-2].minor);
907 yy_destructor(25,&yymsp[0].minor);
908}
909#line 911 "bitbakeparser.c"
910 break;
911 case 42:
912#line 171 "bitbakeparser.y"
913{ /* concatenate body lines */
914 yygotominor.yy0.assignString( token_t::concatString(yymsp[-1].minor.yy0.string(), yymsp[0].minor.yy0.string()) );
915 yymsp[-1].minor.yy0.release_this (); yymsp[0].minor.yy0.release_this ();
916 }
917#line 919 "bitbakeparser.c"
918 break;
919 case 43:
920#line 175 "bitbakeparser.y"
921{ yygotominor.yy0.assignString( 0 ); }
922#line 924 "bitbakeparser.c"
923 break;
924 case 44:
925#line 177 "bitbakeparser.y"
926{ e_def( lex, yymsp[-2].minor.yy0.string(), yymsp[-1].minor.yy0.string(), yymsp[0].minor.yy0.string());
927 yymsp[-2].minor.yy0.release_this(); yymsp[-1].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); }
928#line 930 "bitbakeparser.c"
929 break;
930 };
931 yygoto = yyRuleInfo[yyruleno].lhs;
932 yysize = yyRuleInfo[yyruleno].nrhs;
933 yypParser->yyidx -= yysize;
934 yyact = yy_find_reduce_action(yymsp[-yysize].stateno,yygoto);
935 if( yyact < YYNSTATE ){
936#ifdef NDEBUG
937 /* If we are not debugging and the reduce action popped at least
938 ** one element off the stack, then we can push the new element back
939 ** onto the stack here, and skip the stack overflow test in yy_shift().
940 ** That gives a significant speed improvement. */
941 if( yysize ){
942 yypParser->yyidx++;
943 yymsp -= yysize-1;
944 yymsp->stateno = yyact;
945 yymsp->major = yygoto;
946 yymsp->minor = yygotominor;
947 }else
948#endif
949 {
950 yy_shift(yypParser,yyact,yygoto,&yygotominor);
951 }
952 }else if( yyact == YYNSTATE + YYNRULE + 1 ){
953 yy_accept(yypParser);
954 }
955}
956
957/*
958** The following code executes when the parse fails
959*/
960static void yy_parse_failed(
961 yyParser *yypParser /* The parser */
962){
963 bbparseARG_FETCH;
964#ifndef NDEBUG
965 if( yyTraceFILE ){
966 fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
967 }
968#endif
969 while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
970 /* Here code is inserted which will be executed whenever the
971 ** parser fails */
972 bbparseARG_STORE; /* Suppress warning about unused %extra_argument variable */
973}
974
975/*
976** The following code executes when a syntax error first occurs.
977*/
978static void yy_syntax_error(
979 yyParser *yypParser, /* The parser */
980 int yymajor, /* The major type of the error token */
981 YYMINORTYPE yyminor /* The minor type of the error token */
982){
983 bbparseARG_FETCH;
984#define TOKEN (yyminor.yy0)
985#line 52 "bitbakeparser.y"
986 e_parse_error( lex );
987#line 990 "bitbakeparser.c"
988 bbparseARG_STORE; /* Suppress warning about unused %extra_argument variable */
989}
990
991/*
992** The following is executed when the parser accepts
993*/
994static void yy_accept(
995 yyParser *yypParser /* The parser */
996){
997 bbparseARG_FETCH;
998#ifndef NDEBUG
999 if( yyTraceFILE ){
1000 fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
1001 }
1002#endif
1003 while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
1004 /* Here code is inserted which will be executed whenever the
1005 ** parser accepts */
1006 bbparseARG_STORE; /* Suppress warning about unused %extra_argument variable */
1007}
1008
1009/* The main parser program.
1010** The first argument is a pointer to a structure obtained from
1011** "bbparseAlloc" which describes the current state of the parser.
1012** The second argument is the major token number. The third is
1013** the minor token. The fourth optional argument is whatever the
1014** user wants (and specified in the grammar) and is available for
1015** use by the action routines.
1016**
1017** Inputs:
1018** <ul>
1019** <li> A pointer to the parser (an opaque structure.)
1020** <li> The major token number.
1021** <li> The minor token number.
1022** <li> An option argument of a grammar-specified type.
1023** </ul>
1024**
1025** Outputs:
1026** None.
1027*/
1028void bbparse(
1029 void *yyp, /* The parser */
1030 int yymajor, /* The major token code number */
1031 bbparseTOKENTYPE yyminor /* The value for the token */
1032 bbparseARG_PDECL /* Optional %extra_argument parameter */
1033){
1034 YYMINORTYPE yyminorunion;
1035 int yyact; /* The parser action. */
1036 int yyendofinput; /* True if we are at the end of input */
1037 int yyerrorhit = 0; /* True if yymajor has invoked an error */
1038 yyParser *yypParser; /* The parser */
1039
1040 /* (re)initialize the parser, if necessary */
1041 yypParser = (yyParser*)yyp;
1042 if( yypParser->yyidx<0 ){
1043 if( yymajor==0 ) return;
1044 yypParser->yyidx = 0;
1045 yypParser->yyerrcnt = -1;
1046 yypParser->yystack[0].stateno = 0;
1047 yypParser->yystack[0].major = 0;
1048 }
1049 yyminorunion.yy0 = yyminor;
1050 yyendofinput = (yymajor==0);
1051 bbparseARG_STORE;
1052
1053#ifndef NDEBUG
1054 if( yyTraceFILE ){
1055 fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
1056 }
1057#endif
1058
1059 do{
1060 yyact = yy_find_shift_action(yypParser,yymajor);
1061 if( yyact<YYNSTATE ){
1062 yy_shift(yypParser,yyact,yymajor,&yyminorunion);
1063 yypParser->yyerrcnt--;
1064 if( yyendofinput && yypParser->yyidx>=0 ){
1065 yymajor = 0;
1066 }else{
1067 yymajor = YYNOCODE;
1068 }
1069 }else if( yyact < YYNSTATE + YYNRULE ){
1070 yy_reduce(yypParser,yyact-YYNSTATE);
1071 }else if( yyact == YY_ERROR_ACTION ){
1072 int yymx;
1073#ifndef NDEBUG
1074 if( yyTraceFILE ){
1075 fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
1076 }
1077#endif
1078#ifdef YYERRORSYMBOL
1079 /* A syntax error has occurred.
1080 ** The response to an error depends upon whether or not the
1081 ** grammar defines an error token "ERROR".
1082 **
1083 ** This is what we do if the grammar does define ERROR:
1084 **
1085 ** * Call the %syntax_error function.
1086 **
1087 ** * Begin popping the stack until we enter a state where
1088 ** it is legal to shift the error symbol, then shift
1089 ** the error symbol.
1090 **
1091 ** * Set the error count to three.
1092 **
1093 ** * Begin accepting and shifting new tokens. No new error
1094 ** processing will occur until three tokens have been
1095 ** shifted successfully.
1096 **
1097 */
1098 if( yypParser->yyerrcnt<0 ){
1099 yy_syntax_error(yypParser,yymajor,yyminorunion);
1100 }
1101 yymx = yypParser->yystack[yypParser->yyidx].major;
1102 if( yymx==YYERRORSYMBOL || yyerrorhit ){
1103#ifndef NDEBUG
1104 if( yyTraceFILE ){
1105 fprintf(yyTraceFILE,"%sDiscard input token %s\n",
1106 yyTracePrompt,yyTokenName[yymajor]);
1107 }
1108#endif
1109 yy_destructor(yymajor,&yyminorunion);
1110 yymajor = YYNOCODE;
1111 }else{
1112 while(
1113 yypParser->yyidx >= 0 &&
1114 yymx != YYERRORSYMBOL &&
1115 (yyact = yy_find_shift_action(yypParser,YYERRORSYMBOL)) >= YYNSTATE
1116 ){
1117 yy_pop_parser_stack(yypParser);
1118 }
1119 if( yypParser->yyidx < 0 || yymajor==0 ){
1120 yy_destructor(yymajor,&yyminorunion);
1121 yy_parse_failed(yypParser);
1122 yymajor = YYNOCODE;
1123 }else if( yymx!=YYERRORSYMBOL ){
1124 YYMINORTYPE u2;
1125 u2.YYERRSYMDT = 0;
1126 yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
1127 }
1128 }
1129 yypParser->yyerrcnt = 3;
1130 yyerrorhit = 1;
1131#else /* YYERRORSYMBOL is not defined */
1132 /* This is what we do if the grammar does not define ERROR:
1133 **
1134 ** * Report an error message, and throw away the input token.
1135 **
1136 ** * If the input token is $, then fail the parse.
1137 **
1138 ** As before, subsequent error messages are suppressed until
1139 ** three input tokens have been successfully shifted.
1140 */
1141 if( yypParser->yyerrcnt<=0 ){
1142 yy_syntax_error(yypParser,yymajor,yyminorunion);
1143 }
1144 yypParser->yyerrcnt = 3;
1145 yy_destructor(yymajor,&yyminorunion);
1146 if( yyendofinput ){
1147 yy_parse_failed(yypParser);
1148 }
1149 yymajor = YYNOCODE;
1150#endif
1151 }else{
1152 yy_accept(yypParser);
1153 yymajor = YYNOCODE;
1154 }
1155 }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
1156 return;
1157}
diff --git a/bitbake/lib/bb/parse/parse_c/bitbakeparser.h b/bitbake/lib/bb/parse/parse_c/bitbakeparser.h
deleted file mode 100644
index a2c9aa367d..0000000000
--- a/bitbake/lib/bb/parse/parse_c/bitbakeparser.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#define T_SYMBOL 1
2#define T_VARIABLE 2
3#define T_EXPORT 3
4#define T_OP_ASSIGN 4
5#define T_STRING 5
6#define T_OP_PREDOT 6
7#define T_OP_POSTDOT 7
8#define T_OP_IMMEDIATE 8
9#define T_OP_COND 9
10#define T_OP_PREPEND 10
11#define T_OP_APPEND 11
12#define T_TSYMBOL 12
13#define T_BEFORE 13
14#define T_AFTER 14
15#define T_ADDTASK 15
16#define T_ADDHANDLER 16
17#define T_FSYMBOL 17
18#define T_EXPORT_FUNC 18
19#define T_ISYMBOL 19
20#define T_INHERIT 20
21#define T_INCLUDE 21
22#define T_REQUIRE 22
23#define T_PROC_BODY 23
24#define T_PROC_OPEN 24
25#define T_PROC_CLOSE 25
26#define T_PYTHON 26
27#define T_FAKEROOT 27
28#define T_DEF_BODY 28
29#define T_DEF_ARGS 29
diff --git a/bitbake/lib/bb/parse/parse_c/bitbakeparser.y b/bitbake/lib/bb/parse/parse_c/bitbakeparser.y
deleted file mode 100644
index c18e53543b..0000000000
--- a/bitbake/lib/bb/parse/parse_c/bitbakeparser.y
+++ /dev/null
@@ -1,179 +0,0 @@
1/* bbp.lemon
2
3 written by Marc Singer
4 6 January 2005
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 USA.
20
21 DESCRIPTION
22 -----------
23
24 lemon parser specification file for a BitBake input file parser.
25
26 Most of the interesting shenanigans are done in the lexer. The
27 BitBake grammar is not regular. In order to emit tokens that
28 the parser can properly interpret in LALR fashion, the lexer
29 manages the interpretation state. This is why there are ISYMBOLs,
30 SYMBOLS, and TSYMBOLS.
31
32 This parser was developed by reading the limited available
33 documentation for BitBake and by analyzing the available BB files.
34 There is no assertion of correctness to be made about this parser.
35
36*/
37
38%token_type {token_t}
39%name bbparse
40%token_prefix T_
41%extra_argument {lex_t* lex}
42
43%include {
44#include "token.h"
45#include "lexer.h"
46#include "python_output.h"
47}
48
49
50%token_destructor { $$.release_this (); }
51
52%syntax_error { e_parse_error( lex ); }
53
54program ::= statements.
55
56statements ::= statements statement.
57statements ::= .
58
59variable(r) ::= SYMBOL(s).
60 { r.assignString( (char*)s.string() );
61 s.assignString( 0 );
62 s.release_this(); }
63variable(r) ::= VARIABLE(v).
64 {
65 r.assignString( (char*)v.string() );
66 v.assignString( 0 );
67 v.release_this(); }
68
69statement ::= EXPORT variable(s) OP_ASSIGN STRING(v).
70 { e_assign( lex, s.string(), v.string() );
71 e_export( lex, s.string() );
72 s.release_this(); v.release_this(); }
73statement ::= EXPORT variable(s) OP_PREDOT STRING(v).
74 { e_precat( lex, s.string(), v.string() );
75 e_export( lex, s.string() );
76 s.release_this(); v.release_this(); }
77statement ::= EXPORT variable(s) OP_POSTDOT STRING(v).
78 { e_postcat( lex, s.string(), v.string() );
79 e_export( lex, s.string() );
80 s.release_this(); v.release_this(); }
81statement ::= EXPORT variable(s) OP_IMMEDIATE STRING(v).
82 { e_immediate ( lex, s.string(), v.string() );
83 e_export( lex, s.string() );
84 s.release_this(); v.release_this(); }
85statement ::= EXPORT variable(s) OP_COND STRING(v).
86 { e_cond( lex, s.string(), v.string() );
87 s.release_this(); v.release_this(); }
88
89statement ::= variable(s) OP_ASSIGN STRING(v).
90 { e_assign( lex, s.string(), v.string() );
91 s.release_this(); v.release_this(); }
92statement ::= variable(s) OP_PREDOT STRING(v).
93 { e_precat( lex, s.string(), v.string() );
94 s.release_this(); v.release_this(); }
95statement ::= variable(s) OP_POSTDOT STRING(v).
96 { e_postcat( lex, s.string(), v.string() );
97 s.release_this(); v.release_this(); }
98statement ::= variable(s) OP_PREPEND STRING(v).
99 { e_prepend( lex, s.string(), v.string() );
100 s.release_this(); v.release_this(); }
101statement ::= variable(s) OP_APPEND STRING(v).
102 { e_append( lex, s.string() , v.string() );
103 s.release_this(); v.release_this(); }
104statement ::= variable(s) OP_IMMEDIATE STRING(v).
105 { e_immediate( lex, s.string(), v.string() );
106 s.release_this(); v.release_this(); }
107statement ::= variable(s) OP_COND STRING(v).
108 { e_cond( lex, s.string(), v.string() );
109 s.release_this(); v.release_this(); }
110
111task ::= TSYMBOL(t) BEFORE TSYMBOL(b) AFTER TSYMBOL(a).
112 { e_addtask( lex, t.string(), b.string(), a.string() );
113 t.release_this(); b.release_this(); a.release_this(); }
114task ::= TSYMBOL(t) AFTER TSYMBOL(a) BEFORE TSYMBOL(b).
115 { e_addtask( lex, t.string(), b.string(), a.string());
116 t.release_this(); a.release_this(); b.release_this(); }
117task ::= TSYMBOL(t).
118 { e_addtask( lex, t.string(), NULL, NULL);
119 t.release_this();}
120task ::= TSYMBOL(t) BEFORE TSYMBOL(b).
121 { e_addtask( lex, t.string(), b.string(), NULL);
122 t.release_this(); b.release_this(); }
123task ::= TSYMBOL(t) AFTER TSYMBOL(a).
124 { e_addtask( lex, t.string(), NULL, a.string());
125 t.release_this(); a.release_this(); }
126tasks ::= tasks task.
127tasks ::= task.
128statement ::= ADDTASK tasks.
129
130statement ::= ADDHANDLER SYMBOL(s).
131 { e_addhandler( lex, s.string()); s.release_this (); }
132
133func ::= FSYMBOL(f). { e_export_func( lex, f.string()); f.release_this(); }
134funcs ::= funcs func.
135funcs ::= func.
136statement ::= EXPORT_FUNC funcs.
137
138inherit ::= ISYMBOL(i). { e_inherit( lex, i.string() ); i.release_this (); }
139inherits ::= inherits inherit.
140inherits ::= inherit.
141statement ::= INHERIT inherits.
142
143statement ::= INCLUDE ISYMBOL(i).
144 { e_include( lex, i.string() ); i.release_this(); }
145
146statement ::= REQUIRE ISYMBOL(i).
147 { e_require( lex, i.string() ); i.release_this(); }
148
149proc_body(r) ::= proc_body(l) PROC_BODY(b).
150 { /* concatenate body lines */
151 r.assignString( token_t::concatString(l.string(), b.string()) );
152 l.release_this ();
153 b.release_this ();
154 }
155proc_body(b) ::= . { b.assignString(0); }
156statement ::= variable(p) PROC_OPEN proc_body(b) PROC_CLOSE.
157 { e_proc( lex, p.string(), b.string() );
158 p.release_this(); b.release_this(); }
159statement ::= PYTHON SYMBOL(p) PROC_OPEN proc_body(b) PROC_CLOSE.
160 { e_proc_python ( lex, p.string(), b.string() );
161 p.release_this(); b.release_this(); }
162statement ::= PYTHON PROC_OPEN proc_body(b) PROC_CLOSE.
163 { e_proc_python( lex, NULL, b.string());
164 b.release_this (); }
165
166statement ::= FAKEROOT SYMBOL(p) PROC_OPEN proc_body(b) PROC_CLOSE.
167 { e_proc_fakeroot( lex, p.string(), b.string() );
168 p.release_this (); b.release_this (); }
169
170def_body(r) ::= def_body(l) DEF_BODY(b).
171 { /* concatenate body lines */
172 r.assignString( token_t::concatString(l.string(), b.string()) );
173 l.release_this (); b.release_this ();
174 }
175def_body(b) ::= . { b.assignString( 0 ); }
176statement ::= SYMBOL(p) DEF_ARGS(a) def_body(b).
177 { e_def( lex, p.string(), a.string(), b.string());
178 p.release_this(); a.release_this(); b.release_this(); }
179
diff --git a/bitbake/lib/bb/parse/parse_c/bitbakescanner.cc b/bitbake/lib/bb/parse/parse_c/bitbakescanner.cc
deleted file mode 100644
index acc13f7c34..0000000000
--- a/bitbake/lib/bb/parse/parse_c/bitbakescanner.cc
+++ /dev/null
@@ -1,3209 +0,0 @@
1
2#line 3 "<stdout>"
3
4#define YY_INT_ALIGNED short int
5
6/* A lexical scanner generated by flex */
7
8#define FLEX_SCANNER
9#define YY_FLEX_MAJOR_VERSION 2
10#define YY_FLEX_MINOR_VERSION 5
11#define YY_FLEX_SUBMINOR_VERSION 33
12#if YY_FLEX_SUBMINOR_VERSION > 0
13#define FLEX_BETA
14#endif
15
16/* First, we deal with platform-specific or compiler-specific issues. */
17
18/* begin standard C headers. */
19#include <stdio.h>
20#include <string.h>
21#include <errno.h>
22#include <stdlib.h>
23
24/* end standard C headers. */
25
26/* flex integer type definitions */
27
28#ifndef FLEXINT_H
29#define FLEXINT_H
30
31/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
33#if __STDC_VERSION__ >= 199901L
34
35/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
37 */
38#ifndef __STDC_LIMIT_MACROS
39#define __STDC_LIMIT_MACROS 1
40#endif
41
42#include <inttypes.h>
43typedef int8_t flex_int8_t;
44typedef uint8_t flex_uint8_t;
45typedef int16_t flex_int16_t;
46typedef uint16_t flex_uint16_t;
47typedef int32_t flex_int32_t;
48typedef uint32_t flex_uint32_t;
49#else
50typedef signed char flex_int8_t;
51typedef short int flex_int16_t;
52typedef int flex_int32_t;
53typedef unsigned char flex_uint8_t;
54typedef unsigned short int flex_uint16_t;
55typedef unsigned int flex_uint32_t;
56#endif /* ! C99 */
57
58/* Limits of integral types. */
59#ifndef INT8_MIN
60#define INT8_MIN (-128)
61#endif
62#ifndef INT16_MIN
63#define INT16_MIN (-32767-1)
64#endif
65#ifndef INT32_MIN
66#define INT32_MIN (-2147483647-1)
67#endif
68#ifndef INT8_MAX
69#define INT8_MAX (127)
70#endif
71#ifndef INT16_MAX
72#define INT16_MAX (32767)
73#endif
74#ifndef INT32_MAX
75#define INT32_MAX (2147483647)
76#endif
77#ifndef UINT8_MAX
78#define UINT8_MAX (255U)
79#endif
80#ifndef UINT16_MAX
81#define UINT16_MAX (65535U)
82#endif
83#ifndef UINT32_MAX
84#define UINT32_MAX (4294967295U)
85#endif
86
87#endif /* ! FLEXINT_H */
88
89#ifdef __cplusplus
90
91/* The "const" storage-class-modifier is valid. */
92#define YY_USE_CONST
93
94#else /* ! __cplusplus */
95
96#if __STDC__
97
98#define YY_USE_CONST
99
100#endif /* __STDC__ */
101#endif /* ! __cplusplus */
102
103#ifdef YY_USE_CONST
104#define yyconst const
105#else
106#define yyconst
107#endif
108
109/* Returned upon end-of-file. */
110#define YY_NULL 0
111
112/* Promotes a possibly negative, possibly signed char to an unsigned
113 * integer for use as an array index. If the signed char is negative,
114 * we want to instead treat it as an 8-bit unsigned char, hence the
115 * double cast.
116 */
117#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
118
119/* An opaque pointer. */
120#ifndef YY_TYPEDEF_YY_SCANNER_T
121#define YY_TYPEDEF_YY_SCANNER_T
122typedef void* yyscan_t;
123#endif
124
125/* For convenience, these vars (plus the bison vars far below)
126 are macros in the reentrant scanner. */
127#define yyin yyg->yyin_r
128#define yyout yyg->yyout_r
129#define yyextra yyg->yyextra_r
130#define yyleng yyg->yyleng_r
131#define yytext yyg->yytext_r
132#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
133#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
134#define yy_flex_debug yyg->yy_flex_debug_r
135
136int yylex_init (yyscan_t* scanner);
137
138/* Enter a start condition. This macro really ought to take a parameter,
139 * but we do it the disgusting crufty way forced on us by the ()-less
140 * definition of BEGIN.
141 */
142#define BEGIN yyg->yy_start = 1 + 2 *
143
144/* Translate the current start state into a value that can be later handed
145 * to BEGIN to return to the state. The YYSTATE alias is for lex
146 * compatibility.
147 */
148#define YY_START ((yyg->yy_start - 1) / 2)
149#define YYSTATE YY_START
150
151/* Action number for EOF rule of a given start state. */
152#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
153
154/* Special action meaning "start processing a new file". */
155#define YY_NEW_FILE yyrestart(yyin ,yyscanner )
156
157#define YY_END_OF_BUFFER_CHAR 0
158
159/* Size of default input buffer. */
160#ifndef YY_BUF_SIZE
161#define YY_BUF_SIZE 16384
162#endif
163
164/* The state buf must be large enough to hold one state per character in the main buffer.
165 */
166#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
167
168#ifndef YY_TYPEDEF_YY_BUFFER_STATE
169#define YY_TYPEDEF_YY_BUFFER_STATE
170typedef struct yy_buffer_state *YY_BUFFER_STATE;
171#endif
172
173#define EOB_ACT_CONTINUE_SCAN 0
174#define EOB_ACT_END_OF_FILE 1
175#define EOB_ACT_LAST_MATCH 2
176
177 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
178 * access to the local variable yy_act. Since yyless() is a macro, it would break
179 * existing scanners that call yyless() from OUTSIDE yylex.
180 * One obvious solution it to make yy_act a global. I tried that, and saw
181 * a 5% performance hit in a non-yylineno scanner, because yy_act is
182 * normally declared as a register variable-- so it is not worth it.
183 */
184 #define YY_LESS_LINENO(n) \
185 do { \
186 int yyl;\
187 for ( yyl = n; yyl < yyleng; ++yyl )\
188 if ( yytext[yyl] == '\n' )\
189 --yylineno;\
190 }while(0)
191
192/* Return all but the first "n" matched characters back to the input stream. */
193#define yyless(n) \
194 do \
195 { \
196 /* Undo effects of setting up yytext. */ \
197 int yyless_macro_arg = (n); \
198 YY_LESS_LINENO(yyless_macro_arg);\
199 *yy_cp = yyg->yy_hold_char; \
200 YY_RESTORE_YY_MORE_OFFSET \
201 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
202 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
203 } \
204 while ( 0 )
205
206#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
207
208/* The following is because we cannot portably get our hands on size_t
209 * (without autoconf's help, which isn't available because we want
210 * flex-generated scanners to compile on their own).
211 */
212
213#ifndef YY_TYPEDEF_YY_SIZE_T
214#define YY_TYPEDEF_YY_SIZE_T
215typedef unsigned int yy_size_t;
216#endif
217
218#ifndef YY_STRUCT_YY_BUFFER_STATE
219#define YY_STRUCT_YY_BUFFER_STATE
220struct yy_buffer_state
221 {
222 FILE *yy_input_file;
223
224 char *yy_ch_buf; /* input buffer */
225 char *yy_buf_pos; /* current position in input buffer */
226
227 /* Size of input buffer in bytes, not including room for EOB
228 * characters.
229 */
230 yy_size_t yy_buf_size;
231
232 /* Number of characters read into yy_ch_buf, not including EOB
233 * characters.
234 */
235 int yy_n_chars;
236
237 /* Whether we "own" the buffer - i.e., we know we created it,
238 * and can realloc() it to grow it, and should free() it to
239 * delete it.
240 */
241 int yy_is_our_buffer;
242
243 /* Whether this is an "interactive" input source; if so, and
244 * if we're using stdio for input, then we want to use getc()
245 * instead of fread(), to make sure we stop fetching input after
246 * each newline.
247 */
248 int yy_is_interactive;
249
250 /* Whether we're considered to be at the beginning of a line.
251 * If so, '^' rules will be active on the next match, otherwise
252 * not.
253 */
254 int yy_at_bol;
255
256 int yy_bs_lineno; /**< The line count. */
257 int yy_bs_column; /**< The column count. */
258
259 /* Whether to try to fill the input buffer when we reach the
260 * end of it.
261 */
262 int yy_fill_buffer;
263
264 int yy_buffer_status;
265
266#define YY_BUFFER_NEW 0
267#define YY_BUFFER_NORMAL 1
268 /* When an EOF's been seen but there's still some text to process
269 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
270 * shouldn't try reading from the input source any more. We might
271 * still have a bunch of tokens to match, though, because of
272 * possible backing-up.
273 *
274 * When we actually see the EOF, we change the status to "new"
275 * (via yyrestart()), so that the user can continue scanning by
276 * just pointing yyin at a new input file.
277 */
278#define YY_BUFFER_EOF_PENDING 2
279
280 };
281#endif /* !YY_STRUCT_YY_BUFFER_STATE */
282
283/* We provide macros for accessing buffer states in case in the
284 * future we want to put the buffer states in a more general
285 * "scanner state".
286 *
287 * Returns the top of the stack, or NULL.
288 */
289#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
290 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
291 : NULL)
292
293/* Same as previous macro, but useful when we know that the buffer stack is not
294 * NULL or when we need an lvalue. For internal use only.
295 */
296#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
297
298void yyrestart (FILE *input_file ,yyscan_t yyscanner );
299void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
300YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
301void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
302void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
303void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
304void yypop_buffer_state (yyscan_t yyscanner );
305
306static void yyensure_buffer_stack (yyscan_t yyscanner );
307static void yy_load_buffer_state (yyscan_t yyscanner );
308static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
309
310#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
311
312YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
313YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
314YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
315
316void *yyalloc (yy_size_t ,yyscan_t yyscanner );
317void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
318void yyfree (void * ,yyscan_t yyscanner );
319
320#define yy_new_buffer yy_create_buffer
321
322#define yy_set_interactive(is_interactive) \
323 { \
324 if ( ! YY_CURRENT_BUFFER ){ \
325 yyensure_buffer_stack (yyscanner); \
326 YY_CURRENT_BUFFER_LVALUE = \
327 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
328 } \
329 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
330 }
331
332#define yy_set_bol(at_bol) \
333 { \
334 if ( ! YY_CURRENT_BUFFER ){\
335 yyensure_buffer_stack (yyscanner); \
336 YY_CURRENT_BUFFER_LVALUE = \
337 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
338 } \
339 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
340 }
341
342#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
343
344/* Begin user sect3 */
345
346#define yywrap(n) 1
347#define YY_SKIP_YYWRAP
348
349typedef unsigned char YY_CHAR;
350
351typedef int yy_state_type;
352
353#define yytext_ptr yytext_r
354
355static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
356static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
357static int yy_get_next_buffer (yyscan_t yyscanner );
358static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
359
360/* Done after the current pattern has been matched and before the
361 * corresponding action - sets up yytext.
362 */
363#define YY_DO_BEFORE_ACTION \
364 yyg->yytext_ptr = yy_bp; \
365 yyleng = (size_t) (yy_cp - yy_bp); \
366 yyg->yy_hold_char = *yy_cp; \
367 *yy_cp = '\0'; \
368 yyg->yy_c_buf_p = yy_cp;
369
370#define YY_NUM_RULES 47
371#define YY_END_OF_BUFFER 48
372/* This struct is not used in this scanner,
373 but its presence is necessary. */
374struct yy_trans_info
375 {
376 flex_int32_t yy_verify;
377 flex_int32_t yy_nxt;
378 };
379static yyconst flex_int16_t yy_accept[813] =
380 { 0,
381 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
382 0, 0, 0, 0, 0, 0, 26, 26, 0, 0,
383 0, 0, 48, 46, 45, 45, 46, 46, 46, 46,
384 46, 46, 4, 46, 35, 35, 35, 35, 35, 35,
385 35, 35, 35, 28, 28, 28, 28, 28, 28, 46,
386 45, 30, 45, 46, 46, 46, 46, 29, 4, 46,
387 46, 46, 46, 46, 46, 33, 33, 32, 33, 33,
388 33, 33, 33, 33, 4, 33, 33, 33, 33, 33,
389 33, 43, 38, 38, 38, 38, 38, 38, 46, 40,
390 40, 40, 40, 40, 40, 40, 44, 39, 39, 39,
391
392 39, 39, 39, 46, 41, 41, 41, 41, 41, 41,
393 41, 26, 26, 26, 26, 26, 26, 26, 26, 4,
394 26, 26, 26, 26, 26, 26, 25, 11, 45, 12,
395 11, 46, 11, 46, 11, 11, 11, 11, 4, 11,
396 11, 11, 11, 11, 11, 11, 42, 37, 37, 37,
397 37, 37, 37, 37, 0, 34, 36, 0, 0, 1,
398 5, 3, 2, 6, 7, 0, 35, 0, 35, 35,
399 35, 35, 35, 35, 35, 35, 28, 28, 28, 28,
400 28, 28, 0, 29, 0, 30, 0, 29, 0, 0,
401 1, 5, 2, 6, 7, 0, 0, 0, 0, 0,
402
403 0, 0, 31, 0, 0, 0, 0, 0, 38, 38,
404 38, 38, 38, 38, 0, 0, 40, 40, 40, 40,
405 40, 40, 39, 39, 39, 39, 39, 39, 0, 0,
406 41, 41, 41, 41, 41, 41, 26, 26, 26, 26,
407 26, 26, 1, 5, 3, 2, 6, 7, 26, 26,
408 26, 26, 26, 25, 25, 11, 0, 11, 0, 12,
409 0, 9, 0, 11, 0, 11, 0, 10, 0, 0,
410 11, 1, 5, 3, 2, 6, 7, 11, 8, 11,
411 11, 11, 11, 37, 37, 37, 37, 37, 37, 37,
412 37, 36, 0, 24, 0, 0, 36, 35, 35, 27,
413
414 35, 35, 35, 35, 35, 35, 28, 28, 27, 28,
415 28, 28, 0, 24, 0, 0, 27, 0, 0, 0,
416 0, 0, 27, 0, 0, 0, 38, 38, 27, 38,
417 38, 38, 0, 0, 40, 40, 27, 40, 40, 40,
418 39, 39, 27, 39, 39, 39, 0, 0, 41, 41,
419 27, 41, 41, 41, 26, 24, 26, 26, 26, 26,
420 26, 26, 34, 0, 11, 11, 8, 11, 11, 11,
421 11, 11, 37, 37, 37, 37, 27, 37, 37, 37,
422 24, 24, 0, 35, 35, 35, 35, 35, 35, 35,
423 35, 35, 28, 28, 28, 28, 28, 28, 24, 0,
424
425 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
426 0, 38, 38, 38, 38, 38, 38, 0, 40, 0,
427 40, 40, 40, 40, 40, 40, 39, 39, 39, 39,
428 39, 39, 0, 41, 0, 41, 41, 41, 41, 41,
429 41, 24, 24, 26, 26, 26, 26, 26, 26, 24,
430 11, 11, 11, 11, 11, 11, 37, 37, 37, 37,
431 37, 37, 37, 37, 0, 36, 35, 35, 35, 35,
432 35, 35, 35, 35, 35, 28, 28, 28, 28, 28,
433 28, 0, 0, 0, 0, 0, 0, 0, 0, 0,
434 0, 0, 0, 38, 38, 38, 38, 38, 38, 0,
435
436 40, 40, 40, 40, 40, 40, 40, 39, 39, 39,
437 39, 39, 39, 0, 41, 41, 41, 41, 41, 41,
438 41, 26, 26, 26, 26, 26, 26, 11, 11, 11,
439 11, 11, 11, 37, 37, 37, 20, 37, 37, 37,
440 37, 35, 35, 35, 21, 35, 35, 35, 23, 35,
441 28, 28, 28, 28, 28, 28, 0, 0, 0, 0,
442 0, 0, 0, 0, 0, 0, 0, 0, 38, 38,
443 38, 38, 38, 38, 40, 40, 40, 40, 40, 40,
444 39, 39, 39, 39, 39, 39, 41, 41, 41, 41,
445 41, 41, 26, 26, 26, 26, 26, 26, 11, 11,
446
447 11, 11, 11, 11, 37, 37, 37, 19, 37, 37,
448 37, 35, 35, 16, 35, 13, 15, 14, 28, 28,
449 16, 13, 15, 14, 0, 0, 16, 13, 15, 14,
450 0, 0, 16, 13, 15, 14, 38, 38, 16, 13,
451 15, 14, 40, 40, 16, 13, 15, 14, 39, 39,
452 16, 13, 15, 14, 41, 41, 16, 13, 15, 14,
453 26, 26, 16, 13, 15, 14, 11, 11, 11, 11,
454 11, 11, 37, 37, 16, 13, 15, 14, 35, 35,
455 22, 28, 28, 0, 0, 0, 0, 38, 38, 40,
456 40, 39, 39, 41, 41, 26, 26, 11, 11, 37,
457
458 37, 35, 35, 28, 28, 0, 0, 0, 0, 38,
459 38, 40, 40, 39, 39, 41, 41, 26, 26, 11,
460 11, 37, 37, 35, 17, 28, 17, 0, 17, 0,
461 17, 38, 17, 40, 17, 39, 17, 41, 17, 26,
462 17, 11, 11, 37, 17, 35, 28, 0, 0, 38,
463 40, 39, 41, 26, 11, 37, 35, 28, 0, 0,
464 38, 40, 39, 41, 26, 11, 37, 35, 28, 0,
465 0, 38, 40, 39, 41, 26, 11, 37, 35, 28,
466 0, 0, 38, 40, 39, 41, 26, 11, 37, 35,
467 28, 0, 0, 38, 40, 39, 41, 26, 11, 37,
468
469 18, 18, 18, 18, 18, 18, 18, 18, 18, 11,
470 18, 0
471 } ;
472
473static yyconst flex_int32_t yy_ec[256] =
474 { 0,
475 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
476 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 2, 1, 5, 6, 7, 1, 1, 8, 9,
479 10, 1, 11, 12, 13, 14, 15, 16, 16, 16,
480 16, 16, 16, 16, 16, 16, 16, 17, 1, 1,
481 18, 1, 19, 1, 20, 20, 21, 20, 22, 23,
482 20, 20, 24, 20, 20, 20, 20, 25, 26, 27,
483 20, 28, 29, 30, 31, 20, 20, 32, 20, 20,
484 33, 34, 35, 1, 36, 1, 37, 38, 39, 40,
485
486 41, 42, 20, 43, 44, 20, 45, 46, 20, 47,
487 48, 49, 50, 51, 52, 53, 54, 20, 20, 55,
488 56, 20, 57, 1, 58, 1, 1, 1, 1, 1,
489 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
492 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
493 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
494 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
495 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
496
497 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
498 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
499 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
500 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
501 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
502 1, 1, 1, 1, 1
503 } ;
504
505static yyconst flex_int32_t yy_meta[59] =
506 { 0,
507 1, 1, 2, 3, 1, 1, 4, 1, 1, 1,
508 5, 6, 5, 5, 5, 7, 1, 8, 1, 9,
509 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
510 9, 9, 10, 1, 11, 9, 9, 9, 9, 9,
511 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
512 9, 9, 9, 9, 9, 9, 1, 12
513 } ;
514
515static yyconst flex_int16_t yy_base[847] =
516 { 0,
517 0, 0, 58, 0, 115, 165, 215, 265, 316, 0,
518 374, 0, 432, 0, 490, 0, 547, 604, 661, 711,
519 762, 0, 2308, 2309, 2309, 2309, 2304, 0, 118, 2288,
520 2287, 2286, 111, 2285, 116, 124, 120, 129, 131, 128,
521 144, 139, 140, 0, 2270, 2261, 2259, 2252, 2257, 2280,
522 137, 2309, 2279, 127, 183, 124, 171, 2277, 187, 179,
523 126, 163, 158, 131, 173, 2309, 204, 2309, 2309, 2291,
524 210, 2275, 2274, 2273, 197, 2272, 2257, 2248, 2246, 2239,
525 2244, 2309, 0, 2252, 2243, 2241, 2234, 2239, 2222, 218,
526 220, 221, 223, 224, 228, 236, 2309, 0, 2246, 2237,
527
528 2235, 2228, 2233, 2216, 233, 238, 240, 255, 263, 242,
529 273, 2269, 2268, 2267, 2266, 283, 285, 289, 293, 287,
530 294, 160, 210, 207, 147, 220, 297, 552, 560, 2265,
531 565, 210, 569, 544, 580, 622, 627, 634, 623, 669,
532 689, 819, 684, 702, 821, 823, 2309, 0, 2235, 266,
533 2225, 2224, 2217, 2222, 2259, 2309, 548, 566, 581, 2309,
534 2309, 2309, 2309, 2309, 2309, 2204, 568, 2225, 626, 610,
535 640, 651, 699, 823, 678, 702, 0, 2232, 2218, 2215,
536 550, 2206, 2238, 2309, 577, 2309, 261, 2251, 594, 830,
537 2236, 2235, 2234, 2233, 2232, 575, 580, 634, 710, 599,
538
539 2245, 735, 2309, 2220, 2206, 2203, 703, 2194, 0, 2216,
540 2202, 2199, 711, 2190, 0, 2182, 681, 827, 830, 831,
541 826, 828, 0, 2211, 2197, 2194, 717, 2185, 0, 2177,
542 740, 832, 834, 833, 853, 854, 2230, 2229, 2228, 2227,
543 874, 840, 2226, 2225, 2224, 2223, 2222, 2221, 592, 254,
544 651, 855, 833, 737, 2220, 877, 897, 898, 878, 2219,
545 881, 883, 886, 905, 916, 920, 700, 859, 906, 925,
546 936, 940, 941, 950, 955, 960, 964, 974, 2219, 975,
547 983, 994, 995, 0, 2193, 2179, 2165, 2175, 2174, 718,
548 2165, 883, 910, 934, 0, 2179, 2309, 979, 971, 940,
549
550 974, 954, 985, 999, 983, 1003, 2187, 968, 0, 2166,
551 2170, 2156, 1017, 1036, 583, 1003, 2192, 996, 685, 917,
552 2182, 998, 2309, 2161, 2165, 2151, 2178, 1001, 0, 2157,
553 2161, 2147, 2142, 0, 1040, 1041, 946, 1042, 1045, 1043,
554 2173, 1012, 0, 2152, 2156, 2142, 2137, 0, 1055, 1057,
555 1060, 1061, 1062, 1064, 1074, 1087, 1067, 1069, 2191, 1080,
556 1082, 687, 1090, 1094, 1103, 1112, 2191, 1111, 1125, 1127,
557 1134, 1142, 2166, 1048, 2150, 2142, 0, 2143, 2147, 2133,
558 1138, 2183, 2127, 1127, 1141, 1146, 1136, 1149, 1151, 1155,
559 1156, 1158, 2156, 2146, 2145, 2127, 2129, 2135, 1164, 1087,
560
561 1006, 1135, 1132, 595, 912, 2150, 2140, 2139, 2121, 2123,
562 2129, 2144, 2134, 2133, 2115, 2117, 2123, 2108, 1183, 2107,
563 1185, 1190, 1191, 1192, 1200, 1204, 2136, 2126, 2125, 2107,
564 2109, 2115, 2100, 1205, 2099, 1207, 1208, 1212, 1213, 1214,
565 1222, 1168, 2153, 923, 1084, 1213, 1182, 1106, 1190, 1236,
566 1250, 1251, 1252, 1266, 1267, 1271, 2127, 2117, 2116, 2101,
567 2100, 2096, 2098, 2104, 2089, 1210, 1257, 1230, 1273, 1274,
568 1275, 1276, 1284, 1286, 1288, 2116, 2098, 2092, 2103, 2098,
569 2090, 1280, 1177, 1244, 1282, 1285, 1275, 2110, 2092, 2086,
570 2097, 2092, 2084, 2104, 2086, 2080, 2091, 2086, 2078, 2070,
571
572 1296, 1306, 1323, 1324, 1325, 1327, 1328, 2097, 2079, 2073,
573 2084, 2079, 2071, 2063, 1330, 1331, 1333, 1337, 1345, 1340,
574 1346, 1347, 1309, 1259, 1351, 1354, 1356, 1370, 1385, 1394,
575 1401, 1403, 1408, 2090, 2072, 2066, 0, 2076, 2076, 2071,
576 2063, 1359, 1361, 1379, 1355, 1407, 1410, 1411, 1415, 1416,
577 2077, 2072, 2066, 2069, 2056, 2067, 1398, 1343, 1408, 1404,
578 643, 1409, 2071, 2066, 2060, 2063, 2050, 2061, 2065, 2060,
579 2054, 2057, 2044, 2055, 1420, 1445, 1413, 1447, 1453, 1454,
580 2059, 2053, 2047, 2049, 2032, 2043, 1455, 1459, 1460, 1461,
581 1462, 1463, 1471, 1436, 1430, 1192, 1433, 1479, 1482, 1492,
582
583 1506, 1519, 1520, 1528, 2046, 2037, 2031, 0, 2033, 2016,
584 2027, 1486, 1496, 1505, 1506, 1510, 1516, 1524, 2043, 2015,
585 0, 0, 0, 0, 1281, 1517, 2043, 2041, 2036, 2034,
586 2024, 1995, 2309, 2309, 2309, 2309, 2005, 1981, 0, 0,
587 0, 0, 1538, 1528, 1530, 1534, 1537, 1540, 1981, 1957,
588 0, 0, 0, 0, 1557, 1558, 1559, 1560, 1561, 1563,
589 1568, 1547, 1988, 1959, 1955, 1948, 1580, 1581, 1582, 1590,
590 1592, 1594, 1924, 1863, 0, 0, 0, 0, 1598, 1599,
591 1600, 1875, 1859, 1350, 1584, 1803, 1792, 1801, 1790, 1603,
592 1601, 1799, 1788, 1604, 1602, 1610, 1609, 1643, 1644, 1797,
593
594 1786, 1611, 1630, 1800, 1773, 1010, 1606, 1798, 1771, 1795,
595 1768, 1640, 1646, 1793, 1766, 1648, 1649, 1614, 1379, 1667,
596 1674, 1791, 1764, 1647, 1653, 1793, 0, 1352, 1796, 1791,
597 2309, 1790, 0, 1677, 1652, 1789, 0, 1681, 1676, 1480,
598 1805, 1685, 1702, 1786, 0, 1682, 1775, 1679, 1774, 1769,
599 1696, 1768, 1698, 1688, 1715, 1765, 1706, 1765, 1472, 1763,
600 1757, 1714, 1753, 1717, 1719, 1729, 1703, 1722, 1685, 1645,
601 1604, 1546, 1726, 1466, 1733, 1635, 1752, 1403, 1739, 1349,
602 1725, 1269, 1222, 1740, 1217, 1749, 1758, 1768, 1155, 1755,
603 1148, 1481, 1096, 1001, 1761, 866, 1762, 1763, 1792, 834,
604
605 1768, 0, 742, 2309, 0, 1764, 0, 1778, 678, 1801,
606 0, 2309, 1835, 1847, 1859, 1871, 1883, 550, 1892, 1898,
607 1907, 1919, 1931, 1939, 1945, 1950, 1956, 1965, 1977, 1989,
608 2001, 2013, 2025, 2033, 2039, 2043, 306, 304, 301, 2050,
609 213, 2058, 136, 2066, 2074, 2082
610 } ;
611
612static yyconst flex_int16_t yy_def[847] =
613 { 0,
614 812, 1, 812, 3, 813, 813, 814, 814, 812, 9,
615 812, 11, 812, 13, 812, 15, 815, 815, 816, 816,
616 812, 21, 812, 812, 812, 812, 817, 818, 812, 812,
617 812, 812, 812, 812, 819, 819, 819, 819, 819, 819,
618 819, 819, 819, 820, 820, 820, 820, 820, 820, 821,
619 821, 812, 821, 822, 821, 821, 821, 812, 821, 821,
620 821, 821, 821, 821, 821, 812, 823, 812, 812, 817,
621 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
622 812, 812, 824, 824, 824, 824, 824, 824, 812, 825,
623 825, 825, 825, 825, 825, 825, 812, 826, 826, 826,
624
625 826, 826, 826, 812, 827, 827, 827, 827, 827, 827,
626 827, 828, 828, 828, 829, 828, 828, 828, 828, 828,
627 828, 828, 828, 828, 828, 828, 812, 830, 812, 812,
628 830, 831, 832, 833, 830, 830, 830, 830, 830, 830,
629 830, 830, 830, 830, 830, 830, 812, 834, 834, 834,
630 834, 834, 834, 834, 817, 812, 835, 812, 812, 812,
631 812, 812, 812, 812, 812, 812, 819, 836, 819, 819,
632 819, 819, 819, 819, 819, 819, 820, 820, 820, 820,
633 820, 820, 821, 812, 821, 812, 822, 817, 821, 821,
634 821, 821, 821, 821, 821, 821, 821, 821, 821, 821,
635
636 823, 823, 812, 812, 812, 812, 812, 812, 824, 824,
637 824, 824, 824, 824, 837, 812, 825, 825, 825, 825,
638 825, 825, 826, 826, 826, 826, 826, 826, 838, 812,
639 827, 827, 827, 827, 827, 827, 828, 812, 829, 812,
640 828, 828, 828, 828, 828, 828, 828, 828, 828, 828,
641 828, 828, 828, 812, 812, 830, 830, 830, 812, 812,
642 831, 831, 831, 832, 832, 832, 833, 833, 833, 830,
643 830, 830, 830, 830, 830, 830, 830, 830, 812, 830,
644 830, 830, 830, 834, 834, 834, 834, 834, 834, 834,
645 834, 835, 812, 812, 839, 836, 812, 819, 819, 819,
646
647 819, 819, 819, 819, 819, 819, 820, 820, 820, 820,
648 820, 820, 821, 821, 821, 821, 821, 821, 821, 821,
649 812, 812, 812, 812, 812, 812, 824, 824, 824, 824,
650 824, 824, 840, 841, 825, 825, 825, 825, 825, 825,
651 826, 826, 826, 826, 826, 826, 842, 843, 827, 827,
652 827, 827, 827, 827, 828, 828, 828, 828, 828, 828,
653 828, 828, 830, 830, 830, 830, 812, 830, 830, 830,
654 830, 830, 834, 834, 834, 834, 834, 834, 834, 834,
655 812, 812, 844, 819, 819, 819, 819, 819, 819, 819,
656 819, 819, 820, 820, 820, 820, 820, 820, 821, 821,
657
658 821, 821, 821, 821, 821, 812, 812, 812, 812, 812,
659 812, 824, 824, 824, 824, 824, 824, 840, 825, 845,
660 825, 825, 825, 825, 825, 825, 826, 826, 826, 826,
661 826, 826, 842, 827, 846, 827, 827, 827, 827, 827,
662 827, 828, 812, 828, 828, 828, 828, 828, 828, 830,
663 830, 830, 830, 830, 830, 830, 834, 834, 834, 834,
664 834, 834, 834, 834, 844, 835, 819, 819, 819, 819,
665 819, 819, 819, 819, 819, 820, 820, 820, 820, 820,
666 820, 821, 821, 821, 821, 821, 821, 812, 812, 812,
667 812, 812, 812, 824, 824, 824, 824, 824, 824, 845,
668
669 825, 825, 825, 825, 825, 825, 825, 826, 826, 826,
670 826, 826, 826, 846, 827, 827, 827, 827, 827, 827,
671 827, 828, 828, 828, 828, 828, 828, 830, 830, 830,
672 830, 830, 830, 834, 834, 834, 834, 834, 834, 834,
673 834, 819, 819, 819, 819, 819, 819, 819, 819, 819,
674 820, 820, 820, 820, 820, 820, 821, 821, 821, 821,
675 821, 821, 812, 812, 812, 812, 812, 812, 824, 824,
676 824, 824, 824, 824, 825, 825, 825, 825, 825, 825,
677 826, 826, 826, 826, 826, 826, 827, 827, 827, 827,
678 827, 827, 828, 828, 828, 828, 828, 828, 830, 830,
679
680 830, 830, 830, 830, 834, 834, 834, 834, 834, 834,
681 834, 819, 819, 819, 819, 819, 819, 819, 820, 820,
682 820, 820, 820, 820, 821, 821, 821, 821, 821, 821,
683 812, 812, 812, 812, 812, 812, 824, 824, 824, 824,
684 824, 824, 825, 825, 825, 825, 825, 825, 826, 826,
685 826, 826, 826, 826, 827, 827, 827, 827, 827, 827,
686 828, 828, 828, 828, 828, 828, 830, 830, 830, 830,
687 830, 830, 834, 834, 834, 834, 834, 834, 819, 819,
688 819, 820, 820, 821, 821, 812, 812, 824, 824, 825,
689 825, 826, 826, 827, 827, 828, 828, 830, 830, 834,
690
691 834, 819, 819, 820, 820, 821, 821, 812, 812, 824,
692 824, 825, 825, 826, 826, 827, 827, 828, 828, 830,
693 830, 834, 834, 819, 819, 820, 820, 821, 821, 812,
694 812, 824, 824, 825, 825, 826, 826, 827, 827, 828,
695 828, 830, 830, 834, 834, 819, 820, 821, 812, 824,
696 825, 826, 827, 828, 830, 834, 819, 820, 821, 812,
697 824, 825, 826, 827, 828, 830, 834, 819, 820, 821,
698 812, 824, 825, 826, 827, 828, 830, 834, 819, 820,
699 821, 812, 824, 825, 826, 827, 828, 830, 834, 819,
700 820, 821, 812, 824, 825, 826, 827, 828, 830, 834,
701
702 819, 820, 821, 812, 824, 825, 826, 827, 828, 830,
703 834, 0, 812, 812, 812, 812, 812, 812, 812, 812,
704 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
705 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
706 812, 812, 812, 812, 812, 812
707 } ;
708
709static yyconst flex_int16_t yy_nxt[2368] =
710 { 0,
711 24, 25, 26, 25, 24, 27, 28, 24, 29, 24,
712 30, 24, 24, 31, 24, 24, 32, 33, 34, 35,
713 35, 36, 35, 35, 35, 35, 35, 35, 35, 35,
714 35, 35, 24, 24, 24, 35, 37, 35, 35, 38,
715 39, 40, 35, 41, 35, 35, 35, 35, 42, 35,
716 43, 35, 35, 35, 35, 35, 24, 24, 24, 25,
717 26, 25, 24, 27, 24, 24, 29, 24, 30, 24,
718 24, 31, 24, 24, 32, 33, 34, 44, 44, 45,
719 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
720 24, 24, 24, 44, 46, 44, 44, 47, 44, 44,
721
722 44, 48, 44, 44, 44, 44, 44, 44, 49, 44,
723 44, 44, 44, 44, 24, 24, 51, 52, 53, 158,
724 54, 163, 166, 55, 164, 56, 166, 159, 57, 156,
725 166, 58, 59, 60, 166, 166, 61, 166, 185, 186,
726 184, 191, 184, 188, 435, 166, 166, 184, 168, 238,
727 166, 62, 168, 184, 63, 169, 168, 196, 64, 170,
728 168, 168, 238, 168, 173, 65, 51, 52, 53, 171,
729 54, 168, 168, 55, 184, 56, 168, 199, 57, 184,
730 176, 58, 59, 60, 189, 172, 61, 184, 192, 184,
731 174, 249, 190, 252, 175, 184, 195, 193, 198, 184,
732
733 194, 62, 197, 184, 63, 202, 203, 163, 64, 238,
734 164, 158, 238, 200, 262, 65, 67, 68, 69, 159,
735 70, 420, 238, 71, 216, 72, 216, 216, 73, 216,
736 216, 74, 75, 76, 216, 161, 77, 812, 812, 230,
737 812, 812, 216, 263, 230, 812, 230, 251, 230, 250,
738 161, 78, 218, 812, 79, 812, 238, 812, 80, 812,
739 253, 230, 219, 156, 220, 81, 67, 68, 69, 230,
740 70, 232, 812, 71, 221, 72, 222, 188, 73, 230,
741 812, 74, 75, 76, 241, 238, 77, 238, 235, 238,
742 812, 238, 242, 358, 233, 238, 238, 246, 254, 255,
743
744 247, 78, 243, 234, 79, 286, 244, 287, 80, 383,
745 245, 248, 347, 236, 333, 81, 24, 25, 82, 25,
746 24, 27, 24, 24, 29, 24, 30, 24, 24, 31,
747 24, 24, 32, 33, 34, 83, 83, 84, 83, 83,
748 83, 83, 83, 83, 83, 83, 83, 83, 24, 24,
749 24, 83, 85, 83, 83, 86, 83, 83, 83, 87,
750 83, 83, 83, 83, 83, 83, 88, 83, 83, 83,
751 83, 83, 24, 24, 24, 25, 26, 25, 24, 27,
752 89, 24, 29, 24, 30, 24, 24, 90, 91, 24,
753 32, 33, 34, 91, 91, 92, 91, 91, 91, 91,
754
755 91, 91, 91, 91, 91, 91, 24, 24, 24, 91,
756 93, 91, 91, 94, 91, 91, 91, 95, 91, 91,
757 91, 91, 91, 91, 96, 91, 91, 91, 91, 91,
758 24, 24, 24, 25, 97, 25, 24, 27, 24, 24,
759 29, 24, 30, 24, 24, 31, 24, 24, 32, 33,
760 34, 98, 98, 99, 98, 98, 98, 98, 98, 98,
761 98, 98, 98, 98, 24, 24, 24, 98, 100, 98,
762 98, 101, 98, 98, 98, 102, 98, 98, 98, 98,
763 98, 98, 103, 98, 98, 98, 98, 98, 24, 24,
764 24, 25, 26, 25, 24, 27, 104, 24, 29, 24,
765
766 30, 24, 24, 105, 106, 24, 32, 33, 34, 106,
767 106, 107, 106, 106, 106, 106, 106, 106, 106, 106,
768 106, 106, 24, 24, 24, 106, 108, 106, 106, 109,
769 106, 106, 106, 110, 106, 106, 106, 106, 106, 106,
770 111, 106, 106, 106, 106, 106, 24, 24, 113, 114,
771 113, 268, 115, 257, 166, 116, 257, 117, 157, 257,
772 118, 259, 260, 119, 120, 121, 257, 158, 122, 257,
773 265, 156, 257, 265, 166, 159, 265, 269, 185, 186,
774 168, 270, 293, 123, 257, 258, 124, 257, 310, 271,
775 125, 184, 311, 184, 238, 189, 184, 126, 258, 184,
776
777 168, 315, 266, 190, 127, 113, 114, 113, 400, 115,
778 184, 184, 116, 258, 117, 184, 166, 118, 357, 316,
779 119, 120, 121, 257, 257, 122, 257, 257, 257, 257,
780 257, 257, 166, 275, 257, 257, 276, 294, 257, 272,
781 123, 257, 168, 124, 273, 486, 166, 125, 320, 299,
782 184, 274, 298, 238, 126, 258, 258, 166, 168, 184,
783 258, 127, 129, 130, 131, 132, 133, 258, 134, 135,
784 257, 136, 168, 257, 137, 317, 257, 138, 139, 140,
785 238, 300, 141, 168, 166, 257, 277, 216, 257, 238,
786 257, 257, 359, 257, 142, 629, 257, 143, 812, 301,
787
788 144, 184, 258, 257, 145, 166, 257, 268, 166, 257,
789 168, 146, 129, 130, 131, 132, 133, 258, 134, 135,
790 278, 136, 258, 280, 137, 404, 184, 138, 139, 140,
791 305, 168, 141, 269, 168, 258, 202, 203, 254, 255,
792 449, 324, 281, 302, 142, 325, 230, 143, 318, 330,
793 144, 306, 319, 331, 145, 344, 378, 812, 184, 345,
794 379, 146, 24, 25, 147, 25, 24, 27, 24, 24,
795 29, 24, 30, 24, 24, 31, 24, 24, 32, 33,
796 34, 148, 148, 149, 148, 148, 148, 148, 148, 148,
797 148, 148, 148, 148, 24, 24, 24, 148, 150, 151,
798
799 148, 152, 148, 148, 148, 153, 148, 148, 148, 148,
800 148, 148, 154, 148, 148, 148, 148, 148, 24, 24,
801 257, 279, 257, 257, 257, 257, 257, 257, 257, 166,
802 257, 313, 216, 216, 216, 238, 216, 216, 230, 230,
803 230, 355, 238, 812, 812, 812, 184, 812, 812, 812,
804 812, 812, 258, 335, 258, 168, 258, 238, 349, 230,
805 230, 303, 811, 283, 338, 304, 268, 282, 339, 336,
806 812, 812, 337, 350, 351, 241, 238, 340, 257, 259,
807 260, 257, 362, 242, 257, 262, 314, 262, 261, 166,
808 262, 352, 269, 360, 807, 353, 356, 361, 257, 257,
809
810 257, 257, 257, 354, 257, 257, 265, 156, 267, 265,
811 258, 293, 265, 268, 263, 168, 263, 265, 156, 263,
812 265, 265, 363, 265, 265, 238, 270, 265, 184, 257,
813 258, 258, 257, 184, 271, 381, 382, 364, 266, 269,
814 257, 257, 257, 257, 257, 257, 166, 257, 257, 266,
815 522, 257, 216, 266, 257, 487, 257, 257, 258, 257,
816 166, 257, 257, 812, 257, 257, 294, 257, 257, 258,
817 405, 257, 168, 258, 258, 257, 257, 166, 257, 257,
818 166, 257, 257, 258, 257, 166, 168, 257, 258, 166,
819 257, 166, 365, 258, 388, 257, 257, 258, 257, 257,
820
821 366, 257, 257, 168, 384, 166, 168, 258, 258, 166,
822 394, 168, 184, 385, 368, 168, 258, 168, 313, 184,
823 395, 387, 184, 386, 369, 391, 184, 258, 258, 805,
824 389, 168, 370, 184, 728, 168, 371, 399, 382, 390,
825 407, 403, 483, 413, 372, 401, 216, 216, 216, 216,
826 408, 216, 184, 414, 428, 402, 392, 812, 812, 812,
827 812, 230, 812, 230, 429, 421, 230, 230, 230, 238,
828 230, 238, 812, 314, 812, 355, 238, 812, 812, 812,
829 436, 812, 238, 422, 238, 425, 238, 424, 442, 443,
830 458, 257, 444, 423, 257, 364, 426, 257, 257, 437,
831
832 459, 257, 440, 184, 450, 382, 439, 257, 238, 438,
833 257, 445, 257, 257, 482, 257, 257, 441, 257, 257,
834 523, 446, 448, 258, 804, 447, 257, 258, 257, 257,
835 356, 257, 257, 166, 257, 257, 258, 451, 257, 381,
836 382, 257, 166, 257, 258, 258, 257, 166, 184, 257,
837 365, 184, 166, 452, 467, 166, 526, 166, 258, 168,
838 258, 166, 166, 453, 166, 399, 382, 258, 168, 442,
839 443, 484, 454, 168, 455, 258, 802, 468, 168, 800,
840 184, 168, 469, 168, 238, 485, 470, 168, 168, 216,
841 168, 216, 238, 184, 238, 456, 216, 216, 216, 471,
842
843 812, 475, 812, 474, 472, 473, 216, 812, 812, 812,
844 216, 230, 502, 230, 230, 238, 166, 812, 230, 230,
845 230, 812, 812, 558, 812, 812, 503, 504, 230, 812,
846 812, 812, 664, 527, 516, 525, 166, 450, 382, 812,
847 257, 796, 168, 257, 517, 505, 794, 507, 518, 524,
848 506, 257, 257, 257, 257, 257, 257, 257, 257, 257,
849 184, 238, 168, 166, 520, 521, 519, 257, 257, 258,
850 257, 257, 257, 257, 257, 257, 543, 528, 257, 166,
851 166, 166, 166, 258, 258, 258, 542, 529, 530, 168,
852 166, 184, 166, 793, 166, 559, 184, 184, 184, 258,
853
854 258, 184, 216, 684, 258, 168, 168, 168, 168, 557,
855 595, 238, 216, 812, 533, 547, 168, 532, 168, 531,
856 168, 560, 546, 812, 544, 562, 545, 548, 561, 216,
857 216, 216, 549, 216, 216, 575, 230, 230, 550, 230,
858 812, 812, 812, 230, 812, 812, 230, 812, 812, 238,
859 812, 230, 230, 238, 812, 594, 238, 812, 238, 184,
860 587, 166, 812, 812, 578, 166, 184, 166, 184, 576,
861 579, 257, 748, 791, 257, 577, 593, 257, 580, 588,
862 706, 238, 626, 591, 590, 166, 257, 168, 589, 257,
863 596, 168, 257, 168, 612, 257, 592, 597, 257, 599,
864
865 613, 257, 257, 258, 257, 257, 598, 257, 257, 257,
866 257, 168, 257, 166, 184, 257, 166, 166, 258, 216,
867 184, 166, 166, 614, 184, 184, 216, 258, 789, 741,
868 812, 600, 238, 625, 258, 238, 258, 812, 238, 168,
869 602, 258, 168, 168, 628, 601, 603, 168, 168, 630,
870 616, 216, 627, 216, 615, 643, 618, 645, 604, 216,
871 216, 230, 812, 617, 812, 230, 230, 230, 230, 230,
872 812, 812, 812, 238, 663, 662, 812, 812, 812, 812,
873 812, 238, 238, 257, 644, 665, 257, 646, 184, 257,
874 655, 785, 166, 257, 648, 770, 257, 184, 656, 257,
875
876 754, 658, 166, 660, 657, 647, 661, 257, 679, 803,
877 257, 166, 166, 257, 659, 258, 166, 667, 168, 666,
878 257, 257, 166, 257, 257, 258, 257, 257, 168, 257,
879 166, 668, 257, 184, 216, 257, 216, 168, 168, 258,
880 216, 680, 168, 216, 216, 812, 216, 812, 168, 238,
881 669, 812, 258, 258, 812, 812, 168, 812, 681, 670,
882 690, 258, 685, 230, 230, 230, 230, 230, 672, 230,
883 238, 783, 671, 691, 812, 812, 812, 812, 812, 694,
884 812, 257, 257, 257, 257, 257, 257, 257, 257, 257,
885 696, 257, 697, 257, 257, 257, 257, 257, 257, 257,
886
887 184, 257, 698, 695, 166, 166, 166, 216, 230, 216,
888 230, 238, 238, 258, 258, 258, 238, 166, 812, 812,
889 812, 812, 184, 258, 707, 258, 699, 258, 702, 782,
890 168, 168, 168, 712, 716, 724, 166, 238, 740, 703,
891 718, 713, 717, 168, 257, 257, 216, 257, 257, 719,
892 257, 257, 216, 166, 230, 230, 729, 812, 216, 166,
893 787, 184, 168, 812, 734, 812, 812, 746, 257, 812,
894 781, 257, 738, 720, 257, 257, 258, 258, 257, 168,
895 725, 257, 230, 216, 721, 168, 257, 230, 166, 257,
896 238, 742, 257, 812, 812, 184, 735, 751, 812, 739,
897
898 258, 753, 216, 257, 230, 755, 257, 258, 759, 257,
899 780, 757, 166, 812, 168, 812, 257, 765, 258, 257,
900 216, 238, 257, 230, 743, 762, 778, 764, 166, 768,
901 257, 812, 216, 257, 812, 258, 257, 773, 168, 230,
902 775, 184, 776, 812, 766, 166, 216, 779, 258, 792,
903 812, 784, 777, 257, 168, 230, 257, 812, 786, 257,
904 238, 166, 258, 790, 795, 238, 812, 216, 230, 257,
905 216, 168, 257, 797, 166, 257, 774, 788, 812, 812,
906 772, 812, 798, 801, 230, 258, 771, 168, 769, 806,
907 808, 809, 799, 257, 767, 812, 257, 763, 761, 257,
908
909 168, 258, 257, 760, 758, 257, 756, 238, 257, 752,
910 750, 749, 184, 747, 745, 744, 737, 736, 733, 732,
911 810, 731, 730, 727, 726, 258, 723, 722, 715, 714,
912 711, 710, 709, 708, 258, 50, 50, 50, 50, 50,
913 50, 50, 50, 50, 50, 50, 50, 66, 66, 66,
914 66, 66, 66, 66, 66, 66, 66, 66, 66, 112,
915 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
916 112, 128, 128, 128, 128, 128, 128, 128, 128, 128,
917 128, 128, 128, 155, 155, 155, 155, 155, 155, 155,
918 155, 155, 155, 155, 155, 167, 167, 167, 167, 705,
919
920 167, 167, 177, 177, 177, 704, 177, 183, 701, 183,
921 183, 183, 183, 183, 183, 183, 183, 183, 183, 187,
922 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
923 187, 201, 201, 201, 201, 201, 201, 201, 201, 201,
924 201, 201, 201, 209, 209, 209, 700, 209, 217, 217,
925 238, 217, 217, 217, 223, 223, 223, 238, 223, 231,
926 231, 238, 231, 231, 231, 237, 237, 237, 237, 237,
927 237, 237, 237, 237, 237, 237, 237, 239, 239, 239,
928 239, 239, 239, 239, 239, 239, 239, 239, 239, 256,
929 238, 256, 256, 256, 256, 256, 256, 256, 256, 256,
930
931 256, 261, 693, 692, 261, 261, 261, 261, 261, 261,
932 261, 261, 261, 264, 264, 264, 264, 264, 264, 264,
933 264, 264, 264, 264, 264, 267, 689, 688, 267, 267,
934 267, 267, 267, 267, 267, 267, 267, 284, 284, 284,
935 687, 284, 292, 292, 292, 292, 686, 292, 292, 296,
936 184, 296, 184, 296, 418, 418, 418, 184, 418, 184,
937 683, 418, 433, 433, 433, 682, 433, 678, 677, 433,
938 465, 465, 465, 676, 465, 675, 674, 465, 500, 500,
939 500, 673, 500, 654, 653, 500, 514, 514, 514, 652,
940 514, 651, 650, 514, 649, 642, 641, 640, 639, 638,
941
942 637, 636, 635, 634, 633, 632, 631, 624, 623, 622,
943 621, 620, 619, 611, 610, 609, 608, 607, 606, 605,
944 515, 586, 585, 584, 583, 582, 581, 501, 574, 573,
945 572, 571, 570, 569, 568, 567, 566, 565, 564, 563,
946 556, 555, 554, 553, 552, 551, 466, 541, 540, 539,
947 538, 537, 536, 535, 534, 443, 515, 434, 513, 512,
948 511, 510, 509, 508, 501, 419, 499, 498, 497, 496,
949 495, 494, 493, 492, 491, 490, 489, 488, 481, 480,
950 479, 478, 477, 476, 466, 382, 464, 463, 462, 461,
951 460, 457, 367, 238, 434, 432, 431, 430, 427, 419,
952
953 417, 416, 415, 412, 411, 410, 409, 406, 184, 398,
954 397, 396, 393, 297, 380, 377, 376, 375, 374, 373,
955 367, 260, 255, 238, 238, 238, 238, 238, 238, 238,
956 240, 238, 238, 348, 346, 343, 342, 341, 334, 332,
957 329, 328, 327, 326, 323, 322, 321, 203, 184, 184,
958 184, 184, 184, 156, 184, 312, 309, 308, 307, 297,
959 295, 156, 291, 290, 289, 288, 285, 260, 240, 238,
960 238, 238, 229, 228, 227, 226, 225, 224, 215, 214,
961 213, 212, 211, 210, 208, 207, 206, 205, 204, 165,
962 162, 161, 160, 156, 162, 184, 184, 182, 181, 180,
963
964 179, 178, 165, 162, 161, 160, 156, 812, 23, 812,
965 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
966 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
967 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
968 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
969 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
970 812, 812, 812, 812, 812, 812, 812
971 } ;
972
973static yyconst flex_int16_t yy_chk[2368] =
974 { 0,
975 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
976 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
977 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
978 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
979 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
980 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
981 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
982 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
983 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
984 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
985
986 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
987 3, 3, 3, 3, 3, 3, 5, 5, 5, 29,
988 5, 33, 35, 5, 33, 5, 37, 29, 5, 54,
989 36, 5, 5, 5, 40, 38, 5, 39, 51, 51,
990 56, 56, 61, 54, 843, 42, 43, 64, 35, 125,
991 41, 5, 37, 51, 5, 36, 36, 61, 5, 37,
992 40, 38, 122, 39, 40, 5, 6, 6, 6, 38,
993 6, 42, 43, 6, 63, 6, 41, 64, 6, 62,
994 43, 6, 6, 6, 55, 39, 6, 57, 57, 65,
995 41, 122, 55, 125, 42, 60, 60, 59, 63, 55,
996
997 59, 6, 62, 59, 6, 67, 67, 75, 6, 124,
998 75, 71, 123, 65, 132, 6, 7, 7, 7, 71,
999 7, 841, 126, 7, 90, 7, 91, 92, 7, 93,
1000 94, 7, 7, 7, 95, 90, 7, 91, 92, 105,
1001 93, 94, 96, 132, 106, 95, 107, 124, 110, 123,
1002 105, 7, 92, 96, 7, 106, 250, 107, 7, 110,
1003 126, 108, 93, 187, 94, 7, 8, 8, 8, 109,
1004 8, 107, 108, 8, 95, 8, 96, 187, 8, 111,
1005 109, 8, 8, 8, 116, 116, 8, 117, 110, 120,
1006 111, 118, 116, 250, 108, 119, 121, 120, 127, 127,
1007
1008 120, 8, 117, 109, 8, 150, 118, 150, 8, 839,
1009 119, 121, 838, 111, 837, 8, 9, 9, 9, 9,
1010 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1011 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1012 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1013 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1014 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1015 9, 9, 9, 9, 11, 11, 11, 11, 11, 11,
1016 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1017 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1018
1019 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1020 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1021 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1022 11, 11, 13, 13, 13, 13, 13, 13, 13, 13,
1023 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1024 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1025 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1026 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1027 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1028 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1029
1030 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1031 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1032 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1033 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
1034 15, 15, 15, 15, 15, 15, 15, 15, 17, 17,
1035 17, 134, 17, 128, 157, 17, 128, 17, 818, 128,
1036 17, 129, 129, 17, 17, 17, 131, 158, 17, 131,
1037 133, 133, 131, 133, 167, 158, 133, 134, 185, 185,
1038 157, 135, 159, 17, 135, 128, 17, 135, 181, 135,
1039 17, 196, 181, 185, 249, 189, 197, 17, 131, 315,
1040
1041 167, 196, 133, 189, 17, 18, 18, 18, 315, 18,
1042 189, 404, 18, 135, 18, 200, 170, 18, 249, 197,
1043 18, 18, 18, 136, 139, 18, 136, 139, 137, 136,
1044 139, 137, 169, 139, 137, 138, 139, 159, 138, 136,
1045 18, 138, 170, 18, 137, 404, 171, 18, 200, 170,
1046 198, 138, 169, 251, 18, 136, 139, 172, 169, 561,
1047 137, 18, 19, 19, 19, 19, 19, 138, 19, 19,
1048 140, 19, 171, 140, 19, 198, 140, 19, 19, 19,
1049 809, 171, 19, 172, 175, 143, 140, 217, 143, 362,
1050 141, 143, 251, 141, 19, 561, 141, 19, 217, 172,
1051
1052 19, 319, 140, 144, 19, 173, 144, 267, 176, 144,
1053 175, 19, 20, 20, 20, 20, 20, 143, 20, 20,
1054 141, 20, 141, 143, 20, 319, 199, 20, 20, 20,
1055 175, 173, 20, 267, 176, 144, 202, 202, 254, 254,
1056 362, 207, 144, 173, 20, 207, 231, 20, 199, 213,
1057 20, 176, 199, 213, 20, 227, 290, 231, 803, 227,
1058 290, 20, 21, 21, 21, 21, 21, 21, 21, 21,
1059 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1060 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1061 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1062
1063 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1064 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1065 142, 142, 145, 142, 146, 145, 142, 146, 145, 174,
1066 146, 190, 221, 218, 222, 253, 219, 220, 232, 234,
1067 233, 242, 242, 221, 218, 222, 190, 219, 220, 232,
1068 234, 233, 142, 218, 145, 174, 146, 252, 232, 235,
1069 236, 174, 800, 146, 221, 174, 268, 145, 221, 219,
1070 235, 236, 220, 233, 234, 241, 241, 222, 256, 259,
1071 259, 256, 253, 241, 256, 261, 190, 262, 263, 292,
1072 263, 235, 268, 252, 796, 235, 242, 252, 257, 258,
1073
1074 258, 257, 258, 236, 257, 258, 264, 264, 269, 264,
1075 256, 293, 264, 269, 261, 292, 262, 265, 265, 263,
1076 265, 266, 266, 265, 266, 444, 270, 266, 405, 270,
1077 257, 258, 270, 320, 270, 294, 294, 271, 264, 269,
1078 271, 272, 273, 271, 272, 273, 300, 272, 273, 265,
1079 444, 274, 337, 266, 274, 405, 275, 274, 270, 275,
1080 302, 276, 275, 337, 276, 277, 293, 276, 277, 271,
1081 320, 277, 300, 272, 273, 278, 280, 299, 278, 280,
1082 301, 278, 280, 274, 281, 298, 302, 281, 275, 305,
1083 281, 303, 271, 276, 302, 282, 283, 277, 282, 283,
1084
1085 278, 282, 283, 299, 298, 304, 301, 278, 280, 306,
1086 308, 298, 318, 299, 280, 305, 281, 303, 313, 316,
1087 308, 301, 401, 299, 281, 305, 706, 282, 283, 794,
1088 303, 304, 282, 313, 706, 306, 282, 314, 314, 304,
1089 322, 318, 401, 328, 283, 316, 335, 336, 338, 340,
1090 322, 339, 314, 328, 342, 316, 306, 335, 336, 338,
1091 340, 349, 339, 350, 342, 335, 351, 352, 353, 357,
1092 354, 358, 349, 313, 350, 355, 355, 351, 352, 353,
1093 349, 354, 360, 336, 361, 339, 445, 338, 356, 356,
1094 374, 363, 357, 336, 363, 364, 340, 363, 364, 350,
1095
1096 374, 364, 353, 400, 365, 365, 352, 365, 448, 350,
1097 365, 358, 368, 366, 400, 368, 366, 354, 368, 366,
1098 445, 358, 361, 363, 793, 360, 369, 364, 370, 369,
1099 355, 370, 369, 384, 370, 371, 365, 366, 371, 381,
1100 381, 371, 387, 372, 368, 366, 372, 385, 403, 372,
1101 364, 402, 386, 368, 384, 388, 448, 389, 369, 384,
1102 370, 390, 391, 368, 392, 399, 399, 371, 387, 442,
1103 442, 402, 370, 385, 371, 372, 791, 385, 386, 789,
1104 399, 388, 386, 389, 447, 403, 387, 390, 391, 419,
1105 392, 421, 449, 483, 596, 372, 422, 423, 424, 388,
1106
1107 419, 392, 421, 391, 389, 390, 425, 422, 423, 424,
1108 426, 434, 421, 436, 437, 446, 466, 425, 438, 439,
1109 440, 426, 434, 483, 436, 437, 422, 423, 441, 438,
1110 439, 440, 596, 449, 436, 447, 468, 450, 450, 441,
1111 450, 785, 466, 450, 437, 424, 783, 426, 438, 446,
1112 425, 451, 452, 453, 451, 452, 453, 451, 452, 453,
1113 484, 524, 468, 467, 440, 441, 439, 454, 455, 450,
1114 454, 455, 456, 454, 455, 456, 468, 451, 456, 469,
1115 470, 471, 472, 451, 452, 453, 467, 452, 453, 467,
1116 473, 487, 474, 782, 475, 484, 482, 625, 485, 454,
1117
1118 455, 486, 501, 625, 456, 469, 470, 471, 472, 482,
1119 524, 523, 502, 501, 456, 472, 473, 455, 474, 454,
1120 475, 485, 471, 502, 469, 487, 470, 473, 486, 503,
1121 504, 505, 474, 506, 507, 502, 515, 516, 475, 517,
1122 503, 504, 505, 518, 506, 507, 520, 515, 516, 522,
1123 517, 519, 521, 525, 518, 523, 526, 520, 527, 558,
1124 516, 545, 519, 521, 505, 542, 684, 543, 728, 503,
1125 506, 528, 728, 780, 528, 504, 522, 528, 507, 517,
1126 684, 719, 558, 520, 519, 544, 529, 545, 518, 529,
1127 525, 542, 529, 543, 542, 530, 521, 526, 530, 528,
1128
1129 543, 530, 531, 528, 532, 531, 527, 532, 531, 533,
1130 532, 544, 533, 546, 557, 533, 547, 548, 529, 577,
1131 560, 549, 550, 544, 559, 562, 575, 530, 778, 719,
1132 577, 529, 595, 557, 531, 597, 532, 575, 594, 546,
1133 531, 533, 547, 548, 560, 530, 532, 549, 550, 562,
1134 547, 576, 559, 578, 546, 575, 550, 577, 533, 579,
1135 580, 587, 576, 548, 578, 588, 589, 590, 591, 592,
1136 579, 580, 587, 593, 595, 594, 588, 589, 590, 591,
1137 592, 598, 740, 599, 576, 597, 599, 578, 759, 599,
1138 587, 774, 612, 600, 580, 759, 600, 792, 588, 600,
1139
1140 740, 590, 613, 592, 589, 579, 593, 601, 612, 792,
1141 601, 614, 615, 601, 591, 599, 616, 599, 612, 598,
1142 602, 603, 617, 602, 603, 600, 602, 603, 613, 604,
1143 618, 600, 604, 626, 644, 604, 645, 614, 615, 601,
1144 646, 613, 616, 647, 643, 644, 648, 645, 617, 662,
1145 601, 646, 602, 603, 647, 643, 618, 648, 615, 602,
1146 643, 604, 626, 655, 656, 657, 658, 659, 604, 660,
1147 661, 772, 603, 644, 655, 656, 657, 658, 659, 655,
1148 660, 667, 668, 669, 667, 668, 669, 667, 668, 669,
1149 661, 670, 662, 671, 670, 672, 671, 670, 672, 671,
1150
1151 685, 672, 667, 656, 679, 680, 681, 691, 695, 690,
1152 694, 697, 696, 667, 668, 669, 718, 702, 691, 695,
1153 690, 694, 707, 670, 685, 671, 668, 672, 679, 771,
1154 679, 680, 681, 690, 694, 702, 703, 776, 718, 680,
1155 696, 691, 695, 702, 698, 699, 712, 698, 699, 697,
1156 698, 699, 713, 724, 716, 717, 707, 712, 735, 725,
1157 776, 770, 703, 713, 712, 716, 717, 724, 720, 735,
1158 770, 720, 716, 698, 720, 721, 698, 699, 721, 724,
1159 703, 721, 739, 734, 699, 725, 742, 738, 746, 742,
1160 754, 720, 742, 739, 734, 748, 713, 734, 738, 717,
1161
1162 720, 738, 751, 743, 753, 742, 743, 721, 748, 743,
1163 769, 746, 757, 751, 746, 753, 755, 754, 742, 755,
1164 762, 765, 755, 764, 721, 751, 767, 753, 768, 757,
1165 766, 762, 773, 766, 764, 743, 766, 762, 757, 775,
1166 764, 781, 765, 773, 755, 779, 784, 768, 755, 781,
1167 775, 773, 766, 777, 768, 786, 777, 784, 775, 777,
1168 787, 790, 766, 779, 784, 798, 786, 795, 797, 788,
1169 806, 779, 788, 786, 801, 788, 763, 777, 795, 797,
1170 761, 806, 787, 790, 808, 777, 760, 790, 758, 795,
1171 797, 798, 788, 799, 756, 808, 799, 752, 750, 799,
1172
1173 801, 788, 810, 749, 747, 810, 744, 741, 810, 736,
1174 732, 730, 729, 726, 723, 722, 715, 714, 711, 710,
1175 799, 709, 708, 705, 704, 799, 701, 700, 693, 692,
1176 689, 688, 687, 686, 810, 813, 813, 813, 813, 813,
1177 813, 813, 813, 813, 813, 813, 813, 814, 814, 814,
1178 814, 814, 814, 814, 814, 814, 814, 814, 814, 815,
1179 815, 815, 815, 815, 815, 815, 815, 815, 815, 815,
1180 815, 816, 816, 816, 816, 816, 816, 816, 816, 816,
1181 816, 816, 816, 817, 817, 817, 817, 817, 817, 817,
1182 817, 817, 817, 817, 817, 819, 819, 819, 819, 683,
1183
1184 819, 819, 820, 820, 820, 682, 820, 821, 674, 821,
1185 821, 821, 821, 821, 821, 821, 821, 821, 821, 822,
1186 822, 822, 822, 822, 822, 822, 822, 822, 822, 822,
1187 822, 823, 823, 823, 823, 823, 823, 823, 823, 823,
1188 823, 823, 823, 824, 824, 824, 673, 824, 825, 825,
1189 666, 825, 825, 825, 826, 826, 826, 665, 826, 827,
1190 827, 664, 827, 827, 827, 828, 828, 828, 828, 828,
1191 828, 828, 828, 828, 828, 828, 828, 829, 829, 829,
1192 829, 829, 829, 829, 829, 829, 829, 829, 829, 830,
1193 663, 830, 830, 830, 830, 830, 830, 830, 830, 830,
1194
1195 830, 831, 650, 649, 831, 831, 831, 831, 831, 831,
1196 831, 831, 831, 832, 832, 832, 832, 832, 832, 832,
1197 832, 832, 832, 832, 832, 833, 638, 637, 833, 833,
1198 833, 833, 833, 833, 833, 833, 833, 834, 834, 834,
1199 632, 834, 835, 835, 835, 835, 631, 835, 835, 836,
1200 630, 836, 629, 836, 840, 840, 840, 628, 840, 627,
1201 620, 840, 842, 842, 842, 619, 842, 611, 610, 842,
1202 844, 844, 844, 609, 844, 607, 606, 844, 845, 845,
1203 845, 605, 845, 586, 585, 845, 846, 846, 846, 584,
1204 846, 583, 582, 846, 581, 574, 573, 572, 571, 570,
1205
1206 569, 568, 567, 566, 565, 564, 563, 556, 555, 554,
1207 553, 552, 551, 541, 540, 539, 538, 536, 535, 534,
1208 514, 513, 512, 511, 510, 509, 508, 500, 499, 498,
1209 497, 496, 495, 494, 493, 492, 491, 490, 489, 488,
1210 481, 480, 479, 478, 477, 476, 465, 464, 463, 462,
1211 461, 460, 459, 458, 457, 443, 435, 433, 432, 431,
1212 430, 429, 428, 427, 420, 418, 417, 416, 415, 414,
1213 413, 412, 411, 410, 409, 408, 407, 406, 398, 397,
1214 396, 395, 394, 393, 383, 382, 380, 379, 378, 376,
1215 375, 373, 367, 359, 347, 346, 345, 344, 341, 333,
1216
1217 332, 331, 330, 327, 326, 325, 324, 321, 317, 312,
1218 311, 310, 307, 296, 291, 289, 288, 287, 286, 285,
1219 279, 260, 255, 248, 247, 246, 245, 244, 243, 240,
1220 239, 238, 237, 230, 228, 226, 225, 224, 216, 214,
1221 212, 211, 210, 208, 206, 205, 204, 201, 195, 194,
1222 193, 192, 191, 188, 183, 182, 180, 179, 178, 168,
1223 166, 155, 154, 153, 152, 151, 149, 130, 115, 114,
1224 113, 112, 104, 103, 102, 101, 100, 99, 89, 88,
1225 87, 86, 85, 84, 81, 80, 79, 78, 77, 76,
1226 74, 73, 72, 70, 58, 53, 50, 49, 48, 47,
1227
1228 46, 45, 34, 32, 31, 30, 27, 23, 812, 812,
1229 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
1230 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
1231 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
1232 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
1233 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
1234 812, 812, 812, 812, 812, 812, 812
1235 } ;
1236
1237/* Table of booleans, true if rule could match eol. */
1238static yyconst flex_int32_t yy_rule_can_match_eol[48] =
1239 { 0,
12400, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
1241 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0,
1242 0, 0, 1, 1, 1, 1, 0, 0, };
1243
1244/* The intent behind this definition is that it'll catch
1245 * any uses of REJECT which flex missed.
1246 */
1247#define REJECT reject_used_but_not_detected
1248#define yymore() yymore_used_but_not_detected
1249#define YY_MORE_ADJ 0
1250#define YY_RESTORE_YY_MORE_OFFSET
1251#line 1 "bitbakescanner.l"
1252/* bbf.flex
1253
1254 written by Marc Singer
1255 6 January 2005
1256
1257 This program is free software; you can redistribute it and/or
1258 modify it under the terms of the GNU General Public License as
1259 published by the Free Software Foundation; either version 2 of the
1260 License, or (at your option) any later version.
1261
1262 This program is distributed in the hope that it will be useful, but
1263 WITHOUT ANY WARRANTY; without even the implied warranty of
1264 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1265 General Public License for more details.
1266
1267 You should have received a copy of the GNU General Public License
1268 along with this program; if not, write to the Free Software
1269 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
1270 USA.
1271
1272 DESCRIPTION
1273 -----------
1274
1275 flex lexer specification for a BitBake input file parser.
1276
1277 Unfortunately, flex doesn't welcome comments within the rule sets.
1278 I say unfortunately because this lexer is unreasonably complex and
1279 comments would make the code much easier to comprehend.
1280
1281 The BitBake grammar is not regular. In order to interpret all
1282 of the available input files, the lexer maintains much state as it
1283 parses. There are places where this lexer will emit tokens that
1284 are invalid. The parser will tend to catch these.
1285
1286 The lexer requires C++ at the moment. The only reason for this has
1287 to do with a very small amount of managed state. Producing a C
1288 lexer should be a reasonably easy task as long as the %reentrant
1289 option is used.
1290
1291
1292 NOTES
1293 -----
1294
1295 o RVALUES. There are three kinds of RVALUES. There are unquoted
1296 values, double quote enclosed strings, and single quote
1297 strings. Quoted strings may contain unescaped quotes (of either
1298 type), *and* any type may span more than one line by using a
1299 continuation '\' at the end of the line. This requires us to
1300 recognize all types of values with a single expression.
1301 Moreover, the only reason to quote a value is to include
1302 trailing or leading whitespace. Whitespace within a value is
1303 preserved, ugh.
1304
1305 o CLASSES. C_ patterns define classes. Classes ought not include
1306 a repitition operator, instead letting the reference to the class
1307 define the repitition count.
1308
1309 C_SS - symbol start
1310 C_SB - symbol body
1311 C_SP - whitespace
1312
1313*/
1314#line 71 "bitbakescanner.l"
1315
1316#include "token.h"
1317#include "lexer.h"
1318#include "bitbakeparser.h"
1319#include <ctype.h>
1320
1321extern void *bbparseAlloc(void *(*mallocProc)(size_t));
1322extern void bbparseFree(void *p, void (*freeProc)(void*));
1323extern void *bbparseAlloc(void *(*mallocProc)(size_t));
1324extern void *bbparse(void*, int, token_t, lex_t*);
1325extern void bbparseTrace(FILE *TraceFILE, char *zTracePrompt);
1326
1327//static const char* rgbInput;
1328//static size_t cbInput;
1329
1330extern "C" {
1331
1332int lineError;
1333int errorParse;
1334
1335enum {
1336 errorNone = 0,
1337 errorUnexpectedInput,
1338 errorUnsupportedFeature,
1339};
1340
1341}
1342
1343#define YY_EXTRA_TYPE lex_t*
1344
1345 /* Read from buffer */
1346#define YY_INPUT(buf,result,max_size) \
1347 { yyextra->input(buf, &result, max_size); }
1348
1349//#define YY_DECL static size_t yylex ()
1350
1351#define ERROR(e) \
1352 do { lineError = yylineno; errorParse = e; yyterminate (); } while (0)
1353
1354static const char* fixup_escapes (const char* sz);
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366#line 1367 "<stdout>"
1367
1368#define INITIAL 0
1369#define S_DEF 1
1370#define S_DEF_ARGS 2
1371#define S_DEF_BODY 3
1372#define S_FUNC 4
1373#define S_INCLUDE 5
1374#define S_INHERIT 6
1375#define S_REQUIRE 7
1376#define S_PROC 8
1377#define S_RVALUE 9
1378#define S_TASK 10
1379
1380#ifndef YY_NO_UNISTD_H
1381/* Special case for "unistd.h", since it is non-ANSI. We include it way
1382 * down here because we want the user's section 1 to have been scanned first.
1383 * The user has a chance to override it with an option.
1384 */
1385#include <unistd.h>
1386#endif
1387
1388#ifndef YY_EXTRA_TYPE
1389#define YY_EXTRA_TYPE void *
1390#endif
1391
1392/* Holds the entire state of the reentrant scanner. */
1393struct yyguts_t
1394 {
1395
1396 /* User-defined. Not touched by flex. */
1397 YY_EXTRA_TYPE yyextra_r;
1398
1399 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1400 FILE *yyin_r, *yyout_r;
1401 size_t yy_buffer_stack_top; /**< index of top of stack. */
1402 size_t yy_buffer_stack_max; /**< capacity of stack. */
1403 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1404 char yy_hold_char;
1405 int yy_n_chars;
1406 int yyleng_r;
1407 char *yy_c_buf_p;
1408 int yy_init;
1409 int yy_start;
1410 int yy_did_buffer_switch_on_eof;
1411 int yy_start_stack_ptr;
1412 int yy_start_stack_depth;
1413 int *yy_start_stack;
1414 yy_state_type yy_last_accepting_state;
1415 char* yy_last_accepting_cpos;
1416
1417 int yylineno_r;
1418 int yy_flex_debug_r;
1419
1420 char *yytext_r;
1421 int yy_more_flag;
1422 int yy_more_len;
1423
1424 }; /* end struct yyguts_t */
1425
1426static int yy_init_globals (yyscan_t yyscanner );
1427
1428/* Accessor methods to globals.
1429 These are made visible to non-reentrant scanners for convenience. */
1430
1431int yylex_destroy (yyscan_t yyscanner );
1432
1433int yyget_debug (yyscan_t yyscanner );
1434
1435void yyset_debug (int debug_flag ,yyscan_t yyscanner );
1436
1437YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner );
1438
1439void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
1440
1441FILE *yyget_in (yyscan_t yyscanner );
1442
1443void yyset_in (FILE * in_str ,yyscan_t yyscanner );
1444
1445FILE *yyget_out (yyscan_t yyscanner );
1446
1447void yyset_out (FILE * out_str ,yyscan_t yyscanner );
1448
1449int yyget_leng (yyscan_t yyscanner );
1450
1451char *yyget_text (yyscan_t yyscanner );
1452
1453int yyget_lineno (yyscan_t yyscanner );
1454
1455void yyset_lineno (int line_number ,yyscan_t yyscanner );
1456
1457/* Macros after this point can all be overridden by user definitions in
1458 * section 1.
1459 */
1460
1461#ifndef YY_SKIP_YYWRAP
1462#ifdef __cplusplus
1463extern "C" int yywrap (yyscan_t yyscanner );
1464#else
1465extern int yywrap (yyscan_t yyscanner );
1466#endif
1467#endif
1468
1469 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
1470
1471#ifndef yytext_ptr
1472static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
1473#endif
1474
1475#ifdef YY_NEED_STRLEN
1476static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
1477#endif
1478
1479#ifndef YY_NO_INPUT
1480
1481#ifdef __cplusplus
1482static int yyinput (yyscan_t yyscanner );
1483#else
1484static int input (yyscan_t yyscanner );
1485#endif
1486
1487#endif
1488
1489 static void yy_push_state (int new_state ,yyscan_t yyscanner);
1490
1491 static void yy_pop_state (yyscan_t yyscanner );
1492
1493 static int yy_top_state (yyscan_t yyscanner );
1494
1495/* Amount of stuff to slurp up with each read. */
1496#ifndef YY_READ_BUF_SIZE
1497#define YY_READ_BUF_SIZE 8192
1498#endif
1499
1500/* Copy whatever the last rule matched to the standard output. */
1501#ifndef ECHO
1502/* This used to be an fputs(), but since the string might contain NUL's,
1503 * we now use fwrite().
1504 */
1505#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1506#endif
1507
1508/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1509 * is returned in "result".
1510 */
1511#ifndef YY_INPUT
1512#define YY_INPUT(buf,result,max_size) \
1513 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1514 { \
1515 int c = '*'; \
1516 size_t n; \
1517 for ( n = 0; n < max_size && \
1518 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1519 buf[n] = (char) c; \
1520 if ( c == '\n' ) \
1521 buf[n++] = (char) c; \
1522 if ( c == EOF && ferror( yyin ) ) \
1523 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1524 result = n; \
1525 } \
1526 else \
1527 { \
1528 errno=0; \
1529 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1530 { \
1531 if( errno != EINTR) \
1532 { \
1533 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1534 break; \
1535 } \
1536 errno=0; \
1537 clearerr(yyin); \
1538 } \
1539 }\
1540\
1541
1542#endif
1543
1544/* No semi-colon after return; correct usage is to write "yyterminate();" -
1545 * we don't want an extra ';' after the "return" because that will cause
1546 * some compilers to complain about unreachable statements.
1547 */
1548#ifndef yyterminate
1549#define yyterminate() return YY_NULL
1550#endif
1551
1552/* Number of entries by which start-condition stack grows. */
1553#ifndef YY_START_STACK_INCR
1554#define YY_START_STACK_INCR 25
1555#endif
1556
1557/* Report a fatal error. */
1558#ifndef YY_FATAL_ERROR
1559#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1560#endif
1561
1562/* end tables serialization structures and prototypes */
1563
1564/* Default declaration of generated scanner - a define so the user can
1565 * easily add parameters.
1566 */
1567#ifndef YY_DECL
1568#define YY_DECL_IS_OURS 1
1569
1570extern int yylex (yyscan_t yyscanner);
1571
1572#define YY_DECL int yylex (yyscan_t yyscanner)
1573#endif /* !YY_DECL */
1574
1575/* Code executed at the beginning of each rule, after yytext and yyleng
1576 * have been set up.
1577 */
1578#ifndef YY_USER_ACTION
1579#define YY_USER_ACTION
1580#endif
1581
1582/* Code executed at the end of each rule. */
1583#ifndef YY_BREAK
1584#define YY_BREAK break;
1585#endif
1586
1587#define YY_RULE_SETUP \
1588 YY_USER_ACTION
1589
1590/** The main scanner function which does all the work.
1591 */
1592YY_DECL
1593{
1594 register yy_state_type yy_current_state;
1595 register char *yy_cp, *yy_bp;
1596 register int yy_act;
1597 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1598
1599#line 164 "bitbakescanner.l"
1600
1601
1602#line 1603 "<stdout>"
1603
1604 if ( !yyg->yy_init )
1605 {
1606 yyg->yy_init = 1;
1607
1608#ifdef YY_USER_INIT
1609 YY_USER_INIT;
1610#endif
1611
1612 if ( ! yyg->yy_start )
1613 yyg->yy_start = 1; /* first start state */
1614
1615 if ( ! yyin )
1616 yyin = stdin;
1617
1618 if ( ! yyout )
1619 yyout = stdout;
1620
1621 if ( ! YY_CURRENT_BUFFER ) {
1622 yyensure_buffer_stack (yyscanner);
1623 YY_CURRENT_BUFFER_LVALUE =
1624 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1625 }
1626
1627 yy_load_buffer_state(yyscanner );
1628 }
1629
1630 while ( 1 ) /* loops until end-of-file is reached */
1631 {
1632 yy_cp = yyg->yy_c_buf_p;
1633
1634 /* Support of yytext. */
1635 *yy_cp = yyg->yy_hold_char;
1636
1637 /* yy_bp points to the position in yy_ch_buf of the start of
1638 * the current run.
1639 */
1640 yy_bp = yy_cp;
1641
1642 yy_current_state = yyg->yy_start;
1643yy_match:
1644 do
1645 {
1646 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1647 if ( yy_accept[yy_current_state] )
1648 {
1649 yyg->yy_last_accepting_state = yy_current_state;
1650 yyg->yy_last_accepting_cpos = yy_cp;
1651 }
1652 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1653 {
1654 yy_current_state = (int) yy_def[yy_current_state];
1655 if ( yy_current_state >= 813 )
1656 yy_c = yy_meta[(unsigned int) yy_c];
1657 }
1658 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1659 ++yy_cp;
1660 }
1661 while ( yy_current_state != 812 );
1662 yy_cp = yyg->yy_last_accepting_cpos;
1663 yy_current_state = yyg->yy_last_accepting_state;
1664
1665yy_find_action:
1666 yy_act = yy_accept[yy_current_state];
1667
1668 YY_DO_BEFORE_ACTION;
1669
1670 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1671 {
1672 int yyl;
1673 for ( yyl = 0; yyl < yyleng; ++yyl )
1674 if ( yytext[yyl] == '\n' )
1675
1676 do{ yylineno++;
1677 yycolumn=0;
1678 }while(0)
1679;
1680 }
1681
1682do_action: /* This label is used only to access EOF actions. */
1683
1684 switch ( yy_act )
1685 { /* beginning of action switch */
1686 case 0: /* must back up */
1687 /* undo the effects of YY_DO_BEFORE_ACTION */
1688 *yy_cp = yyg->yy_hold_char;
1689 yy_cp = yyg->yy_last_accepting_cpos;
1690 yy_current_state = yyg->yy_last_accepting_state;
1691 goto yy_find_action;
1692
1693case 1:
1694YY_RULE_SETUP
1695#line 166 "bitbakescanner.l"
1696{ BEGIN S_RVALUE;
1697 yyextra->accept (T_OP_APPEND); }
1698 YY_BREAK
1699case 2:
1700YY_RULE_SETUP
1701#line 168 "bitbakescanner.l"
1702{ BEGIN S_RVALUE;
1703 yyextra->accept (T_OP_PREPEND); }
1704 YY_BREAK
1705case 3:
1706YY_RULE_SETUP
1707#line 170 "bitbakescanner.l"
1708{ BEGIN S_RVALUE;
1709 yyextra->accept (T_OP_IMMEDIATE); }
1710 YY_BREAK
1711case 4:
1712YY_RULE_SETUP
1713#line 172 "bitbakescanner.l"
1714{ BEGIN S_RVALUE;
1715 yyextra->accept (T_OP_ASSIGN); }
1716 YY_BREAK
1717case 5:
1718YY_RULE_SETUP
1719#line 174 "bitbakescanner.l"
1720{ BEGIN S_RVALUE;
1721 yyextra->accept (T_OP_PREDOT); }
1722 YY_BREAK
1723case 6:
1724YY_RULE_SETUP
1725#line 176 "bitbakescanner.l"
1726{ BEGIN S_RVALUE;
1727 yyextra->accept (T_OP_POSTDOT); }
1728 YY_BREAK
1729case 7:
1730YY_RULE_SETUP
1731#line 178 "bitbakescanner.l"
1732{ BEGIN S_RVALUE;
1733 yyextra->accept (T_OP_COND); }
1734 YY_BREAK
1735case 8:
1736/* rule 8 can match eol */
1737YY_RULE_SETUP
1738#line 181 "bitbakescanner.l"
1739{ }
1740 YY_BREAK
1741case 9:
1742/* rule 9 can match eol */
1743YY_RULE_SETUP
1744#line 182 "bitbakescanner.l"
1745{ BEGIN INITIAL;
1746 size_t cb = yyleng;
1747 while (cb && isspace (yytext[cb - 1]))
1748 --cb;
1749 yytext[cb - 1] = 0;
1750 yyextra->accept (T_STRING, yytext + 1); }
1751 YY_BREAK
1752case 10:
1753/* rule 10 can match eol */
1754YY_RULE_SETUP
1755#line 188 "bitbakescanner.l"
1756{ BEGIN INITIAL;
1757 size_t cb = yyleng;
1758 while (cb && isspace (yytext[cb - 1]))
1759 --cb;
1760 yytext[cb - 1] = 0;
1761 yyextra->accept (T_STRING, yytext + 1); }
1762 YY_BREAK
1763case 11:
1764/* rule 11 can match eol */
1765YY_RULE_SETUP
1766#line 195 "bitbakescanner.l"
1767{ ERROR (errorUnexpectedInput); }
1768 YY_BREAK
1769case 12:
1770/* rule 12 can match eol */
1771YY_RULE_SETUP
1772#line 196 "bitbakescanner.l"
1773{ BEGIN INITIAL;
1774 yyextra->accept (T_STRING, NULL); }
1775 YY_BREAK
1776case 13:
1777YY_RULE_SETUP
1778#line 199 "bitbakescanner.l"
1779{ BEGIN S_INCLUDE;
1780 yyextra->accept (T_INCLUDE); }
1781 YY_BREAK
1782case 14:
1783YY_RULE_SETUP
1784#line 201 "bitbakescanner.l"
1785{ BEGIN S_REQUIRE;
1786 yyextra->accept (T_REQUIRE); }
1787 YY_BREAK
1788case 15:
1789YY_RULE_SETUP
1790#line 203 "bitbakescanner.l"
1791{ BEGIN S_INHERIT;
1792 yyextra->accept (T_INHERIT); }
1793 YY_BREAK
1794case 16:
1795YY_RULE_SETUP
1796#line 205 "bitbakescanner.l"
1797{ BEGIN S_TASK;
1798 yyextra->accept (T_ADDTASK); }
1799 YY_BREAK
1800case 17:
1801YY_RULE_SETUP
1802#line 207 "bitbakescanner.l"
1803{ yyextra->accept (T_ADDHANDLER); }
1804 YY_BREAK
1805case 18:
1806YY_RULE_SETUP
1807#line 208 "bitbakescanner.l"
1808{ BEGIN S_FUNC;
1809 yyextra->accept (T_EXPORT_FUNC); }
1810 YY_BREAK
1811case 19:
1812YY_RULE_SETUP
1813#line 210 "bitbakescanner.l"
1814{ yyextra->accept (T_BEFORE); }
1815 YY_BREAK
1816case 20:
1817YY_RULE_SETUP
1818#line 211 "bitbakescanner.l"
1819{ yyextra->accept (T_AFTER); }
1820 YY_BREAK
1821case 21:
1822YY_RULE_SETUP
1823#line 212 "bitbakescanner.l"
1824{ yyextra->accept (T_EXPORT); }
1825 YY_BREAK
1826case 22:
1827YY_RULE_SETUP
1828#line 214 "bitbakescanner.l"
1829{ yyextra->accept (T_FAKEROOT); }
1830 YY_BREAK
1831case 23:
1832YY_RULE_SETUP
1833#line 215 "bitbakescanner.l"
1834{ yyextra->accept (T_PYTHON); }
1835 YY_BREAK
1836case 24:
1837/* rule 24 can match eol */
1838YY_RULE_SETUP
1839#line 216 "bitbakescanner.l"
1840{ BEGIN S_PROC;
1841 yyextra->accept (T_PROC_OPEN); }
1842 YY_BREAK
1843case 25:
1844/* rule 25 can match eol */
1845YY_RULE_SETUP
1846#line 218 "bitbakescanner.l"
1847{ BEGIN INITIAL;
1848 yyextra->accept (T_PROC_CLOSE); }
1849 YY_BREAK
1850case 26:
1851/* rule 26 can match eol */
1852YY_RULE_SETUP
1853#line 220 "bitbakescanner.l"
1854{ yyextra->accept (T_PROC_BODY, yytext); }
1855 YY_BREAK
1856case 27:
1857YY_RULE_SETUP
1858#line 222 "bitbakescanner.l"
1859{ BEGIN S_DEF; }
1860 YY_BREAK
1861case 28:
1862YY_RULE_SETUP
1863#line 223 "bitbakescanner.l"
1864{ BEGIN S_DEF_ARGS;
1865 yyextra->accept (T_SYMBOL, yytext); }
1866 YY_BREAK
1867case 29:
1868YY_RULE_SETUP
1869#line 225 "bitbakescanner.l"
1870{ yyextra->accept (T_DEF_ARGS, yytext); }
1871 YY_BREAK
1872case 30:
1873/* rule 30 can match eol */
1874YY_RULE_SETUP
1875#line 226 "bitbakescanner.l"
1876{ BEGIN S_DEF_BODY; }
1877 YY_BREAK
1878case 31:
1879/* rule 31 can match eol */
1880YY_RULE_SETUP
1881#line 227 "bitbakescanner.l"
1882{ yyextra->accept (T_DEF_BODY, yytext); }
1883 YY_BREAK
1884case 32:
1885/* rule 32 can match eol */
1886YY_RULE_SETUP
1887#line 228 "bitbakescanner.l"
1888{ yyextra->accept (T_DEF_BODY, yytext); }
1889 YY_BREAK
1890case 33:
1891YY_RULE_SETUP
1892#line 229 "bitbakescanner.l"
1893{ BEGIN INITIAL; unput (yytext[0]); }
1894 YY_BREAK
1895case 34:
1896/* rule 34 can match eol */
1897YY_RULE_SETUP
1898#line 231 "bitbakescanner.l"
1899{ }
1900 YY_BREAK
1901case 35:
1902YY_RULE_SETUP
1903#line 233 "bitbakescanner.l"
1904{ yyextra->accept (T_SYMBOL, yytext); }
1905 YY_BREAK
1906case 36:
1907YY_RULE_SETUP
1908#line 234 "bitbakescanner.l"
1909{ yyextra->accept (T_VARIABLE, yytext); }
1910 YY_BREAK
1911case 37:
1912YY_RULE_SETUP
1913#line 236 "bitbakescanner.l"
1914{ yyextra->accept (T_TSYMBOL, yytext); }
1915 YY_BREAK
1916case 38:
1917YY_RULE_SETUP
1918#line 237 "bitbakescanner.l"
1919{ yyextra->accept (T_FSYMBOL, yytext); }
1920 YY_BREAK
1921case 39:
1922YY_RULE_SETUP
1923#line 238 "bitbakescanner.l"
1924{ yyextra->accept (T_ISYMBOL, yytext); }
1925 YY_BREAK
1926case 40:
1927YY_RULE_SETUP
1928#line 239 "bitbakescanner.l"
1929{ BEGIN INITIAL;
1930 yyextra->accept (T_ISYMBOL, yytext); }
1931 YY_BREAK
1932case 41:
1933YY_RULE_SETUP
1934#line 241 "bitbakescanner.l"
1935{ BEGIN INITIAL;
1936 yyextra->accept (T_ISYMBOL, yytext); }
1937 YY_BREAK
1938case 42:
1939/* rule 42 can match eol */
1940YY_RULE_SETUP
1941#line 243 "bitbakescanner.l"
1942{ BEGIN INITIAL; }
1943 YY_BREAK
1944case 43:
1945/* rule 43 can match eol */
1946YY_RULE_SETUP
1947#line 244 "bitbakescanner.l"
1948{ BEGIN INITIAL; }
1949 YY_BREAK
1950case 44:
1951/* rule 44 can match eol */
1952YY_RULE_SETUP
1953#line 245 "bitbakescanner.l"
1954{ BEGIN INITIAL; }
1955 YY_BREAK
1956case 45:
1957/* rule 45 can match eol */
1958YY_RULE_SETUP
1959#line 247 "bitbakescanner.l"
1960/* Insignificant whitespace */
1961 YY_BREAK
1962case 46:
1963YY_RULE_SETUP
1964#line 249 "bitbakescanner.l"
1965{ ERROR (errorUnexpectedInput); }
1966 YY_BREAK
1967/* Check for premature termination */
1968case YY_STATE_EOF(INITIAL):
1969case YY_STATE_EOF(S_DEF):
1970case YY_STATE_EOF(S_DEF_ARGS):
1971case YY_STATE_EOF(S_DEF_BODY):
1972case YY_STATE_EOF(S_FUNC):
1973case YY_STATE_EOF(S_INCLUDE):
1974case YY_STATE_EOF(S_INHERIT):
1975case YY_STATE_EOF(S_REQUIRE):
1976case YY_STATE_EOF(S_PROC):
1977case YY_STATE_EOF(S_RVALUE):
1978case YY_STATE_EOF(S_TASK):
1979#line 252 "bitbakescanner.l"
1980{ return T_EOF; }
1981 YY_BREAK
1982case 47:
1983YY_RULE_SETUP
1984#line 254 "bitbakescanner.l"
1985ECHO;
1986 YY_BREAK
1987#line 1988 "<stdout>"
1988
1989 case YY_END_OF_BUFFER:
1990 {
1991 /* Amount of text matched not including the EOB char. */
1992 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1993
1994 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1995 *yy_cp = yyg->yy_hold_char;
1996 YY_RESTORE_YY_MORE_OFFSET
1997
1998 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1999 {
2000 /* We're scanning a new file or input source. It's
2001 * possible that this happened because the user
2002 * just pointed yyin at a new source and called
2003 * yylex(). If so, then we have to assure
2004 * consistency between YY_CURRENT_BUFFER and our
2005 * globals. Here is the right place to do so, because
2006 * this is the first action (other than possibly a
2007 * back-up) that will match for the new input source.
2008 */
2009 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2010 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2011 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2012 }
2013
2014 /* Note that here we test for yy_c_buf_p "<=" to the position
2015 * of the first EOB in the buffer, since yy_c_buf_p will
2016 * already have been incremented past the NUL character
2017 * (since all states make transitions on EOB to the
2018 * end-of-buffer state). Contrast this with the test
2019 * in input().
2020 */
2021 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2022 { /* This was really a NUL. */
2023 yy_state_type yy_next_state;
2024
2025 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2026
2027 yy_current_state = yy_get_previous_state( yyscanner );
2028
2029 /* Okay, we're now positioned to make the NUL
2030 * transition. We couldn't have
2031 * yy_get_previous_state() go ahead and do it
2032 * for us because it doesn't know how to deal
2033 * with the possibility of jamming (and we don't
2034 * want to build jamming into it because then it
2035 * will run more slowly).
2036 */
2037
2038 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2039
2040 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2041
2042 if ( yy_next_state )
2043 {
2044 /* Consume the NUL. */
2045 yy_cp = ++yyg->yy_c_buf_p;
2046 yy_current_state = yy_next_state;
2047 goto yy_match;
2048 }
2049
2050 else
2051 {
2052 yy_cp = yyg->yy_last_accepting_cpos;
2053 yy_current_state = yyg->yy_last_accepting_state;
2054 goto yy_find_action;
2055 }
2056 }
2057
2058 else switch ( yy_get_next_buffer( yyscanner ) )
2059 {
2060 case EOB_ACT_END_OF_FILE:
2061 {
2062 yyg->yy_did_buffer_switch_on_eof = 0;
2063
2064 if ( yywrap(yyscanner ) )
2065 {
2066 /* Note: because we've taken care in
2067 * yy_get_next_buffer() to have set up
2068 * yytext, we can now set up
2069 * yy_c_buf_p so that if some total
2070 * hoser (like flex itself) wants to
2071 * call the scanner after we return the
2072 * YY_NULL, it'll still work - another
2073 * YY_NULL will get returned.
2074 */
2075 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2076
2077 yy_act = YY_STATE_EOF(YY_START);
2078 goto do_action;
2079 }
2080
2081 else
2082 {
2083 if ( ! yyg->yy_did_buffer_switch_on_eof )
2084 YY_NEW_FILE;
2085 }
2086 break;
2087 }
2088
2089 case EOB_ACT_CONTINUE_SCAN:
2090 yyg->yy_c_buf_p =
2091 yyg->yytext_ptr + yy_amount_of_matched_text;
2092
2093 yy_current_state = yy_get_previous_state( yyscanner );
2094
2095 yy_cp = yyg->yy_c_buf_p;
2096 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2097 goto yy_match;
2098
2099 case EOB_ACT_LAST_MATCH:
2100 yyg->yy_c_buf_p =
2101 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2102
2103 yy_current_state = yy_get_previous_state( yyscanner );
2104
2105 yy_cp = yyg->yy_c_buf_p;
2106 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2107 goto yy_find_action;
2108 }
2109 break;
2110 }
2111
2112 default:
2113 YY_FATAL_ERROR(
2114 "fatal flex scanner internal error--no action found" );
2115 } /* end of action switch */
2116 } /* end of scanning one token */
2117} /* end of yylex */
2118
2119/* yy_get_next_buffer - try to read in a new buffer
2120 *
2121 * Returns a code representing an action:
2122 * EOB_ACT_LAST_MATCH -
2123 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2124 * EOB_ACT_END_OF_FILE - end of file
2125 */
2126static int yy_get_next_buffer (yyscan_t yyscanner)
2127{
2128 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2129 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2130 register char *source = yyg->yytext_ptr;
2131 register int number_to_move, i;
2132 int ret_val;
2133
2134 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2135 YY_FATAL_ERROR(
2136 "fatal flex scanner internal error--end of buffer missed" );
2137
2138 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2139 { /* Don't try to fill the buffer, so this is an EOF. */
2140 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2141 {
2142 /* We matched a single character, the EOB, so
2143 * treat this as a final EOF.
2144 */
2145 return EOB_ACT_END_OF_FILE;
2146 }
2147
2148 else
2149 {
2150 /* We matched some text prior to the EOB, first
2151 * process it.
2152 */
2153 return EOB_ACT_LAST_MATCH;
2154 }
2155 }
2156
2157 /* Try to read more data. */
2158
2159 /* First move last chars to start of buffer. */
2160 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
2161
2162 for ( i = 0; i < number_to_move; ++i )
2163 *(dest++) = *(source++);
2164
2165 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2166 /* don't do the read, it's not guaranteed to return an EOF,
2167 * just force an EOF
2168 */
2169 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2170
2171 else
2172 {
2173 int num_to_read =
2174 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2175
2176 while ( num_to_read <= 0 )
2177 { /* Not enough room in the buffer - grow it. */
2178
2179 /* just a shorter name for the current buffer */
2180 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2181
2182 int yy_c_buf_p_offset =
2183 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2184
2185 if ( b->yy_is_our_buffer )
2186 {
2187 int new_size = b->yy_buf_size * 2;
2188
2189 if ( new_size <= 0 )
2190 b->yy_buf_size += b->yy_buf_size / 8;
2191 else
2192 b->yy_buf_size *= 2;
2193
2194 b->yy_ch_buf = (char *)
2195 /* Include room in for 2 EOB chars. */
2196 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
2197 }
2198 else
2199 /* Can't grow it, we don't own it. */
2200 b->yy_ch_buf = 0;
2201
2202 if ( ! b->yy_ch_buf )
2203 YY_FATAL_ERROR(
2204 "fatal error - scanner input buffer overflow" );
2205
2206 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2207
2208 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2209 number_to_move - 1;
2210
2211 }
2212
2213 if ( num_to_read > YY_READ_BUF_SIZE )
2214 num_to_read = YY_READ_BUF_SIZE;
2215
2216 /* Read in more data. */
2217 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2218 yyg->yy_n_chars, num_to_read );
2219
2220 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2221 }
2222
2223 if ( yyg->yy_n_chars == 0 )
2224 {
2225 if ( number_to_move == YY_MORE_ADJ )
2226 {
2227 ret_val = EOB_ACT_END_OF_FILE;
2228 yyrestart(yyin ,yyscanner);
2229 }
2230
2231 else
2232 {
2233 ret_val = EOB_ACT_LAST_MATCH;
2234 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2235 YY_BUFFER_EOF_PENDING;
2236 }
2237 }
2238
2239 else
2240 ret_val = EOB_ACT_CONTINUE_SCAN;
2241
2242 yyg->yy_n_chars += number_to_move;
2243 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2244 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2245
2246 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2247
2248 return ret_val;
2249}
2250
2251/* yy_get_previous_state - get the state just before the EOB char was reached */
2252
2253 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
2254{
2255 register yy_state_type yy_current_state;
2256 register char *yy_cp;
2257 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2258
2259 yy_current_state = yyg->yy_start;
2260
2261 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2262 {
2263 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2264 if ( yy_accept[yy_current_state] )
2265 {
2266 yyg->yy_last_accepting_state = yy_current_state;
2267 yyg->yy_last_accepting_cpos = yy_cp;
2268 }
2269 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2270 {
2271 yy_current_state = (int) yy_def[yy_current_state];
2272 if ( yy_current_state >= 813 )
2273 yy_c = yy_meta[(unsigned int) yy_c];
2274 }
2275 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2276 }
2277
2278 return yy_current_state;
2279}
2280
2281/* yy_try_NUL_trans - try to make a transition on the NUL character
2282 *
2283 * synopsis
2284 * next_state = yy_try_NUL_trans( current_state );
2285 */
2286 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
2287{
2288 register int yy_is_jam;
2289 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2290 register char *yy_cp = yyg->yy_c_buf_p;
2291
2292 register YY_CHAR yy_c = 1;
2293 if ( yy_accept[yy_current_state] )
2294 {
2295 yyg->yy_last_accepting_state = yy_current_state;
2296 yyg->yy_last_accepting_cpos = yy_cp;
2297 }
2298 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2299 {
2300 yy_current_state = (int) yy_def[yy_current_state];
2301 if ( yy_current_state >= 813 )
2302 yy_c = yy_meta[(unsigned int) yy_c];
2303 }
2304 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2305 yy_is_jam = (yy_current_state == 812);
2306
2307 return yy_is_jam ? 0 : yy_current_state;
2308}
2309
2310 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
2311{
2312 register char *yy_cp;
2313 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2314
2315 yy_cp = yyg->yy_c_buf_p;
2316
2317 /* undo effects of setting up yytext */
2318 *yy_cp = yyg->yy_hold_char;
2319
2320 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2321 { /* need to shift things up to make room */
2322 /* +2 for EOB chars. */
2323 register int number_to_move = yyg->yy_n_chars + 2;
2324 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2325 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2326 register char *source =
2327 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2328
2329 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2330 *--dest = *--source;
2331
2332 yy_cp += (int) (dest - source);
2333 yy_bp += (int) (dest - source);
2334 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2335 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2336
2337 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2338 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2339 }
2340
2341 *--yy_cp = (char) c;
2342
2343 if ( c == '\n' ){
2344 --yylineno;
2345 }
2346
2347 yyg->yytext_ptr = yy_bp;
2348 yyg->yy_hold_char = *yy_cp;
2349 yyg->yy_c_buf_p = yy_cp;
2350}
2351
2352#ifndef YY_NO_INPUT
2353#ifdef __cplusplus
2354 static int yyinput (yyscan_t yyscanner)
2355#else
2356 static int input (yyscan_t yyscanner)
2357#endif
2358
2359{
2360 int c;
2361 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2362
2363 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2364
2365 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2366 {
2367 /* yy_c_buf_p now points to the character we want to return.
2368 * If this occurs *before* the EOB characters, then it's a
2369 * valid NUL; if not, then we've hit the end of the buffer.
2370 */
2371 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2372 /* This was really a NUL. */
2373 *yyg->yy_c_buf_p = '\0';
2374
2375 else
2376 { /* need more input */
2377 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
2378 ++yyg->yy_c_buf_p;
2379
2380 switch ( yy_get_next_buffer( yyscanner ) )
2381 {
2382 case EOB_ACT_LAST_MATCH:
2383 /* This happens because yy_g_n_b()
2384 * sees that we've accumulated a
2385 * token and flags that we need to
2386 * try matching the token before
2387 * proceeding. But for input(),
2388 * there's no matching to consider.
2389 * So convert the EOB_ACT_LAST_MATCH
2390 * to EOB_ACT_END_OF_FILE.
2391 */
2392
2393 /* Reset buffer status. */
2394 yyrestart(yyin ,yyscanner);
2395
2396 /*FALLTHROUGH*/
2397
2398 case EOB_ACT_END_OF_FILE:
2399 {
2400 if ( yywrap(yyscanner ) )
2401 return EOF;
2402
2403 if ( ! yyg->yy_did_buffer_switch_on_eof )
2404 YY_NEW_FILE;
2405#ifdef __cplusplus
2406 return yyinput(yyscanner);
2407#else
2408 return input(yyscanner);
2409#endif
2410 }
2411
2412 case EOB_ACT_CONTINUE_SCAN:
2413 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2414 break;
2415 }
2416 }
2417 }
2418
2419 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2420 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2421 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2422
2423 if ( c == '\n' )
2424
2425 do{ yylineno++;
2426 yycolumn=0;
2427 }while(0)
2428;
2429
2430 return c;
2431}
2432#endif /* ifndef YY_NO_INPUT */
2433
2434/** Immediately switch to a different input stream.
2435 * @param input_file A readable stream.
2436 * @param yyscanner The scanner object.
2437 * @note This function does not reset the start condition to @c INITIAL .
2438 */
2439 void yyrestart (FILE * input_file , yyscan_t yyscanner)
2440{
2441 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2442
2443 if ( ! YY_CURRENT_BUFFER ){
2444 yyensure_buffer_stack (yyscanner);
2445 YY_CURRENT_BUFFER_LVALUE =
2446 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
2447 }
2448
2449 yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2450 yy_load_buffer_state(yyscanner );
2451}
2452
2453/** Switch to a different input buffer.
2454 * @param new_buffer The new input buffer.
2455 * @param yyscanner The scanner object.
2456 */
2457 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2458{
2459 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2460
2461 /* TODO. We should be able to replace this entire function body
2462 * with
2463 * yypop_buffer_state();
2464 * yypush_buffer_state(new_buffer);
2465 */
2466 yyensure_buffer_stack (yyscanner);
2467 if ( YY_CURRENT_BUFFER == new_buffer )
2468 return;
2469
2470 if ( YY_CURRENT_BUFFER )
2471 {
2472 /* Flush out information for old buffer. */
2473 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2474 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2475 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2476 }
2477
2478 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2479 yy_load_buffer_state(yyscanner );
2480
2481 /* We don't actually know whether we did this switch during
2482 * EOF (yywrap()) processing, but the only time this flag
2483 * is looked at is after yywrap() is called, so it's safe
2484 * to go ahead and always set it.
2485 */
2486 yyg->yy_did_buffer_switch_on_eof = 1;
2487}
2488
2489static void yy_load_buffer_state (yyscan_t yyscanner)
2490{
2491 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2492 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2493 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2494 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2495 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2496}
2497
2498/** Allocate and initialize an input buffer state.
2499 * @param file A readable stream.
2500 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2501 * @param yyscanner The scanner object.
2502 * @return the allocated buffer state.
2503 */
2504 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2505{
2506 YY_BUFFER_STATE b;
2507
2508 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2509 if ( ! b )
2510 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2511
2512 b->yy_buf_size = size;
2513
2514 /* yy_ch_buf has to be 2 characters longer than the size given because
2515 * we need to put in 2 end-of-buffer characters.
2516 */
2517 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner );
2518 if ( ! b->yy_ch_buf )
2519 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2520
2521 b->yy_is_our_buffer = 1;
2522
2523 yy_init_buffer(b,file ,yyscanner);
2524
2525 return b;
2526}
2527
2528/** Destroy the buffer.
2529 * @param b a buffer created with yy_create_buffer()
2530 * @param yyscanner The scanner object.
2531 */
2532 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2533{
2534 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2535
2536 if ( ! b )
2537 return;
2538
2539 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2540 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2541
2542 if ( b->yy_is_our_buffer )
2543 yyfree((void *) b->yy_ch_buf ,yyscanner );
2544
2545 yyfree((void *) b ,yyscanner );
2546}
2547
2548/* Initializes or reinitializes a buffer.
2549 * This function is sometimes called more than once on the same buffer,
2550 * such as during a yyrestart() or at EOF.
2551 */
2552 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2553
2554{
2555 int oerrno = errno;
2556 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2557
2558 yy_flush_buffer(b ,yyscanner);
2559
2560 b->yy_input_file = file;
2561 b->yy_fill_buffer = 1;
2562
2563 /* If b is the current buffer, then yy_init_buffer was _probably_
2564 * called from yyrestart() or through yy_get_next_buffer.
2565 * In that case, we don't want to reset the lineno or column.
2566 */
2567 if (b != YY_CURRENT_BUFFER){
2568 b->yy_bs_lineno = 1;
2569 b->yy_bs_column = 0;
2570 }
2571
2572 b->yy_is_interactive = 0;
2573
2574 errno = oerrno;
2575}
2576
2577/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2578 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2579 * @param yyscanner The scanner object.
2580 */
2581 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2582{
2583 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2584 if ( ! b )
2585 return;
2586
2587 b->yy_n_chars = 0;
2588
2589 /* We always need two end-of-buffer characters. The first causes
2590 * a transition to the end-of-buffer state. The second causes
2591 * a jam in that state.
2592 */
2593 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2594 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2595
2596 b->yy_buf_pos = &b->yy_ch_buf[0];
2597
2598 b->yy_at_bol = 1;
2599 b->yy_buffer_status = YY_BUFFER_NEW;
2600
2601 if ( b == YY_CURRENT_BUFFER )
2602 yy_load_buffer_state(yyscanner );
2603}
2604
2605/** Pushes the new state onto the stack. The new state becomes
2606 * the current state. This function will allocate the stack
2607 * if necessary.
2608 * @param new_buffer The new state.
2609 * @param yyscanner The scanner object.
2610 */
2611void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2612{
2613 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2614 if (new_buffer == NULL)
2615 return;
2616
2617 yyensure_buffer_stack(yyscanner);
2618
2619 /* This block is copied from yy_switch_to_buffer. */
2620 if ( YY_CURRENT_BUFFER )
2621 {
2622 /* Flush out information for old buffer. */
2623 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2624 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2625 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2626 }
2627
2628 /* Only push if top exists. Otherwise, replace top. */
2629 if (YY_CURRENT_BUFFER)
2630 yyg->yy_buffer_stack_top++;
2631 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2632
2633 /* copied from yy_switch_to_buffer. */
2634 yy_load_buffer_state(yyscanner );
2635 yyg->yy_did_buffer_switch_on_eof = 1;
2636}
2637
2638/** Removes and deletes the top of the stack, if present.
2639 * The next element becomes the new top.
2640 * @param yyscanner The scanner object.
2641 */
2642void yypop_buffer_state (yyscan_t yyscanner)
2643{
2644 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2645 if (!YY_CURRENT_BUFFER)
2646 return;
2647
2648 yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2649 YY_CURRENT_BUFFER_LVALUE = NULL;
2650 if (yyg->yy_buffer_stack_top > 0)
2651 --yyg->yy_buffer_stack_top;
2652
2653 if (YY_CURRENT_BUFFER) {
2654 yy_load_buffer_state(yyscanner );
2655 yyg->yy_did_buffer_switch_on_eof = 1;
2656 }
2657}
2658
2659/* Allocates the stack if it does not exist.
2660 * Guarantees space for at least one push.
2661 */
2662static void yyensure_buffer_stack (yyscan_t yyscanner)
2663{
2664 int num_to_alloc;
2665 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2666
2667 if (!yyg->yy_buffer_stack) {
2668
2669 /* First allocation is just for 2 elements, since we don't know if this
2670 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2671 * immediate realloc on the next call.
2672 */
2673 num_to_alloc = 1;
2674 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2675 (num_to_alloc * sizeof(struct yy_buffer_state*)
2676 , yyscanner);
2677
2678 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2679
2680 yyg->yy_buffer_stack_max = num_to_alloc;
2681 yyg->yy_buffer_stack_top = 0;
2682 return;
2683 }
2684
2685 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2686
2687 /* Increase the buffer to prepare for a possible push. */
2688 int grow_size = 8 /* arbitrary grow size */;
2689
2690 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2691 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2692 (yyg->yy_buffer_stack,
2693 num_to_alloc * sizeof(struct yy_buffer_state*)
2694 , yyscanner);
2695
2696 /* zero only the new slots.*/
2697 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2698 yyg->yy_buffer_stack_max = num_to_alloc;
2699 }
2700}
2701
2702/** Setup the input buffer state to scan directly from a user-specified character buffer.
2703 * @param base the character buffer
2704 * @param size the size in bytes of the character buffer
2705 * @param yyscanner The scanner object.
2706 * @return the newly allocated buffer state object.
2707 */
2708YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2709{
2710 YY_BUFFER_STATE b;
2711
2712 if ( size < 2 ||
2713 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2714 base[size-1] != YY_END_OF_BUFFER_CHAR )
2715 /* They forgot to leave room for the EOB's. */
2716 return 0;
2717
2718 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2719 if ( ! b )
2720 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2721
2722 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2723 b->yy_buf_pos = b->yy_ch_buf = base;
2724 b->yy_is_our_buffer = 0;
2725 b->yy_input_file = 0;
2726 b->yy_n_chars = b->yy_buf_size;
2727 b->yy_is_interactive = 0;
2728 b->yy_at_bol = 1;
2729 b->yy_fill_buffer = 0;
2730 b->yy_buffer_status = YY_BUFFER_NEW;
2731
2732 yy_switch_to_buffer(b ,yyscanner );
2733
2734 return b;
2735}
2736
2737/** Setup the input buffer state to scan a string. The next call to yylex() will
2738 * scan from a @e copy of @a str.
2739 * @param str a NUL-terminated string to scan
2740 * @param yyscanner The scanner object.
2741 * @return the newly allocated buffer state object.
2742 * @note If you want to scan bytes that may contain NUL values, then use
2743 * yy_scan_bytes() instead.
2744 */
2745YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
2746{
2747
2748 return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
2749}
2750
2751/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2752 * scan from a @e copy of @a bytes.
2753 * @param bytes the byte buffer to scan
2754 * @param len the number of bytes in the buffer pointed to by @a bytes.
2755 * @param yyscanner The scanner object.
2756 * @return the newly allocated buffer state object.
2757 */
2758YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2759{
2760 YY_BUFFER_STATE b;
2761 char *buf;
2762 yy_size_t n;
2763 int i;
2764
2765 /* Get memory for full buffer, including space for trailing EOB's. */
2766 n = _yybytes_len + 2;
2767 buf = (char *) yyalloc(n ,yyscanner );
2768 if ( ! buf )
2769 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2770
2771 for ( i = 0; i < _yybytes_len; ++i )
2772 buf[i] = yybytes[i];
2773
2774 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2775
2776 b = yy_scan_buffer(buf,n ,yyscanner);
2777 if ( ! b )
2778 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2779
2780 /* It's okay to grow etc. this buffer, and we should throw it
2781 * away when we're done.
2782 */
2783 b->yy_is_our_buffer = 1;
2784
2785 return b;
2786}
2787
2788 static void yy_push_state (int new_state , yyscan_t yyscanner)
2789{
2790 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2791 if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
2792 {
2793 yy_size_t new_size;
2794
2795 yyg->yy_start_stack_depth += YY_START_STACK_INCR;
2796 new_size = yyg->yy_start_stack_depth * sizeof( int );
2797
2798 if ( ! yyg->yy_start_stack )
2799 yyg->yy_start_stack = (int *) yyalloc(new_size ,yyscanner );
2800
2801 else
2802 yyg->yy_start_stack = (int *) yyrealloc((void *) yyg->yy_start_stack,new_size ,yyscanner );
2803
2804 if ( ! yyg->yy_start_stack )
2805 YY_FATAL_ERROR(
2806 "out of memory expanding start-condition stack" );
2807 }
2808
2809 yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
2810
2811 BEGIN(new_state);
2812}
2813
2814 static void yy_pop_state (yyscan_t yyscanner)
2815{
2816 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2817 if ( --yyg->yy_start_stack_ptr < 0 )
2818 YY_FATAL_ERROR( "start-condition stack underflow" );
2819
2820 BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]);
2821}
2822
2823 static int yy_top_state (yyscan_t yyscanner)
2824{
2825 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2826 return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1];
2827}
2828
2829#ifndef YY_EXIT_FAILURE
2830#define YY_EXIT_FAILURE 2
2831#endif
2832
2833static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
2834{
2835 (void) fprintf( stderr, "%s\n", msg );
2836 exit( YY_EXIT_FAILURE );
2837}
2838
2839/* Redefine yyless() so it works in section 3 code. */
2840
2841#undef yyless
2842#define yyless(n) \
2843 do \
2844 { \
2845 /* Undo effects of setting up yytext. */ \
2846 int yyless_macro_arg = (n); \
2847 YY_LESS_LINENO(yyless_macro_arg);\
2848 yytext[yyleng] = yyg->yy_hold_char; \
2849 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2850 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2851 *yyg->yy_c_buf_p = '\0'; \
2852 yyleng = yyless_macro_arg; \
2853 } \
2854 while ( 0 )
2855
2856/* Accessor methods (get/set functions) to struct members. */
2857
2858/** Get the user-defined data for this scanner.
2859 * @param yyscanner The scanner object.
2860 */
2861YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
2862{
2863 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2864 return yyextra;
2865}
2866
2867/** Get the current line number.
2868 * @param yyscanner The scanner object.
2869 */
2870int yyget_lineno (yyscan_t yyscanner)
2871{
2872 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2873
2874 if (! YY_CURRENT_BUFFER)
2875 return 0;
2876
2877 return yylineno;
2878}
2879
2880/** Get the current column number.
2881 * @param yyscanner The scanner object.
2882 */
2883int yyget_column (yyscan_t yyscanner)
2884{
2885 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2886
2887 if (! YY_CURRENT_BUFFER)
2888 return 0;
2889
2890 return yycolumn;
2891}
2892
2893/** Get the input stream.
2894 * @param yyscanner The scanner object.
2895 */
2896FILE *yyget_in (yyscan_t yyscanner)
2897{
2898 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2899 return yyin;
2900}
2901
2902/** Get the output stream.
2903 * @param yyscanner The scanner object.
2904 */
2905FILE *yyget_out (yyscan_t yyscanner)
2906{
2907 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2908 return yyout;
2909}
2910
2911/** Get the length of the current token.
2912 * @param yyscanner The scanner object.
2913 */
2914int yyget_leng (yyscan_t yyscanner)
2915{
2916 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2917 return yyleng;
2918}
2919
2920/** Get the current token.
2921 * @param yyscanner The scanner object.
2922 */
2923
2924char *yyget_text (yyscan_t yyscanner)
2925{
2926 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2927 return yytext;
2928}
2929
2930/** Set the user-defined data. This data is never touched by the scanner.
2931 * @param user_defined The data to be associated with this scanner.
2932 * @param yyscanner The scanner object.
2933 */
2934void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2935{
2936 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2937 yyextra = user_defined ;
2938}
2939
2940/** Set the current line number.
2941 * @param line_number
2942 * @param yyscanner The scanner object.
2943 */
2944void yyset_lineno (int line_number , yyscan_t yyscanner)
2945{
2946 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2947
2948 /* lineno is only valid if an input buffer exists. */
2949 if (! YY_CURRENT_BUFFER )
2950 yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner);
2951
2952 yylineno = line_number;
2953}
2954
2955/** Set the current column.
2956 * @param line_number
2957 * @param yyscanner The scanner object.
2958 */
2959void yyset_column (int column_no , yyscan_t yyscanner)
2960{
2961 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2962
2963 /* column is only valid if an input buffer exists. */
2964 if (! YY_CURRENT_BUFFER )
2965 yy_fatal_error( "yyset_column called with no buffer" , yyscanner);
2966
2967 yycolumn = column_no;
2968}
2969
2970/** Set the input stream. This does not discard the current
2971 * input buffer.
2972 * @param in_str A readable stream.
2973 * @param yyscanner The scanner object.
2974 * @see yy_switch_to_buffer
2975 */
2976void yyset_in (FILE * in_str , yyscan_t yyscanner)
2977{
2978 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2979 yyin = in_str ;
2980}
2981
2982void yyset_out (FILE * out_str , yyscan_t yyscanner)
2983{
2984 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2985 yyout = out_str ;
2986}
2987
2988int yyget_debug (yyscan_t yyscanner)
2989{
2990 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2991 return yy_flex_debug;
2992}
2993
2994void yyset_debug (int bdebug , yyscan_t yyscanner)
2995{
2996 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2997 yy_flex_debug = bdebug ;
2998}
2999
3000/* Accessor methods for yylval and yylloc */
3001
3002/* User-visible API */
3003
3004/* yylex_init is special because it creates the scanner itself, so it is
3005 * the ONLY reentrant function that doesn't take the scanner as the last argument.
3006 * That's why we explicitly handle the declaration, instead of using our macros.
3007 */
3008
3009int yylex_init(yyscan_t* ptr_yy_globals)
3010
3011{
3012 if (ptr_yy_globals == NULL){
3013 errno = EINVAL;
3014 return 1;
3015 }
3016
3017 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
3018
3019 if (*ptr_yy_globals == NULL){
3020 errno = ENOMEM;
3021 return 1;
3022 }
3023
3024 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3025 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3026
3027 return yy_init_globals ( *ptr_yy_globals );
3028}
3029
3030static int yy_init_globals (yyscan_t yyscanner)
3031{
3032 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3033 /* Initialization is the same as for the non-reentrant scanner.
3034 * This function is called from yylex_destroy(), so don't allocate here.
3035 */
3036
3037 yyg->yy_buffer_stack = 0;
3038 yyg->yy_buffer_stack_top = 0;
3039 yyg->yy_buffer_stack_max = 0;
3040 yyg->yy_c_buf_p = (char *) 0;
3041 yyg->yy_init = 0;
3042 yyg->yy_start = 0;
3043
3044 yyg->yy_start_stack_ptr = 0;
3045 yyg->yy_start_stack_depth = 0;
3046 yyg->yy_start_stack = NULL;
3047
3048/* Defined in main.c */
3049#ifdef YY_STDINIT
3050 yyin = stdin;
3051 yyout = stdout;
3052#else
3053 yyin = (FILE *) 0;
3054 yyout = (FILE *) 0;
3055#endif
3056
3057 /* For future reference: Set errno on error, since we are called by
3058 * yylex_init()
3059 */
3060 return 0;
3061}
3062
3063/* yylex_destroy is for both reentrant and non-reentrant scanners. */
3064int yylex_destroy (yyscan_t yyscanner)
3065{
3066 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3067
3068 /* Pop the buffer stack, destroying each element. */
3069 while(YY_CURRENT_BUFFER){
3070 yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
3071 YY_CURRENT_BUFFER_LVALUE = NULL;
3072 yypop_buffer_state(yyscanner);
3073 }
3074
3075 /* Destroy the stack itself. */
3076 yyfree(yyg->yy_buffer_stack ,yyscanner);
3077 yyg->yy_buffer_stack = NULL;
3078
3079 /* Destroy the start condition stack. */
3080 yyfree(yyg->yy_start_stack ,yyscanner );
3081 yyg->yy_start_stack = NULL;
3082
3083 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3084 * yylex() is called, initialization will occur. */
3085 yy_init_globals( yyscanner);
3086
3087 /* Destroy the main struct (reentrant only). */
3088 yyfree ( yyscanner , yyscanner );
3089 yyscanner = NULL;
3090 return 0;
3091}
3092
3093/*
3094 * Internal utility routines.
3095 */
3096
3097#ifndef yytext_ptr
3098static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
3099{
3100 register int i;
3101 for ( i = 0; i < n; ++i )
3102 s1[i] = s2[i];
3103}
3104#endif
3105
3106#ifdef YY_NEED_STRLEN
3107static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
3108{
3109 register int n;
3110 for ( n = 0; s[n]; ++n )
3111 ;
3112
3113 return n;
3114}
3115#endif
3116
3117void *yyalloc (yy_size_t size , yyscan_t yyscanner)
3118{
3119 return (void *) malloc( size );
3120}
3121
3122void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
3123{
3124 /* The cast to (char *) in the following accommodates both
3125 * implementations that use char* generic pointers, and those
3126 * that use void* generic pointers. It works with the latter
3127 * because both ANSI C and C++ allow castless assignment from
3128 * any pointer type to void*, and deal with argument conversions
3129 * as though doing an assignment.
3130 */
3131 return (void *) realloc( (char *) ptr, size );
3132}
3133
3134void yyfree (void * ptr , yyscan_t yyscanner)
3135{
3136 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3137}
3138
3139#define YYTABLES_NAME "yytables"
3140
3141#line 254 "bitbakescanner.l"
3142
3143
3144
3145void lex_t::accept (int token, const char* sz)
3146{
3147 token_t t;
3148 memset (&t, 0, sizeof (t));
3149 t.copyString(sz);
3150
3151 /* tell lemon to parse the token */
3152 parse (parser, token, t, this);
3153}
3154
3155void lex_t::input (char *buf, int *result, int max_size)
3156{
3157 /* printf("lex_t::input %p %d\n", buf, max_size); */
3158 *result = fread(buf, 1, max_size, file);
3159 /* printf("lex_t::input result %d\n", *result); */
3160}
3161
3162int lex_t::line ()const
3163{
3164 /* printf("lex_t::line\n"); */
3165 return yyget_lineno (scanner);
3166}
3167
3168
3169extern "C" {
3170
3171 void parse (FILE* file, char* name, PyObject* data, int config)
3172 {
3173 /* printf("parse bbparseAlloc\n"); */
3174 void* parser = bbparseAlloc (malloc);
3175 yyscan_t scanner;
3176 lex_t lex;
3177
3178 /* printf("parse yylex_init\n"); */
3179 yylex_init (&scanner);
3180
3181 lex.parser = parser;
3182 lex.scanner = scanner;
3183 lex.file = file;
3184 lex.name = name;
3185 lex.data = data;
3186 lex.config = config;
3187 lex.parse = bbparse;
3188 /*printf("parse yyset_extra\n"); */
3189 yyset_extra (&lex, scanner);
3190
3191 /* printf("parse yylex\n"); */
3192 int result = yylex (scanner);
3193
3194 /* printf("parse result %d\n", result); */
3195
3196 lex.accept (0);
3197 /* printf("parse lex.accept\n"); */
3198 bbparseTrace (NULL, NULL);
3199 /* printf("parse bbparseTrace\n"); */
3200
3201 if (result != T_EOF)
3202 printf ("premature end of file\n");
3203
3204 yylex_destroy (scanner);
3205 bbparseFree (parser, free);
3206 }
3207
3208}
3209
diff --git a/bitbake/lib/bb/parse/parse_c/bitbakescanner.l b/bitbake/lib/bb/parse/parse_c/bitbakescanner.l
deleted file mode 100644
index b6592f28e9..0000000000
--- a/bitbake/lib/bb/parse/parse_c/bitbakescanner.l
+++ /dev/null
@@ -1,319 +0,0 @@
1/* bbf.flex
2
3 written by Marc Singer
4 6 January 2005
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 USA.
20
21 DESCRIPTION
22 -----------
23
24 flex lexer specification for a BitBake input file parser.
25
26 Unfortunately, flex doesn't welcome comments within the rule sets.
27 I say unfortunately because this lexer is unreasonably complex and
28 comments would make the code much easier to comprehend.
29
30 The BitBake grammar is not regular. In order to interpret all
31 of the available input files, the lexer maintains much state as it
32 parses. There are places where this lexer will emit tokens that
33 are invalid. The parser will tend to catch these.
34
35 The lexer requires C++ at the moment. The only reason for this has
36 to do with a very small amount of managed state. Producing a C
37 lexer should be a reasonably easy task as long as the %reentrant
38 option is used.
39
40
41 NOTES
42 -----
43
44 o RVALUES. There are three kinds of RVALUES. There are unquoted
45 values, double quote enclosed strings, and single quote
46 strings. Quoted strings may contain unescaped quotes (of either
47 type), *and* any type may span more than one line by using a
48 continuation '\' at the end of the line. This requires us to
49 recognize all types of values with a single expression.
50 Moreover, the only reason to quote a value is to include
51 trailing or leading whitespace. Whitespace within a value is
52 preserved, ugh.
53
54 o CLASSES. C_ patterns define classes. Classes ought not include
55 a repitition operator, instead letting the reference to the class
56 define the repitition count.
57
58 C_SS - symbol start
59 C_SB - symbol body
60 C_SP - whitespace
61
62*/
63
64%option never-interactive
65%option yylineno
66%option noyywrap
67%option reentrant stack
68
69
70%{
71
72#include "token.h"
73#include "lexer.h"
74#include "bitbakeparser.h"
75#include <ctype.h>
76
77extern void *bbparseAlloc(void *(*mallocProc)(size_t));
78extern void bbparseFree(void *p, void (*freeProc)(void*));
79extern void *bbparseAlloc(void *(*mallocProc)(size_t));
80extern void *bbparse(void*, int, token_t, lex_t*);
81extern void bbparseTrace(FILE *TraceFILE, char *zTracePrompt);
82
83//static const char* rgbInput;
84//static size_t cbInput;
85
86extern "C" {
87
88int lineError;
89int errorParse;
90
91enum {
92 errorNone = 0,
93 errorUnexpectedInput,
94 errorUnsupportedFeature,
95};
96
97}
98
99#define YY_EXTRA_TYPE lex_t*
100
101 /* Read from buffer */
102#define YY_INPUT(buf,result,max_size) \
103 { yyextra->input(buf, &result, max_size); }
104
105//#define YY_DECL static size_t yylex ()
106
107#define ERROR(e) \
108 do { lineError = yylineno; errorParse = e; yyterminate (); } while (0)
109
110static const char* fixup_escapes (const char* sz);
111
112%}
113
114
115C_SP [ \t]
116COMMENT #.*\n
117OP_ASSIGN "="
118OP_PREDOT ".="
119OP_POSTDOT "=."
120OP_IMMEDIATE ":="
121OP_PREPEND "=+"
122OP_APPEND "+="
123OP_COND "?="
124B_OPEN "{"
125B_CLOSE "}"
126
127K_ADDTASK "addtask"
128K_ADDHANDLER "addhandler"
129K_AFTER "after"
130K_BEFORE "before"
131K_DEF "def"
132K_INCLUDE "include"
133K_REQUIRE "require"
134K_INHERIT "inherit"
135K_PYTHON "python"
136K_FAKEROOT "fakeroot"
137K_EXPORT "export"
138K_EXPORT_FUNC "EXPORT_FUNCTIONS"
139
140STRING \"([^\n\r]|"\\\n")*\"
141SSTRING \'([^\n\r]|"\\\n")*\'
142VALUE ([^'" \t\n])|([^'" \t\n]([^\n]|(\\\n))*[^'" \t\n])
143
144C_SS [a-zA-Z_]
145C_SB [a-zA-Z0-9_+-./]
146REF $\{{C_SS}{C_SB}*\}
147SYMBOL {C_SS}{C_SB}*
148VARIABLE $?{C_SS}({C_SB}*|{REF})*(\[[a-zA-Z0-9_]*\])?
149FILENAME ([a-zA-Z_./]|{REF})(([-+a-zA-Z0-9_./]*)|{REF})*
150
151PROC \({C_SP}*\)
152
153%s S_DEF
154%s S_DEF_ARGS
155%s S_DEF_BODY
156%s S_FUNC
157%s S_INCLUDE
158%s S_INHERIT
159%s S_REQUIRE
160%s S_PROC
161%s S_RVALUE
162%s S_TASK
163
164%%
165
166{OP_APPEND} { BEGIN S_RVALUE;
167 yyextra->accept (T_OP_APPEND); }
168{OP_PREPEND} { BEGIN S_RVALUE;
169 yyextra->accept (T_OP_PREPEND); }
170{OP_IMMEDIATE} { BEGIN S_RVALUE;
171 yyextra->accept (T_OP_IMMEDIATE); }
172{OP_ASSIGN} { BEGIN S_RVALUE;
173 yyextra->accept (T_OP_ASSIGN); }
174{OP_PREDOT} { BEGIN S_RVALUE;
175 yyextra->accept (T_OP_PREDOT); }
176{OP_POSTDOT} { BEGIN S_RVALUE;
177 yyextra->accept (T_OP_POSTDOT); }
178{OP_COND} { BEGIN S_RVALUE;
179 yyextra->accept (T_OP_COND); }
180
181<S_RVALUE>\\\n{C_SP}* { }
182<S_RVALUE>{STRING} { BEGIN INITIAL;
183 size_t cb = yyleng;
184 while (cb && isspace (yytext[cb - 1]))
185 --cb;
186 yytext[cb - 1] = 0;
187 yyextra->accept (T_STRING, yytext + 1); }
188<S_RVALUE>{SSTRING} { BEGIN INITIAL;
189 size_t cb = yyleng;
190 while (cb && isspace (yytext[cb - 1]))
191 --cb;
192 yytext[cb - 1] = 0;
193 yyextra->accept (T_STRING, yytext + 1); }
194
195<S_RVALUE>{VALUE} { ERROR (errorUnexpectedInput); }
196<S_RVALUE>{C_SP}*\n+ { BEGIN INITIAL;
197 yyextra->accept (T_STRING, NULL); }
198
199{K_INCLUDE} { BEGIN S_INCLUDE;
200 yyextra->accept (T_INCLUDE); }
201{K_REQUIRE} { BEGIN S_REQUIRE;
202 yyextra->accept (T_REQUIRE); }
203{K_INHERIT} { BEGIN S_INHERIT;
204 yyextra->accept (T_INHERIT); }
205{K_ADDTASK} { BEGIN S_TASK;
206 yyextra->accept (T_ADDTASK); }
207{K_ADDHANDLER} { yyextra->accept (T_ADDHANDLER); }
208{K_EXPORT_FUNC} { BEGIN S_FUNC;
209 yyextra->accept (T_EXPORT_FUNC); }
210<S_TASK>{K_BEFORE} { yyextra->accept (T_BEFORE); }
211<S_TASK>{K_AFTER} { yyextra->accept (T_AFTER); }
212<INITIAL>{K_EXPORT} { yyextra->accept (T_EXPORT); }
213
214<INITIAL>{K_FAKEROOT} { yyextra->accept (T_FAKEROOT); }
215<INITIAL>{K_PYTHON} { yyextra->accept (T_PYTHON); }
216{PROC}{C_SP}*{B_OPEN}{C_SP}*\n* { BEGIN S_PROC;
217 yyextra->accept (T_PROC_OPEN); }
218<S_PROC>{B_CLOSE}{C_SP}*\n* { BEGIN INITIAL;
219 yyextra->accept (T_PROC_CLOSE); }
220<S_PROC>([^}][^\n]*)?\n* { yyextra->accept (T_PROC_BODY, yytext); }
221
222{K_DEF} { BEGIN S_DEF; }
223<S_DEF>{SYMBOL} { BEGIN S_DEF_ARGS;
224 yyextra->accept (T_SYMBOL, yytext); }
225<S_DEF_ARGS>[^\n:]*: { yyextra->accept (T_DEF_ARGS, yytext); }
226<S_DEF_ARGS>{C_SP}*\n { BEGIN S_DEF_BODY; }
227<S_DEF_BODY>{C_SP}+[^\n]*\n { yyextra->accept (T_DEF_BODY, yytext); }
228<S_DEF_BODY>\n { yyextra->accept (T_DEF_BODY, yytext); }
229<S_DEF_BODY>. { BEGIN INITIAL; unput (yytext[0]); }
230
231{COMMENT} { }
232
233<INITIAL>{SYMBOL} { yyextra->accept (T_SYMBOL, yytext); }
234<INITIAL>{VARIABLE} { yyextra->accept (T_VARIABLE, yytext); }
235
236<S_TASK>{SYMBOL} { yyextra->accept (T_TSYMBOL, yytext); }
237<S_FUNC>{SYMBOL} { yyextra->accept (T_FSYMBOL, yytext); }
238<S_INHERIT>{SYMBOL} { yyextra->accept (T_ISYMBOL, yytext); }
239<S_INCLUDE>{FILENAME} { BEGIN INITIAL;
240 yyextra->accept (T_ISYMBOL, yytext); }
241<S_REQUIRE>{FILENAME} { BEGIN INITIAL;
242 yyextra->accept (T_ISYMBOL, yytext); }
243<S_TASK>\n { BEGIN INITIAL; }
244<S_FUNC>\n { BEGIN INITIAL; }
245<S_INHERIT>\n { BEGIN INITIAL; }
246
247[ \t\r\n] /* Insignificant whitespace */
248
249. { ERROR (errorUnexpectedInput); }
250
251 /* Check for premature termination */
252<<EOF>> { return T_EOF; }
253
254%%
255
256void lex_t::accept (int token, const char* sz)
257{
258 token_t t;
259 memset (&t, 0, sizeof (t));
260 t.copyString(sz);
261
262 /* tell lemon to parse the token */
263 parse (parser, token, t, this);
264}
265
266void lex_t::input (char *buf, int *result, int max_size)
267{
268 /* printf("lex_t::input %p %d\n", buf, max_size); */
269 *result = fread(buf, 1, max_size, file);
270 /* printf("lex_t::input result %d\n", *result); */
271}
272
273int lex_t::line ()const
274{
275 /* printf("lex_t::line\n"); */
276 return yyget_lineno (scanner);
277}
278
279
280extern "C" {
281
282 void parse (FILE* file, char* name, PyObject* data, int config)
283 {
284 /* printf("parse bbparseAlloc\n"); */
285 void* parser = bbparseAlloc (malloc);
286 yyscan_t scanner;
287 lex_t lex;
288
289 /* printf("parse yylex_init\n"); */
290 yylex_init (&scanner);
291
292 lex.parser = parser;
293 lex.scanner = scanner;
294 lex.file = file;
295 lex.name = name;
296 lex.data = data;
297 lex.config = config;
298 lex.parse = bbparse;
299 /*printf("parse yyset_extra\n"); */
300 yyset_extra (&lex, scanner);
301
302 /* printf("parse yylex\n"); */
303 int result = yylex (scanner);
304
305 /* printf("parse result %d\n", result); */
306
307 lex.accept (0);
308 /* printf("parse lex.accept\n"); */
309 bbparseTrace (NULL, NULL);
310 /* printf("parse bbparseTrace\n"); */
311
312 if (result != T_EOF)
313 printf ("premature end of file\n");
314
315 yylex_destroy (scanner);
316 bbparseFree (parser, free);
317 }
318
319}
diff --git a/bitbake/lib/bb/parse/parse_c/lexer.h b/bitbake/lib/bb/parse/parse_c/lexer.h
deleted file mode 100644
index cb32be7037..0000000000
--- a/bitbake/lib/bb/parse/parse_c/lexer.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2Copyright (C) 2005 Holger Hans Peter Freyther
3
4Permission is hereby granted, free of charge, to any person obtaining a copy
5of this software and associated documentation files (the "Software"), to deal
6in the Software without restriction, including without limitation the rights
7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the Software is
9furnished to do so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in all
12copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
17SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
20THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22*/
23
24#ifndef LEXER_H
25#define LEXER_H
26
27#include "Python.h"
28
29extern "C" {
30
31struct lex_t {
32 void* parser;
33 void* scanner;
34 FILE* file;
35 char *name;
36 PyObject *data;
37 int config;
38
39 void* (*parse)(void*, int, token_t, lex_t*);
40
41 void accept(int token, const char* sz = NULL);
42 void input(char *buf, int *result, int max_size);
43 int line()const;
44};
45
46}
47
48#endif
diff --git a/bitbake/lib/bb/parse/parse_c/lexerc.h b/bitbake/lib/bb/parse/parse_c/lexerc.h
deleted file mode 100644
index c8a19fb222..0000000000
--- a/bitbake/lib/bb/parse/parse_c/lexerc.h
+++ /dev/null
@@ -1,19 +0,0 @@
1
2#ifndef LEXERC_H
3#define LEXERC_H
4
5#include <stdio.h>
6
7extern int lineError;
8extern int errorParse;
9
10typedef struct {
11 void *parser;
12 void *scanner;
13 FILE *file;
14 char *name;
15 PyObject *data;
16 int config;
17} lex_t;
18
19#endif
diff --git a/bitbake/lib/bb/parse/parse_c/python_output.h b/bitbake/lib/bb/parse/parse_c/python_output.h
deleted file mode 100644
index bf34527c0a..0000000000
--- a/bitbake/lib/bb/parse/parse_c/python_output.h
+++ /dev/null
@@ -1,56 +0,0 @@
1#ifndef PYTHON_OUTPUT_H
2#define PYTHON_OUTPUT_H
3/*
4Copyright (C) 2006 Holger Hans Peter Freyther
5
6Permission is hereby granted, free of charge, to any person obtaining a copy
7of this software and associated documentation files (the "Software"), to deal
8in the Software without restriction, including without limitation the rights
9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice shall be included in all
14copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
19SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
22THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
24This is the glue:
25 It will be called from the lemon grammar and will call into
26 python to set certain things.
27
28*/
29
30extern "C" {
31
32struct lex_t;
33
34extern void e_assign(lex_t*, const char*, const char*);
35extern void e_export(lex_t*, const char*);
36extern void e_immediate(lex_t*, const char*, const char*);
37extern void e_cond(lex_t*, const char*, const char*);
38extern void e_prepend(lex_t*, const char*, const char*);
39extern void e_append(lex_t*, const char*, const char*);
40extern void e_precat(lex_t*, const char*, const char*);
41extern void e_postcat(lex_t*, const char*, const char*);
42
43extern void e_addtask(lex_t*, const char*, const char*, const char*);
44extern void e_addhandler(lex_t*,const char*);
45extern void e_export_func(lex_t*, const char*);
46extern void e_inherit(lex_t*, const char*);
47extern void e_include(lex_t*, const char*);
48extern void e_require(lex_t*, const char*);
49extern void e_proc(lex_t*, const char*, const char*);
50extern void e_proc_python(lex_t*, const char*, const char*);
51extern void e_proc_fakeroot(lex_t*, const char*, const char*);
52extern void e_def(lex_t*, const char*, const char*, const char*);
53extern void e_parse_error(lex_t*);
54
55}
56#endif // PYTHON_OUTPUT_H
diff --git a/bitbake/lib/bb/parse/parse_c/token.h b/bitbake/lib/bb/parse/parse_c/token.h
deleted file mode 100644
index c6242015b7..0000000000
--- a/bitbake/lib/bb/parse/parse_c/token.h
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2Copyright (C) 2005 Holger Hans Peter Freyther
3
4Permission is hereby granted, free of charge, to any person obtaining a copy
5of this software and associated documentation files (the "Software"), to deal
6in the Software without restriction, including without limitation the rights
7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the Software is
9furnished to do so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in all
12copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
17SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
20THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22*/
23
24#ifndef TOKEN_H
25#define TOKEN_H
26
27#include <ctype.h>
28#include <string.h>
29
30#define PURE_METHOD
31
32
33/**
34 * Special Value for End Of File Handling. We set it to
35 * 1001 so we can have up to 1000 Terminal Symbols on
36 * grammar. Currenlty we have around 20
37 */
38#define T_EOF 1001
39
40struct token_t {
41 const char* string()const PURE_METHOD;
42
43 static char* concatString(const char* l, const char* r);
44 void assignString(char* str);
45 void copyString(const char* str);
46
47 void release_this();
48
49private:
50 char *m_string;
51 size_t m_stringLen;
52};
53
54inline const char* token_t::string()const
55{
56 return m_string;
57}
58
59/*
60 * append str to the current string
61 */
62inline char* token_t::concatString(const char* l, const char* r)
63{
64 size_t cb = (l ? strlen (l) : 0) + strlen (r) + 1;
65 char *r_sz = new char[cb];
66 *r_sz = 0;
67
68 if (l)
69 strcat (r_sz, l);
70 strcat (r_sz, r);
71
72 return r_sz;
73}
74
75inline void token_t::assignString(char* str)
76{
77 m_string = str;
78 m_stringLen = str ? strlen(str) : 0;
79}
80
81inline void token_t::copyString(const char* str)
82{
83 if( str ) {
84 m_stringLen = strlen(str);
85 m_string = new char[m_stringLen+1];
86 strcpy(m_string, str);
87 }
88}
89
90inline void token_t::release_this()
91{
92 delete m_string;
93 m_string = 0;
94}
95
96#endif