Re: [PATCH v3 03/13] verification/rvgen: Implement state and transition parser based on Lark
From: Gabriele Monaco
Date: Tue Jun 09 2026 - 09:24:22 EST
On Mon, 2026-06-08 at 10:56 +0200, Nam Cao wrote:
> +class ConstraintRule:
> + grammar = r'''
> + rule: condition (OP condition)*
> +
> + OP: "&&" | "||"
> +
> + condition: ENV CMP_OP VAL UNIT?
> +
> + ENV: CNAME
> +
> + CMP_OP: "==" | "<=" | "<" | ">=" | ">"
> +
> + VAL: /[0-9]+/
> + | /[A-Z_]+\(\)/
> + | /[A-Z_]+/
> + | /[a-z_]+\(\)/
> + | /[a-z_]+/
> +
> + UNIT: "ns" | "us" | "ms" | "s"
> + '''
One more (that sashiko couldn't find), we're talking about "j" as a
unit, it should be allowed also on literals (so we need to add it as a
valid UNIT).
Thanks,
Gabriele