|
1 | | -```diff |
2 | | -@@ The language is currently in PreAlpha development stages. @@ |
3 | | -@@ A lot of missing features and bugs are to be expected. @@ |
4 | | -``` |
| 1 | +```diff```diff |
| 2 | + |
| 3 | +@@ The language is currently in PreAlpha development stages. @@@@ The language is currently in PreAlpha development stages. @@ |
| 4 | + |
| 5 | +@@ A lot of missing features and bugs are to be expected. @@@@ A lot of missing features and bugs are to be expected. @@ |
| 6 | + |
| 7 | +`````` |
| 8 | +
|
5 | 9 | # Noviq |
6 | | -- The name Noviq is make up of two words: Nova(which means new) and unique. |
| 10 | +
|
| 11 | +# Noviq- The name Noviq is make up of two words: Nova(which means new) and unique. |
| 12 | +
|
7 | 13 | - So, Nova + unique = Noviq. |
8 | | -- Noviq is just a simple interpreter based programming language written in C. |
9 | 14 |
|
10 | | -## Wiki |
| 15 | +**Noviq** = **Nova** (new) + **unique**- Noviq is just a simple interpreter based programming language written in C. |
| 16 | +
|
| 17 | +
|
| 18 | +
|
| 19 | +A simple, interpreted programming language written in C with a focus on clarity and ease of use.## Wiki |
| 20 | +
|
11 | 21 | [Click Here To Go To The Wiki](https://coredex-source.github.io/Noviq-site/wiki/introduction.html) |
12 | 22 |
|
| 23 | +## Features |
| 24 | +
|
13 | 25 | ## Building and using |
14 | | -### Requirements: |
15 | | - - GCC (Only GCC on windows.) |
16 | | - - make |
17 | | -### Build using: |
18 | | -- MacOS/Linux |
| 26 | +
|
| 27 | +✅ **Dynamic Typing** - Integers, floats, strings, and booleans ### Requirements: |
| 28 | +
|
| 29 | +✅ **Arithmetic Operations** - `+`, `-`, `*`, `/`, `%`, `**` (power), `//` (integer division) - GCC (Only GCC on windows.) |
| 30 | +
|
| 31 | +✅ **Logical Operations** - `AND`, `OR`, `NOT` (also `&&`, `||`, `!`) - make |
| 32 | +
|
| 33 | +✅ **Comparison Operators** - `>`, `<`, `>=`, `<=`, `==` ### Build using: |
| 34 | +
|
| 35 | +✅ **Control Flow** - `if`/`else` statements with nesting support - MacOS/Linux |
| 36 | +
|
| 37 | +✅ **Constants** - Immutable values with `const` keyword ``` |
| 38 | +
|
| 39 | +✅ **User Input** - Interactive programs with `input()` make all |
| 40 | +
|
| 41 | +✅ **String Formatting** - Variable substitution with `%var1`, `%var2`, etc.``` |
| 42 | +
|
| 43 | +- Windows |
| 44 | +
|
| 45 | +## Documentation``` |
| 46 | +
|
| 47 | +gcc -o noviq.exe noviq.c lexer/lexer_interpret.c lexer/lexer_display.c -lm |
| 48 | +
|
| 49 | +📚 [Language Wiki](https://coredex-source.github.io/Noviq-site/wiki/introduction.html) ``` |
| 50 | +
|
| 51 | +📖 [Language Reference](docs/language_reference.md)### Run using: |
| 52 | +
|
| 53 | +- MacOS/Linux: |
| 54 | +
|
| 55 | +## Project Structure``` |
| 56 | +
|
| 57 | +./noviq -e filename.nvq |
| 58 | +
|
| 59 | +`````` |
| 60 | + |
| 61 | +Noviq/- Windows (cmd): |
| 62 | + |
| 63 | +├── src/``` |
| 64 | + |
| 65 | +│ ├── main.c # Entry pointnoviq.exe -e filename.nvq |
| 66 | + |
| 67 | +│ ├── interpreter/ # Core interpreter``` |
| 68 | + |
| 69 | +│ │ ├── interpreter.c # Command interpretation |
| 70 | +│ │ ├── variables.c # Variable management |
| 71 | +│ │ └── expressions.c # Expression evaluation |
| 72 | +│ ├── operators/ # Operator implementations |
| 73 | +│ │ ├── arithmetic.c # Arithmetic operations |
| 74 | +│ │ ├── logical.c # Logical operations |
| 75 | +│ │ └── comparison.c # Comparison operations |
| 76 | +│ ├── statements/ # Statement handlers |
| 77 | +│ │ ├── display.c # Output functionality |
| 78 | +│ │ ├── input.c # Input handling |
| 79 | +│ │ └── control_flow.c # If/else statements |
| 80 | +│ └── utils/ |
| 81 | +│ └── error.c # Error reporting |
| 82 | +├── include/ # Header files |
| 83 | +├── examples/ # Example programs |
| 84 | +├── tests/ # Test files |
| 85 | +├── docs/ # Documentation |
| 86 | +├── CMakeLists.txt # CMake build configuration |
| 87 | +├── Makefile # Make build configuration |
| 88 | +└── README.md |
19 | 89 | ``` |
| 90 | +
|
| 91 | +## Quick Start |
| 92 | +
|
| 93 | +### Requirements |
| 94 | +
|
| 95 | +- **GCC** or compatible C compiler |
| 96 | +- **Make** (optional, for Makefile build) |
| 97 | +- **CMake** 3.10+ (optional, for CMake build) |
| 98 | +
|
| 99 | +### Build Options |
| 100 | +
|
| 101 | +#### Option 1: Using Make (Recommended for Unix-like systems) |
| 102 | +
|
| 103 | +```bash |
20 | 104 | make all |
21 | 105 | ``` |
22 | | -- Windows |
| 106 | + |
| 107 | +#### Option 2: Using CMake (Cross-platform) |
| 108 | + |
| 109 | +```bash |
| 110 | +mkdir build |
| 111 | +cd build |
| 112 | +cmake .. |
| 113 | +cmake --build . |
23 | 114 | ``` |
24 | | -gcc -o noviq.exe noviq.c lexer/lexer_interpret.c lexer/lexer_display.c -lm |
| 115 | + |
| 116 | +#### Option 3: Direct compilation (Windows) |
| 117 | + |
| 118 | +```cmd |
| 119 | +gcc -o noviq.exe -Iinclude src\main.c src\interpreter\*.c src\operators\*.c src\statements\*.c src\utils\*.c -lm |
25 | 120 | ``` |
26 | | -### Run using: |
27 | | -- MacOS/Linux: |
| 121 | + |
| 122 | +### Run |
| 123 | + |
| 124 | +```bash |
| 125 | +# Unix/Linux/macOS |
| 126 | +./noviq -e examples/hello_world.nvq |
| 127 | + |
| 128 | +# Windows |
| 129 | +noviq.exe -e examples\hello_world.nvq |
28 | 130 | ``` |
29 | | -./noviq -e filename.nvq |
| 131 | + |
| 132 | +### Command-Line Options |
| 133 | + |
| 134 | +``` |
| 135 | +noviq [options] |
| 136 | +
|
| 137 | +Options: |
| 138 | + -e <filename> Execute a Noviq script file (.nvq) |
| 139 | + --help Display help message |
| 140 | + --version Display version information |
| 141 | +``` |
| 142 | + |
| 143 | +## Examples |
| 144 | + |
| 145 | +### Hello World |
| 146 | + |
| 147 | +```noviq |
| 148 | +display("Hello, World!") |
| 149 | +``` |
| 150 | + |
| 151 | +### Variables and Arithmetic |
| 152 | + |
| 153 | +```noviq |
| 154 | +x = 10 |
| 155 | +y = 5 |
| 156 | +result = x + y |
| 157 | +display("Result: %var1", result) |
| 158 | +``` |
| 159 | + |
| 160 | +### Control Flow |
| 161 | + |
| 162 | +```noviq |
| 163 | +age = 20 |
| 164 | +if(age >= 18){ |
| 165 | + display("You are an adult") |
| 166 | +} else { |
| 167 | + display("You are a minor") |
| 168 | +} |
30 | 169 | ``` |
31 | | -- Windows (cmd): |
| 170 | + |
| 171 | +### Constants |
| 172 | + |
| 173 | +```noviq |
| 174 | +const PI = 3.14159 |
| 175 | +radius = 5 |
| 176 | +area = PI * radius * radius |
| 177 | +display("Area: %var1", area) |
| 178 | +``` |
| 179 | + |
| 180 | +More examples available in the `examples/` directory. |
| 181 | + |
| 182 | +## Development |
| 183 | + |
| 184 | +### Building from Source |
| 185 | + |
| 186 | +1. Clone the repository |
| 187 | +```bash |
| 188 | +git clone https://github.com/coredex-source/Noviq.git |
| 189 | +cd Noviq |
| 190 | +``` |
| 191 | + |
| 192 | +2. Build using your preferred method |
| 193 | +```bash |
| 194 | +make all |
32 | 195 | ``` |
33 | | -noviq.exe -e filename.nvq |
| 196 | + |
| 197 | +3. Test the build |
| 198 | +```bash |
| 199 | +./noviq -e examples/hello_world.nvq |
34 | 200 | ``` |
| 201 | + |
| 202 | +### Clean Build |
| 203 | + |
| 204 | +```bash |
| 205 | +make clean |
| 206 | +make all |
| 207 | +``` |
| 208 | + |
| 209 | +## Contributing |
| 210 | + |
| 211 | +Contributions are welcome! Please feel free to submit issues or pull requests. |
| 212 | + |
| 213 | +## License |
| 214 | + |
| 215 | +GPL-3.0 - See [LICENSE](LICENSE) for details. |
| 216 | + |
| 217 | +## Version |
| 218 | + |
| 219 | +Current version: **prealpha-v2.3.0** |
| 220 | + |
| 221 | +--- |
| 222 | + |
| 223 | +*Note: This project is in pre-alpha development. Features may change, and bugs are expected.* |
0 commit comments