|
1 | 1 | # SimpleScript |
2 | | -A new Programming Language |
| 2 | + |
| 3 | +**SimpleScript** is a lightweight, beginner-friendly scripting language designed to make programming accessible, intuitive, and fun. Whether you're new to coding or looking for a clean language for quick prototyping, SimpleScript offers a powerful set of features with a simple and readable syntax. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## Why SimpleScript? |
| 8 | + |
| 9 | +SimpleScript was created with the goal of making scripting easy to learn, easy to write, and easy to understand. It strips away the complexities of traditional programming languages, offering a clean and minimalistic syntax that gets out of your way so you can focus on logic and creativity. |
| 10 | + |
| 11 | +It's perfect for: |
| 12 | + |
| 13 | +- **Students** learning programming concepts |
| 14 | +- **Educators** teaching control flow, logic, and scripting |
| 15 | +- **Developers** looking for a fast way to prototype algorithms |
| 16 | +- **Anyone** who wants to explore programming without boilerplate |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Features |
| 21 | + |
| 22 | +SimpleScript includes everything you need to write functional and expressive code: |
| 23 | + |
| 24 | +- **Clean and simple syntax** |
| 25 | +- **Variable declaration** using `let` |
| 26 | +- **Control structures**: `if`, `else`, `while`, `for` |
| 27 | +- **Logical and comparison operators**: `and`, `or`, `==`, `!=`, `>`, `<`, etc. |
| 28 | +- **Input/output support** with `input` and `print` |
| 29 | +- **Built-in array operations** |
| 30 | +- **Function declarations and calls** |
| 31 | +- **Begin/End block scoping** |
| 32 | +- **Whitespace-insensitive formatting** |
| 33 | +- **Support for basic data types**: strings, numbers, booleans, arrays |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## Code Example |
| 38 | + |
| 39 | +```simplescript |
| 40 | +let name = input("What's your name?") |
| 41 | +print "Hello, " + name |
| 42 | +
|
| 43 | +let total = 0 |
| 44 | +for i = 1 to 5 |
| 45 | + total = total + i |
| 46 | +end |
| 47 | +print "Total is: " + total |
| 48 | +
|
| 49 | +function greet(person) |
| 50 | + print "Hi, " + person + "!" |
| 51 | +end |
| 52 | +
|
| 53 | +greet(name) |
| 54 | +``` |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## Language Overview |
| 59 | + |
| 60 | +### Keywords |
| 61 | + |
| 62 | +SimpleScript includes a core set of keywords: |
| 63 | + |
| 64 | +- `let` – Declare a variable |
| 65 | +- `print` – Output text |
| 66 | +- `input` – Prompt for user input |
| 67 | +- `if`, `else`, `then`, `end` – Conditional statements |
| 68 | +- `while`, `for`, `to`, `step` – Looping constructs |
| 69 | +- `function`, `return`, `call` – Defining and using functions |
| 70 | +- `begin`, `end` – Define code blocks |
| 71 | +- `and`, `or`, `not` – Logical operators |
| 72 | + |
| 73 | +### Data Types |
| 74 | + |
| 75 | +- **Number**: e.g., `42`, `3.14` |
| 76 | +- **String**: e.g., `"Hello"` |
| 77 | +- **Boolean**: `true`, `false` |
| 78 | +- **Array**: `[1, 2, 3]` |
| 79 | +- **Null**: `null` |
| 80 | + |
| 81 | +### Operators |
| 82 | + |
| 83 | +- Arithmetic: `+`, `-`, `*`, `/`, `%` |
| 84 | +- Comparison: `==`, `!=`, `<`, `>`, `<=`, `>=` |
| 85 | +- Logical: `and`, `or`, `not` |
| 86 | +- Assignment: `=` |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## Getting Started |
| 91 | + |
| 92 | +You can run SimpleScript directly in your browser—no installation required! Simply visit the [SimpleScript Webpage](#) and start writing code in the built-in editor. |
| 93 | + |
| 94 | +The online interpreter will: |
| 95 | + |
| 96 | +- Tokenize your code using a built-in lexer |
| 97 | +- Parse and validate syntax using an internal parser |
| 98 | +- Evaluate and execute using the SimpleScript interpreter |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## File Structure |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +## Documentation |
| 107 | + |
| 108 | +Full documentation is available in the `/docs` folder or at the [SimpleScript Docs Page](#). Topics include: |
| 109 | + |
| 110 | +- All keywords with usage examples |
| 111 | +- Data types and type conversion |
| 112 | +- Built-in functions and custom function creation |
| 113 | +- Array manipulation and loops |
| 114 | +- Error handling and debugging tips |
| 115 | + |
| 116 | +--- |
| 117 | + |
| 118 | +## Roadmap |
| 119 | + |
| 120 | +Planned features for future versions: |
| 121 | + |
| 122 | +- User-defined classes and objects |
| 123 | +- File I/O support |
| 124 | +- Better error messages with line numbers |
| 125 | +- Extended standard library |
| 126 | +- IDE integration and autocomplete |
| 127 | + |
| 128 | +--- |
| 129 | + |
| 130 | +## Contributing |
| 131 | + |
| 132 | +We welcome contributions of any kind! |
| 133 | + |
| 134 | +- Submit bugs or feature requests via GitHub Issues |
| 135 | +- Fork the project and create pull requests for new features |
| 136 | +- Help write or improve documentation |
| 137 | +- Share interesting SimpleScript programs with the community |
| 138 | + |
| 139 | +--- |
| 140 | + |
| 141 | +## License |
| 142 | + |
| 143 | +SimpleScript is open-source under the [MIT License](LICENSE). |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +Start scripting simply—start with **SimpleScript** |
0 commit comments