org.quasiliteral.antlr
Class AstroToken

Untamed: A Kind of Antlr Token that preserves all the information in a
Functor.

In keeping with the nature of an Antlr Token, and in order to be usable
from within Antlr itself, AstroToken is mutable, but just mutable enough
to accomodate Antlr. Specifically, the various values are settable once.

build

build

Enabled: Since not all Tokens are AstroTokens, this static method
provides the equivalent of the build/1 instance method for Tokens in
general.

In the understanding of non-Astro Tokens used here, their functor is
only according to the AST's type code, for the tag, and the AST's text,
for the data. This choice for data will often be a mistake, but there's
no generic way to make a better decision. For grammars where this is
wrong, you should build a grammar-specific converter.

XXX This should probably be made into a sugar-instance-method of Token.