Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add SymbolTable data structure #55

Open
1 task
ChrisTimperley opened this issue Aug 25, 2020 · 0 comments
Open
1 task

Add SymbolTable data structure #55

ChrisTimperley opened this issue Aug 25, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ChrisTimperley
Copy link
Collaborator

ChrisTimperley commented Aug 25, 2020

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

@ChrisTimperley ChrisTimperley added the enhancement New feature or request label Aug 25, 2020
@ChrisTimperley ChrisTimperley self-assigned this Aug 25, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant