%option c++ 8bit noyywrap nostack yymore nodefault %option outfile="OSC_Scanner.C" prefix="zy" addressPattern ^({letter}|{digit}|{punct})* string \"({letter}|{digit}|{punct}|{white})*\" neg_float "-"({digit}+"."{digit}*) pos_float ({digit}+"."{digit}*) hex_int ({hexDigit})+ neg_int "-"({digit})+ pos_int ({digit})+ white [ \t] punct [./\_]|"-" letter [A-Za-z] hexDigit [a-f0-9] digit [0-9] %% {pos_int} return 1; {neg_int} return 2; {hex_int} return 3; {pos_float} return 4; {neg_float} return 5; {string} return 6; {addressPattern} return 7; "["|"]" return 8; \n return 9; {white} return 10; . return 11; <> return 12; %% #include "lexer.h"