Schach - Parsing | v1.1.0 | by Masked
Introduction
This is a core library for text parsing. This script does not provide any functionality by itself, only functions that ought to be used by other scripts to make sense of generic user input.
For more details on motivation and advantages, see my
previous post on it .
Instructions
Please read the
online documentation for details on the available functions.
Here goes a quick usage example:
JavaScript:
const { expression, evaluate } = Schach.Parsing.Arithmetic; const { parsed: expr } = expression().run("#x^4 - log2(#y)") evaluate(expr, { variables: { x: 5, y: 32 } }) // returns 5^4 - log2(32) = 625 - 5 = 620 复制代码
Download: Github
Source Code:Github
License:Zlib
本贴来自国际rpgmaker官方论坛作者: Masked 处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/schach-parsing.128288/