llvm.org GIT mirror llvm / e3d936a
Remove some unnecessary C-style statics. Restore an assertion that arithmetic can be performed on this format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43638 91177308-0d34-0410-b5e6-96231b3b80d8 Neil Booth 13 years ago
3 changed file(s) with 124 addition(s) and 94 deletion(s). Raw diff Collapse all Expand all
120120
121121 If the exponent overflows, returns a large exponent with the
122122 appropriate sign. */
123 static int
123 int
124124 readExponent(const char *p)
125125 {
126126 bool isNegative;
158158
159159 /* This is ugly and needs cleaning up, but I don't immediately see
160160 how whilst remaining safe. */
161 static int
161 int
162162 totalExponent(const char *p, int exponentAdjustment)
163163 {
164164 integerPart unsignedExponent;
432432
433433 /* Place pow(5, power) in DST, and return the number of parts used.
434434 DST must be at least one part larger than size of the answer. */
435 static unsigned int
435 unsigned int
436436 powerOf5(integerPart *dst, unsigned int power)
437437 {
438438 static integerPart firstEightPowers[] = { 1, 5, 25, 125, 625, 3125,
503503 /* Write out an integerPart in hexadecimal, starting with the most
504504 significant nibble. Write out exactly COUNT hexdigits, return
505505 COUNT. */
506 static unsigned int
506 unsigned int
507507 partAsHex (char *dst, integerPart part, unsigned int count,
508508 const char *hexDigitChars)
509509 {
521521 }
522522
523523 /* Write out an unsigned decimal integer. */
524 static char *
524 char *
525525 writeUnsignedDecimal (char *dst, unsigned int n)
526526 {
527527 char buff[40], *p;
539539 }
540540
541541 /* Write out a signed decimal integer. */
542 static char *
542 char *
543543 writeSignedDecimal (char *dst, int value)
544544 {
545545 if (value < 0) {
17481748 lostFraction lost_fraction;
17491749 const integerPart *src;
17501750 unsigned int dstPartsCount, truncatedBits;
1751
1752 assertArithmeticOK(*semantics);
17511753
17521754 /* Handle the three special cases first. */
17531755 if(category == fcInfinity || category == fcNaN)
2020 /* A lexical scanner generated by flex */
2121
2222 /* Scanner skeleton version:
23 * $Header: /cvs/root/flex/flex/skel.c,v 1.2 2004/05/07 00:28:17 jkh Exp $
23 * $NetBSD: flex.skl,v 1.22 2005/08/08 01:28:08 christos Exp $
2424 */
2525
2626 #define FLEX_SCANNER
256256
257257 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
258258 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
259 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, yy_size_t len ));
260 #ifdef __cplusplus
261 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, int size ));
259262 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
260
261 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
262 static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
263 static void yy_flex_free YY_PROTO(( void * ));
263 #endif
264264
265265 #define yy_new_buffer yy_create_buffer
266266
289289 int yylineno = 1;
290290 extern char *yytext;
291291 #define yytext_ptr yytext
292
293 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
294 static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ))
295 #ifdef __GNUC__
296 __attribute__((__unused__))
297 #endif
298 ;
299 static void yy_flex_free YY_PROTO(( void * ));
292300
293301 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
294302 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
501509 #define YY_MORE_ADJ 0
502510 #define YY_RESTORE_YY_MORE_OFFSET
503511 char *yytext;
504 #line 1 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
512 #line 1 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
505513 #define INITIAL 0
506514 /*===-- FileLexer.l - Scanner for TableGen Files ----------------*- C++ -*-===//
507515 //
517525 //
518526 //===----------------------------------------------------------------------===*/
519527 #define YY_NEVER_INTERACTIVE 1
520 #define comment 1
521
522 #line 30 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
528 #define in_comment 1
529
530 #line 30 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
523531 #include "llvm/Config/config.h"
524532 #include "llvm/Support/Streams.h"
525533 #include "Record.h"
665673
666674 using namespace llvm;
667675
668 #line 670 "Lexer.cpp"
676 #line 678 "Lexer.cpp"
669677
670678 /* Macros after this point can all be overridden by user definitions in
671679 * section 1.
680688 #endif
681689
682690 #ifndef YY_NO_UNPUT
683 static inline void yyunput YY_PROTO(( int c, char *buf_ptr ));
691 static inline void yyunput YY_PROTO(( int c, char *buf_ptr ))
692 #ifdef __GNUC__
693 __attribute__((__unused__))
694 #endif
695 ;
684696 #endif
685697
686698 #ifndef yytext_ptr
687 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
699 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, yy_size_t ));
688700 #endif
689701
690702 #ifdef YY_NEED_STRLEN
691 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
703 static yy_size_t yy_flex_strlen YY_PROTO(( yyconst char * ));
692704 #endif
693705
694706 #ifndef YY_NO_INPUT
745757 /* This used to be an fputs(), but since the string might contain NUL's,
746758 * we now use fwrite().
747759 */
748 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
760 #define ECHO (void) fwrite( yytext, (size_t)yyleng, 1, yyout )
749761 #endif
750762
751763 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
765777 YY_FATAL_ERROR( "input in flex scanner failed" ); \
766778 result = n; \
767779 } \
768 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
780 else if ( ((result = fread( buf, 1, (size_t)max_size, yyin )) == 0) \
769781 && ferror( yyin ) ) \
770782 YY_FATAL_ERROR( "input in flex scanner failed" );
771783 #endif
804816
805817 /* Code executed at the end of each rule. */
806818 #ifndef YY_BREAK
807 #define YY_BREAK break;
819 #define YY_BREAK /*LINTED*/break;
808820 #endif
809821
810822 #define YY_RULE_SETUP \
816828 register char *yy_cp, *yy_bp;
817829 register int yy_act;
818830
819 #line 185 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
820
821
822 #line 824 "Lexer.cpp"
823
831 #line 185 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
832
833
834 #line 836 "Lexer.cpp"
835
836 #if defined(YY_USES_REJECT) && (defined(__GNUC__) || defined(lint))
837 /* XXX: shut up `unused label' warning with %options yylineno */
838 if (/*CONSTCOND*/0 && yy_full_match)
839 goto find_rule;
840 #endif
824841 if ( yy_init )
825842 {
826843 yy_init = 0;
845862 yy_load_buffer_state();
846863 }
847864
848 while ( 1 ) /* loops until end-of-file is reached */
865 while (/*CONSTCOND*/ 1 ) /* loops until end-of-file is reached */
849866 {
850867 yy_cp = yy_c_buf_p;
851868
912929 { /* beginning of action switch */
913930 case 1:
914931 YY_RULE_SETUP
915 #line 187 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
932 #line 187 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
916933 { /* Ignore comments */ }
917934 YY_BREAK
918935 case 2:
919936 YY_RULE_SETUP
920 #line 189 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
937 #line 189 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
921938 { HandleInclude(yytext); }
922939 YY_BREAK
923940 case 3:
924941 YY_RULE_SETUP
925 #line 190 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
942 #line 190 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
926943 { Filelval.StrVal = new std::string(yytext+2, yytext+yyleng-2);
927944 return CODEFRAGMENT; }
928945 YY_BREAK
929946 case 4:
930947 YY_RULE_SETUP
931 #line 193 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
948 #line 193 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
932949 { return INT; }
933950 YY_BREAK
934951 case 5:
935952 YY_RULE_SETUP
936 #line 194 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
953 #line 194 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
937954 { return BIT; }
938955 YY_BREAK
939956 case 6:
940957 YY_RULE_SETUP
941 #line 195 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
958 #line 195 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
942959 { return BITS; }
943960 YY_BREAK
944961 case 7:
945962 YY_RULE_SETUP
946 #line 196 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
963 #line 196 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
947964 { return STRING; }
948965 YY_BREAK
949966 case 8:
950967 YY_RULE_SETUP
951 #line 197 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
968 #line 197 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
952969 { return LIST; }
953970 YY_BREAK
954971 case 9:
955972 YY_RULE_SETUP
956 #line 198 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
973 #line 198 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
957974 { return CODE; }
958975 YY_BREAK
959976 case 10:
960977 YY_RULE_SETUP
961 #line 199 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
978 #line 199 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
962979 { return DAG; }
963980 YY_BREAK
964981 case 11:
965982 YY_RULE_SETUP
966 #line 201 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
983 #line 201 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
967984 { return CLASS; }
968985 YY_BREAK
969986 case 12:
970987 YY_RULE_SETUP
971 #line 202 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
988 #line 202 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
972989 { return DEF; }
973990 YY_BREAK
974991 case 13:
975992 YY_RULE_SETUP
976 #line 203 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
993 #line 203 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
977994 { return DEFM; }
978995 YY_BREAK
979996 case 14:
980997 YY_RULE_SETUP
981 #line 204 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
998 #line 204 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
982999 { return MULTICLASS; }
9831000 YY_BREAK
9841001 case 15:
9851002 YY_RULE_SETUP
986 #line 205 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1003 #line 205 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
9871004 { return FIELD; }
9881005 YY_BREAK
9891006 case 16:
9901007 YY_RULE_SETUP
991 #line 206 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1008 #line 206 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
9921009 { return LET; }
9931010 YY_BREAK
9941011 case 17:
9951012 YY_RULE_SETUP
996 #line 207 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1013 #line 207 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
9971014 { return IN; }
9981015 YY_BREAK
9991016 case 18:
10001017 YY_RULE_SETUP
1001 #line 209 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1018 #line 209 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10021019 { return CONCATTOK; }
10031020 YY_BREAK
10041021 case 19:
10051022 YY_RULE_SETUP
1006 #line 210 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1023 #line 210 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10071024 { return SRATOK; }
10081025 YY_BREAK
10091026 case 20:
10101027 YY_RULE_SETUP
1011 #line 211 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1028 #line 211 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10121029 { return SRLTOK; }
10131030 YY_BREAK
10141031 case 21:
10151032 YY_RULE_SETUP
1016 #line 212 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1033 #line 212 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10171034 { return SHLTOK; }
10181035 YY_BREAK
10191036 case 22:
10201037 YY_RULE_SETUP
1021 #line 213 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1038 #line 213 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10221039 { return STRCONCATTOK; }
10231040 YY_BREAK
10241041 case 23:
10251042 YY_RULE_SETUP
1026 #line 216 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1043 #line 216 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10271044 { Filelval.StrVal = new std::string(yytext, yytext+yyleng);
10281045 return ID; }
10291046 YY_BREAK
10301047 case 24:
10311048 YY_RULE_SETUP
1032 #line 218 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1049 #line 218 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10331050 { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng);
10341051 return VARNAME; }
10351052 YY_BREAK
10361053 case 25:
10371054 YY_RULE_SETUP
1038 #line 221 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1055 #line 221 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10391056 { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng-1);
10401057 return STRVAL; }
10411058 YY_BREAK
10421059 case 26:
10431060 YY_RULE_SETUP
1044 #line 224 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1061 #line 224 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10451062 { Filelval.IntVal = ParseInt(Filetext); return INTVAL; }
10461063 YY_BREAK
10471064 case 27:
10481065 YY_RULE_SETUP
1049 #line 226 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1066 #line 226 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10501067 { /* Ignore whitespace */ }
10511068 YY_BREAK
10521069 case 28:
10531070 YY_RULE_SETUP
1054 #line 229 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1055 { BEGIN(comment); CommentDepth++; }
1071 #line 229 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
1072 { BEGIN(in_comment); CommentDepth++; }
10561073 YY_BREAK
10571074 case 29:
10581075 YY_RULE_SETUP
1059 #line 230 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1076 #line 230 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10601077 {} /* eat anything that's not a '*' or '/' */
10611078 YY_BREAK
10621079 case 30:
10631080 YY_RULE_SETUP
1064 #line 231 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1081 #line 231 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10651082 {} /* eat up '*'s not followed by '/'s */
10661083 YY_BREAK
10671084 case 31:
10681085 YY_RULE_SETUP
1069 #line 232 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1086 #line 232 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10701087 { ++CommentDepth; }
10711088 YY_BREAK
10721089 case 32:
10731090 YY_RULE_SETUP
1074 #line 233 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1091 #line 233 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10751092 {} /* eat up /'s not followed by *'s */
10761093 YY_BREAK
10771094 case 33:
10781095 YY_RULE_SETUP
1079 #line 234 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1096 #line 234 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10801097 { if (!--CommentDepth) { BEGIN(INITIAL); } }
10811098 YY_BREAK
1082 case YY_STATE_EOF(comment):
1083 #line 235 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1099 case YY_STATE_EOF(in_comment):
1100 #line 235 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10841101 { err() << "Unterminated comment!\n"; exit(1); }
10851102 YY_BREAK
10861103 case 34:
10871104 YY_RULE_SETUP
1088 #line 237 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1105 #line 237 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10891106 { return Filetext[0]; }
10901107 YY_BREAK
10911108 case 35:
10921109 YY_RULE_SETUP
1093 #line 239 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1110 #line 239 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
10941111 YY_FATAL_ERROR( "flex scanner jammed" );
10951112 YY_BREAK
1096 #line 1098 "Lexer.cpp"
1113 #line 1115 "Lexer.cpp"
10971114 case YY_STATE_EOF(INITIAL):
10981115 yyterminate();
10991116
15121529 /* Reset buffer status. */
15131530 yyrestart( yyin );
15141531
1515 /* fall through */
1532 /*FALLTHROUGH*/
15161533
15171534 case EOB_ACT_END_OF_FILE:
15181535 {
16571674
16581675 #ifndef YY_ALWAYS_INTERACTIVE
16591676 #ifndef YY_NEVER_INTERACTIVE
1660 extern int isatty YY_PROTO(( int ));
1677 #include
16611678 #endif
16621679 #endif
16631680
17531770
17541771 return b;
17551772 }
1773 #ifdef __cplusplus
1774 YY_BUFFER_STATE yy_scan_buffer( char *base, int size )
1775 {
1776 return yy_scan_buffer(base, (yy_size_t) size);
1777 }
1778 #endif
17561779 #endif
17571780
17581781
17641787 yyconst char *yy_str;
17651788 #endif
17661789 {
1767 int len;
1790 yy_size_t len;
17681791 for ( len = 0; yy_str[len]; ++len )
17691792 ;
17701793
17751798
17761799 #ifndef YY_NO_SCAN_BYTES
17771800 #ifdef YY_USE_PROTOS
1778 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1801 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, yy_size_t len )
17791802 #else
17801803 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
17811804 yyconst char *bytes;
1782 int len;
1805 yy_size_t len;
17831806 #endif
17841807 {
17851808 YY_BUFFER_STATE b;
17861809 char *buf;
1787 yy_size_t n;
1788 int i;
1810 yy_size_t n, i;
17891811
17901812 /* Get memory for full buffer, including space for trailing EOB's. */
17911813 n = len + 2;
18091831
18101832 return b;
18111833 }
1834 #ifdef __cplusplus
1835 YY_BUFFER_STATE yy_scan_bytes( yyconst char *base, int size )
1836 {
1837 return yy_scan_bytes(base, (yy_size_t) size);
1838 }
1839 #endif
18121840 #endif
18131841
18141842
19011929
19021930 #ifndef yytext_ptr
19031931 #ifdef YY_USE_PROTOS
1904 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1932 static void yy_flex_strncpy( char *s1, yyconst char *s2, yy_size_t n )
19051933 #else
19061934 static void yy_flex_strncpy( s1, s2, n )
19071935 char *s1;
19081936 yyconst char *s2;
1909 int n;
1910 #endif
1911 {
1912 register int i;
1937 yy_size_t n;
1938 #endif
1939 {
1940 register yy_size_t i;
19131941 for ( i = 0; i < n; ++i )
19141942 s1[i] = s2[i];
19151943 }
19171945
19181946 #ifdef YY_NEED_STRLEN
19191947 #ifdef YY_USE_PROTOS
1920 static int yy_flex_strlen( yyconst char *s )
1921 #else
1922 static int yy_flex_strlen( s )
1948 static yy_size_t yy_flex_strlen( yyconst char *s )
1949 #else
1950 static yy_size_t yy_flex_strlen( s )
19231951 yyconst char *s;
19241952 #endif
19251953 {
1926 register int n;
1954 register yy_size_t n;
19271955 for ( n = 0; s[n]; ++n )
19281956 ;
19291957
19772005 return 0;
19782006 }
19792007 #endif
1980 #line 239 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileLexer.l"
1981
1982
2008 #line 239 "/home/neil/src/nobackup/llvm/utils/TableGen/FileLexer.l"
2009
2010
2323 %option noreject
2424 %option noyymore
2525
26 %x comment
26 %x in_comment
2727
2828 %{
2929 #include "llvm/Config/config.h"
225225 [ \t\n\r]+ { /* Ignore whitespace */ }
226226
227227
228 "/*" { BEGIN(comment); CommentDepth++; }
229 [^*/]* {} /* eat anything that's not a '*' or '/' */
230 "*"+[^*/]* {} /* eat up '*'s not followed by '/'s */
231 "/*" { ++CommentDepth; }
232 "/"+[^*/]* {} /* eat up /'s not followed by *'s */
233 "*"+"/" { if (!--CommentDepth) { BEGIN(INITIAL); } }
234 <> { err() << "Unterminated comment!\n"; exit(1); }
228 "/*" { BEGIN(in_comment); CommentDepth++; }
229 [^*/]* {} /* eat anything that's not a '*' or '/' */
230 "*"+[^*/]* {} /* eat up '*'s not followed by '/'s */
231 "/*" { ++CommentDepth; }
232 "/"+[^*/]* {} /* eat up /'s not followed by *'s */
233 "*"+"/" { if (!--CommentDepth) { BEGIN(INITIAL); } }
234 <> { err() << "Unterminated comment!\n"; exit(1); }
235235
236236 . { return Filetext[0]; }
237237