Unreleased - 2024-01-30
- References to functions and built-in functions can now be compared for equality.
- Function literal syntax:
(a, b) -> return a + b
andn -> return n**2
. - Overhauled large parts of the internal architecture to fix shortcomings and issues with the traceback.
- Negative exponents no longer require parenthesis.
- Using
replace()
to remove a substring (i.e., the replacement is the empty string) results in a buffer overflow. - Interactive mode crashes when evaluating a variable containing an object reference.
- E notation with lowercase
e
– Use uppercaseE
instead.
0.15.0 - 2023-10-21
- New built-in functions:
sort()
– Sort a list using a custom comparator function.getwd()
– Get the working directory.setwd()
– Set the working directory.playwav()
– Play a WAV file. This function is currently only supported on Windows; on other systems, it will simply returnFalse
.
- Increased precedence of negation operator (
!
) – Negation is now evaluated after multiplication/division and before the unary minus operator. - Improved string representations of floating-point numbers.
- Increased precision of floating-point numbers.
- Relative paths are now always converted to absolute ones.
- Increased the maximum size for textual representations of the AST (enabled by default in debug builds).
0.14.0 - 2023-08-19
- Improved number lexer:
- Numbers can now also be expressed in binary (prefix
0b
), octal (prefix0o
), and hexadecimal (prefix0x
). - Decimal numbers now support scientific E notation (suffix
e<exponent>
). - These improvements also apply to the
int()
andflt()
built-in functions.
- Numbers can now also be expressed in binary (prefix
- New escape sequences:
\t
translates toU+0009
("Character Tabulation").\r
translates toU+240D
("Carriage Return").\oOO
translates to the character with octal valueOO
.\xXX
translates to the character with hexadecimal valueXX
.
int("")
andflt("")
produce0
instead of an error.- Crash when attempting to access a member of a literal.
- Return statements are propagated out of
eval()
andscript()
calls.
0.13.0 - 2023-06-23
assert
statement.
Used to ensure assertions are met at runtime.any
andall
operators.
When placed in front of iterable values in comparisons, these operators allow complex comparisons that take into account all members of an iterable. Usingany
, the comparison yields true if it applies to any element in the iterable. Usingall
, it yields true if it applies to all elements in the iterable.
- Defining new members for existing objects is no longer possible.
- Improved traceback.
- Method chaining
Previously, when an object method returnedthis
orthis.x
(wherex
was a member ofthis
containing an object), the returned value was a copy of the referenced object, meaning any subsequent changes applied to this object via further method calls would not be reflected in the root object. This happened because Une always dereferenced return values.
As of this release, various aspects of the interpreter have been reworked to allow objects to be returned by reference, which fixes the described issue. - Whitespace around expressions in parentheses causes a syntax error.
var=var
, wherevar
is a previously undefined symbol, does not cause an error.- Method arguments are interpreted after
this
is defined. - The
>
,>=
,<
, and<=
operators strictly expect the left-hand side operand to support the comparison, leading to a crash if it does not (e.g.:Void > 0
). - Dereferencing an object literal does not update its owner.
0.12.0 - 2023-05-07
- In-place arithmetics.
Any arithmetic operation can now be performed in-place viavariable += 1
, where+
is the desired arithmetic operator. - Slicing.
Lists and strings now support slicing vialist_or_string[start..stop]
, wherestart
is the index of the first element to be included in the slice, andstop
is the index of the element after the last one to be included. Negative indices can be used to select offsets starting from the back instead of the front. Also, either of these indices can be omitted (implicitly setting their value zoVoid
), in which case they are left open-ended. - Like with slices, regular indices can now also be negative.
- Fixed an uncaught type error when performing a bad assignment operation.
0.11.0 - 2023-02-15
- Objects.
Objects are compound datatypes used to represent complex structures. For the most part, they behave like unordered lists with named members in place of indices. The true power of objects lies in methods: when calling a function within an object, the object is accessible via thethis
keyword. This allows methods to modify the object they're contained in, enabling basic object-oriented programming. - Expressions in string literals.
To embed an expression in a string, surround it with curly braces:"2 * 2 = {2*2}"
To include literal curly braces in a string, escape them:"\{\}"
- New
cover
operator.
Thecover
operator is used to provide an alternative value for an expression in case of an error during evaluation. - New nullish (
??
) operator.
The nullish operator returns the left result if it is not 'Void', otherwise the right. for-in
loops.- Strings are now editable via index, like lists.
Void
is now accessible via a keyword and comparable to itself.True
andFalse
are available as keywords. They are identical to1
and0
.- New built-in functions:
eval()
– Same asscript()
, but accepts a string instead of a file path.replace()
– Replace a string in a string.join()
– Join strings using a seperator.substr()
– Get substrings.
- Interactive mode directives.
#clear
clears the console.#header
displays the header.#symbols
displays all accessible symbols.
- Overhauled variable assignment internals.
The left-hand side of assignment statements is now parsed recursively. This change introduces the ability to set indices inside indices, a capability which has been missing so far.
- Soft whitespace at the end of the script causes a syntax error.
- CTRL+C to exit the interactive mode is unreliable in various cases.
0.10.0 - 2022-09-27
- New escape sequences (#2):
\e
translates toU+001B
("Escape").\a
translates toU+0007
("Alert").
- The CLI mode is now referred to as interactive mode, and its command line switch is now
-i
instead of-c
.
- Multiplying a string or list with a negative number causes a crash.
- Functions do not persist in interactive mode.
- New variables are not created in the global context when the
global
keyword is used (#1).
0.9.0 - 2022-05-29
- New built-in function
append()
.
Exactly the same aswrite()
but does not discard the content previously found in the target file. - New
exit
statement to immediately exit the running script.
Similar to the return statement, the exit statement also supports an optional exit code; however, since this code is returned to the operating system, it must be an integer. If the exit code is omitted, it defaults to0
. - To implement the exit statement, the interpreter state was given a new flag
should_exit
to signal when the script should exit. The state of this flag can be retrieved after the execution through a new optional parameter in theune_run
function. - New test cases for:
- Return statement without return value.
- New
exit
statement. - Changed
script()
behavior. - New
append()
command.
- The built-in
script
command now executes in the same context as the host script, allowing the caller and callee to exchange information. - Updated README.
- Updated documentation to include the exit statement (6.3).
- The command line interface now shows version information.
- Return statement without return value has no effect.
0.8.0 - 2021-11-23
- Added CLI.
To access the interface, useune -c
.
To exit a session, use CTRL+C. - Test case to check that the last evaluated result is implicitly returned when exiting a script.
- The interpreter now implicitly returns the final evaluated result when exiting a script.
This is useful for implementing a CLI, as it allows the user to quickly check the contents of variables or evaluate expressions withoutprint
. une_run
now accepts an optional external context. When this context is supplied, the function uses it for the interpretation instead of creating a new context.
0.7.3 - 2021-11-22
- Test case for latest bugfix.
- Fixed stale pointer in for loop implementation causing nested loops to break.
0.7.2 - 2021-10-24
- Fixed built-in functions not verifying the number of arguments supplied to them.
- Fixed crash when checking equality of function, built-in function, or 'Void' against any value.
0.7.1 - 2021-10-21
error.une
example to demonstrate error messages.
- Fixed an early deallocation of the definition file in functions, before they were used for the traceback.
0.7.0 - 2021-10-19
- Build argument lists.
To simplify the build process, this commit introduces the "win", "unix", "win-dbg", and "unix-dbg" build configurations, which refer to argument lists in res/build.
To build Une using one of these configurations, use<cc> @<file_name>
. - Test case for Changed · 3.
- Changed error message formatting.
- Refactored test.py to improve robustness.
- Calling an index of a list no longer requires enclosing the list access in parentheses.
- test.py: Not appending ".exe" to executable path.
- Warnings when compiling with Clang on Windows.
- make.sh is no longer the preferred build method. Refer to Added · 1.
0.6.1 - 2021-09-28
- New test cases.
- Clang support.
make.sh
now suppresses warnings for zero variadic macro arguments.- On Windows:
une_file_exists
usesGetFileAttributesA()
to ensure the path is not a directory.- Sleeping for a given amount of miliseconds is handled via
Sleep()
.
object_orientation.une
example.
- Renamed
src/builtin.c
andbuiltin.h
tobuiltin_functions.c
andbuiltin_functions.h
to avoid confusion withsrc/datatypes/builtin.c
andbuiltin.h
. - Some other small changes.
- Since the introduction of memdbg, allocations were left unchecked in non-debug mode. This has now been adressed with a new macro
verify()
, which, if the pointer provided to it isNULL
, prints an error message and aborts the program. - On Windows builds, memdbg no longer prints signal messages.
- Functions are no longer scoped per context, instead they are all part of a main function buffer in the interpreter state.
This allows users to, for example, return new functions as return value of other functions.
- Spelling mistake in usage message.
make.sh
does not append ".exe" to the output binary.- Some warnings when compiling with
-Wextra
. - Negations are parsed after powers, indices, and calls, creating an unintuitive order of operations, where, for example,
-2**2
is evaluated to4
when one would expect to get-4
. To fix this, negations are now parsed before each of these structures. - When copying a function node, the program crashes because it tries to duplicate a string as if it was a node.
0.6.0 - 2021-08-13
- Warning when
UNE_DEBUG_MEMDBG
is enabled. - Option to skip ahead in
testing/test.py
.
-
A statement immediately following a closing brace is no longer considered valid syntax.
-
Some refactoring.
-
Functions and built-in functions are now datatypes.
The fundamental change in this is that a call is now a seperate operation, performed on a datatype. When not called, a function or built-in function is just data, which can represent itself or be checked for truth (both types are always true).A literal representation of a "square" function might look as follows:
function(number) { return number**2 }
To "define" a function, we simply bind it to a variable...
square = function(number) { return number**2 }
... which can then be referenced to call the function:
square(4)
(would return16
)Internally, this changes a bunch of things:
- The lexer now differentiates between built-in functions and variables, creating a new
UNE_TT_BUILTIN
token holding aune_builtin_function
when encountering the name of a built-in function. - The parser creates two new nodes,
UNE_NT_FUNCTION
orUNE_NT_BUILTIN
. For user-defined functions, the node closely resemblesUNE_NT_DEF
. For built-in functions, the node simply holds theune_builtin_function
value from the token. - The interpreter now has seperate methods for interpreting a function or built-in function. They return a
une_result
:- For functions, the result holds a pointer to the function in the function buffer of the context. To allow this, the function buffers no longer hold actual
une_function
s but instead pointers to standalone allocations. - For built-in functions, the result holds a
une_builtin_function
, which can be used to access the function pointer, get the amount of required parameters, and more.
- For functions, the result holds a pointer to the function in the function buffer of the context. To allow this, the function buffers no longer hold actual
One problem this change created is that functions are no longer named. Therefore, when creating the traceback on an error, we instead use the file and line where the function was defined. To access this information, every
une_context
now holds a pointer to theune_function
that created the context, which in turn holds information on its point of definition. - The lexer now differentiates between built-in functions and variables, creating a new
-
Updated examples.
- Old function implementation.
0.5.9 - 2021-08-08
- The help message on invalid command line arguments now shows an environment-specific path to the executable by using the implicit zeroth path argument.
- Built-in functions no longer each have a custom declaration.
- Data result types are now organized in
src/datatypes
.- Each data type defines a number of routines in its corresponding
.c
file, with all types being united indatatypes.c
. - When applying an operation, the required routine is found through the
une_datatypes
lookup table.
- Each data type defines a number of routines in its corresponding
- The error line is always
1
. - The position of an expression in parentheses does not include the surrounding parentheses.
- If there are non-printable but legal characters on the line of an error, the underscore in the error display gets misaligned.
ostream
buffers do not grow if assertions are disabled.- The creation of
UNE_TT_INT
andUNE_TT_FLT
tokens does not work if assertions are disabled. - Missing error on conversion of integer into invalid character.
LOGFREE()
macros.- Data result type helpers from
result.c
– See Changed.
0.5.8 - 2021-07-30
- Warnings when running with lexing, parsing, or interpreting disabled.
- Test case for redefining a built-in function.
- Main error message now shows the usage instead of an error message.
- Changed the default context name from "<stdin>" to "<args>".
memdbg.c
is no longer linked if not building in debug mode.- Minor refactoring.
- Undefined errors when running with lexing, parsing, or interpreting disabled.
- Segmentation fault when freeing a
NULL
pointer while memdbg is enabled.
0.5.7 - 2021-07-21
- Various small things.
- Missing error on redefinition of built-in function.
- Removed
make.cmd
.
0.5.6 - 2021-07-17
- memdbg: Added signal handling,
fopen()
andfclose()
wrappers, and other general improvements. - Added debug report – If enabled, prints the state of Une into
une_report_return.txt
andune_report_status.txt
after successful execution.
- Some refactoring.
int("str")
does not work.GET_IDX
on a non-indexable type defines an error but does not return it.- Lexer treats directories like empty files.
0.5.5 - 2021-07-15
- tools: Added
une_file_exists()
andune_file_or_folder_exists()
.
- tools: Reworked implementations of
une_wcs_to_une_int()
andune_wcs_to_une_flt()
. - Other minor changes.
- Some built-in commands don't check if a path is a directory instead of a file.
- Aborting without setting error on unclosed index during
SET_IDX
parsing.
0.5.4 - 2021-07-15
- Invalid input to
main.c
now displays an error. - Added debug option to define (almost) all sizes as
1
. - Added debug option to return the error type as integer.
- Promoted
UNE_RT_VOID
to a data result type.VOID
is always falsy and never equal to itself. - Further simplified errors:
- Replaced
UNE_ET_UNEXPECTED_CHARACTER
withUNE_ET_SYNTAX
. - Combined
UNE_ET_VARIABLE_NOT_DEFINED
andUNE_ET_FUNCTION_NOT_DEFINED
intoUNE_ET_SYMBOL_NOT_DEFINED
. - Renamed
UNE_ET_FUNCTION_ARGC
toUNE_ET_FUNCTION_ARG_COUNT
. - Tweaked wording of error descriptions.
- Replaced
- Renamed
float()
toflt()
to align with internal naming. - Made
une_node_to_wcs()
andune_token_to_wcs()
a little bit safer for testing. - Reworked
une_str_to_wcs()
implementation. - Other small refactorings and changes.
- Some functions using
une_ostream
s hold on to stale pointers. (une_lex()
,une_error_display()
,une_builtin_split()
) une_context_free()
frees all parents. This behavior is now achieved throughune_context_free_children()
.une_result_list_mul()
allocates too much memory for the new lists.input()
does not allocate enough memory for the input string.UNE_NT_COP
does not include the condition in its position.
- Removed
UNE_D
macro because it caused semantic highlighting issues.
0.5.3 - 2021-07-12
- Added simple traceback to error.
- Added
escseq.h
– Macros for ANSI escape sequences. - Minor changes to codebase to fully conform to C standard.
une_node_to_wcs()
forUNE_NT_SET
andUNE_NT_SET_IDX
now shows whether the assigments areglobal
or not.- memdbg: Added manual
ARR(array, index)
array checker. - Escape sequences are now globally toggleable from
escseq.h
.
- Fixed a bug in
stream.c
whereune_istream_wfile_reset()
would not reset the streams last character, causing subsequent calls topull()
not to increment the stream index.
0.5.2 - 2021-07-09
- memdbg now helps prevent buffer overflows by adding padding behind each memory allocation.
All allocations' paddings are tested whenever a memdbg wrapper function is called.
Wrapper functions for other allocators and/or memory-modifying functions can be created in
memdbg.c
. - Other minor changes and refactorings.
- Fixed a bug where certain lexer errors at the end of the input caused a crash.
- Removed
une_strdup()
andune_wcsdup()
as these functions are now wrapped in memdbg.
0.5.1 - 2021-07-08
- memdbg – A debugging module that keeps track of memory allocations. (Replaces
alloc_counter
.) - logging – A debugging module to simply create verbose log messages. (Replaces
LOGX
andERR
.)
- Fixed
__une_static
.
- Removed
une_malloc()
,une_realloc()
, andune_free()
– See memdbg.
0.5.0 - 2021-07-05
- If passed "
-s
" as first argument, Une will now interpret the string following it. - Added
put()
– This function behaves howprint()
behaved previously.
- The ternary operation syntax has been changed to
PREDICATE?CONSEQUENT:ALTERNATE
. print()
now automatically appends a newline to the end of the output.- Array input streams now require a parameter
__cast_type
which holds the dereferenced type thevoid*
should be casted to. This was implemented to address a problem where avoid*
casted to awint_t*
returns values unable to be compared to character literals. - Other minor changes.
0.4.0 - 2021-07-05
- Added
script(path)
built-in command – Execute external Une scripts. - Added
exist(path)
built-in command – Check if a file or folder exists. - Added
split(str, delims)
– Using the provided delimiters, split a string into a list of substrings.
- Changed variable definition scopes: By default, all variable definitions now only affect the current context. To modify variables from parent contexts, a new "
global VAR=EXPR
" syntax has been introduced. - Changed
UNE_TT_NOT
,UNE_TT_AND
, andUNE_TT_OR
from "not
", "and
", and "or
" to "!
", "&&
", and "||
" respectively. - Replaced
UNE_ET_OPERATION_NOT_SUPPORTED
,UNE_ET_COMPARISON_NOT_SUPPORTED
,UNE_ET_INDEX_CANNOT_GET
,UNE_ET_INDEX_CANNOT_SET
,UNE_ET_INDEX_TYPE_NOT_SUPPORTED
, andUNE_ET_FUNCTION_UNEXPECTED_ARG_TYPE
withUNE_ET_TYPE
. - Renamed
wcs_to_une_int()
,wcs_to_une_flt()
,wcs_to_str()
,str_to_wcs()
,str_dup()
, andwcs_dup()
toune_wcs_to_une_int()
,une_wcs_to_une_flt()
,une_str_to_wcs()
,une_wcs_to_str()
,une_strdup()
, andune_wcsdup()
respectively.
- Various.
0.3.0 - 2021-06-26
- New built-in functions:
chr(int)
– Convert an integer to a character.ord(char)
– Convert a character to an integer.read(path)
– Read from a file.write(path, str)
– Write to a file.input(str)
– Get text from stdin.
- Fixed a problem with
streams.h
. - Added more specific size defines.
0.2.1 - 2021-06-13
- Added
streams.c/h
: These files contain tools to simplify interfacing with arrays or files and to prevent common bugs. They are not yet used everywhere and might still need more work. - All macros and functions now have a description above their definition.
- Added
une_free()
as a wrapper tofree()
.
- All-around cosmetic refactoring.
- Some frequently used methods have been defined as functions or macros to avoid rewriting code.
- Errors have been significantly simplified: In most cases, detailed errors are not needed to identify the problem and only clutter the source.
- Tokens are now sometimes created using
une_token_create()
. - The lexer has been split up into subroutines.
- Multiple places in the code now use lookup tables, which are easier to maintain.
- Some parts of the code have previously already used enum "regions" to describe a range of allowed values for a function. These regions are now defined right in the enums as
UNE_R_x
defines, as an attempt to minimize the risk of corrupting regions on accident when reordering enum values. - Replaced
une_result_to_wcs()
withune_result_represent()
. This change has yet to be carried over into otherx_to_wcs()
functions. - Renamed
rmalloc()
toune_malloc()
. - Renamed
rrealloc()
toune_realloc()
. - Renamed
UNE_STATIC
to__une_static
. - Renamed
UNE_BIF_NONE
to__UNE_BIF_none__
. - Renamed
malloc_counter
toune_alloc_count
. - Many other small changes.
- Removed
file_read()
, as it is no longer used.
0.2.0 - 2021-06-04
- This release reverts the additions of 0.1.4. As such, the codebase now follows the following principles:
- There is no top-level "omni" data structure.
- The
une_x_state
structs are only used to transport commonly used data (this does not includeune_error
).
- Added
sleep()
built-in command – Pauses execution for a given amount of miliseconds.
0.1.5 - 2021-05-24
- Added
une_lexer_x()
functions to enable Changed · 1. - Added
une_lex_x()
functions to break upune_lex()
.
une_lex()
(formerlyune_lex_wcs()
) can now lex both strings and files.
- Removed
une_lex_file()
.
0.1.4 - 2021-05-22
- This release introduces
une_instance
, a new top-level data structure. It holds the following data:une_error
une_lexer_state
: A new struct that holds information for the lexer.une_parser_state
: A new struct that holds information for the parser.une_interpreter_state
: A new struct that holds information for the interpreter, among it the redefinedune_context
, which now only holds contextual information for the interpretation. In many functions, aune_instance*
replaces multiple parameters.
- Parser now uses a group of
une_p_x()
functions to simulate a token stream. I'm unsure if I like this approach, so I might remove it again in a later commit. - Deprecated
une_lex_file()
– An upcoming, refactored lexer will reintroduce this functionality. - Added
une_error_create()
. - Cosmetic changes.
- Various.
0.1.3 - 2021-05-21
- All
x_type_to_wcs()
functions are now based on lookup tables, defined in the correspondingx.c
files asune_x_table
. - Identifiers are no longer interpreted and
une_interpret()
no longer contains a case forUNE_NT_ID
. - Restructured some
x_to_wcs()
andx_free()
functions.
- Various.
0.1.2 - 2021-05-11
- Most debugging functionality is no longer compiled if
UNE_DEBUG
is not defined.
une_lex_wcs()
doesn't free the tokens it has already created on an error.une_tokens_free()
now calls a new functionune_token_free()
for every token.
0.1.1 - 2021-05-03
- Refactoring
This release continues the ongoing refactoring efforts. As of this commit, all ofparser.c
has been refactored.
Notable changes are:- Binary operations like addition, multiplication, etc. are now handled by
une_parse_binary_operation()
. - Unary operations like negation are now handled by
une_parse_unary_operation()
. une_parse_sequence()
now also handles consumption of the enclosing tokens in a sequence, and instead of returning avoid**
to aune_node*
array, it returns a properune_node*
like every other parse function.une_parse_block()
has been merged intoune_parse_stmt()
.- Removed
UNE_DEBUG_SOFT_ERROR
. - Some expression-related functions have been renamed. The top level function for expressions is now always called
une_parse_expression()
. - All parse functions are now static. The public interface for the parser is
une_parse()
. - Enums now have a
__none__
and__max__
value to determine their size and to represent a missing value.
- Binary operations like addition, multiplication, etc. are now handled by
0.1.0 - 2021-04-29
- Built-in functions
This release adds basic support for built-in functions. Both the support for these functions and the functions themselves require some more work in the future.
- Refactoring
This release also continues the ongoing code refactoring efforts. As of this commit, all ofinterpreter.c
has been refactored.
0.0.5 - 2021-04-28
- Refactoring.
0.0.4 - 2021-04-27
- Various.
0.0.3 - 2021-04-25
- New logo.
- Refactoring, style changes.
- Various.
0.0.2 - 2021-04-22
- Seperated source into multiple files.
0.0.1 - 2021-04-17
- Initial release, based on 0.0.0-c.2.1.
- Une logo.
- Changed name from "CMDRScript" to "Une".
0.0.0-c.2.1 - 2021-04-16
- Interpretation.
0.0.0-c.2 - 2021-04-06
- Second C test. Builds on 0.0.0-c.1.2, adding the structure for interpreting the parsed program.
0.0.0-c.1.2 - 2021-04-04
- Memory management.
- Refactoring.
- Various.
0.0.0-c.1.1 - 2021-04-02
while
loops.if
statements.- Function definitions.
- Negation.
0.0.0-c.1 - 2021-04-01
- First C parser test, including most of the lexing and parsing features the latest Python test has, but missing the interpreter.
0.0.0-python.6.3 - 2021-03-02
- Token positions.
0.0.0-python.6.2 - 2021-02-25
- '
^
' (power) operator. - Comments.
AND
,OR
.for
loops.- Various other things.
0.0.0-python.6.1 - 2021-02-21
if
,elif
,else
statements (includingNOT
,EQU
,NEQ
,GTR
,LSS
,GEQ
,LEQ
– still missing isAND
,OR
).while
loops (includingbreak
,continue
).- functions (including context switching,
return
).
0.0.0-python.6 - 2021-02-20
- Sixth Python test. This is a rebuild of 0.0.0-python.5, focusing less on Python-specific language features. It also implements variables, strings, some string operations, the seperation of commands using '
;
', and multiline input.
0.0.0-python.5 - 2021-02-20
- Fifth Python test. This test completely abandons the structure of the previous tests and instead implements the concept of an abstract syntax tree. The most notable difference between this approach and the ones tried previously is that creating tokens, combining tokens to create statements, and verifying the syntax is done in seperate steps, while the previous tests tried to do all of these things at the same time.
This test is also the first to go beyond lexical analysis, adding a working parser and interpreter. The result is a simple arithmetic interpreter.
0.0.0-python.4 - 2021-02-19
- Fourth Python lexer test. Expands on previous tests, tries to identify parts of instructions by referencing knowledge gathered from previous characters.
0.0.0-python.3 - 2021-02-19
- Third Python lexer test. This test is similar to the first test, but instead of using built-in Python methods to categorize characters, we define our own sets and test if the character is contained in one of them.
0.0.0-python.2 - 2021-02-16
- Second, abandonded Python lexer test. The idea with this approach is that the first word of every statement describes what kind of instruction follows.
0.0.0-python.1 - 2021-02-13
- First Python lexer test. Its structure has similarities to a state machine:
The lexer keeps track of what type of token it is currently lexing. It decides what to do with the character based on the current token type and the type of the character. It handles one character per loop.