WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

UIR.g4 10.6 KB
Newer Older
Kunshan Wang's avatar
Kunshan Wang committed
1
grammar UIR;
Kunshan Wang's avatar
Kunshan Wang committed
2
3

ir
Kunshan Wang's avatar
Kunshan Wang committed
4
    :   topLevelDef*
Kunshan Wang's avatar
Kunshan Wang committed
5
6
    ;

Kunshan Wang's avatar
Kunshan Wang committed
7
topLevelDef
Kunshan Wang's avatar
Kunshan Wang committed
8
9
10
11
12
13
    :   typeDef
    |   funcSigDef
    |   constDef
    |   globalDef
    |   funcDecl
    |   funcDef
Kunshan Wang's avatar
Kunshan Wang committed
14
    |   funcExpDef
Kunshan Wang's avatar
Kunshan Wang committed
15
16
17
    ;

typeDef
Kunshan Wang's avatar
Kunshan Wang committed
18
    :   '.typedef' nam=globalName '=' ctor=typeConstructor
Kunshan Wang's avatar
Kunshan Wang committed
19
20
21
    ;

funcSigDef
Kunshan Wang's avatar
Kunshan Wang committed
22
    :   '.funcsig' nam=globalName '=' ctor=funcSigConstructor
Kunshan Wang's avatar
Kunshan Wang committed
23
24
25
    ;

constDef
Kunshan Wang's avatar
Kunshan Wang committed
26
    :   '.const' nam=globalName '<' ty=type '>' '=' ctor=constConstructor
Kunshan Wang's avatar
Kunshan Wang committed
27
28
29
    ;
    
globalDef
Kunshan Wang's avatar
Kunshan Wang committed
30
    :   '.global' nam=globalName '<' ty=type '>'
Kunshan Wang's avatar
Kunshan Wang committed
31
32
33
    ;

funcDecl
Kunshan Wang's avatar
Kunshan Wang committed
34
    :   '.funcdecl' nam=globalName '<' sig=funcSig '>'
Kunshan Wang's avatar
Kunshan Wang committed
35
36
37
    ;
    
funcDef
Kunshan Wang's avatar
Kunshan Wang committed
38
    :   '.funcdef' nam=globalName 'VERSION' ver=name '<' sig=funcSig '>' body=funcBody
Kunshan Wang's avatar
Kunshan Wang committed
39
    ;
40
    
Kunshan Wang's avatar
Kunshan Wang committed
41
funcExpDef
Kunshan Wang's avatar
Kunshan Wang committed
42
    :   '.expose' nam=globalName '=' func callConv=flag cookie=constant
43
    ;
Kunshan Wang's avatar
Kunshan Wang committed
44
45

typeConstructor
Kunshan Wang's avatar
Kunshan Wang committed
46
    :   'int'    	'<' length=intLiteral '>'                	# TypeInt
Kunshan Wang's avatar
Kunshan Wang committed
47
48
    |   'float'                                                 # TypeFloat
    |   'double'                                                # TypeDouble
Kunshan Wang's avatar
Kunshan Wang committed
49
50
51
52
53
54
55
    |   'uptr'      '<' ty=type '>'                             # TypeUPtr
    |   'ufuncptr'  '<' funcSig '>'                             # TypeUFuncPtr
    |   'struct'    '<' fieldTys+=type+ '>'                     # TypeStruct
    |   'hybrid'    '<' fieldTys+=type* varTy=type '>'          # TypeHybrid
    |   'array'     '<' ty=type length=intLiteral '>'           # TypeArray
    |   'vector'    '<' ty=type length=intLiteral '>'           # TypeVector
    |   'void'                                                  # TypeVoid
Kunshan Wang's avatar
Kunshan Wang committed
56
57
58
    |   'ref'	 	'<' ty=type '>'                             # TypeRef
    |   'iref' 		'<' ty=type '>'                             # TypeIRef
    |   'weakref' 	'<' ty=type '>'                             # TypeWeakRef
Kunshan Wang's avatar
Kunshan Wang committed
59
    |   'tagref64'                                              # TypeTagRef64
Kunshan Wang's avatar
Kunshan Wang committed
60
61
62
    |   'funcref' 	'<' funcSig '>'                             # TypeFuncRef
    |   'threadref'                                             # TypeThreadRef
    |   'stackref'                                              # TypeStackRef
