deeplang-org / deeplang-type-system Goto Github PK
View Code? Open in Web Editor NEWDeepLang type system based on Ocaml
DeepLang type system based on Ocaml
This issue is a tracker for the new AST in new-AST-dev
branch.
Definition of the AST is located in parser/ParseTree.ml
,
Module documentation generated by OCaml is located in doc/internal/deeplang@.../DeeplangType/
.
To view the generated HTML doc, you can paste the URL athttp://htmlpreview.github.io
,
or clone the repo to your local machine and view it with your browser.
Currently the AST definition is not yet complete.
There are several topics that require further discussion.
You can find them in the generated HTML doc, labeled DISCUSSION WANTED.
If you have any idea on any of the topics listed, or have some other questions on the AST's definition,
you can post them in this issue for discussion.
尝试用手写deeplang的parser满足:
My bnfc versio is 2.8.1
> ocaml --version
The OCaml toplevel, version 4.05.0
Cannot generate Testdeeplang binary.
Use Bytes.set instead.
File "Testdeeplang.ml", line 6, characters 4-21:
Error: This function has type
(Lexing.lexbuf -> Pardeeplang.token) ->
Lexing.lexbuf -> Absdeeplang.code
It is applied to too many arguments; maybe you forgot a `;'.
make: *** [Makefile:4\uff1aall] \u9519\u8bef 2
make: \u79bb\u5f00\u76ee\u5f55\u201c/home/pi/github/deeplang-type-system/output\u201d
syntax -> ANF IR ,owner yang / chen
ANF IR -> wasm ,owner chen / qin
ANF demo: https://github.com/deeplang-org/borrow-checker-demo
write the bnf for deeplang, just to be familiar with the language, and prepare for lexer and parser.
I found it in the README. Is it related to deeplang?
fun main(x: Char) {
let x : I32 = 1;
let a: I32 = 2;
let b: F32 = 3.0;
}
可以parse,但是
fun main(x: Char) {
let x : I32;
let a: I32 = 2;
let b: F32 = 3.0;
}
会parse报错:
syntax error: Expecting pattern
in [file "../examples/basicMain.dp", row 3, col 13 to row 3, col 14]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.