A Command_Line_Interface_Flag field specifies the behavior of a call to a command line interface.
CLI_OverlapWithConflict = 0x1
If CLI_OverlapWithConflict is set if output buffer of the new command is already
in use by another command which is still executing, the older command relinquishes control
@@ -347,14 +347,14 @@ This token array must be previously allocated with cpp_make_token_array
Cpp_Token_Array lex_file(char *file_name){
File_Data file = read_whole_file(file_name);
// This array will be automatically grown if it runs
// out of memory.
Cpp_Token_Array array = cpp_make_token_array(100);
cpp_lex_file(file.data, file.size, &array);
return(array);
}
See Also
§5.5.1: Cpp_Token_Type
enum Cpp_Token_Type;
Description
A Cpp_Token_Type classifies a token to make parsing easier. Some types are not
actually output by the lexer, but exist because parsers will also make use of token
-types in their own output.
Values
CPP_TOKEN_KEY_OPERATOR
This type is not stored in token output from the lexer.
CPP_TOKEN_KEY_CONTROL_FLOW
CPP_TOKEN_KEY_TYPE_DECLARATION
CPP_TOKEN_INTEGER_CONSTANT
CPP_TOKEN_CHARACTER_CONSTANT
CPP_TOKEN_FLOATING_CONSTANT
CPP_TOKEN_STRING_CONSTANT
CPP_TOKEN_BOOLEAN_CONSTANT
CPP_TOKEN_PARENTHESE_OPEN
CPP_TOKEN_PARENTHESE_CLOSE
CPP_TOKEN_STAR
This is an 'ambiguous' token type because it requires
- parsing to determine the full nature of the token.
CPP_TOKEN_AMPERSAND
This is an 'ambiguous' token type because it requires
- parsing to determine the full nature of the token.
CPP_TOKEN_TILDE
This is an 'ambiguous' token type because it requires
- parsing to determine the full nature of the token.
CPP_TOKEN_PLUS
This is an 'ambiguous' token type because it requires
- parsing to determine the full nature of the token.
CPP_TOKEN_MINUS
This is an 'ambiguous' token type because it requires
- parsing to determine the full nature of the token.
CPP_TOKEN_INCREMENT
This is an 'ambiguous' token type because it requires
- parsing to determine the full nature of the token.
CPP_TOKEN_DECREMENT
This is an 'ambiguous' token type because it requires
- parsing to determine the full nature of the token.
CPP_TOKEN_POSTINC
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_POSTDEC
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_FUNC_STYLE_CAST
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_CALL
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_INDEX
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_PREINC
This token is for parser use, it is not output by the lexer.
CPP_TOKEN_PREDEC
This token is for parser use, it is not output by the lexer.
CPP_TOKEN_POSITIVE
This token is for parser use, it is not output by the lexer.
CPP_TOKEN_NEGAITVE
This token is for parser use, it is not output by the lexer.
CPP_TOKEN_BIT_NOT
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_CAST
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_DEREF
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_TYPE_PTR
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_ADDRESS
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_TYPE_REF
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_NEW_ARRAY
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_DELETE_ARRAY
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_MUL
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_ADD
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_SUB
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_BIT_AND
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_EOF
This type is for parser use, it is not output by the lexer.
§5.5.2: Cpp_Token
struct Cpp_Token {
Cpp_Token_Type type;
int32_t start;
int32_t size;
uint16_t state_flags;
uint16_t flags;
};
Description
Cpp_Token represents a single lexed token.
+types in their own output.
Values
CPP_PP_ERROR_MESSAGE = 21
CPP_TOKEN_KEY_MODIFIER = 23
CPP_TOKEN_KEY_QUALIFIER = 24
CPP_TOKEN_KEY_OPERATOR = 25
This type is not stored in token output from the lexer.
CPP_TOKEN_KEY_CONTROL_FLOW = 26
CPP_TOKEN_KEY_TYPE_DECLARATION = 28
CPP_TOKEN_KEY_ACCESS = 29
CPP_TOKEN_KEY_LINKAGE = 30
CPP_TOKEN_IDENTIFIER = 32
CPP_TOKEN_INTEGER_CONSTANT = 33
CPP_TOKEN_CHARACTER_CONSTANT = 34
CPP_TOKEN_FLOATING_CONSTANT = 35
CPP_TOKEN_STRING_CONSTANT = 36
CPP_TOKEN_BOOLEAN_CONSTANT = 37
CPP_TOKEN_STATIC_ASSERT = 38
CPP_TOKEN_BRACKET_OPEN = 39
CPP_TOKEN_BRACKET_CLOSE = 40
CPP_TOKEN_PARENTHESE_OPEN = 41
CPP_TOKEN_PARENTHESE_CLOSE = 42
CPP_TOKEN_BRACE_OPEN = 43
CPP_TOKEN_BRACE_CLOSE = 44
CPP_TOKEN_STAR = 47
This is an 'ambiguous' token type because it requires
+ parsing to determine the full nature of the token.
CPP_TOKEN_AMPERSAND = 48
This is an 'ambiguous' token type because it requires
+ parsing to determine the full nature of the token.
CPP_TOKEN_TILDE = 49
This is an 'ambiguous' token type because it requires
+ parsing to determine the full nature of the token.
CPP_TOKEN_PLUS = 50
This is an 'ambiguous' token type because it requires
+ parsing to determine the full nature of the token.
CPP_TOKEN_MINUS = 51
This is an 'ambiguous' token type because it requires
+ parsing to determine the full nature of the token.
CPP_TOKEN_INCREMENT = 52
This is an 'ambiguous' token type because it requires
+ parsing to determine the full nature of the token.
CPP_TOKEN_DECREMENT = 53
This is an 'ambiguous' token type because it requires
+ parsing to determine the full nature of the token.
CPP_TOKEN_POSTINC = 55
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_POSTDEC = 56
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_FUNC_STYLE_CAST = 57
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_CPP_STYLE_CAST = 58
CPP_TOKEN_CALL = 59
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_INDEX = 60
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_PREINC = 63
This token is for parser use, it is not output by the lexer.
CPP_TOKEN_PREDEC = 64
This token is for parser use, it is not output by the lexer.
CPP_TOKEN_POSITIVE = 65
This token is for parser use, it is not output by the lexer.
CPP_TOKEN_NEGAITVE = 66
This token is for parser use, it is not output by the lexer.
CPP_TOKEN_BIT_NOT = 68
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_CAST = 69
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_DEREF = 70
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_TYPE_PTR = 71
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_ADDRESS = 72
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_TYPE_REF = 73
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_NEW_ARRAY = 80
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_DELETE_ARRAY = 81
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_MUL = 84
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_ADD = 87
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_SUB = 88
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_BIT_AND = 97
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_TERNARY_QMARK = 102
CPP_TOKEN_EOF = 117
This type is for parser use, it is not output by the lexer.
CPP_TOKEN_TYPE_COUNT = 118