X Programming Language
X is a placeholder language with a python and JS like syntax and a shareable bytecode IR that can be translated into any other programming language.
Languages Supported
- C
- C++
- Java
- Python
What does this list mean? This means that you can compile your X code into any one of these programming languages 😲😲😲😲!
Installation
The latest build of X is available on pypi, install it using:
user@programmer~:$ pip install langx
Pipeline
## Steps to run
1. Write a script in X and save it with .x extension.
2. To run the script:
```bash
user@programmer~:$ x -i .x
```
3. To compile to C:
```bash
user@programmer~:$ x -i --decompile-c
```
4. To compile to C++:
```bash
user@programmer~:$ x -i --decompile-cpp
```
5. To compile to Java:
```bash
user@programmer~:$ x -i --decompile-java
```
6. To compile to Python:
```bash
user@programmer~:$ x -i --decompile-py
```
## Tools for X language developers
1. Check the tokens for the script
```bash
user@programmer~:$ x -i .x -t
```
2. Check the syntax tree for the script
```bash
user@programmer~:$ x -i .x -p
```
3. Check the compiled bytecodes for the script
```bash
user@programmer~:$ x -i .x -c
```
4. X also offers a web based debugger called xdb. To use it start the xdb server and follow along
```bash
user@programmer~:$ xdb
```