Table of Contents

Class Scanner

Namespace
GLib
Assembly
GLib-2.0.dll
public sealed class Scanner
Inheritance
Scanner
Inherited Members

Constructors

Scanner()

public Scanner()

Scanner(ScannerOwnedHandle)

public Scanner(ScannerOwnedHandle handle)

Parameters

handle ScannerOwnedHandle

Properties

Handle

public ScannerOwnedHandle Handle { get; }

Property Value

ScannerOwnedHandle

InputName

public string? InputName { get; set; }

Property Value

string

Line

public uint Line { get; set; }

Property Value

uint

MaxParseErrors

public uint MaxParseErrors { get; set; }

Property Value

uint

NextLine

public uint NextLine { get; set; }

Property Value

uint

NextPosition

public uint NextPosition { get; set; }

Property Value

uint

NextToken

public TokenType NextToken { get; set; }

Property Value

TokenType

ParseErrors

public uint ParseErrors { get; set; }

Property Value

uint

Position

public uint Position { get; set; }

Property Value

uint

Token

public TokenType Token { get; set; }

Property Value

TokenType

Methods

CurLine()

public uint CurLine()

Returns

uint

CurPosition()

public uint CurPosition()

Returns

uint

CurToken()

public TokenType CurToken()

Returns

TokenType

Destroy()

public void Destroy()

Eof()

public bool Eof()

Returns

bool

Equals(Scanner?)

public bool Equals(Scanner? other)

Parameters

other Scanner

Returns

bool

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetNextToken()

public TokenType GetNextToken()

Returns

TokenType

InputFile(int)

public void InputFile(int inputFd)

Parameters

inputFd int

InputText(string, uint)

public void InputText(string text, uint textLen)

Parameters

text string
textLen uint

LookupSymbol(string)

public IntPtr LookupSymbol(string symbol)

Parameters

symbol string

Returns

IntPtr

New(ScannerConfig)

public static Scanner New(ScannerConfig configTempl)

Parameters

configTempl ScannerConfig

Returns

Scanner

PeekNextToken()

public TokenType PeekNextToken()

Returns

TokenType

ScopeAddSymbol(uint, string, IntPtr)

public void ScopeAddSymbol(uint scopeId, string symbol, IntPtr value)

Parameters

scopeId uint
symbol string
value IntPtr

ScopeForeachSymbol(uint, HFunc)

public void ScopeForeachSymbol(uint scopeId, HFunc func)

Parameters

scopeId uint
func HFunc

ScopeLookupSymbol(uint, string)

public IntPtr ScopeLookupSymbol(uint scopeId, string symbol)

Parameters

scopeId uint
symbol string

Returns

IntPtr

ScopeRemoveSymbol(uint, string)

public void ScopeRemoveSymbol(uint scopeId, string symbol)

Parameters

scopeId uint
symbol string

SetScope(uint)

public uint SetScope(uint scopeId)

Parameters

scopeId uint

Returns

uint

SyncFileOffset()

public void SyncFileOffset()

UnexpToken(TokenType, string, string, string, string, int)

public void UnexpToken(TokenType expectedToken, string identifierSpec, string symbolSpec, string symbolName, string message, int isError)

Parameters

expectedToken TokenType
identifierSpec string
symbolSpec string
symbolName string
message string
isError int