-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ab25cq
committed
Jul 3, 2018
1 parent
6b2d933
commit 54651cf
Showing
44 changed files
with
913 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include "SystemCalls.clcl" | ||
include "CLibrary.clcl" | ||
|
||
class System | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include "SystemCalls.clcl" | ||
|
||
class System | ||
{ | ||
def strcmp(x:pointer, y:pointer): int from libc.so.6 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ExtensionClassTest.main(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
class ExtensionClassTest | ||
{ | ||
ABC: static int from ExtensionTest.h | ||
|
||
def getValue(x:int, y:int): int from libExtensionTest.so; | ||
def getValue2(x:long, y:long): long from libExtensionTest.so; | ||
def getStr(x:pointer, y:pointer): pointer@alloc from libExtensionTest.so; | ||
|
||
def main():static { | ||
Clover.test("Extension Test1", getValue(1, 2) == 3); | ||
Clover.test("Extension Test2", getValue2(1l, 2l) == 3l); | ||
|
||
str := getStr(b"ABC", b"DEF"); | ||
|
||
Clover.test("Extension Test3", strcmp(str, b"ABCDEF") == 0); | ||
|
||
free(str); | ||
|
||
Clover.test("Extension Test4", ABC == 123); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
int getValue(int x, int y) | ||
{ | ||
return x + y; | ||
} | ||
|
||
long getValue2(long x, long y) | ||
{ | ||
return x + y; | ||
} | ||
|
||
char* getStr(char* x, char* y) | ||
{ | ||
size_t len = strlen(x) + strlen(y) + 1; | ||
|
||
char* result = calloc(1, len); | ||
|
||
strcpy(result, x); | ||
strcat(result, y); | ||
|
||
return result; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef EXTENSION_TEST_H | ||
#define EXTENSION_TEST_H | ||
|
||
#define ABC 123 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# clover2 computer language | ||
|
||
version 4.2.7 | ||
version 4.5.0 | ||
|
||
サポートしている機能 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class PointerTest3 | ||
{ | ||
def main(): static { | ||
b:pointer = b"ABCDEF"; | ||
|
||
Clover.test("Pointer Test3", b->byte == 'A' && (b+1)->byte == 'B' && (b+2)->byte == 'C' && (b+3)->byte =='D'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ Section: unknown | |
Priority: optional | ||
Maintainer: Daisuke Minato <[email protected]> | ||
Build-Depends: debhelper (>= 9), autotools-dev, libpcre3-dev, libreadline-dev, clang, libreadline7 | ||
Standards-Version: 4.2.7 | ||
Standards-Version: 4.5.0 | ||
Homepage: https://github.com/ab25cq/clover2/wiki | ||
Vcs-Git: https://github.com/ab25cq/clover2.git | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
clover2-dbgsym_4.2.7-1_amd64.deb debug extra | ||
clover2_4.2.7-1_amd64.buildinfo unknown optional | ||
clover2_4.2.7-1_amd64.deb unknown optional | ||
clover2-dbgsym_4.5.0-1_amd64.deb debug extra | ||
clover2_4.5.0-1_amd64.buildinfo unknown optional | ||
clover2_4.5.0-1_amd64.deb unknown optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#!/bin/bash | ||
|
||
if test -e ../clover2_4.2.7-1_i386.deb | ||
if test -e ../clover2_4.5.0-1_i386.deb | ||
then | ||
if dpkg -l | egrep ^clover2 | ||
then | ||
sudo apt-get remove clover2 | ||
fi | ||
|
||
sudo dpkg -i ../clover2_4.2.7-1_i386.deb | ||
sudo dpkg -i ../clover2_4.5.0-1_i386.deb | ||
fi | ||
|
||
if test -e ../clover2_4.2.7-1_amd64.deb | ||
if test -e ../clover2_4.5.0-1_amd64.deb | ||
then | ||
if dpkg -l | egrep ^clover2 | ||
then | ||
sudo apt-get remove clover2 | ||
fi | ||
|
||
sudo dpkg -i ../clover2_4.2.7-1_amd64.deb | ||
sudo dpkg -i ../clover2_4.5.0-1_amd64.deb | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,6 +160,8 @@ ubuntu, Debianでは | |
|
||
が必要です。 | ||
|
||
後追加でlibffcall1-devが必要となっています。 | ||
|
||
## コンパイル | ||
|
||
まずはソースコードを入手してください。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.