diff options
| author | Richard Purdie <richard@openedhand.com> | 2006-11-16 15:02:15 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2006-11-16 15:02:15 +0000 |
| commit | 306b7c7a9757ead077363074e7bbac2e5c03e7c5 (patch) | |
| tree | 6935017a9af749c46816881c86258f514384ba1c /bitbake/lib/bb/parse | |
| parent | 65930a38e415ae4a0182e1cea1be838e0ada50ee (diff) | |
| download | openembedded-core-306b7c7a9757ead077363074e7bbac2e5c03e7c5.tar.gz openembedded-core-306b7c7a9757ead077363074e7bbac2e5c03e7c5.tar.bz2 openembedded-core-306b7c7a9757ead077363074e7bbac2e5c03e7c5.zip | |
bitbake: Upgrade from 1.4 -> 1.7.4ish
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@863 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/parse')
| -rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 11 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_c/BBHandler.py | 151 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_c/Makefile | 16 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_c/bitbakec.pyx | 205 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_c/bitbakeparser.cc | 144 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_c/bitbakescanner.cc | 218 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_c/bitbakescanner.l | 30 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_c/lexer.h | 8 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_c/lexerc.h | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 28 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 33 |
11 files changed, 510 insertions, 336 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index 58e17d154a..70fdba03b4 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py @@ -37,11 +37,16 @@ class SkipPackage(Exception): __mtime_cache = {} def cached_mtime(f): if not __mtime_cache.has_key(f): - update_mtime(f) + __mtime_cache[f] = os.stat(f)[8] return __mtime_cache[f] -def update_mtime(f): - __mtime_cache[f] = os.stat(f)[8] +def cached_mtime_noerror(f): + if not __mtime_cache.has_key(f): + try: + __mtime_cache[f] = os.stat(f)[8] + except OSError: + return 0 + return __mtime_cache[f] def mark_dependency(d, f): if f.startswith('./'): diff --git a/bitbake/lib/bb/parse/parse_c/BBHandler.py b/bitbake/lib/bb/parse/parse_c/BBHandler.py index d9f48db17b..b430e1f4e5 100644 --- a/bitbake/lib/bb/parse/parse_c/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_c/BBHandler.py @@ -5,33 +5,33 @@ Reads a .bb file and obtains its metadata (using a C++ parser) Copyright (C) 2006 Tim Robert Ansell - Copyright (C) 2006 Holger Hans Peter Freyther - + Copyright (C) 2006 Holger Hans Peter Freyther + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - THE USE OR OTHER DEALINGS IN THE SOFTWARE. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT + SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import os +import os, sys # The Module we will use here import bb @@ -61,51 +61,126 @@ def supports(fn, data): return fn[-3:] == ".bb" or fn[-8:] == ".bbclass" or fn[-4:] == ".inc" or fn[-5:] == ".conf" def init(fn, data): - if not data.getVar('TOPDIR'): - bb.error('TOPDIR is not set') - if not data.getVar('BBPATH'): - bb.error('BBPATH is not set') + if not bb.data.getVar('TOPDIR', data): + bb.data.setVar('TOPDIR', os.getcwd(), data) + if not bb.data.getVar('BBPATH', data): + bb.data.setVar('BBPATH', os.path.join(sys.prefix, 'share', 'bitbake'), data) + +def handle_inherit(d): + """ + Handle inheriting of classes. This will load all default classes. + It could be faster, it could detect infinite loops but this is todo + Also this delayed loading of bb.parse could impose a penalty + """ + from bb.parse import handle + + files = (data.getVar('INHERIT', d, True) or "").split() + if not "base" in i: + files[0:0] = ["base"] + + __inherit_cache = data.getVar('__inherit_cache', d) or [] + for f in files: + file = data.expand(f, d) + if file[0] != "/" and file[-8:] != ".bbclass": + file = os.path.join('classes', '%s.bbclass' % file) + + if not file in __inherit_cache: + debug(2, "BB %s:%d: inheriting %s" % (fn, lineno, file)) + __inherit_cache.append( file ) + + try: + handle(file, d, True) + except IOError: + print "Failed to inherit %s" % file + data.setVar('__inherit_cache', __inherit_cache, d) def handle(fn, d, include): - print "" - print "fn: %s" % fn - print "data: %s" % d - print dir(d) - print d.getVar.__doc__ - print "include: %s" % include + from bb import data, parse + + (root, ext) = os.path.splitext(os.path.basename(fn)) + base_name = "%s%s" % (root,ext) + + # initialize with some data + init(fn,d) # check if we include or are the beginning + oldfile = None if include: - oldfile = d.getVar('FILE') - else: - #d.inheritFromOS() - oldfile = None + oldfile = d.getVar('FILE', False) + is_conf = False + elif ext == ".conf": + is_conf = True + data.inheritFromOS(d) # find the file if not os.path.isabs(fn): - bb.error("No Absolute FILE name") - abs_fn = bb.which(d.getVar('BBPATH'), fn) + abs_fn = bb.which(d.getVar('BBPATH', True), fn) else: abs_fn = fn # check if the file exists if not os.path.exists(abs_fn): - raise IOError("file '%(fn)' not found" % locals() ) + raise IOError("file '%(fn)s' not found" % locals() ) # now we know the file is around mark it as dep if include: parse.mark_dependency(d, abs_fn) + # manipulate the bbpath + if ext != ".bbclass" and ext != ".conf": + old_bb_path = data.getVar('BBPATH', d) + data.setVar('BBPATH', os.path.dirname(abs_fn) + (":%s" %old_bb_path) , d) + + # handle INHERITS and base inherit + if ext != ".bbclass" and ext != ".conf": + data.setVar('FILE', fn, d) + handle_interit(d) + # now parse this file - by defering it to C++ - parsefile(fn, d) + parsefile(abs_fn, d, is_conf) + + # Finish it up + if include == 0: + data.expandKeys(d) + data.update_data(d) + #### !!! XXX Finish it up by executing the anonfunc + # restore the original FILE if oldfile: d.setVar('FILE', oldfile) + # restore bbpath + if ext != ".bbclass" and ext != ".conf": + data.setVar('BBPATH', old_bb_path, d ) + + return d + +# Needed for BitBake files... +__pkgsplit_cache__={} +def vars_from_file(mypkg, d): + if not mypkg: + return (None, None, None) + if mypkg in __pkgsplit_cache__: + return __pkgsplit_cache__[mypkg] + + myfile = os.path.splitext(os.path.basename(mypkg)) + parts = myfile[0].split('_') + __pkgsplit_cache__[mypkg] = parts + exp = 3 - len(parts) + tmplist = [] + while exp != 0: + exp -= 1 + tmplist.append(None) + parts.extend(tmplist) + return parts + + + + # Inform bitbake that we are a parser # We need to define all three from bb.parse import handlers diff --git a/bitbake/lib/bb/parse/parse_c/Makefile b/bitbake/lib/bb/parse/parse_c/Makefile index 9eb7ce9d08..77daccb72d 100644 --- a/bitbake/lib/bb/parse/parse_c/Makefile +++ b/bitbake/lib/bb/parse/parse_c/Makefile @@ -1,6 +1,6 @@ -test: bitbakec.so - python test.py +buil: bitbakec.so + echo "Done" bitbakescanner.cc: bitbakescanner.l flex -t bitbakescanner.l > bitbakescanner.cc @@ -28,9 +28,9 @@ bitbakec.so: bitbakec.o bitbakeparser.o bitbakescanner.o g++ -shared -fPIC bitbakeparser.o bitbakescanner.o bitbakec.o -o bitbakec.so clean: - rm *.out - rm *.cc - rm bitbakec.c - rm bitbakec-processed.c - rm *.o - rm *.so + rm -f *.out + rm -f *.cc + rm -f bitbakec.c + rm -f bitbakec-processed.c + rm -f *.o + rm -f *.so diff --git a/bitbake/lib/bb/parse/parse_c/bitbakec.pyx b/bitbake/lib/bb/parse/parse_c/bitbakec.pyx index 362cc2021e..c666e9b6b1 100644 --- a/bitbake/lib/bb/parse/parse_c/bitbakec.pyx +++ b/bitbake/lib/bb/parse/parse_c/bitbakec.pyx @@ -6,96 +6,107 @@ cdef extern from "stdio.h": FILE *fopen(char*, char*) int fclose(FILE *fp) +cdef extern from "string.h": + int strlen(char*) cdef extern from "lexerc.h": ctypedef struct lex_t: void* parser void* scanner + char* name FILE* file + int config void* data int lineError int errorParse - cdef extern void parse(FILE*, object) + cdef extern int parse(FILE*, char*, object, int) -def parsefile(object file, object data): - print "parsefile: 1", file, data +def parsefile(object file, object data, object config): + #print "parsefile: 1", file, data # Open the file cdef FILE* f f = fopen(file, "r") - print "parsefile: 2 opening file" + #print "parsefile: 2 opening file" if (f == NULL): raise IOError("No such file %s." % file) - print "parsefile: 3 parse" - parse(f, data) + #print "parsefile: 3 parse" + parse(f, file, data, config) # Close the file - print "parsefile: 4 closing" fclose(f) - + cdef public void e_assign(lex_t* container, char* key, char* what): - print "e_assign", key, what + #print "e_assign", key, what + if what == NULL: + print "FUTURE Warning empty string: use \"\"" + what = "" + d = <object>container.data - d.setVar(key, what) + d.setVar(key, what) cdef public void e_export(lex_t* c, char* what): - print "e_export", what + #print "e_export", what #exp: # bb.data.setVarFlag(key, "export", 1, data) - d = <object>container.data - d.setVarFlag(key, "export", 1) + d = <object>c.data + d.setVarFlag(what, "export", 1) cdef public void e_immediate(lex_t* c, char* key, char* what): - print "e_immediate", key, what + #print "e_immediate", key, what #colon: # val = bb.data.expand(groupd["value"], data) d = <object>c.data - d.setVar(key, d.expand(what)) + d.setVar(key, d.expand(what,d)) cdef public void e_cond(lex_t* c, char* key, char* what): - print "e_cond", key, what + #print "e_cond", key, what #ques: # val = bb.data.getVar(key, data) # if val == None: # val = groupd["value"] + if what == NULL: + print "FUTURE warning: Use \"\" for", key + what = "" + d = <object>c.data - d.setVar(key, (d.getVar(key) or what)) + d.setVar(key, (d.getVar(key,False) or what)) cdef public void e_prepend(lex_t* c, char* key, char* what): - print "e_prepend", key, what + #print "e_prepend", key, what #prepend: # val = "%s %s" % (groupd["value"], (bb.data.getVar(key, data) or "")) d = <object>c.data - d.setVar(key, what + " " + (d.getVar(key) or "")) + d.setVar(key, what + " " + (d.getVar(key,0) or "")) cdef public void e_append(lex_t* c, char* key, char* what): - print "e_append", key, what + #print "e_append", key, what #append: # val = "%s %s" % ((bb.data.getVar(key, data) or ""), groupd["value"]) d = <object>c.data - d.setVar(key, (d.getVar(key) or "") + " " + what) + d.setVar(key, (d.getVar(key,0) or "") + " " + what) cdef public void e_precat(lex_t* c, char* key, char* what): - print "e_precat", key, what + #print "e_precat", key, what #predot: # val = "%s%s" % (groupd["value"], (bb.data.getVar(key, data) or "")) d = <object>c.data - d.setVar(key, what + (d.getVar(key) or "")) + d.setVar(key, what + (d.getVar(key,0) or "")) cdef public void e_postcat(lex_t* c, char* key, char* what): - print "e_postcat", key, what + #print "e_postcat", key, what #postdot: # val = "%s%s" % ((bb.data.getVar(key, data) or ""), groupd["value"]) d = <object>c.data - d.setVar(key, (d.getVar(key) or "") + what) + d.setVar(key, (d.getVar(key,0) or "") + what) -cdef public void e_addtask(lex_t* c, char* name, char* before, char* after): - print "e_addtask", name, before, after +cdef public int e_addtask(lex_t* c, char* name, char* before, char* after) except -1: + #print "e_addtask", name # func = m.group("func") # before = m.group("before") # after = m.group("after") @@ -112,69 +123,131 @@ cdef public void e_addtask(lex_t* c, char* name, char* before, char* after): # # set up things that depend on this func # data.setVarFlag(var, "postdeps", before.split(), d) # return - - do = "do_%s" % name + + if c.config == 1: + from bb.parse import ParseError + raise ParseError("No tasks allowed in config files") + return -1 + d = <object>c.data + do = "do_%s" % name d.setVarFlag(do, "task", 1) - if strlen(before) > 0: + if before != NULL and strlen(before) > 0: + #print "Before", before + d.setVarFlag(do, "postdeps", ("%s" % before).split()) + if after != NULL and strlen(after) > 0: + #print "After", after d.setVarFlag(do, "deps", ("%s" % after).split()) - if strlen(after) > 0: - d.setVarFlag(do, "deps", ("%s" % before).split()) + return 0 -cdef public void e_addhandler(lex_t* c, char* h): - print "e_addhandler", h +cdef public int e_addhandler(lex_t* c, char* h) except -1: + #print "e_addhandler", h # data.setVarFlag(h, "handler", 1, d) + if c.config == 1: + from bb.parse import ParseError + raise ParseError("No handlers allowed in config files") + return -1 + d = <object>c.data d.setVarFlag(h, "handler", 1) + return 0 + +cdef public int e_export_func(lex_t* c, char* function) except -1: + #print "e_export_func", function + if c.config == 1: + from bb.parse import ParseError + raise ParseError("No functions allowed in config files") + return -1 + + return 0 + +cdef public int e_inherit(lex_t* c, char* file) except -1: + #print "e_inherit", file -cdef public void e_export_func(lex_t* c, char* function): - print "e_export_func", function - pass + if c.config == 1: + from bb.parse import ParseError + raise ParseError("No inherits allowed in config files") + return -1 -cdef public void e_inherit(lex_t* c, char* file): - print "e_inherit", file - pass + return 0 cdef public void e_include(lex_t* c, char* file): - print "e_include", file + from bb.parse import handle d = <object>c.data - d.expand(file) - + try: - parsefile(file, d) + handle(d.expand(file,d), d, True) except IOError: - print "Could not include required file %s" % file + print "Could not include file", file -cdef public void e_require(lex_t* c, char* file): - print "e_require", file +cdef public int e_require(lex_t* c, char* file) except -1: + #print "e_require", file + from bb.parse import handle d = <object>c.data - d.expand(file) - + try: - parsefile(file, d) + handle(d.expand(file,d), d, True) except IOError: - raise CParseError("Could not include required file %s" % file) + print "ParseError", file + from bb.parse import ParseError + raise ParseError("Could not include required file %s" % file) + return -1 + + return 0 + +cdef public int e_proc(lex_t* c, char* key, char* what) except -1: + #print "e_proc", key, what + if c.config == 1: + from bb.parse import ParseError + raise ParseError("No inherits allowed in config files") + return -1 + + return 0 + +cdef public int e_proc_python(lex_t* c, char* key, char* what) except -1: + #print "e_proc_python" + if c.config == 1: + from bb.parse import ParseError + raise ParseError("No pythin allowed in config files") + return -1 + + if key != NULL: + pass + #print "Key", key + if what != NULL: + pass + #print "What", what + + return 0 + +cdef public int e_proc_fakeroot(lex_t* c, char* key, char* what) except -1: + #print "e_fakeroot", key, what + + if c.config == 1: + from bb.parse import ParseError + raise ParseError("No fakeroot allowed in config files") + return -1 + + return 0 + +cdef public int e_def(lex_t* c, char* a, char* b, char* d) except -1: + #print "e_def", a, b, d -cdef public void e_proc(lex_t* c, char* key, char* what): - print "e_proc", key, what - pass + if c.config == 1: + from bb.parse import ParseError + raise ParseError("No defs allowed in config files") + return -1 -cdef public void e_proc_python(lex_t* c, char* key, char* what): - print "e_proc_python", key, what - pass + return 0 -cdef public void e_proc_fakeroot(lex_t* c, char* key, char* what): - print "e_fakeroot", key, what - pass +cdef public int e_parse_error(lex_t* c) except -1: + print "e_parse_error", c.name, "line:", lineError, "parse:", errorParse -cdef public void e_def(lex_t* c, char* a, char* b, char* d): - print "e_def", key, what - pass -cdef public void e_parse_error(lex_t* c): - print "e_parse_error", "line:", lineError, "parse:", errorParse - raise CParseError("There was an parse error, sorry unable to give more information at the current time.") + from bb.parse import ParseError + raise ParseError("There was an parse error, sorry unable to give more information at the current time. File: %s Line: %d" % (c.name,lineError) ) + return -1 diff --git a/bitbake/lib/bb/parse/parse_c/bitbakeparser.cc b/bitbake/lib/bb/parse/parse_c/bitbakeparser.cc index ee9a901b70..9d9793f8df 100644 --- a/bitbake/lib/bb/parse/parse_c/bitbakeparser.cc +++ b/bitbake/lib/bb/parse/parse_c/bitbakeparser.cc @@ -128,51 +128,49 @@ typedef union { */ static const YYACTIONTYPE yy_action[] = { /* 0 */ 82, 3, 7, 8, 38, 22, 39, 24, 26, 32, - /* 10 */ 34, 28, 30, 128, 1, 40, 53, 70, 55, 5, - /* 20 */ 60, 65, 67, 2, 21, 36, 69, 77, 9, 7, - /* 30 */ 11, 6, 13, 15, 17, 19, 12, 52, 50, 4, - /* 40 */ 74, 42, 46, 59, 57, 10, 64, 62, 38, 14, - /* 50 */ 73, 16, 38, 38, 76, 81, 18, 20, 23, 25, - /* 60 */ 27, 29, 31, 33, 35, 37, 56, 51, 90, 54, - /* 70 */ 58, 71, 41, 43, 63, 45, 44, 47, 72, 48, - /* 80 */ 75, 78, 80, 61, 90, 49, 66, 90, 90, 68, - /* 90 */ 90, 90, 90, 90, 90, 79, + /* 10 */ 34, 28, 30, 2, 21, 40, 53, 70, 55, 44, + /* 20 */ 60, 65, 67, 128, 1, 36, 69, 77, 42, 46, + /* 30 */ 11, 66, 13, 15, 17, 19, 64, 62, 9, 7, + /* 40 */ 74, 38, 45, 81, 59, 57, 38, 38, 73, 76, + /* 50 */ 5, 68, 52, 50, 14, 31, 47, 71, 48, 10, + /* 60 */ 72, 33, 23, 49, 6, 41, 51, 78, 75, 16, + /* 70 */ 4, 54, 35, 25, 18, 80, 79, 56, 27, 37, + /* 80 */ 58, 12, 61, 29, 43, 63, 20, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 0, 1, 2, 3, 23, 4, 25, 6, 7, 8, - /* 10 */ 9, 10, 11, 31, 32, 15, 16, 1, 18, 42, - /* 20 */ 20, 21, 22, 33, 34, 24, 26, 27, 1, 2, - /* 30 */ 4, 28, 6, 7, 8, 9, 5, 35, 36, 29, - /* 40 */ 24, 13, 14, 37, 38, 34, 39, 40, 23, 5, - /* 50 */ 25, 5, 23, 23, 25, 25, 5, 5, 5, 5, - /* 60 */ 5, 5, 5, 5, 5, 41, 17, 35, 43, 1, - /* 70 */ 37, 24, 12, 12, 39, 12, 14, 12, 41, 13, - /* 80 */ 41, 1, 41, 19, 43, 12, 19, 43, 43, 19, - /* 90 */ 43, 43, 43, 43, 43, 24, + /* 10 */ 9, 10, 11, 33, 34, 15, 16, 1, 18, 14, + /* 20 */ 20, 21, 22, 31, 32, 24, 26, 27, 13, 14, + /* 30 */ 4, 19, 6, 7, 8, 9, 39, 40, 1, 2, + /* 40 */ 24, 23, 12, 25, 37, 38, 23, 23, 25, 25, + /* 50 */ 42, 19, 35, 36, 5, 5, 12, 24, 13, 34, + /* 60 */ 41, 5, 5, 12, 28, 12, 35, 1, 41, 5, + /* 70 */ 29, 1, 5, 5, 5, 41, 24, 17, 5, 41, + /* 80 */ 37, 5, 19, 5, 12, 39, 5, }; #define YY_SHIFT_USE_DFLT (-20) static const signed char yy_shift_ofst[] = { - /* 0 */ -20, 0, -20, 10, -20, 3, -20, -20, 27, -20, - /* 10 */ 26, 31, -20, 44, -20, 46, -20, 51, -20, 52, - /* 20 */ -20, 1, 53, -20, 54, -20, 55, -20, 56, -20, - /* 30 */ 57, -20, 58, -20, 59, -20, -20, -19, -20, -20, - /* 40 */ 60, 28, 61, 62, 63, -20, 65, 66, 73, -20, - /* 50 */ 60, -20, -20, 68, -20, 49, -20, 49, -20, -20, - /* 60 */ 64, -20, 64, -20, -20, 67, -20, 70, -20, 16, - /* 70 */ 47, -20, 25, -20, -20, 29, -20, 80, 71, -20, - /* 80 */ 30, -20, + /* 0 */ -20, 0, -20, 41, -20, 36, -20, -20, 37, -20, + /* 10 */ 26, 76, -20, 49, -20, 64, -20, 69, -20, 81, + /* 20 */ -20, 1, 57, -20, 68, -20, 73, -20, 78, -20, + /* 30 */ 50, -20, 56, -20, 67, -20, -20, -19, -20, -20, + /* 40 */ 53, 15, 72, 5, 30, -20, 44, 45, 51, -20, + /* 50 */ 53, -20, -20, 70, -20, 60, -20, 60, -20, -20, + /* 60 */ 63, -20, 63, -20, -20, 12, -20, 32, -20, 16, + /* 70 */ 33, -20, 23, -20, -20, 24, -20, 66, 52, -20, + /* 80 */ 18, -20, }; -#define YY_REDUCE_USE_DFLT (-24) +#define YY_REDUCE_USE_DFLT (-21) static const signed char yy_reduce_ofst[] = { - /* 0 */ -18, -10, -24, -24, -23, -24, -24, -24, 11, -24, - /* 10 */ -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - /* 20 */ -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - /* 30 */ -24, -24, -24, -24, -24, -24, 24, -24, -24, -24, - /* 40 */ 2, -24, -24, -24, -24, -24, -24, -24, -24, -24, - /* 50 */ 32, -24, -24, -24, -24, 6, -24, 33, -24, -24, - /* 60 */ 7, -24, 35, -24, -24, -24, -24, -24, -24, -24, - /* 70 */ -24, 37, -24, -24, 39, -24, -24, -24, -24, 41, - /* 80 */ -24, -24, + /* 0 */ -8, -20, -21, -21, 8, -21, -21, -21, 25, -21, + /* 10 */ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, + /* 20 */ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, + /* 30 */ -21, -21, -21, -21, -21, -21, 38, -21, -21, -21, + /* 40 */ 17, -21, -21, -21, -21, -21, -21, -21, -21, -21, + /* 50 */ 31, -21, -21, -21, -21, 7, -21, 43, -21, -21, + /* 60 */ -3, -21, 46, -21, -21, -21, -21, -21, -21, -21, + /* 70 */ -21, 19, -21, -21, 27, -21, -21, -21, -21, 34, + /* 80 */ -21, -21, }; static const YYACTIONTYPE yy_default[] = { /* 0 */ 84, 127, 83, 85, 125, 126, 124, 86, 127, 85, @@ -420,7 +418,7 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ case 29: #line 50 "bitbakeparser.y" { (yypminor->yy0).release_this (); } -#line 425 "bitbakeparser.c" +#line 423 "bitbakeparser.c" break; default: break; /* If no destructor action specified: do nothing */ } @@ -694,7 +692,7 @@ static void yy_reduce( { yygotominor.yy0.assignString( (char*)yymsp[0].minor.yy0.string() ); yymsp[0].minor.yy0.assignString( 0 ); yymsp[0].minor.yy0.release_this(); } -#line 699 "bitbakeparser.c" +#line 697 "bitbakeparser.c" break; case 4: #line 64 "bitbakeparser.y" @@ -702,7 +700,7 @@ static void yy_reduce( yygotominor.yy0.assignString( (char*)yymsp[0].minor.yy0.string() ); yymsp[0].minor.yy0.assignString( 0 ); yymsp[0].minor.yy0.release_this(); } -#line 707 "bitbakeparser.c" +#line 705 "bitbakeparser.c" break; case 5: #line 70 "bitbakeparser.y" @@ -711,7 +709,7 @@ static void yy_reduce( yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor); yy_destructor(4,&yymsp[-1].minor); } -#line 716 "bitbakeparser.c" +#line 714 "bitbakeparser.c" break; case 6: #line 74 "bitbakeparser.y" @@ -720,7 +718,7 @@ static void yy_reduce( yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor); yy_destructor(6,&yymsp[-1].minor); } -#line 725 "bitbakeparser.c" +#line 723 "bitbakeparser.c" break; case 7: #line 78 "bitbakeparser.y" @@ -729,7 +727,7 @@ static void yy_reduce( yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor); yy_destructor(7,&yymsp[-1].minor); } -#line 734 "bitbakeparser.c" +#line 732 "bitbakeparser.c" break; case 8: #line 82 "bitbakeparser.y" @@ -738,7 +736,7 @@ static void yy_reduce( yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor); yy_destructor(8,&yymsp[-1].minor); } -#line 743 "bitbakeparser.c" +#line 741 "bitbakeparser.c" break; case 9: #line 86 "bitbakeparser.y" @@ -746,56 +744,56 @@ static void yy_reduce( yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(3,&yymsp[-3].minor); yy_destructor(9,&yymsp[-1].minor); } -#line 751 "bitbakeparser.c" +#line 749 "bitbakeparser.c" break; case 10: #line 90 "bitbakeparser.y" { e_assign( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() ); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(4,&yymsp[-1].minor); } -#line 758 "bitbakeparser.c" +#line 756 "bitbakeparser.c" break; case 11: #line 93 "bitbakeparser.y" { e_precat( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() ); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(6,&yymsp[-1].minor); } -#line 765 "bitbakeparser.c" +#line 763 "bitbakeparser.c" break; case 12: #line 96 "bitbakeparser.y" { e_postcat( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() ); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(7,&yymsp[-1].minor); } -#line 772 "bitbakeparser.c" +#line 770 "bitbakeparser.c" break; case 13: #line 99 "bitbakeparser.y" { e_prepend( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() ); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(10,&yymsp[-1].minor); } -#line 779 "bitbakeparser.c" +#line 777 "bitbakeparser.c" break; case 14: #line 102 "bitbakeparser.y" { e_append( lex, yymsp[-2].minor.yy0.string() , yymsp[0].minor.yy0.string() ); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(11,&yymsp[-1].minor); } -#line 786 "bitbakeparser.c" +#line 784 "bitbakeparser.c" break; case 15: #line 105 "bitbakeparser.y" { e_immediate( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() ); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(8,&yymsp[-1].minor); } -#line 793 "bitbakeparser.c" +#line 791 "bitbakeparser.c" break; case 16: #line 108 "bitbakeparser.y" { e_cond( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string() ); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(9,&yymsp[-1].minor); } -#line 800 "bitbakeparser.c" +#line 798 "bitbakeparser.c" break; case 17: #line 112 "bitbakeparser.y" @@ -803,7 +801,7 @@ static void yy_reduce( yymsp[-4].minor.yy0.release_this(); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(13,&yymsp[-3].minor); yy_destructor(14,&yymsp[-1].minor); } -#line 808 "bitbakeparser.c" +#line 806 "bitbakeparser.c" break; case 18: #line 115 "bitbakeparser.y" @@ -811,55 +809,55 @@ static void yy_reduce( yymsp[-4].minor.yy0.release_this(); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(14,&yymsp[-3].minor); yy_destructor(13,&yymsp[-1].minor); } -#line 816 "bitbakeparser.c" +#line 814 "bitbakeparser.c" break; case 19: #line 118 "bitbakeparser.y" { e_addtask( lex, yymsp[0].minor.yy0.string(), NULL, NULL); yymsp[0].minor.yy0.release_this();} -#line 822 "bitbakeparser.c" +#line 820 "bitbakeparser.c" break; case 20: #line 121 "bitbakeparser.y" { e_addtask( lex, yymsp[-2].minor.yy0.string(), yymsp[0].minor.yy0.string(), NULL); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(13,&yymsp[-1].minor); } -#line 829 "bitbakeparser.c" +#line 827 "bitbakeparser.c" break; case 21: #line 124 "bitbakeparser.y" { e_addtask( lex, yymsp[-2].minor.yy0.string(), NULL, yymsp[0].minor.yy0.string()); yymsp[-2].minor.yy0.release_this(); yymsp[0].minor.yy0.release_this(); yy_destructor(14,&yymsp[-1].minor); } -#line 836 "bitbakeparser.c" +#line 834 "bitbakeparser.c" break; case 25: #line 131 "bitbakeparser.y" { e_addhandler( lex, yymsp[0].minor.yy0.string()); yymsp[0].minor.yy0.release_this (); yy_destructor(16,&yymsp[-1].minor); } -#line 842 "bitbakeparser.c" +#line 840 "bitbakeparser.c" break; case 26: #line 133 "bitbakeparser.y" { e_export_func( lex, yymsp[0].minor.yy0.string()); yymsp[0].minor.yy0.release_this(); } -#line 847 "bitbakeparser.c" +#line 845 "bitbakeparser.c" break; case 30: #line 138 "bitbakeparser.y" { e_inherit( lex, yymsp[0].minor.yy0.string() ); yymsp[0].minor.yy0.release_this (); } -#line 852 "bitbakeparser.c" +#line 850 "bitbakeparser.c" break; case 34: #line 144 "bitbakeparser.y" { e_include( lex, yymsp[0].minor.yy0.string() ); yymsp[0].minor.yy0.release_this(); yy_destructor(21,&yymsp[-1].minor); } -#line 858 "bitbakeparser.c" +#line 856 "bitbakeparser.c" break; case 35: #line 147 "bitbakeparser.y" { e_require( lex, yymsp[0].minor.yy0.string() ); yymsp[0].minor.yy0.release_this(); yy_destructor(22,&yymsp[-1].minor); } -#line 864 "bitbakeparser.c" +#line 862 "bitbakeparser.c" break; case 36: #line 150 "bitbakeparser.y" @@ -868,12 +866,12 @@ static void yy_reduce( yymsp[-1].minor.yy0.release_this (); yymsp[0].minor.yy0.release_this (); } -#line 873 "bitbakeparser.c" +#line 871 "bitbakeparser.c" break; case 37: #line 155 "bitbakeparser.y" { yygotominor.yy0.assignString(0); } -#line 878 "bitbakeparser.c" +#line 876 "bitbakeparser.c" break; case 38: #line 157 "bitbakeparser.y" @@ -881,7 +879,7 @@ static v |
