Skip to content

Commit 58136c1

Browse files
More fixes to the C litmus grammar
Signed-off-by: Hernan Ponce de Leon <[email protected]>
1 parent 76504e0 commit 58136c1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dartagnan/src/main/antlr4/C11Lexer.g4

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ C11AtomicStore : 'atomic_store';
77
C11AtomicXchgExplicit : 'atomic_exchange_explicit';
88
C11AtomicXchg : 'atomic_exchange';
99
C11AtomicSCASExplicit : 'atomic_compare_exchange_strong_explicit';
10-
C11AtomicSCAS : 'atomic_compare_exchange_strong';
10+
C11AtomicSCAS : 'atomic_compare_exchange_strong' | 'SCAS';
1111
C11AtomicWCASExplicit : 'atomic_compare_exchange_weak_explicit';
12-
C11AtomicWCAS : 'atomic_compare_exchange_weak';
12+
C11AtomicWCAS : 'atomic_compare_exchange_weak' | 'WCAS';
1313
C11AtomicFence : 'atomic_thread_fence';
1414
C11AtomicAddExplicit : 'atomic_fetch_add_explicit';
1515
C11AtomicAdd : 'atomic_fetch_add';

dartagnan/src/main/antlr4/LitmusC.g4

+2
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ opCompare returns [IntCmpOp op]
248248
opArith returns [IntBinaryOp op]
249249
: Plus {$op = IntBinaryOp.ADD;}
250250
| Minus {$op = IntBinaryOp.SUB;}
251+
| Ast {$op = IntBinaryOp.MUL;}
252+
| Slash {$op = IntBinaryOp.DIV;}
251253
| Amp {$op = IntBinaryOp.AND;}
252254
| Bar {$op = IntBinaryOp.OR;}
253255
| Circ {$op = IntBinaryOp.XOR;}

0 commit comments

Comments
 (0)