From 0204769eafc1c9a4b24f9ef3974bb55fb4fd2a97 Mon Sep 17 00:00:00 2001 From: James Cloos Date: Fri, 18 Jul 2014 17:38:10 -0400 Subject: [PATCH] states/hl/cpp.st: Update C++ keyword list. Based on keyword list at http://en.cppreference.com/w/cpp/keyword. (As per: http://en.cppreference.com/w/Cppreference:FAQ#What_can_I_do_with_the_material_on_this_site.3F that page is licensed under the GFDL, unversioned, with no invariant sections, front-cover texts, or back-cover texts.) Savannah bug #40740. Signed-off-by: James Cloos --- ChangeLog | 4 ++++ states/hl/cpp.st | 28 ++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index b48c3c5..98c257d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-07-18 James Cloos + + * states/hl/cpp.st: Update C++ keyword list. Savannah bug #40740. + 2014-07-18 James Cloos * src/util.c: (read_config): Close the FILE *. Savannah bug #40338. diff --git a/states/hl/cpp.st b/states/hl/cpp.st index 1b4bd0b..adbab82 100644 --- a/states/hl/cpp.st +++ b/states/hl/cpp.st @@ -6,15 +6,27 @@ cpp_type_re = /* Types. - (build-re '(auto bool char class complex const double enum extern - float friend inline int long private protected public register - short signed static struct template typedef union unsigned virtual - void volatile)) + (build-re '(alignas alignof and and_eq asm auto bitand bitor bool + break case catch char char16_t char32_t class compl const constexpr + const_cast continue decltype default delete do double dynamic_cast + else enum explicit export extern false float for friend goto if + inline int long mutable namespace new noexcept not not_eq nullptr + operator or or_eq private protected public register + reinterpret_cast return short signed sizeof static static_assert + static_cast struct switch template this thread_local throw true try + typedef typeid typename union unsigned using virtual void volatile + wchar_t while xor xor_eq)) */ - /\b(auto|bool|c(har|lass|o(mplex|nst))|double|e(num|xtern)|f(loat|riend)\ -|in(line|t)|long|p(r(ivate|otected)|ublic)|register\ -|s(hort|igned|t(atic|ruct))|t(emplate|ypedef)|un(ion|signed)\ -|v(irtual|o(id|latile)))\b/; + /\\b(a(lign(as|of)|nd(|_eq)|sm|uto)|b(it(and|or)|ool|reak)\\ +|c(a(se|tch)|har(|16_t|32_t)|lass|o(mpl|n(st(|_cast|expr)|tinue)))\\ +|d(e(cltype|fault|lete)|o(|uble)|ynamic_cast)\\ +|e(lse|num|x(p(licit|ort)|tern))|f(alse|loat|or|riend)|goto\\ +|i(f|n(line|t))|long|mutable|n(amespace|ew|o(except|t(|_eq))|ullptr)\\ +|o(perator|r(|_eq))|p(r(ivate|otected)|ublic)\\ +|re(gister|interpret_cast|turn)\\ +|s(hort|i(gned|zeof)|t(atic(|_(assert|cast))|ruct)|witch)\\ +|t(emplate|h(is|r(ead_local|ow))|r(ue|y)|ype(def|id|name))\\ +|u(n(ion|signed)|sing)|v(irtual|o(id|latile))|w(char_t|hile)|xor(|_eq))\b/; /* * We inherit the C++ state from the C state. This gives us all the -- 2.17.1