|
Blender V5.3
|
Classes | |
| class | AlignedArrayPtr |
| struct | AlignedDeleter |
| struct | IdentifierMap |
| struct | Keyword |
| struct | KeywordTable |
| struct | PaddedString |
| struct | Token |
| struct | TokenBuffer |
| struct | TokenMut |
| struct | Vector |
Typedefs | |
| using | TokenAtom = uint16_t |
Enumerations | |
| enum class | CharClass : uint8_t { None = 0 , Separator = (1 << 1) , MultiTok = (1 << 2) , WhiteSpace = (1 << 3) , Alpha = 'A' , Numeric = '1' , CanMerge = Alpha | Numeric | MultiTok | WhiteSpace , ClassToTypeThreshold = Numeric - 1 } |
| enum | TokenType : uint8_t { Invalid = 0 , Word = TokenType(CharClass::Alpha) , Number = TokenType(CharClass::Numeric) , NewLine = '\n' , Space = ' ' , Dot = '.' , Hash = '#' , Ampersand = '&' , DoubleQuote = '"' , SingleQuote = '\'' , ParOpen = '(' , ParClose = ')' , BracketOpen = '{' , BracketClose = '}' , SquareOpen = '[' , SquareClose = ']' , AngleOpen = '<' , AngleClose = '>' , Assign = '=' , SemiColon = ';' , Question = '?' , Not = '!' , Colon = ':' , Comma = ',' , Star = '*' , Plus = '+' , Minus = '-' , Divide = '/' , Tilde = '~' , Caret = '^' , Pipe = '|' , Percent = '' , Backslash = '\\' , EndOfFile = '\0' , LogicalAnd = 'a' , Break = 'b' , Typename = 'B' , Const = 'c' , Constexpr = 'C' , Do = 'd' , Decrement = 'D' , NotEqual = 'e' , Equal = 'E' , For = 'f' , While = 'F' , LogicalOr = 'g' , GEqual = 'G' , Switch = 'h' , Case = 'H' , If = 'i' , Else = 'I' , Elif = 'j' , Endif = 'J' , Ifdef = 'k' , Ifndef = 'K' , Inline = 'l' , LEqual = 'L' , Static = 'm' , Enum = 'M' , Namespace = 'n' , Define = 'N' , Union = 'o' , Continue = 'O' , Line = 'p' , Increment = 'P' , Pragma = 'q' , DoubleHash = 'Q' , Return = 'r' , Struct = 's' , Class = 'S' , Template = 't' , This = 'T' , Using = 'u' , Undef = 'U' , Private = 'v' , Public = 'V' , LShift = 'w' , RShift = 'W' , Default = 'y' , TemplateOpen = 'Y' , TemplateClose = 'z' , Comment = 'Z' , AssignAdd = '0' , AssignSub = '2' , AssignMul = '3' , AssignDiv = '4' , AssignLShift = '5' , AssignRShift = '6' , Multiply = Star , And = Ampersand , Or = Pipe , Xor = Caret , GThan = AngleClose , LThan = AngleOpen , BitwiseNot = Tilde , Modulo = Percent , String = DoubleQuote , Slash = Divide } |
Functions | |
| static int | builtin_ctzll (uint64_t a) |
| static uint32_t | divide_ceil (uint32_t a, uint32_t b) |
| template<typename T> | |
| void | realloc_aligned_array (AlignedArrayPtr< T > &ptr, size_t elem_count, size_t new_size) |
| TokenType | select (char char_value, char char_class, bool cond) |
| static void | lex_string (const TokenType *types, uint32_t &cursor) |
| static void | lex_float (const std::string_view str, const TokenType *types, const uint32_t *offsets, const uint32_t *offsets_end_, uint32_t &cursor) |
| static void | lex_comment (const std::string_view str, const TokenType *types, const uint32_t *offsets, uint32_t &cursor, TokenType &out_type) |
| static bool | is_whitespace (char c) |
| static void | lex_angle (const std::string_view str, const TokenType *types, const uint32_t *offsets, const uint32_t *offsets_end, uint32_t &cursor, TokenType &out_type) |
| std::ostream & | operator<< (std::ostream &os, const Token &tok) |
| static std::string | to_str (TokenType type) |
Variables | |
| static constexpr uint64_t | padded_string_masks [8] |
| const CharClass | char_class_table [128] |
| using lexit::TokenAtom = uint16_t |
|
strong |
Class for each characters inside the ASCII table.
The tokenizer identifies runs of characters with similar classes. A character is grouped with its predecessor if it shares a class. The Separator class is the exception which never group chars together.
Note: The values were chosen to allow fast comparison, masking, and cast to printable TokenType.
| Enumerator | |
|---|---|
| None | |
| Separator | |
| MultiTok | |
| WhiteSpace | |
| Alpha | |
| Numeric | |
| CanMerge | |
| ClassToTypeThreshold | |
| enum lexit::TokenType : uint8_t |
|
static |
|
static |
Definition at line 38 of file lexit.cc.
References b, and divide_ceil().
Referenced by lexit::TokenBuffer::atomize_words(), and divide_ceil().
|
static |
Definition at line 922 of file lexit.cc.
References is_whitespace().
Referenced by is_whitespace(), and lex_angle().
|
static |
Definition at line 927 of file lexit.cc.
References AngleClose, AngleOpen, Assign, GThan, is_whitespace(), lex_angle(), LThan, Minus, and str.
Referenced by lex_angle(), and lexit::TokenBuffer::merge_complex_literals().
|
static |
Definition at line 881 of file lexit.cc.
References Comment, EndOfFile, lex_comment(), and str.
Referenced by lex_comment(), and lexit::TokenBuffer::merge_complex_literals().
|
static |
Definition at line 841 of file lexit.cc.
References lex_float(), Number, str, and Word.
Referenced by lex_float(), and lexit::TokenBuffer::merge_complex_literals().
|
static |
Definition at line 823 of file lexit.cc.
References EndOfFile, lex_string(), and String.
Referenced by lex_string(), and lexit::TokenBuffer::merge_complex_literals().
|
inline |
Definition at line 401 of file lexit.hh.
References lexit::Token::atom(), operator<<(), lexit::Token::str(), lexit::Token::str_with_whitespace(), and lexit::Token::type().
Referenced by operator<<().
| void lexit::realloc_aligned_array | ( | AlignedArrayPtr< T > & | ptr, |
| size_t | elem_count, | ||
| size_t | new_size ) |
Definition at line 45 of file lexit.cc.
References assert, lexit::AlignedArrayPtr< T >::get(), realloc_aligned_array(), and T.
Referenced by realloc_aligned_array(), and lexit::TokenBuffer::reserve().
|
inline |
Definition at line 418 of file lexit.cc.
References select().
Referenced by lexit::TokenBuffer::compute_lengths(), blender::draw::overlay::Instance::Instance(), blender::draw::overlay::Resources::Resources(), select(), blender::draw::overlay::ShapeInstanceBuf< ExtraInstanceData >::ShapeInstanceBuf(), and lexit::TokenBuffer::tokenize().
|
inlinestatic |
Definition at line 194 of file token.hh.
References Break, Case, Class, Const, Constexpr, Continue, Decrement, Default, Define, Do, DoubleHash, Elif, Else, Endif, Enum, Equal, For, GEqual, If, Ifdef, Ifndef, Increment, Inline, Invalid, LEqual, Line, LogicalAnd, LogicalOr, LShift, Namespace, NewLine, NotEqual, Number, Pragma, Private, Public, Return, RShift, Static, Struct, Switch, Template, TemplateClose, TemplateOpen, This, to_str(), Typename, Undef, Union, Using, While, and Word.
Referenced by to_str().
| const CharClass lexit::char_class_table[128] |
Definition at line 12 of file tables.hh.
Referenced by blender::gpu::AtomicLexer::lexical_analysis(), lexit::TokenBuffer::process(), lexit::TokenBuffer::TokenBuffer(), and lexit::TokenBuffer::tokenize().
|
staticconstexpr |
Definition at line 24 of file identifier.hh.
Referenced by lexit::PaddedString< Size >::PaddedString().