source: to-imperative/trunk/java/refal/refal/plus/cpp_specific.rf @ 3989

Last change on this file since 3989 was 3753, checked in by yura, 13 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1// $Id: cpp_specific.rf 3753 2008-04-20 12:14:31Z orlov $
2
3$use Class Compare Convert;
4
5$const Reserved_Words =
6
7// ------------           Keywords            ------------
8
9  "asm"         "do"            "inline"            "short"        "typeid"
10  "auto"        "double"        "int"               "signed"       "typename"
11  "bool"        "dynamic_cast"  "long"              "sizeof"       "union"
12  "break"       "else"          "mutable"           "static"       "unsigned"
13  "case"        "enum"          "namespace"         "static_cast"  "using"
14  "catch"       "explicit"      "new"               "struct"       "virtual"
15  "char"        "extern"        "operator"          "switch"       "void"
16  "class"       "false"         "private"           "template"     "volatile"
17  "const"       "float"         "protected"         "this"         "wchar_t"
18  "const_cast"  "for"           "public"            "throw"        "while"
19  "continue"    "friend"        "register"          "true"
20  "default"     "goto"          "reinterpret_cast"  "try"
21  "delete"      "if"            "return"            "typedef"
22
23
24// ------------  Alternative representations  ------------
25
26  "and"      "and_eq"   "bitand"   "bitor"   "compl"    "not"
27  "not_eq"   "or"       "or_eq"    "xor"     "xor_eq";
28
29
30IsReservedWord e.word = \{
31  <ToChars e.word> : '_' s.char e, \{
32    s.char : '_';
33    <IsLetter s.char>, # \{ '?!' : e s.char e; }, <Lt (s.char) ('a')>;
34  };
35  <ToWord e.word> :: s.word, &Reserved_Words : e s.word e;
36};
Note: See TracBrowser for help on using the repository browser.