-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optscript is an implementation of postscript alike general purpose language. It will be linked to ctags for extending optlib parsers in the future. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
44 changed files
with
5,526 additions
and
22 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 |
---|---|---|
|
@@ -53,6 +53,7 @@ mini-geany | |
mini-geany.exe | ||
missing | ||
mkinstalldirs | ||
optscript | ||
perf.data* | ||
readtags | ||
readtags.exe | ||
|
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,18 @@ | ||
8 | ||
(3 5 add) | ||
33 | ||
(99 3 idiv) | ||
4 | ||
(99 5 mod) | ||
30 | ||
(3 10 mul) | ||
-12 | ||
(8 20 sub) | ||
3 | ||
(-3 neg) | ||
-3 | ||
(3 neg) | ||
3 | ||
(-3 abs) | ||
3 | ||
(3 abs) |
Binary file not shown.
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 @@ | ||
[null null null null null] | ||
[1 2 3] | ||
3 | ||
2 | ||
1 | ||
/a | ||
[1 2 3] | ||
/a |
Binary file not shown.
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,159 @@ | ||
3 | ||
(abc) | ||
2 | ||
-dict:2- | ||
3 | ||
[true false null] | ||
(abc) | ||
true | ||
true | ||
false | ||
[true false null] | ||
(---------------- get array ----------------) | ||
(a) | ||
(a ->) | ||
(b) | ||
(b ->) | ||
(c) | ||
(c ->) | ||
true | ||
3 | ||
[(a) (b) (c)] | ||
(true ->) | ||
(---------------- get dict ----------------) | ||
(a) | ||
(a ->) | ||
(b) | ||
(b ->) | ||
(c) | ||
(c ->) | ||
true | ||
false | ||
-dict:3- | ||
(true ->) | ||
(---------------- get str ----------------) | ||
97 | ||
(97 ->) | ||
98 | ||
(98 ->) | ||
99 | ||
(99 ->) | ||
true | ||
3 | ||
(abc) | ||
(true ->) | ||
(---------------- forall array ----------------) | ||
6 | ||
(6 -> ) | ||
(---------------- forall dict values ----------------) | ||
6 | ||
(6 -> ) | ||
(---------------- forall dict keys ----------------) | ||
false | ||
(false ->) | ||
(---------------- forall string ----------------) | ||
294 | ||
(294 ->) | ||
(---------------- put string ----------------) | ||
(abc) | ||
(\(abc\) ->) | ||
(abcd) | ||
(\(abcd\) ->) | ||
(abc e) | ||
(\(abc e\) ->) | ||
(---------------- put array ----------------) | ||
[/a /b /c] | ||
([/a /b /c] ->) | ||
[/a /b /c /d] | ||
([/a /b /c /d] ->) | ||
[/a /b /c null /e] | ||
([/a /b /c null /e] ->) | ||
(---------------- put dict ----------------) | ||
1 | ||
(1 ->) | ||
(---------------- putinterval string ----------------) | ||
(xyzdef) | ||
(\(xyzdef\) ->) | ||
(xyz123) | ||
(\(xyz123\) ->) | ||
(xyz1234) | ||
(\(xyz1234\) ->) | ||
(abcdex) | ||
(\(abcdex\) ->) | ||
(abcdefx) | ||
(\(abcdefx\) ->) | ||
(abcdxf) | ||
(\(abcdxf\) ->) | ||
(abcdxyz) | ||
(\(abcdxyz\) ->) | ||
(---------------- putinterval array ----------------) | ||
[/x /b /c] | ||
([/x /b /c] ->) | ||
[/a /x /c] | ||
([/a /x /c] ->) | ||
[/a /b /x] | ||
([/a /b /x] ->) | ||
[/a /b /c /x] | ||
([/a /b /c /x] ->) | ||
[/a /b /c /x /y] | ||
([/a /b /c /x /y] ->) | ||
[/a /b /x /y] | ||
([/a /b /x /y] ->) | ||
[/a /x /y] | ||
([/a /x /y] ->) | ||
[/x /y /c] | ||
([/x /y /c] ->) | ||
[/x /y /z] | ||
([/x /y /z] ->) | ||
[/a /x /y /z] | ||
([/a /x /y /z] ->) | ||
[/a /b /x /y /z] | ||
([/a /b /x /y /z] ->) | ||
[/a /b /c /x /y /z] | ||
([/a /b /c /x /y /z] ->) | ||
[/a /b /c /x /y /z /1] | ||
([/a /b /c /x /y /z /1] ->) | ||
[/a /b /x /y /z /1] | ||
([/a /b /x /y /z /1] ->) | ||
[/a /x /y /z /1] | ||
([/a /x /y /z /1] ->) | ||
[/x /y /z /1] | ||
([/x /y /z /1] ->) | ||
(---------------- _copyinterval string ----------------) | ||
() | ||
(\(\) ->) | ||
(1) | ||
(\(1\) ->) | ||
(a) | ||
(\(a\) ->) | ||
(1a) | ||
(\(1a\) ->) | ||
(ab) | ||
(\(ab\) ->) | ||
(bc) | ||
(\(bc\) ->) | ||
(cde) | ||
(\(cde\) ->) | ||
(e) | ||
(\(e\) ->) | ||
() | ||
(\(\) ->) | ||
(---------------- _copyinterval array ----------------) | ||
[] | ||
([] ->) | ||
[1] | ||
([1] ->) | ||
[/a] | ||
([/a] ->) | ||
[1 /a] | ||
([1 /a] ->) | ||
[/a /b] | ||
([ /a /b ] ->) | ||
[/b /c] | ||
([/b /c] ->) | ||
[/c /d /e] | ||
([/c /d /e] ->) | ||
[/e] | ||
([/e] ->) | ||
[] | ||
([] ->) |
Binary file not shown.
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,36 @@ | ||
5 | ||
12 | ||
12 | ||
(string) | ||
(executed if block) | ||
(executed if block) | ||
(executed else block) | ||
2 | ||
1 | ||
0 | ||
4 | ||
3 | ||
2 | ||
1 | ||
0 | ||
[(jump here as expected) true /undefined] | ||
[(jump here as expected) false null] | ||
5 | ||
-1 | ||
-2 | ||
-3 | ||
-4 | ||
-5 | ||
1 | ||
3 | ||
5 | ||
7 | ||
9 | ||
(---------------- countexecstack ----------------) | ||
3 | ||
(---------------- execstack ----------------) | ||
[] | ||
(---------------- exception handling ----------------) | ||
(OK: this code just after loop should be executed) | ||
(OK: 'exit' should not be caught here.) | ||
(OK: 'stop' should be caught here.) |
Binary file not shown.
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 @@ | ||
3 | ||
true | ||
false | ||
true | ||
-dict:1- | ||
false | ||
3 | ||
2 | ||
1 | ||
(a) | ||
false | ||
2 | ||
3 | ||
2 | ||
(---- dictstack & cleardictstack ----) | ||
3 | ||
4 | ||
2 | ||
(---- store ----) | ||
1 | ||
-dict:1- | ||
null |
Binary file not shown.
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,7 @@ | ||
Error: /undefined in a | ||
Operand stack: | ||
top| |bottom | ||
Execution stack: | ||
top| a {a} --if-- {true {a} if} --if-- |bottom | ||
Dictionary stack: | ||
top| -dict:1- -dict:87- |bottom |
Binary file not shown.
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,7 @@ | ||
Error: /undefined in a | ||
Operand stack: | ||
top| |bottom | ||
Execution stack: | ||
top| a {a} --if-- |bottom | ||
Dictionary stack: | ||
top| -dict:1- -dict:87- |bottom |
Binary file not shown.
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 @@ | ||
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,5 @@ | ||
(--------------- bind ---------------) | ||
{--add-- {--add--}} | ||
({--add-- {--add--}} ->) | ||
1 | ||
{--[-- 1 1 --add-- --]--} |
Binary file not shown.
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,14 @@ | ||
false | ||
true | ||
null | ||
-dict:1- | ||
[{/add} {add}] | ||
{/add} | ||
{add} | ||
{/a /b /c} | ||
[/a /b /c] | ||
[1 2 3] | ||
-mark- | ||
(abc) | ||
/a | ||
1 |
Binary file not shown.
Oops, something went wrong.