Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Online playground ? #434

Open
mingodad opened this issue Feb 3, 2023 · 65 comments
Open

Online playground ? #434

mingodad opened this issue Feb 3, 2023 · 65 comments

Comments

@mingodad
Copy link

mingodad commented Feb 3, 2023

I'm looking to create a kind of online playground like:

And to start with I created this Lua script to generate an amalgamation of this project.

mk-re2c-amalagamation.lua:

local re2c_files = [==[
config.h
src/debug/debug.h
src/cfg/cfg.cc
src/codegen/helpers.cc
src/codegen/output.cc
src/codegen/pass1_analyze.cc
src/codegen/pass2_generate.cc
src/codegen/pass3_fixup.cc
src/codegen/pass4_render.cc
src/options/opt.cc
src/nfa/re_to_nfa.cc
src/adfa/adfa.cc
src/cfg/compact.cc
src/cfg/dce.cc
src/cfg/freeze.cc
src/cfg/interfere.cc
src/cfg/liveanal.cc
src/cfg/normalize.cc
src/cfg/optimize.cc
src/cfg/rename.cc
src/cfg/varalloc.cc
src/dfa/closure.cc
src/dfa/dead_rules.cc
src/dfa/determinization.cc
src/dfa/fallback_tags.cc
src/dfa/fillpoints.cc
src/dfa/find_state.cc
src/dfa/minimization.cc
src/dfa/tagver_table.cc
src/dfa/tcmd.cc
src/encoding/ebcdic.cc
src/encoding/enc.cc
src/encoding/range_suffix.cc
src/encoding/utf8.cc
src/encoding/utf16.cc
src/msg/msg.cc
src/msg/warn.cc
src/regexp/ast_to_re.cc
src/regexp/default_tags.cc
src/regexp/fixed_tags.cc
src/regexp/nullable.cc
src/regexp/regexp.cc
src/regexp/split_charset.cc
src/skeleton/control_flow.cc
src/skeleton/generate_code.cc
src/skeleton/generate_data.cc
src/skeleton/maxpath.cc
src/skeleton/skeleton.cc
src/parse/ast.cc
src/parse/input.cc
src/util/file_utils.cc
src/util/string_utils.cc
src/util/range.cc
src/msg/help.cc
src/parse/lex.cc
src/parse/parser.cc
src/msg/ver_to_vernum.cc
src/parse/lex_conf.cc
src/options/symtab.cc
src/options/parse_opts.cc
src/debug/dump_adfa.cc
src/debug/dump_cfg.cc
src/debug/dump_dfa.cc
src/debug/dump_dfa_tree.cc
src/debug/dump_interf.cc
src/debug/dump_nfa.cc
]==];

local folder_list = [==[
src/codegen/
lib/
src/options/
src/nfa/
src/adfa/
src/debug/
src/cfg/
src/dfa/
src/encoding/
src/msg/
src/regexp/
src/skeleton/
src/parse/
src/
]==];

local included = {}
local inc_sys = {}
local inc_sys_count = 0
local out = io.stdout

local function openInclude(prefix, filename)
	local inp = io.open(prefix .. filename, "r")
	if inp ~= null then return inp end
	for folder in folder_list:gmatch('([^\n]+)') do
		local fname = prefix .. folder .. filename
		local inp = io.open(fname, "r")
		--print(inp, fname)
		if inp ~= null then return inp end
	end
	return null
end

local ifdefListSI = {
	["src/dfa/fillpoints.cc"] = "StackItemFP",
	["src/regexp/default_tags.cc"] = "StackItemDT",
	["src/regexp/fixed_tags.cc"] = "StackItemFT",
	["src/regexp/nullable.cc"] = "StackItemNU",
	["src/skeleton/control_flow.cc"] = "StackItemCF",
	["src/skeleton/maxpath.cc"] = "StackItemMP",
}

function CopyWithInline(prefix, filename)
	if included[filename] then return end
	included[filename] = true
	print('//--Start of', filename);
	local ifdefSINeeded = ifdefListSI[filename];
	if ifdefSINeeded ~= null then
		out:write("#define StackItem " .. ifdefSINeeded .. "\n")
	end
	--if(filename:match("luac?.c"))
	local inp = assert(openInclude(prefix, filename))
	for line in inp:lines() do
		if line:match('struct tcmd_t;') then
			out:write("#ifndef TCMD_T_DEFINED\n")
			out:write("" .. line .. "\n")
			out:write("#endif\n")
		elseif line:match('struct tcmd_t {') then
			out:write("#define TCMD_T_DEFINED\n")
			out:write(line .. "\n")
		else
			local inc = line:match('#include%s+(["<].-)[">]')
			if inc  then
				out:write("//" .. line .. "\n")
				if inc:sub(1,1) == '"' then
					CopyWithInline(prefix, inc:sub(2))
				else
					local fn = inc:sub(2)
					if inc_sys[fn] == null then
						inc_sys_count = inc_sys_count +1
						inc_sys[fn] = inc_sys_count
					end
				end
			else
				out:write(line .. "\n")
			end
		end
	end
	if ifdefSINeeded ~= null then
		out:write("#undef StackItem\n")
	end
	print('//--End of', filename);
end

print([==[
#ifdef RE2C_WITH_COSMOPOLITAN
#include "cosmopolitan.h"
//STATIC_STACK_SIZE(0x80000);
#else
//g++ -std=c++11 -Os -DHAVE_CONFIG_H -DMAKE_RE2C_CMD -DRE2C_STDLIB_DIR='"/re2c/stdlib/"' -o am-re2c re2c-amalgamation.cpp
//x86_64-w64-mingw32-g++ -static-libstdc++ -static-libgcc -std=c++11 -Os -DHAVE_CONFIG_H -DMAKE_RE2C_CMD -DRE2C_STDLIB_DIR='"/re2c/stdlib/"' -o am-re2c.exe re2c-amalgamation.cpp
//emsdk-env em++ -s FORCE_FILESYSTEM=1 -std=c++11 -Os -DHAVE_CONFIG_H -DMAKE_RE2C_CMD -DRE2C_STDLIB_DIR='"/re2c/stdlib/"' -o am-re2c.js re2c-amalgamation.cpp -lnodefs.js
//emsdk-env em++ -std=c++11 -Os -DHAVE_CONFIG_H -DMAKE_RE2C_CMD -DRE2C_STDLIB_DIR='"/re2c/stdlib/"' -o am-re2c.js re2c-amalgamation.cpp
#include <sys/stat.h> //26
#include <stdint.h> //1
#include <stdarg.h> //11
#include <string.h> //6
#include <sys/types.h> //12
#include <stddef.h> //2
#include <valarray> //25
#include <cctype> //30
#include <memory> //20
#include <set> //4
#include <utility> //22
#include <stdlib.h> //14
#include <time.h> //18
#include <queue> //23
#include <new> //8
#include <stdio.h> //13
#include <fcntl.h> //27
#include <algorithm> //7
#include <stack> //24
#include <limits> //9
#ifdef _WIN32
#include <io.h> //29
#endif
#include <ostream> //21
#include <iomanip> //19
#include <string> //10
#include <ctype.h> //17
#include <iostream> //15
#include <vector> //5
#include <sstream> //16
#include <map> //3
#include <unistd.h> //28
#endif //RE2C_WITH_COSMOPOLITAN

]==])

local prefix = '/home/mingo/dev/c/A_grammars/re2c/';
for filename in re2c_files:gmatch('([^\n]+)') do
	CopyWithInline(prefix, filename);
end
print('#ifdef MAKE_RE2C_CMD');
CopyWithInline(prefix, "src/main.cc");
print('#endif //MAKE_RE2C_CMD');

print('/*');
for k, v in pairs(inc_sys) do print("#include <" .. k .. "> //" .. v ) end
print('*/');
@skvadrik
Copy link
Owner

skvadrik commented Feb 3, 2023

That's super cool! I'd love to see it work.

I don't know much about Lua, but I hope that sources list can be auto generated somehow so that your script is easily updated when files are removed/added.

@mingodad
Copy link
Author

mingodad commented Feb 6, 2023

Would be nice to have code generation for Javascript to allow to write and test it online it seems that this project https://github.com/lpsantil/re2js that seems to be from https://opensource.apple.com/source/WebCore/WebCore-1298.39/inspector/front-end/SourceJavaScriptTokenizer.re2js.auto.html (here the result https://opensource.apple.com/source/WebCore/WebCore-1298.39/inspector/front-end/SourceJavaScriptTokenizer.js.auto.html) (or vice versa) can be used as base to guide the Javascript code generation.

@mingodad
Copy link
Author

mingodad commented Feb 7, 2023

Here is my attempt to manually port (not yet runable) re2c/examples/c/real_world/cxx98.re to Javascript to guide the code generation of a possible Javascript backend (any help is appreciated):

/* Generated by re2c 3.0 on Tue Feb  7 13:23:28 2023 */
// re2c cxx98.rejs -o cxx98.rejs.ranges.c -i --case-ranges

const ULONG_MAX = 18446744073709551615;
const LONG_MAX = 9223372036854775807;
const FLT_MAX = 3.402823e+38;
const INT_MAX = 2147483647;
const UINT_MAX = 4294967295;

//template<int base>
var adddgt = function(base, u, d)
{
    if (u > (ULONG_MAX - d) / base) {
        return null;
    }
    u = u * base + d;
    return u;
}

var lex_oct = function(s, e, u)
{
    for (u = 0, ++s; s < e; ++s) {
        if (!adddgt(8, u, *s - 0x30u)) {
            return null;
        }
    }
    return u;
}

var lex_dec = function(s, e, u)
{
    for (u = 0; s < e; ++s) {
        if (!adddgt(10, u, *s - 0x30u)) {
            return null;
        }
    }
    return u;
}

var lex_hex = function(s, e, u)
{
    myloop: for (u = 0, s += 2; s < e;) {

{
	var yych;
	yych = s.charCodeAt(s);
	switch (yych) {
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ : { gotoCase = 2; continue; };
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 3; continue; };
		default: { gotoCase = 1; continue; };
	}
case 1:
	++s;
	{ if (!adddgt(16, u, s[-1] - 0x30u))      return null; continue myloop; }
case 2:
	++s;
	{ if (!adddgt(16, u, s[-1] - 0x41u + 10)) return null; continue myloop; }
case 3:
	++s;
	{ if (!adddgt(16, u, s[-1] - 0x61u + 10)) return null; continue myloop; }
}

    }
    return u;
}

var lex_str = function(input_t &in, unsigned char q)
{
    console.log( "%c", q);
    myloop: for (unsigned long u = q;; console.log( "\\x%lx", u)) {
        in.tok = YYCURSOR;

{
	var yych;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x0A /*'\n'*/: { gotoCase = 6; continue; };
		case 0x36 /*'\\'*/: { gotoCase = 8; continue; };
		default: { gotoCase = 5; continue; };
	}
case 5:
	++YYCURSOR;
	{ u = in.tok[0]; if (u == q) break myloop; continue myloop; }
case 6:
	++YYCURSOR;
case 7:
	{ return false; }
case 8:
	yych = this._charAt(in.mar = ++YYCURSOR);
	switch (yych) {
		case 0x22 /*'"'*/: { gotoCase = 9; continue; };
		case 0x27 /*'\''*/: { gotoCase = 10; continue; };
		case yych >= 0x30 /*'0'*/  && yych <= 0x37 /*'7'*/ : { gotoCase = 11; continue; };
		case 0x3F /*'?'*/: { gotoCase = 13; continue; };
		case 0x55 /*'U'*/: { gotoCase = 14; continue; };
		case 0x36 /*'\\'*/: { gotoCase = 16; continue; };
		case 0x61 /*'a'*/: { gotoCase = 17; continue; };
		case 0x62 /*'b'*/: { gotoCase = 18; continue; };
		case 0x66 /*'f'*/: { gotoCase = 19; continue; };
		case 0x6E /*'n'*/: { gotoCase = 20; continue; };
		case 0x72 /*'r'*/: { gotoCase = 21; continue; };
		case 0x74 /*'t'*/: { gotoCase = 22; continue; };
		case 0x75 /*'u'*/: { gotoCase = 23; continue; };
		case 0x76 /*'v'*/: { gotoCase = 24; continue; };
		case 0x78 /*'x'*/: { gotoCase = 25; continue; };
		default: { gotoCase = 7; continue; };
	}
case 9:
	++YYCURSOR;
	{ u = 0x22 /*'"'*/;  continue myloop; }
case 10:
	++YYCURSOR;
	{ u = 0x27 /*'\''*/; continue myloop; }
case 11:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x37 /*'7'*/ : { gotoCase = 26; continue; };
		default: { gotoCase = 12; continue; };
	}
case 12:
	{ var rc = lex_oct(in.tok, YYCURSOR, u); if (rc == null) return false; u = rc; continue myloop; }
case 13:
	++YYCURSOR;
	{ u = 0x3F /*'?'*/;  continue myloop; }
case 14:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 27; continue; };
		default: { gotoCase = 15; continue; };
	}
case 15:
	YYCURSOR = in.mar;
	{ gotoCase = 7; continue; };
case 16:
	++YYCURSOR;
	{ u = 0x36 /*'\\'*/; continue myloop; }
case 17:
	++YYCURSOR;
	{ u = 0x07 /*'\a'*/; continue myloop; }
case 18:
	++YYCURSOR;
	{ u = 0x08 /*'\b'*/; continue myloop; }
