[0.4.10] - 2025-0x-xx
- Tested with Rley 0.9.02 and Rubocop 1.74
[0.4.09] - 2025-01-16
- Tested with MRI Ruby 3.4.1.
- Minor changes
- [NEW] Added
demofolder - [FIX] Some Rubocop 1.72.0 offences fixed.
[0.4.08] - 2022-04-09
- Refactoring of the
Scannerclass.
Changed
Frontend::Scannerclass: major code refactoring.
[0.4.07] - 2021-11-21
- Minor fixes; dependency towards Rubies 3+ allowed...
Fixed
- File
loxxy.gemspecdependency on Ruby version relaxed to support Ruby 3+ - File
resolver.rbFixed a typo in standard Lox error message. - File
collide_with_paramaeter.loxFixed typo in error message. - File
duplicate_local.loxFixed typo in error message. - File
duplicate_parameter.loxFixed typo in error message.
[0.4.06] - 2021-11-01
- Code update to cope with
Rleyv.0.8.08 changes
Changed
- File
AST::AstBuildersomereduce_to cope implementation change of ? quantifier - Method
AST::LoxCallExpr#initializecall toArray#flattenwith argList argument - File
loxxy.gemspecdependency towardsrelyminimal version number is now0.8.08 - Some spec files updated after
rleychanges of ?, *, + quantifiers
Removed
- File
front_end/literal.rb: obsolete
[0.4.05] - 2021-10-10
- Removal of
Literalclass, code restyling to please Rubocop 1.22
Changed
- Class
Scannerremove all dependencies toFrontend::Literalclass - File
.rubocop.ymladded new cops from Rubocop 1.21 and 1.22 - File
parser_spec.rbuse of parentheses in ambiguous expressions - File
raw_parser_spec.rbuse of parentheses in ambiguous expressions - File
loxxy.gemspecforced dependency to Rley 0.8.06
[0.4.04] - 2021-09-11
- Grammar optimization (3 rules less, use of match_closest feature from
Rley)
Changed
- Method
Ast::AstBuilder#reduce_argumentscode re-styling: use shorthand &: - File
grammar.rbusematch_closestconstraint from Rley to cope with dangling else statement
[0.4.02] - 2021-09-10
- Fixes in
AST::AstBuilderclass to cope with changes in Rley 0.8.03
Changed
- File
loxxy.gemspecforced dependency to Rley 0.8.03
Fixed
- Method
Ast::AstBuilder#reduce_class_namingfixed access toIDENTIFERin (LESS IDENTIFER)? - Method
Ast::AstBuilder#reduce_var_declarationfixed access toexpressionin (EQUAL expression)? - Method
Ast::AstBuilder#reduce_assign_exprfixed access tocallin (call DOT)? - Method
Ast::AstBuilder#reduce_parametersfixed access toIDENTIFIERin (COMMA IDENTIFIER)* - Method
Ast::AstBuilder#reduce_argumentsfixed access toexpressionin (COMMA expression)*
[0.4.01] - 2021-08-22
- Grammar and AST::AstBuilder adapted to take profit of extended grammar notiation in Rley 0.8.01
Changed
- Class
Ast::ASTBuilderremoval of methods made redundant with new Rley version - File
.rubocop.ymladded config for new cops - File
grammar.rbchanged rules to use new extended rule syntax in Rley
[0.4.00] - 2021-05-24
- Version bump.
Loxxyis capable to run the LoxLox interpreter, an interpreter written inLox.
New
- Method
BackEnd::LoxInstance#falsey?added - Method
BackEnd::LoxInstance#truthy?added
Changed
- Method
BackEnd::Engine#after_variable_exprthe error messageUndefined variablenows gives the location of the offending variable. Class
Ast::LoxClassStmtis now a subclass ofLoxNodeFile
README.mdadded an explanation on how to runLoxLoxinterpreter.
Fixed
- Method
Ast::LoxClassStmt#initializefixed inconsistencies in its Yard/RDoc documentation. - Method
Ast::LoxFunStmt#initializefixed inconsistencies in its Yard/RDoc documentation. - Method
BackEnd::Engine#native_getcnow returns -1 when its reaches EOF. - Method
BackEnd::Resolver#after_logical_exprwas missing and this caused the lack of resultation in the second operand.
[0.3.02] - 2021-05-22
- New built-in expressions
getc,chr,exitandprint_eeror, fixes with deeply nested returns, set expressions
New
- Class
BackEnd::Enginenew built-in functionsgetc,chr,exit, andprint_error
Changed
- Class
Ast::LoxSetExprvalue to assign is now a distinct atrrbute instead of a subnode - Class
BackEnd::Enginetwo distinct stacks: one of expression evaluation, another for argument passing
Fixed
- Class
BackEnd::LoxClass: in some contexts the init method returned twice 'this'. - Method
LoxFunction#callmismatch between deeply nested returns and environments
[0.3.01] - 2021-05-08
- Fix in
Scannerclass, added more tests in test suite.
New
- Added the new subfolder
extraundertest_suite. It will contain tests for non-standard features or tests not covered in standard test suite.
Fixed
- Class
FrontEnd::Scanner: Couldn't correctly recognize a plus preceding directly a number literal
[0.3.00] - 2021-05-07
- Milestone:
Loxxypasses all reference test suite.
Fixed
- Method
BackEnd::Resolver#before_variable_expr: StandardLoxallows re-declaration of a variable at top-level scope
[0.2.06] - 2021-05-04
- Nearly passing the 'official' test suite, fixing non-compliant behavior, specialized exceptions for errors
New
- Module
LoxFileTestermodule that hosts methods that simplify the tests ofLoxsource file.
Changed
- Folder
test_suitevastly reorganized. Sub-folderbaselinecontains spec files testing theLoxfiles from official implementation - Class
BackEnd::Enginereplaced mostStandardErrorbyLoxxy::RuntimeErrorexception. - Class
BackEnd::Resolverreplaced mostStandardErrorbyLoxxy::RuntimeErrorexception. - Method
Datatype::Number#/now handles correctly expression like0/0(integer divide)
Fixed
0/0expression results in a ZeroDivisionError exception, in Lox this result to a NaN (Not a Number). Now,Loxxyis aligned to standardLoxFrontEnd::Scannernow always treats expression like-123as the unary or binary minus operator applied to a positive number.
[0.2.05] - 2021-04-26
Loxxynow transforms for loops into while loops (desugaring), fix in Scanner class
Changed
- Method
Ast::ASTBuilder#reduce_for_stmtconverts 'for' loops into 'while' loops - Method `Ast::ASTBuilder#reduce_for_control takes care of case for(expr1;;expr2) now test expression is set to true
Fixed
- Method
FrontEnd::Scanner#next_tokenkeyword recognition was case insensitive
Removed
- Method
Ast::Visitor#visitor_for_stmt - Method
BackEnd::Engine#after_for_stmt - Method
BackEnd::Resolver#before_for_stmt - Method
BackEnd::Resolver#after_for_stmt
[0.2.04] - 2021-04-25
Loxxypasses the test suite forforstatements
Fixed
- Method
BackEnd::Engine#after_for_stmtnow a for(;;) executes the body once; a for without test will execute forever - Method `BackEnd::Resolver#after_for_stmt now accepts nil test expression
[0.2.03] - 2021-04-24
- Fixes for the set (field) expressions,
acceptmethods for AST nodes are meta-programmed
New
- Module
Ast::Visiteeprovides thedefine_acceptmethod that generateacceptmethod with meta-programming
Fixed
- Method
BackEnd::Engine#before_set_exprmethos method that ensure that the receiver is evaluated first, then the assigned value - Method
BackEnd::Engine#after_set_exprnow pushes the value assigned to the field also onto the stack - Class
BackEnd::Enginea number of StnadardError exceptions are replaced by Loxxy::RuntimeError
[0.2.02] - 2021-04-21
- Improvements in the scanner class (escape sequence for quotes and newlines), error messages closer to jlox.
Changed
- File
loxxyexecutable doesn't show a stack trace for scanner errors - Class
ScannerErroris now a subclass ofLoxxy::Error - Class
Scannernow returns a specific error message for unterminated strings - Class
Scannererror messages are closer to the ones from jlox - Class
Scannersupports now escape sequences \" for double quotes, \n for newlines - File
README.mdReshuffled some text
[0.2.01] - 2021-04-18
- Minor improvements in CLI, starting re-documenting
README.md.
New
- Class
Loxxy::CLIParserparser for the command-line options
Changed
- File
loxxyexecutable now uses commad-line parsing - File
.rubocop.ymlupdated with new cops - File
README.mdAdded examples for command-line interface - File
loxxy.gemspecexpanded description of gem
[0.2.00] - 2021-04-17
Loxxyimplements the completeLoxlanguage including its object-oriented features.
New
- Class
Ast::LoxSuperExpran AST node that represents the occurrence ofsuperin source code. - Method
Ast::ASTBuilder#reduce_class_subclassingaction launched by the parser when detecting inheritance - Method
Ast::ASTBuilder#reduce_super_expraction launched by the parser when detecting the super keyword - Method
Ast::Visitor#visit_super_exprvisit of anAst::LoxSuperExprnode - Method
BackEnd::Engine#after_super_stmtdoes the lookup of an inherited method. - Method
BackEnd::Resolver#after_super_stmtchecks for correct context for super occurrence
Changed
- Method
Ast::ASTBuilder#reduce_class_declexpanded in order to support superclass - Class
Ast::LoxClassStmtaddedsuperclassattribute, expanded constructor signature. - Method
BackEnd::Engine#after_class_stmtadds an environment for super variable. - Class
BackEnd::LoxClassaddedsuperclassattribute, expanded constructor signature. - Method
BackEnd::LoxClass#find_methodnow does the lookup in superclass(es) - Method
BackEnd::Resolver#after_class_stmtsuper variable resolution - File
grammar.rbchanged rules to cope with superclass name and super keyword - File
README.mdupdated to reflect current implementation level
[0.1.17] - 2021-04-11
Loxxynow support custom initializer.
Changed
- Method
BackEnd::Class#callupdated for custom initializer. - Class
BackEnd::LoxFunctionadded an attributeis_initializer - Class
BackEnd::Resolver#before_return_stmtadded a check that return in initializer may not return a value
Fixed
- Method
BackEnd::Engine#after_call_exprnow does arity checking also for initalizer. - Method
BackEnd::LoxInstance#setremoved the check of field existence that prevented the creation of ... fields
[0.1.16] - 2021-04-10
- Fixed an issue in name lookup. All the
thistest suite is passing.
Changed
- Method
BackEnd::Engine#after_var_stmtnow it creates the variable and pouts it in the symbol table
Removed
- Method
BackEnd::Engine#before_var_stmtit generated bug when assigning a value to a var, when that var name occurred elsewhere
[0.1.15] - 2021-04-08
- Fixed the
dangling elseby tweaking the grammar rules
Changed
- Method
Ast::ASTBuilder#reduce_if__else_stmtparse action specific for if with else branch
Fixed
- File
grammar.rbchanged rules to cope withdangling elseissue
Changed
- Method
Ast::ASTBuilder#reduce_if_stmtparse action for if without else branch - File
README.mdremoved the section about thedangling elseissue.
[0.1.14] - 2021-04-05
Loxxynow implements the 'this' keyword
New
- Class
Ast::LoxThisExpra syntax node that represents an occurrence of thethiskeyword - Method
Ast::ASTBuilder#reduce_this_exprparse action for this keyword - Method
Ast::Visitor#visit_this_exprvisit of anAst::LoxThisExprnode - Method
BackEnd::Engine#after_this_exprruntime action for this keyword (i.e. refers to current instance) - Method
BackEnd::LoxFunction#bindimplementation of bound method
Changed
- Class
BackEnd::Resolverimplementing semantic actions forthiskeyword - File
grammar.rbadded name to a syntax rule
[0.1.13] - 2021-04-05
Loxxynow implements method calls
New
- Class
Ast::LoxGetExpra syntax node that represents a read access to an object property - Class
Ast::LoxSetExpra syntax node that represents a write access to an object property - Method
Ast::ASTBuilder#reduce_set_exprparse action for write access to an object property - Method
Ast::ASTBuilder#reduce_get_exprparse action for read access to an object property - Method
Ast::Visitor#visit_set_exprvisit of anAst::LoxSetExprnode - Method
Ast::Visitor#visit_get_exprvisit of anAst::LoxGetExprnode - Method
BackEnd::Engine#after_set_exprruntime action for property setting - Method
BackEnd::Engine#after_get_exprruntime action for property getting - Method
BackEnd::LoxInstance#setimplementation of write accessor - Method
BackEnd::LoxInstance#getimplementation of read accessor - Method
BackEnd::Resolver#after_set_exprresolve action for property setting - Method
BackEnd::Resolver#after_get_exprresolve action for property getting
Changed
- Method
Ast::ASTBuilder#reduce_assign_exprexpanded to support write access to an object property - Class
LoxClassStmt: methods are now aggregate under thebodyattribute - Class
LoxFunStmt: has a new attributeis_methodand inherits fromAst::LoxNode - Method
BackEnd::Engine#after_class_stmtmethods are aggregated into the classes - Method
BackEnd::Engine#after_fun_stmtextension for method - File
grammar.rbadded names to two syntax rules
[0.1.12] - 2021-04-03
- Intermediate version:
Loxxydoes instance creation (default constructor)
New
- Method
BackEnd::LoxClass#callmade class callable (for invoking the constructor) - Class
BackEnd::LoxInstanceruntime representation of a Lox instance (object).
Changed
- Method
BackEnd::Engine#after_call_exprAdded Lox class as callable thing.
Fixed
- Method
Ast::ASTBuilder#reduce_class_bodycouldn't handle properly empty classes
[0.1.11] - 2021-04-03
- Intermediate version:
Loxxydoes class declarations
New
- Class
Ast::LoxClassStmta syntax node that represents a class declaration - Method
Ast::ASTBuilder#reduce_class_declcreates aLoxClassStmtinstance - Method
Ast::ASTBuilder#reduce_class_name - Method
Ast::ASTBuilder#reduce_reduce_class_bodycollect the methods of the class - Method
Ast::ASTBuilder#reduce_method_plus_morefor dealing with methods - Method
Ast::ASTBuilder#reduce_method_plus_end - Method
Ast::ASTVisitor#visit_class_stmtfor visiting anAst::LoxClassStmtnode - Method
Ast::LoxBlockStmt#empty?returns true if the code block is empty - Method
BackEnd::Engine#after_class_stmt - Method
BackEnd::Resolver#after_class_stmt - Method
BackEnd::Resolver#before_class_stmt - Class
BackEnd::LoxClassruntime representation of a Lox class.
Changed
- File
grammar.rbrefactoring of class declaration syntax rules
[0.1.10] - 2021-03-31
- Flag return statements occurring outside functions as an error
Changed
- Class
BackEnd::ResolverAdded attributecurrent_functionto know whether the visited parse node is located inside a function
[0.1.09] - 2021-03-28
- Fix and test suite for return statements
CHANGED
Loxxyreports an error when a return statement occurs in top-level scope
Fixed
- A return without explicit value genrated an exception in some cases.
[0.1.08] - 2021-03-27
Loxxyimplements variable resolving and binding as described in Chapter 11 of "Crafting Interpreters" book.
New
- Class
BackEnd::Resolverimplements the variable resolution (whenever a variable is in use, locate the declaration of that variable)
CHANGED
- Class
Ast::Visitorchanges in some method signatures - Class
BackEnd::Enginenew attributeresolverthat points to aBackEnd::Resolverinstance - Class
BackEnd::Engineseveral methods dealing with variables have been adapted to take the resolver into account.
[0.1.07] - 2021-03-14
Loxxynow supports nested functions and closures
Changed
- Method
Ast::AstBuilder#reduce_call_exprnow supports nested call expressions (e.g.getCallback()();) - Class
BackEnd::Environment: added the attributespredecessorandembeddingto support closures. - Class
BackeEnd::LoxFunction: added the attributeclosurethat is equal to the environment where the function is declared. - Constructor
BackEnd::LoxFunction#newnow takes aBackEnd::Engineas its fourth parameter - Methods
BackEnd::SymbolTable#enter_environment,BackEnd::SymbolTable#leave_environmenttake into account closures.
Fixed
- Method
Ast::AstBuilder#after_var_stmtnow takes into account the value from the top of stack
[0.1.06] - 2021-03-06
- Parameters/arguments checks in function declaration and call
Changed
- Method
Ast::AstBuilder#reduce_call_arglistraises aLoxxy::RuntimeErrorwhen more than 255 arguments are used. Method
BackEnd::Engine#after_call_exprraises aLoxxy::RuntimeErrorwhen argument count doesn't match the arity of function.Class
BackEnd::Functionrenamed toLoxFunction
[0.1.05] - 2021-03-05
- Test for Fibbonacci recursive function is now passing.
Fixed
- Method
BackEnd::Function#calla call doesn't no more generate of TWO scopes
[0.1.04] - 2021-02-28
Added
- Class
Ast::LoxReturnStmta node that represents a return statement - Method
Ast::ASTBuilder#reduce_return_stmt - Method
Ast::ASTVisitor#visit_return_stmtfor visiting anAst::LoxReturnStmtnode - Method
BackEnd::Engine#after_return_stmtto handle return statement - Method
BackEnd::Function#!implementing the logical negation of a function (as value). - Test suite for logical operators (in project repository)
- Test suite for block code
- Test suite for call and function declaration (initial)
Changed
- Method
BackEnd::Engine#after_call_exprnow generate acatchandthrowevents
[0.1.03] - 2021-02-26
- Runtime argument checking for arithmetic and comparison operators
Added
- Test suite for arithmetic and comparison operators (in project repository)
- Class
BackEnd::UnaryOperator: runtime argument validation - Class
BackEnd::BinaryOperator: runtime argument validation
Changed
- File
consolerenamed toloxxy. Very basic command-line interface. - Custom exception classes
- File
README.mdupdated list of supportedLoxkeywords.
[0.1.02] - 2021-02-21
- Function definition and call documented in
README.md
Changed
- File
README.mdupdated description of function definition and function call.
Fixed
- Method
BackEnd::Engine#after_print_stmtnow handles of empty stack or nil data. - Method
BackEnd::Engine#after_call_exprwas pushing one spurious item onto data stack.
[0.1.01] - 2021-02-20
Fixed
- Fixed most offences for Rubocop.
[0.1.00] - 2021-02-20
- Version number bumped,
Loxxysupports function definitions
Added
- Class
Ast::LoxFunStmta node that represents a function declaration - Method
Ast::ASTBuilder#reduce_fun_decl - Method
Ast::ASTBuilder#reduce_functioncreates aLoxFunStmtinstance - Method
Ast::ASTBuilder#reduce_parameters_plus_morefor dealing with function parameters - Method
Ast::ASTBuilder#reduce_parameters_plus_end - Method
Ast::ASTVisitor#visit_fun_stmtfor visiting anAst::LoxFunStmtnode - Method
Ast::LoxBlockStmt#empty?returns true if the code block is empty - Method
BackEnd::Engine#after_fun_stmt - Method
BackEnd::NativeFunction#call - Method
BackEnd::NativeFunction#to_str - Method
BackEnd::LoxFunctionruntime representation of a Lox function.
Changed
- Method
BackEnd::Engine#after_call_expr
Fixed
- Fixed inconsistencies in documentation comments.
[0.0.28] - 2021-02-15
- The interpreter implements function calls (to a native function).
Added
- Class
Ast::LoxCallExpra node that represents a function call expression - Method
Ast::ASTBuilder#reduce_call_expr - Method
Ast::ASTBuilder#reduce_refinement_plus_end - Method
Ast::ASTBuilder#reduce_call_arglistcreates aLoxCallExprnode - Method
Ast::ASTBuilder#reduce_arguments_plus_morebuilds the function argument array - Method
Ast::ASTVisitor#visit_call_exprfor visiting anAst::LoxCallExprnode - Method
BackEnd::Engine#after_call_exprimplements the evaluation of a function call. - Method
BackEnd::Engine#after_for_stmtimplements most of theforcontrol flow
[0.0.27] - 2021-01-24
- The interpreter implements
whileloops.
Added
- Class
Ast::LoxForStmta node that represents aforstatement - Method
Ast::ASTBuilder#reduce_for_stmt - Method
Ast::ASTBuilder#reduce_for_controlcreates anAst::LoxForStmtnode - Method
Ast::ASTVisitor#visit_for_stmtfor visiting anAst::LoxWhileStmtnode - Method
BackEnd::Engine#before_for_stmtbuilds a new environment for the loop variable - Method
BackEnd::Engine#after_for_stmtimplements most of theforcontrol flow
Changed
- File
README.mdupdated.
[0.0.26] - 2021-01-22
- The interpreter implements
whileloops.
Added
- Class
Ast::LoxWhileStmta node that represents awhilestatement - Method
Ast::ASTBuilder#reduce_while_stmtcreates anAst::LoxWhileStmtnode - Method
Ast::ASTVisitor#visit_while_stmtfor visiting anAst::LoxWhileStmtnode - Method
BackEnd::Engine#after_while_stmtimplements the while looping structure
Changed
- File
README.mdupdated.
[0.0.25] - 2021-01-21
- The interpreter implements blocks of code.
Added
- Class
Ast::LoxBlockStmta node that represents a block of code - Method
Ast::ASTBuilder#reduce_block_stmtcreates anAst::LoxBlockStmtnode - Method
Ast::ASTVisitor#visit_block_stmtfor visiting anAst::LoxBlockStmtnode - Method
BackEnd::Engine#before_block_stmtcreates an new enclosed Environment - Method
BackEnd::Engine#after_block_stmtclose enclosed Environment and make parent Environment the current one
Changed
- File
README.mdupdated.
[0.0.24] - 2021-01-20
- The interpreter implements the assignment of variables.
Added
- Class
Ast::LoxAssignExpra node that represents the assignment of a value to a variable - Method
Ast::ASTBuilder#reduce_assign_exprcreates anAst::LoxAssignExprnode - Method
Ast::ASTVisitor#visit_assign_exprfor visiting anAst::LoxAssignExprnode - Method
BackEnd::Engine#after_assign_exprimplementation of the assignment - Method
BackEnd::Variable#assignto assign a value to a variable
[0.0.23] - 2021-01-20
- Fix for variables without explicit initialization.
Added
- Method
Ast::ASTVisitor#visit_builtinfor visitingDatatype::BuiltinDatatypevalue. - Method
BackEnd::Engine#before_visit_builtinpush the data value onto the stack.
Fixed
- Method
Ast::LoxVarStmt#initialize: in case no explicit value provided then useDatatype::Nil.instanceinstead of Rubynil
[0.0.22] - 2021-01-17
- The interpreter can retrieve the value of a variable.
Added
- Method
Ast::ASTBuilder#declaration_plus_moreandAst::ASTBuilder#declaration_plus_endto allow multiple expressions/statements - Method
Ast::ASTBuilder#reduce_var_expressioncreates anAst::LoxVariableExprnode - Method
Ast::ASTVisitor#visit_var_exprfor visitingAst::LoxVariableExprnodes - Class
Ast::LoxSeqDecla node that represents a sequence of declarations/statements - Class
Ast::LoxVarExpra node that represents a variable occurrence in an expression - Method
Engine::after_variable_expr: retrieve the value of variable with given name
Changed
- Method
Ast::ASTBuilder#reduce_lox_programto support multiple statements/declarations - File
README.mdupdated.
[0.0.21] - 2021-01-16
- The interpreter supports the declaration global variables.
Added
- Class
BackEnd::Entry, mixin module for objects put in the symbol table - Class
BackEnd::Environmentthat keeps track of variables in a given context. - Class
BackEnd::SymbolTablethat keeps track of environments. - Class
BackEnd::Variableinternal representation of aLoxvariable - Method
Ast::ASTBuilder#reduce_var_declarationandAst::ASTBuilder#reduce_var_declaration - Method
Ast::ASTVisitor#visit_var_stmtfor visitingLoxVarStmtnodes - Attribute
Engine::symbol_tablefor keeping track of variables - Method
Engine::after_var_stmtfor the implementation of variable declarations
[0.0.20] - 2021-01-15
- The interpreter supports the
if...elsestatement.
Added
- Class
Ast::LoxItStmt, AST node specific forifelsestatements - Method
Ast::ASTBuilder#reduce_if_stmtas semantic action for if ... else - Method
Ast::ASTVisitor#visit_if_stmtfor visitingLoxIfStmtnodes - Method
Engine::after_if_stmtimplementation of the control flow
[0.0.19] - 2021-01-14
- The interpreter supports expressions between parentheses (grouping).
Added
- Class
Ast::LoxLogicalExpr - Method
Ast::ASTBuilder#reduce_grouping_expras semantic action for grouping expression - Method
Ast::ASTVisitor#visit_grouping_exprfor visiting grouping expressions - Method
Engine::after_grouping_exprfor the evaluation of grouping expressions
Changed
- File
grammar.rbrules for if ... else were given names in order to activate semantic actions. - File
README.mdupdated with littleif ... elsedocumentation.
[0.0.18] - 2021-01-13
- The interpreter can evaluate
and,orexpressions.
Added
- Class
Ast::LoxLogicalExpr - Method
Ast::ASTBuilder#reduce_logical_exprfor the semantic action require forand,or - Method
Ast::ASTVisitor#visit_logical_exprfor visiting logical expressions - Method
Backend::Engine#after_logical_exprimplements the evaluation of the logical expressions
[0.0.17] - 2021-01-12
- The interpreter can evaluate all arithmetic and comparison operations.
- It implements
==,!=and the unary operations!,-
Added
- Class
Ast::LoxUnaryExpr - Method
Ast::ASTBuilder#reduce_unary_exprto support the evaluation of!and `-@ - Method
Ast::ASTVisitor#visit_unnary_exprfor visiting unary expressions - Method
Backend::Engine#after_unary_exprevaluating an unary expression - In class
Datatype::BuiltinDatatypethe methodsfalsey?,truthy?,!,!= - In class
Datatype::Numberthe methods<,<=, ´>´,>=and-@
Changed
- File
README.mdupdated.
[0.0.16] - 2021-01-11
- The interpreter can evaluate product and division of two numbers.
- It also implements equality
==and inequality!=operators
Added
- Method
Datatype::False#==for equality testing - Method
Datatype::False#!=for inequality testing - Method
Datatype::LXString#==for equality testing - Method
Datatype::LXString#!=for inequality testing - Method
Datatype::Nil#==for equality testing - Method
Datatype::Nil#!=for inequality testing - Method
Datatype::Number#==for equality testing - Method
Datatype::Number#!=for inequality testing - Method
Datatype::Number#*for multiply operator - Method
Datatype::Number#/for divide operator - Method
Datatype::True#==for equality testing - Method
Datatype::True#!=for inequality testing
Changed
- Method
BackEnd::Engine#after_binary_exprto allow*,/,==,!=operators - File
README.mdupdated for the newly implemented operators
[0.0.15] - 2021-01-11
- The interpreter can evaluate substraction between two numbers.
Added
- Method
Datatype::Number#-implementing the subtraction operation
Changed
- File
README.mdminor editorial changes. - File
lx_string_spec.rbAdded test for string concatenation - File
number_spec.rbAdded tests for addition and subtraction operations - File
interpreter_spec.rbAdded tests for subtraction operation
[0.0.14] - 2021-01-10
- The interpreter can evaluate addition of numbers and string concatenation
Added
- Method
Ast::ASTVisitor#visit_binary_exprfor visiting binary expressions - Method
Ast::LoxBinaryExpr#acceptfor visitor pattern - Method
BackEnd::Engine#after_binary_exprto trigger execution of binary operator Booleanclass hierarchy: added methostrue?andfalse?to ease spec test writing- Method
Datatype::LXString#+implementation of the string concatenation - Method
Datatype::Number#+implementation of the addition of numbers
Changed
- File
interpreter_spec.rbAdded tests for addition operation and string concatenation
[0.0.13] - 2021-01-10
- The interpreter can evaluate directly simple literals.
Changed
- Class
AST::ASTBuilderaddedreduce_exprStmtto support the evaluation of literals. - File
README.mdadded one more example. - File
parser_spec.rbUpdated the tests to reflect the change in the AST. - File
interpreter_spec.rbAdded a test for literal expression.
Fixed
- File
loxxy.rb: shorthand methodlox_truereferenced the ... false object (oops).
[0.0.12] - 2021-01-09
- Initial interpreter capable of evaluating a tiny subset of Lox language.
Added
- Class
AST::LoxNoopExpr - Class
AST::LoxPrintStmt - Class
BackEnd::Engineimplementation of the print statement logic - Class
Interpreter
Changed
- Class
Ast::ASTVisitorAdded visit method - File
README.mdadded Hello world example.
[0.0.11] - 2021-01-08
- AST node generation for logical expression (and, or).
Changed
- Class
AST::ASTBuilderaddedreduce_methods for logical operations. - File
grammar.rbadded name to logical expression rules - File
README.mdadded gem version and license badges, expanded roadmap section.
Fixed
- File
grammar.rb: a rule had incomplete non-terminal nameconjunct_in its lhs.
[0.0.10] - 2021-01-08
- AST node generation for equality expression.
Changed
- Class
AST::ASTBuilderrefactoring and addedreduce_methods for equality operations. - File
grammar.rbadded name to equality rules - File
README.mdadded gem version and license badges, expanded roadmap section.
Fixed
- File
grammar.rb: a rule had still the discarded non-terminalequalityTest_starin its lhs.
[0.0.9] - 2021-01-07
- AST node generation for comparison expression.
Changed
- Class
AST::ASTBuilderaddedreduce_methods for comparison operations. - File
grammar.rbadded name to comparison rules
[0.0.8] - 2021-01-07
- AST node generation for arithmetic operations of number literals.
Changed
- Class
AST::ASTBuilderaddedreduce_methods for arithmetic operations. - File
grammar.rbadded name to arithmetic rules
Fixed
- File
grammar.rb: second rule forfactorhad a missing member in rhs.
[0.0.7] - 2021-01-06
- Lox grammar reworked, initial AST classes created.
Added
- Class
Parserthis one generates AST's (Abstract Syntax Tree) - Class
AST::ASTVisitordraft initial implementation. - Class
AST::BinaryExprdraft initial implementation. - Class
AST::LoxCompoundExprdraft initial implementation. - Class
AST::LiteralExprdraft initial implementation. - Class
AST::LoxNodedraft initial implementation.
Changed
- File
spec_helper.rb: removed Bundler dependency - Class
AST::ASTBuilderadded initialreduce_methods. - File
README.mdRemoved example with AST generation since this is in flux.
[0.0.6] - 2021-01-03
- First iteration of a parser with AST generation.
Added
- Class
Parserthis one generates AST's (Abstract Syntax Tree) - Class
AST::ASTBuilderdefault code to generate an AST.
Changed
- File
spec_helper.rb: removed Bundler dependency - File
README.mdAdded example with AST visualization.
Fixed
- File
grammar.rbensure that the constantGrammaris created once only.
[0.0.5] - 2021-01-02
- Improved example in
README.md, code re-styling to pleaseRubocop1.7
Changed
- Code re-styling to please
Rubocop1.7 - File
README.mdImproved example with better parse tree visualization.
[0.0.4] - 2021-01-01
- A first parser implementation able to parse Lox source code.
Added
- Method
LXString::==equality operator.
Changed
- class
Parserrenamed toRawParser - File
README.mdAdded an example showing the use ofRawParserclass.
[0.0.3] - 2020-12-29
- Scanner can recognize strings and nil tokens ### Added
- class
Datatype::Nilfor representing nil tokens in Lox - class
Datatype::LXStringfor representing Lox strings
Changed
- Method
BuilinDatatype::validated_valuenow accepts the input value as is. Frontend::Scannerupdated code to recognize strings and nil- File
scanner_spec.rbAdded tests for strings, nil scanning
[0.0.2] - 2020-12-28
- Scanner can recognize keywords, boolean and numbers ### Added
Datatypemodule and classes
Changed
Frontend::Scannerupdated code to recognize booleans and numbers- File
scanner_spec.rbAdded tests for keywords, booleans and number scanning - File
README.mdfixed a couple of typos.
[0.0.1] - 2020-12-27
Added
- Initial Github commit