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