It's a script language. I made it for quick developing.
It's in developing stage.
- Weak typing, interpreted script language.
- Easy rules.
- Bridge other languages library.
- The last user have power to change the library's behavior.
Noprivatekeyword, field and variable are public.
Editor
Use Atom as editor.
langX-atom plugin, it's used for syntax highlighting, and it works in progress. And it do not support auto-complete.
Document
// a.lx
// this is the comment.
// this is the function.
funa => {
a = 1 ;
funb();
// build-in function.
println("funa" + a);
}
funb => {
println("funb: " + a);
a = 101 ;
}
// call function
funa();
// b.lx
// declare class
Student {
// class member
name;
age = 20 ;
// class function
a => { print("hello,a!\n");}
printInfo => (a3){ print("name: " + name + "\n"); print("age: " + age + "\n" ); print("a3: " + a3 + "\n");}
}
// new a object
s2 = new Student();
s1 = s2;
// set class prop
s1.age = 10 ;
s1.name = "Mr.Ming";
b = s2.age;
c = s2.name;
/*print("b: " + b + "\n");
//print("c: " + c + "\n"); */
s1.a();
s1.printInfo("ahahahah~");
https://github.com/Aincvy/langX-atom#screenshot
3rd- Simple notepad++ config files.
cmakecmakesearch files. (**.cmake*)
docs- Document. (English and Chinese.)
extern- Lex and yacc files.
- Lex and yacc generated files.
include- Headers.
source- Sources.
lib- Extra libraries files.
- This will be deleted.
mod- Nothing
modProjects- langX mods
- core/mysql/python-bridge/redis/...
rtlib- Runtime library. (WIP)
- May all write by langX.
scripts- Test scripts.
- Example scripts.
notImplementation- Just ideas.
-
Please read section
Dependentfirst. -
Install
flex,bison,log4cpp.- Mac
brew install flexbrew install bisonbrew install log4cpp
- Debian
- Todo.
- Centos
yum install flex-devel bison-devel- Download and compile log4cpp.
- Mac
-
Install
cmake. -
mkdir build && cd build cmake .. make sudo make install
-
Now, the simplest program is installed, you can use
langX --versionto test it. -
You can try to compile mods now.
- flex
- yacc(bison)
- log4cpp
- Nothing
- mysql-devel (mysql-connector-c)
- python-devel
- hiredis
- zlib
- cjson
PR and Issue is welcome!