From c8abf928a1686b935712ff02fdcad085fa48d65f Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: ćšć, 06 11æ 2014 21:21:17 +0800 Subject: [PATCH] Refactor private lexer and private parser API --- libscpi/src/lexer.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libscpi/src/lexer.c b/libscpi/src/lexer.c index ed7f49c..9060d2f 100644 --- a/libscpi/src/lexer.c +++ b/libscpi/src/lexer.c @@ -70,7 +70,7 @@ } } -int lexIsEos(lex_state_t * state) { +int scpiLex_IsEos(lex_state_t * state) { return iseos(state); } @@ -212,7 +212,7 @@ } /* tokens */ -int lexWhiteSpace(lex_state_t * state, scpi_token_t * token) { +int scpiLex_WhiteSpace(lex_state_t * state, scpi_token_t * token) { token->ptr = state->pos; skipWs(state); @@ -270,7 +270,7 @@ } } -int lexProgramHeader(lex_state_t * state, scpi_token_t * token) { +int scpiLex_ProgramHeader(lex_state_t * state, scpi_token_t * token) { int res; token->ptr = state->pos; token->type = TokUnknown; @@ -309,7 +309,7 @@ } /* 7.7.1 <CHARACTER PROGRAM DATA> */ -int lexCharacterProgramData(lex_state_t * state, scpi_token_t * token) { +int scpiLex_CharacterProgramData(lex_state_t * state, scpi_token_t * token) { token->ptr = state->pos; if (!iseos(state) && isalpha(state->pos[0])) { @@ -360,7 +360,7 @@ return someNumbers; } -int lexDecimalNumericProgramData(lex_state_t * state, scpi_token_t * token) { +int scpiLex_DecimalNumericProgramData(lex_state_t * state, scpi_token_t * token) { const char * rollback; token->ptr = state->pos; @@ -385,7 +385,7 @@ } /* 7.7.3 <SUFFIX PROGRAM DATA> */ -int lexSuffixProgramData(lex_state_t * state, scpi_token_t * token) { +int scpiLex_SuffixProgramData(lex_state_t * state, scpi_token_t * token) { token->ptr = state->pos; skipChr(state, '/'); @@ -442,7 +442,7 @@ return someNumbers; } -int lexNondecimalNumericData(lex_state_t * state, scpi_token_t * token) { +int scpiLex_NondecimalNumericData(lex_state_t * state, scpi_token_t * token) { token->ptr = state->pos; int someNumbers = 0; if (skipChr(state, '#')) { @@ -503,7 +503,7 @@ skipQuoteProgramData(state, '\''); } -int lexStringProgramData(lex_state_t * state, scpi_token_t * token) { +int scpiLex_StringProgramData(lex_state_t * state, scpi_token_t * token) { token->ptr = state->pos; if (!iseos(state)) { @@ -549,7 +549,7 @@ return isdigit(c) && (c != '0'); } -int lexArbitraryBlockProgramData(lex_state_t * state, scpi_token_t * token) { +int scpiLex_ArbitraryBlockProgramData(lex_state_t * state, scpi_token_t * token) { int i; int j = 0; const char * ptr = state->pos; @@ -622,7 +622,7 @@ // TODO: 7.7.7.2-2 recursive - any program data -int lexProgramExpression(lex_state_t * state, scpi_token_t * token) { +int scpiLex_ProgramExpression(lex_state_t * state, scpi_token_t * token) { token->ptr = state->pos; if (!iseos(state) && ischr(state, '(')) { @@ -648,7 +648,7 @@ return token->len; } -int lexComma(lex_state_t * state, scpi_token_t * token) { +int scpiLex_Comma(lex_state_t * state, scpi_token_t * token) { token->ptr = state->pos; if (skipChr(state, ',')) { @@ -662,7 +662,7 @@ return token->len; } -int lexSemicolon(lex_state_t * state, scpi_token_t * token) { +int scpiLex_Semicolon(lex_state_t * state, scpi_token_t * token) { token->ptr = state->pos; if (skipChr(state, ';')) { @@ -676,7 +676,7 @@ return token->len; } -int lexNewLine(lex_state_t * state, scpi_token_t * token) { +int scpiLex_NewLine(lex_state_t * state, scpi_token_t * token) { token->ptr = state->pos; skipChr(state, '\r'); -- Gitblit v1.9.1