diff --git a/mathmaps/base/rules/clearspeak_base_actions.json b/mathmaps/base/rules/clearspeak_base_actions.json index aca77a6df..9feb0b084 100644 --- a/mathmaps/base/rules/clearspeak_base_actions.json +++ b/mathmaps/base/rules/clearspeak_base_actions.json @@ -227,7 +227,7 @@ [ "Action", "prefix", - "[m] content/* (grammar:prefix); [n] children/*[1]" + "[m] content/* (grammar:?prefix); [n] children/*[1]" ], [ "Action", @@ -352,12 +352,12 @@ [ "Action", "lines-summary-none", - "[n] . (grammar:layoutSummary)" + "[n] . (grammar:?layoutSummary)" ], [ "Action", "cases-summary-none", - "[n] . (grammar:layoutSummary)" + "[n] . (grammar:?layoutSummary)" ], [ "Action", diff --git a/mathmaps/de/rules/clearspeak_german_actions.json b/mathmaps/de/rules/clearspeak_german_actions.json index 0bcbb998c..ddc91cf2e 100644 --- a/mathmaps/de/rules/clearspeak_german_actions.json +++ b/mathmaps/de/rules/clearspeak_german_actions.json @@ -527,92 +527,92 @@ [ "Action", "sqrt", - "[t] \"Quadratwurzel aus\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"Quadratwurzel aus\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested", - "[p] (pause:\"short\"); [t] \"Quadratwurzel aus\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"Quadratwurzel aus\"; [n] children/*[1] (pause:short)" ], [ "Action", "negative-sqrt", - "[t] \"negative Quadratwurzel aus\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"negative Quadratwurzel aus\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "negative-sqrt-default", - "[p] (pause:\"short\"); [t] \"negative Quadratwurzel aus\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"negative Quadratwurzel aus\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus", - "[t] \"positive Quadratwurzel aus\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"positive Quadratwurzel aus\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus", - "[p] (pause:\"short\"); [t] \"positive Quadratwurzel aus\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"positive Quadratwurzel aus\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus-posnegsqrootend", - "[t] \"positive Quadratwurzel aus\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"positive Quadratwurzel aus\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus-posnegsqrootend", - "[p] (pause:\"short\"); [t] \"positive Quadratwurzel aus\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"positive Quadratwurzel aus\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"Wurzel Ende\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"Wurzel Ende\" (pause:short)" ], [ "Action", "negative-sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"Wurzel Ende\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"Wurzel Ende\" (pause:short)" ], [ "Action", "sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"Wurzel Ende\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"Wurzel Ende\" (pause:short)" ], [ "Action", "negative-sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"Wurzel Ende\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"Wurzel Ende\" (pause:short)" ], [ "Action", "cubic", - "[t] \"Kubikwurzel aus\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"Kubikwurzel aus\"; [n] children/*[2] (pause:short)" ], [ "Action", "cubic-nested", - "[p] (pause:short); [t] \"Kubikwurzel aus\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"Kubikwurzel aus\"; [n] children/*[2] (pause:short)" ], [ "Action", "root", - "[t] \"die\" (grammar:article); [n] children/*[1] (grammar:ordinal); [t] \"Wurzel aus\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"die\" (grammar:article); [n] children/*[1] (grammar:ordinal); [t] \"Wurzel aus\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-nested", - "[p] (pause:short); [t] \"die\" (grammar:article); [n] children/*[1] (grammar:ordinal); [t] \"Wurzel aus\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"die\" (grammar:article); [n] children/*[1] (grammar:ordinal); [t] \"Wurzel aus\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-endroot", - "[n] . (grammar:EndRoot); [t] \"Wurzel Ende\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"Wurzel Ende\" (pause:short)" ], [ "Action", "root-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"Wurzel Ende\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"Wurzel Ende\" (pause:short)" ], [ "Action", @@ -632,12 +632,12 @@ [ "Action", "set-prefix-operators-masculine", - "[t] \"der\" (grammar:article); [n] . (grammar:!prefix); [t] \"von\"" + "[t] \"der\" (grammar:article); [n] . ; [t] \"von\"" ], [ "Action", "set-prefix-operators-feminine", - "[t] \"die\" (grammar:article); [n] . (grammar:!prefix); [t] \"von\"" + "[t] \"die\" (grammar:article); [n] . ; [t] \"von\"" ], [ "Action", @@ -787,17 +787,17 @@ [ "Action", "matrix-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"Ende Matrize\"" + "[n] . (grammar:?EndMatrix); [t] \"Ende Matrize\"" ], [ "Action", "matrix-end-vector", - "[n] . (grammar:EndMatrix); [t] \"Ende Matrize\"" + "[n] . (grammar:?EndMatrix); [t] \"Ende Matrize\"" ], [ "Action", "matrix-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"Ende Determinante\"" + "[n] . (grammar:?EndMatrix); [t] \"Ende Determinante\"" ], [ "Action", @@ -822,22 +822,22 @@ [ "Action", "vector-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"Ende Matrize\"" + "[n] . (grammar:?EndMatrix); [t] \"Ende Matrize\"" ], [ "Action", "vector-end-vector", - "[n] . (grammar:EndMatrix); [t] \"Ende Vektor\"" + "[n] . (grammar:?EndMatrix); [t] \"Ende Vektor\"" ], [ "Action", "vector-end-vector-endvector", - "[n] . (grammar:EndMatrix); [t] \"Ende Vektor\"" + "[n] . (grammar:?EndMatrix); [t] \"Ende Vektor\"" ], [ "Action", "vector-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"Ende Determinante\"" + "[n] . (grammar:?EndMatrix); [t] \"Ende Determinante\"" ], [ "Action", @@ -847,12 +847,12 @@ [ "Action", "lines-summary", - "[p] (pause:short); [t] count(children/*); [t] \"Zeilen\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"Zeilen\"; [n] . (grammar:?layoutSummary)" ], [ "Action", "cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"Fälle\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"Fälle\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -887,7 +887,7 @@ [ "Action", "lines-cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"Fälle\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"Fälle\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -897,7 +897,7 @@ [ "Action", "lines-equations-summary", - "[p] (pause:short); [t] count(children/*); [t] \"Gleichungen\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"Gleichungen\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -907,7 +907,7 @@ [ "Action", "lines-steps-summary", - "[p] (pause:short); [t] count(children/*); [t] \"Rechenschritte\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"Rechenschritte\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -917,7 +917,7 @@ [ "Action", "lines-rows-summary", - "[p] (pause:short); [t] count(children/*); [t] \"Zeilen\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"Zeilen\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -927,7 +927,7 @@ [ "Action", "lines-constraints-summary", - "[p] (pause:short); [t] count(children/*); [t] \"Bedingungen\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"Bedingungen\"; [n] . (grammar:?layoutSummary)" ], [ "Action", diff --git a/mathmaps/en/rules/clearspeak_english.json b/mathmaps/en/rules/clearspeak_english.json index fab91deb2..149fbfd97 100644 --- a/mathmaps/en/rules/clearspeak_english.json +++ b/mathmaps/en/rules/clearspeak_english.json @@ -40,7 +40,7 @@ "Rule", "caley-table", "default", - "[p] (pause:short); [t] \"cayley table with\"; [t] count(children/*)-1; [t] \"elements\"; [n] . (grammar:layoutSummary)", + "[p] (pause:short); [t] \"cayley table with\"; [t] count(children/*)-1; [t] \"elements\"; [n] . (grammar:?layoutSummary)", "self::table[@role=\"cayley\"]", "not(contains(@grammar, \"layoutSummary\"))" ], @@ -48,7 +48,7 @@ "Rule", "caley-table-operator", "default", - "[p] (pause:short); [t] \"cayley table for\"; [n] children/*[1]/children/*[1]/children/*[1]; [t] \"with\"; [t] count(children/*)-1; [t] \"elements\"; [n] . (grammar:layoutSummary)", + "[p] (pause:short); [t] \"cayley table for\"; [n] children/*[1]/children/*[1]/children/*[1]; [t] \"with\"; [t] count(children/*)-1; [t] \"elements\"; [n] . (grammar:?layoutSummary)", "self::table[@role=\"cayley\"]", "name(children/*[1]/children/*[1]/children/*[1])=\"operator\"", "not(contains(@grammar, \"layoutSummary\"))" diff --git a/mathmaps/en/rules/clearspeak_english_actions.json b/mathmaps/en/rules/clearspeak_english_actions.json index a8af80780..e94d3a602 100644 --- a/mathmaps/en/rules/clearspeak_english_actions.json +++ b/mathmaps/en/rules/clearspeak_english_actions.json @@ -567,92 +567,92 @@ [ "Action", "sqrt", - "[t] \"the square root of\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"the square root of\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested", - "[p] (pause:\"short\"); [t] \"the square root of\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"the square root of\"; [n] children/*[1] (pause:short)" ], [ "Action", "negative-sqrt", - "[t] \"the negative square root of\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"the negative square root of\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "negative-sqrt-default", - "[p] (pause:\"short\"); [t] \"the negative square root of\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"the negative square root of\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus", - "[t] \"the positive square root of\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"the positive square root of\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus", - "[p] (pause:\"short\"); [t] \"the positive square root of\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"the positive square root of\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus-posnegsqrootend", - "[t] \"the positive square root of\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"the positive square root of\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus-posnegsqrootend", - "[p] (pause:\"short\"); [t] \"the positive square root of\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"the positive square root of\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"end root\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"end root\" (pause:short)" ], [ "Action", "negative-sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"end root\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"end root\" (pause:short)" ], [ "Action", "sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"end root\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"end root\" (pause:short)" ], [ "Action", "negative-sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"end root\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"end root\" (pause:short)" ], [ "Action", "cubic", - "[t] \"the cube root of\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"the cube root of\"; [n] children/*[2] (pause:short)" ], [ "Action", "cubic-nested", - "[p] (pause:short); [t] \"the cube root of\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"the cube root of\"; [n] children/*[2] (pause:short)" ], [ "Action", "root", - "[n] children/*[1] (grammar:ordinal:addArticle); [t] \"root of\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[n] children/*[1] (grammar:ordinal:addArticle); [t] \"root of\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-nested", - "[p] (pause:short); [n] children/*[1] (grammar:ordinal:addArticle); [t] \"root of\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [n] children/*[1] (grammar:ordinal:addArticle); [t] \"root of\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-endroot", - "[n] . (grammar:EndRoot); [t] \"end root\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"end root\" (pause:short)" ], [ "Action", "root-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"end root\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"end root\" (pause:short)" ], [ "Action", @@ -672,7 +672,7 @@ [ "Action", "set-prefix-operators", - "[n] . (grammar:!prefix:addArticle); [t] \"of\"" + "[n] . (grammar:addArticle); [t] \"of\"" ], [ "Action", @@ -827,17 +827,17 @@ [ "Action", "matrix-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"end matrix\"" + "[n] . (grammar:?EndMatrix); [t] \"end matrix\"" ], [ "Action", "matrix-end-vector", - "[n] . (grammar:EndMatrix); [t] \"end matrix\"" + "[n] . (grammar:?EndMatrix); [t] \"end matrix\"" ], [ "Action", "matrix-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"end determinant\"" + "[n] . (grammar:?EndMatrix); [t] \"end determinant\"" ], [ "Action", @@ -862,22 +862,22 @@ [ "Action", "vector-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"end matrix\"" + "[n] . (grammar:?EndMatrix); [t] \"end matrix\"" ], [ "Action", "vector-end-vector", - "[n] . (grammar:EndMatrix); [t] \"end vector\"" + "[n] . (grammar:?EndMatrix); [t] \"end vector\"" ], [ "Action", "vector-end-vector-endvector", - "[n] . (grammar:EndMatrix); [t] \"end vector\"" + "[n] . (grammar:?EndMatrix); [t] \"end vector\"" ], [ "Action", "vector-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"end determinant\"" + "[n] . (grammar:?EndMatrix); [t] \"end determinant\"" ], [ "Action", @@ -887,12 +887,12 @@ [ "Action", "lines-summary", - "[p] (pause:short); [t] count(children/*); [t] \"lines\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"lines\"; [n] . (grammar:?layoutSummary)" ], [ "Action", "cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"cases\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"cases\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -927,7 +927,7 @@ [ "Action", "lines-cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"cases\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"cases\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -937,7 +937,7 @@ [ "Action", "lines-equations-summary", - "[p] (pause:short); [t] count(children/*); [t] \"equations\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"equations\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -947,7 +947,7 @@ [ "Action", "lines-steps-summary", - "[p] (pause:short); [t] count(children/*); [t] \"steps\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"steps\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -957,7 +957,7 @@ [ "Action", "lines-rows-summary", - "[p] (pause:short); [t] count(children/*); [t] \"rows\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"rows\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -967,7 +967,7 @@ [ "Action", "lines-constraints-summary", - "[p] (pause:short); [t] count(children/*); [t] \"constraints\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"constraints\"; [n] . (grammar:?layoutSummary)" ], [ "Action", diff --git a/mathmaps/fr/rules/clearspeak_french_actions.json b/mathmaps/fr/rules/clearspeak_french_actions.json index 2528592a6..704ca5403 100644 --- a/mathmaps/fr/rules/clearspeak_french_actions.json +++ b/mathmaps/fr/rules/clearspeak_french_actions.json @@ -497,92 +497,92 @@ [ "Action", "sqrt", - "[t] \"la racine carrée de\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"la racine carrée de\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested", - "[p] (pause:\"short\"); [t] \"la racine carrée de\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"la racine carrée de\"; [n] children/*[1] (pause:short)" ], [ "Action", "negative-sqrt", - "[t] \"la racine carrée négative de\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"la racine carrée négative de\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "negative-sqrt-default", - "[p] (pause:\"short\"); [t] \"la racine carrée négative de\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"la racine carrée négative de\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus", - "[t] \"la racine carrée positive de\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"la racine carrée positive de\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus", - "[p] (pause:\"short\"); [t] \"la racine carrée positive de\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"la racine carrée positive de\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus-posnegsqrootend", - "[t] \"la racine carrée positive de\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"la racine carrée positive de\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus-posnegsqrootend", - "[p] (pause:\"short\"); [t] \"la racine carrée positive de\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"la racine carrée positive de\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"fin racine\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fin racine\" (pause:short)" ], [ "Action", "negative-sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"fin racine\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fin racine\" (pause:short)" ], [ "Action", "sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"fin racine\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fin racine\" (pause:short)" ], [ "Action", "negative-sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"fin racine\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fin racine\" (pause:short)" ], [ "Action", "cubic", - "[t] \"la racine cubique de\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"la racine cubique de\"; [n] children/*[2] (pause:short)" ], [ "Action", "cubic-nested", - "[p] (pause:short); [t] \"la racine cubique de\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"la racine cubique de\"; [n] children/*[2] (pause:short)" ], [ "Action", "root", - "[t] \"la\"; [n] children/*[1] (grammar:ordinal); [t] \"racine de\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"la\"; [n] children/*[1] (grammar:ordinal); [t] \"racine de\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-nested", - "[p] (pause:short); [t] \"la\"; [n] children/*[1] (grammar:ordinal); [t] \"racine de\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"la\"; [n] children/*[1] (grammar:ordinal); [t] \"racine de\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-endroot", - "[n] . (grammar:EndRoot); [t] \"fin racine\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fin racine\" (pause:short)" ], [ "Action", "root-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"fin racine\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fin racine\" (pause:short)" ], [ "Action", @@ -602,7 +602,7 @@ [ "Action", "set-prefix-operators", - "[t] \"le\"; [n] . (grammar:!prefix); [t] \"de\"" + "[t] \"le\"; [n] . ; [t] \"de\"" ], [ "Action", @@ -752,17 +752,17 @@ [ "Action", "matrix-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"fin matrice\"" + "[n] . (grammar:?EndMatrix); [t] \"fin matrice\"" ], [ "Action", "matrix-end-vector", - "[n] . (grammar:EndMatrix); [t] \"fin matrice\"" + "[n] . (grammar:?EndMatrix); [t] \"fin matrice\"" ], [ "Action", "matrix-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"fin déterminant\"" + "[n] . (grammar:?EndMatrix); [t] \"fin déterminant\"" ], [ "Action", @@ -787,22 +787,22 @@ [ "Action", "vector-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"fin matrice\"" + "[n] . (grammar:?EndMatrix); [t] \"fin matrice\"" ], [ "Action", "vector-end-vector", - "[n] . (grammar:EndMatrix); [t] \"fin vecteur\"" + "[n] . (grammar:?EndMatrix); [t] \"fin vecteur\"" ], [ "Action", "vector-end-vector-endvector", - "[n] . (grammar:EndMatrix); [t] \"fin vecteur\"" + "[n] . (grammar:?EndMatrix); [t] \"fin vecteur\"" ], [ "Action", "vector-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"fin déterminant\"" + "[n] . (grammar:?EndMatrix); [t] \"fin déterminant\"" ], [ "Action", @@ -812,12 +812,12 @@ [ "Action", "lines-summary", - "[p] (pause:short); [t] count(children/*); [t] \"lignes\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"lignes\"; [n] . (grammar:?layoutSummary)" ], [ "Action", "cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"cas\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"cas\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -852,7 +852,7 @@ [ "Action", "lines-cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"cas\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"cas\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -862,7 +862,7 @@ [ "Action", "lines-equations-summary", - "[p] (pause:short); [t] count(children/*); [t] \"équations\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"équations\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -872,7 +872,7 @@ [ "Action", "lines-steps-summary", - "[p] (pause:short); [t] count(children/*); [t] \" étapes\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \" étapes\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -882,7 +882,7 @@ [ "Action", "lines-rows-summary", - "[p] (pause:short); [t] count(children/*); [t] \"colonnes\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"colonnes\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -892,7 +892,7 @@ [ "Action", "lines-constraints-summary", - "[p] (pause:short); [t] count(children/*); [t] \"contraintes\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"contraintes\"; [n] . (grammar:?layoutSummary)" ], [ "Action", diff --git a/mathmaps/hi/rules/clearspeak_hindi_actions.json b/mathmaps/hi/rules/clearspeak_hindi_actions.json index 4b9e60821..f75d60967 100644 --- a/mathmaps/hi/rules/clearspeak_hindi_actions.json +++ b/mathmaps/hi/rules/clearspeak_hindi_actions.json @@ -557,22 +557,22 @@ [ "Action", "sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"मूल समाप्त\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"मूल समाप्त\" (pause:short)" ], [ "Action", "negative-sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"मूल समाप्त\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"मूल समाप्त\" (pause:short)" ], [ "Action", "sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"मूल समाप्त\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"मूल समाप्त\" (pause:short)" ], [ "Action", "negative-sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"मूल समाप्त\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"मूल समाप्त\" (pause:short)" ], [ "Action", @@ -597,12 +597,12 @@ [ "Action", "root-endroot", - "[n] . (grammar:EndRoot); [t] \"मूल समाप्त\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"मूल समाप्त\" (pause:short)" ], [ "Action", "root-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"मूल समाप्त\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"मूल समाप्त\" (pause:short)" ], [ "Action", @@ -622,7 +622,7 @@ [ "Action", "set-prefix-operators", - "[n] . (grammar:!prefix); [t] \"का फलन\"" + "[n] . ; [t] \"का फलन\"" ], [ "Action", @@ -777,17 +777,17 @@ [ "Action", "matrix-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"आव्यूह समाप्त\"" + "[n] . (grammar:?EndMatrix); [t] \"आव्यूह समाप्त\"" ], [ "Action", "matrix-end-vector", - "[n] . (grammar:EndMatrix); [t] \"आव्यूह समाप्त\"" + "[n] . (grammar:?EndMatrix); [t] \"आव्यूह समाप्त\"" ], [ "Action", "matrix-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"सारणिक समाप्त\"" + "[n] . (grammar:?EndMatrix); [t] \"सारणिक समाप्त\"" ], [ "Action", @@ -812,22 +812,22 @@ [ "Action", "vector-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"आव्यूह समाप्त\"" + "[n] . (grammar:?EndMatrix); [t] \"आव्यूह समाप्त\"" ], [ "Action", "vector-end-vector", - "[n] . (grammar:EndMatrix); [t] \"सदिश समाप्त\"" + "[n] . (grammar:?EndMatrix); [t] \"सदिश समाप्त\"" ], [ "Action", "vector-end-vector-endvector", - "[n] . (grammar:EndMatrix); [t] \"सदिश समाप्त\"" + "[n] . (grammar:?EndMatrix); [t] \"सदिश समाप्त\"" ], [ "Action", "vector-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"सारणिक समाप्त\"" + "[n] . (grammar:?EndMatrix); [t] \"सारणिक समाप्त\"" ], [ "Action", @@ -837,12 +837,12 @@ [ "Action", "lines-summary", - "[p] (pause:short); [t] count(children/*); [t] \"रेखाएं\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"रेखाएं\"; [n] . (grammar:?layoutSummary)" ], [ "Action", "cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"फलन उपशर्त\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"फलन उपशर्त\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -877,7 +877,7 @@ [ "Action", "lines-cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"फलन उपशर्त\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"फलन उपशर्त\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -887,7 +887,7 @@ [ "Action", "lines-equations-summary", - "[p] (pause:short); [t] count(children/*); [t] \"समीकरण\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"समीकरण\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -897,7 +897,7 @@ [ "Action", "lines-steps-summary", - "[p] (pause:short); [t] count(children/*); [t] \"चरण\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"चरण\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -907,7 +907,7 @@ [ "Action", "lines-rows-summary", - "[p] (pause:short); [t] count(children/*); [t] \"पंक्तियाँ\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"पंक्तियाँ\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -917,7 +917,7 @@ [ "Action", "lines-constraints-summary", - "[p] (pause:short); [t] count(children/*); [t] \"व्यवरोध\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"व्यवरोध\"; [n] . (grammar:?layoutSummary)" ], [ "Action", diff --git a/mathmaps/it/rules/clearspeak_italian_actions.json b/mathmaps/it/rules/clearspeak_italian_actions.json index 025fd5b92..4bbd4710f 100644 --- a/mathmaps/it/rules/clearspeak_italian_actions.json +++ b/mathmaps/it/rules/clearspeak_italian_actions.json @@ -567,92 +567,92 @@ [ "Action", "sqrt", - "[t] \"radice quadrata di\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"radice quadrata di\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested", - "[p] (pause:short); [t] \"radice quadrata di\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"radice quadrata di\"; [n] children/*[1] (pause:short)" ], [ "Action", "negative-sqrt", - "[t] \"meno radice quadrata di\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"meno radice quadrata di\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "negative-sqrt-default", - "[p] (pause:short); [t] \"meno radice quadrata di\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"meno radice quadrata di\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus", - "[t] \"più radice quadrata di\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"più radice quadrata di\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus", - "[p] (pause:short); [t] \"più radice quadrata di\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"più radice quadrata di\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus-posnegsqrootend", - "[t] \"più radice quadrata di\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"più radice quadrata di\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus-posnegsqrootend", - "[p] (pause:short); [t] \"più radice quadrata di\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"più radice quadrata di\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"fine radice\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fine radice\" (pause:short)" ], [ "Action", "negative-sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"fine radice\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fine radice\" (pause:short)" ], [ "Action", "sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"fine radice\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fine radice\" (pause:short)" ], [ "Action", "negative-sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"fine radice\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fine radice\" (pause:short)" ], [ "Action", "cubic", - "[t] \"radice cubica di\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"radice cubica di\"; [n] children/*[2] (pause:short)" ], [ "Action", "cubic-nested", - "[p] (pause:short); [t] \"radice cubica di\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"radice cubica di\"; [n] children/*[2] (pause:short)" ], [ "Action", "root", - "[t] \"radice\"; [n] children/*[1] (grammar:ordinal:gender=\"f\"); [t] \"di\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"radice\"; [n] children/*[1] (grammar:ordinal:gender=\"f\"); [t] \"di\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-nested", - "[p] (pause:short); [t] \"radice\"; [n] children/*[1] (grammar:ordinal:gender=\"f\"); [t] \"di\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"radice\"; [n] children/*[1] (grammar:ordinal:gender=\"f\"); [t] \"di\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-endroot", - "[n] . (grammar:EndRoot); [t] \"fine radice\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fine radice\" (pause:short)" ], [ "Action", "root-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"fine radice\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"fine radice\" (pause:short)" ], [ "Action", @@ -672,7 +672,7 @@ [ "Action", "set-prefix-operators", - "[t] \"il\"; [n] . (grammar:!prefix); [t] \"di\"" + "[t] \"il\"; [n] . ; [t] \"di\"" ], [ "Action", @@ -827,17 +827,17 @@ [ "Action", "matrix-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"fine matrice\"" + "[n] . (grammar:?EndMatrix); [t] \"fine matrice\"" ], [ "Action", "matrix-end-vector", - "[n] . (grammar:EndMatrix); [t] \"fine matrice\"" + "[n] . (grammar:?EndMatrix); [t] \"fine matrice\"" ], [ "Action", "matrix-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"fine determinante\"" + "[n] . (grammar:?EndMatrix); [t] \"fine determinante\"" ], [ "Action", @@ -862,22 +862,22 @@ [ "Action", "vector-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"fine matrice\"" + "[n] . (grammar:?EndMatrix); [t] \"fine matrice\"" ], [ "Action", "vector-end-vector", - "[n] . (grammar:EndMatrix); [t] \"fine vettore\"" + "[n] . (grammar:?EndMatrix); [t] \"fine vettore\"" ], [ "Action", "vector-end-vector-endvector", - "[n] . (grammar:EndMatrix); [t] \"fine vettore\"" + "[n] . (grammar:?EndMatrix); [t] \"fine vettore\"" ], [ "Action", "vector-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"fine determinante\"" + "[n] . (grammar:?EndMatrix); [t] \"fine determinante\"" ], [ "Action", @@ -887,12 +887,12 @@ [ "Action", "lines-summary", - "[p] (pause:short); [t] count(children/*); [t] \"linee\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"linee\"; [n] . (grammar:?layoutSummary)" ], [ "Action", "cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"casi\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"casi\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -927,7 +927,7 @@ [ "Action", "lines-cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"caso\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"caso\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -937,7 +937,7 @@ [ "Action", "lines-equations-summary", - "[p] (pause:short); [t] count(children/*); [t] \"equazioni\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"equazioni\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -947,7 +947,7 @@ [ "Action", "lines-steps-summary", - "[p] (pause:short); [t] count(children/*); [t] \"passi\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"passi\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -957,7 +957,7 @@ [ "Action", "lines-rows-summary", - "[p] (pause:short); [t] count(children/*); [t] \"riga\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"riga\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -967,7 +967,7 @@ [ "Action", "lines-constraints-summary", - "[p] (pause:short); [t] count(children/*); [t] \"vincoli\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"vincoli\"; [n] . (grammar:?layoutSummary)" ], [ "Action", diff --git a/mathmaps/nb/rules/clearspeak_bokmal_actions.json b/mathmaps/nb/rules/clearspeak_bokmal_actions.json index e0b0eebb5..dfd96faeb 100644 --- a/mathmaps/nb/rules/clearspeak_bokmal_actions.json +++ b/mathmaps/nb/rules/clearspeak_bokmal_actions.json @@ -552,92 +552,92 @@ [ "Action", "sqrt", - "[t] \"kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested", - "[p] (pause:\"short\"); [t] \"kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "negative-sqrt", - "[t] \"den negative kvadratroten av\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"den negative kvadratroten av\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "negative-sqrt-default", - "[p] (pause:\"short\"); [t] \"den negative kvadratroten av\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"den negative kvadratroten av\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus", - "[t] \"den positive kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"den positive kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus", - "[p] (pause:\"short\"); [t] \"den positive kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"den positive kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus-posnegsqrootend", - "[t] \"den positive kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"den positive kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus-posnegsqrootend", - "[p] (pause:\"short\"); [t] \"den positive kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"den positive kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "negative-sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "negative-sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "cubic", - "[t] \"kubikkroten av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"kubikkroten av\"; [n] children/*[2] (pause:short)" ], [ "Action", "cubic-nested", - "[p] (pause:short); [t] \"kubikkroten av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"kubikkroten av\"; [n] children/*[2] (pause:short)" ], [ "Action", "root", - "[n] children/*[1] (grammar:ordinal); [t] \"roten av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[n] children/*[1] (grammar:ordinal); [t] \"roten av\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-nested", - "[p] (pause:short); [n] children/*[1] (grammar:ordinal); [t] \"roten av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [n] children/*[1] (grammar:ordinal); [t] \"roten av\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-endroot", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "root-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", @@ -657,7 +657,7 @@ [ "Action", "set-prefix-operators", - "[n] . (grammar:!prefix:addArticle); [t] \"av\"" + "[n] . (grammar:addArticle); [t] \"av\"" ], [ "Action", @@ -812,17 +812,17 @@ [ "Action", "matrix-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"slutt matrise\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt matrise\"" ], [ "Action", "matrix-end-vector", - "[n] . (grammar:EndMatrix); [t] \"slutt matrise\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt matrise\"" ], [ "Action", "matrix-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"slutt determinant\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt determinant\"" ], [ "Action", @@ -847,22 +847,22 @@ [ "Action", "vector-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"slutt matrise\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt matrise\"" ], [ "Action", "vector-end-vector", - "[n] . (grammar:EndMatrix); [t] \"slutt vektor\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt vektor\"" ], [ "Action", "vector-end-vector-endvector", - "[n] . (grammar:EndMatrix); [t] \"slutt vektor\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt vektor\"" ], [ "Action", "vector-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"slutt determinant\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt determinant\"" ], [ "Action", @@ -872,12 +872,12 @@ [ "Action", "lines-summary", - "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:?layoutSummary)" ], [ "Action", "cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"tilfeller\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"tilfeller\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -912,7 +912,7 @@ [ "Action", "lines-cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"tilfeller\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"tilfeller\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -922,7 +922,7 @@ [ "Action", "lines-equations-summary", - "[p] (pause:short); [t] count(children/*); [t] \"ligninger\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"ligninger\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -932,7 +932,7 @@ [ "Action", "lines-steps-summary", - "[p] (pause:short); [t] count(children/*); [t] \"steg\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"steg\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -942,7 +942,7 @@ [ "Action", "lines-rows-summary", - "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -952,7 +952,7 @@ [ "Action", "lines-constraints-summary", - "[p] (pause:short); [t] count(children/*); [t] \"betingelser\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"betingelser\"; [n] . (grammar:?layoutSummary)" ], [ "Action", diff --git a/mathmaps/nn/rules/clearspeak_nynorsk_actions.json b/mathmaps/nn/rules/clearspeak_nynorsk_actions.json index 9ee27bfa0..6f475e6ff 100644 --- a/mathmaps/nn/rules/clearspeak_nynorsk_actions.json +++ b/mathmaps/nn/rules/clearspeak_nynorsk_actions.json @@ -552,92 +552,92 @@ [ "Action", "sqrt", - "[t] \"kvadratrota av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"kvadratrota av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested", - "[p] (pause:\"short\"); [t] \"kvadratrota av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"kvadratrota av\"; [n] children/*[1] (pause:short)" ], [ "Action", "negative-sqrt", - "[t] \"den negative kvadratrota av\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"den negative kvadratrota av\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "negative-sqrt-default", - "[p] (pause:\"short\"); [t] \"den negative kvadratrota av\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"den negative kvadratrota av\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus", - "[t] \"den positive kvadratrota av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"den positive kvadratrota av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus", - "[p] (pause:\"short\"); [t] \"den positive kvadratrota av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"den positive kvadratrota av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus-posnegsqrootend", - "[t] \"den positive kvadratrota av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"den positive kvadratrota av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus-posnegsqrootend", - "[p] (pause:\"short\"); [t] \"den positive kvadratrota av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"den positive kvadratrota av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "negative-sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "negative-sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "cubic", - "[t] \"kubikkrota av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"kubikkrota av\"; [n] children/*[2] (pause:short)" ], [ "Action", "cubic-nested", - "[p] (pause:short); [t] \"kubikkrota av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"kubikkrota av\"; [n] children/*[2] (pause:short)" ], [ "Action", "root", - "[n] children/*[1] (grammar:ordinal); [t] \"rota av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[n] children/*[1] (grammar:ordinal); [t] \"rota av\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-nested", - "[p] (pause:short); [n] children/*[1] (grammar:ordinal); [t] \"rota av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [n] children/*[1] (grammar:ordinal); [t] \"rota av\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-endroot", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", "root-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"slutt rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slutt rot\" (pause:short)" ], [ "Action", @@ -657,7 +657,7 @@ [ "Action", "set-prefix-operators", - "[n] . (grammar:!prefix:addArticle); [t] \"av\"" + "[n] . (grammar:addArticle); [t] \"av\"" ], [ "Action", @@ -812,17 +812,17 @@ [ "Action", "matrix-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"slutt matrise\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt matrise\"" ], [ "Action", "matrix-end-vector", - "[n] . (grammar:EndMatrix); [t] \"slutt matrise\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt matrise\"" ], [ "Action", "matrix-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"slutt determinant\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt determinant\"" ], [ "Action", @@ -847,22 +847,22 @@ [ "Action", "vector-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"slutt matrise\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt matrise\"" ], [ "Action", "vector-end-vector", - "[n] . (grammar:EndMatrix); [t] \"slutt vektor\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt vektor\"" ], [ "Action", "vector-end-vector-endvector", - "[n] . (grammar:EndMatrix); [t] \"slutt vektor\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt vektor\"" ], [ "Action", "vector-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"slutt determinant\"" + "[n] . (grammar:?EndMatrix); [t] \"slutt determinant\"" ], [ "Action", @@ -872,12 +872,12 @@ [ "Action", "lines-summary", - "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:?layoutSummary)" ], [ "Action", "cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"tilfelle\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"tilfelle\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -912,7 +912,7 @@ [ "Action", "lines-cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"tilfelle\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"tilfelle\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -922,7 +922,7 @@ [ "Action", "lines-equations-summary", - "[p] (pause:short); [t] count(children/*); [t] \"likningar\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"likningar\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -932,7 +932,7 @@ [ "Action", "lines-steps-summary", - "[p] (pause:short); [t] count(children/*); [t] \"steg\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"steg\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -942,7 +942,7 @@ [ "Action", "lines-rows-summary", - "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -952,7 +952,7 @@ [ "Action", "lines-constraints-summary", - "[p] (pause:short); [t] count(children/*); [t] \"føresetnadar\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"føresetnadar\"; [n] . (grammar:?layoutSummary)" ], [ "Action", diff --git a/mathmaps/sv/rules/clearspeak_swedish_actions.json b/mathmaps/sv/rules/clearspeak_swedish_actions.json index 1c99f43b9..4a466a38b 100644 --- a/mathmaps/sv/rules/clearspeak_swedish_actions.json +++ b/mathmaps/sv/rules/clearspeak_swedish_actions.json @@ -557,92 +557,92 @@ [ "Action", "sqrt", - "[t] \"kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested", - "[p] (pause:\"short\"); [t] \"kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "negative-sqrt", - "[t] \"den negativa kvadratroten av\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"den negativa kvadratroten av\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "negative-sqrt-default", - "[p] (pause:\"short\"); [t] \"den negativa kvadratroten av\"; [n] children/*[1]/children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"den negativa kvadratroten av\"; [n] children/*[1]/children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus", - "[t] \"den positiva kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"den positiva kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus", - "[p] (pause:\"short\"); [t] \"den positiva kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"den positiva kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-plus-minus-posnegsqrootend", - "[t] \"den positiva kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[t] \"den positiva kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-nested-plus-minus-posnegsqrootend", - "[p] (pause:\"short\"); [t] \"den positiva kvadratroten av\"; [n] children/*[1] (pause:short, grammar:!EndRoot)" + "[p] (pause:\"short\"); [t] \"den positiva kvadratroten av\"; [n] children/*[1] (pause:short)" ], [ "Action", "sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"slut rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slut rot\" (pause:short)" ], [ "Action", "negative-sqrt-endroot", - "[n] . (grammar:EndRoot); [t] \"slut rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slut rot\" (pause:short)" ], [ "Action", "sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"slut rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slut rot\" (pause:short)" ], [ "Action", "negative-sqrt-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"slut rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slut rot\" (pause:short)" ], [ "Action", "cubic", - "[t] \"kubikroten av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[t] \"kubikroten av\"; [n] children/*[2] (pause:short)" ], [ "Action", "cubic-nested", - "[p] (pause:short); [t] \"kubikroten av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [t] \"kubikroten av\"; [n] children/*[2] (pause:short)" ], [ "Action", "root", - "[n] children/*[1] (grammar:ordinal); [t] \"roten av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[n] children/*[1] (grammar:ordinal); [t] \"roten av\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-nested", - "[p] (pause:short); [n] children/*[1] (grammar:ordinal); [t] \"roten av\"; [n] children/*[2] (pause:short, grammar:!EndRoot)" + "[p] (pause:short); [n] children/*[1] (grammar:ordinal); [t] \"roten av\"; [n] children/*[2] (pause:short)" ], [ "Action", "root-endroot", - "[n] . (grammar:EndRoot); [t] \"slut rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slut rot\" (pause:short)" ], [ "Action", "root-posnegsqrootend", - "[n] . (grammar:EndRoot); [t] \"slut rot\" (pause:short)" + "[n] . (grammar:?EndRoot); [t] \"slut rot\" (pause:short)" ], [ "Action", @@ -662,7 +662,7 @@ [ "Action", "set-prefix-operators", - "[n] . (grammar:!prefix); [t] \"av\"" + "[n] . ; [t] \"av\"" ], [ "Action", @@ -817,17 +817,17 @@ [ "Action", "matrix-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"slut matris\"" + "[n] . (grammar:?EndMatrix); [t] \"slut matris\"" ], [ "Action", "matrix-end-vector", - "[n] . (grammar:EndMatrix); [t] \"slut matris\"" + "[n] . (grammar:?EndMatrix); [t] \"slut matris\"" ], [ "Action", "matrix-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"slut determinant\"" + "[n] . (grammar:?EndMatrix); [t] \"slut determinant\"" ], [ "Action", @@ -852,22 +852,22 @@ [ "Action", "vector-end-matrix", - "[n] . (grammar:EndMatrix); [t] \"slut matris\"" + "[n] . (grammar:?EndMatrix); [t] \"slut matris\"" ], [ "Action", "vector-end-vector", - "[n] . (grammar:EndMatrix); [t] \"slut vektor\"" + "[n] . (grammar:?EndMatrix); [t] \"slut vektor\"" ], [ "Action", "vector-end-vector-endvector", - "[n] . (grammar:EndMatrix); [t] \"slut vektor\"" + "[n] . (grammar:?EndMatrix); [t] \"slut vektor\"" ], [ "Action", "vector-end-determinant", - "[n] . (grammar:EndMatrix); [t] \"slut determinant\"" + "[n] . (grammar:?EndMatrix); [t] \"slut determinant\"" ], [ "Action", @@ -877,12 +877,12 @@ [ "Action", "lines-summary", - "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:?layoutSummary)" ], [ "Action", "cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"fall\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"fall\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -917,7 +917,7 @@ [ "Action", "lines-cases-summary", - "[p] (pause:short); [t] count(children/*); [t] \"fall\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"fall\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -927,7 +927,7 @@ [ "Action", "lines-equations-summary", - "[p] (pause:short); [t] count(children/*); [t] \"ekvationer\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"ekvationer\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -937,7 +937,7 @@ [ "Action", "lines-steps-summary", - "[p] (pause:short); [t] count(children/*); [t] \"steg\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"steg\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -947,7 +947,7 @@ [ "Action", "lines-rows-summary", - "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"rader\"; [n] . (grammar:?layoutSummary)" ], [ "Action", @@ -957,7 +957,7 @@ [ "Action", "lines-constraints-summary", - "[p] (pause:short); [t] count(children/*); [t] \"begränsning\"; [n] . (grammar:layoutSummary)" + "[p] (pause:short); [t] count(children/*); [t] \"begränsning\"; [n] . (grammar:?layoutSummary)" ], [ "Action", diff --git a/sre-tests b/sre-tests index 129324f17..6c7690639 160000 --- a/sre-tests +++ b/sre-tests @@ -1 +1 @@ -Subproject commit 129324f17f6e21b9ec217ab2f10c5cc60761fbf1 +Subproject commit 6c7690639faae9d66dd65bb17e7b058f106f4903 diff --git a/ts/rule_engine/grammar.ts b/ts/rule_engine/grammar.ts index 12da1f925..c7f292ee3 100644 --- a/ts/rule_engine/grammar.ts +++ b/ts/rule_engine/grammar.ts @@ -72,6 +72,8 @@ export class Grammar { private stateStack_: State[] = []; + private singles: string[] = []; + /** * @returns The Grammar object. */ @@ -278,6 +280,18 @@ export class Grammar { return pairs.join(' '); } + /** + * Processes all the grammar elements that are only propagated once. + */ + public processSingles() { + let assignment: State = {}; + for (let single of this.singles) { + assignment[single] = false; + } + this.singles = []; + this.pushState(assignment); + } + /** * Saves the current state of the grammar object. * @@ -285,8 +299,13 @@ export class Grammar { * pairs. */ public pushState(assignment: { [key: string]: Value }) { - for (const key in assignment) { - assignment[key] = this.setParameter(key, assignment[key]); + for (let [key, value] of Object.entries(assignment)) { + if (key.match(/^\?/)) { + delete assignment[key]; + key = key.slice(1); + this.singles.push(key); + } + assignment[key] = this.setParameter(key, value); } this.stateStack_.push(assignment); } diff --git a/ts/rule_engine/speech_rule_engine.ts b/ts/rule_engine/speech_rule_engine.ts index c5dd93ae5..f4d404a45 100644 --- a/ts/rule_engine/speech_rule_engine.ts +++ b/ts/rule_engine/speech_rule_engine.ts @@ -330,6 +330,7 @@ export class SpeechRuleEngine { rule.dynamicCstr.toString(), (engine.mode !== EngineConst.Mode.HTTP ? node : node).toString() ]); + Grammar.getInstance().processSingles(); const context = rule.context; const components = rule.action.components; result = []; @@ -423,6 +424,7 @@ export class SpeechRuleEngine { Engine.getInstance().setDynamicCstr(saveEngine); } } + Grammar.getInstance().popState(); return result; } diff --git a/ts/speech_rules/clearspeak_util.ts b/ts/speech_rules/clearspeak_util.ts index 05ffd5882..e510cae54 100644 --- a/ts/speech_rules/clearspeak_util.ts +++ b/ts/speech_rules/clearspeak_util.ts @@ -33,11 +33,23 @@ import { SemanticRole, SemanticType } from '../semantic_tree/semantic_meaning'; import { SemanticNode } from '../semantic_tree/semantic_node'; /** - * Count list of nodes and concatenate this with the context string, adding a - * colon at the end. Returns a closure with a local state. + * Count list of nodes and combine this according to the formatted context + * string. Formatting can consist of up to three, dash separated parts: + * + * Part 1 is the regular context string that is passed to the context + * function. For example context:"Column" returns `Column 1`, `Column 2`, ... + * + * Part 2 is a separator that is concatenated at the end of the computed + * context. For example context:"Column-:" returns `Column 1:`, `Column 2:`, ... + * + * Part 3 is a initial string that is prefixed only to the very first context + * string. For example context: "Column-:-Start " returns `Start Column 1:`, + * `Column 2:`, ... + * + * Returns a closure with a local state. * * @param nodes A node array. - * @param context A context string. + * @param context The formatted context string. * @returns A function returning a string. */ export function nodeCounter(