case 19:
	++YYCURSOR;
	{ u = 0x0C /*'\f'*/; continue myloop; }
case 20:
	++YYCURSOR;
	{ u = 0x0A /*'\n'*/; continue myloop; }
case 21:
	++YYCURSOR;
	{ u = 0x0D /*'\r'*/; continue myloop; }
case 22:
	++YYCURSOR;
	{ u = 0x09 /*'\t'*/; continue myloop; }
case 23:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 28; continue; };
		default: { gotoCase = 15; continue; };
	}
case 24:
	++YYCURSOR;
	{ u = 0x0B /*'\v'*/; continue myloop; }
case 25:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 29; continue; };
		default: { gotoCase = 15; continue; };
	}
case 26:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x37 /*'7'*/ : { gotoCase = 31; continue; };
		default: { gotoCase = 12; continue; };
	}
case 27:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 32; continue; };
		default: { gotoCase = 15; continue; };
	}
case 28:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 33; continue; };
		default: { gotoCase = 15; continue; };
	}
case 29:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 29; continue; };
		default: { gotoCase = 30; continue; };
	}
case 30:
	{ var rc = lex_hex(in.tok, YYCURSOR, u); if (rc == null) return false; u = rc; continue myloop; }
case 31:
	++YYCURSOR;
	{ gotoCase = 12; continue; };
case 32:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 34; continue; };
		default: { gotoCase = 15; continue; };
	}
case 33:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 35; continue; };
		default: { gotoCase = 15; continue; };
	}
case 34:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 36; continue; };
		default: { gotoCase = 15; continue; };
	}
case 35:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 37; continue; };
		default: { gotoCase = 15; continue; };
	}
case 36:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 38; continue; };
		default: { gotoCase = 15; continue; };
	}
case 37:
	++YYCURSOR;
	{ var rc = lex_hex(in.tok, YYCURSOR, u); if (rc == null) return false; u = rc; continue myloop; }
case 38:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 39; continue; };
		default: { gotoCase = 15; continue; };
	}
case 39:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 40; continue; };
		default: { gotoCase = 15; continue; };
	}
case 40:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 41; continue; };
		default: { gotoCase = 15; continue; };
	}
case 41:
	++YYCURSOR;
	{ var rc = lex_hex(in.tok, YYCURSOR, u); if (rc == null) return false; u = rc; continue myloop; }
}

    }
    console.log( "%c", q);
    return true;
}

var lex_flt = function(s)
{
    var d = 0.0;
    var x = 1.0;
    var e = 0;

mant_int:

{
	let yych;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x2E /*'.'*/: { gotoCase = 44; continue; };
		case 0x45 /*'E'*/:
		case 0x65 /*'e'*/: { gotoCase = 45; continue; };
		default: { gotoCase = 43; continue; };
	}
case 43:
	++s;
	{ d = (d * 10) + (s[-1] - 0x30 /*'0'*/); goto mant_int; }
case 44:
	++s;
	{ goto mant_frac; }
case 45:
	++s;
	{ goto exp_sign; }
}

mant_frac:

{
	let yych;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 48; continue; };
		case 0x45 /*'E'*/:
		case 0x65 /*'e'*/: { gotoCase = 49; continue; };
		default: { gotoCase = 47; continue; };
	}
case 47:
	{ goto sfx; }
case 48:
	++s;
	{ d += (x /= 10) * (s[-1] - 0x30 /*'0'*/); goto mant_frac; }
case 49:
	++s;
	{ goto exp_sign; }
}

exp_sign:

{
	let yych;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x2B /*'+'*/: { gotoCase = 52; continue; };
		case 0x2D /*'-'*/: { gotoCase = 53; continue; };
		default: { gotoCase = 51; continue; };
	}
case 51:
	{ x = 1e+1; goto exp; }
case 52:
	++s;
	{ gotoCase = 51; continue; };
case 53:
	++s;
	{ x = 1e-1; goto exp; }
}

exp:

{
	let yych;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 56; continue; };
		default: { gotoCase = 55; continue; };
	}
case 55:
	{ for (; e > 0; --e) d *= x;    goto sfx; }
case 56:
	++s;
	{ e = (e * 10) + (s[-1] - 0x30 /*'0'*/); goto exp; }
}

sfx:

{
	let yych;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x46 /*'F'*/:
		case 0x66 /*'f'*/: { gotoCase = 59; continue; };
		default: { gotoCase = 58; continue; };
	}
case 58:
	++s;
	{ goto end; }
case 59:
	++s;
	{ if (d > FLT_MAX) return false; goto end; }
}

end:
    console.log( d);
    return true;
}

var lex = function(code)
{
    var u;
    myloop: for (;;) {
        in.tok = YYCURSOR;

{
	var gotoCase = 0;
	var YYCURSOR = 0;
	var yych;
	while(true) {
		switch(gotoCase) {
case 0:
	var yyaccept = 0;
	yych = code.charCodeA(YYCURSOR);
	switch (yych) {
		case 0x00: { gotoCase = 61; continue; };
		case yych >= 0x09 /*'\t'*/  && yych <= 0x0B /*'\v'*/ :
		case 0x0D /*'\r'*/:
		case 0x20 /*' '*/: { gotoCase = 63; continue; };
		case 0x21 /*'!'*/: { gotoCase = 65; continue; };
		case 0x22 /*'"'*/: { gotoCase = 67; continue; };
		case 0x23 /*'#'*/: { gotoCase = 69; continue; };
		case 0x25 /*'%'*/: { gotoCase = 70; continue; };
		case 0x26 /*'&'*/: { gotoCase = 72; continue; };
		case 0x27 /*'\''*/: { gotoCase = 74; continue; };
		case 0x28 /*'('*/: { gotoCase = 75; continue; };
		case 0x29 /*')'*/: { gotoCase = 76; continue; };
		case 0x2A /*'*'*/: { gotoCase = 77; continue; };
		case 0x2B /*'+'*/: { gotoCase = 79; continue; };
		case 0x2C /*','*/: { gotoCase = 81; continue; };
		case 0x2D /*'-'*/: { gotoCase = 82; continue; };
		case 0x2E /*'.'*/: { gotoCase = 84; continue; };
		case 0x2F /*'/'*/: { gotoCase = 86; continue; };
		case 0x30 /*'0'*/: { gotoCase = 88; continue; };
		case yych >= 0x31 /*'1'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 90; continue; };
		case 0x3A /*':'*/: { gotoCase = 92; continue; };
		case 0x3B /*';'*/: { gotoCase = 94; continue; };
		case 0x3C /*'<'*/: { gotoCase = 95; continue; };
		case 0x3D /*'='*/: { gotoCase = 97; continue; };
		case 0x3E /*'>'*/: { gotoCase = 99; continue; };
		case 0x3F /*'?'*/: { gotoCase = 101; continue; };
		case yych >= 0x41 /*'A'*/  && yych <= 0x4B /*'K'*/ :
		case yych >= 0x4D /*'M'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case 0x68 /*'h'*/:
		case yych >= 0x6A /*'j'*/  && yych <= 0x6B /*'k'*/ :
		case 0x71 /*'q'*/:
		case yych >= 0x79 /*'y'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		case 0x4C /*'L'*/: { gotoCase = 105; continue; };
		case 0x5B /*'['*/: { gotoCase = 106; continue; };
		case 0x5D /*']'*/: { gotoCase = 107; continue; };
		case 0x5E /*'^'*/: { gotoCase = 108; continue; };
		case 0x61 /*'a'*/: { gotoCase = 110; continue; };
		case 0x62 /*'b'*/: { gotoCase = 111; continue; };
		case 0x63 /*'c'*/: { gotoCase = 112; continue; };
		case 0x64 /*'d'*/: { gotoCase = 113; continue; };
		case 0x65 /*'e'*/: { gotoCase = 114; continue; };
		case 0x66 /*'f'*/: { gotoCase = 115; continue; };
		case 0x67 /*'g'*/: { gotoCase = 116; continue; };
		case 0x69 /*'i'*/: { gotoCase = 117; continue; };
		case 0x6C /*'l'*/: { gotoCase = 118; continue; };
		case 0x6D /*'m'*/: { gotoCase = 119; continue; };
		case 0x6E /*'n'*/: { gotoCase = 120; continue; };
		case 0x6F /*'o'*/: { gotoCase = 121; continue; };
		case 0x70 /*'p'*/: { gotoCase = 122; continue; };
		case 0x72 /*'r'*/: { gotoCase = 123; continue; };
		case 0x73 /*'s'*/: { gotoCase = 124; continue; };
		case 0x74 /*'t'*/: { gotoCase = 125; continue; };
		case 0x75 /*'u'*/: { gotoCase = 126; continue; };
		case 0x76 /*'v'*/: { gotoCase = 127; continue; };
		case 0x77 /*'w'*/: { gotoCase = 128; continue; };
		case 0x78 /*'x'*/: { gotoCase = 129; continue; };
		case 0x7B /*'{'*/: { gotoCase = 130; continue; };
		case 0x7C /*'|'*/: { gotoCase = 131; continue; };
		case 0x7D /*'}'*/: { gotoCase = 133; continue; };
		case 0x7E /*'~'*/: { gotoCase = 134; continue; };
		default: { gotoCase = 62; continue; };
	}
case 61:
	++YYCURSOR;
	{
                console.log( "\n");
                return in.lim - in.tok == YYMAXFILL;
            }
case 62:
	++YYCURSOR;
	{ return false; }
case 63:
	yyaccept = 0;
	in.mar = ++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case yych >= 0x09 /*'\t'*/  && yych <= 0x0B /*'\v'*/ :
		case 0x0D /*'\r'*/:
		case 0x20 /*' '*/: { gotoCase = 63; continue; };
		case 0x2F /*'/'*/: { gotoCase = 136; continue; };
		default: { gotoCase = 64; continue; };
	}
case 64:
	{ console.log( " "); continue myloop; }
case 65:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3D /*'='*/: { gotoCase = 138; continue; };
		default: { gotoCase = 66; continue; };
	}
case 66:
	{ console.log( "!");      continue myloop; }
case 67:
	++YYCURSOR;
case 68:
	{ if (!lex_str(in, in.cur[-1])) return false; continue myloop; }
case 69:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x0A /*'\n'*/: { gotoCase = 140; continue; };
		case 0x36 /*'\\'*/: { gotoCase = 141; continue; };
		default: { gotoCase = 69; continue; };
	}
case 70:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3A /*':'*/: { gotoCase = 69; continue; };
		case 0x3D /*'='*/: { gotoCase = 142; continue; };
		case 0x3E /*'>'*/: { gotoCase = 133; continue; };
		default: { gotoCase = 71; continue; };
	}
case 71:
	{ console.log( "%%");     continue myloop; }
case 72:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x26 /*'&'*/: { gotoCase = 143; continue; };
		case 0x3D /*'='*/: { gotoCase = 145; continue; };
		default: { gotoCase = 73; continue; };
	}
case 73:
	{ console.log( "&");      continue myloop; }
case 74:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x27 /*'\''*/: { gotoCase = 147; continue; };
		default: { gotoCase = 68; continue; };
	}
case 75:
	++YYCURSOR;
	{ console.log( "(");      continue myloop; }
case 76:
	++YYCURSOR;
	{ console.log( ")");      continue myloop; }
case 77:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3D /*'='*/: { gotoCase = 148; continue; };
		default: { gotoCase = 78; continue; };
	}
case 78:
	{ console.log( "*");      continue myloop; }
case 79:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x2B /*'+'*/: { gotoCase = 149; continue; };
		case 0x3D /*'='*/: { gotoCase = 150; continue; };
		default: { gotoCase = 80; continue; };
	}
case 80:
	{ console.log( "+");      continue myloop; }
case 81:
	++YYCURSOR;
	{ console.log( ",");      continue myloop; }
case 82:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x2D /*'-'*/: { gotoCase = 151; continue; };
		case 0x3D /*'='*/: { gotoCase = 152; continue; };
		case 0x3E /*'>'*/: { gotoCase = 153; continue; };
		default: { gotoCase = 83; continue; };
	}
case 83:
	{ console.log( "-");      continue myloop; }
case 84:
	yyaccept = 1;
	yych = this._charAt(in.mar = ++YYCURSOR);
	switch (yych) {
		case 0x2A /*'*'*/: { gotoCase = 155; continue; };
		case 0x2E /*'.'*/: { gotoCase = 156; continue; };
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 157; continue; };
		default: { gotoCase = 85; continue; };
	}
case 85:
	{ console.log( ".");      continue myloop; }
case 86:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x2A /*'*'*/: { gotoCase = 159; continue; };
		case 0x2F /*'/'*/: { gotoCase = 160; continue; };
		case 0x3D /*'='*/: { gotoCase = 161; continue; };
		default: { gotoCase = 87; continue; };
	}
case 87:
	{ console.log( "/");      continue myloop; }
case 88:
	yyaccept = 2;
	yych = this._charAt(in.mar = ++YYCURSOR);
	switch (yych) {
		case 0x58 /*'X'*/:
		case 0x78 /*'x'*/: { gotoCase = 166; continue; };
		default: { gotoCase = 163; continue; };
	}
case 89:
	{ var rc = lex_oct(in.tok, YYCURSOR, u); if (rc == null) return false; u = rc; goto sfx; }