Kunshan Wang's avatar
Kunshan Wang committed
63
    |   'framecursorref'                                        # TypeFrameCursorRef
Kunshan Wang's avatar
Kunshan Wang committed
64
    |   'irbuilderref'                                          # TypeIRBuilderRef
Kunshan Wang's avatar
Kunshan Wang committed
65
66
67
    ;

funcSigConstructor
68
    :   '(' paramTys+=type* ')' '->' '(' retTys+=type* ')'
Kunshan Wang's avatar
Kunshan Wang committed
69
70
    ;

Kunshan Wang's avatar
Kunshan Wang committed
71
constConstructor
Kunshan Wang's avatar
Kunshan Wang committed
72
73
74
75
    :   intLiteral                  # CtorInt
    |   floatLiteral                # CtorFloat
    |   doubleLiteral               # CtorDouble
    |   'NULL'                      # CtorNull
Kunshan Wang's avatar
Kunshan Wang committed
76
77
    |   '{' globalVar* '}'          # CtorList
    |   'EXTERN' symbol=stringLiteral     # CtorExtern
Kunshan Wang's avatar
Kunshan Wang committed
78
79
    ;

Kunshan Wang's avatar
Kunshan Wang committed
80
type
Kunshan Wang's avatar
Kunshan Wang committed
81
    :   globalName
Kunshan Wang's avatar
Kunshan Wang committed
82
83
    ;

Kunshan Wang's avatar
Kunshan Wang committed
84
funcSig
Kunshan Wang's avatar
Kunshan Wang committed
85
    :   globalName
Kunshan Wang's avatar
Kunshan Wang committed
86
87
    ;

Kunshan Wang's avatar
Kunshan Wang committed
88
constant
Kunshan Wang's avatar
Kunshan Wang committed
89
    :   globalName
Kunshan Wang's avatar
Kunshan Wang committed
90
91
    ;

Kunshan Wang's avatar
Kunshan Wang committed
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
globalCell
    :   globalName
    ;

func
    :   globalName
    ;

funcVer
    :   globalName
    ;

expFunc
    :   globalName
    ;
    
globalVar
    :   globalName
Kunshan Wang's avatar
Kunshan Wang committed
110
111
    ;

Kunshan Wang's avatar
Kunshan Wang committed
112
funcBody
113
    :   '{' basicBlock+ '}'
Kunshan Wang's avatar
Kunshan Wang committed
114
115
    ;

Kunshan Wang's avatar
Kunshan Wang committed
116
basicBlock
Kunshan Wang's avatar
Kunshan Wang committed
117
118
119
120
    :   label inst+
    ;

label
Kunshan Wang's avatar
Kunshan Wang committed
121
    :   name '(' bbParam* ')' excParam? ':'
Kunshan Wang's avatar
Kunshan Wang committed
122
    ;
Kunshan Wang's avatar
Kunshan Wang committed
123
124
	
bbParam
125
	: 	'<' ty=type '>' name
Kunshan Wang's avatar
Kunshan Wang committed
126
127
128
129
130
	;
	
excParam
	: 	'[' name ']'
	;
131
132
133
134
135
	
instResults
    :   results+=name
    |   '(' results+=name* ')'
    ;
Kunshan Wang's avatar
Kunshan Wang committed
136
137

inst
138
    :   (instResults '=')? ('[' name ']')? instBody
Kunshan Wang's avatar
Kunshan Wang committed
139
140
141
142
    ;

instBody
    // Integer/FP Arithmetic
143
    :   binop '<' ty=type '>' op1=value op2=value excClause                # InstBinOp
Kunshan Wang's avatar
Kunshan Wang committed
144
145

    // Integer/FP Comparison
146
    |   cmpop '<' ty=type '>' op1=value op2=value                          # InstCmp
Kunshan Wang's avatar
Kunshan Wang committed
147
148

    // Conversions
Kunshan Wang's avatar
Kunshan Wang committed
149
    |   convop  '<' fromTy=type toTy=type '>' opnd=value                # InstConversion
Kunshan Wang's avatar
Kunshan Wang committed
150
151
    
    // Select
