-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathc.jsf
1474 lines (1382 loc) · 36.9 KB
/
c.jsf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# JOE syntax highlight file for C
# A (deterministic) state machine which performs lexical analysis of C.
# (This is the "assembly language" of syntax highlighting. A separate
# program could be used to convert a regular expression NFA syntax into this
# format).
# Each state begins with ':<name> <color-name>'
# <color-name> is the color used for characters eaten by the state
# (really a symbol for a user definable color).
# The first state defined is the initial state.
# Within a state, define transitions (jumps) to other states. Each
# jump has the form: <character-list> <target-state> [<option>s]
# There are two ways to specify <character-list>s, either * for any
# character not otherwise specified, or a literal list of characters within
# quotes (ranges and escape sequences allows). When the next character
# matches any in the list, a jump to the target-state is taken and the
# character is eaten (we advance to the next character of the file to be
# colored).
#
# The * transition should be the first transition specified in the state.
#
# There are several options:
# noeat do not eat the character, instead feed it to the next state
# (this tends to make the states smaller, but be careful: you
# can make infinite loops).
#
# recolor=-N Recolor the past N characters with the color of the
# target-state. For example once /* is recognized as the
# start of C comment, you want to color the /* with the C
# comment color.
#
# buffer start copying characters to a buffer, beginning with this
# one (it's ok, to not terminate buffering with a matching
# 'strings' option- the buffer is limited to leading 19
# characters).
#
# strings A list of strings follows. If the buffer matches any of the
# given strings, a jump to the target-state in the string list
# is taken instead of the normal jump.
#
# istrings Same as strings, but case is ignored.
#
# The format of the string list is:
#
# "string" <target-state>
# "string" <target-state>
# done
#
# Weirdness: only states have colors, not transitions. This means that you
# sometimes have to make dummy states with '* next-state noeat' just to get
# a color specification.
# Define no. sync lines
# You can say:
# -200 means 200 lines
# - means always start parsing from beginning of file when we lose sync
# if nothing is specified, the default is -50
# Define colors
#
# bold inverse blink dim underline
# white cyan magenta blue yellow green red black
# bg_white bg_cyan bg_magenta bg_blue bg_yellow bg_green bg_red bg_black
-3000
# Blank characters are outputted in this colour
=Background fg_222 bg_000
=Tab fg_222 bg_001
# Preprocessor code
#=Preproc underline fg_311
#=PreprocKW underline fg_533
#=Preproc_cKW underline fg_433
#=Preproc_sym underline fg_302
=Preproc fg_333 dim underline
=PreprocKW fg_445 dim underline
=Preproc_cKW fg_445 dim underline
=Preproc_sym fg_034 dim underline
=Preproc_sym2 fg_031 dim underline
=Preproc_ident fg_333 dim underline
=Preproc_string fg_115 dim underline
=Preproc_stringContent fg_125 dim underline
=Preproc_char fg_314 dim underline
=Preproc_charContent fg_525 dim underline
=Preproc_num fg_322 dim underline
=Preproc_numPrefix fg_211 dim underline
# Comments within preprocessor statements
=PreprocComment fg_412 dim underline italic
# Unknown preprocessor words
=PreprocUnknown underline fg_500 bg_543
# OpenMP:
=OpenMP underline fg_033
=OpenMPkw underline fg_253
=OpenMPkw2 underline WHITE
=OpenMPcomment underline fg_413
=OpenMPnonkw underline fg_500 bg_543
=OpenMP_space underline fg_131
# OpenACC:
=OpenACC underline fg_033
=OpenACCkw underline fg_244
=OpenACCkw2 underline WHITE
=OpenACCcomment underline fg_414
=OpenACCnonkw underline fg_500 bg_544
=OpenACC_space underline fg_132
# Comments
=Comment fg_411 italic
=Comment_Doxygen fg_511 italic
=Comment_Emphasis fg_401 italic
# Most operators () ? ~ . / : * / + - < >
=Special fg_033
# More operators [] {} , ;
=Special2 green
=BisonDelim fg_430
=BisonKw fg_442 italic
=BisonComment fg_411
=BisonDollar fg_443 dim
=Re2cDelim fg_430
=Re2cEscape fg_202
=Re2cRangeDelim fg_024
=Re2cRangeContent fg_035
# The "::" operator
=GlueColor fg_232
# Operators that have a "=" in them
=AssignColor fg_251
# Numeric constants
=Numeric fg_315
# Errors in numeric constants
=InvalidNumber fg_500 bg_542
# Numeric suffixes (U,L,F)
=NumericSuffix fg_415
=BinaryNumeric fg_312
=StringSuffix fg_024
# String constants
=String fg_024
=StringContent fg_035
=WString fg_021
=WStringContent fg_052
=RawString fg_134
=RawStringContent fg_345
=WRawString fg_242
=WRawStringContent fg_353
# Char constants
=Char fg_021
=CharContent fg_044
#=Char fg_313
#=CharContent fg_525
=WChar fg_331
=WCharContent fg_552
# When "\n" is met in a string
=AbruptStringTermination YELLOW bg_100
# Reserved words
=Keyword WHITE
# Builtin types
=Type WHITE
# STL keywords
=STLkw fg_333
# All other identifiers
=Identifier fg_333
=BisonIdent fg_555 dim italic
=Hardcoded fg_000
# All unrecognized content
#=Mystery fg_500 bg_542
=Mystery bg_000 fg_033
=TrailingSpace bg_002
########################
# The rules begin here.
:newline Background
* idle noeat
"#" pre_hash recolor=-1
"\t" newline_tab recolor=-1
" " newline_space
:newline_tab Tab
* newline noeat
:newline_space Background
* newline noeat
"\n" trailing_space recolor=-2
:pre_hash PreprocKW
* pre noeat
:pre Preproc
* preident recolor=-1 buffer
"/" pre1_slash recolor=-1
" \t" pre
"\n" newline
:preident PreprocUnknown
* preproc noeat strings
"define" preproc_known
"elif" preproc_known
"else" preproc_known
"endif" preproc_known
"error" preproc_known
"if" preproc_known
"ifdef" preproc_known
"ifndef" preproc_known
"include" preproc_known
"include_next" preproc_known
"line" preproc_known
"pragma" preproc_pragma
"undef" preproc_known
"warning" preproc_known
done
"a-z$0-9A-Z_" preident
# Preprocessor directives that begin with an actual keyword
:preproc_known PreprocKW
* preproc noeat
:preproc Preproc
* preproc
"\t" preproc_tab recolor=-1
" " preproc_space
"\n" newline
"0" preproc_zero recolor=-1
"1-9" preproc_decimal recolor=-1
"a-z$A-Z_" preproc_ident recolor=-1 buffer
"()?~" preproc_special recolor=-1
"[]{},;" preproc_special2 recolor=-1
"-:!<>=+*%&|^" preproc_special recolor=-1
"/" pre2_slash recolor=-1
"\"" pre2_string recolor=-1
"'" pre2_char recolor=-1
"\\" preproc_cont recolor=-1
:preproc_tab Tab
* preproc noeat
:preproc_space Preproc
* preproc noeat
"\n" trailing_space recolor=-2
:preproc_special Preproc_sym
* preproc noeat
:preproc_special2 Preproc_sym2
* preproc noeat
:preproc_cont Preproc_sym
* preproc_cont
"\n" preproc_newline
:preproc_newline Background
* preproc noeat
"\t" preproc_newline_tab recolor=-1
" " preproc_newline_space
:preproc_newline_tab Tab
* preproc_newline noeat
:preproc_newline_space Preproc
* preproc_newline noeat
"\n" trailing_space recolor=-2
:preproc_zero Preproc
* preproc_octal noeat
"b" preproc_pfx_binary recolor=-2
"xX" preproc_pfx_hex recolor=-2
:preproc_pfx_binary Preproc_numPrefix
* preproc_binary noeat
:preproc_pfx_hex Preproc_numPrefix
* preproc_hex noeat
:preproc_binary Preproc_num
* preproc noeat
"uUlL" preproc_numsuffix recolor=-1
"01" preproc_binary
:preproc_hex Preproc_num
* preproc noeat
"uUlL" preproc_numsuffix recolor=-1
"0-9A-Fa-f" preproc_hex
:preproc_octal Preproc_num
* preproc noeat
"uUlLfF" preproc_numsuffix recolor=-1
"0-7" preproc_octal
:preproc_decimal Preproc_num
* preproc noeat
"uUlLfF" preproc_numsuffix recolor=-1
"0-9.eE" preproc_decimal
:preproc_numsuffix Preproc_numPrefix
* preproc noeat
"uUlLfF" preproc_numsuffix
:preproc_ident Preproc_ident
* preproc noeat strings
"alignas" preproc_ident_known
"alignof" preproc_ident_known
"and_eq" preproc_ident_known
"and" preproc_ident_known
"auto" preproc_ident_known
"bitand" preproc_ident_known
"bitor" preproc_ident_known
"bool" preproc_ident_known
"break" preproc_ident_known
"case" preproc_ident_known
"catch" preproc_ident_known
"char16_t" preproc_ident_known
"char32_t" preproc_ident_known
"char" preproc_ident_known
"class" preproc_ident_known
"compl" preproc_ident_known
"const_cast" preproc_ident_known
"constexpr" preproc_ident_known
"const" preproc_ident_known
"continue" preproc_ident_known
"decltype" preproc_ident_known
"default" preproc_ident_known
"delete" preproc_ident_known
"do" preproc_ident_known
"double" preproc_ident_known
"dynamic_cast" preproc_ident_known
"else" preproc_ident_known
"enum" preproc_ident_known
"explicit" preproc_ident_known
"export" preproc_ident_known
"extern" preproc_ident_known
"false" preproc_ident_known
"float" preproc_ident_known
"for" preproc_ident_known
"friend" preproc_ident_known
"goto" preproc_ident_known
"if" preproc_ident_known
"inline" preproc_ident_known
"int" preproc_ident_known
"long" preproc_ident_known
"mutable" preproc_ident_known
"namespace" preproc_ident_known
"new" preproc_ident_known
"noexcept" preproc_ident_known
"not_eq" preproc_ident_known
"not" preproc_ident_known
"nullptr" preproc_ident_known
"operator" preproc_ident_known
"or_eq" preproc_ident_known
"or" preproc_ident_known
"private" preproc_ident_known
"protected" preproc_ident_known
"public" preproc_ident_known
"register" preproc_ident_known
"reinterpret_cast" preproc_ident_known
"return" preproc_ident_known
"short" preproc_ident_known
"signed" preproc_ident_known
"sizeof" preproc_ident_known
"static_assert" preproc_ident_known
"static_cast" preproc_ident_known
"static" preproc_ident_known
"struct" preproc_ident_known
"switch" preproc_ident_known
"template" preproc_ident_known
"this" preproc_ident_known
"thread_local" preproc_ident_known
"throw" preproc_ident_known
"true" preproc_ident_known
"try" preproc_ident_known
"typedef" preproc_ident_known
"typeid" preproc_ident_known
"typename" preproc_ident_known
"union" preproc_ident_known
"unsigned" preproc_ident_known
"using" preproc_ident_known
"virtual" preproc_ident_known
"void" preproc_ident_known
"volatile" preproc_ident_known
"wchar_t" preproc_ident_known
"wchar_t" preproc_ident_known
"while" preproc_ident_known
"xor_eq" preproc_ident_known
"xor" preproc_ident_known
done
"a-z$A-Z0-9_" preproc_ident
:preproc_ident_known Preproc_cKW
* preproc noeat
:pre2_slash Preproc_sym
* preproc recolor=-1
"*" pre2_comment recolor=-2
"/" pre2_line_comment recolor=-2
:pre2_comment PreprocComment
* pre2_comment
"*" pre2_comment_maybe_end
:pre2_comment_maybe_end PreprocComment
* pre2_comment
"/" preproc
"*" pre2_comment_maybe_end
:pre2_line_comment PreprocComment
* pre2_line_comment
"\\" pre2_line_comment_escape
"\n" newline
:pre2_line_comment_escape PreprocComment
* pre2_line_comment
:pre2_string Preproc_string
* pre2_stringcontent noeat
:pre2_stringend Preproc_string
* preproc noeat
:pre2_stringcontent Preproc_stringContent
* pre2_stringcontent
"\"" pre2_stringend recolor=-1
"\\" pre2_string_escape
:pre2_string_escape Preproc_string
* pre2_stringcontent
:pre2_char Preproc_char
* pre2_charcontent noeat
:pre2_charend Preproc_char
* preproc noeat
:pre2_charcontent Preproc_charContent
* pre2_charcontent
"'" pre2_charend recolor=-1
"\\" pre2_char_escape
:pre2_char_escape Preproc_char
* pre2_charcontent
# Preprocessor directives that just begin with #, no keyword
:pre1_slash PreprocUnknown
* pre recolor=-1
"*" pre1_comment recolor=-2
"/" pre1_line_comment recolor=-2
:pre1_comment PreprocComment
* pre1_comment
" " pre1_comment_space
"\t" pre1_comment_tab recolor=-1
"*" pre1_comment_maybe_end
:pre1_comment_space PreprocComment
* pre1_comment noeat
"\n" pre1_comment_trailing_space recolor=-2
:pre1_comment_tab Tab
* pre1_comment noeat
:pre1_comment_trailing_space TrailingSpace
* pre1_comment noeat
:pre1_comment_maybe_end PreprocComment
* pre1_comment
"/" pre
"*" pre1_comment_maybe_end
:pre1_line_comment PreprocComment
* pre1_line_comment
"\\" pre1_line_comment_escape
"\n" newline
:pre1_line_comment_escape PreprocComment
* pre1_line_comment
# Special care about OpenMP #pragma constructs
:preproc_pragma PreprocKW
* preproc_pragma0 noeat
:preproc_pragma0 Preproc
* preproc noeat
" " preproc_pragma0
"o" openmp1
"a" openacc1
# OPENMP SECTION
:openmp1 Preproc
* preproc noeat
"m" openmp2
:openmp2 Preproc
* preproc noeat
"p" openmp3
:openmp3 Preproc
* preproc noeat
" " openmp_keyword_known recolor=-12
:openmp OpenMP
* openmp
" \t" openmp_space recolor=-1
"(" openmp_parens
"\\" openmp_cont
"a-z_" openmp_keyword recolor=-1 buffer
"/" openmp_slash
"\n" newline
:openmp_space OpenMP_space
* openmp noeat
"\n" trailing_space recolor=-2
:openmp_slash OpenMP
* openmp
"*" openmp_comment recolor=-2
"/" openmp_line_comment recolor=-2
:openmp_comment OpenMPcomment
* openmp_comment
"*" openmp_comment_maybe_end
:openmp_comment_maybe_end OpenMPcomment
* openmp_comment
"*" openmp_comment_maybe_end
"/" openmp
:openmp_line_comment OpenMPcomment
* openmp_line_comment
"\\" openmp_line_comment_escape
"\n" newline
:openmp_line_comment_escape OpenMPcomment
* openmp_line_comment
:openmp_parens OpenMP
* openmp_parens
"\\" openmp_parens_cont
"/" openmp_parens_slash
")" openmp
"\n" newline
:openmp_cont OpenMP
* openmp
:openmp_parens_cont OpenMP
* openmp_parens
:openmp_parens_slash OpenMP
* openmp_parens noeat
"*" openmp_parens_comment recolor=-2
:openmp_parens_comment OpenMPcomment
* openmp_parens_comment
"*" openmp_parens_comment_maybe_end
:openmp_parens_comment_maybe_end OpenMPcomment
* openmp_parens_comment
"*" openmp_parens_comment_maybe_end
"/" openmp_parens
:openmp_keyword OpenMPnonkw
* openmp noeat strings
"auto" openmp_keyword_known_end_parens
"atomic" openmp_keyword_known2
"barrier" openmp_keyword_known2
"cancel" openmp_keyword_known2
"cancellation" openmp_keyword_known
"copyin" openmp_keyword_known
"collapse" openmp_keyword_known
"copyin" openmp_keyword_known
"copyprivate" openmp_keyword_known
"critical" openmp_keyword_known2
"declare" openmp_keyword_known2
"default" openmp_keyword_known_do_parens
"distribute" openmp_keyword_known2
"dist_schedule" openmp_keyword_known_do_parens
"dynamic" openmp_keyword_known_end_parens
"firstprivate" openmp_keyword_known
"for" openmp_keyword_known2
"flush" openmp_keyword_known2
"guided" openmp_keyword_known_end_parens
"if" openmp_keyword_known
"lastprivate" openmp_keyword_known
"map" openmp_keyword_known_end_parens
"master" openmp_keyword_known2
"nowait" openmp_keyword_known
"none" openmp_keyword_known_end_parens
"num_threads" openmp_keyword_known
"ordered" openmp_keyword_known2
"parallel" openmp_keyword_known2
"private" openmp_keyword_known_end_parens
"linear" openmp_keyword_known_end_parens
"point" openmp_keyword_known
"simd" openmp_keyword_known2
"simdlen" openmp_keyword_known_end_parens
"reduction" openmp_keyword_known
"initializer" openmp_keyword_known
"runtime" openmp_keyword_known_end_parens
"schedule" openmp_keyword_known_do_parens
"section" openmp_keyword_known2
"sections" openmp_keyword_known2
"shared" openmp_keyword_known_end_parens
"single" openmp_keyword_known2
"static" openmp_keyword_known_end_parens
"task" openmp_keyword_known2
"taskyield" openmp_keyword_known
"taskgroup" openmp_keyword_known
"taskwait" openmp_keyword_known
"threadprivate" openmp_keyword_known
"untied" openmp_keyword_known
"target" openmp_keyword_known2
"teams" openmp_keyword_known2
"data" openmp_keyword_known2 #target data
"update" openmp_keyword_known2 #target update
"end" openmp_keyword_known2 #end declare...
"num_teams" openmp_keyword_known_end_parens
"thread_limit" openmp_keyword_known_end_parens
"from" openmp_keyword_known_end_parens
"to" openmp_keyword_known_end_parens
"tofrom" openmp_keyword_known_end_parens
"alloc" openmp_keyword_known_end_parens
"proc_bind" openmp_keyword_known_end_parens
"spread" openmp_keyword_known
"close" openmp_keyword_known
"final" openmp_keyword_known
"mergeable" openmp_keyword_known
"capture" openmp_keyword_known
"read" openmp_keyword_known
"update" openmp_keyword_known
"write" openmp_keyword_known
done
"a-z0-9A-Z_" openmp_keyword
:openmp_keyword_known OpenMPkw
* openmp noeat
:openmp_keyword_known2 OpenMPkw2
* openmp noeat
:openmp_keyword_known_do_parens OpenMPkw
* openmp noeat
"(" openmp_keyword_known_do_parens1 recolor=-1
:openmp_keyword_known_end_parens OpenMPkw
* openmp_keyword_known_end_parens1 noeat
:openmp_keyword_known_end_parens1 OpenMP
* openmp noeat
" " openmp_keyword_known_end_parens1
"," openmp_parens
:openmp_keyword_known_do_parens1 OpenMP
* openmp_parens noeat
"a-z_" openmp_keyword recolor=-1 buffer
# OPENACC SECTION
:openacc1 Preproc
* preproc noeat
"c" openacc2
:openacc2 Preproc
* preproc noeat
"c" openacc3
:openacc3 Preproc
* preproc noeat
" " openacc_keyword_known recolor=-12
:openacc OpenACC
* openacc
" \t" openacc_space recolor=-1
"(" openacc_parens
"\\" openacc_cont
"a-z_" openacc_keyword recolor=-1 buffer
"/" openacc_slash
"\n" newline
:openacc_space OpenACC_space
* openacc noeat
"\n" trailing_space recolor=-2
:openacc_slash OpenACC
* openacc
"*" openacc_comment recolor=-2
"/" openacc_line_comment recolor=-2
:openacc_comment OpenACCcomment
* openacc_comment
"*" openacc_comment_maybe_end
:openacc_comment_maybe_end OpenACCcomment
* openacc_comment
"*" openacc_comment_maybe_end
"/" openacc
:openacc_line_comment OpenACCcomment
* openacc_line_comment
"\\" openacc_line_comment_escape
"\n" newline
:openacc_line_comment_escape OpenACCcomment
* openacc_line_comment
:openacc_parens OpenACC
* openacc_parens
"\\" openacc_parens_cont
"/" openacc_parens_slash
")" openacc
"\n" newline
:openacc_cont OpenACC
* openacc
:openacc_parens_cont OpenACC
* openacc_parens
:openacc_parens_slash OpenACC
* openacc_parens noeat
"*" openacc_parens_comment recolor=-2
:openacc_parens_comment OpenACCcomment
* openacc_parens_comment
"*" openacc_parens_comment_maybe_end
:openacc_parens_comment_maybe_end OpenACCcomment
* openacc_parens_comment
"*" openacc_parens_comment_maybe_end
"/" openacc_parens
:openacc_keyword OpenACCnonkw
* openacc noeat strings
"parallel" openacc_keyword_known2
"loop" openacc_keyword_known2
"kernels" openacc_keyword_known2
"routine" openacc_keyword_known2
"data" openacc_keyword_known2
"gang" openacc_keyword_known
"worker" openacc_keyword_known
"vector" openacc_keyword_known
"copyin" openacc_keyword_known_end_parens
"copyout" openacc_keyword_known_end_parens
done
"a-z0-9A-Z_" openacc_keyword
:openacc_keyword_known OpenACCkw
* openacc noeat
:openacc_keyword_known2 OpenACCkw2
* openacc noeat
:openacc_keyword_known_do_parens OpenACCkw
* openacc noeat
"(" openacc_keyword_known_do_parens1 recolor=-1
:openacc_keyword_known_end_parens OpenACCkw
* openacc_keyword_known_end_parens1 noeat
:openacc_keyword_known_end_parens1 OpenACC
* openacc noeat
" " openacc_keyword_known_end_parens1
"," openacc_parens
:openacc_keyword_known_do_parens1 OpenACC
* openacc_parens noeat
"a-z_" openacc_keyword recolor=-1 buffer
# All following states are for when we're not in a preprocessor line
#:idle Special
:idle Mystery
* mystery recolor=-1
"()?~" special recolor=-1
"]{,;" special2 recolor=-1
":" maybe_glue recolor=-1
"!<>" maybe_comp recolor=-1
"=" maybe_comp_eq recolor=-1
"-+*&|^" maybe_op_assign recolor=-1
"%" maybe_bison_kw recolor=-1
"}" maybe_bison_end recolor=-1 mark
"[" maybe_re2c_range recolor=-1 mark
"\t" tab recolor=-1
" " space recolor=-1
"/" slash recolor=-1
"0" first_digit_0 recolor=-1
"1-9" first_digit recolor=-1
"." period recolor=-1
"\"" stringbegin recolor=-1
"'" charbegin recolor=-1
"$" bison_ident recolor=-1
"a-zA-Z_" ident recolor=-1 buffer
"LU" maybe_wide recolor=-1 buffer
"u" maybe_unicode recolor=-1 buffer
"R" maybe_rawstring recolor=-1 buffer
"\\" re2c_escape recolor=-1
"\n" newline
:mystery Mystery
* idle noeat
:re2c_escape Re2cEscape
* re2c_escape1
:re2c_escape1 Re2cEscape
* idle noeat
:space Background
* idle noeat
"\n" trailing_space recolor=-2
:tab Tab
* idle noeat
:trailing_space TrailingSpace
* newline noeat
# Delimiters
:special Special
* idle noeat
:special2 Special2
* idle noeat
:period Special
* idle noeat
":" typoed_glue recolor=-2
"0-9" float recolor=-2
:slash Special
* idle noeat
"*" comment recolor=-2 # "/*"
"/" line_comment recolor=-2 # "//"
"=" was_op_assign recolor=-2 # "/="
# "::"
:maybe_glue Special
* idle noeat
"." typoed_glue recolor=-2
":" was_glue recolor=-2
:was_glue GlueColor
* idle noeat
:typoed_glue InvalidNumber
* idle noeat
# "==" vs "="
:maybe_comp_eq AssignColor
* idle noeat
"=" was_comp recolor=-2
# "<=", ">=", "==", "!="
:maybe_comp Special
* idle noeat
"=" was_comp recolor=-2
:was_comp Special
* idle noeat
# "+=", "-=", "*=", "/=", "%=", "&=", "|="
:maybe_op_assign Special
* idle noeat
"=" was_op_assign recolor=-2
:was_op_assign AssignColor
* idle noeat
# "%"
:maybe_bison_kw Special
* idle noeat
"=" was_op_assign recolor=-2
"%" bison_delim recolor=-2
"{}" re2c_delim recolor=-2
"a-z" perc_ident1 recolor=-2 noeat
:bison_delim BisonDelim
* idle noeat
:re2c_delim Re2cDelim
* idle noeat
:perc_ident1 BisonDelim
* perc_ident recolor=-1 buffer
:perc_ident Identifier
* idle noeat strings
"code" bison_kw
"define" bison_kw
"empty" bison_kw
"expect" bison_kw
"left" bison_kw
"locations" bison_kw
"nonassoc" bison_kw
"param" bison_kw
"prec" bison_kw
"requires" bison_kw
"pure_parser" bison_kw
"right" bison_kw
"skeleton" bison_kw
"start" bison_kw
"token" bison_kw
"type" bison_kw
"union" bison_kw
done
"a-z_$A-Z0-9_" perc_ident
:bison_kw BisonKw
* idle noeat
" \t" bison_kw
"\n" bison_kw_newline
"a-z" perc_ident recolor=-1 buffer
"{" bison_delim recolor=-1
:bison_kw_newline BisonKw
* bison_kw noeat
"\t" bison_kw_newline_tab recolor=-1
:bison_kw_newline_tab Tab
* bison_kw_newline noeat
:bison_ident BisonDollar
* idle noeat
"$0-9" bison_ident
:maybe_bison_end Special2
* idle noeat
"/" maybe_bison_comment markend
:maybe_bison_comment Special
* idle noeat
"/" maybe2_bison_comment recolor=-2
"*" comment recolor=-2
:maybe2_bison_comment Comment
* line_comment noeat
"%" is_bison_comment recolormark noeat
:is_bison_comment BisonDelim
* is_bison_comment1 recolor=-3
:is_bison_comment1 BisonComment
* line_comment noeat
:maybe_re2c_range Special2
* idle noeat
"\\" re2c_range recolor=-2 noeat
"^" re2c_range recolor=-2 noeat
"a" re2c_char_test1 buffer markend recolor=-1
"0" re2c_char_test2 markend recolor=-1
:re2c_range Re2cRangeDelim
* re2c_range_content recolor=-1
:re2c_range_content Re2cRangeContent
* re2c_range_content
"\\" re2c_range_escape
"]" re2c_range_end recolor=-1
:re2c_range_escape Re2cRangeContent
* re2c_range_content
:re2c_range_end Re2cRangeDelim
* idle noeat
:re2c_char_test1 Identifier
* ident noeat
"-" re2c_range1 recolormark noeat
:re2c_char_test2 Numeric
* first_digit_0 noeat
"-" re2c_range1 recolormark noeat
:re2c_range1 Re2cRangeDelim
* re2c_range_content noeat recolor=-2
# Comments
:comment Comment
* comment
" " comment_space
"@\\" comment_maybe_doxygencmd
"`" comment_emphasis
"\t" comment_tab recolor=-1
"*" maybe_end_comment
:comment_tab Tab
* comment noeat
:comment_space Comment
* comment noeat
"\n" comment_trailing_space recolor=-2
:comment_trailing_space TrailingSpace
* comment noeat
:maybe_end_comment Comment
* comment
"/" idle
"*" maybe_end_comment
:line_comment Comment
* line_comment
"\\" line_comment_escape
"\n" newline
:line_comment_escape Comment
* line_comment
:comment_maybe_doxygencmd Comment
* comment noeat
"a-z" comment_doxygencmd recolor=-2 buffer
" " comment_space
"\t" comment_tab recolor=-1
"*" maybe_end_comment
:comment_doxygencmd Comment
* comment noeat strings
"fn" comment_doxygencmd_real
"brief" comment_doxygencmd_real
"param" comment_doxygencmd_real
"tparam" comment_doxygencmd_real
"returns" comment_doxygencmd_real
"see" comment_doxygencmd_real
"remark" comment_doxygencmd_real
"parblock" comment_doxygencmd_real
"endparblock" comment_doxygencmd_real
done
"a-z$" comment_doxygencmd
:comment_doxygencmd_real Comment_Doxygen
* comment noeat
:comment_emphasis Comment_Emphasis
* comment_emphasis
" \t\n\r*`" comment recolor=-1
# Numeric constants
:first_digit_0 Numeric
* first_digit noeat
"xX" hex_first
"bB" binary_digit recolor=-2
:first_digit Numeric
* number_before_e noeat
:hex_first Numeric
* end_number_suffix noeat recolor=-2
"0-9A-Fa-f'" hex
"." hexfloat
:hex Numeric
* end_int noeat
"0-9A-Fa-f'" hex
"." hexfloat
"pP" epart
:hexfloat Numeric
* end_number_suffix noeat recolor=-2
"0-9A-Fa-f" hexfloat
"pP" epart
:number_before_e Numeric
* end_int noeat
"0-9'" number_before_e
"." float
"eE" epart
:binary_digit BinaryNumeric
* end_int noeat
"01'" binary_digit
:float Numeric
* end_float noeat
"eE" epart
"0-9'" float
:epart Numeric
* enum_first noeat
"-+" enum_first
:enum_first Numeric
* end_number_suffix noeat recolor=-2
"0-9" enum
:enum Numeric
* end_float noeat
"0-9" enum
:end_float NumericSuffix
* end_number_suffix noeat
"_" num_user_suffix noeat
"fFlL" end_number_suffix #f, #l
:end_int NumericSuffix
* end_number_suffix noeat
"_" num_user_suffix noeat
"uU" int_suffix_u #u
"lL" int_suffix_l #l
:int_suffix_u NumericSuffix
* end_number_suffix noeat
"lL" int_suffix_ul #ul
:int_suffix_ul NumericSuffix