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.
kscope/src/dotscan.lpp

37 lines
750 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 TQString(yytext); return NAME; }
{string} {
TQString str = &yytext[1];
yylval.pText = new TQString(str.left(yyleng - 2));
return STRING;
}
{number} { yylval.pText = new TQString(yytext); return NUMBER; }
{float} { yylval.pText = new TQString(yytext); return NUMBER; }
{space} ;
. return yytext[0];
%%