mirror of
https://github.com/HyperDbg/HyperDbg.git
synced 2026-07-30 03:15:51 +00:00
52 lines
783 B
C
52 lines
783 B
C
#pragma once
|
|
|
|
#ifndef SCANNER_H
|
|
# define SCANNER_H
|
|
|
|
/**
|
|
* @brief lookup table for storing Ids
|
|
*/
|
|
PTOKEN_LIST IdTable;
|
|
|
|
/**
|
|
* @brief number of read characters from input
|
|
*/
|
|
unsigned int InputIdx;
|
|
|
|
/**
|
|
* @brief number of current reading line
|
|
*/
|
|
unsigned int CurrentLine;
|
|
|
|
/*
|
|
* @brief current line start postion
|
|
*/
|
|
unsigned int CurrentLineIdx;
|
|
|
|
/*
|
|
* @brief curren PTOKEN start postion
|
|
*/
|
|
unsigned int CurrentTokenIdx;
|
|
|
|
////////////////////////////////////////////////////
|
|
// Interfacing functions //
|
|
////////////////////////////////////////////////////
|
|
|
|
PTOKEN
|
|
GetToken(char * c, char * str);
|
|
|
|
PTOKEN
|
|
Scan(char * str, char * c);
|
|
|
|
char
|
|
sgetc(char * str);
|
|
|
|
char
|
|
IsKeyword(char * str);
|
|
|
|
char
|
|
IsId(char * str);
|
|
|
|
char
|
|
IsRegister(char * str);
|
|
#endif // !SCANNER_H
|