3 * Description: GUI INF Script language
4 * Author: Markku Rossi <mtr@iki.fi>
7 state inf_string extends Highlight
10 /* A quoted '"' character. */
14 /* End of the string. */
21 state inf extends HighlightEntry
32 /^(\[)([^\]]+)(\][ \t]*)/ {
35 function_name_face(true);
37 function_name_face(false);
42 /* String constants. */
44 /* A string starting with a '"' character. */
51 /* An empty string. */
57 /* Start of a string. */
65 /^([a-zA-Z_][a-zA-Z_0-9]*)([ \t]*=[ \t]*\+)/ {
68 reference_face(false);
71 /* Goto statements and its target. */
72 /(goto)([ \t]*)([a-zA-Z_][a-zA-Z_0-9]*)/ {
81 reference_face(false);
84 /* Shell section calls. */
91 /* The read-syms, install, and detect calls. */
92 /^([ \t]*)(read-syms|detect|install)([ \t]+)([a-zA-Z_][a-zA-Z_0-9]*)/i {
101 reference_face(true);
103 reference_face(false);
106 /* The read-syms, detect, and install in other contexts. */
107 /^([ \t]*)(read-syms|detect|install)\b/i {
115 /* Variable / constant definitions. We catch these here so we won't
116 conflict with any keywords, etc. */
117 /([a-zA-Z_][a-zA-Z_0-9]*[ \t]*=)/ {
121 /* Keywords, sort of.
123 (build-re '(return read-syms ifstr ifint ifcontains else
124 else-ifstr else-ifint elseif-contains endif forlistdo
125 endforlistdo goto set set-subst set-add set-sub set-mul set-div
126 set-or set-hextodec set-dectohex exit))
129 /\b(e(lse(|-if(int|str)|if-contains)|nd(forlistdo|if)|xit)|forlistdo|goto\
130 |if(contains|int|str)|re(ad-syms|turn)\
131 |set(|-(add|d(ectohex|iv)|hextodec|mul|or|sub(|st))))\b(\(i\))?/i {