You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm, this might be unsolvable in the current architecture. The reason s0 %r0 fails is that the a subrule s{x: u4} starts parsing an expression after the s token, and the remaining 0 %r0 looks like a valid expression syntactically (using the modulo operator % on the literal 0 an the variable r0). To avoid any parser complexity, expression parsing is greedy. The solution, as you mention, is to introduce a separator token that looks invalid in an expression, such as a comma.
There is an exception, however, in the case of specifying everything in a single rule as s{x: u4} %r{y: u4}, where the parser will look ahead, and expression parsing can stop early. This means that extracting parameters into their own named subrules isn't exactly orthogonal in behavior, and the most powerful option is usually to specify everything monolithically. This can be annoying and might be worth improving in the future.
I have some asm syntax which allows something like this minimal reproducer to occur, but it fails to compile with a no match found error.
Changing the rule def and instruction to the following lets it compile successfully.
The issue still occurs with
--debug-no-optimize-matcher
The text was updated successfully, but these errors were encountered: