wavelength 1.0.0
Loading...
Searching...
No Matches
datalex.h File Reference
#include <stdio.h>
Include dependency graph for datalex.h:

Go to the source code of this file.

Enumerations

enum  DataToken {
  kDataTokenEnd = 0 , kDataTokenFloat = 1 , kDataTokenInt = 2 , kDataTokenString = 3 ,
  kDataTokenSymbol = 4 , kDataTokenOpen = 5 , kDataTokenClose = 6 , kDataTokenDefine = 7 ,
  kDataTokenDefineEnd = 8 , kDataTokenInclude = 9 , kDataTokenMerge = 10
}
 Tokens DataLex() reports. More...

Functions

int DataLex ()
 Scan the next token of the data file the parser reads.

Variables

char * g_pszDataLexText
 The text of the token DataLex() reported last, terminated.
int g_nDataLexLength
 The length of g_pszDataLexText.
FILE * g_pDataLexIn
 The file the scanner reads when it starts, standard input.
FILE * g_pDataLexOut
 The file the scanner would echo to, standard output.

Enumeration Type Documentation

◆ DataToken

enum DataToken

Tokens DataLex() reports.

The names are inferred.

Enumerator
kDataTokenEnd 

The end of the input.

kDataTokenFloat 

A number with a fraction or an exponent.

kDataTokenInt 

A whole number.

kDataTokenString 

Text in double quotes, quotes included.

kDataTokenSymbol 

A bare word.

kDataTokenOpen 

(, the start of a child array.

kDataTokenClose 

), the end of a child array.

kDataTokenDefine 

{, the start of the value of the macro just read.

kDataTokenDefineEnd 

}, the end of a macro value.

kDataTokenInclude 

A file name in < and >, read in place.

kDataTokenMerge 

A file name in << and >>, merged by tag.

Function Documentation

◆ DataLex()

int DataLex ( )

Scan the next token of the data file the parser reads.

The scanner reads through DataInput() and advances g_nDataParseLineNumber at each newline. It skips white space and comments.

Returns
One of DataToken.
Ghidra address:
NTSC-U/C: 0x002987a0
Ghidra address:
PAL: 0x002a23b0

Variable Documentation

◆ g_pszDataLexText

char* g_pszDataLexText
extern

The text of the token DataLex() reported last, terminated.

Ghidra address:
NTSC-U/C: 0x00515308

◆ g_nDataLexLength

int g_nDataLexLength
extern

The length of g_pszDataLexText.

Ghidra address:
NTSC-U/C: 0x005152f8

◆ g_pDataLexIn

FILE* g_pDataLexIn
extern

The file the scanner reads when it starts, standard input.

Ghidra address:
NTSC-U/C: 0x003b2390
Ghidra address:
PAL: 0x00431250

◆ g_pDataLexOut

FILE* g_pDataLexOut
extern

The file the scanner would echo to, standard output.

Ghidra address:
NTSC-U/C: 0x003b2394
Ghidra address:
PAL: 0x00431254