Commit graph

  • 1f572973c3 Reduce memory usage by omitting labels in normal parsers Charles Baker 2023-05-28 16:21:19 +12:00
  • c7eea3b698 Reduce memory usage by removing vector from GrammarSymbolSet Charles Baker 2023-05-28 15:07:25 +12:00
  • c9a6a297bf Sanitize parser state labels Charles Baker 2023-05-28 20:31:59 +12:00
  • a5db5713da Remove unused GrammarSymbolLess Charles Baker 2023-05-27 20:29:31 +12:00
  • faaafdcef6 Remove GrammarProduction pointer from GrammarItem Charles Baker 2023-05-27 16:26:56 +12:00
  • c6bd1489d5 Reduce memory usage by omitting labels in normal parsers Charles Baker 2023-05-28 16:21:19 +12:00
  • 9ac779b956 Reduce memory usage by removing vector from GrammarSymbolSet Charles Baker 2023-05-28 15:07:25 +12:00
  • 962a253ab5 Sanitize parser state labels Charles Baker 2023-05-28 20:31:59 +12:00
  • 1c699fb60a Remove unused GrammarSymbolLess Charles Baker 2023-05-27 20:29:31 +12:00
  • 0e2089b1ce Remove GrammarProduction pointer from GrammarItem Charles Baker 2023-05-27 16:26:56 +12:00
  • 9d90804ae2 Use a vector of active GrammarStates to track new states Charles Baker 2023-05-21 21:15:38 +12:00
  • ebe173cb12 Parse arrays in the JSON example Charles Baker 2023-05-26 21:52:39 +12:00
  • c5a7c1728d Generate errors for missing lexical action handlers Charles Baker 2023-05-21 21:00:37 +12:00
  • 77602f9052 Test that parsers with missing lexical action handlers generate errors Charles Baker 2023-05-21 20:15:29 +12:00
  • d8948dd936 Report missing action handlers from Parser::valid() Charles Baker 2023-05-21 20:09:41 +12:00
  • 184a8b34c0 Report missing lexical action handlers from Lexer::valid() Charles Baker 2023-05-21 20:04:14 +12:00
  • e56556f390 Move Parser::fire_{error,print}() and Parser::is_debug_enabled() to const member section Charles Baker 2023-05-21 20:03:36 +12:00
  • b7b7c4d61e Move Lexer::set_action_handler() to non-const member section Charles Baker 2023-05-21 19:53:46 +12:00
  • 5ce357e651 Treat empty character classes in a regular expression as an error Charles Baker 2023-05-20 22:15:12 +12:00
  • aaea898aab Allow most metacharacters in character classes, e.g. allow "[+-]" Charles Baker 2023-05-20 22:08:07 +12:00
  • 2235e9fe6b Stop Lexer reading past end of input when skipping whitespace Charles Baker 2023-05-20 21:01:23 +12:00
  • eb23625604 Simplify lexer state generation in RegexGenerator Charles Baker 2023-05-19 20:08:03 +12:00
  • 0e8a1e96b6 Declare write_graphviz_dot() in dot.hpp, include from lalrc.cpp Charles Baker 2023-05-19 20:05:55 +12:00
  • cee6d1372a Rename RegexState::get_index() to RegexState::index() Charles Baker 2023-05-19 20:04:29 +12:00
  • 76d51795f3 Remove trailing newline from C++ output Charles Baker 2023-05-12 20:58:07 +12:00
  • 02210884a3 Implement RegexItem::operator<() with std::lexicographical_compare() Charles Baker 2023-05-19 20:07:24 +12:00
  • 6750cb1769 Store ParserSymbol in whitespace lexer tokens matched symbol Charles Baker 2023-05-12 20:56:31 +12:00
  • 7f1b4c97c1 Optimize spontaneous and propagated lookahead in parser generator Charles Baker 2023-04-24 21:29:44 +12:00
  • 461f064e4f Rename lookahead_symbols to lookaheads when generating a parser tracy-profiling Charles Baker 2023-04-24 21:29:44 +12:00
  • 00ac18244c CQL: Add cql example Charles Baker 2023-01-30 09:41:22 +13:00
  • 5db5340023 Add sql.g as an example of a large, slow to compile grammar Charles Baker 2023-01-30 09:41:22 +13:00
  • 1c52cc1471 WIP: Add support for profiling with Tracy Charles Baker 2023-01-30 09:41:08 +13:00
  • 2a442d2667 Write parser state machines as GraphViz dot graphs Charles Baker 2023-04-03 05:47:19 +12:00
  • c77e4d5a7b Only allocate GrammarState when needed in GrammarGenerator::goto_ Charles Baker 2023-04-18 08:23:55 +12:00
  • 85472d7b9e Use vector of transitions by symbol index for transitions between states Charles Baker 2023-04-17 16:03:07 +12:00
  • 6b4285bc78 Bump standard to c++14 for std::make_unique() Charles Baker 2023-04-17 20:46:17 +12:00
  • 3c810e1a74 Generate state machine from kernel items only Charles Baker 2023-04-17 13:08:59 +12:00
  • 390e8fc8f1 Add lalr library to all build target Charles Baker 2023-04-17 13:08:47 +12:00
  • 5a0e55bddf Use set not std::set in GrammarGenerator Charles Baker 2023-04-15 09:18:30 +12:00
  • 7d1b6cd2a2 Take precedence and associativity from either form of an implicit terminal Charles Baker 2023-04-01 20:02:48 +13:00
  • b0e68cf7a9 Check that implicit terminals only specify associativity on one symbol Charles Baker 2023-04-01 20:01:31 +13:00
  • 23297a4aed Report the line that an unreferenced symbol is referenced from Charles Baker 2023-04-01 20:03:27 +13:00
  • 4f98975d88 LINT: Remove extra whitespace in comment in GrammarGenerator.cpp Charles Baker 2023-04-01 20:03:09 +13:00
  • 5227eed189 Fix wrong shift/reduce conflict detection mingodad 2023-03-30 10:10:33 +02:00
  • bc8a6dbebc Report symbol in syntax error if available Charles Baker 2023-03-22 20:26:12 +13:00
  • 305b73ebf4 Improve whitespace handling Charles Baker 2023-03-21 19:23:09 +13:00
  • 0338ed6d21 Use PositionIterator to track line number in lexer actions Charles Baker 2023-03-21 21:09:58 +13:00
  • 4e39f61337 Revise examples to use simpler lexer actions Charles Baker 2023-03-19 16:49:47 +13:00
  • 18cf324d7b Revise regex tests with PositionIterator counting lines correctly Charles Baker 2023-03-18 17:03:42 +13:00
  • db29a3b8eb Use PositionIterator to track line and column in lexer actions Charles Baker 2023-03-17 21:07:10 +13:00
  • a47cd5c6d0 Improve reporting of syntax errors Charles Baker 2023-03-21 20:42:58 +13:00
  • 305c872c11 Back-track to most recently matched token in lexer Charles Baker 2023-03-19 16:48:24 +13:00
  • ed7597a01a Add string_literal lexer action for single-character delimited strings Charles Baker 2023-03-19 16:49:04 +13:00
  • 4ba5dcbac3 Allow lexer actions for tokens and whitespace to co-exist Charles Baker 2023-03-19 20:49:44 +13:00
  • 408dc7b985 Separate block_comment() and line_comment() to simplify comments Charles Baker 2023-03-15 20:26:04 +13:00
  • 8425a211ff Add EBNF generation, accept '%prec' to make easy use yacc grammars, add incomplete '%case_insensitive' directive mingodad 2023-03-09 10:30:47 +01:00
  • f68bb59f6f Propagate errors generating lexers up so they don't generate grammars Charles Baker 2023-03-09 16:56:08 +13:00
  • adc77da58f Generate errors for undefined symbols not referenced by %precedence Charles Baker 2023-03-09 16:18:18 +13:00
  • ff23037ec7 LINT: Improve comments in GrammarGenerator Charles Baker 2023-03-09 16:18:30 +13:00
  • 75b7f768e0 Test matching case insensitive keywords with regular expressions Charles Baker 2023-01-28 16:44:43 +13:00
  • f8dd0b6986 Build with Forge v0.9.0 on Github Actions Charles Baker 2022-08-12 16:20:11 +12:00
  • 47b3ed8020 Call run() not system() in Lalrc.build() Charles Baker 2022-08-12 16:07:26 +12:00
  • 4608c46192 Update UnitTest++ to build with Forge v0.9.0 Charles Baker 2022-08-12 16:03:28 +12:00
  • f5e6c471d3 Update lalr Forge module to work with Forge v0.9.0 Charles Baker 2022-08-12 16:01:48 +12:00
  • d492fc597d Build with Forge v0.9.0 Charles Baker 2022-08-12 16:01:36 +12:00
  • 7b4bf35ea9 Use Forge v0.6.18 to build with Github Actions Charles Baker 2021-09-05 08:44:49 +12:00
  • f46820b622 Build with default architecture (i.e. set architecture nil in forge.lua) Charles Baker 2021-06-21 08:04:47 +12:00
  • ec98af395a Use Forge v0.5.40 to build with Github Actions Charles Baker 2021-06-21 08:09:51 +12:00
  • f66a2eaaef Report production(s) first in shift/reduce and reduce/reduce conflicts Charles Baker 2021-05-31 20:17:58 +12:00
  • efc0fab1ee Rename GrammarGenerator::fire_error() to GrammarGenerator::error() Charles Baker 2021-05-31 08:39:19 +12:00
  • 8a309875f8 Remove unused GrammarGenerator::fire_printf() Charles Baker 2021-05-31 08:37:24 +12:00
  • 5643ac3f72 Start GrammarGenerator error messages with lower case letters Charles Baker 2021-05-31 08:36:41 +12:00
  • 3bdde97efc Remove unused column from GrammarGenerator/GrammarParser error handlers Charles Baker 2021-05-31 08:34:50 +12:00
  • 1be11f2fb5 Stop reporting column in errors by default as lalrc doesn't track it Charles Baker 2021-05-31 08:31:11 +12:00
  • f4a53961d9 Track new lines in line and block comments Charles Baker 2021-05-31 08:28:45 +12:00
  • 7fb5ca3de5 Track production line numbers rather than using their symbol's line Charles Baker 2021-05-31 08:26:28 +12:00
  • 773a4459e9 Report production(s) first in shift/reduce and reduce/reduce conflicts Charles Baker 2021-05-31 20:17:58 +12:00
  • 20af306901 Rename GrammarGenerator::fire_error() to GrammarGenerator::error() Charles Baker 2021-05-31 08:39:19 +12:00
  • 0f069651ad Remove unused GrammarGenerator::fire_printf() Charles Baker 2021-05-31 08:37:24 +12:00
  • cace53fc70 Start GrammarGenerator error messages with lower case letters Charles Baker 2021-05-31 08:36:41 +12:00
  • a80a844b9c Remove unused column from GrammarGenerator/GrammarParser error handlers Charles Baker 2021-05-31 08:34:50 +12:00
  • a59b67f470 Stop reporting column in errors by default as lalrc doesn't track it Charles Baker 2021-05-31 08:31:11 +12:00
  • 6a09414bdf Track new lines in line and block comments Charles Baker 2021-05-31 08:28:45 +12:00
  • c98a582d0f Track production line numbers rather than using their symbol's line Charles Baker 2021-05-31 08:26:28 +12:00
  • f4d8827351 Refer to std::function not std::tr1::function in README.md Charles Baker 2021-05-20 20:51:58 +12:00
  • 340e5da764 Remove unused visual_studio and xcode settings from forge.lua Charles Baker 2021-05-20 20:49:52 +12:00
  • 13b6ebbe8d Move source into src/ directory Charles Baker 2021-05-20 20:58:23 +12:00
  • f165f76213 Build with lalr and unittest-cpp moved into the src directory Charles Baker 2021-05-20 08:52:28 +12:00
  • 4736c9d7a6 Move cwbaker/unittest-cpp submodule to src/unittest-cpp Charles Baker 2021-05-20 08:44:22 +12:00
  • a54dab9957 Move lalr/** to src/lalr/** moving lalr library source up to src/lalr Charles Baker 2021-05-20 08:43:00 +12:00
  • 0798260816 Remove "of a more" typo from Reduce/Reduce Conflicts in README.md Charles Baker 2021-05-16 09:17:31 +12:00
  • ac2df1da01 Minor formatting changes and documentation commenting Charles Baker 2021-05-16 08:19:47 +12:00
  • 06a6decb33 Remove unused parser_allocations_, lexer_allocations_, and whitespace_lexer_allocations_ from Grammar Charles Baker 2021-05-16 07:49:35 +12:00
  • 6483da2ab1 Minor formatting changes and documentation commenting Charles Baker 2021-05-16 08:19:47 +12:00
  • 842e945fc3 Remove unused parser_allocations_, lexer_allocations_, and whitespace_lexer_allocations_ from Grammar Charles Baker 2021-05-16 07:49:35 +12:00
  • 25b9d75082 Update to unittest-cpp that builds library with platform and architecture Charles Baker 2021-05-14 19:52:05 +12:00
  • 4bbca56212 Include platform when linking with lalr from lalr_examples Charles Baker 2021-05-14 19:49:03 +12:00
  • bbc0dc0965
    LINT: Remove trailing whitespace in RegexGenerator.cpp Charles Baker 2021-05-14 16:52:38 +12:00
  • b7a5648068
    Fix typo in RegexItem::next_nodes() documentation comment Charles Baker 2021-05-14 16:52:12 +12:00
  • ee9c98d49c
    Keep RegexSyntaxTree allocated until after states are generated Charles Baker 2021-05-14 16:51:34 +12:00