Thread (22 messages) 22 messages, 2 authors, 2d ago

Re: [PATCH v3 03/13] verification/rvgen: Implement state and transition parser based on Lark

From: Gabriele Monaco <gmonaco@redhat.com>
Date: 2026-06-09 13:23:50
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help