Commit Graph

160 Commits

Author SHA1 Message Date
d60e2dfb38 Preserving sequences 2022-06-20 06:20:24 +02:00
ea1dddaf26 Precedense aware parser 2022-06-20 05:45:28 +02:00
854b72cf35 Unit testing builtins 2022-06-19 17:44:42 +02:00
29f9a4467c Skipping tests that require not implemented functionality 2022-06-19 16:15:41 +02:00
2dd97709a0 Better unit test response messages when unrecoverable state reached
Instead of `exit` we throw `std::runtime_error` in Debug mode assertions
and unreachable functions, to have better response from unit test runner.
2022-06-19 16:09:39 +02:00
ed3b2006e9 Symbol quoting and user defined incoming MIDI message processing 2022-06-19 15:45:14 +02:00
387835a155 Number -> Note translation for Note{on,off} incoming messages 2022-06-19 00:40:04 +02:00
7a3d211d09 Infrastructure for incoming MIDI messages ready 2022-06-19 00:27:02 +02:00
bf3f388acb User-defined input and port numbers of ALSA MIDI connection 2022-06-18 00:28:48 +02:00
09f736bf83 Updated to newer version of lib/midi 2022-06-18 00:13:21 +02:00
16d1a5e0d6 Introduced first iteration of typechecking errors 2022-06-14 13:24:15 +02:00
910792e383 rotate function 2022-06-14 11:39:04 +02:00
55554606a1 partition function 2022-06-14 11:21:37 +02:00
5ab750b93b Array modification functions 2022-06-14 10:30:52 +02:00
7d0f732a57 GNU Readline replace with bestline 2022-06-11 19:57:56 +02:00
e6aed50fe9 Support for midi program change message 2022-06-11 19:00:36 +02:00
b930ef4e6e Index operator binds more tightly then function call 2022-06-11 17:55:52 +02:00
b7d879bf70 Relevant code printing when error reporting 2022-06-09 01:48:02 +02:00
d16f6de53c Compound assigments 2022-06-06 04:22:59 +02:00
91eaa0ceea Assigments, array updating function. Test runner update 2022-06-06 04:03:40 +02:00
118837f6d8 Fixed multiline comment bug
We forgot to skip '-' when parsing multiline comment begining
2022-06-06 03:08:34 +02:00
e528fd9e83 In-language comparison operators made holistic 2022-06-06 00:20:25 +02:00
7c5f3e2170 Small refactoring & more testing 2022-06-05 23:54:42 +02:00
c1e1acd6e2 Removing test from the past 2022-06-03 00:58:53 +02:00
4d88ca7e40 Logical short-circuting operators 2022-06-03 00:52:55 +02:00
946d4b96b1 Permutations! 2022-06-02 23:17:02 +02:00
45a3710626 function implementation 2022-06-02 21:50:44 +02:00
1e1d9b0cb6 Error reporting of use of non-symbols in indentifier context 2022-06-02 21:39:22 +02:00
0a00080d2d Implemented many missing test cases 2022-05-31 13:43:14 +02:00
31dfcc37ca Note on & note off explicit midi calls 2022-05-30 15:35:37 +02:00
43d7aeac1d New intrinsic implementation primitives 2022-05-30 15:10:03 +02:00
ada8e17d1b Added documentation mostly for error reporting structures 2022-05-30 00:18:48 +02:00
2eee11e476 Removed unused errors 2022-05-30 00:02:50 +02:00
25e730c8d3 Missing semicolon error! 2022-05-29 23:54:05 +02:00
016e48570e Optionally colorful errors part 2; repl dont exit on errors 2022-05-29 23:34:20 +02:00
3c4da4a226 Optionally colorful errors 2022-05-29 23:29:37 +02:00
96378a16c1 Not callable testing restored 2022-05-29 22:53:09 +02:00
9c4b57f217 Human readable token type names for error reporting 2022-05-29 22:46:20 +02:00
605533de32 Error reporting system improvement 2022-05-29 22:39:46 +02:00
4985843f8f More tests for note resolution 2022-05-29 03:01:17 +02:00
a665d95692 Extended chord literal syntax with flats 2022-05-29 02:57:36 +02:00
dc1322e4ea Major documentation of source code improvement 2022-05-29 02:28:51 +02:00
3caa5b80cb Ode To Joy, par function, context management 2022-05-25 17:03:46 +02:00
7cc61e30e4 REPL 2022-05-25 15:53:09 +02:00
ad79c17551 removed tests that ware testing old chord literals 2022-05-25 04:41:40 +02:00
741eb7f576 Result of evaluation is only printed when it's not nil 2022-05-25 04:36:16 +02:00
70e1431f05 Begining of support of array programming 2022-05-25 04:30:24 +02:00
4421acebd6 Halftones moving operator 2022-05-25 03:14:08 +02:00
611007a888 chord function 2022-05-25 02:13:35 +02:00
80bc4c039c Chords! 2022-05-25 00:08:48 +02:00
6611512b1f Working arrays, flat function 2022-05-24 19:09:37 +02:00
64417bf187 changed shape of Value constructors; added Array type 2022-05-24 17:39:07 +02:00
d549d23f0a Overloadable index operation 2022-05-24 16:38:18 +02:00
fd6009bb02 Euterpea like octave and duration setting 2022-05-24 15:45:31 +02:00
fe2cd9f1ef Euterpea like duration notation. Cheatsheet 2022-05-24 15:34:38 +02:00
1c6db5e7b7 Removed say from default builtins, moved to src/main.cc
The reason is that `say` requires text output to work, which is platform
specific. Interpreter should only register platform independent
functions like operations on arrays or math library
2022-05-24 03:48:10 +02:00
2c19db7354 Playing MIDI! 2022-05-24 03:35:15 +02:00
ba463139d6 Note duration calculation in current BPM context 2022-05-24 02:58:15 +02:00
2e2c34ce21 Note parsing & printing 2022-05-24 01:58:17 +02:00
142680ab77 Working note resolution 2022-05-24 01:40:16 +02:00
7d2ba379f7 Infrastructure for note parsing 2022-05-24 00:48:15 +02:00
8853451cb5 Added Midi dependency 2022-05-23 17:27:06 +02:00
f28cb10669 Block indexing and len builtin 2022-05-22 16:43:36 +02:00
bde30f5d99 Separated Musique functions and C++ intrinsics; blocks as delayed computations 2022-05-22 05:29:46 +02:00
de1ed62f6b Overloaded operators 2022-05-22 04:58:45 +02:00
5b3cfca2a8 More testing & keywords 2022-05-22 04:31:31 +02:00
c1493a75c2 Rewritten previous enviroment tests to new implementation 2022-05-22 03:44:15 +02:00
6bc2a1cd38 Context aware clojures
Moved from dynamic scoping to static scoping.
2022-05-22 03:44:15 +02:00
8ac9fc5929 Explicit test for bug that caused all this trouble 2022-05-22 03:44:14 +02:00
b9d87e1456 New environment implementation
It's a failure of locating precise source of the bug that would cause `var x =
[i|i] 0` to segfault. New implementation DOES NOT have this bug.
2022-05-22 03:44:10 +02:00
d542bbe696 Small refactoring 2022-05-21 23:12:50 +02:00
881b90506b Lambdas! 2022-05-17 16:10:56 +02:00
8025e9bd0f Separated blocks from lambdas 2022-05-17 14:09:40 +02:00
52ef323284 Colorless when NO_COLOR env variable exists
In accordance to https://no-color.org/ standard
2022-05-17 02:56:28 +02:00
d1d3421376 Removed test that are expecting wrong results 2022-05-17 02:55:09 +02:00
e7cb2de198 Evaluation support variable resolution 2022-05-17 02:49:21 +02:00
5d51d1672f Scoped variables, single namespace variables and functions 2022-05-17 02:35:51 +02:00
0f9c46dffb Parsing variable declarations 2022-05-16 16:58:31 +02:00
0b9e7e8f4a Better operator resolution mechanism 2022-05-16 15:51:38 +02:00
ccd2166231 Interpreter started! 2022-05-16 02:18:53 +02:00
14ea494686 Number parsing 2022-05-16 00:06:27 +02:00
2385e0e28c Ported Number class from pi/demo-2022-03-09 2022-05-15 23:03:09 +02:00
926a68cb84 Block parameters accepts separators; block testing 2022-05-15 22:22:26 +02:00
5bfec0e77a Block expressions 2022-05-10 16:49:36 +02:00
c5260df41c Expression sequencing 2022-05-10 16:03:30 +02:00
b4cd87eea1 Removed support for kebab-case
In live coding enviroment support for `n-1` beeing the same as `n - 1` is more
important then kebab case names
2022-05-10 15:27:06 +02:00
555a35ecc0 Function calls 2022-05-10 15:25:17 +02:00
a25719c987 Paren some expressions mate 2022-05-10 14:20:23 +02:00
f17f3dc49f Binary operator's parsing 2022-05-09 19:42:02 +02:00
9fd70386c5 Doxygen & Sphinx documentation tooling
This is far from real documentation both in structure and contents -
it's only a start, from which we can expand.
2022-05-08 18:02:23 +02:00
4a5c53240c Result cannot be discarded from now 2022-05-08 15:57:31 +02:00
35a8345bc5 Better main, refactoring of error system and Result type 2022-05-08 00:03:22 +02:00
31262e74a0 Parser started: basic literal parsing
Mostly this commit implements structure to implement parsing, not actual
parsing itself
2022-05-07 20:52:09 +02:00
108b7f1fee Moved implementation from header 2022-05-07 18:39:29 +02:00
03d02d608c Additional unicode tests
Coverage report is addicting
2022-05-07 18:24:37 +02:00
df1f90d827 Added expression separator tokenization
Closes 
2022-05-07 18:20:22 +02:00
0eeb21c885 Comments 2022-05-02 21:23:01 +02:00
8127bcfe89 Unicode letters support 2022-05-02 20:45:06 +02:00
22eb0684c2 Solved almost all problems with lexing
The remaining one is better unicode support
2022-05-02 20:06:40 +02:00
e32710da85 Defined missing cases for lexer 2022-05-02 19:48:14 +02:00