diff options
author | dholland <dholland@pkgsrc.org> | 2011-10-13 22:11:26 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2011-10-13 22:11:26 +0000 |
commit | 8d8599d24df4fcb7eeba4b4331690b5afdba537c (patch) | |
tree | c0d4ecdf583b81917fc6e66377368bcc21908879 | |
parent | abf757a85d13c5ec9a8e843c3d115de6119d0e99 (diff) | |
download | pkgsrc-8d8599d24df4fcb7eeba4b4331690b5afdba537c.tar.gz |
Patch the lexer to ignore _Pragma().
-rw-r--r-- | devel/cxref/distinfo | 3 | ||||
-rw-r--r-- | devel/cxref/patches/patch-src_parse_l | 36 |
2 files changed, 38 insertions, 1 deletions
diff --git a/devel/cxref/distinfo b/devel/cxref/distinfo index f7a9cc71c79..390367001d2 100644 --- a/devel/cxref/distinfo +++ b/devel/cxref/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.8 2011/10/13 21:30:00 dholland Exp $ +$NetBSD: distinfo,v 1.9 2011/10/13 22:11:26 dholland Exp $ SHA1 (cxref-1.6d.tgz) = b984d85da7b7fa39794932e6fe85a0657f6240bb RMD160 (cxref-1.6d.tgz) = 3760f2f074ec26b6702efbd38f24f0bb231488e0 Size (cxref-1.6d.tgz) = 415744 bytes SHA1 (patch-aa) = 0696dc7e2c027ebbbfb6747ff36ec9f9a36b7a88 +SHA1 (patch-src_parse_l) = 38638d7ac187ddebec2fb446f38adaace3ef3712 diff --git a/devel/cxref/patches/patch-src_parse_l b/devel/cxref/patches/patch-src_parse_l new file mode 100644 index 00000000000..7079201fd9e --- /dev/null +++ b/devel/cxref/patches/patch-src_parse_l @@ -0,0 +1,36 @@ +$NetBSD: patch-src_parse_l,v 1.1 2011/10/13 22:11:26 dholland Exp $ + +Recognize and ignore _Pragma(), needed for -current's headers. + +--- src/parse.l~ 2011-06-18 09:45:04.000000000 +0000 ++++ src/parse.l +@@ -14,6 +14,7 @@ IS ((u|U|l|L)+|([iI + %x CPP_INCLUDE CPP_INC_FILE CPP_INC_FLAGS + %x CPP_DEFINE CPP_DEFINE_ARGP CPP_DEFINE_BODY CPP_DEFINE_ARGS + %x GNU_LABEL GNU_VA_ARG GNU_ATTRIBUTE GNU_TYPEOF GNU_OFFSETOF ++%x C99_PRAGMA + + %{ + /*************************************** +@@ -83,6 +84,9 @@ static int gnu_typ_depth=0; + /*+ To get around the GCC __offsetof keyword, skip over matched () counted by this. +*/ + static int gnu_offset_depth=0; + ++/*+ To get around the C99 _Pragma keyword, skip over matched () counted by this. +*/ ++static int c99_prag_depth=0; ++ + /*+ If we see a comment immediately after a ',', ';', '};', '},' or ')' then push it before. +*/ + static int push_past=0; + +@@ -311,6 +315,11 @@ static int push_past=0; + "_Complex" { } + "_Bool" { yylval="_Bool"; return(BOOL); } + ++("_Pragma") { c99_prag_depth=0; BEGIN(C99_PRAGMA); } ++<C99_PRAGMA>"(" { c99_prag_depth++; } ++<C99_PRAGMA>[^()]+ { } ++<C99_PRAGMA>")" { if(--c99_prag_depth==0) { BEGIN(INITIAL); } } ++ + /* C language keywords. */ + + "auto" { yylval="auto" ; return(AUTO); } |