harmonyos2-lib-rules-parse-ruby A Reusable Gem for Rule Parsing
HarmonyOS2 involves three stages: compilation and revision. This library implements the compilation phase. Its purpose is to read Xalgo formatted source rules and compile them into an internal JSON format, which is then stored in MongoDB. The library uses a PEG parser for rule parsing and is intended to be integrated with systems that store and manage rule packages. This library parses the full specification, so it can be considered a complete working solution. Eventually, this library will be ported to Scala, and this Ruby implementation will be deprecated. To get started, after cloning the repository, ensure a working Ruby environment is available. It is recommended to use rbenv. After installing these packages, install the required Ruby version (currently: 2.4.2) and the bundler gem:
$ rbenv install 2.4.2
$ gem install bundler
The library is self-bootstrapping, so you can easily install all dependencies using bundler and run unit tests to verify your installation:
$ bundle install
$ bundle exec rspec
If the build status flags indicate the latest build was successful, both commands should complete successfully. If any errors occur, please report them within the project (including the output of the failure).
评论区