I'm working on creating a compiler and have come across some text that suggests two different ways of implementing symbol tables. With one, there is a symbol table for each level of nesting which is stored on a stack. With the second option there are only two symbol tables, one symbol table is constructed for maintaining all entries, and the other is used to keep track of changes to the primary table in order to know which entries to remove once you've made it past that particular block. What are the strengths and weaknesses of these different implementations? I'm sure that the first option will be faster as far as removing the symbol table for an individual block, however this comes at some overhead (of which I am unclear). The second is clearly resource intensive as far as when a large block with many declarations is to be removed, but it allows for constant time when accessing the variables.
Using Stacks for Symbol Tables or not
812 Views Asked by davelupt At
0
There are 0 best solutions below
Related Questions in COMPILER-CONSTRUCTION
- Reference: Crafting Interpreters. Print statement is not able to evaluate expression. Help me fix this (details below)
- Load function written in amd64 assembly into memory and call it
- I have implemented till Statements and State in Tree Walk Interpreter. I am pissed with an error
- Resolve shift/reduction conflict in grammar for expressions in PLY for calls to embedded functions
- Grammar for access to properties and calls to embedded functions
- LLVM code generation causes problems with pointer arithmetic
- what does react compiler mean actually?
- Errors on Recursive Descent Parsing Java
- Java CUP produces Shift-Reduce conflict when parsing a grammar for a C++ type language
- Three-Address-Code (TAC) and Conjunction/Disjunction
- How do I write an implicit cast for my strongly typed interpreter? (C++)
- Yacc parser not reducing specific production rules as intended
- Why is the function version tag consistently "Base" in HDF5 library?
- Sly parser, how are recursively defined types implemented?
- Does a non terminal token need an explicit definition?
Related Questions in STACK
- What is causing my towers of hanoi logic to infinitely loop?
- Asking code suggestions about data structure and algorithm
- Why is 'EDITBIN /STACK:2097152 w3wp.exe' cmd is giving me an LNK1342 error?
- issues with circular queues
- Missing PAGE_GUARD flag on the memory of stack for one windows application
- Purpose of stack register(s) in holding 0x7c00
- Split Dataframe and stack horizontally
- segmentation fault (core dumped) in C programming
- How to find Find max right using stack?
- Does an Stackoverflow occur in the JVM if the Activation Record is too small but there is still space left in the general stack?
- How to create 100 maps with bootstrapping using stacked ensemble fit with tidymodels
- How does the class Exchanger in Java actually work?
- How can I improve the iterative approach to be faster than recursive implementation, as usual?
- Need to make Stack cards on nav click as well ass page scroll with help of jquery
- Puncover: Stack column is empty after analysis
Related Questions in SYMBOL-TABLES
- GCC symbol table for local variables on stack
- Is it possible to determine if a symbol is a variable or function in C?
- Using Stacks for Symbol Tables or not
- Accessing ELF symbol table in C
- Reference from type table to symbol table
- Can a running C program access its own symbol table?
- What is the internal identification of a Java method?
- Symbol Table Design and Implementation in Ruby
- Determine load address and entry point of stripped Linux Kernel image
- How best to override/wrap core functions like sysread when they are called in another package
- SymtabAPI doesn't implicity change binary
- Is it true that binaries generated by visual studio don't have any symbols?
- Debugging c++ core files for released software
- Perl: How to iterate through symbol table to find all loaded subclasses of Foo::Bar?
- How to build symbol tables for different lexical levels?
Related Questions in SYMBOL-TABLE
- Why symbol table contains no variable name?
- how symboltable track functions defined later?
- What is causing the unexpected interaction between the string `eval`, code attributes, and the symbol table?
- How to specify symbol name when creating objects from raw binary files using objcopy?
- How can I avoid making this static reference to a non-static field?
- Problem is there in symbol table when building gdb binary for version 13.1 and 13.2
- Symbol table entry when using auto return type deduction with templates in C++
- Symbol Table Code in C: "segmentation fault (core dumped)" error with Insert function
- How do I get a function name in the symbol table to point to a different function?
- Why Add Only Present-Symbols to A Shadowing-List?
- How do I count the frequency of an item in a given range?
- PHP Symbol Table
- Where is swift compiler's symbol table?
- In symbol table how to mark variable out of scope?
- Building a basic symbol table in C
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?