until such time as the rest of the parser is fixed.
*/
fr_sbuff_out_by_longest_prefix(&slen, &token, expr_quote_table, &in, T_BARE_WORD);
if (token == T_BARE_WORD) {
+ fr_dict_enum_value_t *enumv;
+
+ if (da) {
+ slen = fr_dict_enum_by_name_substr(&enumv, da, &in);
+ if (slen < 0) {
+ fr_strerror_printf("Failed parsing value - %s", fr_strerror());
+ FR_SBUFF_ERROR_RETURN_ADJ(&in, slen);
+ }
+
+ if (slen > 0) {
+ xlat_exp_set_type(node, XLAT_BOX);
+ fr_value_box_copy(node, &node->data, enumv->value);
+ node->data.enumv = da;
+ xlat_exp_set_name_buffer_shallow(node, talloc_strdup(node, enumv->name));
+ goto done;
+ }
+
+ /*
+ * Else try to parse it as just a value.
+ */
+ }
+
/*
* Note that we *cannot* pass value_parse_rules_quoted[T_BARE_WORD], because that
* doesn't stop at anything. Instead, we have to pass in our bracket rules,
fr_dict_enum_value_t *enumv;
*p = *fr_sbuff_current(&our_in);
- if (!fr_dict_attr_allowed_chars[*p]) {
+ if (!fr_dict_enum_allowed_chars[*p]) {
break;
}
fr_sbuff_next(&our_in);
xlat_expr 1 < 4
match (1 < 4)
-#xlat_expr &Service-Type == Framed-User
-#match (%{Service-Type} == Framed-User)
+xlat_expr &Service-Type == Framed-User
+match (%{Service-Type} == Framed-User)
#xlat_expr 1 + (&Service-Type == Framed-User)
#match (1 + (%{Service-Type} == Framed-User))
match %(cast_expression:uint32 %(concat:1 2))
count
-match 45
+match 49
xlat_purify 1 < 4
match yes
-#xlat_purify &Service-Type == Framed-User
-#match (%{Service-Type} == Framed-User)
+xlat_purify &Service-Type == Framed-User
+match (%{Service-Type} == Framed-User)
-#xlat_purify 1 + (&Service-Type == Framed-User)
-#match (1 + (%{Service-Type} == Framed-User))
+xlat_purify 1 + (&Service-Type == Framed-User)
+match (1 + (%{Service-Type} == Framed-User))
#
# Strings of various forms
#
-#xlat_purify &Filter-Id == "foo"
-#match (%{Filter-Id} == "foo")
+xlat_purify &Filter-Id == "foo"
+match (%{Filter-Id} == "foo")
xlat_purify "foo" == "bar"
match no
match yes
count
-match 45
+match 51