Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
e0a30392
Commit
e0a30392
authored
Mar 26, 2017
by
Lev Walkin
Committed by
GitHub
Mar 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #118 from gareins/master
Refreshing reserved keywords
parents
860de0bc
11a3d68b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
libasn1compiler/asn1c_misc.c
libasn1compiler/asn1c_misc.c
+20
-16
No files found.
libasn1compiler/asn1c_misc.c
View file @
e0a30392
...
...
@@ -5,24 +5,28 @@
#include <asn1fix_export.h>
/* other exportable stuff from libasn1fix */
/*
* Checks that the given string is not a reserved C/C++ keyword.
* ISO/IEC 9899:1999 (C99), A.1.2
* Checks that the given string is not a reserved C/C++ keyword [1],[2].
* _* keywords not included, since asn1 identifiers cannot begin with hyphen [3]
* [1] ISO/IEC 9899:2011 (C11), 6.4.1
* [2] ISO/IEC 14882:2014 (C++14), 2.12
* [3] ISO/IEC 8824-1:2003 (asn1) 11.3
*/
static
char
*
res_kwd
[]
=
{
"auto"
,
"break"
,
"case"
,
"char"
,
"const"
,
"continue"
,
"default"
,
"do"
,
"double"
,
"else"
,
"enum"
,
"extern"
,
"float"
,
"for"
,
"goto"
,
"if"
,
"inline"
,
"int"
,
"long"
,
"register"
,
"restrict"
,
"return"
,
"short"
,
"signed"
,
"sizeof"
,
"static"
,
"struct"
,
"switch"
,
"typedef"
,
"union"
,
"unsigned"
,
"void"
,
"volatile"
,
"while"
,
"_Bool"
,
"_Complex"
,
"_Imaginary"
,
/* C++ */
"class"
,
"explicit"
,
"bool"
,
"mutable"
,
"template"
,
"typeid"
,
"typename"
,
"and"
,
"and_eq"
,
"or"
,
"or_eq"
,
"xor"
,
"xor_eq"
,
"not"
,
"not_eq"
,
"bitor"
,
"compl"
,
"bitand"
,
"const_cast"
,
"dynamic_cast"
,
"reinterpret_cast"
,
"static_cast"
,
"true"
,
"false"
,
"namespace"
,
"using"
,
"throw"
,
"try"
,
"catch"
/* C */
"auto"
,
"break"
,
"case"
,
"char"
,
"const"
,
"continue"
,
"default"
,
"do"
,
"double"
,
"else"
,
"enum"
,
"extern"
,
"float"
,
"for"
,
"goto"
,
"if"
,
"inline"
,
"int"
,
"long"
,
"register"
,
"restrict"
,
"return"
,
"short"
,
"signed"
,
"sizeof"
,
"static"
,
"struct"
,
"switch"
,
"typedef"
,
"union"
,
"unsigned"
,
"void"
,
"volatile"
,
"while"
,
/* C++ */
"alignas"
,
"alignof"
,
"and"
,
"and_eq"
,
"asm"
,
"bitand"
,
"bitor"
,
"bool"
,
"catch"
,
"char16_t"
,
"char32_t"
,
"class"
,
"compl"
,
"const_cast"
,
"constexpr"
,
"decltype"
,
"delete"
,
"delete"
,
"dynamic_cast"
,
"explicit"
,
"export"
,
"false"
,
"friend"
,
"mutable"
,
"namespace"
,
"new"
,
"noexcept"
,
"not"
,
"not_eq"
,
"nullptr"
,
"operator"
,
"or"
,
"or_eq"
,
"private"
,
"protected"
,
"public"
,
"reinterpret_cast"
,
"static_assert"
,
"static_cast"
,
"template"
,
"this"
,
"thread_local"
,
"throw"
,
"true"
,
"try"
,
"typeid"
,
"typename"
,
"using"
,
"virtual"
,
"wchar_t"
,
"xor"
,
"xor_eq"
};
static
int
reserved_keyword
(
const
char
*
str
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment