3/10
This commit is contained in:
parent
0d666fb853
commit
545584660f
8
Makefile
8
Makefile
@ -1,9 +1,11 @@
|
|||||||
all:
|
all:
|
||||||
flex compiler/hell.l
|
flex compiler/hell.l
|
||||||
gcc lex.yy.c -lfl -o hellp
|
gcc lex.yy.c -lfl -o compiler/hellp
|
||||||
install:
|
install:
|
||||||
install hellp /usr/bin
|
install compiler/hellp /usr/bin
|
||||||
|
install compiler/hellc /usr/bin
|
||||||
clean:
|
clean:
|
||||||
rm lex.yy.c hellp
|
rm /compiler/lex.yy.c /compiler/hellp
|
||||||
uninstall:
|
uninstall:
|
||||||
rm /usr/bin/hellp
|
rm /usr/bin/hellp
|
||||||
|
rm /usr/bin/hellc
|
||||||
|
@ -7,6 +7,15 @@ local { printf("static"); }
|
|||||||
|
|
||||||
"str" { printf("char"); }
|
"str" { printf("char"); }
|
||||||
|
|
||||||
|
/*** Data types ***/
|
||||||
|
|
||||||
|
"integer" { printf("int"); }
|
||||||
|
"decimal" { printf("float"); }
|
||||||
|
"character" { printf("char"); }
|
||||||
|
"large_decimal" { printf("double"); }
|
||||||
|
"CLion" { printf("void"); }
|
||||||
|
|
||||||
|
|
||||||
/*** Library declarations ***/
|
/*** Library declarations ***/
|
||||||
|
|
||||||
/* ioutils */
|
/* ioutils */
|
||||||
@ -15,6 +24,10 @@ local { printf("static"); }
|
|||||||
"hell:std.ioutils.writeln" { printf("printf"); }
|
"hell:std.ioutils.writeln" { printf("printf"); }
|
||||||
"hell:std.ioutils.readln" { printf("scanf"); }
|
"hell:std.ioutils.readln" { printf("scanf"); }
|
||||||
|
|
||||||
|
/* procutils */
|
||||||
|
|
||||||
|
"hell:std.unix" { printf("<unistd.h>"); }
|
||||||
|
|
||||||
/* keygen */
|
/* keygen */
|
||||||
|
|
||||||
"hell:std.keygen" { printf("<hellkeygen.h>"); }
|
"hell:std.keygen" { printf("<hellkeygen.h>"); }
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
//
|
||||||
|
// example.hell
|
||||||
|
//
|
||||||
|
|
||||||
import hell:std.ioutils
|
import hell:std.ioutils
|
||||||
|
|
||||||
func
|
func
|
||||||
|
Loading…
Reference in New Issue
Block a user