Kunshan Wang's avatar
Kunshan Wang committed
152
    |   'SELECT' '<' condTy=type resTy=type '>' cond=value ifTrue=value ifFalse=value       # InstSelect
Kunshan Wang's avatar
Kunshan Wang committed
153
154

    // Intra-function Control Flow
Kunshan Wang's avatar
Kunshan Wang committed
155
156
    |   'BRANCH' dest=destClause                                        # InstBranch
    |   'BRANCH2' cond=value ifTrue=destClause ifFalse=destClause       # InstBranch2
157
    |   'SWITCH' '<' ty=type '>' opnd=value defDest=destClause '{'
158
            (caseVal+=constant caseDest+=destClause )* '}'              # InstSwitch
Kunshan Wang's avatar
Kunshan Wang committed
159
160

    // Inter-function Control Flow
Kunshan Wang's avatar
Kunshan Wang committed
161
    |   'CALL' funcCallBody excClause keepaliveClause                   # InstCall
Kunshan Wang's avatar
Kunshan Wang committed
162
163
    |   'TAILCALL' funcCallBody                     # InstTailCall

164
    |   'RET' retVals                               # InstRet
Kunshan Wang's avatar
Kunshan Wang committed
165
    |   'THROW' exc=value                           # InstThrow
Kunshan Wang's avatar
Kunshan Wang committed
166
167

    // Aggregate Operations
Kunshan Wang's avatar
Kunshan Wang committed
168
169
170
171
172
    |   'EXTRACTVALUE' 		'<' ty=type intLiteral '>' 		opnd=value               				# InstExtractValue
    |   'INSERTVALUE' 		'<' ty=type intLiteral '>' 		opnd=value newVal=value   				# InstInsertValue
    |   'EXTRACTELEMENT' 	'<' seqTy=type indTy=type '>' 	opnd=value index=value                  # InstExtractElement
    |   'INSERTELEMENT' 	'<' seqTy=type indTy=type '>' 	opnd=value index=value newVal=value     # InstInsertElement
    |   'SHUFFLEVECTOR' 	'<' vecTy=type maskTy=type '>' 	vec1=value vec2=value  mask=value       # InstShuffleVector
Kunshan Wang's avatar
Kunshan Wang committed
173
174

    // Memory Operations
Kunshan Wang's avatar
Kunshan Wang committed
175
176
177
178
    |   'NEW'           '<' allocTy=type '>' excClause                              # InstNew
    |   'NEWHYBRID'     '<' allocTy=type lenTy=type '>' length=value excClause      # InstNewHybrid
    |   'ALLOCA'        '<' allocTy=type '>' excClause                              # InstAlloca
    |   'ALLOCAHYBRID'  '<' allocTy=type lenTy=type '>' length=value excClause      # InstAllocaHybrid
Kunshan Wang's avatar
Kunshan Wang committed
179
    
Kunshan Wang's avatar
Kunshan Wang committed
180
    |   'GETIREF'       '<' refTy=type '>' opnd=value                               # InstGetIRef
Kunshan Wang's avatar
Kunshan Wang committed
181

182
183
184
185
    |   'GETFIELDIREF'      (ptr='PTR'?) '<' refTy=type index=intLiteral '>' opnd=value          # InstGetFieldIRef
    |   'GETELEMIREF'       (ptr='PTR'?) '<' refTy=type indTy=type '>' opnd=value index=value    # InstGetElemIRef
    |   'SHIFTIREF'         (ptr='PTR'?) '<' refTy=type offTy=type '>' opnd=value offset=value   # InstShiftIRef
    |   'GETVARPARTIREF'    (ptr='PTR'?) '<' refTy=type '>' opnd=value                           # InstGetVarPartIRef
Kunshan Wang's avatar
Kunshan Wang committed
186
    
187
188
189
190
191
    |   'LOAD'      (ptr='PTR'?) memord? '<' type '>' loc=value excClause                        # InstLoad
    |   'STORE'     (ptr='PTR'?) memord? '<' type '>' loc=value newVal=value excClause           # InstStore
    |   'CMPXCHG'   (ptr='PTR'?) (isWeak='WEAK'?) ordSucc=memord ordFail=memord
                    '<' type '>' loc=value expected=value desired=value excClause                # InstCmpXchg
    |   'ATOMICRMW' (ptr='PTR'?) memord atomicrmwop '<' type '>' loc=value opnd=value excClause  # InstAtomicRMW
