List
of paths of files which contain DSL rules.
+ * Each String
in the returned List
can be passed as an argument to
+ * {@link StorageUtils#getResourceStream(String)} to access the corresponding file's contents.
+ * @throws IOException if an IO error occurs while getting the list of rule file paths.
+ */
+ ListFileErrors
instance with the given file and error data.
*
- * @param file The path of the DSL source file in which the errors occurred.
- * @param source The entire contents of the DSL source file in which the errors occurred.
- * @param errors The (non-empty) list of errors found in the DSL source file.
+ * @param filePath The path of the DSL source file in which the errors occurred.
+ * @param source The entire contents of the DSL source file in which the errors occurred.
+ * @param errors The (non-empty) list of errors found in the DSL source file.
* @throws IllegalArgumentException If the list of errors is empty.
*/
- public FileErrors(final File file, final String source, final List/rules.list
resource on the server.
+ *
+ * The /rules.list
resource must exist and be a text file with zero or more lines.
+ * Each line specifies the name of another resource containing DSL source code.
+ * Blank lines aren't allowed, and resource names are interpreted exactly as written (without stripping
+ * leading/trailing spaces, etc.)
+ */
@Override
- public void loadPlatformRules() {
- RulesManager.addRule(new rules.functions.DivisionRule());
- RulesManager.addRule(new rules.functions.EmptyNumberRule());
- RulesManager.addRule(new rules.functions.ExpressionRule());
- RulesManager.addRule(new rules.functions.JokeRule());
- RulesManager.addRule(new rules.functions.MultiplicationRule());
- RulesManager.addRule(new rules.functions.NegativeRule());
- RulesManager.addRule(new rules.functions.NumberRule());
- RulesManager.addRule(new rules.functions.PowerRule());
- RulesManager.addRule(new rules.functions.RootRule());
- RulesManager.addRule(new rules.functions.SubtractionRule());
- RulesManager.addRule(new rules.functions.SumRule());
- RulesManager.addRule(new rules.functions.SumSubtractionRule());
- RulesManager.addRule(new rules.functions.VariableRule());
- RulesManager.addRule(new rules.ExpandRule1());
- RulesManager.addRule(new rules.ExpandRule2());
- RulesManager.addRule(new rules.ExpandRule5());
- RulesManager.addRule(new rules.ExponentRule1());
- RulesManager.addRule(new rules.ExponentRule2());
- RulesManager.addRule(new rules.ExponentRule3());
- RulesManager.addRule(new rules.ExponentRule4());
- RulesManager.addRule(new rules.ExponentRule8());
- RulesManager.addRule(new rules.ExponentRule9());
- RulesManager.addRule(new rules.ExponentRule15());
- RulesManager.addRule(new rules.ExponentRule16());
- RulesManager.addRule(new rules.ExponentRule17());
- RulesManager.addRule(new rules.FractionsRule1());
- RulesManager.addRule(new rules.FractionsRule2());
- RulesManager.addRule(new rules.FractionsRule3());
- RulesManager.addRule(new rules.FractionsRule4());
- RulesManager.addRule(new rules.FractionsRule5());
- RulesManager.addRule(new rules.FractionsRule6());
- RulesManager.addRule(new rules.FractionsRule7());
- RulesManager.addRule(new rules.FractionsRule8());
- RulesManager.addRule(new rules.FractionsRule9());
- RulesManager.addRule(new rules.FractionsRule10());
- RulesManager.addRule(new rules.FractionsRule11());
- RulesManager.addRule(new rules.FractionsRule12());
- RulesManager.addRule(new rules.FractionsRule14());
- RulesManager.addRule(new rules.NumberRule1());
- RulesManager.addRule(new rules.NumberRule2());
- RulesManager.addRule(new rules.NumberRule3());
- RulesManager.addRule(new rules.NumberRule4());
- RulesManager.addRule(new rules.NumberRule5());
- RulesManager.addRule(new rules.NumberRule7());
- RulesManager.addRule(new rules.UndefinedRule1());
- RulesManager.addRule(new rules.UndefinedRule2());
- RulesManager.addRule(new rules.VariableRule1());
- RulesManager.addRule(new rules.VariableRule2());
- RulesManager.addRule(new rules.VariableRule3());
+ public List