From a1bc3936b85eab573361026ae323c1a02e0f0ccd Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 1 Jul 2007 16:45:07 +0000 Subject: Ok, now there's a dir of bfilts, build-filters, that's the best I can come up with right now for these until they're integrated and it won't matter anymore. --- build.conf | 4 +-- src/bfilt/c++/bfilt-c++.l | 62 +++++++++++++++++++++++++++++++++++++++++++++++ src/c++filt/bfilt-c++.l | 62 ----------------------------------------------- 3 files changed, 64 insertions(+), 64 deletions(-) create mode 100644 src/bfilt/c++/bfilt-c++.l delete mode 100644 src/c++filt/bfilt-c++.l diff --git a/build.conf b/build.conf index f6c9359..454e16e 100644 --- a/build.conf +++ b/build.conf @@ -13,10 +13,10 @@ set "CXXFLAGS" += "-ggdb" set "FLEXFLAGS" = "--bison-bridge --bison-locations", input filesIn("src") filter regexp(".*\\.(cpp|y|l)$") -"c++filt": +directoriesIn("src/bfilt", "bfilt-"): rule "exe", target file, - input filesIn("src/c++filt") filter regexp(".*\\.(cpp|y|l)$") + input filesIn("{fulldir}") filter regexp(".*\\.(cpp|y|l)$") rule "exe": matches regexp("(.*)\\.o$"), diff --git a/src/bfilt/c++/bfilt-c++.l b/src/bfilt/c++/bfilt-c++.l new file mode 100644 index 0000000..af12cac --- /dev/null +++ b/src/bfilt/c++/bfilt-c++.l @@ -0,0 +1,62 @@ +%{ +# include + +int nBC = 0; +%} + +%s hasT +%x inWith +%x inT +%option noyywrap nounput batch + +%% + +"operator<<" { ECHO; } +"operator>>" { ECHO; } +"operator". { ECHO; } + +"<<" { ECHO; } +">>" { ECHO; } +" <<" { ECHO; } +" >>" { ECHO; } + +"" { ECHO; } + +\n+ { + BEGIN( INITIAL ); + nBC = false; + ECHO; +} + +" <" { ECHO; } + +"<" { + BEGIN( inT ); + printf("<...>"); + nBC++; +} + +"<" { + nBC++; + +} +[^<>]* { } +">" { + nBC--; + if( nBC == 0 ) + BEGIN( hasT ); +} + +" [with"[^\]]*"]" { } + +%% + +int main() +{ + yyin = stdin; + + yylex(); + + return 0; +} + diff --git a/src/c++filt/bfilt-c++.l b/src/c++filt/bfilt-c++.l deleted file mode 100644 index af12cac..0000000 --- a/src/c++filt/bfilt-c++.l +++ /dev/null @@ -1,62 +0,0 @@ -%{ -# include - -int nBC = 0; -%} - -%s hasT -%x inWith -%x inT -%option noyywrap nounput batch - -%% - -"operator<<" { ECHO; } -"operator>>" { ECHO; } -"operator". { ECHO; } - -"<<" { ECHO; } -">>" { ECHO; } -" <<" { ECHO; } -" >>" { ECHO; } - -"" { ECHO; } - -\n+ { - BEGIN( INITIAL ); - nBC = false; - ECHO; -} - -" <" { ECHO; } - -"<" { - BEGIN( inT ); - printf("<...>"); - nBC++; -} - -"<" { - nBC++; - -} -[^<>]* { } -">" { - nBC--; - if( nBC == 0 ) - BEGIN( hasT ); -} - -" [with"[^\]]*"]" { } - -%% - -int main() -{ - yyin = stdin; - - yylex(); - - return 0; -} - -- cgit v1.2.3