ti-lisp's People
Forkers
jayzernti-lisp's Issues
Scanner: comments without line breaks
# comments
Without a new line after the commented content, Fatal error: exception Failure("lexing: empty token")
would be raised.
# comments
This works well.
[discussion] on using templates in the implementation of operators
If we can do generic programming in tilisp.cpp to support operators, the codes would be cleaner, but I'm supposing it would bring risks of other troubles.
[semant] test for multiple levels of defines
[testing] macro
After testing framwork is implemented, write test cases for the macro pass.
[testing] semant
After testing framwork is implemented, write test cases for the semantic analysis pass.
[testing] test cases for executable
Add source file and expected output to tests
;
add a tuple to the list in the top of testing.ml
.
built-in data structure and operation: `cons`, `cdr`, `car`, `list`.
function list
can be expanded as nested cons
.
[testing] parsing
After testing framwork is implemented, write test cases for the parsing pass.
Support of "float" type.
- Scanner & parser
- AST & SAST
- IR generation
- built-in functions
IR generation support of recursive function calls
Currently, recursive function fib.tisp raise "Can't find variable for access link" message.
testing framework
After program arguments is implemented, we could build a very simple unit testing framework using ocaml.
It could be like for one test case, we have test.args
specifying switches passed to the tilisp executable, test.input
as input file and test.output
as expected output. The test framework finds all such files in tests
directory and execute them.
[general] program arguments
The executable tilisp.native
should accept a file name for source code to compile, and support optional switches for printing AST, AST after macro expansion, SAST.
[testing] cases for logical and arithmetic operators
Use executable to test.
irgen test
As irgen is being implemented, we could begin writing some tests for the already implemented features. The test program should test the output of the compiled source program.
Error message when executing "make all"
SANITIZE: a total of 3 files that should probably not be in your source tree
has been found. A script shell file
"/mnt/e/Local-Git-Repo/ti-lisp/_build/sanitize.sh" is being created. Check
this script and run it to remove unwanted files or use other options (such
as defining hygiene exceptions or using the -no-hygiene option).
IMPORTANT: I cannot work with leftover compiled files.
ERROR: Leftover object files:
File tilisp.o in . has suffix .o
File helper.o in . has suffix .o
File libtilisp.a in . has suffix .a
Exiting due to hygiene violations.
Compilation unsuccessful after building 0 targets (0 cached) in 00:00:00.
make: *** [Makefile:12: testing.native] Error 1
Can be resolved after "make clean"
[irgen] better display
(support char, string, int, boolean for now)
[report] testing framework
Describe the automatic testing framework we are using.
[semant] check duplications in lambda arguments
compiler should raise error for code (lambda (a b b) ...)
[testing] framework for executable
read the output of "a.out" instead of "tilisp.native" for testcases on "-e".
[report] complete language tutorial (section 2)
This would be a good reference.
IR Generating
Plan:
- variable type,
define
andset!
- most basic
display
builtin function (displaying an integer) -
if
- lambda
- other control structures
- other types of literals
- allocate variables on heap (now it's possible to access invalid variables on stack through closure)
- garbage collection
[test] testcases for cons operation
built-in arithmetic operations
[built-in] logical operations and boolean values
Compile the source code into executable
Right now we are able to print the generated IR directly to stdout like microc does (The IR code could be interpreted by lli
from LLVM toolchain). I think it should be possible for us to compile source code directly into a binary executable. To make testing easier, the tilisp
entrypoint could also have some parameters to run the executable after compiling successfully
[report] report structure and format
Decide on the format (markdown or google doc).
Outline: https://verigu.github.io/4115Spring2020/assignments/project.html
Sample: https://github.com/al3623/rippl/blob/master/reports/Rippl_Final_Report.pdf
[test] test predicate builtin functions
integer?
function?
[irgen] display type_cons
[semant] check duplication in let bindings
compiler should raise error for code (let ((a 1) (b 1) (a 2)) ...)
type predicate builtin functions
integer?
char?
string?
cons?
bool?
function?
symbol?
nil?
(nil
values are essentiallynullptr
)
Decision on support for 'float' float.
Do we have plan to support "float"?
[report] major components & interfaces (section 3)
Components description can be referred to as in the documents (docs*.md).
[semant] nested inner defines should only be allowed at beginning of function
This is valid in scheme:
(define (hello)
(define a 1)
(define b 2)
(display a b))
while this is not:
(define (hello)
(define a 1)
(display a)
(define b 2)
(display b))
A semantic checking rule should be implemented to enforce this.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.