%{
#include <stdio.h>
#include "catalyst.tab.hpp"

void count();
%}

%%

 /* MultiCamera8 */;

(?i:look\ +at\ +absolute\ +point)                                    { count(); return(TOKLOOKATABSOLUTEPOINT); }
(?i:multicamera8)                                                    { count(); return(TOKMULTICAMERA8); }

 /* MultiCamera8 */;

 /* Representation */;

(?i:image\ +name\ +addon)                                            { count(); return(TOKIMAGENAMEADDON); }
(?i:show\ +orientation\ +axes)                                       { count(); return(TOKSHOWORIENTATIONAXES); }
(?i:show\ +z\ +axis\ +tic\ +mark\ +labels)                           { count(); return(TOKSHOWZAXISTICMARKLABELS); }
(?i:show\ +y\ +axis\ +tic\ +mark\ +labels)                           { count(); return(TOKSHOWYAXISTICMARKLABELS); }
(?i:show\ +x\ +axis\ +tic\ +mark\ +labels)                           { count(); return(TOKSHOWXAXISTICMARKLABELS); }
(?i:show\ +z\ +axis\ +minor\ +tic\ +marks)                           { count(); return(TOKSHOWZAXISMINORTICMARKS); }
(?i:show\ +y\ +axis\ +minor\ +tic\ +marks)                           { count(); return(TOKSHOWYAXISMINORTICMARKS); }
(?i:show\ +x\ +axis\ +minor\ +tic\ +marks)                           { count(); return(TOKSHOWXAXISMINORTICMARKS); }
(?i:show\ +z\ +axis\ +tic\ +marks)                                   { count(); return(TOKSHOWZAXISTICMARKS); }
(?i:show\ +y\ +axis\ +tic\ +marks)                                   { count(); return(TOKSHOWYAXISTICMARKS); }
(?i:show\ +x\ +axis\ +tic\ +marks)                                   { count(); return(TOKSHOWXAXISTICMARKS); }
(?i:z\ +axis\ +label\ +name)                                         { count(); return(TOKZAXISLABELNAME); }
(?i:y\ +axis\ +label\ +name)                                         { count(); return(TOKYAXISLABELNAME); }
(?i:x\ +axis\ +label\ +name)                                         { count(); return(TOKXAXISLABELNAME); }
(?i:show\ +z\ +axis\ +label)                                         { count(); return(TOKSHOWZAXISLABEL); }
(?i:show\ +y\ +axis\ +label)                                         { count(); return(TOKSHOWYAXISLABEL); }
(?i:show\ +x\ +axis\ +label)                                         { count(); return(TOKSHOWXAXISLABEL); }
(?i:show\ +axes)                                                     { count(); return(TOKSHOWAXES); }
(?i:time\ +annotation\ +position)                                    { count(); return(TOKTIMEANNOTATIONPOSITION); }
(?i:show\ +time\ +annotation)                                        { count(); return(TOKSHOWTIMEANNOTATION); }
(?i:invert\ +color\ +scale)                                          { count(); return(TOKINVERTCOLORSCALE); }
(?i:preset\ +color\ +scale)                                          { count(); return(TOKPRESETCOLORSCALE); }
(?i:color\ +legend\ +position)                                       { count(); return(TOKCOLORLEGENDPOSITION); }
(?i:color\ +legend\ +maximum\ +range)                                { count(); return(TOKCOLORLEGENDMAXIMUMRANGE); }
(?i:color\ +legend\ +minimum\ +range)                                { count(); return(TOKCOLORLEGENDMINIMUMRANGE); }
(?i:color\ +legend\ +use\ +cumulative\ +data\ +range)                { count(); return(TOKCOLORLEGENDUSECUMULATIVEDATARANGE); }
(?i:color\ +legend\ +use\ +current\ +data\ +range)                   { count(); return(TOKCOLORLEGENDUSECURRENTDATARANGE); }
(?i:color\ +legend\ +range)                                          { count(); return(TOKCOLORLEGENDRANGE); }
(?i:show\ +color\ +legend)                                           { count(); return(TOKSHOWCOLORLEGEND); }
(?i:color\ +by\ +blockid)                                            { count(); return(TOKCOLORBYBLOCKID); }
(?i:color\ +by\ +solid\ +color)                                      { count(); return(TOKCOLORBYSOLIDCOLOR); }
(?i:color\ +by\ +tensor\ +component)                                 { count(); return(TOKCOLORBYTENSORCOMPONENT); }
(?i:color\ +by\ +vector\ +component)                                 { count(); return(TOKCOLORBYVECTORCOMPONENT); }
(?i:color\ +by\ +vector\ +magnitude)                                 { count(); return(TOKCOLORBYVECTORMAGNITUDE); }
(?i:color\ +by\ +scalar)                                             { count(); return(TOKCOLORBYSCALAR); }
(?i:show\ +bounding\ +box)                                           { count(); return(TOKSHOWBOUNDINGBOX); }
(?i:show\ +edges)                                                    { count(); return(TOKSHOWEDGES); }
(?i:show\ +surfaces)                                                 { count(); return(TOKSHOWSURFACES); }
(?i:top)                                                             { yylval.string=strdup(yytext); count(); return(TOKTOP); }
(?i:left)                                                            { yylval.string=strdup(yytext); count(); return(TOKLEFT); }
(?i:bottom)                                                          { yylval.string=strdup(yytext); count(); return(TOKBOTTOM); }
(?i:right)                                                           { yylval.string=strdup(yytext); count(); return(TOKRIGHT); }
(?i:top\ +left)                                                      { yylval.string=strdup(yytext); count(); return(TOKTOPLEFT); }
(?i:top\ +right)                                                     { yylval.string=strdup(yytext); count(); return(TOKTOPRIGHT); }
(?i:bottom\ +left)                                                   { yylval.string=strdup(yytext); count(); return(TOKBOTTOMLEFT); }
(?i:bottom\ +right)                                                  { yylval.string=strdup(yytext); count(); return(TOKBOTTOMRIGHT); }
(?i:representation)                                                  { count(); return(TOKREPRESENTATION); }

 /* Representation */;

 /* Catalyst */;

(?i:catalyst)                                                        { count(); return(TOKCATALYST); }
(?i:begin)                                                           { count(); return(TOKBEGIN); }
(?i:end)                                                             { count(); return(TOKEND); }

 /* Catalyst */;

"="                                                                  { count(); return(TOKEQUAL); }
(?i:false)                                                           { yylval.integer=0; count(); return(TOKFALSE); }
(?i:true)                                                            { yylval.integer=1; count(); return(TOKTRUE); }
[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?                               { yylval.floating=atof(yytext); count(); return(TOKVALUE); }
[a-zA-Z][a-zA-Z0-9_]*                                                { yylval.string=strdup(yytext); count(); return(TOKIDENTIFIER); }
["].*["]                                                             { yylval.string=strdup(yytext); count(); return(TOKSTRING); }
["#"|"$"].*                                                          { count(); }
[ \t\v\f\n]+                                                         { count(); }
%%

int column 