Skip to content

Add SymbolTable data structure #55

@ChrisTimperley

Description

@ChrisTimperley

Use to track variables, functions, types, modules, classes, etc.
Simplifies implementation of other analyses.

  • C: (name, kind, type, ...)
class SymbolTable(Mapping[str, Symbol]):
    def __getitem__(self, name: str) -> Symbol: ...
    def __contains__(self, name: str) -> bool: ...
    def insert(self, symbol: Symbol) -> None: ...

Subtasks:

In general, it's easy enough to construct the symbol table for C, Java, and Python using a lexical scope visitor. C++ introduces some additional challenges.

See: https://docs.python.org/3/library/symtable.html

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions