CQL::Token - class for token objects returned by CQL::Lexer
my $token = $lexer->nextToken(); if ( $token->type() == CQL_WORD ) { print "the token is a word with value=", $token->string(), "\n"; }
Ordinarily you won't really care about the tokens returned by the CQL::Lexer since the lexer is used behind the scenes by CQL::Parser.
my $token = CQL::Token->new( '=' );
Returns the token type which will be availble as one of the constants that CQL::Token exports. See internals for a list of available constants.
Retruns the string equivalent of the token. Particularly useful when you only know it's a CQL_WORD.
To install CQL::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CQL::Parser
CPAN shell
perl -MCPAN -e shell install CQL::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.