case 90:
	yyaccept = 3;
	in.mar = ++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x2E /*'.'*/: { gotoCase = 157; continue; };
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 90; continue; };
		case 0x45 /*'E'*/:
		case 0x65 /*'e'*/: { gotoCase = 165; continue; };
		default: { gotoCase = 91; continue; };
	}
case 91:
	{ var rc = lex_dec(in.tok, YYCURSOR, u); if (rc == null) return false; u = rc; goto sfx; }
case 92:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3A /*':'*/: { gotoCase = 167; continue; };
		case 0x3E /*'>'*/: { gotoCase = 107; continue; };
		default: { gotoCase = 93; continue; };
	}
case 93:
	{ console.log( ":");      continue myloop; }
case 94:
	++YYCURSOR;
	{ console.log( ";");      continue myloop; }
case 95:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x25 /*'%'*/: { gotoCase = 130; continue; };
		case 0x3A /*':'*/: { gotoCase = 106; continue; };
		case 0x3C /*'<'*/: { gotoCase = 168; continue; };
		case 0x3D /*'='*/: { gotoCase = 170; continue; };
		default: { gotoCase = 96; continue; };
	}
case 96:
	{ console.log( "<");      continue myloop; }
case 97:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3D /*'='*/: { gotoCase = 171; continue; };
		default: { gotoCase = 98; continue; };
	}
case 98:
	{ console.log( "=");      continue myloop; }
case 99:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3D /*'='*/: { gotoCase = 172; continue; };
		case 0x3E /*'>'*/: { gotoCase = 173; continue; };
		default: { gotoCase = 100; continue; };
	}
case 100:
	{ console.log( ">");      continue myloop; }
case 101:
	++YYCURSOR;
	{ console.log( "?");      continue myloop; }
case 102:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
case 103:
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 104; continue; };
	}
case 104:
	{ console.log( "%.*s", (int)(YYCURSOR - in.tok), in.tok); continue myloop; }
case 105:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x22 /*'"'*/: { gotoCase = 67; continue; };
		case 0x27 /*'\''*/: { gotoCase = 74; continue; };
		default: { gotoCase = 103; continue; };
	}
case 106:
	++YYCURSOR;
	{ console.log( "[");      continue myloop; }
case 107:
	++YYCURSOR;
	{ console.log( "]");      continue myloop; }
case 108:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3D /*'='*/: { gotoCase = 175; continue; };
		default: { gotoCase = 109; continue; };
	}
case 109:
	{ console.log( "^");      continue myloop; }
case 110:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 177; continue; };
		case 0x73 /*'s'*/: { gotoCase = 178; continue; };
		case 0x75 /*'u'*/: { gotoCase = 179; continue; };
		default: { gotoCase = 103; continue; };
	}
case 111:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 180; continue; };
		case 0x6F /*'o'*/: { gotoCase = 181; continue; };
		case 0x72 /*'r'*/: { gotoCase = 182; continue; };
		default: { gotoCase = 103; continue; };
	}
case 112:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 183; continue; };
		case 0x68 /*'h'*/: { gotoCase = 184; continue; };
		case 0x6C /*'l'*/: { gotoCase = 185; continue; };
		case 0x6F /*'o'*/: { gotoCase = 186; continue; };
		default: { gotoCase = 103; continue; };
	}
case 113:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 187; continue; };
		case 0x6F /*'o'*/: { gotoCase = 188; continue; };
		case 0x79 /*'y'*/: { gotoCase = 190; continue; };
		default: { gotoCase = 103; continue; };
	}
case 114:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 191; continue; };
		case 0x6E /*'n'*/: { gotoCase = 192; continue; };
		case 0x78 /*'x'*/: { gotoCase = 193; continue; };
		default: { gotoCase = 103; continue; };
	}
case 115:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 194; continue; };
		case 0x6C /*'l'*/: { gotoCase = 195; continue; };
		case 0x6F /*'o'*/: { gotoCase = 196; continue; };
		case 0x72 /*'r'*/: { gotoCase = 197; continue; };
		default: { gotoCase = 103; continue; };
	}
case 116:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 198; continue; };
		default: { gotoCase = 103; continue; };
	}
case 117:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x66 /*'f'*/: { gotoCase = 199; continue; };
		case 0x6E /*'n'*/: { gotoCase = 201; continue; };
		default: { gotoCase = 103; continue; };
	}
case 118:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 202; continue; };
		default: { gotoCase = 103; continue; };
	}
case 119:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x75 /*'u'*/: { gotoCase = 203; continue; };
		default: { gotoCase = 103; continue; };
	}
case 120:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 204; continue; };
		case 0x65 /*'e'*/: { gotoCase = 205; continue; };
		case 0x6F /*'o'*/: { gotoCase = 206; continue; };
		default: { gotoCase = 103; continue; };
	}
case 121:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x70 /*'p'*/: { gotoCase = 207; continue; };
		case 0x72 /*'r'*/: { gotoCase = 208; continue; };
		default: { gotoCase = 103; continue; };
	}
case 122:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 210; continue; };
		case 0x75 /*'u'*/: { gotoCase = 211; continue; };
		default: { gotoCase = 103; continue; };
	}
case 123:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 212; continue; };
		default: { gotoCase = 103; continue; };
	}
case 124:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x68 /*'h'*/: { gotoCase = 213; continue; };
		case 0x69 /*'i'*/: { gotoCase = 214; continue; };
		case 0x74 /*'t'*/: { gotoCase = 215; continue; };
		case 0x77 /*'w'*/: { gotoCase = 216; continue; };
		default: { gotoCase = 103; continue; };
	}
case 125:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 217; continue; };
		case 0x68 /*'h'*/: { gotoCase = 218; continue; };
		case 0x72 /*'r'*/: { gotoCase = 219; continue; };
		case 0x79 /*'y'*/: { gotoCase = 220; continue; };
		default: { gotoCase = 103; continue; };
	}
case 126:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 221; continue; };
		case 0x73 /*'s'*/: { gotoCase = 222; continue; };
		default: { gotoCase = 103; continue; };
	}
case 127:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 223; continue; };
		case 0x6F /*'o'*/: { gotoCase = 224; continue; };
		default: { gotoCase = 103; continue; };
	}
case 128:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 225; continue; };
		case 0x68 /*'h'*/: { gotoCase = 226; continue; };
		default: { gotoCase = 103; continue; };
	}
case 129:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 227; continue; };
		default: { gotoCase = 103; continue; };
	}
case 130:
	++YYCURSOR;
	{ console.log( "{");      continue myloop; }
case 131:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3D /*'='*/: { gotoCase = 228; continue; };
		case 0x7C /*'|'*/: { gotoCase = 230; continue; };
		default: { gotoCase = 132; continue; };
	}
case 132:
	{ console.log( "|");      continue myloop; }
case 133:
	++YYCURSOR;
	{ console.log( "}");      continue myloop; }
case 134:
	++YYCURSOR;
case 135:
	{ console.log( "~");      continue myloop; }
case 136:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x2A /*'*'*/: { gotoCase = 159; continue; };
		case 0x2F /*'/'*/: { gotoCase = 160; continue; };
		default: { gotoCase = 137; continue; };
	}
case 137:
	YYCURSOR = in.mar;
	switch (yyaccept) {
		case 0: { gotoCase = 64; continue; };
		case 1: { gotoCase = 85; continue; };
		case 2: { gotoCase = 89; continue; };
		case 3: { gotoCase = 91; continue; };
		default: { gotoCase = 158; continue; };
	}
case 138:
	++YYCURSOR;
case 139:
	{ console.log( "!=");     continue myloop; }
case 140:
	++YYCURSOR;
	{ continue myloop; }
case 141:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x36 /*'\\'*/: { gotoCase = 141; continue; };
		default: { gotoCase = 69; continue; };
	}
case 142:
	++YYCURSOR;
	{ console.log( "%%=");    continue myloop; }
case 143:
	++YYCURSOR;
case 144:
	{ console.log( "&&");     continue myloop; }
case 145:
	++YYCURSOR;
case 146:
	{ console.log( "&=");     continue myloop; }
case 147:
	++YYCURSOR;
	{ return false; }
case 148:
	++YYCURSOR;
	{ console.log( "*=");     continue myloop; }
case 149:
	++YYCURSOR;
	{ console.log( "++");     continue myloop; }
case 150:
	++YYCURSOR;
	{ console.log( "+=");     continue myloop; }
case 151:
	++YYCURSOR;
	{ console.log( "--");     continue myloop; }
case 152:
	++YYCURSOR;
	{ console.log( "-=");     continue myloop; }
case 153:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x2A /*'*'*/: { gotoCase = 231; continue; };
		default: { gotoCase = 154; continue; };
	}
case 154:
	{ console.log( "->");     continue myloop; }
case 155:
	++YYCURSOR;
	{ console.log( ".");      continue myloop; }
case 156:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x2E /*'.'*/: { gotoCase = 232; continue; };
		default: { gotoCase = 137; continue; };
	}
case 157:
	yyaccept = 4;
	in.mar = ++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 157; continue; };
		case 0x45 /*'E'*/:
		case 0x65 /*'e'*/: { gotoCase = 165; continue; };
		case 0x46 /*'F'*/:
		case 0x4C /*'L'*/:
		case 0x66 /*'f'*/:
		case 0x6C /*'l'*/: { gotoCase = 233; continue; };
		default: { gotoCase = 158; continue; };
	}
case 158:
	{ if (lex_flt(in.tok)) continue myloop; return false; }
case 159:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x2A /*'*'*/: { gotoCase = 234; continue; };
		default: { gotoCase = 159; continue; };
	}
case 160:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x0A /*'\n'*/: { gotoCase = 63; continue; };
		default: { gotoCase = 160; continue; };
	}
case 161:
	++YYCURSOR;
	{ console.log( "/=");     continue myloop; }
case 162:
	yyaccept = 2;
	in.mar = ++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
case 163:
	switch (yych) {
		case 0x2E /*'.'*/: { gotoCase = 157; continue; };
		case yych >= 0x30 /*'0'*/  && yych <= 0x37 /*'7'*/ : { gotoCase = 162; continue; };
		case yych >= 0x38 /*'8'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 164; continue; };
		case 0x45 /*'E'*/:
		case 0x65 /*'e'*/: { gotoCase = 165; continue; };
		default: { gotoCase = 89; continue; };
	}
case 164:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x2E /*'.'*/: { gotoCase = 157; continue; };
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 164; continue; };
		case 0x45 /*'E'*/:
		case 0x65 /*'e'*/: { gotoCase = 165; continue; };
		default: { gotoCase = 137; continue; };
	}
case 165:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x2B /*'+'*/:
		case 0x2D /*'-'*/: { gotoCase = 235; continue; };
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 236; continue; };
		default: { gotoCase = 137; continue; };
	}
case 166:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 237; continue; };
		default: { gotoCase = 137; continue; };
	}
case 167:
	++YYCURSOR;
	{ console.log( "::");     continue myloop; }
case 168:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3D /*'='*/: { gotoCase = 239; continue; };
		default: { gotoCase = 169; continue; };
	}
case 169:
	{ console.log( "<<");     continue myloop; }
case 170:
	++YYCURSOR;
	{ console.log( "<=");     continue myloop; }
case 171:
	++YYCURSOR;
	{ console.log( "==");     continue myloop; }
case 172:
	++YYCURSOR;
	{ console.log( ">=");     continue myloop; }
case 173:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x3D /*'='*/: { gotoCase = 240; continue; };
		default: { gotoCase = 174; continue; };
	}
case 174:
	{ console.log( ">>");     continue myloop; }
case 175:
	++YYCURSOR;
case 176:
	{ console.log( "^=");     continue myloop; }
case 177:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x64 /*'d'*/: { gotoCase = 241; continue; };
		default: { gotoCase = 103; continue; };
	}
case 178:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6D /*'m'*/: { gotoCase = 242; continue; };
		default: { gotoCase = 103; continue; };
	}
case 179:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 244; continue; };
		default: { gotoCase = 103; continue; };
	}
case 180:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 245; continue; };
		default: { gotoCase = 103; continue; };
	}
case 181:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 246; continue; };
		default: { gotoCase = 103; continue; };
	}
case 182:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 247; continue; };
		default: { gotoCase = 103; continue; };
	}
case 183:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 248; continue; };
		case 0x74 /*'t'*/: { gotoCase = 249; continue; };
		default: { gotoCase = 103; continue; };
	}
case 184:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 250; continue; };
		default: { gotoCase = 103; continue; };
	}
case 185:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 251; continue; };
		default: { gotoCase = 103; continue; };
	}
case 186:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6D /*'m'*/: { gotoCase = 252; continue; };
		case 0x6E /*'n'*/: { gotoCase = 253; continue; };
		default: { gotoCase = 103; continue; };
	}
case 187:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x66 /*'f'*/: { gotoCase = 254; continue; };
		case 0x6C /*'l'*/: { gotoCase = 255; continue; };
		default: { gotoCase = 103; continue; };
	}
case 188:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x74 /*'t'*/ :
		case yych >= 0x76 /*'v'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		case 0x75 /*'u'*/: { gotoCase = 256; continue; };
		default: { gotoCase = 189; continue; };
	}
case 189:
	{ console.log( "DO");               continue myloop; }
case 190:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 257; continue; };
		default: { gotoCase = 103; continue; };
	}
case 191:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 258; continue; };
		default: { gotoCase = 103; continue; };
	}
