-{S} {c();}
-
-{NUMBER} {c(); BEGIN(INITIAL);return handlenumber();}
-
-[>][=] {return m(T_GE);}
-[<][=] {return m(T_LE);}
-[-][-] {BEGIN(INITIAL);return m(T_MINUSMINUS);}
-[+][+] {BEGIN(INITIAL);return m(T_PLUSPLUS);}
-== {BEGIN(REGEXPOK);return m(T_EQEQ);}
-\.\. {return m(T_DOTDOT);}
-\. {return m('.');}
-:: {return m(T_COLONCOLON);}
-: {return m(':');}
-implements {return m(KW_IMPLEMENTS);}
-interface {return m(KW_INTERFACE);}
-namespace {return m(KW_NAMESPACE);}
-protected {return m(KW_PROTECTED);}
-override {return m(KW_OVERRIDE);}
-internal {return m(KW_INTERNAL);}
-function {return m(KW_FUNCTION);}
-package {return m(KW_PACKAGE);}
-private {return m(KW_PRIVATE);}
-Boolean {return m(KW_BOOLEAN);}
-dynamic {return m(KW_DYNAMIC);}
-extends {return m(KW_EXTENDS);}
-public {return m(KW_PUBLIC);}
-native {return m(KW_NATIVE);}
-static {return m(KW_STATIC);}
-import {return m(KW_IMPORT);}
-Number {return m(KW_NUMBER);}
-class {return m(KW_CLASS);}
-const {return m(KW_CONST);}
-final {return m(KW_FINAL);}
-False {return m(KW_FALSE);}
-True {return m(KW_TRUE);}
-uint {return m(KW_UINT);}
-null {return m(KW_NULL);}
-use {return m(KW_USE);}
-int {return m(KW_INT);}
-new {return m(KW_NEW);}
-get {return m(KW_GET);}
-for {return m(KW_FOR);}
-set {return m(KW_SET);}
-var {return m(KW_VAR);}
-is {return m(KW_IS) ;}
-as {return m(KW_AS);}
-{NAME} {c();BEGIN(INITIAL);return m(T_IDENTIFIER);}
-
-[+-\/*^~@$!%&\(=\[\]\{\}|?:;,.<>] {c();BEGIN(REGEXPOK);return m(yytext[0]);}
-[\)\]] {c();BEGIN(INITIAL);return m(yytext[0]);}
+{S} {l();}
+
+{HEXINT} {c(); BEGIN(INITIAL);return handlehex();}
+{INT} {c(); BEGIN(INITIAL);return handleint();}
+{FLOAT} {c(); BEGIN(INITIAL);return handlefloat();}
+
+3rr0r {/* for debugging: generates a tokenizer-level error */
+ syntaxerror("3rr0r");}
+
+{NAME}{S}*:{S}*for/{_} {l();handleLabel(yytext, yyleng-3);return T_FOR;}
+{NAME}{S}*:{S}*do/{_} {l();handleLabel(yytext, yyleng-2);return T_DO;}
+{NAME}{S}*:{S}*while/{_} {l();handleLabel(yytext, yyleng-5);return T_WHILE;}
+{NAME}{S}*:{S}*switch/{_} {l();handleLabel(yytext, yyleng-6);return T_SWITCH;}
+for {c();avm2_lval.id="";return T_FOR;}
+do {c();avm2_lval.id="";return T_DO;}
+while {c();avm2_lval.id="";return T_WHILE;}
+switch {c();avm2_lval.id="";return T_SWITCH;}
+
+[&][&] {c();BEGIN(REGEXPOK);return m(T_ANDAND);}
+[|][|] {c();BEGIN(REGEXPOK);return m(T_OROR);}
+[!][=] {c();BEGIN(REGEXPOK);return m(T_NE);}
+[!][=][=] {c();BEGIN(REGEXPOK);return m(T_NEE);}
+[=][=][=] {c();BEGIN(REGEXPOK);return m(T_EQEQEQ);}
+[=][=] {c();BEGIN(REGEXPOK);return m(T_EQEQ);}
+[>][=] {c();return m(T_GE);}
+[<][=] {c();return m(T_LE);}
+[-][-] {c();BEGIN(INITIAL);return m(T_MINUSMINUS);}
+[+][+] {c();BEGIN(INITIAL);return m(T_PLUSPLUS);}
+[+][=] {c();return m(T_PLUSBY);}
+[-][=] {c();return m(T_MINUSBY);}
+[/][=] {c();return m(T_DIVBY);}
+[%][=] {c();return m(T_MODBY);}
+[*][=] {c();return m(T_MULBY);}
+[|][=] {c();return m(T_ORBY);}
+[>][>][=] {c();return m(T_SHRBY);}
+[<][<][=] {c();return m(T_SHLBY);}
+[>][>][>][=] {c();return m(T_USHRBY);}
+[<][<] {c();return m(T_SHL);}
+[>][>][>] {c();return m(T_USHR);}
+[>][>] {c();return m(T_SHR);}
+\.\.\. {c();return m(T_DOTDOTDOT);}
+\.\. {c();return m(T_DOTDOT);}
+\. {c();return m('.');}
+:: {c();return m(T_COLONCOLON);}
+: {c();return m(':');}
+instanceof {c();return m(KW_INSTANCEOF);}
+implements {c();return m(KW_IMPLEMENTS);}
+interface {c();return m(KW_INTERFACE);}
+namespace {c();return m(KW_NAMESPACE);}
+protected {c();return m(KW_PROTECTED);}
+undefined {c();return m(KW_UNDEFINED);}
+continue {c();return m(KW_CONTINUE);}
+override {c();return m(KW_OVERRIDE);}
+internal {c();return m(KW_INTERNAL);}
+function {c();return m(KW_FUNCTION);}
+default {c();return m(KW_DEFAULT);}
+package {c();return m(KW_PACKAGE);}
+private {c();return m(KW_PRIVATE);}
+dynamic {c();return m(KW_DYNAMIC);}
+extends {c();return m(KW_EXTENDS);}
+delete {c();return m(KW_DELETE);}
+return {c();return m(KW_RETURN);}
+public {c();return m(KW_PUBLIC);}
+native {c();return m(KW_NATIVE);}
+static {c();return m(KW_STATIC);}
+import {c();return m(KW_IMPORT);}
+typeof {c();return m(KW_TYPEOF);}
+throw {c();return m(KW_THROW);}
+class {c();return m(KW_CLASS);}
+const {c();return m(KW_CONST);}
+catch {c();return m(KW_CATCH);}
+final {c();return m(KW_FINAL);}
+false {c();return m(KW_FALSE);}
+break {c();return m(KW_BREAK);}
+super {c();return m(KW_SUPER);}
+each {c();return m(KW_EACH);}
+void {c();return m(KW_VOID);}
+true {c();return m(KW_TRUE);}
+null {c();return m(KW_NULL);}
+else {c();return m(KW_ELSE);}
+case {c();return m(KW_CASE);}
+with {c();return m(KW_WITH);}
+use {c();return m(KW_USE);}
+new {c();return m(KW_NEW);}
+get {c();return m(KW_GET);}
+set {c();return m(KW_SET);}
+var {c();return m(KW_VAR);}
+try {c();return m(KW_TRY);}
+is {c();return m(KW_IS) ;}
+in {c();return m(KW_IN) ;}
+if {c();return m(KW_IF) ;}
+as {c();return m(KW_AS);}
+{NAME} {c();BEGIN(INITIAL);return mkid(T_IDENTIFIER);}
+
+[+-\/*^~@$!%&\(=\[\]\{\}|?:;,<>] {c();BEGIN(REGEXPOK);return m(yytext[0]);}
+[\)\]] {c();BEGIN(INITIAL);return m(yytext[0]);}