AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YChart | YDAT | YWAIT | Byzgraf | FAQs
tokenImage (int token [, int parser]) yoix.parser
 
Returns the string that the Yoix interpreter associates with token or NULL if token is not recognized for the specified parser, which must be one of PARSER_YOIX (the default), PARSER_XML, or PARSER_DTD, which are constants defined in yoix.parser. The tokens associated with the available parsers are defined in the yoix.parser.YoixConstants and yoix.parser.XMLConstants dictionaries. Note that the XML and DTD parsers are really just two flavors of the same XML parser.
 
 Example:   The program,
import yoix.parser.*;
import yoix.stdio.*;

String image;
int    token;
int    n;

for (n = 0; n < YoixConstants@length; n++) {
    token = YoixConstants[n];
    if ((image = tokenImage(token)) != NULL)
        printf("%3d   %s\n", token, image);
}
prints the number and name on standard output of every valid token found in the yoix.parser.YoixConstants dictionary.
 
 Return:   String
 
 See Also:   ParseTree, tokenAssociativity, tokenPrecedence, tokenValue

 

Yoix is a registered trademark of AT&T Inc.