case 192:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x75 /*'u'*/: { gotoCase = 259; continue; };
		default: { gotoCase = 103; continue; };
	}
case 193:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x70 /*'p'*/: { gotoCase = 260; continue; };
		case 0x74 /*'t'*/: { gotoCase = 261; continue; };
		default: { gotoCase = 103; continue; };
	}
case 194:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 262; continue; };
		default: { gotoCase = 103; continue; };
	}
case 195:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 263; continue; };
		default: { gotoCase = 103; continue; };
	}
case 196:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 264; continue; };
		default: { gotoCase = 103; continue; };
	}
case 197:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 266; continue; };
		default: { gotoCase = 103; continue; };
	}
case 198:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 267; continue; };
		default: { gotoCase = 103; continue; };
	}
case 199:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 200; continue; };
	}
case 200:
	{ console.log( "IF");               continue myloop; }
case 201:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 268; continue; };
		case 0x74 /*'t'*/: { gotoCase = 269; continue; };
		default: { gotoCase = 103; continue; };
	}
case 202:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 271; continue; };
		default: { gotoCase = 103; continue; };
	}
case 203:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 272; continue; };
		default: { gotoCase = 103; continue; };
	}
case 204:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6D /*'m'*/: { gotoCase = 273; continue; };
		default: { gotoCase = 103; continue; };
	}
case 205:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x77 /*'w'*/: { gotoCase = 274; continue; };
		default: { gotoCase = 103; continue; };
	}
case 206:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 276; continue; };
		default: { gotoCase = 103; continue; };
	}
case 207:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 277; continue; };
		default: { gotoCase = 103; continue; };
	}
case 208:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		case 0x5F /*'_'*/: { gotoCase = 278; continue; };
		default: { gotoCase = 209; continue; };
	}
case 209:
	{ console.log( "||");     continue myloop; }
case 210:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 279; continue; };
		case 0x6F /*'o'*/: { gotoCase = 280; continue; };
		default: { gotoCase = 103; continue; };
	}
case 211:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x62 /*'b'*/: { gotoCase = 281; continue; };
		default: { gotoCase = 103; continue; };
	}
case 212:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x67 /*'g'*/: { gotoCase = 282; continue; };
		case 0x69 /*'i'*/: { gotoCase = 283; continue; };
		case 0x74 /*'t'*/: { gotoCase = 284; continue; };
		default: { gotoCase = 103; continue; };
	}
case 213:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 285; continue; };
		default: { gotoCase = 103; continue; };
	}
case 214:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x67 /*'g'*/: { gotoCase = 286; continue; };
		case 0x7A /*'z'*/: { gotoCase = 287; continue; };
		default: { gotoCase = 103; continue; };
	}
case 215:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 288; continue; };
		case 0x72 /*'r'*/: { gotoCase = 289; continue; };
		default: { gotoCase = 103; continue; };
	}
case 216:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 290; continue; };
		default: { gotoCase = 103; continue; };
	}
case 217:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6D /*'m'*/: { gotoCase = 291; continue; };
		default: { gotoCase = 103; continue; };
	}
case 218:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 292; continue; };
		case 0x72 /*'r'*/: { gotoCase = 293; continue; };
		default: { gotoCase = 103; continue; };
	}
case 219:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x75 /*'u'*/: { gotoCase = 294; continue; };
		case 0x79 /*'y'*/: { gotoCase = 295; continue; };
		default: { gotoCase = 103; continue; };
	}
case 220:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x70 /*'p'*/: { gotoCase = 297; continue; };
		default: { gotoCase = 103; continue; };
	}
case 221:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 298; continue; };
		case 0x73 /*'s'*/: { gotoCase = 299; continue; };
		default: { gotoCase = 103; continue; };
	}
case 222:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 300; continue; };
		default: { gotoCase = 103; continue; };
	}
case 223:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 301; continue; };
		default: { gotoCase = 103; continue; };
	}
case 224:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 302; continue; };
		case 0x6C /*'l'*/: { gotoCase = 303; continue; };
		default: { gotoCase = 103; continue; };
	}
case 225:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x68 /*'h'*/: { gotoCase = 304; continue; };
		default: { gotoCase = 103; continue; };
	}
case 226:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 305; continue; };
		default: { gotoCase = 103; continue; };
	}
case 227:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 306; continue; };
		default: { gotoCase = 103; continue; };
	}
case 228:
	++YYCURSOR;
case 229:
	{ console.log( "|=");     continue myloop; }
case 230:
	++YYCURSOR;
	{ gotoCase = 209; continue; };
case 231:
	++YYCURSOR;
	{ console.log( "->*");    continue myloop; }
case 232:
	++YYCURSOR;
	{ console.log( "...");    continue myloop; }
case 233:
	++YYCURSOR;
	{ gotoCase = 158; continue; };
case 234:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x2F /*'/'*/: { gotoCase = 63; continue; };
		default: { gotoCase = 159; continue; };
	}
case 235:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 236; continue; };
		default: { gotoCase = 137; continue; };
	}
case 236:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ : { gotoCase = 236; continue; };
		case 0x46 /*'F'*/:
		case 0x4C /*'L'*/:
		case 0x66 /*'f'*/:
		case 0x6C /*'l'*/: { gotoCase = 233; continue; };
		default: { gotoCase = 158; continue; };
	}
case 237:
	++YYCURSOR;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x46 /*'F'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x66 /*'f'*/ : { gotoCase = 237; continue; };
		default: { gotoCase = 238; continue; };
	}
case 238:
	{ var rc = lex_hex(in.tok, YYCURSOR, u); if (rc == null) return false; u = rc; goto sfx; }
case 239:
	++YYCURSOR;
	{ console.log( "<<=");    continue myloop; }
case 240:
	++YYCURSOR;
	{ console.log( ">>=");    continue myloop; }
case 241:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		case 0x5F /*'_'*/: { gotoCase = 307; continue; };
		default: { gotoCase = 144; continue; };
	}
case 242:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 243; continue; };
	}
case 243:
	{ console.log( "ASM");              continue myloop; }
case 244:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 308; continue; };
		default: { gotoCase = 103; continue; };
	}
case 245:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 310; continue; };
		case 0x6F /*'o'*/: { gotoCase = 311; continue; };
		default: { gotoCase = 103; continue; };
	}
case 246:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 312; continue; };
		default: { gotoCase = 103; continue; };
	}
case 247:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 314; continue; };
		default: { gotoCase = 103; continue; };
	}
case 248:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 315; continue; };
		default: { gotoCase = 103; continue; };
	}
case 249:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 317; continue; };
		default: { gotoCase = 103; continue; };
	}
case 250:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 318; continue; };
		default: { gotoCase = 103; continue; };
	}
case 251:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 320; continue; };
		default: { gotoCase = 103; continue; };
	}
case 252:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x70 /*'p'*/: { gotoCase = 321; continue; };
		default: { gotoCase = 103; continue; };
	}
case 253:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 322; continue; };
		case 0x74 /*'t'*/: { gotoCase = 323; continue; };
		default: { gotoCase = 103; continue; };
	}
case 254:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 324; continue; };
		default: { gotoCase = 103; continue; };
	}
case 255:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 325; continue; };
		default: { gotoCase = 103; continue; };
	}
case 256:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x62 /*'b'*/: { gotoCase = 326; continue; };
		default: { gotoCase = 103; continue; };
	}
case 257:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 327; continue; };
		default: { gotoCase = 103; continue; };
	}
case 258:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 328; continue; };
		default: { gotoCase = 103; continue; };
	}
case 259:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6D /*'m'*/: { gotoCase = 330; continue; };
		default: { gotoCase = 103; continue; };
	}
case 260:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 332; continue; };
		case 0x6F /*'o'*/: { gotoCase = 333; continue; };
		default: { gotoCase = 103; continue; };
	}
case 261:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 334; continue; };
		default: { gotoCase = 103; continue; };
	}
case 262:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 335; continue; };
		default: { gotoCase = 103; continue; };
	}
case 263:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 336; continue; };
		default: { gotoCase = 103; continue; };
	}
case 264:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 265; continue; };
	}
case 265:
	{ console.log( "FOR");              continue myloop; }
case 266:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 337; continue; };
		default: { gotoCase = 103; continue; };
	}
case 267:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 338; continue; };
		default: { gotoCase = 103; continue; };
	}
case 268:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 340; continue; };
		default: { gotoCase = 103; continue; };
	}
case 269:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 270; continue; };
	}
case 270:
	{ console.log( "INT");              continue myloop; }
case 271:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x67 /*'g'*/: { gotoCase = 341; continue; };
		default: { gotoCase = 103; continue; };
	}
case 272:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 343; continue; };
		default: { gotoCase = 103; continue; };
	}
case 273:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 344; continue; };
		default: { gotoCase = 103; continue; };
	}
case 274:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 275; continue; };
	}
case 275:
	{ console.log( "new");    continue myloop; }
case 276:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		case 0x5F /*'_'*/: { gotoCase = 345; continue; };
		default: { gotoCase = 66; continue; };
	}
case 277:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 346; continue; };
		default: { gotoCase = 103; continue; };
	}
case 278:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 347; continue; };
		default: { gotoCase = 103; continue; };
	}
case 279:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x76 /*'v'*/: { gotoCase = 348; continue; };
		default: { gotoCase = 103; continue; };
	}
case 280:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 349; continue; };
		default: { gotoCase = 103; continue; };
	}
case 281:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 350; continue; };
		default: { gotoCase = 103; continue; };
	}
case 282:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 351; continue; };
		default: { gotoCase = 103; continue; };
	}
case 283:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 352; continue; };
		default: { gotoCase = 103; continue; };
	}
case 284:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x75 /*'u'*/: { gotoCase = 353; continue; };
		default: { gotoCase = 103; continue; };
	}
case 285:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 354; continue; };
		default: { gotoCase = 103; continue; };
	}
case 286:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 355; continue; };
		default: { gotoCase = 103; continue; };
	}
case 287:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 356; continue; };
		default: { gotoCase = 103; continue; };
	}
case 288:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 357; continue; };
		default: { gotoCase = 103; continue; };
	}
case 289:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x75 /*'u'*/: { gotoCase = 358; continue; };
		default: { gotoCase = 103; continue; };
	}
case 290:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 359; continue; };
		default: { gotoCase = 103; continue; };
	}
case 291:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x70 /*'p'*/: { gotoCase = 360; continue; };
		default: { gotoCase = 103; continue; };
	}
case 292:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 361; continue; };
		default: { gotoCase = 103; continue; };
	}
case 293:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 363; continue; };
		default: { gotoCase = 103; continue; };
	}
case 294:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 364; continue; };
		default: { gotoCase = 103; continue; };
	}
case 295:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 296; continue; };
	}
case 296:
	{ console.log( "TRY");              continue myloop; }
case 297:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 366; continue; };
		default: { gotoCase = 103; continue; };
	}
case 298:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 367; continue; };
		default: { gotoCase = 103; continue; };
	}
case 299:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 368; continue; };
		default: { gotoCase = 103; continue; };
	}
case 300:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 369; continue; };
		default: { gotoCase = 103; continue; };
	}
case 301:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 370; continue; };
		default: { gotoCase = 103; continue; };
	}
case 302:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x64 /*'d'*/: { gotoCase = 371; continue; };
		default: { gotoCase = 103; continue; };
	}
case 303:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 373; continue; };
		default: { gotoCase = 103; continue; };
	}
case 304:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 374; continue; };
		default: { gotoCase = 103; continue; };
	}
case 305:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 375; continue; };
		default: { gotoCase = 103; continue; };
	}
case 306:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		case 0x5F /*'_'*/: { gotoCase = 376; continue; };
		default: { gotoCase = 109; continue; };
	}
case 307:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 377; continue; };
		default: { gotoCase = 103; continue; };
	}
case 308:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 309; continue; };
	}
case 309:
	{ console.log( "AUTO");             continue myloop; }
case 310:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 378; continue; };
		default: { gotoCase = 103; continue; };
	}
case 311:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 379; continue; };
		default: { gotoCase = 103; continue; };
	}
case 312:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 313; continue; };
	}
case 313:
	{ console.log( "BOOL");             continue myloop; }
case 314:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6B /*'k'*/: { gotoCase = 380; continue; };
		default: { gotoCase = 103; continue; };
	}
case 315:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 316; continue; };
	}
case 316:
	{ console.log( "CASE");             continue myloop; }
case 317:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x68 /*'h'*/: { gotoCase = 382; continue; };
		default: { gotoCase = 103; continue; };
	}
case 318:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 319; continue; };
	}
case 319:
	{ console.log( "CHAR");             continue myloop; }
case 320:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 384; continue; };
		default: { gotoCase = 103; continue; };
	}
case 321:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 386; continue; };
		default: { gotoCase = 103; continue; };
	}
case 322:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 387; continue; };
		default: { gotoCase = 103; continue; };
	}
case 323:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 389; continue; };
		default: { gotoCase = 103; continue; };
	}
case 324:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x75 /*'u'*/: { gotoCase = 390; continue; };
		default: { gotoCase = 103; continue; };
	}
case 325:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 391; continue; };
		default: { gotoCase = 103; continue; };
	}
case 326:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 392; continue; };
		default: { gotoCase = 103; continue; };
	}
case 327:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6D /*'m'*/: { gotoCase = 393; continue; };
		default: { gotoCase = 103; continue; };
	}
