Home | History | Annotate | Download | only in llvm-rc
      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.
     17 TOKEN(Invalid)      // Invalid token. Should not occur in a valid script.
     18 TOKEN(Int)          // Integer (decimal, octal or hexadecimal).
     19 TOKEN(String)       // String value.
     20 TOKEN(Identifier)   // Script identifier (resource name or type).
     21 TOKEN(LineComment)  // Beginning of single-line comment.
     22 TOKEN(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.
     28 SHORT_TOKEN(BlockBegin, '{')   // Start of the script block; can also be BEGIN.
     29 SHORT_TOKEN(BlockEnd, '}')     // End of the block; can also be END.
     30 SHORT_TOKEN(Comma, ',')        // Comma - resource arguments separator.
     31 SHORT_TOKEN(Plus, '+')         // Addition operator.
     32 SHORT_TOKEN(Minus, '-')        // Subtraction operator.
     33 SHORT_TOKEN(Pipe, '|')         // Bitwise-OR operator.
     34 SHORT_TOKEN(Amp, '&')          // Bitwise-AND operator.
     35 SHORT_TOKEN(Tilde, '~')        // Bitwise-NOT operator.
     36 SHORT_TOKEN(LeftParen, '(')    // Left parenthesis in the script expressions.
     37 SHORT_TOKEN(RightParen, ')')   // Right parenthesis.
     38 
     39 #undef TOKEN
     40 #undef SHORT_TOKEN
     41