/* A lexical scanner generated by flex */
-#define yy_create_buffer avm2__create_buffer
-#define yy_delete_buffer avm2__delete_buffer
-#define yy_flex_debug avm2__flex_debug
-#define yy_init_buffer avm2__init_buffer
-#define yy_flush_buffer avm2__flush_buffer
-#define yy_load_buffer_state avm2__load_buffer_state
-#define yy_switch_to_buffer avm2__switch_to_buffer
-#define yyin avm2_in
-#define yyleng avm2_leng
-#define yylex avm2_lex
-#define yylineno avm2_lineno
-#define yyout avm2_out
-#define yyrestart avm2_restart
-#define yytext avm2_text
-#define yywrap avm2_wrap
-#define yyalloc avm2_alloc
-#define yyrealloc avm2_realloc
-#define yyfree avm2_free
+#define yy_create_buffer as3__create_buffer
+#define yy_delete_buffer as3__delete_buffer
+#define yy_flex_debug as3__flex_debug
+#define yy_init_buffer as3__init_buffer
+#define yy_flush_buffer as3__flush_buffer
+#define yy_load_buffer_state as3__load_buffer_state
+#define yy_switch_to_buffer as3__switch_to_buffer
+#define yyin as3_in
+#define yyleng as3_leng
+#define yylex as3_lex
+#define yylineno as3_lineno
+#define yyout as3_out
+#define yyrestart as3_restart
+#define yytext as3_text
+#define yywrap as3_wrap
+#define yyalloc as3_alloc
+#define yyrealloc as3_realloc
+#define yyfree as3_free
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE avm2_restart(avm2_in )
+#define YY_NEW_FILE as3_restart(as3_in )
#define YY_END_OF_BUFFER_CHAR 0
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int avm2_leng;
+extern int as3_leng;
-extern FILE *avm2_in, *avm2_out;
+extern FILE *as3_in, *as3_out;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up avm2_text. */ \
+ /* Undo effects of setting up as3_text. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up avm2_text again */ \
+ YY_DO_BEFORE_ACTION; /* set up as3_text again */ \
} \
while ( 0 )
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via avm2_restart()), so that the user can continue scanning by
- * just pointing avm2_in at a new input file.
+ * (via as3_restart()), so that the user can continue scanning by
+ * just pointing as3_in at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* yy_hold_char holds the character lost when avm2_text is formed. */
+/* yy_hold_char holds the character lost when as3_text is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int avm2_leng;
+int as3_leng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow avm2_wrap()'s to do buffer switches
- * instead of setting up a fresh avm2_in. A bit of a hack ...
+/* Flag which is used to allow as3_wrap()'s to do buffer switches
+ * instead of setting up a fresh as3_in. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void avm2_restart (FILE *input_file );
-void avm2__switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE avm2__create_buffer (FILE *file,int size );
-void avm2__delete_buffer (YY_BUFFER_STATE b );
-void avm2__flush_buffer (YY_BUFFER_STATE b );
-void avm2_push_buffer_state (YY_BUFFER_STATE new_buffer );
-void avm2_pop_buffer_state (void );
+void as3_restart (FILE *input_file );
+void as3__switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE as3__create_buffer (FILE *file,int size );
+void as3__delete_buffer (YY_BUFFER_STATE b );
+void as3__flush_buffer (YY_BUFFER_STATE b );
+void as3_push_buffer_state (YY_BUFFER_STATE new_buffer );
+void as3_pop_buffer_state (void );
-static void avm2_ensure_buffer_stack (void );
-static void avm2__load_buffer_state (void );
-static void avm2__init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void as3_ensure_buffer_stack (void );
+static void as3__load_buffer_state (void );
+static void as3__init_buffer (YY_BUFFER_STATE b,FILE *file );
-#define YY_FLUSH_BUFFER avm2__flush_buffer(YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER as3__flush_buffer(YY_CURRENT_BUFFER )
-YY_BUFFER_STATE avm2__scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE avm2__scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE avm2__scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE as3__scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE as3__scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE as3__scan_bytes (yyconst char *bytes,int len );
-void *avm2_alloc (yy_size_t );
-void *avm2_realloc (void *,yy_size_t );
-void avm2_free (void * );
+void *as3_alloc (yy_size_t );
+void *as3_realloc (void *,yy_size_t );
+void as3_free (void * );
-#define yy_new_buffer avm2__create_buffer
+#define yy_new_buffer as3__create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- avm2_ensure_buffer_stack (); \
+ as3_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- avm2__create_buffer(avm2_in,YY_BUF_SIZE ); \
+ as3__create_buffer(as3_in,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- avm2_ensure_buffer_stack (); \
+ as3_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- avm2__create_buffer(avm2_in,YY_BUF_SIZE ); \
+ as3__create_buffer(as3_in,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
typedef unsigned char YY_CHAR;
-FILE *avm2_in = (FILE *) 0, *avm2_out = (FILE *) 0;
+FILE *as3_in = (FILE *) 0, *as3_out = (FILE *) 0;
typedef int yy_state_type;
-extern int avm2_lineno;
+extern int as3_lineno;
-int avm2_lineno = 1;
+int as3_lineno = 1;
-extern char *avm2_text;
-#define yytext_ptr avm2_text
+extern char *as3_text;
+#define yytext_ptr as3_text
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up avm2_text.
+ * corresponding action - sets up as3_text.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- avm2_leng = (size_t) (yy_cp - yy_bp); \
+ as3_leng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int avm2__flex_debug;
-int avm2__flex_debug = 0;
+extern int as3__flex_debug;
+int as3__flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *avm2_text;
+char *as3_text;
#line 1 "tokenizer.lex"
/* tokenizer.lex
#include "tokenizer.h"
#include "files.h"
+int as3_pass = 0;
+
int as3_verbosity = 1;
void as3_error(const char*format, ...)
{
}
char*fullfilename = enter_file(filename, YY_CURRENT_BUFFER);
- avm2_in = fopen(fullfilename, "rb");
- if (!avm2_in) {
+ as3_in = fopen(fullfilename, "rb");
+ if (!as3_in) {
syntaxerror("Couldn't open include file \"%s\"\n", fullfilename);
}
- avm2__switch_to_buffer(avm2__create_buffer(avm2_in,YY_BUF_SIZE ) );
+ as3__switch_to_buffer(as3__create_buffer(as3_in,YY_BUF_SIZE ) );
//BEGIN(INITIAL); keep context
}
else syntaxerror("String incorrectly terminated");
- avm2_lval.str = string_unescape(s, len);
+ a3_lval.str = string_unescape(s, len);
}
static inline int mkid(int type)
{
- char*s = malloc(avm2_leng+1);
- memcpy(s, avm2_text, avm2_leng);
- s[avm2_leng]=0;
- avm2_lval.id = s;
+ char*s = malloc(as3_leng+1);
+ memcpy(s, as3_text, as3_leng);
+ s[as3_leng]=0;
+ a3_lval.id = s;
return type;
}
static inline int m(int type)
{
- avm2_lval.token = type;
+ a3_lval.token = type;
return type;
}
static char numberbuf[64];
static char*nrbuf()
{
- if(avm2_leng>sizeof(numberbuf)-1)
+ if(as3_leng>sizeof(numberbuf)-1)
syntaxerror("decimal number overflow");
char*s = numberbuf;
- memcpy(s, avm2_text, avm2_leng);
- s[avm2_leng]=0;
+ memcpy(s, as3_text, as3_leng);
+ s[as3_leng]=0;
return s;
}
static inline int setint(int v)
{
- avm2_lval.number_int = v;
+ a3_lval.number_int = v;
if(v>-128)
return T_BYTE;
else if(v>=-32768)
}
static inline int setuint(unsigned int v)
{
- avm2_lval.number_uint = v;
+ a3_lval.number_uint = v;
if(v<128)
return T_BYTE;
else if(v<32768)
}
static inline int setfloat(double v)
{
- avm2_lval.number_float = v;
+ a3_lval.number_float = v;
return T_FLOAT;
}
static inline int handlefloat()
{
char*s = nrbuf();
- avm2_lval.number_float = atof(s);
+ a3_lval.number_float = atof(s);
return T_FLOAT;
}
static inline int handleint()
{
char*s = nrbuf();
- char l = (avm2_text[0]=='-');
+ char l = (as3_text[0]=='-');
char*max = l?"1073741824":"2147483647";
- if(avm2_leng-l>10) {
+ if(as3_leng-l>10) {
as3_warning("integer overflow: %s (converted to Number)", s);
return handlefloat();
}
- if(avm2_leng-l==10) {
+ if(as3_leng-l==10) {
int t;
- for(t=0;t<avm2_leng-l;t++) {
- if(avm2_text[l+t]>max[t]) {
+ for(t=0;t<as3_leng-l;t++) {
+ if(as3_text[l+t]>max[t]) {
as3_warning("integer overflow: %s (converted to Number)", s);
return handlefloat();
}
- else if(avm2_text[l+t]<max[t])
+ else if(as3_text[l+t]<max[t])
break;
}
}
- if(avm2_text[0]=='-') {
+ if(as3_text[0]=='-') {
int v = atoi(s);
return setint(v);
} else {
unsigned int v = 0;
int t;
- for(t=0;t<avm2_leng;t++) {
+ for(t=0;t<as3_leng;t++) {
v*=10;
- v+=avm2_text[t]-'0';
+ v+=as3_text[t]-'0';
}
return setuint(v);
}
static inline int handlehexfloat()
{
- char l = (avm2_text[0]=='-')+2;
+ char l = (as3_text[0]=='-')+2;
double d=0;
char dot=0;
double base=1;
int t;
- for(t=l;t<avm2_leng;t++) {
- char c = avm2_text[t];
+ for(t=l;t<as3_leng;t++) {
+ char c = as3_text[t];
if(c=='.') {
dot=1;
continue;
}
static inline int handlehex()
{
- char l = (avm2_text[0]=='-')+2;
- int len = avm2_leng;
+ char l = (as3_text[0]=='-')+2;
+ int len = as3_leng;
if(len-l>8) {
char*s = nrbuf();
unsigned int v = 0;
for(t=l;t<len;t++) {
v<<=4;
- char c = avm2_text[t];
+ char c = as3_text[t];
if(c>='0' && c<='9')
v|=(c&15);
else if((c>='a' && c<='f') || (c>='A' && c<='F'))
break;
}
char*s = malloc(t+1);
- memcpy(s, avm2_text, t);
+ memcpy(s, as3_text, t);
s[t]=0;
- avm2_lval.id = s;
+ a3_lval.id = s;
}
static int handleregexp()
{
- char*s = malloc(avm2_leng);
- int len=avm2_leng-1;
- memcpy(s, avm2_text+1, len);
+ char*s = malloc(as3_leng);
+ int len=as3_leng-1;
+ memcpy(s, as3_text+1, len);
s[len] = 0;
int t;
for(t=len;t>=0;--t) {
break;
}
}
- avm2_lval.regexp.pattern = s;
+ a3_lval.regexp.pattern = s;
if(t==len) {
- avm2_lval.regexp.options = 0;
+ a3_lval.regexp.options = 0;
} else {
- avm2_lval.regexp.options = s+t+1;
+ a3_lval.regexp.options = s+t+1;
}
return T_REGEXP;
}
/* count the number of lines+columns consumed by this token */
static inline void l() {
int t;
- for(t=0;t<avm2_leng;t++) {
- if(avm2_text[t]=='\n') {
+ for(t=0;t<as3_leng;t++) {
+ if(as3_text[t]=='\n') {
current_line++;
current_column=0;
} else {
}
/* count the number of columns consumed by this token */
static inline void c() {
- current_column+=avm2_leng;
+ current_column+=as3_leng;
}
//Boolean {c();return m(KW_BOOLEAN);}
-#line 1607 "tokenizer.yy.c"
+#line 1609 "tokenizer.yy.c"
#define INITIAL 0
#define REGEXPOK 1
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int avm2_lex_destroy (void );
+int as3_lex_destroy (void );
-int avm2_get_debug (void );
+int as3_get_debug (void );
-void avm2_set_debug (int debug_flag );
+void as3_set_debug (int debug_flag );
-YY_EXTRA_TYPE avm2_get_extra (void );
+YY_EXTRA_TYPE as3_get_extra (void );
-void avm2_set_extra (YY_EXTRA_TYPE user_defined );
+void as3_set_extra (YY_EXTRA_TYPE user_defined );
-FILE *avm2_get_in (void );
+FILE *as3_get_in (void );
-void avm2_set_in (FILE * in_str );
+void as3_set_in (FILE * in_str );
-FILE *avm2_get_out (void );
+FILE *as3_get_out (void );
-void avm2_set_out (FILE * out_str );
+void as3_set_out (FILE * out_str );
-int avm2_get_leng (void );
+int as3_get_leng (void );
-char *avm2_get_text (void );
+char *as3_get_text (void );
-int avm2_get_lineno (void );
+int as3_get_lineno (void );
-void avm2_set_lineno (int line_number );
+void as3_set_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int avm2_wrap (void );
+extern "C" int as3_wrap (void );
#else
-extern int avm2_wrap (void );
+extern int as3_wrap (void );
#endif
#endif
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( avm2_text, avm2_leng, 1, avm2_out )
+#define ECHO fwrite( as3_text, as3_leng, 1, as3_out )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
int c = '*'; \
int n; \
for ( n = 0; n < max_size && \
- (c = getc( avm2_in )) != EOF && c != '\n'; ++n ) \
+ (c = getc( as3_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( avm2_in ) ) \
+ if ( c == EOF && ferror( as3_in ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, avm2_in))==0 && ferror(avm2_in)) \
+ while ( (result = fread(buf, 1, max_size, as3_in))==0 && ferror(as3_in)) \
{ \
if( errno != EINTR) \
{ \
break; \
} \
errno=0; \
- clearerr(avm2_in); \
+ clearerr(as3_in); \
} \
}\
\
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int avm2_lex (void);
+extern int as3_lex (void);
-#define YY_DECL int avm2_lex (void)
+#define YY_DECL int as3_lex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after avm2_text and avm2_leng
+/* Code executed at the beginning of each rule, after as3_text and as3_leng
* have been set up.
*/
#ifndef YY_USER_ACTION
#endif
#define YY_RULE_SETUP \
- if ( avm2_leng > 0 ) \
+ if ( as3_leng > 0 ) \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
- (avm2_text[avm2_leng - 1] == '\n'); \
+ (as3_text[as3_leng - 1] == '\n'); \
YY_USER_ACTION
/** The main scanner function which does all the work.
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 507 "tokenizer.lex"
+#line 509 "tokenizer.lex"
-#line 1798 "tokenizer.yy.c"
+#line 1800 "tokenizer.yy.c"
if ( !(yy_init) )
{
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! avm2_in )
- avm2_in = stdin;
+ if ( ! as3_in )
+ as3_in = stdin;
- if ( ! avm2_out )
- avm2_out = stdout;
+ if ( ! as3_out )
+ as3_out = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- avm2_ensure_buffer_stack ();
+ as3_ensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- avm2__create_buffer(avm2_in,YY_BUF_SIZE );
+ as3__create_buffer(as3_in,YY_BUF_SIZE );
}
- avm2__load_buffer_state( );
+ as3__load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
- /* Support of avm2_text. */
+ /* Support of as3_text. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
-#line 510 "tokenizer.lex"
+#line 512 "tokenizer.lex"
{l(); /* single line comment */}
YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 511 "tokenizer.lex"
+#line 513 "tokenizer.lex"
{l(); /* multi line comment */}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 512 "tokenizer.lex"
-{syntaxerror("syntax error: unterminated comment", avm2_text);}
+#line 514 "tokenizer.lex"
+{syntaxerror("syntax error: unterminated comment", as3_text);}
YY_BREAK
case 4:
/* rule 4 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up avm2_text */
+*yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up avm2_text again */
+YY_DO_BEFORE_ACTION; /* set up as3_text again */
YY_RULE_SETUP
-#line 514 "tokenizer.lex"
-{l();handleInclude(avm2_text, avm2_leng, 1);}
+#line 516 "tokenizer.lex"
+{l();handleInclude(as3_text, as3_leng, 1);}
YY_BREAK
case 5:
/* rule 5 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up avm2_text */
+*yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up avm2_text again */
+YY_DO_BEFORE_ACTION; /* set up as3_text again */
YY_RULE_SETUP
-#line 515 "tokenizer.lex"
-{l();handleInclude(avm2_text, avm2_leng, 0);}
+#line 517 "tokenizer.lex"
+{l();handleInclude(as3_text, as3_leng, 0);}
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 516 "tokenizer.lex"
-{l(); BEGIN(INITIAL);handleString(avm2_text, avm2_leng);return T_STRING;}
+#line 518 "tokenizer.lex"
+{l(); BEGIN(INITIAL);handleString(as3_text, as3_leng);return T_STRING;}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 519 "tokenizer.lex"
+#line 521 "tokenizer.lex"
{c(); BEGIN(INITIAL);return handleregexp();}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 520 "tokenizer.lex"
+#line 522 "tokenizer.lex"
{c(); BEGIN(INITIAL);return handlehex();}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 521 "tokenizer.lex"
+#line 523 "tokenizer.lex"
{c(); BEGIN(INITIAL);return handlehexfloat();}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 522 "tokenizer.lex"
+#line 524 "tokenizer.lex"
{c(); BEGIN(INITIAL);return handleint();}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 523 "tokenizer.lex"
+#line 525 "tokenizer.lex"
{c(); BEGIN(INITIAL);return handlefloat();}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 526 "tokenizer.lex"
+#line 528 "tokenizer.lex"
{/* utf 8 bom */}
YY_BREAK
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
-#line 527 "tokenizer.lex"
+#line 529 "tokenizer.lex"
{l();}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 529 "tokenizer.lex"
+#line 531 "tokenizer.lex"
{c(); BEGIN(INITIAL);return handlehex();}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 530 "tokenizer.lex"
+#line 532 "tokenizer.lex"
{c(); BEGIN(INITIAL);return handlehexfloat();}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 531 "tokenizer.lex"
+#line 533 "tokenizer.lex"
{c(); BEGIN(INITIAL);return handleint();}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 532 "tokenizer.lex"
+#line 534 "tokenizer.lex"
{c(); BEGIN(INITIAL);return handlefloat();}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 534 "tokenizer.lex"
+#line 536 "tokenizer.lex"
{/* for debugging: generates a tokenizer-level error */
syntaxerror("3rr0r");}
YY_BREAK
case 19:
/* rule 19 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up avm2_text */
+*yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up avm2_text again */
+YY_DO_BEFORE_ACTION; /* set up as3_text again */
YY_RULE_SETUP
-#line 537 "tokenizer.lex"
-{l();handleLabel(avm2_text, avm2_leng-3);return T_FOR;}
+#line 539 "tokenizer.lex"
+{l();handleLabel(as3_text, as3_leng-3);return T_FOR;}
YY_BREAK
case 20:
/* rule 20 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up avm2_text */
+*yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up avm2_text again */
+YY_DO_BEFORE_ACTION; /* set up as3_text again */
YY_RULE_SETUP
-#line 538 "tokenizer.lex"
-{l();handleLabel(avm2_text, avm2_leng-2);return T_DO;}
+#line 540 "tokenizer.lex"
+{l();handleLabel(as3_text, as3_leng-2);return T_DO;}
YY_BREAK
case 21:
/* rule 21 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up avm2_text */
+*yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up avm2_text again */
+YY_DO_BEFORE_ACTION; /* set up as3_text again */
YY_RULE_SETUP
-#line 539 "tokenizer.lex"
-{l();handleLabel(avm2_text, avm2_leng-5);return T_WHILE;}
+#line 541 "tokenizer.lex"
+{l();handleLabel(as3_text, as3_leng-5);return T_WHILE;}
YY_BREAK
case 22:
/* rule 22 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up avm2_text */
+*yy_cp = (yy_hold_char); /* undo effects of setting up as3_text */
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up avm2_text again */
+YY_DO_BEFORE_ACTION; /* set up as3_text again */
YY_RULE_SETUP
-#line 540 "tokenizer.lex"
-{l();handleLabel(avm2_text, avm2_leng-6);return T_SWITCH;}
+#line 542 "tokenizer.lex"
+{l();handleLabel(as3_text, as3_leng-6);return T_SWITCH;}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 541 "tokenizer.lex"
-{c();avm2_lval.id="";return T_FOR;}
+#line 543 "tokenizer.lex"
+{c();a3_lval.id="";return T_FOR;}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 542 "tokenizer.lex"
-{c();avm2_lval.id="";return T_DO;}
+#line 544 "tokenizer.lex"
+{c();a3_lval.id="";return T_DO;}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 543 "tokenizer.lex"
-{c();avm2_lval.id="";return T_WHILE;}
+#line 545 "tokenizer.lex"
+{c();a3_lval.id="";return T_WHILE;}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 544 "tokenizer.lex"
-{c();avm2_lval.id="";return T_SWITCH;}
+#line 546 "tokenizer.lex"
+{c();a3_lval.id="";return T_SWITCH;}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 546 "tokenizer.lex"
+#line 548 "tokenizer.lex"
{c();BEGIN(REGEXPOK);return m(T_ANDAND);}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 547 "tokenizer.lex"
+#line 549 "tokenizer.lex"
{c();BEGIN(REGEXPOK);return m(T_OROR);}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 548 "tokenizer.lex"
+#line 550 "tokenizer.lex"
{c();BEGIN(REGEXPOK);return m(T_NE);}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 549 "tokenizer.lex"
+#line 551 "tokenizer.lex"
{c();BEGIN(REGEXPOK);return m(T_NEE);}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 550 "tokenizer.lex"
+#line 552 "tokenizer.lex"
{c();BEGIN(REGEXPOK);return m(T_EQEQEQ);}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 551 "tokenizer.lex"
+#line 553 "tokenizer.lex"
{c();BEGIN(REGEXPOK);return m(T_EQEQ);}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 552 "tokenizer.lex"
+#line 554 "tokenizer.lex"
{c();return m(T_GE);}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 553 "tokenizer.lex"
+#line 555 "tokenizer.lex"
{c();return m(T_LE);}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 554 "tokenizer.lex"
+#line 556 "tokenizer.lex"
{c();BEGIN(INITIAL);return m(T_MINUSMINUS);}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 555 "tokenizer.lex"
+#line 557 "tokenizer.lex"
{c();BEGIN(INITIAL);return m(T_PLUSPLUS);}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 556 "tokenizer.lex"
+#line 558 "tokenizer.lex"
{c();return m(T_PLUSBY);}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 557 "tokenizer.lex"
+#line 559 "tokenizer.lex"
{c();return m(T_MINUSBY);}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 558 "tokenizer.lex"
+#line 560 "tokenizer.lex"
{c();return m(T_DIVBY);}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 559 "tokenizer.lex"
+#line 561 "tokenizer.lex"
{c();return m(T_MODBY);}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 560 "tokenizer.lex"
+#line 562 "tokenizer.lex"
{c();return m(T_MULBY);}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 561 "tokenizer.lex"
+#line 563 "tokenizer.lex"
{c();return m(T_ORBY);}
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 562 "tokenizer.lex"
+#line 564 "tokenizer.lex"
{c();return m(T_SHRBY);}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 563 "tokenizer.lex"
+#line 565 "tokenizer.lex"
{c();return m(T_SHLBY);}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 564 "tokenizer.lex"
+#line 566 "tokenizer.lex"
{c();return m(T_USHRBY);}
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 565 "tokenizer.lex"
+#line 567 "tokenizer.lex"
{c();return m(T_SHL);}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 566 "tokenizer.lex"
+#line 568 "tokenizer.lex"
{c();return m(T_USHR);}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 567 "tokenizer.lex"
+#line 569 "tokenizer.lex"
{c();return m(T_SHR);}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 568 "tokenizer.lex"
+#line 570 "tokenizer.lex"
{c();return m(T_DOTDOTDOT);}
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 569 "tokenizer.lex"
+#line 571 "tokenizer.lex"
{c();return m(T_DOTDOT);}
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 570 "tokenizer.lex"
+#line 572 "tokenizer.lex"
{c();return m('.');}
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 571 "tokenizer.lex"
+#line 573 "tokenizer.lex"
{c();return m(T_COLONCOLON);}
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 572 "tokenizer.lex"
+#line 574 "tokenizer.lex"
{c();return m(':');}
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 573 "tokenizer.lex"
+#line 575 "tokenizer.lex"
{c();return m(KW_INSTANCEOF);}
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 574 "tokenizer.lex"
+#line 576 "tokenizer.lex"
{c();return m(KW_IMPLEMENTS);}
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 575 "tokenizer.lex"
+#line 577 "tokenizer.lex"
{c();return m(KW_INTERFACE);}
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 576 "tokenizer.lex"
+#line 578 "tokenizer.lex"
{c();return m(KW_NAMESPACE);}
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 577 "tokenizer.lex"
+#line 579 "tokenizer.lex"
{c();return m(KW_PROTECTED);}
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 578 "tokenizer.lex"
+#line 580 "tokenizer.lex"
{c();return m(KW_UNDEFINED);}
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 579 "tokenizer.lex"
+#line 581 "tokenizer.lex"
{c();return m(KW_CONTINUE);}
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 580 "tokenizer.lex"
+#line 582 "tokenizer.lex"
{c();return m(KW_OVERRIDE);}
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 581 "tokenizer.lex"
+#line 583 "tokenizer.lex"
{c();return m(KW_INTERNAL);}
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 582 "tokenizer.lex"
+#line 584 "tokenizer.lex"
{c();return m(KW_FUNCTION);}
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 583 "tokenizer.lex"
+#line 585 "tokenizer.lex"
{c();return m(KW_FINALLY);}
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 584 "tokenizer.lex"
+#line 586 "tokenizer.lex"
{c();return m(KW_DEFAULT);}
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 585 "tokenizer.lex"
+#line 587 "tokenizer.lex"
{c();return m(KW_PACKAGE);}
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 586 "tokenizer.lex"
+#line 588 "tokenizer.lex"
{c();return m(KW_PRIVATE);}
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 587 "tokenizer.lex"
+#line 589 "tokenizer.lex"
{c();return m(KW_DYNAMIC);}
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 588 "tokenizer.lex"
+#line 590 "tokenizer.lex"
{c();return m(KW_EXTENDS);}
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 589 "tokenizer.lex"
+#line 591 "tokenizer.lex"
{c();return m(KW_DELETE);}
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 590 "tokenizer.lex"
+#line 592 "tokenizer.lex"
{c();return m(KW_RETURN);}
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 591 "tokenizer.lex"
+#line 593 "tokenizer.lex"
{c();return m(KW_PUBLIC);}
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 592 "tokenizer.lex"
+#line 594 "tokenizer.lex"
{c();return m(KW_NATIVE);}
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 593 "tokenizer.lex"
+#line 595 "tokenizer.lex"
{c();return m(KW_STATIC);}
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 594 "tokenizer.lex"
+#line 596 "tokenizer.lex"
{c();return m(KW_IMPORT);}
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 595 "tokenizer.lex"
+#line 597 "tokenizer.lex"
{c();return m(KW_TYPEOF);}
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 596 "tokenizer.lex"
+#line 598 "tokenizer.lex"
{c();return m(KW_THROW);}
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 597 "tokenizer.lex"
+#line 599 "tokenizer.lex"
{c();return m(KW_CLASS);}
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 598 "tokenizer.lex"
+#line 600 "tokenizer.lex"
{c();return m(KW_CONST);}
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 599 "tokenizer.lex"
+#line 601 "tokenizer.lex"
{c();return m(KW_CATCH);}
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 600 "tokenizer.lex"
+#line 602 "tokenizer.lex"
{c();return m(KW_FINAL);}
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 601 "tokenizer.lex"
+#line 603 "tokenizer.lex"
{c();return m(KW_FALSE);}
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 602 "tokenizer.lex"
+#line 604 "tokenizer.lex"
{c();return m(KW_BREAK);}
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 603 "tokenizer.lex"
+#line 605 "tokenizer.lex"
{c();return m(KW_SUPER);}
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 604 "tokenizer.lex"
+#line 606 "tokenizer.lex"
{c();return m(KW_EACH);}
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 605 "tokenizer.lex"
+#line 607 "tokenizer.lex"
{c();return m(KW_VOID);}
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 606 "tokenizer.lex"
+#line 608 "tokenizer.lex"
{c();return m(KW_TRUE);}
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 607 "tokenizer.lex"
+#line 609 "tokenizer.lex"
{c();return m(KW_NULL);}
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 608 "tokenizer.lex"
+#line 610 "tokenizer.lex"
{c();return m(KW_ELSE);}
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 609 "tokenizer.lex"
+#line 611 "tokenizer.lex"
{c();return m(KW_CASE);}
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 610 "tokenizer.lex"
+#line 612 "tokenizer.lex"
{c();return m(KW_WITH);}
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 611 "tokenizer.lex"
+#line 613 "tokenizer.lex"
{c();return m(KW_USE);}
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 612 "tokenizer.lex"
+#line 614 "tokenizer.lex"
{c();return m(KW_NEW);}
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 613 "tokenizer.lex"
+#line 615 "tokenizer.lex"
{c();return m(KW_GET);}
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 614 "tokenizer.lex"
+#line 616 "tokenizer.lex"
{c();return m(KW_SET);}
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 615 "tokenizer.lex"
+#line 617 "tokenizer.lex"
{c();return m(KW_VAR);}
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 616 "tokenizer.lex"
+#line 618 "tokenizer.lex"
{c();return m(KW_TRY);}
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 617 "tokenizer.lex"
+#line 619 "tokenizer.lex"
{c();return m(KW_IS) ;}
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 618 "tokenizer.lex"
+#line 620 "tokenizer.lex"
{c();return m(KW_IN) ;}
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 619 "tokenizer.lex"
+#line 621 "tokenizer.lex"
{c();return m(KW_IF) ;}
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 620 "tokenizer.lex"
+#line 622 "tokenizer.lex"
{c();return m(KW_AS);}
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 621 "tokenizer.lex"
+#line 623 "tokenizer.lex"
{c();BEGIN(INITIAL);return mkid(T_IDENTIFIER);}
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 623 "tokenizer.lex"
-{c();BEGIN(REGEXPOK);return m(avm2_text[0]);}
+#line 625 "tokenizer.lex"
+{c();BEGIN(REGEXPOK);return m(as3_text[0]);}
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 624 "tokenizer.lex"
-{c();BEGIN(INITIAL);return m(avm2_text[0]);}
+#line 626 "tokenizer.lex"
+{c();BEGIN(INITIAL);return m(as3_text[0]);}
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 626 "tokenizer.lex"
-{char c1=avm2_text[0];
+#line 628 "tokenizer.lex"
+{char c1=as3_text[0];
char buf[128];
- buf[0] = avm2_text[0];
+ buf[0] = as3_text[0];
int t;
for(t=1;t<128;t++) {
char c = buf[t]=input();
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(REGEXPOK):
case YY_STATE_EOF(BEGINNING):
-#line 645 "tokenizer.lex"
+#line 647 "tokenizer.lex"
{l();
void*b = leave_file();
if (!b) {
yyterminate();
- avm2__delete_buffer(YY_CURRENT_BUFFER);
+ as3__delete_buffer(YY_CURRENT_BUFFER);
return m(T_EOF);
} else {
- avm2__delete_buffer(YY_CURRENT_BUFFER);
- avm2__switch_to_buffer(b);
+ as3__delete_buffer(YY_CURRENT_BUFFER);
+ as3__switch_to_buffer(b);
}
}
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 657 "tokenizer.lex"
+#line 659 "tokenizer.lex"
ECHO;
YY_BREAK
-#line 2473 "tokenizer.yy.c"
+#line 2475 "tokenizer.yy.c"
case YY_END_OF_BUFFER:
{
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed avm2_in at a new source and called
- * avm2_lex(). If so, then we have to assure
+ * just pointed as3_in at a new source and called
+ * as3_lex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = avm2_in;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = as3_in;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( avm2_wrap( ) )
+ if ( as3_wrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * avm2_text, we can now set up
+ * as3_text, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of avm2_lex */
+} /* end of as3_lex */
/* yy_get_next_buffer - try to read in a new buffer
*
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- avm2_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ as3_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- avm2_restart(avm2_in );
+ as3_restart(as3_in );
}
else
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) avm2_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) as3_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up avm2_text */
+ /* undo effects of setting up as3_text */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
*/
/* Reset buffer status. */
- avm2_restart(avm2_in );
+ as3_restart(as3_in );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( avm2_wrap( ) )
+ if ( as3_wrap( ) )
return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve avm2_text */
+ *(yy_c_buf_p) = '\0'; /* preserve as3_text */
(yy_hold_char) = *++(yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void avm2_restart (FILE * input_file )
+ void as3_restart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- avm2_ensure_buffer_stack ();
+ as3_ensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- avm2__create_buffer(avm2_in,YY_BUF_SIZE );
+ as3__create_buffer(as3_in,YY_BUF_SIZE );
}
- avm2__init_buffer(YY_CURRENT_BUFFER,input_file );
- avm2__load_buffer_state( );
+ as3__init_buffer(YY_CURRENT_BUFFER,input_file );
+ as3__load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void avm2__switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void as3__switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * avm2_pop_buffer_state();
- * avm2_push_buffer_state(new_buffer);
+ * as3_pop_buffer_state();
+ * as3_push_buffer_state(new_buffer);
*/
- avm2_ensure_buffer_stack ();
+ as3_ensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- avm2__load_buffer_state( );
+ as3__load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (avm2_wrap()) processing, but the only time this flag
- * is looked at is after avm2_wrap() is called, so it's safe
+ * EOF (as3_wrap()) processing, but the only time this flag
+ * is looked at is after as3_wrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void avm2__load_buffer_state (void)
+static void as3__load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- avm2_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ as3_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE avm2__create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE as3__create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) avm2_alloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) as3_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in avm2__create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in as3__create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) avm2_alloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) as3_alloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in avm2__create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in as3__create_buffer()" );
b->yy_is_our_buffer = 1;
- avm2__init_buffer(b,file );
+ as3__init_buffer(b,file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with avm2__create_buffer()
+ * @param b a buffer created with as3__create_buffer()
*
*/
- void avm2__delete_buffer (YY_BUFFER_STATE b )
+ void as3__delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- avm2_free((void *) b->yy_ch_buf );
+ as3_free((void *) b->yy_ch_buf );
- avm2_free((void *) b );
+ as3_free((void *) b );
}
#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a avm2_restart() or at EOF.
+ * such as during a as3_restart() or at EOF.
*/
- static void avm2__init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void as3__init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- avm2__flush_buffer(b );
+ as3__flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then avm2__init_buffer was _probably_
- * called from avm2_restart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then as3__init_buffer was _probably_
+ * called from as3_restart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void avm2__flush_buffer (YY_BUFFER_STATE b )
+ void as3__flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- avm2__load_buffer_state( );
+ as3__load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
* @param new_buffer The new state.
*
*/
-void avm2_push_buffer_state (YY_BUFFER_STATE new_buffer )
+void as3_push_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- avm2_ensure_buffer_stack();
+ as3_ensure_buffer_stack();
- /* This block is copied from avm2__switch_to_buffer. */
+ /* This block is copied from as3__switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from avm2__switch_to_buffer. */
- avm2__load_buffer_state( );
+ /* copied from as3__switch_to_buffer. */
+ as3__load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
* The next element becomes the new top.
*
*/
-void avm2_pop_buffer_state (void)
+void as3_pop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- avm2__delete_buffer(YY_CURRENT_BUFFER );
+ as3__delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- avm2__load_buffer_state( );
+ as3__load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void avm2_ensure_buffer_stack (void)
+static void as3_ensure_buffer_stack (void)
{
int num_to_alloc;
* immediate realloc on the next call.
*/
num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)avm2_alloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)as3_alloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in avm2_ensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in as3_ensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)avm2_realloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)as3_realloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in avm2_ensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in as3_ensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE avm2__scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE as3__scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) avm2_alloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) as3_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in avm2__scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in as3__scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- avm2__switch_to_buffer(b );
+ as3__switch_to_buffer(b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to avm2_lex() will
+/** Setup the input buffer state to scan a string. The next call to as3_lex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * avm2__scan_bytes() instead.
+ * as3__scan_bytes() instead.
*/
-YY_BUFFER_STATE avm2__scan_string (yyconst char * yystr )
+YY_BUFFER_STATE as3__scan_string (yyconst char * yystr )
{
- return avm2__scan_bytes(yystr,strlen(yystr) );
+ return as3__scan_bytes(yystr,strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to avm2_lex() will
+/** Setup the input buffer state to scan the given bytes. The next call to as3_lex() will
* scan from a @e copy of @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.
*/
-YY_BUFFER_STATE avm2__scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE as3__scan_bytes (yyconst char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
- buf = (char *) avm2_alloc(n );
+ buf = (char *) as3_alloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in avm2__scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in as3__scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = avm2__scan_buffer(buf,n );
+ b = as3__scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in avm2__scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in as3__scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up avm2_text. */ \
+ /* Undo effects of setting up as3_text. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- avm2_text[avm2_leng] = (yy_hold_char); \
- (yy_c_buf_p) = avm2_text + yyless_macro_arg; \
+ as3_text[as3_leng] = (yy_hold_char); \
+ (yy_c_buf_p) = as3_text + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- avm2_leng = yyless_macro_arg; \
+ as3_leng = yyless_macro_arg; \
} \
while ( 0 )
/** Get the current line number.
*
*/
-int avm2_get_lineno (void)
+int as3_get_lineno (void)
{
- return avm2_lineno;
+ return as3_lineno;
}
/** Get the input stream.
*
*/
-FILE *avm2_get_in (void)
+FILE *as3_get_in (void)
{
- return avm2_in;
+ return as3_in;
}
/** Get the output stream.
*
*/
-FILE *avm2_get_out (void)
+FILE *as3_get_out (void)
{
- return avm2_out;
+ return as3_out;
}
/** Get the length of the current token.
*
*/
-int avm2_get_leng (void)
+int as3_get_leng (void)
{
- return avm2_leng;
+ return as3_leng;
}
/** Get the current token.
*
*/
-char *avm2_get_text (void)
+char *as3_get_text (void)
{
- return avm2_text;
+ return as3_text;
}
/** Set the current line number.
* @param line_number
*
*/
-void avm2_set_lineno (int line_number )
+void as3_set_lineno (int line_number )
{
- avm2_lineno = line_number;
+ as3_lineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
- * @see avm2__switch_to_buffer
+ * @see as3__switch_to_buffer
*/
-void avm2_set_in (FILE * in_str )
+void as3_set_in (FILE * in_str )
{
- avm2_in = in_str ;
+ as3_in = in_str ;
}
-void avm2_set_out (FILE * out_str )
+void as3_set_out (FILE * out_str )
{
- avm2_out = out_str ;
+ as3_out = out_str ;
}
-int avm2_get_debug (void)
+int as3_get_debug (void)
{
- return avm2__flex_debug;
+ return as3__flex_debug;
}
-void avm2_set_debug (int bdebug )
+void as3_set_debug (int bdebug )
{
- avm2__flex_debug = bdebug ;
+ as3__flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from avm2_lex_destroy(), so don't allocate here.
+ * This function is called from as3_lex_destroy(), so don't allocate here.
*/
(yy_buffer_stack) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
- avm2_in = stdin;
- avm2_out = stdout;
+ as3_in = stdin;
+ as3_out = stdout;
#else
- avm2_in = (FILE *) 0;
- avm2_out = (FILE *) 0;
+ as3_in = (FILE *) 0;
+ as3_out = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
- * avm2_lex_init()
+ * as3_lex_init()
*/
return 0;
}
-/* avm2_lex_destroy is for both reentrant and non-reentrant scanners. */
-int avm2_lex_destroy (void)
+/* as3_lex_destroy is for both reentrant and non-reentrant scanners. */
+int as3_lex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- avm2__delete_buffer(YY_CURRENT_BUFFER );
+ as3__delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- avm2_pop_buffer_state();
+ as3_pop_buffer_state();
}
/* Destroy the stack itself. */
- avm2_free((yy_buffer_stack) );
+ as3_free((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * avm2_lex() is called, initialization will occur. */
+ * as3_lex() is called, initialization will occur. */
yy_init_globals( );
return 0;
}
#endif
-void *avm2_alloc (yy_size_t size )
+void *as3_alloc (yy_size_t size )
{
return (void *) malloc( size );
}
-void *avm2_realloc (void * ptr, yy_size_t size )
+void *as3_realloc (void * ptr, yy_size_t size )
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
return (void *) realloc( (char *) ptr, size );
}
-void avm2_free (void * ptr )
+void as3_free (void * ptr )
{
- free( (char *) ptr ); /* see avm2_realloc() for (char *) cast */
+ free( (char *) ptr ); /* see as3_realloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 657 "tokenizer.lex"
+#line 659 "tokenizer.lex"
-int avm2_wrap()
+int as3_wrap()
{
return 1;
}