Go to the source code of this file.
Data Types | |
| type | token |
| Represents a single token in a parsed expression. Holds the string value of the token and its classified type. More... | |
| interface | strtol |
| Converts a string to integer. More... | |
Enumerations | |
| enum | { unknown = -1 , number = 0 , operator = 1 , identifier = 2 , parenthesis = 3 , defined = 4 } |
| Token kinds used in expression parsing. Enumeration defining the possible types of tokens recognized by the tokenizer. More... | |
Functions/Subroutines | |
| subroutine, public | tokenize (expr, tokens, ntokens) |
Tokenizes a preprocessor expression into an array of token structures. Handles whitespace, multi-character operators (&&, ||, ==, etc.), the defined operator (with or without parentheses), numbers in various bases, identifiers, and parentheses. | |
| logical elemental function | is_digit (ch) |
| Tests whether a single character is a decimal digit ('0'-'9'). | |
| logical function | is_typeless (str, pos) |
| Detects whether a string starts a typeless constant (hex, octal, binary). Used to avoid treating them as identifiers during tokenization. | |
| integer function | strtol_default (str, success) |
| Implementation of strtol function. | |
| integer function | strtol_with_base (str, base, success) |
| Implementation of strtol function with a base argument. | |
Variables | |
| integer, parameter, public | tokens_enum = kind(unknown) |
Kind parameter for token type enumeration. Values are (unknown, number, operator, identifier, parenthesis, defined) | |