-
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.
Merge branch 'master' of github.com:ponyatov/metaL
# Conflicts: # .gitignore # .gitmodules # Makefile # README.md # requirements.txt
- Loading branch information
Showing
172 changed files
with
2,516 additions
and
92 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
antlr-4.7.2-complete.jar |
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 @@ | ||
wget -c https://www.antlr.org/download/antlr-4.7.2-complete.jar |
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 @@ | ||
#include <iostream> | ||
|
||
// https://www.youtube.com/watch?v=tkDfxdoQw4I | ||
|
||
int main() { | ||
std::cout << "Hello World" << std::endl; | ||
return 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 |
---|---|---|
|
@@ -11,3 +11,4 @@ | |
/build | ||
/captures | ||
.externalNativeBuild | ||
app/src/main/java/io/github/ponyatov/metal/FORTH.java |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,44 @@ | ||
{ | ||
"project_info": { | ||
"project_number": "890654100792", | ||
"firebase_url": "https://metal-236405.firebaseio.com", | ||
"project_id": "metal-236405", | ||
"storage_bucket": "metal-236405.appspot.com" | ||
}, | ||
"client": [ | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:890654100792:android:809e59e342cfe2ed", | ||
"android_client_info": { | ||
"package_name": "io.github.ponyatov.metal" | ||
} | ||
}, | ||
"oauth_client": [ | ||
{ | ||
"client_id": "890654100792-p86jetl5tf1jdqkanbjrhjh5mhg53rnq.apps.googleusercontent.com", | ||
"client_type": 1, | ||
"android_info": { | ||
"package_name": "io.github.ponyatov.metal", | ||
"certificate_hash": "fc19bc25cd480f36c043d309b731c8383989aa15" | ||
} | ||
} | ||
], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyBJ5Ylrpn6oRkjM-K8b1yONBckexTYoS00" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [ | ||
{ | ||
"client_id": "890654100792-ke5729bj7a1om53uf83dnd1rapkvk2l6.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"configuration_version": "1" | ||
} |
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
13 changes: 13 additions & 0 deletions
13
Android/app/src/main/java/io/github/ponyatov/metal/AboutActivity.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,13 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
|
||
public class AboutActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_about); | ||
} | ||
} |
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); } | ||
} |
6 changes: 6 additions & 0 deletions
6
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Container extends Frame { | ||
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Dict extends Container { | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
/// Firebase DB interface class | ||
|
||
public class FDB { | ||
} |
37 changes: 37 additions & 0 deletions
37
Android/app/src/main/java/io/github/ponyatov/metal/Frame.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,37 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Frame { | ||
|
||
/// type/class tag | ||
final static String type = "frame"; | ||
|
||
/// object value (primitive implementation language type) | ||
String value; | ||
|
||
/// construct new frame/object with given name | ||
public Frame(String V) { | ||
value = V; | ||
} | ||
|
||
/// dump in short form: header only | ||
public String head(String prefix) { | ||
return prefix + "<" + type + ":" + value + ">"; | ||
} | ||
public String head() { return head(""); } | ||
|
||
public String dump(int depth, String prefix) { | ||
String S = pad(depth) + head(prefix); | ||
return S; | ||
} | ||
public String dump(int depth) { return dump(depth,""); } | ||
public String dump() { return dump(0,""); } | ||
|
||
String pad(int N) { | ||
final String cr = "\n"; | ||
final String tab = "\t"; | ||
String S = cr; | ||
for (int i=0;i<N;i++) S += tab; | ||
return S; | ||
} | ||
|
||
} |
47 changes: 42 additions & 5 deletions
47
Android/app/src/main/java/io/github/ponyatov/metal/MainActivity.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
6 changes: 6 additions & 0 deletions
6
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Stack extends Container { | ||
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Task extends Frame { | ||
final static String type = "task"; | ||
public Task(String V) { super(V); } | ||
} |
6 changes: 6 additions & 0 deletions
6
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class TaskList extends Vector { | ||
final static String type = "tasklist"; | ||
public TaskList(String V) { super(V); } | ||
} |
6 changes: 6 additions & 0 deletions
6
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.github.ponyatov.metal; | ||
|
||
public class Vector extends Container { | ||
final static String type = "vector"; | ||
public Vector(String V) { super(V); } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:layout_behavior="@string/appbar_scrolling_view_behavior" | ||
tools:context=".MainActivity" | ||
tools:showIn="@layout/activity_main"> | ||
|
||
<TextView | ||
android:id="@+id/tasklist" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="8dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginRight="8dp" | ||
android:layout_marginBottom="69dp" | ||
android:text="@string/hello" | ||
android:textColor="@color/colorConsole" | ||
android:textSize="@dimen/szConsole" | ||
app:layout_constraintBottom_toTopOf="@+id/cli" | ||
app:layout_constraintHorizontal_bias="0.0" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintVertical_bias="0.0" /> | ||
|
||
<LinearLayout | ||
android:id="@+id/cli" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="4dp" | ||
android:orientation="horizontal" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
tools:layout_editor_absoluteX="0dp"> | ||
|
||
<EditText | ||
android:id="@+id/pad" | ||
android:layout_width="wrap_content" | ||
android:layout_height="192dp" | ||
android:ems="19" | ||
android:inputType="textMultiLine" | ||
android:textSize="@dimen/szConsole" | ||
tools:layout_editor_absoluteX="8dp" | ||
tools:layout_editor_absoluteY="60dp" /> | ||
|
||
<Button | ||
android:id="@+id/go" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="top|right" | ||
android:text="Butt\non" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toTopOf="@+id/cli" | ||
tools:layout_editor_absoluteX="329dp" | ||
tools:layout_editor_absoluteY="486dp" /> | ||
|
||
</LinearLayout> | ||
|
||
</android.support.constraint.ConstraintLayout> |
Oops, something went wrong.