Commit Graph

75 Commits

Author SHA1 Message Date
Zachary Snow bd1c07231f experimenting with monad helpers 2020-06-20 16:41:13 -04:00
Zachary Snow 12be569742 reduce usage of maybe 2020-06-14 15:56:09 -04:00
Zachary Snow 682620b23f struct conversion includes exprs in decls 2020-06-13 22:14:53 -04:00
Zachary Snow 82703834ac constant folding for shifts 2020-06-06 22:45:17 -04:00
Zachary Snow 95524c46ad remove excess patterns from struct conversion 2020-02-21 21:03:33 -05:00
Zachary Snow a415d9eb3d fix type propagation of struct fields bit accesses 2020-02-20 00:19:14 -05:00
Zachary Snow 470fa01eb2 updated casting conventions
- explicit enum casts in source are converted to size casts
- conversion for basic pattern array literals of unsized numbers
- unsized number array literals preserve signing
- more aggressive ternary simplification
2020-02-19 18:58:25 -05:00
Zachary Snow 976f582287 push struct and multi-packed ternaries into ranges
- the ternary expressions were previously used to decide the direction
  of generated part selects
- this fixes an issue where ternaries were generated for LHSs
2020-02-18 21:25:20 -05:00
Zachary Snow 8f2d7dd5c7 fixed multiple issues with struct and multi-packed conversions
- struct conversion handles directionality of fields
- struct conversion supports minus part selects
- fixed incorrect handling of directional part selects in multi-packed
  conversion
- multi-packed conversion defines standard ranges in terms of
  directional part selects for clarity
- fixed potential loop due to overeager untagging in multi-packed
  conversion
2020-02-17 13:57:48 -05:00
Zachary Snow 5f0ccee065 conversion for unsized integer arrays 2020-02-17 12:12:51 -05:00
Zachary Snow fe8839eaec fix struct typing of ternary expressions (resolves #73) 2020-02-15 14:44:49 -05:00
Zachary Snow 4cf65dd4e2 support for struct type parameters
- param type conversion properly supports deferred param type resolution
- fixed struct conversion incomplete Subroutine traversal
- struct conversion excludes param types from conversion
- parameters are defaulted to have integer type
2020-02-09 17:31:24 -05:00
Zachary Snow dd0eb5981d added source trace comments
- Trace comments cover module items, decls, and stmts
- Added pseudo-lexer to Alex parser for monadic Position production
- Added Position to every DeclToken
- Removed Comment PackageItem
- Added CommentStmt and CommentDecl
- Fixed traversal skipping outer MIAttr ModuleItems
- Generally cleaned up Parser modules
2020-01-30 22:17:17 -05:00
Zachary Snow 17e17ebd7f fix struct array pattern conversion (resolves #60) 2020-01-20 17:26:03 -08:00
Zachary Snow 6f0fa58ace simplify struct LHS handling 2020-01-14 00:23:16 -05:00
Zachary Snow 82217ec05c updated lifetime representation; struct packers use automatic 2019-12-22 12:01:05 -05:00
Zachary Snow fb5fd39388 support for inside expression ranges and wildcards 2019-12-08 17:36:25 -05:00
Zachary Snow 95299c6f56 conversion of structs with multi-dim fields (resolves #53) 2019-11-19 23:15:25 -05:00
Zachary Snow 3597f4a6be support for methods (no conversion) and interface TFs 2019-10-19 16:22:46 -04:00
Zachary Snow cf0e182e65 convert unpacked structs as though packed
- also expands struct literals containing repeat expressions
2019-10-14 22:01:55 -04:00
Zachary Snow a1cd6941ae apply patterns to substructures 2019-10-13 23:37:43 -04:00
Zachary Snow de581ecaf5 initial support for types in struct patterns 2019-10-13 19:01:42 -04:00
Zachary Snow 08c38e6193 support time literals as expressions 2019-10-06 21:21:58 -04:00
Zachary Snow 1a394cff9c support mintypmax expressions 2019-10-06 16:18:15 -04:00
Zachary Snow 0262a3d3c4 struct conversion visits non-asgn LHSs 2019-09-24 22:09:22 -04:00
Zachary Snow f4181aba76 added pass-through support for strings 2019-09-24 22:09:18 -04:00
Zachary Snow 5d80c83092 support for module attributes (resolves #39) 2019-09-15 23:17:14 -04:00
Zachary Snow f5d6683422 generalization of array dimension(s) system functions 2019-09-14 12:38:26 -04:00
Zachary Snow bd2efb4201 support struct patterns with partial defaults (resolves #35) 2019-09-11 19:32:24 +02:00
Zachary Snow 66989b0446 language support for parameter type bindings 2019-09-09 07:38:14 +02:00
Zachary Snow d11e898edb Added ParamType decl; combined parameter and localparam under Param 2019-09-09 07:34:43 +02:00
Zachary Snow 92feef8759 standardized, shorter hash generation 2019-09-03 23:54:47 -04:00
Zachary Snow 97fda59c51 convert needless patterns to concats 2019-09-02 22:35:36 -04:00
Zachary Snow 1f7c70dfe1 language support for LHS streaming operators 2019-09-02 20:46:35 -04:00
Zachary Snow 04de45b08b language support for streaming operators 2019-09-01 18:42:16 -04:00
Zachary Snow 086826714d nicer error message for missing struct fields 2019-08-26 20:20:38 -04:00
Zachary Snow 81f5fb500f added conversion for packed unions 2019-08-08 23:12:49 -04:00
Zachary Snow 4fd7b6c2f2 better support for struct array parameters
This includes support for
- parsing dimensioned alias parameters
- flattening non-var decls with multiple packed dimensions
- converting arrays of structs
- inferring struct types for decls with initializations
2019-08-06 23:11:09 -04:00
Zachary Snow 35ac09aa75 struct conversion handles complex expression nesting 2019-05-16 10:51:57 -04:00
Dave Eckhardt dadcd6ae24 Wording tweaks in comments. 2019-05-15 23:02:52 -04:00
Zachary Snow 3bef2b9cdb struct conversion handles alternate and mixed integer vector field types 2019-05-10 10:41:31 -04:00
Zachary Snow bc23aebc55 added language support for package-scoped calls and typenames 2019-04-24 03:37:47 -04:00
Zachary Snow 33dc4b3f88 conversions are applied per-file
- NestTF refactored to cover all package items
- fixed issue where type traverse skipped typedefs
2019-04-23 18:51:39 -04:00
Zachary Snow 4e34217472 struct conversion handles decls with unpacked dimensions 2019-04-23 15:48:25 -04:00
Zachary Snow 925f11cf31 expression traversal visits LHS range and bit expressions 2019-04-23 01:16:57 -04:00
Zachary Snow d41dcb2bc9 struct conversion supports struct literals as task/function args 2019-04-22 13:58:14 -04:00
Zachary Snow addc550028 minor code cleanup for struct conversion 2019-04-22 02:48:22 -04:00
Zachary Snow a8f2cbbe29 struct conversion supports complex shadowing 2019-04-22 02:33:24 -04:00
Zachary Snow 05b7bdb99c added conversion which moves top-level tasks and functions into modules 2019-04-22 01:18:25 -04:00
Zachary Snow acebba58c9 struct conversion omits unused packing functions 2019-04-21 22:22:33 -04:00