Kunshan Wang's avatar
Kunshan Wang committed
192

Kunshan Wang's avatar
Kunshan Wang committed
193
    |   'FENCE' memord                                                              # InstFence
Kunshan Wang's avatar
Kunshan Wang committed
194
195

    // Trap
Kunshan Wang's avatar
Kunshan Wang committed
196
    |   'TRAP' typeList excClause keepaliveClause                               # InstTrap
197
    |   'WATCHPOINT' wpid=intLiteral typeList
Kunshan Wang's avatar
Kunshan Wang committed
198
            dis=destClause ena=destClause ('WPEXC' '(' wpExc=destClause ')')? keepaliveClause    # InstWatchPoint
Kunshan Wang's avatar
Kunshan Wang committed
199
    |   'WPBRANCH' wpid=intLiteral dis=destClause ena=destClause                # InstWPBranch
Kunshan Wang's avatar
Kunshan Wang committed
200
201

    // Foreign Function Interface
Kunshan Wang's avatar
Kunshan Wang committed
202
    |   'CCALL' callConv=flag '<' funcTy=type funcSig '>' callee=value argList excClause keepaliveClause   # InstCCall
Kunshan Wang's avatar
Kunshan Wang committed
203
204

    // Thread and Stack Operations
Kunshan Wang's avatar
Kunshan Wang committed
205
    |   'NEWTHREAD' stack=value threadLocalClause? newStackClause excClause                 # InstNewThread
Kunshan Wang's avatar
Kunshan Wang committed
206
    |   'SWAPSTACK' swappee=value curStackClause newStackClause excClause keepaliveClause   # InstSwapStack
Kunshan Wang's avatar
Kunshan Wang committed
207

Kunshan Wang's avatar
Kunshan Wang committed
208
    // Common Instructions
Kunshan Wang's avatar
Kunshan Wang committed
209
    |   'COMMINST' nam=globalName flagList? typeList? funcSigList? argList? excClause keepaliveClause     # InstCommInst
Kunshan Wang's avatar
Kunshan Wang committed
210
    ;
211
212
213
214
215
    
retVals
    :   '(' vals+=value* ')'
    |   vals+=value
    ;
Kunshan Wang's avatar
Kunshan Wang committed
216

Kunshan Wang's avatar
Kunshan Wang committed
217
218
destClause
    :   bb argList
Kunshan Wang's avatar
Kunshan Wang committed
219
    ;
Kunshan Wang's avatar
Kunshan Wang committed
220
221
222
223
    
bb
	:	name
	;
Kunshan Wang's avatar
Kunshan Wang committed
224

Kunshan Wang's avatar
Kunshan Wang committed
225
226
value
    :   name
Kunshan Wang's avatar
Kunshan Wang committed
227
228
    ;

Kunshan Wang's avatar
Kunshan Wang committed
229
230
funcCallBody
    :   '<' funcSig '>' callee=value argList
Kunshan Wang's avatar
Kunshan Wang committed
231
232
    ;

Kunshan Wang's avatar
Kunshan Wang committed
233
excClause
Kunshan Wang's avatar
Kunshan Wang committed
234
    :   ('EXC' '(' nor=destClause exc=destClause ')')?
Kunshan Wang's avatar
Kunshan Wang committed
235
    ;
Kunshan Wang's avatar
Kunshan Wang committed
236

Kunshan Wang's avatar
Kunshan Wang committed
237
keepaliveClause
Kunshan Wang's avatar
Kunshan Wang committed
238
239
    :   ('KEEPALIVE' '(' value* ')')?
    ;
Kunshan Wang's avatar
Kunshan Wang committed
240
241
242
243
    
threadLocalClause
    :   ('THREADLOCAL' '(' value ')')
    ;
Kunshan Wang's avatar
Kunshan Wang committed
244

245
flagList
246
    :   '[' flag* ']'
247
248
    ;

Kunshan Wang's avatar
Kunshan Wang committed
249
250
typeList
    :   '<' type* '>'
