https://github.com/j123b567/scpi-parser
Dependents:
scpi_sx127x
scpi_sx127x_firstTest
MLX90418_I2C_master
« Back to documentation index
lexer.c File Reference
SCPI Lexer.
More...
Go to the source code of this file.
Functions
static int isws (int c)
Is white space.
static int isbdigit (int c)
Is binary digit.
static int isqdigit (int c)
Is hexadecimal digit.
static int iseos (lex_state_t *state)
Is end of string.
int scpiLex_IsEos (lex_state_t *state)
Private export of iseos.
static int ischr (lex_state_t *state, char chr)
Test current character.
static int isplusmn (int c)
Is plus or minus.
static int isH (int c)
Is letter H.
static int isB (int c)
Is letter B.
static int isQ (int c)
Is letter Q.
static int isE (int c)
Is letter E.
static int skipWs (lex_state_t *state)
Skip all whitespaces.
static int skipDigit (lex_state_t *state)
Skip decimal digit.
static int skipNumbers (lex_state_t *state)
Skip multiple decimal digits.
static int skipPlusmn (lex_state_t *state)
Skip plus or minus.
static int skipAlpha (lex_state_t *state)
Skip any character from 'a'-'Z'.
static int skipChr (lex_state_t *state, char chr)
Skip exact character chr or nothing.
static int skipSlashDot (lex_state_t *state)
Skip slash or dot.
static int skipStar (lex_state_t *state)
Skip star.
static int skipColon (lex_state_t *state)
Skip colon.
static int skipProgramMnemonic (lex_state_t *state)
Skip program mnemonic [a-z][a-z0-9_]*.
int scpiLex_WhiteSpace (lex_state_t *state, scpi_token_t *token)
Detect token white space.
static int skipCommonProgramHeader (lex_state_t *state)
Skip command program header \*<PROGRAM mnemonic>="">
static int skipCompoundProgramHeader (lex_state_t *state)
Skip compound program header :<PROGRAM mnemonic>="">:<PROGRAM mnemonic>="">...
int scpiLex_ProgramHeader (lex_state_t *state, scpi_token_t *token)
Detect token command or compound program header.
int scpiLex_CharacterProgramData (lex_state_t *state, scpi_token_t *token)
Detect token "Character program data".
int scpiLex_DecimalNumericProgramData (lex_state_t *state, scpi_token_t *token)
Detect token Decimal number.
int scpiLex_NondecimalNumericData (lex_state_t *state, scpi_token_t *token)
Detect token nondecimal number.
int scpiLex_StringProgramData (lex_state_t *state, scpi_token_t *token)
Detect token String data.
int scpiLex_ArbitraryBlockProgramData (lex_state_t *state, scpi_token_t *token)
Detect token Block Data.
int scpiLex_ProgramExpression (lex_state_t *state, scpi_token_t *token)
Detect token Expression.
int scpiLex_Comma (lex_state_t *state, scpi_token_t *token)
Detect token comma.
int scpiLex_Semicolon (lex_state_t *state, scpi_token_t *token)
Detect token semicolon.
int scpiLex_NewLine (lex_state_t *state, scpi_token_t *token)
Detect token New line.
Detailed Description
SCPI Lexer.
Date: Wed Mar 20 19:35:19 UTC 2013
Definition in file lexer.c .
Function Documentation
static int isB
(
int
c )
[static]
Is letter B.
Parameters:
Returns:
Definition at line 135 of file lexer.c .
static int isbdigit
(
int
c )
[static]
Is binary digit.
Parameters:
Returns:
Definition at line 61 of file lexer.c .
static int ischr
(
lex_state_t *
state ,
char
chr
)
[static]
Test current character.
Parameters:
Returns:
Definition at line 108 of file lexer.c .
static int isE
(
int
c )
[static]
Is letter E.
Parameters:
Returns:
Definition at line 153 of file lexer.c .
static int iseos
(
lex_state_t *
state )
[static]
Is end of string.
Parameters:
Returns:
Definition at line 85 of file lexer.c .
static int isH
(
int
c )
[static]
Is letter H.
Parameters:
Returns:
Definition at line 126 of file lexer.c .
static int isplusmn
(
int
c )
[static]
Is plus or minus.
Parameters:
Returns:
Definition at line 117 of file lexer.c .
static int isQ
(
int
c )
[static]
Is letter Q.
Parameters:
Returns:
Definition at line 144 of file lexer.c .
static int isqdigit
(
int
c )
[static]
Is hexadecimal digit.
Parameters:
Returns:
Definition at line 73 of file lexer.c .
static int isws
(
int
c )
[static]
Is white space.
Parameters:
Returns:
Definition at line 49 of file lexer.c .
int scpiLex_ArbitraryBlockProgramData
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token Block Data.
Parameters:
Returns:
Definition at line 715 of file lexer.c .
int scpiLex_CharacterProgramData
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token "Character program data".
Parameters:
Returns:
Definition at line 451 of file lexer.c .
int scpiLex_Comma
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token comma.
Parameters:
Returns:
Definition at line 833 of file lexer.c .
int scpiLex_DecimalNumericProgramData
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token Decimal number.
Parameters:
Returns:
Definition at line 508 of file lexer.c .
int scpiLex_IsEos
(
lex_state_t *
state )
Private export of iseos.
Parameters:
Returns:
Definition at line 98 of file lexer.c .
int scpiLex_NewLine
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token New line.
Parameters:
Returns:
Definition at line 873 of file lexer.c .
int scpiLex_NondecimalNumericData
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token nondecimal number.
Parameters:
Returns:
Definition at line 596 of file lexer.c .
int scpiLex_ProgramExpression
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token Expression.
Parameters:
Returns:
Definition at line 801 of file lexer.c .
int scpiLex_ProgramHeader
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token command or compound program header.
Parameters:
Returns:
Definition at line 405 of file lexer.c .
int scpiLex_Semicolon
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token semicolon.
Parameters:
Returns:
Definition at line 853 of file lexer.c .
int scpiLex_StringProgramData
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token String data.
Parameters:
Returns:
Definition at line 663 of file lexer.c .
int scpiLex_WhiteSpace
(
lex_state_t *
state ,
scpi_token_t *
token
)
Detect token white space.
Parameters:
Returns:
Definition at line 330 of file lexer.c .
static int skipAlpha
(
lex_state_t *
state )
[static]
Skip any character from 'a'-'Z'.
Parameters:
Returns:
Definition at line 233 of file lexer.c .
static int skipChr
(
lex_state_t *
state ,
char
chr
)
[static]
Skip exact character chr or nothing.
Parameters:
Returns:
Definition at line 248 of file lexer.c .
static int skipColon
(
lex_state_t *
state )
[static]
Skip colon.
Parameters:
Returns:
Definition at line 290 of file lexer.c .
static int skipCommonProgramHeader
(
lex_state_t *
state )
[static]
Skip command program header \*<PROGRAM mnemonic>="">
Parameters:
Returns:
Definition at line 353 of file lexer.c .
static int skipCompoundProgramHeader
(
lex_state_t *
state )
[static]
Skip compound program header :<PROGRAM mnemonic>="">:<PROGRAM mnemonic>="">...
Parameters:
Returns:
Definition at line 375 of file lexer.c .
static int skipDigit
(
lex_state_t *
state )
[static]
Skip decimal digit.
Parameters:
Returns:
Definition at line 191 of file lexer.c .
static int skipNumbers
(
lex_state_t *
state )
[static]
Skip multiple decimal digits.
Parameters:
Returns:
Definition at line 205 of file lexer.c .
static int skipPlusmn
(
lex_state_t *
state )
[static]
Skip plus or minus.
Parameters:
Returns:
Definition at line 219 of file lexer.c .
static int skipProgramMnemonic
(
lex_state_t *
state )
[static]
Skip program mnemonic [a-z][a-z0-9_]*.
Parameters:
Returns:
Definition at line 306 of file lexer.c .
static int skipSlashDot
(
lex_state_t *
state )
[static]
Skip slash or dot.
Parameters:
Returns:
Definition at line 262 of file lexer.c .
static int skipStar
(
lex_state_t *
state )
[static]
Skip star.
Parameters:
Returns:
Definition at line 276 of file lexer.c .
static int skipWs
(
lex_state_t *
state )
[static]
Skip all whitespaces.
Parameters:
Returns:
Definition at line 170 of file lexer.c .