Commit Graph

51 Commits

Author SHA1 Message Date
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 b660cfbd4e allow tabs in preprocessor directives 2019-10-10 22:10:59 -04:00
Zachary Snow 167c65db11 pass through downstream compiler directives 2019-10-10 20:53:49 -04:00
Zachary Snow 6d79e0b491 updated number literals 2019-10-10 19:01:09 -04:00
Zachary Snow 149d16d8fc add support for `line directive 2019-10-10 19:00:49 -04:00
Zachary Snow 9880885412 Revert "allow escaped newline in macro arguments"
This reverts commit ba7fbd5506.
2019-10-09 00:36:23 -04:00
Zachary Snow a1735ffef7 fix lexing identifiers and numbers across macro boundaries 2019-10-06 15:16:48 -04:00
Zachary Snow ba7fbd5506 allow escaped newline in macro arguments 2019-10-03 23:29:49 -04:00
Zachary Snow ceb384f680 support multiline strings 2019-09-30 23:53:18 -04:00
Henner Zeller e2f044ec4a Place <file>:<line>:<col> first in an error message
This is the same as most compilers (e.g. gcc and clang) but also
verilog tools (e.g. yosys) output error mesasge in a standardized form.

This form can immediately be parsed by IDE tools that can jumping
through a list of error messages, placing the cursor at the given
file position.

This change simply re-arranges the error message printing to conform to that
standard.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2019-09-18 19:16:37 -04:00
Zachary Snow bdafb60dec lexical and parse errors print to stderr 2019-09-17 19:34:56 -04:00
Zachary Snow 2ca8a022ad support and conversion for -> and <-> 2019-09-15 13:55:40 -04:00
Zachary Snow f5d6683422 generalization of array dimension(s) system functions 2019-09-14 12:38:26 -04:00
Zachary Snow 6ddf782383 drop timeunit and timescale (closes #31) 2019-09-11 21:44:57 -04:00
Zachary Snow 33bea9e694 added remaining SV keywords 2019-09-04 21:02:02 -04:00
Zachary Snow 89e4f2a248 allow newlines before left paren of macro arguments 2019-08-11 17:55:42 -04:00
Zachary Snow 8a67a91166 added language support for (untagged) unions 2019-08-08 23:12:06 -04:00
Zachary Snow 90bc30d4be add --oneunit, which treats all input files as being part of one compilation unit 2019-08-05 22:00:04 -04:00
Zachary Snow d01df6110b preliminary language support for packages 2019-04-23 15:53:51 -04:00
Zachary Snow 369e9f2f19 updated Stack snapshot; handled pattern matching failure issues introduced in GHC 8.6 2019-04-16 15:52:38 -04:00
Zachary Snow 6d0f7dd0a7 significantly stronger support, and proper handling of assertions 2019-04-03 19:08:30 -04:00
Zachary Snow e79c95c5f0 some cleanup throughout the SystemVerilog module 2019-04-03 13:45:43 -04:00
Zachary Snow 39f377e022 lexer has useful tagging of tokens from a macro expansion 2019-04-03 13:05:33 -04:00
Zachary Snow 2f91e25aa2 more lexer tests 2019-04-03 00:16:30 -04:00
Zachary Snow a18270a3bd many lexer fixes
- added support for macros with default arguments
- fixed bug where nested preprocessor conditionals would not be skipped
- macro expansion respects escaped quotation marks
- macro expansion considers whole identifiers, rather than substituting in wildly
2019-04-02 23:05:42 -04:00
Zachary Snow c53b39319d added support and conversion handling of the $bits system function
This also entailed further fleshing out the expression traversal helper
to cover expressions in generate blocks, which could, of course, use
$bits.
2019-04-02 00:16:09 -04:00
Zachary Snow 317994ed3a faster lexing by storing tokens in reverse order 2019-03-30 03:21:56 -04:00
Zachary Snow a432d75939 additional SystemVerilog language support
- unique0 and priority
- uniqueness on if statements
- preliminary discard-only parsing of assertions
- parameters with alias typenames
2019-03-30 00:47:42 -04:00
Zachary Snow 17fd6f8ce5 proper handling of single-line comments in macro definitions 2019-03-29 19:08:44 -04:00
Zachary Snow c4449fd9ca better support for macros with arguments 2019-03-29 18:55:45 -04:00
Zachary Snow e49cb3536e beginning work to support macros with arguments; lex posn fix 2019-03-29 17:02:49 -04:00
Zachary Snow 5dc049b9e5 cleanup pass over Lex.x 2019-03-29 13:59:51 -04:00
Zachary Snow d578aee5d9 conflate the preprocessor and lexer
This should make it much easier to add support for ``, `", macros with
arguments, etc., in the future.
2019-03-29 05:33:17 -04:00
Zachary Snow e69895af54 initial setup for combining pre-processor and lexer 2019-03-29 01:10:46 -04:00
Zachary Snow 6cc4654ad6 support for real numbers 2019-03-26 15:21:06 -04:00
Zachary Snow 39f6bbb3d8 preliminary support for extern and module/interface lifetimes 2019-03-26 15:10:16 -04:00
Zachary Snow 0e2658fdca fix string literal lexing 2019-03-25 19:42:20 -04:00
Zachary Snow cecd141e57 revamped support system with most SystemVerilog types and signed types 2019-03-22 17:45:31 -04:00
Zachary Snow 9259fef249 tolerate spaces in numeric literals in line with the spec 2019-03-22 02:01:48 -04:00
Zachary Snow 90bd6b3492 added support for n-input gates and n-output gates 2019-03-22 01:32:43 -04:00
Zachary Snow 1d2eccb32a preliminary support for defparam 2019-03-18 12:37:46 -04:00
Zachary Snow acfbdb07f8 completely rewrote preprocessor; more extensive directive support (include, timescale) 2019-03-18 05:00:23 -04:00
Zachary Snow b4b6ea348d support for "unbased_unsized_literal" 2019-03-08 16:37:20 -05:00
Zachary Snow e006e36ddc preliminary support for tasks 2019-03-07 13:58:20 -05:00
Zachary Snow 4d3669d356 added support for other procedural loops 2019-03-04 21:34:32 -05:00
Zachary Snow 460c0ee497 broader operator support; other parser cleanup 2019-03-04 18:25:14 -05:00
Zachary Snow b95af2b6d1 support for automatic functions 2019-03-04 14:25:38 -05:00
Zachary Snow 729a75cd11 support for interfaces; new "declaration parser" 2019-03-04 02:58:00 -05:00
Zachary Snow b2e0c4fa97 preliminary support for structs 2019-03-01 20:32:46 -05:00