2020-04-06 18:24:56 +00:00
|
|
|
Name: "C"
|
|
|
|
Details: "The C programming language"
|
|
|
|
Extension: ".c"
|
|
|
|
Multiline Comment Open: "/*"
|
|
|
|
Multiline Comment Close: "*/"
|
|
|
|
Line Comment: "//"
|
2020-04-06 11:26:10 +00:00
|
|
|
String Literal: "\""
|
2020-04-06 18:24:56 +00:00
|
|
|
String Literal Escape: "\\"
|
|
|
|
Character Literal: "'"
|
|
|
|
Character Literal Escape: "\\"
|
2020-04-04 12:07:08 +00:00
|
|
|
C-Like: true
|
2020-04-05 17:37:43 +00:00
|
|
|
|
|
|
|
# C does in fact support octal literals, marking them as starting with an
|
|
|
|
# unnecessary initial zero. This is practically obsolete now, and in any case
|
|
|
|
# makes no difference to syntax-colouring. Binary literals were in theory
|
|
|
|
# rejected by the C standards body as useless, but are so useful that gcc
|
|
|
|
# and clang support them anyway.
|
|
|
|
|
2020-04-06 18:24:56 +00:00
|
|
|
Hexadecimal Literal Prefix: "0x"
|
|
|
|
Binary Literal Prefix: "0b"
|
|
|
|
Negative Literal Prefix: "-"
|
2020-04-04 12:07:08 +00:00
|
|
|
|
2020-04-06 18:24:56 +00:00
|
|
|
Before Named Paragraph Expansion: "\n{\n"
|
|
|
|
After Named Paragraph Expansion: "}\n"
|
|
|
|
Start Ifdef: "#ifdef %S\n"
|
|
|
|
End Ifdef: "#endif /* %S */\n"
|
|
|
|
Start Ifndef: "#ifndef %S\n"
|
|
|
|
End Ifndef: "#endif /* %S */\n"
|
2020-04-06 11:26:10 +00:00
|
|
|
Line Marker: "#line %d \"%f\"\n"
|
2020-04-04 13:15:50 +00:00
|
|
|
|
2020-04-06 18:24:56 +00:00
|
|
|
Start Definition: "#define %S\s"
|
|
|
|
Prolong Definition: "\\\n\s\s\s\s"
|
|
|
|
End Definition: "\n"
|
2020-04-04 19:46:43 +00:00
|
|
|
|
2020-04-05 00:03:36 +00:00
|
|
|
keyword auto
|
|
|
|
keyword break
|
|
|
|
keyword case
|
|
|
|
keyword char
|
|
|
|
keyword const
|
|
|
|
keyword continue
|
|
|
|
keyword default
|
|
|
|
keyword do
|
|
|
|
keyword double
|
|
|
|
keyword else
|
|
|
|
keyword enum
|
|
|
|
keyword extern
|
|
|
|
keyword float
|
|
|
|
keyword for
|
|
|
|
keyword goto
|
|
|
|
keyword if
|
|
|
|
keyword int
|
|
|
|
keyword long
|
|
|
|
keyword register
|
|
|
|
keyword return
|
|
|
|
keyword short
|
|
|
|
keyword signed
|
|
|
|
keyword sizeof
|
|
|
|
keyword static
|
|
|
|
keyword struct
|
|
|
|
keyword switch
|
|
|
|
keyword typedef
|
|
|
|
keyword union
|
|
|
|
keyword unsigned
|
|
|
|
keyword void
|
|
|
|
keyword volatile
|
|
|
|
keyword while
|
2020-04-04 19:46:43 +00:00
|
|
|
|
|
|
|
colouring {
|
|
|
|
runs of unquoted {
|
|
|
|
runs of !identifier {
|
2020-04-06 11:26:10 +00:00
|
|
|
keyword of !reserved => !reserved
|
|
|
|
keyword of !function => !function
|
|
|
|
keyword of !constant => !constant
|
|
|
|
keyword of !element => {
|
2020-04-04 19:46:43 +00:00
|
|
|
optionally spaced prefix . => !element
|
|
|
|
optionally spaced prefix -> => !element
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|