1- #line 2 "dtc-lexer.lex.c"
21
3- #line 4 " dtc-lexer.lex.c "
2+ #line 3 "scripts/ dtc/dtc -lexer.lex.c_shipped "
43
54#define YY_INT_ALIGNED short int
65
@@ -54,6 +53,7 @@ typedef int flex_int32_t;
5453typedef unsigned char flex_uint8_t;
5554typedef unsigned short int flex_uint16_t;
5655typedef unsigned int flex_uint32_t;
56+ #endif /* ! C99 */
5757
5858/* Limits of integral types. */
5959#ifndef INT8_MIN
@@ -84,8 +84,6 @@ typedef unsigned int flex_uint32_t;
8484#define UINT32_MAX (4294967295U)
8585#endif
8686
87- #endif /* ! C99 */
88-
8987#endif /* ! FLEXINT_H */
9088
9189#ifdef __cplusplus
@@ -142,15 +140,7 @@ typedef unsigned int flex_uint32_t;
142140
143141/* Size of default input buffer. */
144142#ifndef YY_BUF_SIZE
145- #ifdef __ia64__
146- /* On IA-64, the buffer size is 16k, not 8k.
147- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
148- * Ditto for the __ia64__ case accordingly.
149- */
150- #define YY_BUF_SIZE 32768
151- #else
152143#define YY_BUF_SIZE 16384
153- #endif /* __ia64__ */
154144#endif
155145
156146/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -550,7 +540,6 @@ int yy_flex_debug = 0;
550540#define YY_MORE_ADJ 0
551541#define YY_RESTORE_YY_MORE_OFFSET
552542char *yytext;
553- #line 1 "dtc-lexer.l"
554543/*
555544 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
556545 *
@@ -572,10 +561,6 @@ char *yytext;
572561 */
573562#define YY_NO_INPUT 1
574563
575-
576-
577-
578- #line 37 "dtc-lexer.l"
579564#include "dtc.h"
580565#include "srcpos.h"
581566#include "dtc-parser.tab.h"
@@ -603,7 +588,6 @@ static int dts_version = 1;
603588
604589static void push_input_file(const char *filename);
605590static int pop_input_file(void);
606- #line 607 "dtc-lexer.lex.c"
607591
608592#define INITIAL 0
609593#define INCLUDE 1
@@ -686,12 +670,7 @@ static int input (void );
686670
687671/* Amount of stuff to slurp up with each read. */
688672#ifndef YY_READ_BUF_SIZE
689- #ifdef __ia64__
690- /* On IA-64, the buffer size is 16k, not 8k */
691- #define YY_READ_BUF_SIZE 16384
692- #else
693673#define YY_READ_BUF_SIZE 8192
694- #endif /* __ia64__ */
695674#endif
696675
697676/* Copy whatever the last rule matched to the standard output. */
@@ -710,7 +689,7 @@ static int input (void );
710689 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
711690 { \
712691 int c = '*'; \
713- size_t n; \
692+ unsigned n; \
714693 for ( n = 0; n < max_size && \
715694 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
716695 buf[n] = (char) c; \
@@ -792,10 +771,6 @@ YY_DECL
792771 register char *yy_cp, *yy_bp;
793772 register int yy_act;
794773
795- #line 66 "dtc-lexer.l"
796-
797- #line 798 "dtc-lexer.lex.c"
798-
799774 if ( !(yy_init) )
800775 {
801776 (yy_init) = 1;
@@ -876,7 +851,6 @@ do_action: /* This label is used only to access EOF actions. */
876851case 1:
877852/* rule 1 can match eol */
878853YY_RULE_SETUP
879- #line 67 "dtc-lexer.l"
880854{
881855 char *name = strchr(yytext, '\"') + 1;
882856 yytext[yyleng-1] = '\0';
@@ -888,7 +862,6 @@ case YY_STATE_EOF(INCLUDE):
888862case YY_STATE_EOF(BYTESTRING):
889863case YY_STATE_EOF(PROPNODENAME):
890864case YY_STATE_EOF(V1):
891- #line 73 "dtc-lexer.l"
892865{
893866 if (!pop_input_file()) {
894867 yyterminate();
@@ -898,7 +871,6 @@ case YY_STATE_EOF(V1):
898871case 2:
899872/* rule 2 can match eol */
900873YY_RULE_SETUP
901- #line 79 "dtc-lexer.l"
902874{
903875 DPRINT("String: %s\n", yytext);
904876 yylval.data = data_copy_escape_string(yytext+1,
@@ -908,7 +880,6 @@ YY_RULE_SETUP
908880 YY_BREAK
909881case 3:
910882YY_RULE_SETUP
911- #line 86 "dtc-lexer.l"
912883{
913884 DPRINT("Keyword: /dts-v1/\n");
914885 dts_version = 1;
@@ -918,7 +889,6 @@ YY_RULE_SETUP
918889 YY_BREAK
919890case 4:
920891YY_RULE_SETUP
921- #line 93 "dtc-lexer.l"
922892{
923893 DPRINT("Keyword: /memreserve/\n");
924894 BEGIN_DEFAULT();
@@ -927,7 +897,6 @@ YY_RULE_SETUP
927897 YY_BREAK
928898case 5:
929899YY_RULE_SETUP
930- #line 99 "dtc-lexer.l"
931900{
932901 DPRINT("Label: %s\n", yytext);
933902 yylval.labelref = xstrdup(yytext);
@@ -937,7 +906,6 @@ YY_RULE_SETUP
937906 YY_BREAK
938907case 6:
939908YY_RULE_SETUP
940- #line 106 "dtc-lexer.l"
941909{
942910 yylval.literal = xstrdup(yytext);
943911 DPRINT("Literal: '%s'\n", yylval.literal);
@@ -946,7 +914,6 @@ YY_RULE_SETUP
946914 YY_BREAK
947915case 7:
948916YY_RULE_SETUP
949- #line 112 "dtc-lexer.l"
950917{ /* label reference */
951918 DPRINT("Ref: %s\n", yytext+1);
952919 yylval.labelref = xstrdup(yytext+1);
@@ -955,7 +922,6 @@ YY_RULE_SETUP
955922 YY_BREAK
956923case 8:
957924YY_RULE_SETUP
958- #line 118 "dtc-lexer.l"
959925{ /* new-style path reference */
960926 yytext[yyleng-1] = '\0';
961927 DPRINT("Ref: %s\n", yytext+2);
@@ -965,7 +931,6 @@ YY_RULE_SETUP
965931 YY_BREAK
966932case 9:
967933YY_RULE_SETUP
968- #line 125 "dtc-lexer.l"
969934{
970935 yylval.byte = strtol(yytext, NULL, 16);
971936 DPRINT("Byte: %02x\n", (int)yylval.byte);
@@ -974,7 +939,6 @@ YY_RULE_SETUP
974939 YY_BREAK
975940case 10:
976941YY_RULE_SETUP
977- #line 131 "dtc-lexer.l"
978942{
979943 DPRINT("/BYTESTRING\n");
980944 BEGIN_DEFAULT();
@@ -983,7 +947,6 @@ YY_RULE_SETUP
983947 YY_BREAK
984948case 11:
985949YY_RULE_SETUP
986- #line 137 "dtc-lexer.l"
987950{
988951 DPRINT("PropNodeName: %s\n", yytext);
989952 yylval.propnodename = xstrdup(yytext);
@@ -993,7 +956,6 @@ YY_RULE_SETUP
993956 YY_BREAK
994957case 12:
995958YY_RULE_SETUP
996- #line 144 "dtc-lexer.l"
997959{
998960 DPRINT("Binary Include\n");
999961 return DT_INCBIN;
@@ -1002,24 +964,20 @@ YY_RULE_SETUP
1002964case 13:
1003965/* rule 13 can match eol */
1004966YY_RULE_SETUP
1005- #line 149 "dtc-lexer.l"
1006967/* eat whitespace */
1007968 YY_BREAK
1008969case 14:
1009970/* rule 14 can match eol */
1010971YY_RULE_SETUP
1011- #line 150 "dtc-lexer.l"
1012972/* eat C-style comments */
1013973 YY_BREAK
1014974case 15:
1015975/* rule 15 can match eol */
1016976YY_RULE_SETUP
1017- #line 151 "dtc-lexer.l"
1018977/* eat C++-style comments */
1019978 YY_BREAK
1020979case 16:
1021980YY_RULE_SETUP
1022- #line 153 "dtc-lexer.l"
1023981{
1024982 DPRINT("Char: %c (\\x%02x)\n", yytext[0],
1025983 (unsigned)yytext[0]);
@@ -1037,10 +995,8 @@ YY_RULE_SETUP
1037995 YY_BREAK
1038996case 17:
1039997YY_RULE_SETUP
1040- #line 168 "dtc-lexer.l"
1041998ECHO;
1042999 YY_BREAK
1043- #line 1044 "dtc-lexer.lex.c"
10441000
10451001 case YY_END_OF_BUFFER:
10461002 {
@@ -1756,8 +1712,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
17561712
17571713/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
17581714 * scan from a @e copy of @a bytes.
1759- * @param yybytes the byte buffer to scan
1760- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1715+ * @param bytes the byte buffer to scan
1716+ * @param len the number of bytes in the buffer pointed to by @a bytes.
17611717 *
17621718 * @return the newly allocated buffer state object.
17631719 */
@@ -1996,10 +1952,6 @@ void yyfree (void * ptr )
19961952
19971953#define YYTABLES_NAME "yytables"
19981954
1999- #line 168 "dtc-lexer.l"
2000-
2001-
2002-
20031955static void push_input_file(const char *filename)
20041956{
20051957 assert(filename);
@@ -2011,7 +1963,6 @@ static void push_input_file(const char *filename)
20111963 yypush_buffer_state(yy_create_buffer(yyin,YY_BUF_SIZE));
20121964}
20131965
2014-
20151966static int pop_input_file(void)
20161967{
20171968 if (srcfile_pop() == 0)
0 commit comments