Commit Graph

16 Commits

Author SHA1 Message Date
Lars-Peter Clausen 5f479cbad4 Store lexical positions in LineInfo
Several source and netlist objects inherit `LineInfo` while separately
storing the lexical position associated with the same source location. This
requires callers to copy the file, line, and lexical position independently.

Add the lexical position to `LineInfo`. Have `set_line()` initialize it when
it is unset, so new objects inherit the complete source location while later
diagnostic location updates preserve their established declaration order.
Initialize the field to `UINT_MAX` so zero remains available as a valid
scanner position and missing initialization is distinguishable. Have
`FILE_NAME()` preserve a more precise identifier position.

Remove constructor parameters that duplicate the position supplied through
`FILE_NAME()`. Use the shared field for identifiers, wires, events, event
triggers, nets, and elaborated events. Assign static class property nets
their declaration location since they previously relied on the standalone
`NetNet` position defaulting to zero.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2026-07-26 20:14:20 -07:00
Cary R 860761f9c6 More cppcheck fixes - part 2 2025-10-20 23:54:15 -07:00
Martin Whitaker bb80ee6905 Add lexical position information to PWire and PEvent objects. 2024-02-19 18:14:49 +00:00
Martin Whitaker b88d91c617 Create new base class for all named items that can be added to a scope.
Provide a helper function to identify the derived classes when reporting
errors.
2019-09-27 22:19:30 +01:00
Cary R d6b6b76015 Update header files to use a more standard name to prevent rereading
This is from github report #16. There are likely a few more issues
that need to be addressed though this takes care of the major ones.
2014-07-23 13:42:56 -07:00
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -07:00
Stephen Williams bcaf7355ca Remove most of the lingering CVS droppings.
Remove the #ident and $Log$ strings from all the header files and
almost all of the C/C++ source files. I think it is better to get
this done all at once, then to wait for each of the files to be
touched and edited in unrelated patches.
2008-12-05 21:48:28 -08:00
steve 536068bdfb Memory and Event names use perm_string. 2004-02-19 06:57:10 +00:00
steve 4c67de5ca7 Add the lex_strings string handler, and put
scope names and system task/function names
 into this table. Also, permallocate event
 names from the beginning.
2003-03-01 06:25:30 +00:00
steve e941e7e805 Spelling fixes. 2003-01-30 16:23:07 +00:00
steve 52bf4e613f conditional ident string using autoconfig. 2002-08-12 01:34:58 +00:00
steve ab6c8cb4b8 Parser and pform use hierarchical names as hname_t
objects instead of encoded strings.
2001-12-03 04:47:14 +00:00
steve 65020bc6de Use the iosfwd header if available. 2001-01-16 02:44:17 +00:00
steve 72b3508911 Catch event declarations during scope elaborate. 2000-04-09 17:44:30 +00:00
steve 30e8289239 Simulate named event trigger and waits. 2000-04-04 03:20:15 +00:00
steve 2dd010dc04 Named events as far as the pform. 2000-04-01 19:31:57 +00:00