1//===-- ResourceScriptTokenList.h -------------------------------*- C++-*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===---------------------------------------------------------------------===//
8//
9// This is a part of llvm-rc tokenizer. It lists all the possible tokens
10// that might occur in a correct .rc script.
11//
12//===---------------------------------------------------------------------===//
13
14
15// Long tokens. They might consist of more than one character.
16TOKEN(Invalid)      // Invalid token. Should not occur in a valid script.
17TOKEN(Int)          // Integer (decimal, octal or hexadecimal).
18TOKEN(String)       // String value.
19TOKEN(Identifier)   // Script identifier (resource name or type).
20TOKEN(LineComment)  // Beginning of single-line comment.
21TOKEN(StartComment) // Beginning of multi-line comment.
22
23// Short tokens. They usually consist of exactly one character.
24// The definitions are of the form SHORT_TOKEN(TokenName, TokenChar).
25// TokenChar is the one-character token representation occuring in the correct
26// .rc scripts.
27SHORT_TOKEN(BlockBegin, '{')   // Start of the script block; can also be BEGIN.
28SHORT_TOKEN(BlockEnd, '}')     // End of the block; can also be END.
29SHORT_TOKEN(Comma, ',')        // Comma - resource arguments separator.
30SHORT_TOKEN(Plus, '+')         // Addition operator.
31SHORT_TOKEN(Minus, '-')        // Subtraction operator.
32SHORT_TOKEN(Pipe, '|')         // Bitwise-OR operator.
33SHORT_TOKEN(Amp, '&')          // Bitwise-AND operator.
34SHORT_TOKEN(Tilde, '~')        // Bitwise-NOT operator.
35SHORT_TOKEN(LeftParen, '(')    // Left parenthesis in the script expressions.
36SHORT_TOKEN(RightParen, ')')   // Right parenthesis.
37
38#undef TOKEN
39#undef SHORT_TOKEN
40