Commits

Author Commit Message Labels Comments Date
PioneerAxon
Fix coding style issues Phase: 4 Removed trailing whitespaces.
PioneerAxon
Fix coding style issues Phase: 3
PioneerAxon
Fix coding style issues Phase: 2
PioneerAxon
Fix coding style issues Phase: 1
PioneerAxon
Handle Han digits Fixed: pl_get_next_token() now supports Han digits (〇〡〢〣〤〥〦〧〨〩). They were not detected by g_unichar_isdigit().
PioneerAxon
Check variable at parse-tree generation. Added: p_check_variable() checks variable before parsing further. This fixes issues with "Unknown variable" being reported after "Malformed expression" in specific cases.
PioneerAxon
Error reporting in lexer and rework Fixed: Removed temp error reporting code from lexer.c and use set_error() to set proper error. Fixed: Set error_token pointer to NULL in ParserState. Fixed: Make "Full string not parsed" condition more full-proof.
PioneerAxon
Fixed add/subtract percent Added: In parserfunc.c function pf_do_add_perrcent() and pf_do_subtract_percent() with working code. Fixed: In parser.c, expression_2() now handles add/subtract percentage. Fixed: In parser.c, wrong dependency on mp-equation-private.h.
PioneerAxon
Merging to gcalctool Phase:2 Added: In l_check_if_number(), check if rollback few characters yeilds a number. Added: In HEX_DEC_STATE:, return T_NUMBER, if substring contains a number. Added: Set result (if any) into ParserState return value. Added: In parserfunc.c, every function checks if function pointers are assigned. Added: In parserfunc.c, every function checks if its child has returned NULL. Fixed: In l_check_if_functi…
PioneerAxon
Fix typos Fixed: typos in parser.c parser.h and parserfunc.c
PioneerAxon
Merging to gcalctool Phase:1 Added: check_if_number() and check_if_variable(). Updated: LexerState now contains pointer to the parent (parser) for easy error reporting. Updated: ParseNode now contains pointer to ParserState for access to state->options. Added: Options, errors, return value, function pointers to ParserState. Added: gcalctool code to parserfunc.c.
PioneerAxon
Added static and const identifire. Fixed: static functions. Fixed: const arguments. Fixed: code style for functions.
PioneerAxon
Fix coding style. comments and assert. Fixed: coding style over the code base. Fixed: assert() statements to make sure every memory allocation is done properly. Fixed: l_get_next_token() now returns PL_EOS after reaching at the end. Added: comments.
PioneerAxon
Fixed Unary Plus bug Fixed: Unary Plus bug - non insertion of NUMBER.
PioneerAxon
Everything working except add/subtract percent. Fixed: p_get_associativity() is now p_get_associativity_t(). And p_get_associativity now takes LexerToken*. Fixed: p_make_precedence() bug on storing function pointer evaluate. Fixed: p_insert_into_tree_all() bug on insertion of sequence NUMBER "+" NUMBER. Fixed: check PL_EOS and T_ASSIGN as both are in Follow set of grammar. Fixed: remove wrong depth level in (NOT expression). Fixed: bug in unary…
PioneerAxon
Parse-Tree basics, minor changes. Added: ParserFunc functions to be pushed into parse-tree. Added: ParseTree handling funtions. Removed: Unused function p_get_highest_precedence(). Fixed: parser.h.
PioneerAxon
Parser state handling Added: Parser state management. Fixed: ParserNode structure. Fixed: code in parser.c, lexer.h.
PioneerAxon
Removal of useless branches in grammar Fixed: Useless branching in grammar.
PioneerAxon
Associativity, Precedence and EOS Updated: Associativity structures and function. Added: Precedence enum and function. Fixed: End Of Stream handling in grammar functions.
PioneerAxon
Parser frame ParserState, ParserNode and Associativity. LL (*) parser structure
PioneerAxon
Rollback in lexer. ADDED: LexerState. ADDED: rollback capability in lexer code. UPDATED: Old LexerState became PreLexerState. Tokenization is now done at initialization of LexerState.
PioneerAxon
Support for other terminal tokens Remaining terminals added from bison file.
PioneerAxon
Bugfix, Some temporary code for easy debugging Bugfix: fixed missing BASE_NUMBER states. Temporary code to report error. Temporary code to get user input for branch-instructions.
PioneerAxon
Lexer working Added code for DFA parsing T_NUMBER, T_FUNCTION and T_VARIABLE. Changed indices in LexerTokenType.
PioneerAxon
Fixed: coding style Fix coding style for easy merging with gcalctool.
PioneerAxon
Updated for readability of pl_get_next_token() Updated code to increase readability of pl_get_next_token(). Removed support of PL_RE (Real part) and PL_IM (Imaginary part).
PioneerAxon
Initial work on lexer Lexer works for almost everything except T_NUMBER. Fixed. pl_get_next_unichar () for advantage of l_get_next_token(). Added PL_SKIP for distinguishing between "na me em an" and "name eman"
PioneerAxon
Pre-Lexer complete Working Pre-Lexer code -coded for readability of the code. -accepts all token from lex file. -handles EOS (end of stream) at last. EOS happens once in a lifetime so, no need to waste CPU power for that in each call.
PioneerAxon
String manipulation for pre-lexer Basic string manipulation functions to be used with pre-lexer. Supported functionalities: - create scanner object (LexerState) - destroy scanner object (LexerState) - get next unichar from stream - roll back last read from stream - mark location as beginning of new token - get marked substring as a new gchar string main.c contains code for testing.