Kunshan Wang's avatar
Kunshan Wang committed
251
    ;
Kunshan Wang's avatar
Kunshan Wang committed
252

253
254
255
256
funcSigList
    :   '<[' funcSig* ']>'
    ;

Kunshan Wang's avatar
Kunshan Wang committed
257
258
259
260
261
argList
    :   '(' value* ')'
    ;

curStackClause
262
263
    :   'RET_WITH' typeList             # CurStackRetWith
    |   'KILL_OLD'                      # CurStackKillOld
Kunshan Wang's avatar
Kunshan Wang committed
264
265
    ;

Kunshan Wang's avatar
Kunshan Wang committed
266
newStackClause
267
    :   'PASS_VALUES' typeList argList      # NewStackPassValue
Kunshan Wang's avatar
Kunshan Wang committed
268
269
    |   'THROW_EXC' exc=value               # NewStackThrowExc
    ;
Kunshan Wang's avatar
Kunshan Wang committed
270

Kunshan Wang's avatar
Kunshan Wang committed
271
272
273
binop
    : 'ADD' | 'SUB' | 'MUL' | 'UDIV' | 'SDIV' | 'UREM' | 'SREM' | 'SHL' | 'LSHR' | 'ASHR' | 'AND' | 'OR' | 'XOR'
    | 'FADD'| 'FSUB' | 'FMUL' | 'FDIV' | 'FREM'
Kunshan Wang's avatar
Kunshan Wang committed
274
275
    ;

Kunshan Wang's avatar
Kunshan Wang committed
276
277
278
cmpop
    : 'EQ' | 'NE' | 'SGT' | 'SLT' | 'SGE' | 'SLE' | 'UGT' | 'ULT' | 'UGE' | 'ULE'
    | 'FTRUE' | 'FFALSE'
Kunshan Wang's avatar
Kunshan Wang committed
279
280
281
282
    | 'FUNO' | 'FUEQ' | 'FUNE' | 'FUGT' | 'FULT' | 'FUGE' | 'FULE'
    | 'FORD' | 'FOEQ' | 'FONE' | 'FOGT' | 'FOLT' | 'FOGE' | 'FOLE'
    ;
    
Kunshan Wang's avatar
Kunshan Wang committed
283
convop
Kunshan Wang's avatar
Kunshan Wang committed
284
    : 'TRUNC' | 'ZEXT' | 'SEXT' | 'FPTRUNC' | 'FPEXT'
Kunshan Wang's avatar
Kunshan Wang committed
285
    | 'FPTOUI' | 'FPTOSI' | 'UITOFP' | 'SITOFP'
286
    | 'BITCAST' | 'REFCAST' | 'PTRCAST'
Kunshan Wang's avatar
Kunshan Wang committed
287
288
    ;

Kunshan Wang's avatar
Kunshan Wang committed
289
290
memord
    : 'NOT_ATOMIC' | 'RELAXED' | 'CONSUME' | 'ACQUIRE' | 'RELEASE' | 'ACQ_REL' | 'SEQ_CST'
Kunshan Wang's avatar
Kunshan Wang committed
291
292
293
    ;

atomicrmwop
Kunshan Wang's avatar
Kunshan Wang committed
294
    : 'XCHG' | 'ADD' | 'SUB' | 'AND' | 'NAND' | 'OR' | 'XOR' | 'MAX' | 'MIN' | 'UMAX' | 'UMIN'
Kunshan Wang's avatar
Kunshan Wang committed
295
    ;
Kunshan Wang's avatar
Kunshan Wang committed
296

297
flag
298
    :   FLAG
299
300
    ;

Kunshan Wang's avatar
Kunshan Wang committed
301
intLiteral
Kunshan Wang's avatar
Kunshan Wang committed
302
303
304
    :   INT_DEC
    |   INT_OCT
    |   INT_HEX
Kunshan Wang's avatar
Kunshan Wang committed
305
306
307
308
309
310
311
312
    ;

floatLiteral
    :   FP_NUM 'f'  # FloatNumber
    |   INF 'f'     # FloatInf
    |   NAN 'f'     # FloatNan
    |   'bitsf' '(' intLiteral ')'   # FloatBits
    ;