case 328:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 329; continue; };
	}
case 329:
	{ console.log( "ELSE");             continue myloop; }
case 330:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 331; continue; };
	}
case 331:
	{ console.log( "ENUM");             continue myloop; }
case 332:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 394; continue; };
		default: { gotoCase = 103; continue; };
	}
case 333:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 395; continue; };
		default: { gotoCase = 103; continue; };
	}
case 334:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 396; continue; };
		default: { gotoCase = 103; continue; };
	}
case 335:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 397; continue; };
		default: { gotoCase = 103; continue; };
	}
case 336:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 399; continue; };
		default: { gotoCase = 103; continue; };
	}
case 337:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 401; continue; };
		default: { gotoCase = 103; continue; };
	}
case 338:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 339; continue; };
	}
case 339:
	{ console.log( "GOTO");             continue myloop; }
case 340:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 402; continue; };
		default: { gotoCase = 103; continue; };
	}
case 341:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 342; continue; };
	}
case 342:
	{ console.log( "LONG");             continue myloop; }
case 343:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x62 /*'b'*/: { gotoCase = 403; continue; };
		default: { gotoCase = 103; continue; };
	}
case 344:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 404; continue; };
		default: { gotoCase = 103; continue; };
	}
case 345:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 405; continue; };
		default: { gotoCase = 103; continue; };
	}
case 346:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 406; continue; };
		default: { gotoCase = 103; continue; };
	}
case 347:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x71 /*'q'*/: { gotoCase = 407; continue; };
		default: { gotoCase = 103; continue; };
	}
case 348:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 408; continue; };
		default: { gotoCase = 103; continue; };
	}
case 349:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 409; continue; };
		default: { gotoCase = 103; continue; };
	}
case 350:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 410; continue; };
		default: { gotoCase = 103; continue; };
	}
case 351:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 411; continue; };
		default: { gotoCase = 103; continue; };
	}
case 352:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 412; continue; };
		default: { gotoCase = 103; continue; };
	}
case 353:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 413; continue; };
		default: { gotoCase = 103; continue; };
	}
case 354:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 414; continue; };
		default: { gotoCase = 103; continue; };
	}
case 355:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 416; continue; };
		default: { gotoCase = 103; continue; };
	}
case 356:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 417; continue; };
		default: { gotoCase = 103; continue; };
	}
case 357:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 418; continue; };
		default: { gotoCase = 103; continue; };
	}
case 358:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 419; continue; };
		default: { gotoCase = 103; continue; };
	}
case 359:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 420; continue; };
		default: { gotoCase = 103; continue; };
	}
case 360:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 421; continue; };
		default: { gotoCase = 103; continue; };
	}
case 361:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 362; continue; };
	}
case 362:
	{ console.log( "THIS");             continue myloop; }
case 363:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x77 /*'w'*/: { gotoCase = 422; continue; };
		default: { gotoCase = 103; continue; };
	}
case 364:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 365; continue; };
	}
case 365:
	{ console.log( "true");  continue myloop; }
case 366:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x64 /*'d'*/: { gotoCase = 424; continue; };
		case 0x69 /*'i'*/: { gotoCase = 425; continue; };
		case 0x6E /*'n'*/: { gotoCase = 426; continue; };
		default: { gotoCase = 103; continue; };
	}
case 367:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 427; continue; };
		default: { gotoCase = 103; continue; };
	}
case 368:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x67 /*'g'*/: { gotoCase = 429; continue; };
		default: { gotoCase = 103; continue; };
	}
case 369:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x67 /*'g'*/: { gotoCase = 430; continue; };
		default: { gotoCase = 103; continue; };
	}
case 370:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x75 /*'u'*/: { gotoCase = 432; continue; };
		default: { gotoCase = 103; continue; };
	}
case 371:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 372; continue; };
	}
case 372:
	{ console.log( "VOID");             continue myloop; }
case 373:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 433; continue; };
		default: { gotoCase = 103; continue; };
	}
case 374:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 434; continue; };
		default: { gotoCase = 103; continue; };
	}
case 375:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 435; continue; };
		default: { gotoCase = 103; continue; };
	}
case 376:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 437; continue; };
		default: { gotoCase = 103; continue; };
	}
case 377:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x71 /*'q'*/: { gotoCase = 438; continue; };
		default: { gotoCase = 103; continue; };
	}
case 378:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x64 /*'d'*/: { gotoCase = 439; continue; };
		default: { gotoCase = 103; continue; };
	}
case 379:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 132; continue; };
	}
case 380:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 381; continue; };
	}
case 381:
	{ console.log( "BREAK");            continue myloop; }
case 382:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 383; continue; };
	}
case 383:
	{ console.log( "CATCH");            continue myloop; }
case 384:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 385; continue; };
	}
case 385:
	{ console.log( "CLASS");            continue myloop; }
case 386:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 135; continue; };
	}
case 387:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		case 0x5F /*'_'*/: { gotoCase = 440; continue; };
		default: { gotoCase = 388; continue; };
	}
case 388:
	{ console.log( "CONST");            continue myloop; }
case 389:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 441; continue; };
		default: { gotoCase = 103; continue; };
	}
case 390:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 442; continue; };
		default: { gotoCase = 103; continue; };
	}
case 391:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 443; continue; };
		default: { gotoCase = 103; continue; };
	}
case 392:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 445; continue; };
		default: { gotoCase = 103; continue; };
	}
case 393:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 447; continue; };
		default: { gotoCase = 103; continue; };
	}
case 394:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 448; continue; };
		default: { gotoCase = 103; continue; };
	}
case 395:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 449; continue; };
		default: { gotoCase = 103; continue; };
	}
case 396:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 451; continue; };
		default: { gotoCase = 103; continue; };
	}
case 397:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 398; continue; };
	}
case 398:
	{ console.log( "false"); continue myloop; }
case 399:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 400; continue; };
	}
case 400:
	{ console.log( "FLOAT");            continue myloop; }
case 401:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x64 /*'d'*/: { gotoCase = 453; continue; };
		default: { gotoCase = 103; continue; };
	}
case 402:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 455; continue; };
		default: { gotoCase = 103; continue; };
	}
case 403:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 457; continue; };
		default: { gotoCase = 103; continue; };
	}
case 404:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x70 /*'p'*/: { gotoCase = 458; continue; };
		default: { gotoCase = 103; continue; };
	}
case 405:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x71 /*'q'*/: { gotoCase = 459; continue; };
		default: { gotoCase = 103; continue; };
	}
case 406:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 460; continue; };
		default: { gotoCase = 103; continue; };
	}
case 407:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 229; continue; };
	}
case 408:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 461; continue; };
		default: { gotoCase = 103; continue; };
	}
case 409:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 462; continue; };
		default: { gotoCase = 103; continue; };
	}
case 410:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 463; continue; };
		default: { gotoCase = 103; continue; };
	}
case 411:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 465; continue; };
		default: { gotoCase = 103; continue; };
	}
case 412:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 466; continue; };
		default: { gotoCase = 103; continue; };
	}
case 413:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 467; continue; };
		default: { gotoCase = 103; continue; };
	}
case 414:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 415; continue; };
	}
case 415:
	{ console.log( "SHORT");            continue myloop; }
case 416:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x64 /*'d'*/: { gotoCase = 469; continue; };
		default: { gotoCase = 103; continue; };
	}
case 417:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x66 /*'f'*/: { gotoCase = 471; continue; };
		default: { gotoCase = 103; continue; };
	}
case 418:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 473; continue; };
		default: { gotoCase = 103; continue; };
	}
case 419:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 475; continue; };
		default: { gotoCase = 103; continue; };
	}
case 420:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x68 /*'h'*/: { gotoCase = 477; continue; };
		default: { gotoCase = 103; continue; };
	}
case 421:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 479; continue; };
		default: { gotoCase = 103; continue; };
	}
case 422:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 423; continue; };
	}
case 423:
	{ console.log( "THROW");            continue myloop; }
case 424:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 480; continue; };
		default: { gotoCase = 103; continue; };
	}
case 425:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x64 /*'d'*/: { gotoCase = 481; continue; };
		default: { gotoCase = 103; continue; };
	}
case 426:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 483; continue; };
		default: { gotoCase = 103; continue; };
	}
case 427:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 428; continue; };
	}
case 428:
	{ console.log( "UNION");            continue myloop; }
case 429:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6E /*'n'*/: { gotoCase = 484; continue; };
		default: { gotoCase = 103; continue; };
	}
case 430:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 431; continue; };
	}
case 431:
	{ console.log( "USING");            continue myloop; }
case 432:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 485; continue; };
		default: { gotoCase = 103; continue; };
	}
case 433:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 486; continue; };
		default: { gotoCase = 103; continue; };
	}
case 434:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x5F /*'_'*/: { gotoCase = 487; continue; };
		default: { gotoCase = 103; continue; };
	}
case 435:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 436; continue; };
	}
case 436:
	{ console.log( "WHILE");            continue myloop; }
case 437:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x71 /*'q'*/: { gotoCase = 488; continue; };
		default: { gotoCase = 103; continue; };
	}
case 438:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 146; continue; };
	}
case 439:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 73; continue; };
	}
case 440:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 489; continue; };
		default: { gotoCase = 103; continue; };
	}
case 441:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x75 /*'u'*/: { gotoCase = 490; continue; };
		default: { gotoCase = 103; continue; };
	}
case 442:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 491; continue; };
		default: { gotoCase = 103; continue; };
	}
case 443:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 444; continue; };
	}
case 444:
	{ console.log( "delete"); continue myloop; }
case 445:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 446; continue; };
	}
case 446:
	{ console.log( "DOUBLE");           continue myloop; }
case 447:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 493; continue; };
		default: { gotoCase = 103; continue; };
	}
case 448:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x69 /*'i'*/: { gotoCase = 494; continue; };
		default: { gotoCase = 103; continue; };
	}
case 449:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 450; continue; };
	}
case 450:
	{ console.log( "EXPORT");           continue myloop; }
case 451:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 452; continue; };
	}
case 452:
	{ console.log( "EXTERN");           continue myloop; }
case 453:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 454; continue; };
	}
case 454:
	{ console.log( "FRIEND");           continue myloop; }
case 455:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 456; continue; };
	}
case 456:
	{ console.log( "INLINE");           continue myloop; }
case 457:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 495; continue; };
		default: { gotoCase = 103; continue; };
	}
case 458:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 497; continue; };
		default: { gotoCase = 103; continue; };
	}
case 459:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 139; continue; };
	}
case 460:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6F /*'o'*/: { gotoCase = 498; continue; };
		default: { gotoCase = 103; continue; };
	}
case 461:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 499; continue; };
		default: { gotoCase = 103; continue; };
	}
case 462:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 501; continue; };
		default: { gotoCase = 103; continue; };
	}
case 463:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 464; continue; };
	}
case 464:
	{ console.log( "PUBLIC");           continue myloop; }
case 465:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 502; continue; };
		default: { gotoCase = 103; continue; };
	}
case 466:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 503; continue; };
		default: { gotoCase = 103; continue; };
	}
case 467:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 468; continue; };
	}
case 468:
	{ console.log( "RETURN");           continue myloop; }
case 469:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 470; continue; };
	}
case 470:
	{ console.log( "SIGNED");           continue myloop; }
case 471:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 472; continue; };
	}
case 472:
	{ console.log( "SIZEOF");           continue myloop; }
case 473:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		case 0x5F /*'_'*/: { gotoCase = 504; continue; };
		default: { gotoCase = 474; continue; };
	}
case 474:
	{ console.log( "STATIC");           continue myloop; }
case 475:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 476; continue; };
	}
case 476:
	{ console.log( "STRUCT");           continue myloop; }
case 477:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 478; continue; };
	}
case 478:
	{ console.log( "SWITCH");           continue myloop; }
case 479:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 505; continue; };
		default: { gotoCase = 103; continue; };
	}
case 480:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x66 /*'f'*/: { gotoCase = 506; continue; };
		default: { gotoCase = 103; continue; };
	}
case 481:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 482; continue; };
	}
case 482:
	{ console.log( "TYPEID");           continue myloop; }
case 483:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6D /*'m'*/: { gotoCase = 508; continue; };
		default: { gotoCase = 103; continue; };
	}
case 484:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 509; continue; };
		default: { gotoCase = 103; continue; };
	}
case 485:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 510; continue; };
		default: { gotoCase = 103; continue; };
	}
case 486:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x6C /*'l'*/: { gotoCase = 512; continue; };
		default: { gotoCase = 103; continue; };
	}
case 487:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 513; continue; };
		default: { gotoCase = 103; continue; };
	}
case 488:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 176; continue; };
	}
case 489:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 515; continue; };
		default: { gotoCase = 103; continue; };
	}
case 490:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 516; continue; };
		default: { gotoCase = 103; continue; };
	}
case 491:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 492; continue; };
	}
case 492:
	{ console.log( "DEFAULT");          continue myloop; }
case 493:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x5F /*'_'*/: { gotoCase = 518; continue; };
		default: { gotoCase = 103; continue; };
	}
case 494:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 519; continue; };
		default: { gotoCase = 103; continue; };
	}
case 495:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 496; continue; };
	}
case 496:
	{ console.log( "MUTABLE");          continue myloop; }
case 497:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 521; continue; };
		default: { gotoCase = 103; continue; };
	}
case 498:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 522; continue; };
		default: { gotoCase = 103; continue; };
	}
