SMC_NCTokenParser (FB)

FUNCTION_BLOCK SMC_NCTokenParser

The parser between the SMC_NCTokenizer and the SMC_NCInterpreter. The parser transforms the stream of tokens to a sequence of g-code sentences ready to be interpreted.

Note

Usually, SMC_ReadNCFile2 or SMC_ReadNCFromStream should be used, which contain the parser. It is not necessary to use this function block directly in most cases.

InOut:

Scope

Name

Type

Comment

Inout

tokens

SMC_TokenQueue

Input: token queue

sentences

SMC_GSentenceQueue

Output: sentence queue

Input

bExecute

BOOL

While TRUE, the function block is active.

bAbort

BOOL

If TRUE, the current processing of this function block is aborted

symbolTable

SMC_INCSymbolTable

The symbol table used to look up variables and sub programs.

pCustomFunTable

POINTER TO SMC_NC_GFunctionTable

Allows to define custom functions that can be used in G-Code expressions. If there are no custom G-Code functions, this input is null.

Output

bBusy

BOOL

TRUE while execution of function block is not finished.

bError

BOOL

TRUE signals that an error has occurred within the function block.

ErrorID

SMC_ERROR

Error identification, SMC_ERROR

errorPos

SMC_NC_SourcePosition

The source-position where an error has been detected.