aboutsummaryrefslogtreecommitdiffstats
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_shipped59
1 files changed, 5 insertions, 54 deletions
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
index 50c4420b4b2c..8bbe12817050 100644
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
@@ -1,6 +1,5 @@
1#line 2 "dtc-lexer.lex.c"
2 1
3#line 4 "dtc-lexer.lex.c" 2#line 3 "scripts/dtc/dtc-lexer.lex.c_shipped"
4 3
5#define YY_INT_ALIGNED short int 4#define YY_INT_ALIGNED short int
6 5
@@ -54,6 +53,7 @@ typedef int flex_int32_t;
54typedef unsigned char flex_uint8_t; 53typedef unsigned char flex_uint8_t;
55typedef unsigned short int flex_uint16_t; 54typedef unsigned short int flex_uint16_t;
56typedef unsigned int flex_uint32_t; 55typedef unsigned int flex_uint32_t;
56#endif /* ! C99 */
57 57
58/* Limits of integral types. */ 58/* Limits of integral types. */
59#ifndef INT8_MIN 59#ifndef INT8_MIN
@@ -84,8 +84,6 @@ typedef unsigned int flex_uint32_t;
84#define UINT32_MAX (4294967295U) 84#define UINT32_MAX (4294967295U)
85#endif 85#endif
86 86
87#endif /* ! C99 */
88
89#endif /* ! FLEXINT_H */ 87#endif /* ! FLEXINT_H */
90 88
91#ifdef __cplusplus 89#ifdef __cplusplus
@@ -142,15 +140,7 @@ typedef unsigned int flex_uint32_t;
142 140
143/* Size of default input buffer. */ 141/* Size of default input buffer. */
144#ifndef YY_BUF_SIZE 142#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
152#define YY_BUF_SIZE 16384 143#define YY_BUF_SIZE 16384
153#endif /* __ia64__ */
154#endif 144#endif
155 145
156/* The state buf must be large enough to hold one state per character in the main buffer. 146/* 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;
550#define YY_MORE_ADJ 0 540#define YY_MORE_ADJ 0
551#define YY_RESTORE_YY_MORE_OFFSET 541#define YY_RESTORE_YY_MORE_OFFSET
552char *yytext; 542char *yytext;
553#line 1 "dtc-lexer.l"
554/* 543/*
555 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 544 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
556 * 545 *
@@ -572,10 +561,6 @@ char *yytext;
572 */ 561 */
573#define YY_NO_INPUT 1 562#define YY_NO_INPUT 1
574 563
575
576
577
578#line 37 "dtc-lexer.l"
579#include "dtc.h" 564#include "dtc.h"
580#include "srcpos.h" 565#include "srcpos.h"
581#include "dtc-parser.tab.h" 566#include "dtc-parser.tab.h"
@@ -603,7 +588,6 @@ static int dts_version = 1;
603 588
604static void push_input_file(const char *filename); 589static void push_input_file(const char *filename);
605static int pop_input_file(void); 590static int pop_input_file(void);
606#line 607 "dtc-lexer.lex.c"
607 591
608#define INITIAL 0 592#define INITIAL 0
609#define INCLUDE 1 593#define INCLUDE 1
@@ -686,12 +670,7 @@ static int input (void );
686 670
687/* Amount of stuff to slurp up with each read. */ 671/* Amount of stuff to slurp up with each read. */
688#ifndef YY_READ_BUF_SIZE 672#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
693#define YY_READ_BUF_SIZE 8192 673#define YY_READ_BUF_SIZE 8192
694#endif /* __ia64__ */
695#endif 674#endif
696 675
697/* Copy whatever the last rule matched to the standard output. */ 676/* Copy whatever the last rule matched to the standard output. */
@@ -710,7 +689,7 @@ static int input (void );
710 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 689 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
711 { \ 690 { \
712 int c = '*'; \ 691 int c = '*'; \
713 size_t n; \ 692 unsigned n; \
714 for ( n = 0; n < max_size && \ 693 for ( n = 0; n < max_size && \
715 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 694 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
716 buf[n] = (char) c; \ 695 buf[n] = (char) c; \
@@ -792,10 +771,6 @@ YY_DECL
792 register char *yy_cp, *yy_bp; 771 register char *yy_cp, *yy_bp;
793 register int yy_act; 772 register int yy_act;
794 773
795#line 66 "dtc-lexer.l"
796
797#line 798 "dtc-lexer.lex.c"
798
799 if ( !(yy_init) ) 774 if ( !(yy_init) )
800 { 775 {
801 (yy_init) = 1; 776 (yy_init) = 1;
@@ -876,7 +851,6 @@ do_action: /* This label is used only to access EOF actions. */
876case 1: 851case 1:
877/* rule 1 can match eol */ 852/* rule 1 can match eol */
878YY_RULE_SETUP 853YY_RULE_SETUP
879#line 67 "dtc-lexer.l"
880{ 854{
881 char *name = strchr(yytext, '\"') + 1; 855 char *name = strchr(yytext, '\"') + 1;
882 yytext[yyleng-1] = '\0'; 856 yytext[yyleng-1] = '\0';
@@ -888,7 +862,6 @@ case YY_STATE_EOF(INCLUDE):
888case YY_STATE_EOF(BYTESTRING): 862case YY_STATE_EOF(BYTESTRING):
889case YY_STATE_EOF(PROPNODENAME): 863case YY_STATE_EOF(PROPNODENAME):
890case YY_STATE_EOF(V1): 864case YY_STATE_EOF(V1):
891#line 73 "dtc-lexer.l"
892{ 865{
893 if (!pop_input_file()) { 866 if (!pop_input_file()) {
894 yyterminate(); 867 yyterminate();
@@ -898,7 +871,6 @@ case YY_STATE_EOF(V1):
898case 2: 871case 2:
899/* rule 2 can match eol */ 872/* rule 2 can match eol */
900YY_RULE_SETUP 873YY_RULE_SETUP
901#line 79 "dtc-lexer.l"
902{ 874{
903 DPRINT("String: %s\n", yytext); 875 DPRINT("String: %s\n", yytext);
904 yylval.data = data_copy_escape_string(yytext+1, 876 yylval.data = data_copy_escape_string(yytext+1,
@@ -908,7 +880,6 @@ YY_RULE_SETUP
908 YY_BREAK 880 YY_BREAK
909case 3: 881case 3:
910YY_RULE_SETUP 882YY_RULE_SETUP
911#line 86 "dtc-lexer.l"
912{ 883{
913 DPRINT("Keyword: /dts-v1/\n"); 884 DPRINT("Keyword: /dts-v1/\n");
914 dts_version = 1; 885 dts_version = 1;
@@ -918,7 +889,6 @@ YY_RULE_SETUP
918 YY_BREAK 889 YY_BREAK
919case 4: 890case 4:
920YY_RULE_SETUP 891YY_RULE_SETUP
921#line 93 "dtc-lexer.l"
922{ 892{
923 DPRINT("Keyword: /memreserve/\n"); 893 DPRINT("Keyword: /memreserve/\n");
924 BEGIN_DEFAULT(); 894 BEGIN_DEFAULT();
@@ -927,7 +897,6 @@ YY_RULE_SETUP
927 YY_BREAK 897 YY_BREAK
928case 5: 898case 5:
929YY_RULE_SETUP 899YY_RULE_SETUP
930#line 99 "dtc-lexer.l"
931{ 900{
932 DPRINT("Label: %s\n", yytext); 901 DPRINT("Label: %s\n", yytext);
933 yylval.labelref = xstrdup(yytext); 902 yylval.labelref = xstrdup(yytext);
@@ -937,7 +906,6 @@ YY_RULE_SETUP
937 YY_BREAK 906 YY_BREAK
938case 6: 907case 6:
939YY_RULE_SETUP 908YY_RULE_SETUP
940#line 106 "dtc-lexer.l"
941{ 909{
942 yylval.literal = xstrdup(yytext); 910 yylval.literal = xstrdup(yytext);
943 DPRINT("Literal: '%s'\n", yylval.literal); 911 DPRINT("Literal: '%s'\n", yylval.literal);
@@ -946,7 +914,6 @@ YY_RULE_SETUP
946 YY_BREAK 914 YY_BREAK
947case 7: 915case 7:
948YY_RULE_SETUP 916YY_RULE_SETUP
949#line 112 "dtc-lexer.l"
950{ /* label reference */ 917{ /* label reference */
951 DPRINT("Ref: %s\n", yytext+1); 918 DPRINT("Ref: %s\n", yytext+1);
952 yylval.labelref = xstrdup(yytext+1); 919 yylval.labelref = xstrdup(yytext+1);
@@ -955,7 +922,6 @@ YY_RULE_SETUP
955 YY_BREAK 922 YY_BREAK
956case 8: 923case 8:
957YY_RULE_SETUP 924YY_RULE_SETUP
958#line 118 "dtc-lexer.l"
959{ /* new-style path reference */ 925{ /* new-style path reference */
960 yytext[yyleng-1] = '\0'; 926 yytext[yyleng-1] = '\0';
961 DPRINT("Ref: %s\n", yytext+2); 927 DPRINT("Ref: %s\n", yytext+2);
@@ -965,7 +931,6 @@ YY_RULE_SETUP
965 YY_BREAK 931 YY_BREAK
966case 9: 932case 9:
967YY_RULE_SETUP 933YY_RULE_SETUP
968#line 125 "dtc-lexer.l"
969{ 934{
970 yylval.byte = strtol(yytext, NULL, 16); 935 yylval.byte = strtol(yytext, NULL, 16);
971 DPRINT("Byte: %02x\n", (int)yylval.byte); 936 DPRINT("Byte: %02x\n", (int)yylval.byte);
@@ -974,7 +939,6 @@ YY_RULE_SETUP
974 YY_BREAK 939 YY_BREAK
975case 10: 940case 10:
976YY_RULE_SETUP 941YY_RULE_SETUP
977#line 131 "dtc-lexer.l"
978{ 942{
979 DPRINT("/BYTESTRING\n"); 943 DPRINT("/BYTESTRING\n");
980 BEGIN_DEFAULT(); 944 BEGIN_DEFAULT();
@@ -983,7 +947,6 @@ YY_RULE_SETUP
983 YY_BREAK 947 YY_BREAK
984case 11: 948case 11:
985YY_RULE_SETUP 949YY_RULE_SETUP
986#line 137 "dtc-lexer.l"
987{ 950{
988 DPRINT("PropNodeName: %s\n", yytext); 951 DPRINT("PropNodeName: %s\n", yytext);
989 yylval.propnodename = xstrdup(yytext); 952 yylval.propnodename = xstrdup(yytext);
@@ -993,7 +956,6 @@ YY_RULE_SETUP
993 YY_BREAK 956 YY_BREAK
994case 12: 957case 12:
995YY_RULE_SETUP 958YY_RULE_SETUP
996#line 144 "dtc-lexer.l"
997{ 959{
998 DPRINT("Binary Include\n"); 960 DPRINT("Binary Include\n");
999 return DT_INCBIN; 961 return DT_INCBIN;
@@ -1002,24 +964,20 @@ YY_RULE_SETUP
1002case 13: 964case 13:
1003/* rule 13 can match eol */ 965/* rule 13 can match eol */
1004YY_RULE_SETUP 966YY_RULE_SETUP
1005#line 149 "dtc-lexer.l"
1006/* eat whitespace */ 967/* eat whitespace */
1007 YY_BREAK 968 YY_BREAK
1008case 14: 969case 14:
1009/* rule 14 can match eol */ 970/* rule 14 can match eol */
1010YY_RULE_SETUP 971YY_RULE_SETUP
1011#line 150 "dtc-lexer.l"
1012/* eat C-style comments */ 972/* eat C-style comments */
1013 YY_BREAK 973 YY_BREAK
1014case 15: 974case 15:
1015/* rule 15 can match eol */ 975/* rule 15 can match eol */
1016YY_RULE_SETUP 976YY_RULE_SETUP
1017#line 151 "dtc-lexer.l"
1018/* eat C++-style comments */ 977/* eat C++-style comments */
1019 YY_BREAK 978 YY_BREAK
1020case 16: 979case 16:
1021YY_RULE_SETUP 980YY_RULE_SETUP
1022#line 153 "dtc-lexer.l"
1023{ 981{
1024 DPRINT("Char: %c (\\x%02x)\n", yytext[0], 982 DPRINT("Char: %c (\\x%02x)\n", yytext[0],
1025 (unsigned)yytext[0]); 983 (unsigned)yytext[0]);
@@ -1037,10 +995,8 @@ YY_RULE_SETUP
1037 YY_BREAK 995 YY_BREAK
1038case 17: 996case 17:
1039YY_RULE_SETUP 997YY_RULE_SETUP
1040#line 168 "dtc-lexer.l"
1041ECHO; 998ECHO;
1042 YY_BREAK 999 YY_BREAK
1043#line 1044 "dtc-lexer.lex.c"
1044 1000
1045 case YY_END_OF_BUFFER: 1001 case YY_END_OF_BUFFER:
1046 { 1002 {
@@ -1756,8 +1712,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1756 1712
1757/** Setup the input buffer state to scan the given bytes. The next call to yylex() will 1713/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1758 * scan from a @e copy of @a bytes. 1714 * scan from a @e copy of @a bytes.
1759 * @param yybytes the byte buffer to scan 1715 * @param bytes the byte buffer to scan
1760 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 1716 * @param len the number of bytes in the buffer pointed to by @a bytes.
1761 * 1717 *
1762 * @return the newly allocated buffer state object. 1718 * @return the newly allocated buffer state object.
1763 */ 1719 */
@@ -1996,10 +1952,6 @@ void yyfree (void * ptr )
1996 1952
1997#define YYTABLES_NAME "yytables" 1953#define YYTABLES_NAME "yytables"
1998 1954
1999#line 168 "dtc-lexer.l"
2000
2001
2002
2003static void push_input_file(const char *filename) 1955static void push_input_file(const char *filename)
2004{ 1956{
2005 assert(filename); 1957 assert(filename);
@@ -2011,7 +1963,6 @@ static void push_input_file(const char *filename)
2011 yypush_buffer_state(yy_create_buffer(yyin,YY_BUF_SIZE)); 1963 yypush_buffer_state(yy_create_buffer(yyin,YY_BUF_SIZE));
2012} 1964}
2013 1965
2014
2015static int pop_input_file(void) 1966static int pop_input_file(void)
2016{ 1967{
2017 if (srcfile_pop() == 0) 1968 if (srcfile_pop() == 0)