-
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.
Signed-off-by: Dmitry Ponyatov <dponyatov@gmail.com>
- Loading branch information
Showing
123 changed files
with
1,493 additions
and
163 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 |
---|---|---|
|
@@ -11,3 +11,4 @@ | |
/build | ||
/captures | ||
.externalNativeBuild | ||
app/src/main/java/io/github/ponyatov/metal/FORTH.java |
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,35 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
//import java.text.ParseException; | ||
|
||
%%{ | ||
machine lexer; | ||
|
||
comment = ( "#" [^\n]* ) >{ts=p;} @{EMIT(new Comment(new String(data,ts,p)));} ; | ||
|
||
main := ( | ||
comment | ||
# | any @{EMIT(new Symbol(String.valueOf(data[p])));} | ||
)*; | ||
}%% | ||
|
||
public class FORTH { | ||
|
||
static void EMIT(Frame c) { MainActivity.tasklist.append(c.dump()); } | ||
|
||
////////////////////////////////////////////////////////////////////////////////// .ragel generated | ||
|
||
%% write data; | ||
|
||
public static void parse(String cmd) /* throws ParseException */ { | ||
|
||
char[] data = cmd.toCharArray();// parser requires sequence storage | ||
int cs = lexer_start; // state machine current state | ||
int p = 0; // current parsing position | ||
int pe = data.length; // end of source text marker | ||
int ts = 0; // Token Start pointer | ||
|
||
%% write exec; | ||
} | ||
|
||
} |
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,4 @@ | ||
SRC = app/src/main/java/ | ||
PKG = $(SRC)/io/github/ponyatov/metal | ||
$(PKG)/FORTH.java: FORTH.ragel Makefile | ||
ragel -J -o $@ $< |
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
6 changes: 6 additions & 0 deletions
6
Android/app/src/main/java/io/github/ponyatov/metal/Comment.java
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 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Comment extends Symbol { | ||
final static String type = "comment"; | ||
public Comment(String V) { super(V); } | ||
} |
8 changes: 2 additions & 6 deletions
8
Android/app/src/main/java/io/github/ponyatov/metal/Container.java
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,10 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Container extends Frame { | ||
|
||
public Container(String V) { | ||
super(V); | ||
type = "container"; | ||
} | ||
|
||
final static String type = "container"; | ||
public Container(String V) { super(V); } | ||
} |
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,9 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Dict extends Container { | ||
|
||
public Dict(String V) { | ||
super(V); | ||
type = "dict"; | ||
} | ||
final static String type = "dict"; | ||
public Dict(String V) { super(V); } | ||
} |
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
7 changes: 2 additions & 5 deletions
7
Android/app/src/main/java/io/github/ponyatov/metal/Stack.java
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,9 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Stack extends Container { | ||
|
||
public Stack(String V) { | ||
super(V); | ||
type = "stack"; | ||
} | ||
final static String type = "stack"; | ||
public Stack(String V) { super(V); } | ||
} |
6 changes: 6 additions & 0 deletions
6
Android/app/src/main/java/io/github/ponyatov/metal/Symbol.java
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 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Symbol extends Frame { | ||
final static String type = "symbol"; | ||
public Symbol(String V) { super(V); } | ||
} |
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,10 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Task extends Frame { | ||
|
||
public Task(String V) { | ||
super(V); | ||
type = "task"; | ||
} | ||
|
||
final static String type = "task"; | ||
public Task(String V) { super(V); } | ||
} |
8 changes: 2 additions & 6 deletions
8
Android/app/src/main/java/io/github/ponyatov/metal/TaskList.java
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,10 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class TaskList extends Vector { | ||
|
||
public TaskList(String V) { | ||
super(V); | ||
type = "tasklist"; | ||
} | ||
|
||
final static String type = "tasklist"; | ||
public TaskList(String V) { super(V); } | ||
} |
7 changes: 2 additions & 5 deletions
7
Android/app/src/main/java/io/github/ponyatov/metal/Vector.java
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,9 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Vector extends Container { | ||
|
||
public Vector(String V) { | ||
super(V); | ||
type = "vector"; | ||
} | ||
final static String type = "vector"; | ||
public Vector(String V) { super(V); } | ||
} |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.