You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
745 B
37 lines
745 B
/* dot.l */
|
|
|
|
%{
|
|
#include <ntqstring.h>
|
|
#include "dotparse.hpp"
|
|
%}
|
|
|
|
%option noyywrap
|
|
|
|
name [a-zA-Z_][a-zA-Z0-9_]*
|
|
string \"(\\.|[^\"])*\"
|
|
space [ \t\n]+
|
|
number [1-9][0-9]*
|
|
float [0-9]*\.[0-9]+
|
|
|
|
%%
|
|
|
|
"graph" return GRAPH;
|
|
"digraph" return DIGRAPH;
|
|
"calltree" return CALL_TREE;
|
|
"callingtree" return CALLING_TREE;
|
|
"node" return NODE;
|
|
"->" return DIR_EDGE;
|
|
"--" return UNDIR_EDGE;
|
|
{name} { yylval.pText = new QString(yytext); return NAME; }
|
|
{string} {
|
|
QString str = &yytext[1];
|
|
yylval.pText = new QString(str.left(yyleng - 2));
|
|
return STRING;
|
|
}
|
|
{number} { yylval.pText = new QString(yytext); return NUMBER; }
|
|
{float} { yylval.pText = new QString(yytext); return NUMBER; }
|
|
{space} ;
|
|
. return yytext[0];
|
|
|
|
%%
|