Data Structures | |
| struct | PosToken |
| A token, as output by the tokeniser. More... | |
Functions | |
| static gboolean | parse_number (const char *p, const char **end_return, PosToken *next, GError **err) |
| Tokenises a number in an expression. | |
| static gboolean | pos_tokenize (const char *expr, PosToken **tokens_p, int *n_tokens_p, GError **err) |
| Tokenises an expression. | |
This is the tokeniser used for that language.
| static gboolean parse_number | ( | const char * | p, | |
| const char ** | end_return, | |||
| PosToken * | next, | |||
| GError ** | err | |||
| ) | [static] |
Tokenises a number in an expression.
| p | a pointer into a string representing an operation; part of an expression somewhere, so not null-terminated | |
| end_return | set to a pointer to the end of the number found; but not updated if no number was found at all | |
| next | set to either an integer or a float token | |
| [out] | err | set to the problem if there was a problem |
Definition at line 1565 of file theme.c.
References _, PosToken::d, FALSE, META_THEME_ERROR, META_THEME_ERROR_BAD_CHARACTER, META_THEME_ERROR_FAILED, POS_TOKEN_DOUBLE, POS_TOKEN_INT, TRUE, and PosToken::type.
Referenced by pos_tokenize().
| static gboolean pos_tokenize | ( | const char * | expr, | |
| PosToken ** | tokens_p, | |||
| int * | n_tokens_p, | |||
| GError ** | err | |||
| ) | [static] |
Tokenises an expression.
| expr | The expression | |
| [out] | tokens_p | The resulting tokens |
| [out] | n_tokens_p | The number of resulting tokens |
| [out] | err | set to the problem if there was a problem |
Definition at line 1697 of file theme.c.
References _, PosToken::d, FALSE, free_tokens(), IS_VARIABLE_CHAR, META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, op_from_string(), parse_number(), POS_OP_NONE, POS_TOKEN_CLOSE_PAREN, POS_TOKEN_OPEN_PAREN, POS_TOKEN_OPERATOR, POS_TOKEN_VARIABLE, TRUE, and PosToken::type.
Referenced by meta_draw_spec_new().
1.5.5