[antlr-interest] Hashmaps

Nick Vlassopoulos nvlassopoulos at gmail.com
Tue Aug 4 02:23:12 PDT 2009


Hi Bryan,

I am assuming that you are reffering to the Java HashMap.

A "Map" is a data structure associating two sets. Think of it as a math
function
(http://en.wikipedia.org/wiki/Map_(mathematics)) where you map an element
from a set A to a set B (such that
each x\in A has only one image for maps - MultiMap allows for multiple
images)

The "Hash" part refers to how the specific implementation of the Java Map
interface handles the
key - value associations (http://en.wikipedia.org/wiki/Hash_function)

Regarding the "how it relates to Antrl" part, well, most probably you are
referring to symbol tables
(http://en.wikipedia.org/wiki/Symbol_table), as I would guess that is one of
the most common uses.
Other than that, there's no antlr specific relation, you can use a map
whenever you need to associate
2 sets.

Hope these helped,

Nikos


On Tue, Aug 4, 2009 at 9:41 AM, Bryan S Follins <asalh at mindspring.com>wrote:

> Would someone mind giving me a quick definition of a hashmap as it relates
> to Antlr?
>
> Also, what is an example of a function of a hashmap?  Thanks.
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090804/2a884a64/attachment.html 


More information about the antlr-interest mailing list