- Dependencies updates, minor changes
- File
.rubocop.yml
Incorporating new Rubocop cops (up to version 1.28) - File
grammar.rb
: Refactoring of a rule with grouping parentheses - File
s_expr_builder
Change to relfect changes in grammar - File
skeem.gempsec
Updated dependencies; minimal Ruby version is now 2.6+
-
Code update to cope with changes in
Rley
v. 0.8.08 -
File
s_expr_builder.rb
: Refactoring to cope with ? quantifier changes -
File
skeem.gemspec
dependency updated forRley
v. 0.8.08
- Grammar refactoring: use ?, * and + modifiers in Rley 0.8.03 rules
- File
grammar.rb
: Remove redundant rules after introduction of ?, * and + modifiers - Class
SkmBuilder
: Removal of useless methods after removal of their rule counterpart
- Minor refactoring for Rley 0.8.03
- Code restyling to please rubocop 1.19.1.
- File
.rubocop.yml
updated with newer Rubocop cops - File
grammar.rb
: CallingRley::grammar_builder
, replaceLET*
token byLET_STAR
- Other files changed to get rid of Rubocop offences
- Updated
.rubocop.yml
file. - Code restyling to please rubocop 0.8.0.
- Code refactoring to use string frozen magic comments (as a consequence, srl_ruby runs only on Rubies 2.3 or newer).
- Code restyling to please rubocop 0.7.40.
- Added a basic command-line and console interface for Skeem interpreter.
- Added procedures:
display!
,newline
,make-list
bin/skeem
The CLI and REPL console implementation for Skeembin/cubic.skm
: A sample defining a procedure that computes the cube of a number.bin/hello-world.skm
: The initiatic programming example
- File
primitive_builder.rb
Implementation of primitive proceduresnewline
,make-list
- File
base.skm
Added implementation ofnewline
procedure. - File
README.md
vastly reorganized and introducing the new command line.
- Bundler-generated files
bin/console
,bin/setup
- Added derived expression
do
as an imperative iteration form. - Added procedures:
vector-set!
- Class
DoExpression
for the representation of the do loop expression - Class
SkmDelayedUpdateBinding
for implementation delayed updates of bindings
- File
tokenizer.rb
Added new keyworddo
- File
grammar.rb
Added rules for thedo
expression syntax - File
primitive_builder.rb
Implementation primitive procedurevector-set!
- File
README.md
Updated to reflect additions.
- Method
DatumDSL#to_datum
now supports anSkmUndefined
input argument.
- Skeem now accepts integers in hexadecimal notation
- Added procedures:
char->integer
,integer->char
,char=?
,char<?
,char>?
,char<=?
,char>=?
- Class Tokenizer updated to recognize integer literals in hexadecimal notation.
- `DatumDSL#char(aLiteral): added conversion of char literal into SkmChar.
- File
grammar.rb
Added a rule to derive a simple datum from a character literal - File
primitive_builder.rb
Implemented primitive procedureschar->integer
,integer->char
,char=?
,char<?
,char>?
,char<=?
,char>=?
- File
README.md
Added mentions to new procedures. - File `tokenize_spec.rb: added tests for haxadecimal integers.
- File
primitive_builder_spec.rb
: Added tests for new procedures.
- Skeem now supports character datatype
- Added procedures:
boolean=?
,char?
,string
,make-string
,reverse
- Class
SkmChar
- Method
SkmPair#proper?
to check whether a pair/list is a proper one.
- Class Tokenizer updated to recognize character literals (specified by name, by hexadecimal code, escaped).
- File
grammar.rb
Added new terminal CHAR and one derivation rule - File
primitive_builder.rb
Implemented primitive proceduresboolean=?
,char?
,string
,make-string
,reverse
- File
README.md
Added mentions to new procedures. - File
tokenize_spec.rb
DRYing the spec file.` - File
primitive_builder_spec.rb
: Added tests for new procedures.
- Added procedures:
gcd
,lcm
,numerator
,denominator
,floor
,ceiling
,truncate
,round
.
- File
interpreter_spec.rb
: Refactoring by DRYing code - File
primitive_builder_spec.rb
: Refactoring by DRYing code - File
base.skm
added implementation oftruncate
- File
primitive_builder.rb
Implemented primitive proceduresgcd
,lcm
,numerator
,denominator
,floor
,ceiling
,round
. - File
README.md
Added mentions to new procedures.
- Skeem now supports rational numbers (fractions)
- Added procedures:
max
,min
,floor/
,floor-quotient
,floor-remainder
,truncate/
,truncate-quotient
,truncate-remainder
,quotient
,remainder
,modulo
DatumDSL#rational
conversion method
- `DatumDSL#to_datum(aLiteral): added conversion of literal rational into rational value.
- Class Tokenizer updated to recognize rational numbers.
- File
grammar.rb
Added new terminal RATIONAL and rule deriving number from rational - File
primitive_builder.rb
Implemented primitive procedures floor/ and truncate/ - Class
SkmInteger
now inherits fromSkmRational
class - File
base.skm
added implementation offloor-quotient
,floor-remainder
,truncate-quotient
,truncate-remainder
,quotient
,remainder
,modulo
- Test suite file
base_tests.scm
expanded. - File
README.md
Added mentions to new procedures.
- File
primitive_builder.rb
Fixed and extended implementation of/
procedure
- New procedures:
complex?
,exact-integer?
- Support for
#| ... |#
block comments (including nesting)
- File
base.skm
: Added integer number predicateexact-integer?
- File
primitive_builder.rb
: Added numeric type predicatecomplex?
- New method
Tokenizer#skip_block_comment
to handle "| ... |#" comments (including their nesting) - New folder
test_skeem
containing a test suite inSkeem
- Method 'PrimitiveProcedure#do_call' whenever possible, the arguments are evaluated before executing the primitive.
- File
primitive_builder.rb
: Lambda expression refactoring as most argument evaluations became redundant. - Method
Tokenizer#_next_token
numeric literals with only zero(es) in their fractional part are implicitly converted to integers3.0
=> 3 - Method
Tokenizer#skip_whitespaces
refactoring & detection of block comments
- File
base.skm
: predicatepositive?
returned #t when argument was zero. Now: (positive? 0) returns #f as expected.
- Empty method
PrimitiveBuilder#add_binding
removed.
- New standard procedures implemented:
assq
,assv
- File
primitive_builder.rb
. New methods for implementingassq
,assv
- File
README.md
Added mentions to new procedures.
- Superseded class
SkmList
removed.
- New standard procedures implemented:
list-copy
,procedure?
,apply
andmap
- File
primitive_builder.rb
. New methods for implementinglist-copy
,procedure?
,apply
andmap
- File
README.md
Added mentions to new procedures.
- NEW Special
cond
(= condional) form implemented. Supportselse
alternative and arrow (=>) syntax. - FIX Corner case in procedure
append
.
- Class
SkmConditional
. Internal representation ofcond
forms.
- Class
Skeem::Tokenizer
. Added keywordscond
,else
and=>
separator. - Method
Tokenizer#_next_token
updated to accept new keywords and arrows=>
- File
grammar.rb
: Added new terminals and new production rules for parsing thecond
form - File
s_expr_builder.rb
: Added new methods for building parse tree ofcond
forms - File
interpreter_spec.rb
: Added tests forcond
form. - File
README.md
Updated forcond
form. Added fifth example illustrating thecond
form.
- Method
Primitive#create_append
: test case (append '() 'a)) failed to return a (as identifier)
- Passing more standard Scheme tests,
append
procedure implemented.
- File
primitive_builder.rb
: Added implementation for standard procedureappend
. - Class
LambdaRep
: represents a parse tree of a lambda expression.
- File
grammar.rb
: Changed a grammar rule for (begin ...) expression because R7RS was too restrictive compared to main implementations. - Class
SkmBuilder
several method updates (e.g.reduce_alt_definition
)
- Class
Environment
superseded by classSkmFrame
- Support for local definitions [initial]
- File
grammar.rb
Added one production rule for thirdbegin
form syntax. - Method
SkmBuilder#reduce_begin_cmd
added to implement semantic action for newbegin...
production rule. - File
README.md
Added a couple of links for additional Scheme resources.
- Method
SkmLambda#evaluate_defs
replaced by homonymous method inSkmProcedureExec
class.
- File
README.md
added new example with procedures holding each their local states.
- The nesting of a lambda expression nested in a let construct caused an aliasing of the bindings.
- Skeem now supports 'let*' local binding construct
- Skeem now supports 'let' local binding construct
- File
base.skm
implementation of list procedures:caar
,cadr
,cdar
,cddr
- File
interpreter_spec.rb
added spec examples to test the new procedures. - File
README.md
added allusion to new procedures?
- File
primitive_builder.rb
implementation of:equal?
,make-vector
,symbol->string
procedures.
- File
.travis.yml
Added newer Ruby versions and more environments in "Allowed failures" because of Bundler issue. - File
README.md
updated to reflect currently implemented features. - Class
SkmUndefined
uses now the Singleton pattern.
- File
skeem.gemspec
Make dependency on Bundler gem depends on the Ruby version. - Method
SkmElement#eqv?
was missing. Method is now implemented. - Class
PrimitiveProcedure
was unable to cope with procedures with a bounded range of arity.
- Fixes, added 'set-car!', 'set-cdr!' standard Scheme procedures.
- File
primitive_builder.rb
implementation of:set-car!
,set-cdr!
list procedures.
- Methods
SkmBuilder#reduce_quotation_short
,SkmBuilder#reduce_quotation
added optimization for quoted literal data.
- Version bumped because lists are re-implemented in a way to closer to historical Scheme/Lisp.
- A lot of internal refactoring after list re-implementation...
- File
primitive_builder.rb
implementation of:pair?
,car
,cdr
,cons
,list->vectors
list procedures. - File
primitive_builder.rb
implementation of:vector->list
vector procedures.
- Class
SkmList
is now deprecated and being replaced bySkmPair
nodes. - Class
SkmElementVisitor
supports new visit events:visit_empty_list
andvisit_pair
- Nasty bug fix: interpreter was'nt able to retrieve data argument deep in call stack.
- Method
Environment#inspect
- Method
SkmDefinition#call
now accepts variable references that refer to a lambda or a primitive procedure. - Method
SkmLambda#evaluate_sequence
failed when argument value came from a caller deep in call stack? - Added a specific test in
interpreter_spec.rb
- The interpreter failed with second-order lambdas (lambda expression that contains another lambda)
- Added a specific test in
interpreter_spec.rb
- Procedure
eqv?
- Procedure
assert
- Class
Runtime
, call stack added. - Class
ProcedureCall
, attributecall_site
added. It contains the location of the call (line and column)
- File
primitive_builder.rb
implementation of: not procedure removed,not
is now implemented inbase.skm
. - Method
Tokenizer#build_token
updated to remain compatible with new Rley (> 0.7.x))
- File
stoken.rb
: ClassSkmToken
is no more necessary.
Aliasing of procedures with 'set!' is supported.
- Procedures
string=?
,symbol=?
Many internal refactoring, augmented spec files base, initial quasiquotation implementation.
- File
primitive_builder.rb
implementation of standard:string->length
- File
datum_dsl.rb
to implement an internal DSL for building literal data elements. - Files
tokenizer.rb
,grammar.rb
,class SExprBuilder
Added support for quasiquotation: (quasiquote foo) or `foo and unquoting
- File
README.md
udpated to reflect currently implemented features.
- File
primitive_builder.rb
implementation of: standardor
,string->symbol
,number->string
,string-append
procedures.
- File
README.md
udpated to reflect currently implemented features.
- Method
Convertible#to_skm
Now converts String argument intoSkmString
and raises an exception when unable to convert.
- Class
SkmBuilder
added support for list datum. - File
primitive_builder.rb
implementation of: standardand
procedure.
- File
interpreter_spec.rb
Added test example of list quotation.
- Added support for alternative
define
syntax. - File
primitive_builder.rb
implementation of: standardvector-ref
procedure. - Added
SkmQuotation#inspect
,SkmVector#inspect
method
- File
README.md
added sub-section with links for Scheme language.
- Method
Convertible#to_skm
now returns a SkmElement-like object without attempting a convertion.
- Added support for quotation: (quote foo) or 'foo
- Added support for vectors #( 1 2 3 "foo")
- Added primitive procedures
vector?
,vector
,vector-length
- File
README.md
enhanced with detailed implementation status. - Class
PrimitiveBuilder
in addition to new Skeem procedures, the class was vastly refactored. - Class
Tokenizer
extended to cope with quotation and vectors.
Added primitive procedures list?
, null?
, length
- File
primitive_builder.rb
implementation of:list?
,null?
,length
procedures. - File
primitive_builder_spec.rb
spec examples for:list?
,null?
,length
procedures.
- Method
SkmLambda#bind_locals
Fix: a variadic procedure with no argument provided, should have empty list as actual argument. - File
interpreter_spec.rb
Added test case for callinglist
procedure without argument.
Reworked procedure argument-passing.
- Classes
SkmArity
,SkmFormals
implement the core argument counting checks.
- Class
PrimitiveProcedure
vastly reworked to support Scheme's argument passing convention. - Class
PrimitiveBuilder
primitive procedures now check the number of arguments. - Class
SkmLambda
vastly reworked to support Scheme's argument passing convention.
- Method
Tokenizer#skip_whitespaces
Fix: comment lines were ignored in line counting. - Method
Tokenizer#_next_token
Fix: mistake in regex for period (dot) recognition.
- Fix: now support calls of anonymous lambda procedures.
- Method
SkmProcedureCall#evaluate
Fix: no procedure name lookup for anonymous ones!
- Added built-in procedures
odd?
,even?
,square
, andfloor-remainder
(modulo
). - Supports procedures without argument.
- Implements second syntax form for variable definition.
- Fixed nasty bug when same variable name used in nested procedure calls.
- Method `Environment#depth to count the nesting levels
- File
primitive_builder.rb
implementation of:odd?
,even?
,square
,floor-remainder
,modulo
procedures. - File
grammar.rb
rule for second syntax form for variable definition. - File
grammar.rb
rule for calling procedures without argument.
- Method
SkmDefinition#evaluate
Infinite recursion when a variable, say x, referred to a variable with same name in outer scope.
Recursive functions are now supported.
Interpreter pre-loads a Scheme file with standard procedures (zero?, positive?, negative?, abs)
- File
base.skm
with standard Scheme procedureszero?
,positive?
,negative?
,abs
- Class
Interpreter#initialize
now execute a Scheme file containing a number of standard procedures. - File
README.md
Added third demo snippet showing example of recursive lambda function.
- Method
SkmLambda#bind_locals
now execute any procedure call in argument list before executing the lambda itself.
Added lambda
(anonymous function). This is an initial implementation that doesn't support recursion yet.
- Class
SkmLambda
for representing a specific definition.
- Class
Environment
. Now supports the nesting of environments. If an environment doesn't find a variable, then it forwards the serach to the outer environment. - File
grammar.rb
Added syntax rules for lambda expression. - Class
Runtime
added methodsnest
andunnest
that adds or removes an nested environment. - Class
SkmBuilder
. Added method to implement the semantic action forlambda
expressions. - Class
Tokenizer
Added keywordlambda
- File
README.md
Added demo snippet with example of lambda expression. - Files
*_spec.rb
Added more tests. Skeem passes the 100 'RSpec examples' mark.
Added primitive if
(conditional form)
- Class
SkmCondition
for representing a specific conditional.
- File
grammar.rb
Added syntax rules for conditional expression. - Class
SkmBuilder
. Added method to implement the semantic action forif
. - File
interpreter_spec.rb
added tests forif
. - File
README.md
Changed demo snippet with example of conditional expression.
Added primitive define
and variable reference
- Class
SkmDefinition
for representing a specific definition. - Class
SkmVariableReference
for representing a variable reference (i.e. retrieving its value) - Module
Convertible
implementing utility methods for converting "native" Ruby objects into their Skeem counterpart. - Class
SkmBuilder
. Added methods to implement the semantic actions fordefine
and variable reference. - File
interpreter_spec.rb
added tests fordefine
and variable reference.
- File
README.md
Changed demo snippet with example of variable definition and variable reference.
Added primitive procedures: =
, <
, >
, >=
, <=
- Class
PrimitiveBuilder
. Added methods to implement the comparison operators=
,<
,>
,>=
,<=
- File
interpreter_spec.rb
added tests for<
,>
,>=
,<=
Added primitive procedures: 'boolean?', 'string?', 'symbol?', and 'not'
- Class
PrimitiveBuilder
. Added methods to implement the predicates 'boolean?', 'string?', 'symbol?', and 'not' - File
interpreter_spec.rb
added tests for 'boolean?', 'string?', 'symbol?'
- Class hierarchy
SExprElement
. PrefixSExpr
in class names changed into 'Skm'
- Method
PrimitiveBuilder#create_minus
When '-' has only one argument then it means sign change.
Added primitive procedures: 'number?', 'real?', 'integer?'.
- Class
PrimitiveBuilder
. Added methods to implement the predicates number?, real?, integer?
- Class hierarchy
SExprElement
. PrefixSExpr
in class names changed into 'Skm'
Added primitive operators: '-', '*', '/' operators.
- Class
PrimitiveBuilder
. Added methods to implement the arithmetic operators - (subtraction), * (product), / (division) - Class
SExprList
. Class refactoring - Class
PrimitiveFunc
Internal representation of primitive functions.
- File
interpreter_spec.rb
Added tests for arithmetic expressions. - File
README.md
Changed demo snippet with example of arithmetic expression.
Proof of concept of a primitive function: '+' operator. Demo works but code needs some polishing and testing.
- Class
Environment
. Holds a mapping between symbol names and their associated value. - Class
PrimitiveBuilder
. Builder class that seeds the default environment with primitive functions (now, limited to '+') - Class
PrimitiveFunc
Internal representation of primitive functions. - Class
Runtime
. Holds all context data of the Skeem interpreter. - Methods
SExprBuilder#reduce_proc_call
,SExprBuilder#reduce_multiple_operands
, SExprBuilder#reduce_last_operand
- Class
Tokenize
Added support for Scheme semi-colon comments. - File
grammar.rb
Added syntax rules for procedure calling. - File
s_expr_nodes.rb
Class and code refactoring. - File
README.md
Changed demo snippet with example plus operator.
Initial (minimalistic) interpreter implementation.
- Class
Interpreter
. - Spec file
interpreter_spec.rb
initial test suite for the interpreter.
- File
README.md
Udpates, sample code snippet added, link to other similar projectheist
. - Method
SExprTerminalNode#interpret
returns self instead of thevalue
attribute.
Parser now generates correct parse trees for expressions consisting of a single literal.
- Class
Tokenizer
The regexp for real numbers was too restricitive: it didn't recognize real numbers without fractional part.
- File
s_expr_nodes.rb
with initial implementation ofSExprTerminalNode
classes.
- Class
Tokenizer
converts literal into Ruby "native" objects
- File
grammar.rb
with minimalist grammar. - Initial
Parser
class commit
- Class
Tokenizer
recognizesdefine
keyword - Spec file
Tokenizer_spec.rb
expanded with more tests.
- Class
Tokenizer
improved, does recognize delimiters, booleans, integers, real numbers, strings, and identifiers. - Spec file
Tokenizer_spec.rb
expanded with more tests.
- Initial
Tokenizer
class commit
- Initial Github commit