Kunshan Wang's avatar
Kunshan Wang committed
313

Kunshan Wang's avatar
Kunshan Wang committed
314
315
316
317
318
319
doubleLiteral
    :   FP_NUM 'd'  # DoubleNumber
    |   INF 'd'     # DoubleInf
    |   NAN 'd'     # DoubleNan
    |   'bitsd' '(' intLiteral ')'   # DoubleBits
    ;
Kunshan Wang's avatar
Kunshan Wang committed
320
321
322
323
    
stringLiteral
    :   STRING_LITERAL
    ;
Kunshan Wang's avatar
Kunshan Wang committed
324

Kunshan Wang's avatar
Kunshan Wang committed
325
name
Kunshan Wang's avatar
Kunshan Wang committed
326
327
    :   globalName
    |   localName
Kunshan Wang's avatar
Kunshan Wang committed
328
329
    ;

Kunshan Wang's avatar
Kunshan Wang committed
330
331
332
globalName : GLOBAL_NAME;
localName : LOCAL_NAME;

Kunshan Wang's avatar
Kunshan Wang committed
333
334
335
336
337
338
339
// LEXER

INT_DEC
    :   ('+'|'-')? DIGIT_NON_ZERO DIGIT*
    ;
    
INT_OCT
Kunshan Wang's avatar
Kunshan Wang committed
340
    :   ('+'|'-')? '0' OCT_DIGIT*
Kunshan Wang's avatar
Kunshan Wang committed
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
    ;

INT_HEX
    :   ('+'|'-')? '0x' HEX_DIGIT+
    ;
    
FP_NUM
    :   ('+'|'-')? DIGIT+ '.' DIGIT+ ('e' ('+'|'-')? DIGIT+)?
    ;

INF
    :   ('+'|'-') 'inf'
    ;
    
NAN
    :   'nan'
    ;

Kunshan Wang's avatar
Kunshan Wang committed
359
360
GLOBAL_NAME
    :   GLOBAL_NAME_PREFIX IDCHAR+
Kunshan Wang's avatar
Kunshan Wang committed
361
362
    ;

Kunshan Wang's avatar
Kunshan Wang committed
363
364
LOCAL_NAME
    :   LOCAL_NAME_PREFIX IDCHAR+
Kunshan Wang's avatar
Kunshan Wang committed
365
    ;
366
367
368
369
    
FLAG
    :   FLAG_PREFIX [A-Z_]+
    ;
Kunshan Wang's avatar
Kunshan Wang committed
370
371
372
373
    
STRING_LITERAL
    :   '"' NON_QUOTE* '"'
    ;
Kunshan Wang's avatar
Kunshan Wang committed
374
375
376
377
378
379
380
381
382
383
384

fragment
DIGIT
    :   [0-9]
    ;

fragment
DIGIT_NON_ZERO
    :   [1-9]
    ;

Kunshan Wang's avatar
Kunshan Wang committed
385
386
387
388
389
fragment
OCT_DIGIT
    :   [0-7]
    ;

Kunshan Wang's avatar
Kunshan Wang committed
390
391
392
393
394
395
fragment
HEX_DIGIT
    :   [0-9a-fA-F]
    ;

fragment
Kunshan Wang's avatar
Kunshan Wang committed
396
GLOBAL_NAME_PREFIX: '@';
Kunshan Wang's avatar
Kunshan Wang committed
397
398

fragment
Kunshan Wang's avatar
Kunshan Wang committed
399
LOCAL_NAME_PREFIX: '%';
Kunshan Wang's avatar
Kunshan Wang committed
400

401
402
403
fragment
FLAG_PREFIX: '#';

Kunshan Wang's avatar
Kunshan Wang committed
404
405
406
407
408
409
410
411
412
413
fragment
IDCHAR
    :   [a-z]
    |   [A-Z]
    |   [0-9]
    |   '-'
    |   '_'
    |   '.'
    ;

Kunshan Wang's avatar
Kunshan Wang committed
414
415
416
417
418
fragment
NON_QUOTE
    :   [!#-~]
    ;

Kunshan Wang's avatar
Kunshan Wang committed
419
420
421
422
423
WS : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines

LINE_COMMENT
    :   '//' ~[\r\n]* -> skip
    ;