You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# MathParser.lua - A Customizable and Fast Lua Math Parser
6
6
7
-
A comprehensive, user-friendly math parser for Lua, featuring support for variables, functions and customizable operators and operator precedence.
7
+
A powerful and customizable Lua math parser that can solve both simple arithmetic problems and complex mathematical expressions. It supports adding variables, functions, custom operators, and operator precedence levels. It's designed to be safe, fast, and easy to use.
@@ -18,40 +18,39 @@ A comprehensive, user-friendly math parser for Lua, featuring support for variab
18
18
19
19
## Introduction
20
20
21
-
Welcome to MathParser.lua, a comprehensive math parser tailored specifically for Lua. With its structured design and well-commented code, this parser is accessible to both newcomers and seasoned developers alike.
21
+
MathParser.lua can solve many different types of math problems. It's a tool that can be used for solving [simple arithmetic problems](#getting-started), as well as [more complex mathematical expressions](#advanced-usage). It supports adding variables, functions, custom operators, and operator precedence levels (wiki: [Order of Operations](https://en.wikipedia.org/wiki/Order_of_operations)). It's also designed to be safe, so you can use it without worrying about security issues.
22
22
23
-
MathParser.lua is capable of handling a wide array of mathematical problems, providing a reliable solution for your computational needs. But it doesn't stop there. It offers a high degree of customization, allowing you to extend its functionality by adding your own functions, variables, and operators. You even have the flexibility to alter the precedence of operations to suit your needs. For instance, you can configure the parser to prioritize addition over multiplication - a level of customization that truly sets MathParser.lua apart from other math parsers.
24
-
25
-
One of the defining features of MathParser.lua is its thorough test coverage. We've ensured that every line of code is put through rigorous testing, guaranteeing its reliability and robustness. Furthermore, it's compatible with various Lua versions, starting from Lua-5.1, including LuaJIT. It's even compatible with Luau, making it a viable choice for your Roblox projects.
23
+
For a deeper understanding of its usage and functionality, refer to the [documentation](docs/Documentation.md). It provides detailed explanations on how to use MathParser.lua and how it works.
26
24
27
25
## Table of Contents
28
26
29
-
-[MathParser.lua - A Robust Lua Math Parser](#mathparserlua---a-robust-lua-math-parser)
27
+
-[MathParser.lua - A Customizable and Fast Lua Math Parser](#mathparserlua---a-customizable-and-fast-lua-math-parser)
1.**User-Friendly**: MathParser.lua boasts an intuitive API, making it a breeze to integrate into your projects. Its comprehensive documentation provides clear examples and explanations, while its error messages are designed to pinpoint the exact location of issues, reducing debugging time.
44
-
2.**Safe and Secure**: Safety is a priority with MathParser.lua. It avoids the use of the `load` function, which can execute any Lua code. Instead, it employs a custom parser to process input expressions, ensuring only valid mathematical operations are executed. If an input is invalid or potentially harmful, MathParser.lua throws an error, providing detailed information about the issue.
45
-
3.**Compact and Efficient**: MathParser.lua is a lean project with no external dependencies, making it easy to incorporate into your codebase. Its compact size doesn't compromise its functionality, offering a powerful tool that's easy to understand and modify.
46
-
4.**Highly Customizable**: MathParser.lua offers extensive customization options. You can add custom functions, variables, and operators, and even change the order in which operations are done. This flexibility allows you to tailor MathParser.lua to your specific needs, making it a versatile tool for a wide range of applications.
42
+
1.**Easy to Use**: MathParser.lua is simple to use. It has a clear API and helpful documentation. If there's a problem, it gives you clear error messages to help you fix it quickly.
43
+
2.**Safe**: MathParser.lua is designed to be safe. Unlike *other* math parsers written in Lua, it doesn't use `loadstring` or `load` to evaluate expressions. Instead, it uses a custom parser and evaluator that were built from scratch. This makes it safe to use in any environment.
44
+
3.**Small and Fast**: MathParser.lua is a small project that doesn't need any other dependency to work.
45
+
4.**Customizable**: You can change MathParser.lua to do exactly what you want. You can add your own functions, variables, and operators. You can even change the order of operations. This makes it a useful tool for many different projects.
47
46
48
47
## Usage
49
48
50
-
MathParser.lua is a versatile tool that can handle everything from simple arithmetic to complex mathematical expressions. Whether you're integrating it into a large project or using it for quick calculations, here's a comprehensive guide to get you started.
49
+
MathParser.lua is a tool that can handle everything from simple arithmetic to complex mathematical expressions. Whether you're integrating it into a large project or using it for quick calculations, here's a comprehensive guide to get you started.
51
50
52
51
### Getting Started
53
52
54
-
Using MathParser.lua is as easy as 1-2-3. Here's a quick example to get you started:
53
+
Using MathParser.lua is very easy. Here's a simple example to demonstrate how you can use it to solve basic math problems:
55
54
```lua
56
55
localMathParser=require("MathParser")
57
56
@@ -128,6 +127,10 @@ MathParser.lua is just getting started. Here are some of the enhancements and fe
128
127
129
128
We welcome feature requests and suggestions for improvements. Feel free to open an issue or a pull request. Your feedback is highly appreciated!
130
129
130
+
## Contact
131
+
132
+
Do you have any questions, suggestions, or feedback? Feel free to open an issue on this GitHub repository. Alternatively, you can email the project maintainer, ByteXenon at `ddavi142(at)asu(dot)edu`
133
+
131
134
## License
132
135
133
136
MathParser.lua is (re)licensed under the [MIT License](LICENSE).
0 commit comments