Details
-
Bug
-
Resolution: Unresolved
-
Major
-
5.1.1.FINAL
-
None
Description
The DSL parser accepts variable definitions
{name} {name:pattern} {name:q:pattern}but also
{name:xyz:}a) What is the purpose of "q"? It is tested in DSLMapWalker and influences what is used as a pattern, sometimes overriding a specified pattern: q pattern use-for-matching null null (.?) null pattern pattern X null (.?) X pattern pattern ENUM – (.?) DATE – (.?) BOOLEAN – (.*?)
b) A "null" pattern is used for matching if
{name:xyz:}is used.
I think the "q" is a relic and should be discarded. A ':' as delimiter in an area where any character is possible (as in a pattern) is bound to create ambiguities.
The "C" entry in the DSL below produces "null" in the pattern trying to match a condition; i.e., the string "null" is actually matched.
A, E, F result in pattern "(.*?)"
B, D use the pattern ("Boolean" or "Double", respectively)
DSL:
[when][]A
()
[when][]B
()
[when][]C
()
[when][]D
()
[when][]E
()
[when][]F
()
DSLR:
rule "rule 1"
when
A Integer value
B Boolean value
C Character value # fails; use "null" instead of Character to get a match
D Double value
E Enum value
F Float value
then
> System.out.println( "hello" );
end