nat-5.1.3 This directory contains versions of front end files that are rewritten to be more "native" to Lua. These files should be considered as exercises in exploring ways to write the front end, for example, to write a front end that is optimized for size, etc. See also file size data further below. The following are the different versions available (mk2 == "mark 2", this is commonly used in the UK, e.g. for aeroplanes during WWII): Lexers ------ NOTE: These lexers should behave mostly identically to the original C lexer. Locale support for non-standard decimal points is missing. Also, all strings and long strings have line endings normalized to LF. llex_mk2 Rewritten from original ported code to become more Lua-like. Needs input to be entered as a single string. Unless an application's need is very unusual, this should not be a problem. It will not work for per-line interaction, though. This version is also somewhat optimized for size; its stripped binary chunk size is 3716 bytes. Status: TESTED Parsers ------- lparser_mk2 Written for the simplified lexer interface of llex_mk2. This is a lexer skeleton, stripped of codegen code. Has a minimum of variable management code added, and tracks the is_vararg flag of a function. See the comments in the source code for more information. Without logging messages and comments, it should be under 600 LOC. A binary chunk of lparser_mk2 (stripped) is 15783 bytes. Sample output of the parser message logger can be found in the test/parser_log subdirectory. Tested with test_parser-5.1.lua, the Lua 5.1.x parser test cases in the test_lua/ directory, appears to be fine. Compared to the 5.0.x parser skeleton, the main changes are: (a) 'arg' not implemented, so it appears as a global, and (b) '...' recognized as the last function parameter. Status: SNIPPETS APPEAR TO WORK Other notes: ------------ None.