summaryrefslogtreecommitdiffstats
path: root/src/dotscan.lpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-10-07 23:28:24 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-10-08 05:14:51 +0200
commit3af5832abe7c802a384cd58d34f7cc4433595ced (patch)
treecc300d6fae4cb5798f0cf5db3ece63026f34379a /src/dotscan.lpp
downloadkscope-3af5832abe7c802a384cd58d34f7cc4433595ced.tar.gz
kscope-3af5832abe7c802a384cd58d34f7cc4433595ced.zip
Initial import of kscope 1.6.2
Diffstat (limited to 'src/dotscan.lpp')
-rw-r--r--src/dotscan.lpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/dotscan.lpp b/src/dotscan.lpp
new file mode 100644
index 0000000..0667d33
--- /dev/null
+++ b/src/dotscan.lpp
@@ -0,0 +1,36 @@
+/* dot.l */
+
+%{
+#include <qstring.h>
+#include "dotparse.h"
+%}
+
+%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];
+
+%%