glaemscribe 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/glaemresources/modes/adunaic.glaem +1 -1
- data/lib/api/mode.rb +11 -1
- data/lib/api/mode_parser.rb +8 -1
- data/lib/api/rule_group.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ac938be8dc77b127b3e9784d9cfbe163ec37899
|
4
|
+
data.tar.gz: d82fb09c96beef46dde255c16ef56c7a649336b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 271ca0d3dc63ae1dedebe002eb661e9dfb7c11430a2964ea7b628d436949ec7425945a2d2435975d7d3b1529258e2a3801dcdd2a7461f3993f995aa9604b9f94
|
7
|
+
data.tar.gz: 9093e4bb045ea72b4b9718c38ef81e2be5c34c7174535de3d4d445f7452f656ea47c43d5fa8ecbee67bf246de8b665aeea95133ba0408fa6f68f235bb73ba0e2
|
@@ -97,7 +97,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
97
97
|
{OOI} === {OO}{I} \** ôi **\
|
98
98
|
{OOU} === {OO}{U} \** ôu **\
|
99
99
|
|
100
|
-
\if reverse_o_u_tehtar == U_UP_O_DOWN
|
100
|
+
\if "reverse_o_u_tehtar == U_UP_O_DOWN"
|
101
101
|
{O_LOOP_XS} === O_TEHTA_XS
|
102
102
|
{O_LOOP_S} === O_TEHTA_S
|
103
103
|
{O_LOOP_L} === O_TEHTA_L
|
data/lib/api/mode.rb
CHANGED
@@ -80,11 +80,21 @@ module Glaemscribe
|
|
80
80
|
}
|
81
81
|
|
82
82
|
trans_options_converted = {}
|
83
|
-
|
83
|
+
|
84
84
|
# Do a conversion to values space
|
85
85
|
trans_options.each{ |oname,valname|
|
86
86
|
trans_options_converted[oname] = @options[oname].value_for_value_name(valname)
|
87
87
|
}
|
88
|
+
|
89
|
+
# Add the option defined constants to the whole list for evaluation purposes
|
90
|
+
@options.each { |oname, o|
|
91
|
+
# For enums, add the values as constants for the evaluator
|
92
|
+
if(o.type == Option::Type::ENUM)
|
93
|
+
o.values.each{ |name, val|
|
94
|
+
trans_options_converted[name] = val
|
95
|
+
}
|
96
|
+
end
|
97
|
+
}
|
88
98
|
|
89
99
|
@pre_processor.finalize(trans_options_converted)
|
90
100
|
@post_processor.finalize(trans_options_converted)
|
data/lib/api/mode_parser.rb
CHANGED
@@ -75,8 +75,15 @@ module Glaemscribe
|
|
75
75
|
}
|
76
76
|
|
77
77
|
doc.root_node.gpath("processor.rules").each{ |rules_element|
|
78
|
-
validate_presence_of_args(rules_element, 1)
|
78
|
+
validate_presence_of_args(rules_element, 1)
|
79
|
+
validate_presence_of_children(rules_element,"if",nil,1);
|
80
|
+
validate_presence_of_children(rules_element,"elsif",nil,1);
|
79
81
|
}
|
82
|
+
|
83
|
+
doc.root_node.gpath("preprocessor.if").each{ |e| validate_presence_of_args(e, 1) }
|
84
|
+
doc.root_node.gpath("preprocessor.elsif").each{ |e| validate_presence_of_args(e, 1) }
|
85
|
+
doc.root_node.gpath("postprocessor.if").each{ |e| validate_presence_of_args(e, 1) }
|
86
|
+
doc.root_node.gpath("postprocessor.elsif").each{ |e| validate_presence_of_args(e, 1) }
|
80
87
|
end
|
81
88
|
|
82
89
|
def create_if_cond_for_if_term(line, if_term, cond)
|
data/lib/api/rule_group.rb
CHANGED
@@ -70,7 +70,7 @@ module Glaemscribe
|
|
70
70
|
descend_if_tree(if_cond.child_code_block, trans_options)
|
71
71
|
break
|
72
72
|
end
|
73
|
-
rescue IfEvalError => e
|
73
|
+
rescue Eval::IfEvalError => e
|
74
74
|
@mode.errors << Glaeml::Error.new(if_cond.line, "Failed to evaluate condition '#{if_cond.expression}' (#{e})")
|
75
75
|
end
|
76
76
|
|