JWM Source Documentation
lex.h File Reference
XML lexer header file. More...
Go to the source code of this file.
Detailed Description
Typedef Documentation
| typedef struct AttributeNode AttributeNode |
Structure to represent an XML attribute.
Enumeration Type Documentation
| enum TokenType |
Tokens.
Note that any change made to this typedef must be reflected in TOKEN_MAP in lex.c.
- Enumerator:
Function Documentation
| const char* GetTokenName | ( | const TokenNode * | tp | ) |
Get a string represention of a token.
This is identical to GetTokenTypeName if tp is a valid token.
- Parameters:
-
tp The token node.
- Returns:
- The name (never NULL).
| const char* GetTokenTypeName | ( | TokenType | type | ) |
Get a string represention of a token.
- Parameters:
-
type The token.
- Returns:
- The name (never NULL).
| TokenNode* Tokenize | ( | const char * | line, |
| const char * | fileName | ||
| ) |
Tokenize a buffer.
- Parameters:
-
line The buffer to tokenize. fileName The name of the file for error reporting.
- Returns:
- A linked list of tokens from the buffer.