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
- Is the compiler Xcode uses to produce Assembly code a bad compiler?
- How do compilers store hundreds of variables in only a few registers?
- Where to patch back the information gathered during program analysis
- Assignment Insertion in ROSE compiler after AssignOp
- memory layout of a multiple-inherited object in C++
- How to use my written compiler to read files on web?
- a LEX program to identify keywords and convert it into uppercase
- Identifier terminal except certain keywords
- Calling Scala compiler's AST from Java
- Computing the FOLLOW() set of a grammar
- JavaCC and Unicode issue. Why \u696d cannot be managed in JavaCC although it belong to the range "\u4e00"-"\u9fff"
- Three-address code and symbol tables
- Delegate caching behavior changes in Roslyn
- Get delimiter in Irony
- Compiler Errors including initializer before '<' token
Related Questions in STACK
- SQL FIFO STACK using two tables
- C++ assign const reference to instance variable (memory issues?)
- Efficient retrieval of last and second to last element of ArrayStack in Scala?
- How to implement Exception for function isFull() on Stack
- Merging two sorted stacks
- MASM console window creation troubles (maybe my stack frame??)
- Why does the Java.Util.Stack not pop last element in the loop?
- popStack pops out data that I didn't push (stack adt)
- kill function from ISR on cortex-m0
- Why in C++ overwritingis is slower than writing?
- why does a integer type need to be little-endian?
- fread(), solaris to unix portability and use of uninitialised values
- How can I have different color for each bar of stack barplots? in R
- Stack with push and pop functions not working
- c++ memory allocated at compile time
Related Questions in SYMBOL-TABLES
- Perl: How to iterate through symbol table to find all loaded subclasses of Foo::Bar?
- Determine load address and entry point of stripped Linux Kernel image
- Symbol Table Design and Implementation in Ruby
- No symbol table in Go?
- How to create a symbol table?
- What are the steps I need to do to complete this programming assignment?
- Accessing active symbol table in Common Lisp
- Debugging c++ core files for released software
- What is symbol table and how is it integrated into the executable?
- Is a symbol table in Ruby any different from a symbol table in other languages
- Accessing ELF symbol table in C
- Reference from type table to symbol table
- Why does this Perl produce "Not a CODE reference?"
- How to build symbol tables for different lexical levels?
- How does a symbol table relate to static chains and scoping?
Related Questions in SYMBOL-TABLE
- How can I differentiate static functions with nm or readelf output in C
- Three-address code and symbol tables
- Ordered array implementation of Symbol Table
- Resolving symbols differently in different dynamically loaded objects
- Generate Symbol Table From File in C++
- Matlab variable count limit
- Dynamic loading and weak symbol resolution
- When is the locals dictionary set?
- Makefile for sql parser... writing dependencies
- How to rename perl __ANON__ sub without disabling strict 'refs'?
- Does WAM Prolog have a Symbol Table?
- Symbol Table Design and Implementation in Ruby
- Symbol Table in Python
- How is symbol table managed in a compiler
- How to get user defined function range (begin and end address) in elf file?
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 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?