aboutsummaryrefslogtreecommitdiff
path: root/scripts/dtc/dtc-lexer.lex.c_shipped
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc/dtc-lexer.lex.c_shipped')
-rw-r--r--scripts/dtc/dtc-lexer.lex.c_shipped81
1 files changed, 38 insertions, 43 deletions
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
index d77fdfe..3934d86 100644
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
@@ -663,14 +663,9 @@ static int dts_version = 1;
static void push_input_file(const char *filename);
static bool pop_input_file(void);
-#ifdef __GNUC__
-static void lexical_error(const char *fmt, ...)
- __attribute__((format (printf, 1, 2)));
-#else
-static void lexical_error(const char *fmt, ...);
-#endif
+static void PRINTF(1, 2) lexical_error(const char *fmt, ...);
-#line 674 "dtc-lexer.lex.c"
+#line 669 "dtc-lexer.lex.c"
#define INITIAL 0
#define BYTESTRING 1
@@ -861,9 +856,9 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 74 "dtc-lexer.l"
+#line 69 "dtc-lexer.l"
-#line 867 "dtc-lexer.lex.c"
+#line 862 "dtc-lexer.lex.c"
if ( !(yy_init) )
{
@@ -946,7 +941,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
-#line 75 "dtc-lexer.l"
+#line 70 "dtc-lexer.l"
{
char *name = strchr(yytext, '\"') + 1;
yytext[yyleng-1] = '\0';
@@ -956,7 +951,7 @@ YY_RULE_SETUP
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 81 "dtc-lexer.l"
+#line 76 "dtc-lexer.l"
{
char *line, *fnstart, *fnend;
struct data fn;
@@ -990,7 +985,7 @@ case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(BYTESTRING):
case YY_STATE_EOF(PROPNODENAME):
case YY_STATE_EOF(V1):
-#line 110 "dtc-lexer.l"
+#line 105 "dtc-lexer.l"
{
if (!pop_input_file()) {
yyterminate();
@@ -1000,7 +995,7 @@ case YY_STATE_EOF(V1):
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 116 "dtc-lexer.l"
+#line 111 "dtc-lexer.l"
{
DPRINT("String: %s\n", yytext);
yylval.data = data_copy_escape_string(yytext+1,
@@ -1010,7 +1005,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 123 "dtc-lexer.l"
+#line 118 "dtc-lexer.l"
{
DPRINT("Keyword: /dts-v1/\n");
dts_version = 1;
@@ -1020,7 +1015,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 130 "dtc-lexer.l"
+#line 125 "dtc-lexer.l"
{
DPRINT("Keyword: /plugin/\n");
return DT_PLUGIN;
@@ -1028,7 +1023,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 135 "dtc-lexer.l"
+#line 130 "dtc-lexer.l"
{
DPRINT("Keyword: /memreserve/\n");
BEGIN_DEFAULT();
@@ -1037,7 +1032,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 141 "dtc-lexer.l"
+#line 136 "dtc-lexer.l"
{
DPRINT("Keyword: /bits/\n");
BEGIN_DEFAULT();
@@ -1046,7 +1041,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 147 "dtc-lexer.l"
+#line 142 "dtc-lexer.l"
{
DPRINT("Keyword: /delete-property/\n");
DPRINT("<PROPNODENAME>\n");
@@ -1056,7 +1051,7 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 154 "dtc-lexer.l"
+#line 149 "dtc-lexer.l"
{
DPRINT("Keyword: /delete-node/\n");
DPRINT("<PROPNODENAME>\n");
@@ -1066,7 +1061,7 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 161 "dtc-lexer.l"
+#line 156 "dtc-lexer.l"
{
DPRINT("Label: %s\n", yytext);
yylval.labelref = xstrdup(yytext);
@@ -1076,7 +1071,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 168 "dtc-lexer.l"
+#line 163 "dtc-lexer.l"
{
char *e;
DPRINT("Integer Literal: '%s'\n", yytext);
@@ -1102,7 +1097,7 @@ YY_RULE_SETUP
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
-#line 190 "dtc-lexer.l"
+#line 185 "dtc-lexer.l"
{
struct data d;
DPRINT("Character literal: %s\n", yytext);
@@ -1126,7 +1121,7 @@ YY_RULE_SETUP
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 211 "dtc-lexer.l"
+#line 206 "dtc-lexer.l"
{ /* label reference */
DPRINT("Ref: %s\n", yytext+1);
yylval.labelref = xstrdup(yytext+1);
@@ -1135,7 +1130,7 @@ YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 217 "dtc-lexer.l"
+#line 212 "dtc-lexer.l"
{ /* new-style path reference */
yytext[yyleng-1] = '\0';
DPRINT("Ref: %s\n", yytext+2);
@@ -1145,7 +1140,7 @@ YY_RULE_SETUP
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 224 "dtc-lexer.l"
+#line 219 "dtc-lexer.l"
{
yylval.byte = strtol(yytext, NULL, 16);
DPRINT("Byte: %02x\n", (int)yylval.byte);
@@ -1154,7 +1149,7 @@ YY_RULE_SETUP
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 230 "dtc-lexer.l"
+#line 225 "dtc-lexer.l"
{
DPRINT("/BYTESTRING\n");
BEGIN_DEFAULT();
@@ -1163,7 +1158,7 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 236 "dtc-lexer.l"
+#line 231 "dtc-lexer.l"
{
DPRINT("PropNodeName: %s\n", yytext);
yylval.propnodename = xstrdup((yytext[0] == '\\') ?
@@ -1174,7 +1169,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 244 "dtc-lexer.l"
+#line 239 "dtc-lexer.l"
{
DPRINT("Binary Include\n");
return DT_INCBIN;
@@ -1183,64 +1178,64 @@ YY_RULE_SETUP
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
-#line 249 "dtc-lexer.l"
+#line 244 "dtc-lexer.l"
/* eat whitespace */
YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
-#line 250 "dtc-lexer.l"
+#line 245 "dtc-lexer.l"
/* eat C-style comments */
YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
-#line 251 "dtc-lexer.l"
+#line 246 "dtc-lexer.l"
/* eat C++-style comments */
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 253 "dtc-lexer.l"
+#line 248 "dtc-lexer.l"
{ return DT_LSHIFT; };
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 254 "dtc-lexer.l"
+#line 249 "dtc-lexer.l"
{ return DT_RSHIFT; };
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 255 "dtc-lexer.l"
+#line 250 "dtc-lexer.l"
{ return DT_LE; };
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 256 "dtc-lexer.l"
+#line 251 "dtc-lexer.l"
{ return DT_GE; };
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 257 "dtc-lexer.l"
+#line 252 "dtc-lexer.l"
{ return DT_EQ; };
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 258 "dtc-lexer.l"
+#line 253 "dtc-lexer.l"
{ return DT_NE; };
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 259 "dtc-lexer.l"
+#line 254 "dtc-lexer.l"
{ return DT_AND; };
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 260 "dtc-lexer.l"
+#line 255 "dtc-lexer.l"
{ return DT_OR; };
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 262 "dtc-lexer.l"
+#line 257 "dtc-lexer.l"
{
DPRINT("Char: %c (\\x%02x)\n", yytext[0],
(unsigned)yytext[0]);
@@ -1258,10 +1253,10 @@ YY_RULE_SETUP
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 277 "dtc-lexer.l"
+#line 272 "dtc-lexer.l"
ECHO;
YY_BREAK
-#line 1265 "dtc-lexer.lex.c"
+#line 1260 "dtc-lexer.lex.c"
case YY_END_OF_BUFFER:
{
@@ -2220,7 +2215,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 277 "dtc-lexer.l"
+#line 272 "dtc-lexer.l"