diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-01 19:40:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-01 19:40:18 -0700 |
commit | 4da3064d1775810f10f7ddc1c34c3f1ff502a654 (patch) | |
tree | dc4cd9b546e5d702226f5e3e6bf165867140985c /scripts | |
parent | 93899e39e86bfc021a190a9c26e8e516561f2756 (diff) | |
parent | 48a9b733e644ab4cc8e2a98950a36ddb12b8c54e (diff) |
Merge tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux
Pull devicetree updates from Grant Likely:
"A whole lot of bug fixes.
Nothing stands out here except the ability to enable CONFIG_OF on
every architecture, and an import of a newer version of dtc"
* tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux: (22 commits)
of/irq: Rename "intc_desc" to "of_intc_desc" to fix OF on sh
of/irq: Fix pSeries boot failure
Documentation: DT: Fix a typo in the filename "lantiq,<chip>-pinumx.txt"
of: define of_find_node_by_phandle for !CONFIG_OF
of/address: use atomic allocation in pci_register_io_range()
of: Add vendor prefix for Zodiac Inflight Innovations
dt/fdt: add empty versions of early_init_dt_*_memory_arch
of: clean-up unnecessary libfdt include paths
of: make unittest select OF_EARLY_FLATTREE instead of depend on it
of: make CONFIG_OF user selectable
MIPS: prepare for user enabling of CONFIG_OF
of/fdt: fix argument name and add comments of unflatten_dt_node()
of: return NUMA_NO_NODE from fallback of_node_to_nid()
tps6507x.txt: Remove executable permission
of/overlay: Grammar s/an negative/a negative/
of/fdt: Make fdt blob input parameters of unflatten functions const
of: add helper function to retrive match data
of: Grammar s/property exist/property exists/
of: Move OF flags to be visible even when !CONFIG_OF
scripts/dtc: Update to upstream version 9d3649bd3be245c9
...
Diffstat (limited to 'scripts')
30 files changed, 1754 insertions, 1535 deletions
diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c index ee96a2519eff..e81a8c74b8d2 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -53,7 +53,7 @@ struct check { void *data; bool warn, error; enum checkstatus status; - int inprogress; + bool inprogress; int num_prereqs; struct check **prereq; }; @@ -113,6 +113,7 @@ static inline void check_msg(struct check *c, const char *fmt, ...) vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); } + va_end(ap); } #define FAIL(c, ...) \ @@ -141,9 +142,9 @@ static void check_nodes_props(struct check *c, struct node *dt, struct node *nod check_nodes_props(c, dt, child); } -static int run_check(struct check *c, struct node *dt) +static bool run_check(struct check *c, struct node *dt) { - int error = 0; + bool error = false; int i; assert(!c->inprogress); @@ -151,11 +152,11 @@ static int run_check(struct check *c, struct node *dt) if (c->status != UNCHECKED) goto out; - c->inprogress = 1; + c->inprogress = true; for (i = 0; i < c->num_prereqs; i++) { struct check *prq = c->prereq[i]; - error |= run_check(prq, dt); + error = error || run_check(prq, dt); if (prq->status != PASSED) { c->status = PREREQ; check_msg(c, "Failed prerequisite '%s'", @@ -177,9 +178,9 @@ static int run_check(struct check *c, struct node *dt) TRACE(c, "\tCompleted, status %d", c->status); out: - c->inprogress = 0; + c->inprogress = false; if ((c->status != PASSED) && (c->error)) - error = 1; + error = true; return error; } @@ -624,11 +625,11 @@ static void check_avoid_default_addr_size(struct check *c, struct node *dt, if (!reg && !ranges) return; - if ((node->parent->addr_cells == -1)) + if (node->parent->addr_cells == -1) FAIL(c, "Relying on default #address-cells value for %s", node->fullpath); - if ((node->parent->size_cells == -1)) + if (node->parent->size_cells == -1) FAIL(c, "Relying on default #size-cells value for %s", node->fullpath); } @@ -706,15 +707,15 @@ static void disable_warning_error(struct check *c, bool warn, bool error) c->error = c->error && !error; } -void parse_checks_option(bool warn, bool error, const char *optarg) +void parse_checks_option(bool warn, bool error, const char *arg) { int i; - const char *name = optarg; + const char *name = arg; bool enable = true; - if ((strncmp(optarg, "no-", 3) == 0) - || (strncmp(optarg, "no_", 3) == 0)) { - name = optarg + 3; + if ((strncmp(arg, "no-", 3) == 0) + || (strncmp(arg, "no_", 3) == 0)) { + name = arg + 3; enable = false; } @@ -733,7 +734,7 @@ void parse_checks_option(bool warn, bool error, const char *optarg) die("Unrecognized check name \"%s\"\n", name); } -void process_checks(int force, struct boot_info *bi) +void process_checks(bool force, struct boot_info *bi) { struct node *dt = bi->dt; int i; diff --git a/scripts/dtc/data.c b/scripts/dtc/data.c index 4a40c5b92474..8cae23746882 100644 --- a/scripts/dtc/data.c +++ b/scripts/dtc/data.c @@ -74,7 +74,7 @@ struct data data_copy_escape_string(const char *s, int len) struct data d; char *q; - d = data_grow_for(empty_data, strlen(s)+1); + d = data_grow_for(empty_data, len + 1); q = d.val; while (i < len) { @@ -250,20 +250,20 @@ struct data data_add_marker(struct data d, enum markertype type, char *ref) return data_append_markers(d, m); } -int data_is_one_string(struct data d) +bool data_is_one_string(struct data d) { int i; int len = d.len; if (len == 0) - return 0; + return false; for (i = 0; i < len-1; i++) if (d.val[i] == '\0') - return 0; + return false; if (d.val[len-1] != '\0') - return 0; + return false; - return 1; + return true; } diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l index 3b41bfca636c..0ee1caf03dd0 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -20,7 +20,6 @@ %option noyywrap nounput noinput never-interactive -%x INCLUDE %x BYTESTRING %x PROPNODENAME %s V1 @@ -40,6 +39,7 @@ LINECOMMENT "//".*\n #include "dtc-parser.tab.h" YYLTYPE yylloc; +extern bool treesource_error; /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ #define YY_USER_ACTION \ @@ -61,7 +61,8 @@ static int dts_version = 1; BEGIN(V1); \ static void push_input_file(const char *filename); -static int pop_input_file(void); +static bool pop_input_file(void); +static void lexical_error(const char *fmt, ...); %} %% @@ -75,11 +76,11 @@ static int pop_input_file(void); char *line, *tmp, *fn; /* skip text before line # */ line = yytext; - while (!isdigit(*line)) + while (!isdigit((unsigned char)*line)) line++; /* skip digits in line # */ tmp = line; - while (!isspace(*tmp)) + while (!isspace((unsigned char)*tmp)) tmp++; /* "NULL"-terminate line # */ *tmp = '\0'; @@ -146,15 +147,42 @@ static int pop_input_file(void); } <V1>([0-9]+|0[xX][0-9a-fA-F]+)(U|L|UL|LL|ULL)? { - yylval.literal = xstrdup(yytext); - DPRINT("Literal: '%s'\n", yylval.literal); + char *e; + DPRINT("Integer Literal: '%s'\n", yytext); + + errno = 0; + yylval.integer = strtoull(yytext, &e, 0); + + assert(!(*e) || !e[strspn(e, "UL")]); + + if (errno == ERANGE) + lexical_error("Integer literal '%s' out of range", + yytext); + else + /* ERANGE is the only strtoull error triggerable + * by strings matching the pattern */ + assert(errno == 0); return DT_LITERAL; } <*>{CHAR_LITERAL} { - yytext[yyleng-1] = '\0'; - yylval.literal = xstrdup(yytext+1); - DPRINT("Character literal: %s\n", yylval.literal); + struct data d; + DPRINT("Character literal: %s\n", yytext); + + d = data_copy_escape_string(yytext+1, yyleng-2); + if (d.len == 1) { + lexical_error("Empty character literal"); + yylval.integer = 0; + return DT_CHAR_LITERAL; + } + + yylval.integer = (unsigned char)d.val[0]; + + if (d.len > 2) + lexical_error("Character literal has %d" + " characters instead of 1", + d.len - 1); + return DT_CHAR_LITERAL; } @@ -164,7 +192,7 @@ static int pop_input_file(void); return DT_REF; } -<*>"&{/"{PATHCHAR}+\} { /* new-style path reference */ +<*>"&{/"{PATHCHAR}*\} { /* new-style path reference */ yytext[yyleng-1] = '\0'; DPRINT("Ref: %s\n", yytext+2); yylval.labelref = xstrdup(yytext+2); @@ -238,13 +266,24 @@ static void push_input_file(const char *filename) } -static int pop_input_file(void) +static bool pop_input_file(void) { if (srcfile_pop() == 0) - return 0; + return false; yypop_buffer_state(); yyin = current_srcfile->f; - return 1; + return true; +} + +static void lexical_error(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + srcpos_verror(&yylloc, "Lexical error", fmt, ap); + va_end(ap); + + treesource_error = true; } diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped index 2d30f41778b7..11cd78e72305 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -9,7 +9,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -162,7 +162,12 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int yyleng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t yyleng; extern FILE *yyin, *yyout; @@ -171,6 +176,7 @@ extern FILE *yyin, *yyout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -188,11 +194,6 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, (yytext_ptr) ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -210,7 +211,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -280,8 +281,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yyleng; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -309,7 +310,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); @@ -341,7 +342,7 @@ void yyfree (void * ); /* Begin user sect3 */ -#define yywrap(n) 1 +#define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -381,25 +382,25 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[161] = +static yyconst flex_int16_t yy_accept[159] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 31, 29, 18, 18, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 15, 16, - 16, 29, 16, 10, 10, 18, 26, 0, 3, 0, - 27, 12, 0, 0, 11, 0, 0, 0, 0, 0, - 0, 0, 21, 23, 25, 24, 22, 0, 9, 28, - 0, 0, 0, 14, 14, 16, 16, 16, 10, 10, - 10, 0, 12, 0, 11, 0, 0, 0, 20, 0, - 0, 0, 0, 0, 0, 0, 0, 16, 10, 10, - 10, 0, 19, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 16, 13, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 16, 6, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 17, 0, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 5, 8, 0, 0, 0, 0, 7, 0 + 0, 0, 0, 0, 0, 0, 0, 0, 31, 29, + 18, 18, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 15, 16, 16, 29, + 16, 10, 10, 18, 26, 0, 3, 0, 27, 12, + 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 21, 23, 25, 24, 22, 0, 9, 28, 0, 0, + 0, 14, 14, 16, 16, 16, 10, 10, 10, 0, + 12, 0, 11, 0, 0, 0, 20, 0, 0, 0, + 0, 0, 0, 0, 0, 16, 10, 10, 10, 0, + 13, 19, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 6, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 17, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 5, 8, 0, 0, 0, 0, 7, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -440,157 +441,157 @@ static yyconst flex_int32_t yy_meta[47] = 2, 2, 4, 5, 5, 5, 6, 1, 1, 1, 7, 8, 8, 8, 8, 1, 1, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 3, 1, 1 + 8, 8, 8, 3, 1, 4 } ; -static yyconst flex_int16_t yy_base[175] = +static yyconst flex_int16_t yy_base[173] = { 0, - 0, 385, 378, 40, 41, 383, 72, 382, 34, 44, - 388, 393, 61, 117, 368, 116, 115, 115, 115, 48, - 367, 107, 368, 339, 127, 120, 0, 147, 393, 0, - 127, 0, 133, 156, 168, 153, 393, 125, 393, 380, - 393, 0, 369, 127, 393, 160, 371, 377, 347, 21, - 343, 346, 393, 393, 393, 393, 393, 359, 393, 393, - 183, 343, 339, 393, 356, 0, 183, 340, 187, 348, - 347, 0, 0, 0, 178, 359, 195, 365, 354, 326, - 332, 325, 334, 328, 204, 326, 331, 324, 393, 335, - 150, 311, 343, 342, 315, 322, 340, 179, 313, 207, - - 319, 316, 317, 393, 337, 333, 305, 302, 311, 301, - 310, 190, 338, 337, 393, 307, 322, 301, 305, 277, - 208, 311, 307, 278, 271, 270, 248, 246, 213, 130, - 393, 393, 263, 235, 207, 221, 218, 229, 213, 213, - 206, 234, 218, 210, 208, 193, 219, 393, 223, 204, - 176, 157, 393, 393, 120, 106, 97, 119, 393, 393, - 245, 251, 259, 263, 267, 273, 280, 284, 292, 300, - 304, 310, 318, 326 + 0, 383, 34, 382, 65, 381, 37, 105, 387, 391, + 54, 111, 367, 110, 109, 109, 112, 41, 366, 104, + 367, 338, 124, 117, 0, 144, 391, 0, 121, 0, + 135, 155, 140, 179, 391, 160, 391, 379, 391, 0, + 368, 141, 391, 167, 370, 376, 346, 103, 342, 345, + 391, 391, 391, 391, 391, 358, 391, 391, 175, 342, + 338, 391, 355, 0, 185, 339, 184, 347, 346, 0, + 0, 322, 175, 357, 175, 363, 352, 324, 330, 323, + 332, 326, 201, 324, 329, 322, 391, 333, 181, 309, + 391, 341, 340, 313, 320, 338, 178, 311, 146, 317, + + 314, 315, 335, 331, 303, 300, 309, 299, 308, 188, + 336, 335, 391, 305, 320, 281, 283, 271, 203, 288, + 281, 271, 266, 264, 245, 242, 208, 104, 391, 391, + 244, 218, 204, 219, 206, 224, 201, 212, 204, 229, + 215, 208, 207, 200, 219, 391, 233, 221, 200, 181, + 391, 391, 149, 122, 86, 41, 391, 391, 245, 251, + 259, 263, 267, 273, 280, 284, 292, 300, 304, 310, + 318, 326 } ; -static yyconst flex_int16_t yy_def[175] = +static yyconst flex_int16_t yy_def[173] = { 0, - 160, 1, 1, 1, 1, 5, 160, 7, 1, 1, - 160, 160, 160, 160, 160, 161, 162, 163, 160, 160, - 160, 160, 164, 160, 160, 160, 165, 164, 160, 166, - 167, 166, 166, 160, 160, 160, 160, 161, 160, 161, - 160, 168, 160, 163, 160, 163, 169, 170, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 164, 160, 160, - 160, 160, 160, 160, 164, 166, 167, 166, 160, 160, - 160, 171, 168, 172, 163, 169, 169, 170, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 166, 160, 160, - 171, 172, 160, 160, 160, 160, 160, 160, 160, 160, - - 160, 160, 166, 160, 160, 160, 160, 160, 160, 160, - 160, 173, 160, 166, 160, 160, 160, 160, 160, 160, - 173, 160, 173, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 174, 160, 160, 160, 174, 160, 174, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 0, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160 + 158, 1, 1, 3, 158, 5, 1, 1, 158, 158, + 158, 158, 158, 159, 160, 161, 158, 158, 158, 158, + 162, 158, 158, 158, 163, 162, 158, 164, 165, 164, + 164, 158, 158, 158, 158, 159, 158, 159, 158, 166, + 158, 161, 158, 161, 167, 168, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 162, 158, 158, 158, 158, + 158, 158, 162, 164, 165, 164, 158, 158, 158, 169, + 166, 170, 161, 167, 167, 168, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 164, 158, 158, 169, 170, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + + 158, 164, 158, 158, 158, 158, 158, 158, 158, 171, + 158, 164, 158, 158, 158, 158, 158, 158, 171, 158, + 171, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 172, 158, 158, 158, 172, 158, 172, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 0, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158 } ; -static yyconst flex_int16_t yy_nxt[440] = +static yyconst flex_int16_t yy_nxt[438] = { 0, - 12, 13, 14, 13, 15, 16, 12, 17, 18, 12, - 12, 12, 19, 12, 12, 12, 12, 20, 21, 22, - 23, 23, 23, 23, 23, 12, 12, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 12, 24, 12, 25, 34, 35, 35, - 25, 81, 26, 26, 27, 27, 27, 34, 35, 35, - 82, 28, 36, 36, 36, 53, 54, 29, 28, 28, - 28, 28, 12, 13, 14, 13, 15, 16, 30, 17, - 18, 30, 30, 30, 26, 30, 30, 30, 12, 20, - 21, 22, 31, 31, 31, 31, 31, 32, 12, 31, - - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 12, 24, 12, 36, 36, - 36, 39, 41, 45, 47, 56, 57, 48, 61, 47, - 39, 159, 48, 66, 61, 45, 66, 66, 66, 158, - 46, 40, 49, 59, 50, 157, 51, 49, 52, 50, - 40, 63, 46, 52, 36, 36, 36, 156, 43, 62, - 65, 65, 65, 59, 136, 68, 137, 65, 75, 69, - 69, 69, 70, 71, 65, 65, 65, 65, 70, 71, - 72, 69, 69, 69, 61, 46, 45, 155, 154, 66, - 70, 71, 66, 66, 66, 122, 85, 85, 85, 59, - - 69, 69, 69, 46, 77, 100, 109, 93, 100, 70, - 71, 110, 112, 122, 129, 123, 153, 85, 85, 85, - 135, 135, 135, 148, 148, 160, 135, 135, 135, 152, - 142, 142, 142, 123, 143, 142, 142, 142, 151, 143, - 150, 146, 145, 149, 149, 38, 38, 38, 38, 38, - 38, 38, 38, 42, 144, 141, 140, 42, 42, 44, - 44, 44, 44, 44, 44, 44, 44, 58, 58, 58, - 58, 64, 139, 64, 66, 138, 134, 66, 133, 66, - 66, 67, 132, 131, 67, 67, 67, 67, 73, 130, - 73, 73, 76, 76, 76, 76, 76, 76, 76, 76, - - 78, 78, 78, 78, 78, 78, 78, 78, 91, 160, - 91, 92, 129, 92, 92, 128, 92, 92, 121, 121, - 121, 121, 121, 121, 121, 121, 147, 147, 147, 147, - 147, 147, 147, 147, 127, 126, 125, 124, 61, 61, - 120, 119, 118, 117, 116, 115, 47, 114, 110, 113, - 111, 108, 107, 106, 48, 105, 104, 89, 103, 102, - 101, 99, 98, 97, 96, 95, 94, 79, 77, 90, - 89, 88, 59, 87, 86, 59, 84, 83, 80, 79, - 77, 74, 160, 60, 59, 55, 37, 160, 33, 25, - 26, 25, 11, 160, 160, 160, 160, 160, 160, 160, - - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160 + 10, 11, 12, 11, 13, 14, 10, 15, 16, 10, + 10, 10, 17, 10, 10, 10, 10, 18, 19, 20, + 21, 21, 21, 21, 21, 10, 10, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 10, 22, 10, 24, 25, 25, 25, + 32, 33, 33, 157, 26, 34, 34, 34, 51, 52, + 27, 26, 26, 26, 26, 10, 11, 12, 11, 13, + 14, 28, 15, 16, 28, 28, 28, 24, 28, 28, + 28, 10, 18, 19, 20, 29, 29, 29, 29, 29, + 30, 10, 29, 29, 29, 29, 29, 29, 29, 29, + + 29, 29, 29, 29, 29, 29, 29, 29, 10, 22, + 10, 23, 34, 34, 34, 37, 39, 43, 32, 33, + 33, 45, 54, 55, 46, 59, 45, 64, 156, 46, + 64, 64, 64, 79, 44, 38, 59, 57, 134, 47, + 135, 48, 80, 49, 47, 50, 48, 99, 61, 43, + 50, 110, 41, 67, 67, 67, 60, 63, 63, 63, + 57, 155, 68, 69, 63, 37, 44, 66, 67, 67, + 67, 63, 63, 63, 63, 73, 59, 68, 69, 70, + 34, 34, 34, 43, 75, 38, 154, 92, 83, 83, + 83, 64, 44, 120, 64, 64, 64, 67, 67, 67, + + 44, 57, 99, 68, 69, 107, 68, 69, 120, 127, + 108, 153, 152, 121, 83, 83, 83, 133, 133, 133, + 146, 133, 133, 133, 146, 140, 140, 140, 121, 141, + 140, 140, 140, 151, 141, 158, 150, 149, 148, 144, + 147, 143, 142, 139, 147, 36, 36, 36, 36, 36, + 36, 36, 36, 40, 138, 137, 136, 40, 40, 42, + 42, 42, 42, 42, 42, 42, 42, 56, 56, 56, + 56, 62, 132, 62, 64, 131, 130, 64, 129, 64, + 64, 65, 128, 158, 65, 65, 65, 65, 71, 127, + 71, 71, 74, 74, 74, 74, 74, 74, 74, 74, + + 76, 76, 76, 76, 76, 76, 76, 76, 89, 126, + 89, 90, 125, 90, 90, 124, 90, 90, 119, 119, + 119, 119, 119, 119, 119, 119, 145, 145, 145, 145, + 145, 145, 145, 145, 123, 122, 59, 59, 118, 117, + 116, 115, 114, 113, 45, 112, 108, 111, 109, 106, + 105, 104, 46, 103, 91, 87, 102, 101, 100, 98, + 97, 96, 95, 94, 93, 77, 75, 91, 88, 87, + 86, 57, 85, 84, 57, 82, 81, 78, 77, 75, + 72, 158, 58, 57, 53, 35, 158, 31, 23, 23, + 9, 158, 158, 158, 158, 158, 158, 158, 158, 158, + + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158 } ; -static yyconst flex_int16_t yy_chk[440] = +static yyconst flex_int16_t yy_chk[438] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 4, 9, 9, 9, - 10, 50, 4, 5, 5, 5, 5, 10, 10, 10, - 50, 5, 13, 13, 13, 20, 20, 5, 5, 5, - 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, - 14, 16, 17, 18, 19, 22, 22, 19, 25, 26, - 38, 158, 26, 31, 33, 44, 31, 31, 31, 157, - 18, 16, 19, 31, 19, 156, 19, 26, 19, 26, - 38, 26, 44, 26, 36, 36, 36, 155, 17, 25, - 28, 28, 28, 28, 130, 33, 130, 28, 46, 34, - 34, 34, 91, 91, 28, 28, 28, 28, 34, 34, - 34, 35, 35, 35, 61, 46, 75, 152, 151, 67, - 35, 35, 67, 67, 67, 112, 61, 61, 61, 67, - - 69, 69, 69, 75, 77, 85, 98, 77, 100, 69, - 69, 98, 100, 121, 129, 112, 150, 85, 85, 85, - 135, 135, 135, 143, 147, 149, 129, 129, 129, 146, - 138, 138, 138, 121, 138, 142, 142, 142, 145, 142, - 144, 141, 140, 143, 147, 161, 161, 161, 161, 161, - 161, 161, 161, 162, 139, 137, 136, 162, 162, 163, - 163, 163, 163, 163, 163, 163, 163, 164, 164, 164, - 164, 165, 134, 165, 166, 133, 128, 166, 127, 166, - 166, 167, 126, 125, 167, 167, 167, 167, 168, 124, - 168, 168, 169, 169, 169, 169, 169, 169, 169, 169, - - 170, 170, 170, 170, 170, 170, 170, 170, 171, 123, - 171, 172, 122, 172, 172, 120, 172, 172, 173, 173, - 173, 173, 173, 173, 173, 173, 174, 174, 174, 174, - 174, 174, 174, 174, 119, 118, 117, 116, 114, 113, - 111, 110, 109, 108, 107, 106, 105, 103, 102, 101, - 99, 97, 96, 95, 94, 93, 92, 90, 88, 87, - 86, 84, 83, 82, 81, 80, 79, 78, 76, 71, - 70, 68, 65, 63, 62, 58, 52, 51, 49, 48, - 47, 43, 40, 24, 23, 21, 15, 11, 8, 6, - 3, 2, 160, 160, 160, 160, 160, 160, 160, 160, - - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160 + 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, + 7, 7, 7, 156, 3, 11, 11, 11, 18, 18, + 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 8, 12, 12, 12, 14, 15, 16, 8, 8, + 8, 17, 20, 20, 17, 23, 24, 29, 155, 24, + 29, 29, 29, 48, 16, 14, 31, 29, 128, 17, + 128, 17, 48, 17, 24, 17, 24, 99, 24, 42, + 24, 99, 15, 33, 33, 33, 23, 26, 26, 26, + 26, 154, 33, 33, 26, 36, 42, 31, 32, 32, + 32, 26, 26, 26, 26, 44, 59, 32, 32, 32, + 34, 34, 34, 73, 75, 36, 153, 75, 59, 59, + 59, 65, 44, 110, 65, 65, 65, 67, 67, 67, + + 73, 65, 83, 89, 89, 97, 67, 67, 119, 127, + 97, 150, 149, 110, 83, 83, 83, 133, 133, 133, + 141, 127, 127, 127, 145, 136, 136, 136, 119, 136, + 140, 140, 140, 148, 140, 147, 144, 143, 142, 139, + 141, 138, 137, 135, 145, 159, 159, 159, 159, 159, + 159, 159, 159, 160, 134, 132, 131, 160, 160, 161, + 161, 161, 161, 161, 161, 161, 161, 162, 162, 162, + 162, 163, 126, 163, 164, 125, 124, 164, 123, 164, + 164, 165, 122, 121, 165, 165, 165, 165, 166, 120, + 166, 166, 167, 167, 167, 167, 167, 167, 167, 167, + + 168, 168, 168, 168, 168, 168, 168, 168, 169, 118, + 169, 170, 117, 170, 170, 116, 170, 170, 171, 171, + 171, 171, 171, 171, 171, 171, 172, 172, 172, 172, + 172, 172, 172, 172, 115, 114, 112, 111, 109, 108, + 107, 106, 105, 104, 103, 102, 101, 100, 98, 96, + 95, 94, 93, 92, 90, 88, 86, 85, 84, 82, + 81, 80, 79, 78, 77, 76, 74, 72, 69, 68, + 66, 63, 61, 60, 56, 50, 49, 47, 46, 45, + 41, 38, 22, 21, 19, 13, 9, 6, 4, 2, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158 } ; static yy_state_type yy_last_accepting_state; @@ -631,13 +632,13 @@ char *yytext; - -#line 38 "dtc-lexer.l" +#line 37 "dtc-lexer.l" #include "dtc.h" #include "srcpos.h" #include "dtc-parser.tab.h" YYLTYPE yylloc; +extern bool treesource_error; /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ #define YY_USER_ACTION \ @@ -659,14 +660,14 @@ static int dts_version = 1; BEGIN(V1); \ static void push_input_file(const char *filename); -static int pop_input_file(void); -#line 664 "dtc-lexer.lex.c" +static bool pop |