case 499:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 500; continue; };
	}
case 500:
	{ console.log( "PRIVATE");          continue myloop; }
case 501:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 524; continue; };
		default: { gotoCase = 103; continue; };
	}
case 502:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 525; continue; };
		default: { gotoCase = 103; continue; };
	}
case 503:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x70 /*'p'*/: { gotoCase = 527; continue; };
		default: { gotoCase = 103; continue; };
	}
case 504:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 528; continue; };
		default: { gotoCase = 103; continue; };
	}
case 505:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 529; continue; };
		default: { gotoCase = 103; continue; };
	}
case 506:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 507; continue; };
	}
case 507:
	{ console.log( "TYPEDEF");          continue myloop; }
case 508:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 531; continue; };
		default: { gotoCase = 103; continue; };
	}
case 509:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x64 /*'d'*/: { gotoCase = 533; continue; };
		default: { gotoCase = 103; continue; };
	}
case 510:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 511; continue; };
	}
case 511:
	{ console.log( "VIRTUAL");          continue myloop; }
case 512:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 535; continue; };
		default: { gotoCase = 103; continue; };
	}
case 513:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 514; continue; };
	}
case 514:
	{ console.log( "WCHAR_T");          continue myloop; }
case 515:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 537; continue; };
		default: { gotoCase = 103; continue; };
	}
case 516:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 517; continue; };
	}
case 517:
	{ console.log( "CONTINUE");         continue myloop; }
case 518:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 538; continue; };
		default: { gotoCase = 103; continue; };
	}
case 519:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 520; continue; };
	}
case 520:
	{ console.log( "EXPLICIT");         continue myloop; }
case 521:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 539; continue; };
		default: { gotoCase = 103; continue; };
	}
case 522:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 523; continue; };
	}
case 523:
	{ console.log( "OPERATOR");         continue myloop; }
case 524:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x64 /*'d'*/: { gotoCase = 541; continue; };
		default: { gotoCase = 103; continue; };
	}
case 525:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 526; continue; };
	}
case 526:
	{ console.log( "REGISTER");         continue myloop; }
case 527:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x72 /*'r'*/: { gotoCase = 543; continue; };
		default: { gotoCase = 103; continue; };
	}
case 528:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 544; continue; };
		default: { gotoCase = 103; continue; };
	}
case 529:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 530; continue; };
	}
case 530:
	{ console.log( "TEMPLATE");         continue myloop; }
case 531:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 532; continue; };
	}
case 532:
	{ console.log( "TYPENAME");         continue myloop; }
case 533:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 534; continue; };
	}
case 534:
	{ console.log( "UNSIGNED");         continue myloop; }
case 535:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 536; continue; };
	}
case 536:
	{ console.log( "VOLATILE");         continue myloop; }
case 537:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 545; continue; };
		default: { gotoCase = 103; continue; };
	}
case 538:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 547; continue; };
		default: { gotoCase = 103; continue; };
	}
case 539:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 540; continue; };
	}
case 540:
	{ console.log( "NAMESPACE");        continue myloop; }
case 541:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 542; continue; };
	}
case 542:
	{ console.log( "PROTECTED");        continue myloop; }
case 543:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x65 /*'e'*/: { gotoCase = 548; continue; };
		default: { gotoCase = 103; continue; };
	}
case 544:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 549; continue; };
		default: { gotoCase = 103; continue; };
	}
case 545:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 546; continue; };
	}
case 546:
	{ console.log( "CONST_CAST");       continue myloop; }
case 547:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 550; continue; };
		default: { gotoCase = 103; continue; };
	}
case 548:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 551; continue; };
		default: { gotoCase = 103; continue; };
	}
case 549:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 552; continue; };
		default: { gotoCase = 103; continue; };
	}
case 550:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 554; continue; };
		default: { gotoCase = 103; continue; };
	}
case 551:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x5F /*'_'*/: { gotoCase = 556; continue; };
		default: { gotoCase = 103; continue; };
	}
case 552:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 553; continue; };
	}
case 553:
	{ console.log( "STATIC_CAST");      continue myloop; }
case 554:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 555; continue; };
	}
case 555:
	{ console.log( "DYNAMIC_CAST");     continue myloop; }
case 556:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x63 /*'c'*/: { gotoCase = 557; continue; };
		default: { gotoCase = 103; continue; };
	}
case 557:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x61 /*'a'*/: { gotoCase = 558; continue; };
		default: { gotoCase = 103; continue; };
	}
case 558:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x73 /*'s'*/: { gotoCase = 559; continue; };
		default: { gotoCase = 103; continue; };
	}
case 559:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x74 /*'t'*/: { gotoCase = 560; continue; };
		default: { gotoCase = 103; continue; };
	}
case 560:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 561; continue; };
	}
case 561:
	{ console.log( "REINTERPRET_CAST"); continue myloop; }
}

sfx:

{
	var yych;
	yych = code.charCodeAt(YYCURSOR);
	switch (yych) {
		case 0x4C /*'L'*/:
		case 0x6C /*'l'*/: { gotoCase = 564; continue; };
		case 0x55 /*'U'*/:
		case 0x75 /*'u'*/: { gotoCase = 566; continue; };
		default: { gotoCase = 563; continue; };
	}
case 563:
	{ if (u > INT_MAX)  return false; console.log( u);      continue myloop; }
case 564:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x55 /*'U'*/:
		case 0x75 /*'u'*/: { gotoCase = 568; continue; };
		default: { gotoCase = 565; continue; };
	}
case 565:
	{ if (u > LONG_MAX) return false; console.log( u);     continue myloop; }
case 566:
	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case 0x4C /*'L'*/:
		case 0x6C /*'l'*/: { gotoCase = 568; continue; };
		default: { gotoCase = 567; continue; };
	}
case 567:
	{ if (u > UINT_MAX) return false; console.log( u); continue myloop; }
case 568:
	++YYCURSOR;
	{ console.log( u); continue myloop; }
}
}
}
    }
}

function main()
{
    const example_cpp = `
#include<stdio.h>

int main()
{
    int n;
    printf("Enter the number:\n");
    scanf("%d", &n);

    int f = 1;
    for(int i = 1; i <= n; ++i) {
        f *= i;
    }

    printf("Factorial of %d is %d\n", n, f);
    return 0;
}
    `;
    console.log(lex(example_cpp));
    return 0;
}

main();

@mingodad
Copy link
Author

mingodad commented Feb 7, 2023

And here is quickjs script I'm using to help the manual port:

//qjs --std re2js.js

function dec2hex(i) {
   return (i+0x10000).toString(16).substr(-2).toUpperCase();
}

function re2js(fname) {
	let fd = std.open(fname, "r");
	let txt;
	try {
		txt = fd.readAsString();
	}
	catch(e) {
		print(e);
		return;
	}
	fd.close();
	//print(txt);
	txt = txt.replace(/(\n)yy([^:]*):/g, "$1case $2:");
	txt = txt.replace(/\*cursor\+\+/g, "this._charAt(cursor++)");
	txt = txt.replace(/\*\+\+cursor/g, "this._charAt(++cursor)");
	txt = txt.replace(/\*cursor/g, "this._charAt(cursor)");
	txt = txt.replace(/yych = \*([^;]*)/g, "yych = this._charAt$1");
	txt = txt.replace(/goto case ([^;]*)/g, "{ gotoCase = $1; continue; }");
	txt = txt.replace(/goto yy(\d*)/g, "{ gotoCase = $1; continue; }");
	txt = txt.replace(/yych <= (0x[0-9a-fA-F]*)/g, "yych <= String.fromCharCode($1)");
	txt = txt.replace(/unsigned\s+int/g, "var");
	txt = txt.replace(/var\s+yych/g, "case 1: var yych");
	// in the following two replaces the order is important
	txt = txt.replace(/'[^\\]'/g, function(m) {return "0x" + dec2hex(m.charCodeAt(1)) + " /*" + m + "*/";});
	txt = txt.replace(/'\\.'/g, function(m) {
		var chVal = m;
		switch(m) {
			case "'\\a'": chVal = 0x07; break;
			case "'\\b'": chVal = 0x08; break;
			case "'\\t'": chVal = 0x09; break;
			case "'\\n'": chVal = 0x0A; break;
			case "'\\v'": chVal = 0x0B; break;
			case "'\\f'": chVal = 0x0C; break;
			case "'\\r'": chVal = 0x0D; break;
			case "'\\''": chVal = 0x27; break;
		}
		return "0x" + dec2hex(chVal) + " /*" + m + "*/";
	});
	txt = txt.replace(/case\s+(0x[0-9a-fA-F]+.+?)\.\.\.\s+(0x[0-9a-fA-F]+.+?):/g, "case yych >= $1 && yych <= $2 :");
	//case 0x30 /*'0'*/ ... 0x39 /*'9'*/:
	print(txt);
}

re2js("re2c/examples/c/real_world/cxx98.rejs.ranges.c");

@mingodad
Copy link
Author

mingodad commented Feb 7, 2023

I noticed that this piece of code is repeated a lot only changing the last line goto destination:

	yych = code.charCodeAt(++YYCURSOR);
	switch (yych) {
		case yych >= 0x30 /*'0'*/  && yych <= 0x39 /*'9'*/ :
		case yych >= 0x41 /*'A'*/  && yych <= 0x5A /*'Z'*/ :
		case 0x5F /*'_'*/:
		case yych >= 0x61 /*'a'*/  && yych <= 0x7A /*'z'*/ : { gotoCase = 102; continue; };
		default: { gotoCase = 365; continue; };
	}

@skvadrik
Copy link
Owner

skvadrik commented Feb 7, 2023

@mingodad I suggest starting with simpler examples if you want to experiment with a JS backend.

But more importantly, I'm leaning towards a different approach for adding new backends in re2c. Not the way we did it with C/Rust/Go, but instead, there should be a way to write a backend "syntax file" with some configurations, and re2c should be able to generate code using those configurations. This is much more scalable than hardcoding every new backend, and much less demanding in terms of documentation (as only one config file per language will be needed). People would be able to use local syntax files for whatever language they need, or upstream them with some examples to prove that they are working.

I actually plan to rework the early Dlang patch done by @abenedic (8df0ed6) this way. I think merging that early support straight into master was premature; it should have been on a branch until the full backend is ready. Dlang and JS support will only be added after implementing that "syntax file" logic (and other backends should be rewritten using this logic as well, without breaking backwards compatibility). I hope to start working on it approximately in a month time, and I'm not sure how long it will take: it's difficult to decide on an optimal set of configurations that would accommodate many languages, and it is generally a lot of work.

I'm sorry that it blocks your work, but this is needed to keep re2c lean and maintainable. It may be tempting to add new backends, but if they have very few users and take a lot of effort to maintain, this is not a good solution.

@mingodad
Copy link
Author

mingodad commented Feb 7, 2023

Thank you for reply !
Do you mean something like https://github.com/adrian-thurston/ragel/tree/master/src ?

@skvadrik
Copy link
Owner

skvadrik commented Feb 8, 2023

Do you mean something like https://github.com/adrian-thurston/ragel/tree/master/src ?

Not quite, files like https://github.com/adrian-thurston/ragel/blob/master/src/host-js/rlparse.lm are language frontend parsers, and they are part of the Ragel source files (codegen definitions are in https://github.com/adrian-thurston/ragel/blob/master/src/host-js/main.cc which is also a source file). What I want is more dynamic: a syntax file should be read at runtime, so that one could add a new language just by writing a new file (no changes to source code needed, provided that the set of configurations in syntax file is sufficient for the new language).

But thanks for the link, it is interesting. It may be a good place to look if we want to add language-specific lexers to fix #429. It also raises an interesting point that if we want languge-specific frontends, they may also need some configurations.

@PolarGoose
Copy link
Contributor

PolarGoose commented Oct 22, 2024

@mingodad,
why do you need the amalgamation?
It is possible to directly compile re2c project to a re2c.js file using emmake cmake.
I have created a script that does that:

#!/usr/bin/env bash

set -x
set -o errexit
set -o nounset
set -o pipefail

scriptRoot=`dirname "${BASH_SOURCE[0]}"`
buildDir="$scriptRoot/build"

rm -rf "$buildDir"
mkdir -p "$buildDir"

# Configure emscripten
git clone --depth=1 https://github.com/emscripten-core/emsdk.git "$buildDir/emsdk"
"$buildDir/emsdk/emsdk" install latest
"$buildDir/emsdk/emsdk" activate latest
source "$buildDir/emsdk/emsdk_env.sh"

# Build re2c
git clone --depth=1 https://github.com/skvadrik/re2c.git "$buildDir/re2c"
emcmake cmake \
  -G Ninja \
  -S "$buildDir/re2c" \
  -B "$buildDir/re2c-build" \
  -D CMAKE_CXX_FLAGS="\
    -s INVOKE_RUN=0 \
    -s SINGLE_FILE \
    -w" \
  -D RE2C_BUILD_RE2D=0 \
  -D RE2C_BUILD_RE2GO=0 \
  -D RE2C_BUILD_RE2HS=0 \
  -D RE2C_BUILD_RE2JAVA=0 \
  -D RE2C_BUILD_RE2JS=0 \
  -D RE2C_BUILD_RE2OCAML=0 \
  -D RE2C_BUILD_RE2PY=0 \
  -D RE2C_BUILD_RE2RUST=0 \
  -D RE2C_BUILD_RE2V=0 \
  -D RE2C_BUILD_RE2ZIG=0 \
  -D RE2C_BUILD_TESTS=0
