Commit Graph

32 Commits

Author SHA1 Message Date
Zachary Snow 6ffa31ff9a small coverage improvements 2023-11-04 22:24:59 -04:00
Zachary Snow 0a7b0250e7 fix 1364-2001 and 1364-2001-noconfig keywords mixup
- swap 1364-2001 and 1364-2001-noconfig
- fix existing begin_keywords test
- add keyword test suite for all keywords
2023-05-15 22:21:23 -04:00
Zachary Snow eca8714de7 skip start of block before looking for its end 2023-03-07 23:54:56 -05:00
Zachary Snow e169c907f4 fix preprocessing of line comments not preceded by whitespace 2021-09-13 20:46:59 -04:00
Zachary Snow d335d2ff25 use UTF-8 across all platforms
- all inputs are now decoded as UTF-8, regardless of the platform
- decoding failures are now tolerated via transliteration given errant
  characters are generally expected to appear in comments
2021-08-30 10:39:49 -06:00
Zachary Snow c17d859988 tolerate escaped vendor comments within macros 2021-08-16 18:22:04 -06:00
Zachary Snow 306d71334b refactor sizing and truncation of integer literals
- use iverilog's -gstrict-expr-width throughout test suite
- add warnings for excess bits or padding zeroes in number literals
- add new --oversized-numbers parameter to retain support for unsized
  numbers wider than 32 bits
- localized use of oversized numbers to new truncate test suite which
  verifies the behavior of both modes, and compares against the known
  behavior of iverilog
2021-08-09 22:10:29 -06:00
Zachary Snow 9aa8b7033e fix handling of comments, quotes, and trailing whitespace in macro arguments 2021-07-08 16:30:02 -04:00
Zachary Snow 25fe57f75a fix lexing of whitespace in number literals
In places where an optional space was previously allowed, allow any
number of arbitrary whitespace characters, in line with the spec and
other tools.
2021-07-08 13:53:29 -04:00
Zachary Snow 12c57ecc24 preprocessor cleanup and extended test coverage 2021-05-06 16:14:41 -04:00
Zachary Snow 2885e21cdd fix handling of preproc conditionals within macros
- preproc reads identifiers unconditionally
- drop leading whitespace for default macro args
- very minor preproc cleanup
2021-05-04 16:19:07 -04:00
Zachary Snow c59334ceb8 allow preproc idents to begin with macro arguments 2021-05-03 17:53:41 -04:00
Zachary Snow 10b30d7d1e detect infinite include loops 2021-05-01 21:12:00 -04:00
Zachary Snow 0c31936590 maintain explicit padding in unsized number literals 2020-12-10 14:52:43 -07:00
Zachary Snow e72d372d73 omit reference file for verilog-compatible test inputs 2020-12-08 11:39:17 -07:00
Zachary Snow 1fd72d878f fix double backtick handling in backtick string 2020-12-04 13:22:38 -07:00
Zachary Snow a7874e1b2f test suite iverilog 11.0 compatibility 2020-11-24 18:09:07 -07:00
Zachary Snow d88c516d33 enhanced handling of number literals
- number literals are parsed rather than stored as strings
- fix array query functions used on non-trivial number literals
- more efficient expression simplification recursion
- expanded constant folding scenarios
2020-07-12 15:06:27 -06:00
Zachary Snow ad21277eb5 support macro names comprised of macro args and macros 2020-02-16 22:18:12 -05:00
Zachary Snow 104f98011e support for string literals with macros
- adds support for using macros and macro arguments within the argument
  list to other macros
- fixes an issue where macros with arguments would have extraneous
  whitespace
- fixes handling of multiline string literals
2020-02-12 23:58:41 -05:00
Zachary Snow 3c08767b63 redesigned preprocessor and lexer 2020-02-06 23:33:13 -05:00
Zachary Snow ad98c14547 fix handling of macros at EOF (resolves #62) 2020-01-27 19:18:58 -05:00
Zachary Snow cf4c2a5491 expanded support for macros in preprocessor directives 2020-01-14 23:19:39 -05:00
Zachary Snow fea5ff44eb coalesce tokens across nested macros 2019-10-11 22:53:08 -04:00
Zachary Snow d86f8535a0 support for begin_keywords directive 2019-10-11 19:32:10 -04:00
Zachary Snow 149d16d8fc add support for `line directive 2019-10-10 19:00:49 -04:00
Zachary Snow a1735ffef7 fix lexing identifiers and numbers across macro boundaries 2019-10-06 15:16:48 -04:00
Zachary Snow 89e4f2a248 allow newlines before left paren of macro arguments 2019-08-11 17:55:42 -04:00
Zachary Snow 02e948f283 test runner automatically handles tests with top-level module inside both inputs 2019-05-10 10:48:40 -04:00
Zachary Snow d4284163dc explicitly use bash to avoid dash compatability issues when running tests 2019-04-16 16:35:53 -04:00
Zachary Snow 2f91e25aa2 more lexer tests 2019-04-03 00:16:30 -04:00
Zachary Snow 788a71d1be initial lexer tests; general test harness 2019-04-02 23:11:16 -04:00