@@ -144,6 +144,9 @@ TOKEN [ IGNORE_CASE ]: /* basics */
144144 | < DIV: "/" >
145145
146146 | < NEW: "NEW" >
147+
148+ | < ID: "ID" >
149+ | < VERSION: "VERSION" >
147150
148151 | < ALL: "ALL" >
149152 | < ANY: "ANY" >
@@ -886,14 +889,15 @@ void all_expression() #ALL : { }
886889
887890void comparison_expression() : { }
888891{
889- // comparison_expression ::= string_value comparison_operator {string_expression | all_or_any_expression} | boolean_value { =|<>} {boolean_expression | all_or_any_expression} | datetime_primary comparison_operator {datetime_expression | all_or_any_expression} | entity_bean_value { = | <> } {entity_bean_expression | all_or_any_expression} | arithmetic_value comparison_operator {arithmetic_expression | all_or_any_expression
892+ // comparison_expression ::= string_value comparison_operator {string_expression | all_or_any_expression} | boolean_value { =|<>} {boolean_expression | all_or_any_expression} | datetime_primary comparison_operator {datetime_expression | all_or_any_expression} | entity_bean_value { = | <> } {entity_bean_expression | all_or_any_expression} | arithmetic_value comparison_operator {arithmetic_expression | all_or_any_expression | entity_id_or_version_function {= | <>} input_parameter | entity_type_expression {= | <>} entity_type_expression}
890893
891894 LOOKAHEAD(arithmetic_comp()) arithmetic_comp() |
892895 LOOKAHEAD(string_comp()) string_comp() |
893896 LOOKAHEAD(boolean_comp()) boolean_comp() |
894897 LOOKAHEAD(enum_comp()) enum_comp() |
895898 LOOKAHEAD(datetime_comp()) datetime_comp() |
896899 LOOKAHEAD(entity_comp()) entity_comp() |
900+ LOOKAHEAD(entity_id_or_version_comp()) entity_id_or_version_comp() |
897901 LOOKAHEAD(entity_type_comp()) entity_type_comp()
898902}
899903
@@ -1040,6 +1044,11 @@ void entity_type_comp() : { }
10401044 )
10411045}
10421046
1047+ void entity_id_or_version_comp() : { }
1048+ {
1049+ entity_id_or_version_function() ( <EQ> input_parameter() #EQUALS(2) | <NE> input_parameter() #NOTEQUALS(2))
1050+ }
1051+
10431052void type_discriminator() #TYPE : { }
10441053{
10451054 <TYPE> "(" (LOOKAHEAD(path()) path()
@@ -1064,7 +1073,24 @@ void scalar_expression() #SCALAREXPRESSION : { }
10641073 LOOKAHEAD(datetime_primary()) datetime_primary() |
10651074 LOOKAHEAD(enum_primary()) enum_primary() |
10661075 LOOKAHEAD(boolean_primary()) boolean_primary() |
1067- LOOKAHEAD(entity_type_expression()) entity_type_expression()
1076+ LOOKAHEAD(entity_type_expression()) entity_type_expression() |
1077+ LOOKAHEAD(entity_id_or_version_function()) entity_id_or_version_function()
1078+ }
1079+
1080+ void entity_id_or_version_function(): { }
1081+ {
1082+ id_function() |
1083+ version_function()
1084+ }
1085+
1086+ void id_function() #IDFUNCTION : { }
1087+ {
1088+ <ID> "(" ( general_identification_variable() | simple_entity_expression() ) ")"
1089+ }
1090+
1091+ void version_function() #VERSIONFUNCTION : { }
1092+ {
1093+ <VERSION> "(" ( general_identification_variable() | simple_entity_expression() ) ")"
10681094}
10691095
10701096void arithmetic_cast_function() #CASTTONUMBER : { }
@@ -1567,6 +1593,8 @@ void path_component() #IDENTIFICATIONVARIABLE :
15671593 | t = <INDEX>
15681594 | t = <TYPE>
15691595 | t = <CAST>
1596+ | t = <ID>
1597+ | t = <VERSION>
15701598 | t = <STRING>
15711599 | t = <CLASS>
15721600 ) { jjtThis.setToken (t); }
0 commit comments