emmake cmake --build "$buildDir/re2c-build"

Then, it should be possible to run re2c fully on the client side.

I guess it is possible to create something similar to Compiler Explorer:
image

@skvadrik
Copy link
Owner

BTW code generation into JS is supported now (set -D RE2C_BUILD_RE2JS=yes in the command above). It's not released yet.

@PolarGoose
Copy link
Contributor

@skvadrik,

BTW code generation into JS is supported now (set -D RE2C_BUILD_RE2JS=yes in the command above). It's not released yet.

This is great. Thank you.

I have created a very ugly prototype re2c-web-playground
image
Currently, it only works for the C++ code.
I like how the website GraphvizOnline is designed. I think we could clone their design.
Unfortunately, I lack the right web development skills to make it fancy and add extra GUI elements.

If someone wants to help, please let me know.

@skvadrik
Copy link
Owner

Thanks @PolarGoose! It looks nice to me, just missing an edit box to enter user's options.

Unfortunately, I lack the right web development skills to make it fancy and add extra GUI elements.

Same here. :)

I think it would be best to add re2c to https://github.com/compiler-explorer/compiler-explorer. It is well known and it has a good UI: https://godbolt.org.

I like how the website GraphvizOnline is designed. I think we could clone their design.

It looks good and simple. But compiler explorer UI is a bit more suited to re2c as it is, after all, a compiler (having a menu for different versions, and an input for options is very useful). Besides, if we upstream re2c support it will be easier to maintain.

@mingodad
Copy link
Author

I've tried https://polargoose.github.io/re2c-web-playground with this:

/*
 * Copyright (C) 2009 Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Generate js file as follows:
re2c -isc Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js \
  | sed 's|^yy\([^:]*\)*\:|case \1:|' \
  | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
  | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
  | sed 's|[*]cursor|this._charAt(cursor)|' \
  | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
  | sed 's|goto case \([^;]*\)|{ gotoCase = \1; continue; }|' \
  | sed 's|yych <= \(0x[0-9a-fA-F]*\)|yych \<\= String.fromCharCode(\1)|' \
  | sed 's|unsigned\ int|var|' \
  | sed 's|var\ yych|case 1: var yych|' > Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js
 */

/**
 * @constructor
 * @extends {WebInspector.SourceTokenizer}
 */
WebInspector.SourceJavaScriptTokenizer = function()
{
    WebInspector.SourceTokenizer.call(this);

    this._lexConditions = {
        DIV: 0,
        NODIV: 1,
        COMMENT: 2,
        DSTRING: 3,
        SSTRING: 4,
        REGEX: 5
    };

    this.case_DIV = 1000;
    this.case_NODIV = 1001;
    this.case_COMMENT = 1002;
    this.case_DSTRING = 1003;
    this.case_SSTRING = 1004;
    this.case_REGEX = 1005;

    this.condition = this.createInitialCondition();
}

WebInspector.SourceJavaScriptTokenizer.Keywords = [
        "null", "true", "false", "break", "case", "catch", "const", "default", "finally", "for",
        "instanceof", "new", "var", "continue", "function", "return", "void", "delete", "if",
        "this", "do", "while", "else", "in", "switch", "throw", "try", "typeof", "debugger",
        "class", "enum", "export", "extends", "import", "super", "get", "set", "with"
    ].keySet();

WebInspector.SourceJavaScriptTokenizer.prototype = {
    createInitialCondition: function()
    {
        return { lexCondition: this._lexConditions.NODIV };
    },

    nextToken: function(cursor)
    {
        var cursorOnEnter = cursor;
        var gotoCase = 1;
        var YYMARKER;
        while (1) {
            switch (gotoCase)
            // Following comment is replaced with generated state machine.
            /*!re2c
                re2c:define:YYCTYPE  = "var";
                re2c:define:YYCURSOR = cursor;
                re2c:define:YYGETCONDITION = "this.getLexCondition";
                re2c:define:YYSETCONDITION = "this.setLexCondition";
                re2c:condprefix = "case this.case_";
                re2c:condenumprefix = "this._lexConditions.";
                re2c:yyfill:enable = 0;
                re2c:labelprefix = "case ";
                re2c:indent:top = 2;
                re2c:indent:string = "    ";

                LineComment = "//" [^\r\n]*;
                CommentContent = ([^*\r\n] | ("*"+[^/*]))*;
                Comment = "/*" CommentContent "*"+ "/";
                CommentStart = "/*" CommentContent [\r\n];
                CommentEnd = CommentContent "*"+ "/";

                DecimalDigit = [0-9];
                NonZeroDigit = [1-9];
                OctalDigit = [0-7];
                HexDigit = [0-9a-fA-F];
                SignedInteger = ("+"|"-")? DecimalDigit+;
                ExponentPart = ("e" | "E") SignedInteger;
                DecimalIntegerLiteral = "0" | NonZeroDigit DecimalDigit*;
                DecimalLiteral = DecimalIntegerLiteral "." DecimalDigit* ExponentPart? | "." DecimalDigit+ ExponentPart? | DecimalIntegerLiteral ExponentPart?;
                HexIntegerLiteral = "0" ("x"|"X") HexDigit+;
                OctalIntegerLiteral = "0" OctalDigit+;
                NumericLiteral = DecimalLiteral | HexIntegerLiteral | OctalIntegerLiteral;

                Punctuation = [\!\%\&\(\*\+\,\-\.\:\;\<\=\>\?\[\]\^\{\|\}\~] | "!=" | "!==" | "%=" | "&&" | "&=" | "*=" | "++" | "+=" | "--" | "-=" | "<<" | "<<="  | "<=" | "==" | "===" | ">=" | ">>" | ">>=" | ">>>" | ">>>=" | "^=" | "|=" | "||";
                Division = "/" | "/=";
                RightParen = ")";

                Letter = [a-zA-Z\x80-\xFF];
                UnicodeEscapeSequence = "\\u" HexDigit HexDigit HexDigit HexDigit;

                IdentifierStart = Letter | "_" | "$" | UnicodeEscapeSequence;
                IdentifierPart = IdentifierStart | DecimalDigit;
                Identifier = IdentifierStart IdentifierPart *;
                Spaces = " "+;

                DoubleStringContent = ([^\r\n\"\\] | UnicodeEscapeSequence | "\\" ['"\\bfnrtv])*;
                SingleStringContent = ([^\r\n\'\\] | UnicodeEscapeSequence | "\\" ['"\\bfnrtv])*;
                StringLiteral = "\"" DoubleStringContent "\"" | "'" SingleStringContent "'";
                DoubleStringStart = "\"" DoubleStringContent "\\" [\r\n];
                DoubleStringEnd = DoubleStringContent "\"";
                SingleStringStart = "'" SingleStringContent "\\" [\r\n];
                SingleStringEnd = SingleStringContent "'";

                BackslashSequence = "\\" [^\r\n];
                RegexSet = "[" ([^\r\n*\\/] | BackslashSequence)* "]";
                RegexFirstChar = [^\r\n*\\/\[\]] | BackslashSequence | RegexSet;
                RegexChar = [^\r\n\\/\[\]] | BackslashSequence | RegexSet;
                RegexContent = RegexChar*;
                Regex = "/" RegexFirstChar RegexContent "/" [igm]*;
                RegexStart = "/" RegexFirstChar RegexContent "\\";
                RegexEnd = RegexContent "/" [igm]*;

                <DIV,NODIV> LineComment { this.tokenType = "javascript-comment"; return cursor; }
                <DIV,NODIV> Comment { this.tokenType = "javascript-comment"; return cursor; }
                <DIV,NODIV> CommentStart => COMMENT { this.tokenType = "javascript-comment"; return cursor; }
                <COMMENT> CommentContent => COMMENT { this.tokenType = "javascript-comment"; return cursor; }
                <COMMENT> CommentEnd => NODIV { this.tokenType = "javascript-comment"; return cursor; }

                <DIV,NODIV> Spaces {this.tokenType = "whitespace"; return cursor; }
                <DIV,NODIV> StringLiteral { this.tokenType = "javascript-string"; return cursor; }
                <DIV,NODIV> DoubleStringStart => DSTRING { this.tokenType = "javascript-string"; return cursor; }
                <DSTRING> DoubleStringContent => DSTRING { this.tokenType = "javascript-string"; return cursor; }
                <DSTRING> DoubleStringEnd => NODIV { this.tokenType = "javascript-string"; return cursor; }
                <DIV,NODIV> SingleStringStart => SSTRING { this.tokenType = "javascript-string"; return cursor; }
                <SSTRING> SingleStringContent => SSTRING { this.tokenType = "javascript-string"; return cursor; }
                <SSTRING> SingleStringEnd => NODIV { this.tokenType = "javascript-string"; return cursor; }

                <NODIV> Regex { this.tokenType = "javascript-regexp"; return cursor; }
                <NODIV> RegexStart => REGEX { this.tokenType = "javascript-regexp"; return cursor; }
                <REGEX> RegexContent => REGEX { this.tokenType = "javascript-regexp"; return cursor; }
                <REGEX> RegexEnd => NODIV { this.tokenType = "javascript-regexp"; return cursor; }

                <DIV,NODIV> NumericLiteral => DIV { this.tokenType = "javascript-number"; return cursor; }
                <DIV,NODIV> Identifier => DIV
                {
                    var token = this._line.substring(cursorOnEnter, cursor);
                    if (WebInspector.SourceJavaScriptTokenizer.Keywords[token] === true && token !== "__proto__")
                        this.tokenType = "javascript-keyword";
                    else
                        this.tokenType = "javascript-ident";
                    return cursor;
                }
                <DIV,NODIV> RightParen => DIV { this.tokenType = "brace-end"; return cursor; }
                <DIV,NODIV> Punctuation => NODIV
                {
                    var token = this._line.charAt(cursorOnEnter);
                    if (token === "{")
                        this.tokenType = "block-start";
                    else if (token === "}")
                        this.tokenType = "block-end";
                    else if (token === "(")
                        this.tokenType = "brace-start";
                    else this.tokenType = null;
                    return cursor;
                }
                <DIV> Division => NODIV { this.tokenType = null; return cursor; }
                <*> [^] { this.tokenType = null; return cursor; }
            */
        }
    },

    __proto__: WebInspector.SourceTokenizer.prototype
}

To find out that the js backend do not support conditions:

re2c --lang js SourceCSSTokenizer.re2js
SourceCSSTokenizer.re2js:123:31: warning: escape has no effect: '\!' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:33: warning: escape has no effect: '\%' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:35: warning: escape has no effect: '\&' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:37: warning: escape has no effect: '\(' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:39: warning: escape has no effect: '\*' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:41: warning: escape has no effect: '\+' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:43: warning: escape has no effect: '\,' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:47: warning: escape has no effect: '\.' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:49: warning: escape has no effect: '\:' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:51: warning: escape has no effect: '\;' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:53: warning: escape has no effect: '\<' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:55: warning: escape has no effect: '\=' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:57: warning: escape has no effect: '\>' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:59: warning: escape has no effect: '\?' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:61: warning: escape has no effect: '\[' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:65: warning: escape has no effect: '\^' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:67: warning: escape has no effect: '\{' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:69: warning: escape has no effect: '\|' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:71: warning: escape has no effect: '\}' [-Wuseless-escape]
SourceCSSTokenizer.re2js:123:73: warning: escape has no effect: '\~' [-Wuseless-escape]
SourceCSSTokenizer.re2js:135:45: warning: escape has no effect: '\"' [-Wuseless-escape]
SourceCSSTokenizer.re2js:136:45: warning: escape has no effect: '\'' [-Wuseless-escape]
SourceCSSTokenizer.re2js:145:43: warning: escape has no effect: '\[' [-Wuseless-escape]
SourceCSSTokenizer.re2js:146:37: warning: escape has no effect: '\[' [-Wuseless-escape]
SourceCSSTokenizer.re2js:152:40: error: conditions are only allowed with '-c', '--conditions' option

@skvadrik
Copy link
Owner

To find out that the js backend do not support conditions:
[...]
SourceCSSTokenizer.re2js:152:40: error: conditions are only allowed with '-c', '--conditions' option

re2js tells you that you are missing an option. Conditions require -c or --conditions (for all backends, not only JS).

@PolarGoose
Copy link
Contributor

re2c-web-playground runs re2c.js like this:

const result = callMain(["/input.txt", "-o", "/output.txt", "-i", "--case-ranges"]);

You can change the source of the HTML page to add extra parameters.

@PolarGoose
Copy link
Contributor

