Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Symbol Table Help

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ive been Scanning the Internet, And I have come across a Data structure on Java called a Symbol Table, I was wondering if anyone could help me in Creating a Simple Symbol Table.

Which Contains:
- String and Integer Values (Key, Value)
- And has up to 10 Fields
- No Predefined Java Libraries if Possible


Thanks.
 
Marshal
Posts: 74067
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

It sounds like a kind of Map to me. Would you know how to write your own Map? You can read about Maps in the Java® Tutorials. A Map does not usually have a predefined size, but enlarges as it is filled.
 
ted luton
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Welcome to the Ranch

It sounds like a kind of Map to me. Would you know how to write your own Map? You can read about Maps in the Java® Tutorials. A Map does not usually have a predefined size, but enlarges as it is filled.



Thanks for Your Help

 
ted luton
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Welcome to the Ranch

It sounds like a kind of Map to me. Would you know how to write your own Map? You can read about Maps in the Java® Tutorials. A Map does not usually have a predefined size, but enlarges as it is filled.



In regards to a Symbol Table, How is that defined in Java?
 
Marshal
Posts: 16597
278
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you cite where you found this reference to a symbol table? This term is usually associated with compilers; it's basically a lookup table of all the different symbols encountered as the program source is parsed. For example, class names, variable names, method names, etc. are all symbols that will be added to a symbol table as your program is compiled. This is why you may get an error message that says "Can't resolve symbol x" when your code references a name that is not defined in the current scope.
 
ted luton
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote:Can you cite where you found this reference to a symbol table? This term is usually associated with compilers; it's basically a lookup table of all the different symbols encountered as the program source is parsed. For example, class names, variable names, method names, etc. are all symbols that will be added to a symbol table as your program is compiled. This is why you may get an error message that says "Can't resolve symbol x" when your code references a name that is not defined in the current scope.



Sorry I cannot Ive lost the source

Do you have any resources in regards to formatting a symbol table in Java?
 
Junilu Lacar
Marshal
Posts: 16597
278
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, unless you can come up with a precise definition of what you mean by a "symbol table" there is not much anyone can tell you with any degree of certainty. Sorry, but you have to TellTheDetails.
 
ted luton
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote:Well, unless you can come up with a precise definition of what you mean by a "symbol table" there is not much anyone can tell you with any degree of certainty. Sorry, but you have to TellTheDetails.



What would a example look like in the compiler definition?
 
Junilu Lacar
Marshal
Posts: 16597
278
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sure a quick search on Google would turn something up.
 
Proudly marching to the beat of a different kettle of fish... while reading this tiny ad
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic