Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

282 lines
7.8 KiB

  1. //
  2. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  3. //
  4. const ABSENT = 257;
  5. const ANY = 258;
  6. const APPLICATION = 259;
  7. const BAR = 260;
  8. const BGIN = 261;
  9. const BIT = 262;
  10. const BITSTRING = 263;
  11. const _BOOLEAN = 264;
  12. const BY = 265;
  13. const CCE = 266;
  14. const CHOICE = 267;
  15. const COMMA = 268;
  16. const COMPONENT = 269;
  17. const COMPONENTS = 270;
  18. const COMPONENTSOF = 271;
  19. const CONTROL = 272;
  20. const DECODER = 273;
  21. const DEFAULT = 274;
  22. const DEFINED = 275;
  23. const DEFINITIONS = 276;
  24. const DOT = 277;
  25. const DOTDOT = 278;
  26. const DOTDOTDOT = 279;
  27. const ENCODER = 280;
  28. const ENCRYPTED = 281;
  29. const END = 282;
  30. const ENUMERATED = 283;
  31. const EXPORTS = 284;
  32. const EXPLICIT = 285;
  33. const FALSE_VAL = 286;
  34. const FROM = 287;
  35. const ID = 288;
  36. const IDENTIFIER = 289;
  37. const IMPLICIT = 290;
  38. const IMPORTS = 291;
  39. const INCLUDES = 292;
  40. const INTEGER = 293;
  41. const LANGLE = 294;
  42. const LBRACE = 295;
  43. const LBRACKET = 296;
  44. const LITNUMBER = 297;
  45. const LIT_HEX_STRING = 298;
  46. const LIT_BINARY_STRING = 299;
  47. const LITSTRING = 300;
  48. const LPAREN = 301;
  49. const MIN = 302;
  50. const MAX = 303;
  51. const NAME = 304;
  52. const NIL = 305;
  53. const OBJECT = 306;
  54. const OCTET = 307;
  55. const OCTETSTRING = 308;
  56. const OF = 309;
  57. const PARAMETERTYPE = 310;
  58. const PREFIXES = 311;
  59. const PRESENT = 312;
  60. const PRINTER = 313;
  61. const PRIVATE = 314;
  62. const RBRACE = 315;
  63. const RBRACKET = 316;
  64. const REAL = 317;
  65. const RPAREN = 318;
  66. const SECTIONS = 319;
  67. const SEMICOLON = 320;
  68. const SEQUENCE = 321;
  69. const SEQUENCEOF = 322;
  70. const SET = 323;
  71. const _SIZE = 324;
  72. const STRING = 325;
  73. const TAGS = 326;
  74. const TRUE_VAL = 327;
  75. const UNIVERSAL = 328;
  76. const WITH = 329;
  77. const PLUSINFINITY = 330;
  78. const MINUSINFINITY = 331;
  79. const MODULEID = 332;
  80. const LASTUPDATE = 333;
  81. const ORGANIZATION = 334;
  82. const CONTACTINFO = 335;
  83. const DESCRIPTION = 336;
  84. const REVISION = 337;
  85. const OBJECTIDENT = 338;
  86. const STATUS = 339;
  87. const REFERENCE = 340;
  88. const OBJECTYPE = 341;
  89. const SYNTAX = 342;
  90. const BITSXX = 343;
  91. const UNITS = 344;
  92. const MAXACCESS = 345;
  93. const ACCESS = 346;
  94. const INDEX = 347;
  95. const IMPLIED = 348;
  96. const AUGMENTS = 349;
  97. const DEFVAL = 350;
  98. const NOTIFY = 351;
  99. const OBJECTS = 352;
  100. const TRAPTYPE = 353;
  101. const ENTERPRISE = 354;
  102. const VARIABLES = 355;
  103. const TEXTCONV = 356;
  104. const DISPLAYHINT = 357;
  105. const OBJECTGROUP = 358;
  106. const NOTIFYGROUP = 359;
  107. const NOTIFICATIONS = 360;
  108. const MODCOMP = 361;
  109. const MODULE = 362;
  110. const MANDATORY = 363;
  111. const GROUP = 364;
  112. const WSYNTAX = 365;
  113. const MINACCESS = 366;
  114. const AGENTCAP = 367;
  115. const PRELEASE = 368;
  116. const SUPPORTS = 369;
  117. const INCLUDING = 370;
  118. const VARIATION = 371;
  119. const CREATION = 372;
  120. typedef union {
  121. void *yy_void;
  122. SIMCNumberInfo *yy_number;
  123. int yy_int;
  124. long yy_long;
  125. SIMCModule *yy_module;
  126. CList <SIMCModule *, SIMCModule *> *yy_module_list;
  127. SIMCSymbolReference *yy_symbol_ref;
  128. SIMCNameInfo * yy_name;
  129. SIMCHexStringInfo *yy_hex_string;
  130. SIMCBinaryStringInfo *yy_binary_string;
  131. SIMCAccessInfo *yy_access;
  132. SIMCAccessInfoV2 *yy_accessV2;
  133. SIMCStatusInfo *yy_status;
  134. SIMCStatusInfoV2 *yy_statusV2;
  135. SIMCObjectIdentityStatusInfo *yy_object_identity_status;
  136. SIMCNotificationTypeStatusInfo *yy_notification_type_status;
  137. SIMCIndexInfo *yy_index;
  138. SIMCIndexInfoV2 *yy_indexV2;
  139. SIMCVariablesList *yy_variables_list;
  140. SIMCObjectsList *yy_objects_list;
  141. SIMCRangeOrSizeItem *yy_range_or_size_item;
  142. SIMCRangeList *yy_range_list;
  143. SIMCNamedNumberItem *yy_named_number_item;
  144. SIMCNamedNumberList *yy_named_number_list;
  145. SIMCDefValInfo *yy_def_val;
  146. } YYSTYPE;
  147. extern YYSTYPE yylval;
  148. // C++ YACC parser header
  149. // Copyright 1991 by Mortice Kern Systems Inc. All rights reserved.
  150. //
  151. // yy_parse => class defining a parsing object
  152. // yy_parse needs a class yy_scan, which defines the scanner.
  153. // %prefix or option -p xx determines name of this class; if not used,
  154. // defaults to 'yy_scan'
  155. //
  156. // constructor fills in the tables for this grammar; give it a size
  157. // to determine size of state and value stacks. Default is 150 entries.
  158. // destructor discards those state and value stacks
  159. //
  160. // int yy_parse::yyparse(yy_scan *) invokes parse; if this returns,
  161. // it can be recalled to continue parsing at last point.
  162. // void yy_parse::yyreset() can be called to reset the parse;
  163. // call yyreset() before yy_parse::yyparse(yy_scan *)
  164. #include <stdio.h> // uses printf(), et cetera
  165. #include <stdlib.h> // uses exit()
  166. const YYERRCODE = 256; // YACC 'error' value
  167. // You can use these macros in your action code
  168. #define YYERROR goto yyerrlabel
  169. #define YYACCEPT YYRETURN(0)
  170. #define YYABORT YYRETURN(1)
  171. #define YYRETURN(val) return(val)
  172. #if YYDEBUG
  173. typedef struct yyNamedType_tag { /* Tokens */
  174. char * name; /* printable name */
  175. short token; /* token # */
  176. short type; /* token type */
  177. } yyNamedType;
  178. typedef struct yyTypedRules_tag { /* Typed rule table */
  179. char * name; /* compressed rule string */
  180. short type; /* rule result type */
  181. } yyTypedRules;
  182. #endif
  183. #ifdef YACC_WINDOWS
  184. // include all windows prototypes, macros, constants, etc.
  185. #include <windows.h>
  186. // the following is the handle to the current
  187. // instance of a windows program. The user
  188. // program calling yyparse must supply this!
  189. extern HANDLE hInst;
  190. #endif /* YACC_WINDOWS */
  191. class yy_parse {
  192. protected:
  193. #ifdef YACC_WINDOWS
  194. // protected member function for actual scanning
  195. int win_yyparse(yy_scan * ps); // parse with given scanner
  196. #endif /* YACC_WINDOWS */
  197. int mustfree; // set if tables should be deleted
  198. int size; // size of state and value stacks
  199. int reset; // if set, reset state
  200. short yyi; // table index
  201. short yystate; // current state
  202. short * stateStack; // states stack
  203. YYSTYPE * valueStack; // values stack
  204. short * yyps; // top of state stack
  205. YYSTYPE * yypv; // top of value stack
  206. YYSTYPE yylval; // saved yylval
  207. YYSTYPE yyval; // $
  208. YYSTYPE * yypvt; // $n
  209. int yychar; // current token
  210. int yyerrflag; // error flag
  211. int yynerrs; // error count
  212. #if YYDEBUG
  213. int done; // set from trace to stop parse
  214. int rule, npop; // reduction rule # and length
  215. short * typeStack; // type stack to mirror valueStack[]
  216. short * yytp; // top of type stack
  217. char * yygetState(int); // read 'states.out'
  218. #endif
  219. public:
  220. #if YYDEBUG
  221. // C++ has trouble with initialized arrays inside classes
  222. static long * States; // pointer to yyStates[]
  223. static yyTypedRules * Rules; // pointer to yyRules[]
  224. static yyNamedType * TokenTypes; // pointer to yyTokenTypes[]
  225. static int yyntoken; // number of tokens
  226. static int yynvar; // number of variables (nonterminals)
  227. static int yynstate; // number of YACC-generated states
  228. static int yynrule; // number of rules in grammar
  229. char* yyptok(int); // printable token string
  230. int yyExpandName(int, int, char *, int);
  231. // expand encoded string
  232. virtual int yyGetType(int); // return type of token
  233. virtual void yyShowRead(); // see newly read token
  234. virtual void yyShowState(); // see state, value stacks
  235. virtual void yyShowReduce(); // see reduction
  236. virtual void yyShowGoto(); // see goto
  237. virtual void yyShowShift(); // see shift
  238. virtual void yyShowErrRecovery(); // see error recovery
  239. virtual void yyShowErrDiscard(); // see token discard in error
  240. #endif
  241. yy_scan* scan; // pointer to scanner
  242. int yydebug; // if set, tracing if compiled with YYDEBUG=1
  243. yy_parse(int = 150); // constructor for this grammar
  244. yy_parse(int, short *, YYSTYPE *); // another constructor
  245. ~yy_parse(); // destructor
  246. int yyparse(yy_scan * ps); // parse with given scanner
  247. void yyreset() { reset = 1; } // restore state for next yyparse()
  248. void setdebug(int y) { yydebug = y; }
  249. // The following are useful in user actions:
  250. void yyerrok() { yyerrflag = 0; } // clear error
  251. void yyclearin() { yychar = -1; } // clear input
  252. int YYRECOVERING() { return yyerrflag != 0; }
  253. };
  254. // end of .hpp header