Just in case, I have updated the playground:
image
(in case the "compile" button doesn't work, clear the cache or open it in a private window)
It is based on the master branch.

@mingodad
Copy link
Author

I'm getting this error on a fresh full reload (Chromium Linux, but using Firefox it works fine ):

2c.js:9 Uncaught RangeError: WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB. Use WebAssembly.compile, or compile on a worker thread.
    at instantiateSync (re2c.js:9:1177459)
    at createWasm (re2c.js:9:1178191)
    at re2c.js:9:1236292
    at (index):158:22
instantiateSync @ re2c.js:9
createWasm @ re2c.js:9
(anonymous) @ re2c.js:9
(anonymous) @ (index):158
(index):77 Uncaught ReferenceError: compileCode is not defined
    at HTMLButtonElement.onclick ((index):77:58)
onclick @ (index):77

@mingodad
Copy link
Author

Would be nice to add a dropdown/select to load several examples.

@mingodad

This comment was marked as resolved.

@mingodad
Copy link
Author

I noticed that when generating a lexer for re2c/examples/c/real_world/cxx98.re in Javascript the output is around 500 kB at that size maybe a table driven lexer would be more efficient.
Can re2c also generate table driven lexers ?

@skvadrik
Copy link
Owner

I noticed that when generating a lexer for re2c/examples/c/real_world/cxx98.re in Javascript the output is around 500 kB at that size maybe a table driven lexer would be more efficient.

What output exactly do you mean, the code generated by re2c? Which options did you use?

Can re2c also generate table driven lexers ?

No, it cannot.

@mingodad
Copy link
Author

I mean the code generated by re2c.
I don't think I've used any extra options.

@mingodad
Copy link
Author

After your last question and my answer I did a test again and it seems that I've got confused or something changed since I did it at that time because now I get this output:

re2c cxx98.rejs -o cxx98.rejs.js
re2c cxx98.rejs -o cxx98.rejs.ranges.c -i --case-ranges
ls -l
total 516
-rw-rw-r-- 1 xxxx xxxx 116371 jul 29  2022 cxx98.c
-rw-rw-r-- 1 xxxx xxxx  16463 jul 29  2022 cxx98.re
-rw-rw-r-- 1 xxxx xxxx  17023 feb  7  2023 cxx98.rejs
-rw------- 1 xxxx xxxx 116203 feb  7  2023 cxx98.rejs.c
-rw------- 1 xxxx xxxx 125336 oct 28 09:40 cxx98.rejs.js
-rw------- 1 xxxx xxxx  60641 oct 28 09:43 cxx98.rejs.ranges.c
-rw------- 1 xxxx xxxx  59969 feb  7  2023 cxx98.rejs.ranges.js

@skvadrik
Copy link
Owner

JS backend does not support --case-ranges, it should be an error re2c: error: case-ranges feature is not supported for this backend.

@mingodad
Copy link
Author

You are right ! I didn't added the --lang js in both tests, now I've redid then and I'm getting around 350 KB for js:

re2c --lang js cxx98.rejs -o cxx98.rejs.js
re2c --lang js cxx98.rejs -o cxx98.rejs.ranges.c -i --case-ranges
re2c: error: `case-ranges` feature is not supported for this backend
	
ls -l
-rw-rw-r-- 1 xxxx xxxx 116371 jul 29  2022 cxx98.c
-rw-rw-r-- 1 xxxx xxxx  16463 jul 29  2022 cxx98.re
-rw-rw-r-- 1 xxxx xxxx  17023 feb  7  2023 cxx98.rejs
-rw------- 1 xxxx xxxx 116203 feb  7  2023 cxx98.rejs.c
-rw------- 1 xxxx xxxx 347769 oct 28 09:52 cxx98.rejs.js
-rw------- 1 xxxx xxxx  60641 oct 28 09:43 cxx98.rejs.ranges.c

@PolarGoose
Copy link
Contributor

I'm getting this error on a fresh full reload (Chromium Linux, but using Firefox it works fine ):

Sorry for the inconvenience. I use the Edge browser to test. I tried to cheat a bit and compile the code with WASM_ASYNC_COMPILATION=0. Unfortunately, it seems Chrome doesn't like that.
Now it should work.

@mingodad
Copy link
Author

Thank you @PolarGoose !
Indeed it works.

@skvadrik
Copy link
Owner

@PolarGoose I see you've also added graphviz output, great work!

@PolarGoose
Copy link
Contributor

Would be nice to add a dropdown/select to load several examples.

Thank you for the suggestion. Done:
image

@mingodad
Copy link
Author

Hello @PolarGoose !
Thank you again for the examples list !
I think that it can be improved a bit if you could also automatically add the extra command line needed by some examples, like conditions/parse_u32_conditions.re you already now that it needs -c or --conditions then fill the extra command line arguments with it.

@PolarGoose
Copy link
Contributor

I think it is possible to just copy the source code of the site and create a GitHub action that will publish it on Github Pages. Let me look into that.

@skvadrik
Copy link
Owner

skvadrik commented Oct 31, 2024

I think it is possible to just copy the source code of the site and create a GitHub action that will publish it on Github Pages. Let me look into that.

Note that skvadrik.github.io/re2c (the gh-pages branch of this project) is already used for re2c.org.

@PolarGoose
Copy link
Contributor

PolarGoose commented Nov 4, 2024

Note that skvadrik.github.io/re2c (the gh-pages branch of this project) is already used for re2c.org.

Yes, a bit unorthodox :)
I have created a pull request:
#497

@skvadrik
Copy link
Owner

skvadrik commented Nov 6, 2024

Next thing on the wish-list for playground is a "share" button that would allow us one to share a re2c snippet by URL. I have no idea how to add it though. :)

@PolarGoose
Copy link
Contributor

Next thing on the wish-list for playground is a "share" button that would allow us one to share a re2c snippet by URL

GraphvizOnline has a share button. They just generate a link with the code inside like this:

https://dreampuf.github.io/GraphvizOnline/?compressed=CYSw5gTghgDgFgAgOIIN4Ch0IQZwK4BGksiAxgDZ44AuAphAPoAMaW2u1AnubQLwBmIcj2ABuNtlIB7clIi9y4ONUi1O49ggB2U4LQQBtGtz6DhtYABpps%2BQHc4IOgF0N7KCwC0APgRQAjAg%2BfgBMQb5QAMxu2ORQBLTkCLwIAEQwEFKktDg4CADE-qluAL6Y2PhE0PAIFFR0jIEYmjp6hsY8AkIirhIIBF6%2BBIHBBGGj0X1xCUkp6ZnZuQUhxX02crwElLRsZRXUUBDU4X5MbjSHx6NnbAEnBJPYYydRblEvN9jvwbRaYmwPE6-f5sC5HdpwWB8ACyoCgAFspH9ethgRCobxoTgAI54Q60XolIA

When you use this link, the code is copied and pasted into the source code editor.

Let me see. I will try to implement it.

@skvadrik
Copy link
Owner

Playground has been released in 4.0: https://re2c.org/playground, link available on the home page of https://re2c.org.

It would be good to make it look better on mobile phones and tablets, so I'll keep the issue open for now.

@skvadrik
Copy link
Owner

skvadrik commented Nov 19, 2024

I made it somewhat better on the phone by using stacked layout: 59eb41b, but the font is still tiny. I'm not sure why it's fine on the website (https://re2c.org) and so tiny on the playground.

What I have:

image

What I want:

image

@skvadrik
Copy link
Owner

Hacked it: f3598c8. Playground looks fine on mobile devices now, so closing the issue.

@mingodad
Copy link
Author

Hello @skvadrik can't the contrast be enhanced on the playground ?
The font color gray with a background green/red is not comfortable to read.

@skvadrik
Copy link
Owner

Hello @skvadrik can't the contrast be enhanced on the playground ? The font color gray with a background green/red is not comfortable to read.

Sure, but can you be more specific, where this low-contrast combination is? I don't think I set either green or red background anywhere (I didn't change editor/output colors at all).

@PolarGoose
Copy link
Contributor

PolarGoose commented Nov 19, 2024

@skvadrik,
Great job.

Playground has been released in 4.0

The playground web site says that it uses re2c version: 3.1~0dfc64d6f

The font color gray with a background green/red is not comfortable to read.

Is it related to the editors' background color?
image

I use my monitor in "Reader" mode, which makes everything a bit yellowish.
For my taste, I think we could just use the white background in the editors, it would make the code easier to read.

@PolarGoose
Copy link
Contributor

We can change the background color like this:
Leave it white and have different outline color
image

@skvadrik
Copy link
Owner

skvadrik commented Nov 19, 2024

@PolarGoose thanks!

We can change the background color like this

I think just white and thin grey border should be fine. Accessibility is more important after all. @mingodad Let me know if white background looks contrast enough (I used default gihub highlighting scheme in Ace editor, hopefully it should be fine for most people).

The playground web site says that it uses re2c version: 3.1~0dfc64d6f

Thanks for reminding me, I forgot to rebuild it. Updated now.

@mingodad
Copy link
Author

I think it got a little better, another enhancement would be to somehow extend/overwrite the C/C++ highlight rules to make the re2c sections stand out because they are the relevant aspect of this playground.

@skvadrik skvadrik reopened this Nov 20, 2024
@skvadrik
Copy link
Owner

another enhancement would be to somehow extend/overwrite the C/C++ highlight rules to make the re2c sections stand out because they are the relevant aspect of this playground.

There is a way, we can use CSS selectors like .ace-github-light-default .ace_comment. I'll have a look. It's not 100% reliable as it depends on the HTML class names generated by ACE, but we can fix it later if they change.

@skvadrik
Copy link
Owner

Another thing I'd like to add is support of older version of re2c (at least the latest stable one), as many distros are slow to update and examples use new re2c features (so for old re2c version we'll fetch old examples).

@PolarGoose
Copy link
Contributor

Another thing I'd like to add is support of older version of re2c (at least the latest stable one), as many distros are slow to update and examples use new re2c features (so for old re2c version we'll fetch old examples).

I thought about that. But it will add a lot of complexity. I don't think it is worth it. You don't want to get a website so complex it is hard to maintain, especially for people who are new to the project.

It is not very hard. We can build several re2c.js and examples.js . But it will just make the building scripts and the code of the webpage more involved.

I would say, let's not do it for now.

There is also another option (wild idea): make GitHub actions build statically linked Linux, Windows, and MaxOs executables so that people don't need to depend on their distribution and can download the latest binary as a pre-build event.

@skvadrik
Copy link
Owner

There is also another option (wild idea): make GitHub actions build statically linked Linux, Windows, and MaxOs executables so that people don't need to depend on their distribution and can download the latest binary as a pre-build event.

We even have a bug for this: #379. :)

It wouldn't solve the problem with the examples, though. Linux users update via their package managers, they don't usually download binaries (it's inconvenient, because if you make an exception for one program, next day you'll need an exception for another one, and your whole system starts to fall apart and get impossible to upgrade/downgrade cleanly).

I still think prebuilt binaries are useful, though.

I thought about stable version on playground because someone tried to build an example from the website with an older re2c version, it broke (as the old re2c did not support some things) and they concluded that the examples are broken and not tested. I can't blame them -- it would look the same for me.

But perhaps you are right, let's not make playground overly complex, I'll try to revert some of the examples to the state that works with older re2c versions (until most distros get updated).

@skvadrik
Copy link
Owner

I've changed playground theme to make comments bright, hopefully this is contrast enough and makes re2c blocks stand out:

image

@PolarGoose
Copy link
Contributor

We even have a bug for this: #379. :)

Ok, great.

someone tried to build an example from the website with an older re2c version, it broke

Feature creep is also a thing. Would it be a better option to have a re2c directive to specify the minimal version for a specific re2c file? The same as Cmake does.

I've changed playground theme to make comments bright, hopefully this is contrast enough and makes re2c blocks stand out:

Looks good for me.

@mingodad
Copy link
Author

You've got the idea and it seems a bit better, I also tried change the colors but I couldn't find a good combination.

@skvadrik
Copy link
Owner

Would it be a better option to have a re2c directive to specify the minimal version for a specific re2c file? The same as Cmake does.

I'm not really sure about this. Most of the new features are behind a flag (you need to pass an option to enable them), and the old re2c version would just tell you that there's no such option, which is good enough. In this case it's a bunch of aliases that cause a problem -- it's not a typical change. I guess we'll just have to be more conservative with the examples for C/C++ for a while. I have mixed feelings about minimum required version because we've had so many releases without it (and without any problems), and I think it won't have much value going forward.

@skvadrik
Copy link
Owner

skvadrik commented Nov 22, 2024

@PolarGoose Do you think it would be hard to add stable links to every example on the playground? I'd like to have a link "run on playground" next to each example in the manual. But the current links are autogenerated from the example contents, so they are not stable (they need to be autoupdated together with examples). I wonder if it could be solved by having an autogenerated html page with a redirect, and the link to the page itself would be stable. Maybe you can think of a more elegant way.

@PolarGoose
Copy link
Contributor

PolarGoose commented Nov 22, 2024

I'm not really sure about this. Most of the new features are behind a flag

Ok, then it is not needed. Agreed.

@PolarGoose Do you think it would be hard to add stable links to every example on the playground?

What if we add an extra feature in index.html to interpret links like re2c.org/playground/?example="c/basic.re". Such links will open you to the playground with the specified example selected.

@skvadrik
Copy link
Owner

What if we add an extra feature in index.html to interpret links like re2c.org/playground/?example="c/basic.re". Such links will open you to the playground with the specified example selected.

Sure, if it's possible! I don't know how to do this.

@PolarGoose
Copy link
Contributor

Sure, if it's possible! I don't know how to do this.

Ok, agreed. Let me look into this.

@skvadrik
Copy link
Owner

A few things that I need to remember to do:

  • add playground links to all examples in the manual
  • when an example is selected, make the address line reflect this, so I can quickly copy-paste example links (is it even possible?)

@PolarGoose
Copy link
Contributor

when an example is selected, make the address line reflect this, so I can quickly copy-paste example links (is it even possible?)

It is hard to believe, but it seems that it should be possible. Let me check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants