summaryrefslogtreecommitdiff
path: root/cpp/src/FreezeScript/Scanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/FreezeScript/Scanner.cpp')
-rw-r--r--cpp/src/FreezeScript/Scanner.cpp96
1 files changed, 46 insertions, 50 deletions
diff --git a/cpp/src/FreezeScript/Scanner.cpp b/cpp/src/FreezeScript/Scanner.cpp
index 6b9c34b3314..c759d4012bc 100644
--- a/cpp/src/FreezeScript/Scanner.cpp
+++ b/cpp/src/FreezeScript/Scanner.cpp
@@ -74,6 +74,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -104,8 +105,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -162,15 +161,7 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -563,6 +554,16 @@ char *freeze_script_text;
# define YY_NO_UNISTD_H
#endif
+#ifdef __SUNPRO_CC
+# ifdef freeze_script_wrap
+# undef freeze_script_wrap
+# define freeze_script_wrap() 1
+# endif
+# ifdef ICE_64
+# pragma error_messages(off,truncwarn)
+# endif
+#endif
+
using namespace std;
using namespace FreezeScript;
@@ -581,7 +582,7 @@ StringTokPtr parseString(char);
#define YY_USER_INIT initScanner();
#define YY_INPUT(buf, result, max_size) { result = getInput(buf, max_size); }
-#line 584 "lex.yy.c"
+#line 585 "lex.yy.c"
#define INITIAL 0
@@ -662,12 +663,7 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -675,7 +671,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( freeze_script_text, freeze_script_leng, 1, freeze_script_out )) {} } while (0)
+#define ECHO fwrite( freeze_script_text, freeze_script_leng, 1, freeze_script_out )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -686,7 +682,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( freeze_script_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -768,10 +764,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 73 "Scanner.l"
+#line 83 "Scanner.l"
-#line 774 "lex.yy.c"
+#line 770 "lex.yy.c"
if ( !(yy_init) )
{
@@ -852,7 +848,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 75 "Scanner.l"
+#line 85 "Scanner.l"
{
// C++-style comment
int c;
@@ -869,7 +865,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 89 "Scanner.l"
+#line 99 "Scanner.l"
{
// C-style comment
while(true)
@@ -901,7 +897,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 118 "Scanner.l"
+#line 128 "Scanner.l"
{
StringTokPtr ident = new StringTok;
ident->v = freeze_script_text;
@@ -911,7 +907,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 125 "Scanner.l"
+#line 135 "Scanner.l"
{
StringTokPtr str = parseString('"');
*yylvalp = str;
@@ -920,7 +916,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 131 "Scanner.l"
+#line 141 "Scanner.l"
{
StringTokPtr str = parseString('\'');
*yylvalp = str;
@@ -929,7 +925,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 137 "Scanner.l"
+#line 147 "Scanner.l"
{
IntegerTokPtr itp = new IntegerTok;
*yylvalp = itp;
@@ -946,7 +942,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 151 "Scanner.l"
+#line 161 "Scanner.l"
{
errno = 0;
FloatingTokPtr ftp = new FloatingTok;
@@ -978,7 +974,7 @@ YY_RULE_SETUP
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
-#line 179 "Scanner.l"
+#line 189 "Scanner.l"
{
// Igore white-space
@@ -990,97 +986,97 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 188 "Scanner.l"
+#line 198 "Scanner.l"
return TOK_LESS_THAN;
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 189 "Scanner.l"
+#line 199 "Scanner.l"
return TOK_GREATER_THAN;
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 190 "Scanner.l"
+#line 200 "Scanner.l"
return TOK_LESS_EQUAL;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 191 "Scanner.l"
+#line 201 "Scanner.l"
return TOK_GREATER_EQUAL;
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 192 "Scanner.l"
+#line 202 "Scanner.l"
return TOK_EQUAL;
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 193 "Scanner.l"
+#line 203 "Scanner.l"
return TOK_NEQ;
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 194 "Scanner.l"
+#line 204 "Scanner.l"
return TOK_ADD;
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 195 "Scanner.l"
+#line 205 "Scanner.l"
return TOK_SUB;
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 196 "Scanner.l"
+#line 206 "Scanner.l"
return TOK_MUL;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 197 "Scanner.l"
+#line 207 "Scanner.l"
return TOK_DIV;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 198 "Scanner.l"
+#line 208 "Scanner.l"
return TOK_MOD;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 199 "Scanner.l"
+#line 209 "Scanner.l"
return TOK_LPAREN;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 200 "Scanner.l"
+#line 210 "Scanner.l"
return TOK_RPAREN;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 201 "Scanner.l"
+#line 211 "Scanner.l"
return TOK_LBRACKET;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 202 "Scanner.l"
+#line 212 "Scanner.l"
return TOK_RBRACKET;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 203 "Scanner.l"
+#line 213 "Scanner.l"
return TOK_SCOPE_DELIMITER;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 205 "Scanner.l"
+#line 215 "Scanner.l"
{
return freeze_script_text[0];
}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 209 "Scanner.l"
+#line 219 "Scanner.l"
ECHO;
YY_BREAK
-#line 1083 "lex.yy.c"
+#line 1079 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1835,8 +1831,8 @@ YY_BUFFER_STATE freeze_script__scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to freeze_script_lex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
@@ -2075,7 +2071,7 @@ void freeze_script_free (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 209 "Scanner.l"
+#line 219 "Scanner.l"