Skip to content

Commit

Permalink
Merge pull request #1 from wniemiec-mobilex/python-to-cpp
Browse files Browse the repository at this point in the history
Python to cpp
  • Loading branch information
williamniemiec authored Jul 30, 2022
2 parents ce8f1ec + b634d65 commit ba379b0
Show file tree
Hide file tree
Showing 40 changed files with 2,703 additions and 368 deletions.
Empty file removed .attach_pid10860
Empty file.
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,22 @@ lex.yy.c
*.tab.*
.vscode
target

src/test/cpp/Makefile

# CMakeList
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
runTests
src/test/cpp/lib

bin
!lib/*/*
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p align="center">
<a href="https://github.com/williamniemiec/mast-compiler/actions/workflows/ubuntu.yml"><img src="https://github.com/williamniemiec/mast-compiler/actions/workflows/ubuntu.yml/badge.svg" alt=""></a>
<a href="http://node.dev"><img src="https://img.shields.io/badge/NodeJS-8+-D0008F.svg" alt="Node compatibility"></a>
<a href="http://python.org"><img src="https://img.shields.io/badge/python-3+-D0008F.svg" alt="Python compatibility"></a>
<a href="http://java.oracle.com"><img src="https://img.shields.io/badge/java-11+-D0008F.svg" alt="Java compatibility"></a>
<a href="https://github.com/williamniemiec/mast-compiler/releases"><img src="https://img.shields.io/github/v/release/williamniemiec/mast-compiler" alt="Release"></a>
<a href="https://github.com/williamniemiec/mast-compiler/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-919191.svg" alt="License"></a>

Expand All @@ -19,22 +19,21 @@ MobiLang is an extended markup language created for representing any mobile appl
## ❓ How to use

```
make
sudo make compilation file=<mobilang_filepath_without_extension> output=<output_location> name=<output_filename>
Coming soon
```

### Example

```
sudo make compilation file=./src/resources/close2dinoapp output=./ name=close2dinoapp
Coming soon
```

## ✔ Requirements
- [NodeJS](https://nodejs.dev)
- [Python 3+](https://python.org)
- [Flex](https://www.geeksforgeeks.org/flex-fast-lexical-analyzer-generator/)
- [Bison](https://www.gnu.org/software/bison/)
- [C Compiler](https://gcc.gnu.org)
- [Java](http://java.oracle.com/)

## ⚠ Warnings
- Behavior tag
Expand Down
Binary file modified dist/1.x/mast-compiler-1.0.0.jar
Binary file not shown.
Binary file added dist/1.x/mast-compiler-1.0.1.jar
Binary file not shown.
68 changes: 68 additions & 0 deletions examples/Close2WhatsApp/ast/Close2WhatsApp.dot

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions examples/HelloWorld/ast/HelloWorld.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
digraph G {
n0 -> n1;
n1 -> n2;
n2 -> n3;
n3 -> n4;
n2 -> n5;
n2 -> n6;
n0 -> n7;
n7 -> n8;
n0 [label="<mobilang>"];
n1 [label="<screens>"];
n2 [label="<screen id=\"home\">"];
n3 [label="<structure>"];
n4 [label="{\"nodeType\":\"document\",\"content\":{\"children\":[{\"nodeType\":\"tag\",\"parentRef\":\"[Circular ~]\",\"content\":{\"openStart\":{\"type\":\"token:open-tag-start\",\"content\":\"<html\",\"startPosition\":0,\"endPosition\":4},\"name\":\"html\",\"openEnd\":{\"type\":\"token:open-tag-end\",\"content\":\">\",\"startPosition\":5,\"endPosition\":5},\"selfClosing\":false,\"children\":[{\"nodeType\":\"tag\",\"parentRef\":\"[Circular ~.content.children.0]\",\"content\":{\"openStart\":{\"type\":\"token:open-tag-start\",\"content\":\"<h1\",\"startPosition\":6,\"endPosition\":8},\"name\":\"h1\",\"openEnd\":{\"type\":\"token:open-tag-end\",\"content\":\">\",\"startPosition\":9,\"endPosition\":9},\"selfClosing\":false,\"children\":[{\"nodeType\":\"text\",\"parentRef\":\"[Circular ~.content.children.0.content.children.0]\",\"content\":{\"value\":{\"type\":\"token:text\",\"content\":\"Hello world!\",\"startPosition\":10,\"endPosition\":21}}}],\"close\":{\"type\":\"token:close-tag\",\"content\":\"</h1>\",\"startPosition\":22,\"endPosition\":26}}}],\"close\":{\"type\":\"token:close-tag\",\"content\":\"</html>\",\"startPosition\":27,\"endPosition\":33}}}]}}"];
n5 [label="<style>"];
n6 [label="<behavior>"];
n7 [label="<properties>"];
n8 [label="{\"application_name\": \"HelloWorld\",\"platforms\": [\"android\",\"ios\"]}"];

}


Loading

0 comments on commit ba379b0

Please sign in to comment.