Skip to content

Commit

Permalink
grammar: fix priority for bf_and_nosep vs bf_neg (revert and fix order)
Browse files Browse the repository at this point in the history
  • Loading branch information
tklip committed Dec 12, 2024
1 parent fdd46c0 commit d9944ab
Show file tree
Hide file tree
Showing 3 changed files with 965 additions and 952 deletions.
11 changes: 6 additions & 5 deletions parser/tau.tgf
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ bf => ('(' _ bf _ ')') :bf_parenthesis
| ('1' [ _ ':' _ type ]) :bf_t
| ('0' [ _ ':' _ type ]) :bf_f
| (bf (_ '&' _ | __) bf) :bf_and
| bf_and_nosep :bf_and
# bf_and alternation without a separator between operands
| ((bf_parenthesis | variable
| bf_splitter | bf_ref | bf_or
| bf_xor | bf_neg | capture)
:bf_and_nosep_1st_op bf) :bf_and
| (bf _ "'") :bf_neg
| capture.

# bf_and alternation without a separator between operands
bf_and_nosep => (bf & ~bf_constant & ~bf_and & ~bf_t & ~bf_f) bf.

# constant time constraints
constraint =>
("[" ctnvar _ "!=" _ num "]" | "[" num _ "!=" _ ctnvar "]"):ctn_neq
Expand Down Expand Up @@ -287,6 +288,6 @@ severity => ("e" | "error"):error_sym
# inline intermediate nodes and eliminate parenthesis
@inline char classes, chars, q_var, src_c,
inst_args, bf_cmd_arg, wff_cmd_arg, nf_cmd_arg, onf_cmd_arg,
normalize_cmd_arg, solve_cmd_arg, bf_and_nosep,
normalize_cmd_arg, solve_cmd_arg,
bf > bf_parenthesis > bf,
wff > wff_parenthesis > wff.
Loading

0 comments on commit d9944ab

Please sign in to comment.