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.

86 lines
3.1 KiB

  1. /* Copyright (C) Boris Nikolaus, Germany, 1996-1997. All rights reserved. */
  2. typedef char *string;
  3. typedef char **strings;
  4. typedef int integer;
  5. typedef char *ccode;
  6. typedef struct bounds_s bounds;
  7. typedef struct rhs_s *rhs;
  8. typedef struct token_s token;
  9. typedef struct nterm_s nterm;
  10. typedef struct lhs_s lhs;
  11. typedef struct LLPOS {
  12. int line;
  13. int column;
  14. char *file;
  15. } LLPOS;
  16. typedef struct LLSTATE {
  17. LLPOS pos;
  18. } LLSTATE;
  19. int ll_main(LLSTATE *llin, LLSTATE *llout);
  20. int ll_declsect(LLSTATE *llin, LLSTATE *llout);
  21. int ll_decl(LLSTATE *llin, LLSTATE *llout);
  22. int ll_tokens(LLSTATE *llin, LLSTATE *llout, string llarg_tag);
  23. int ll_tokens2(LLSTATE *llin, LLSTATE *llout, string llarg_tag);
  24. int ll_token(token *llret, LLSTATE *llin, LLSTATE *llout, string llarg_tag);
  25. int ll_nterms(LLSTATE *llin, LLSTATE *llout, string llarg_tag, integer llarg_ext);
  26. int ll_nterms2(LLSTATE *llin, LLSTATE *llout, string llarg_tag, integer llarg_ext);
  27. int ll_nterm(nterm *llret, LLSTATE *llin, LLSTATE *llout, string llarg_tag);
  28. int ll_tags(strings *llret, LLSTATE *llin, LLSTATE *llout);
  29. int ll_tag(string *llret, LLSTATE *llin, LLSTATE *llout);
  30. int ll_union(LLSTATE *llin, LLSTATE *llout);
  31. int ll_state(LLSTATE *llin, LLSTATE *llout);
  32. int ll_state1(LLSTATE *llin, LLSTATE *llout);
  33. int ll_rulesect(LLSTATE *llin, LLSTATE *llout);
  34. int ll_rule(LLSTATE *llin, LLSTATE *llout);
  35. int ll_lhs(lhs *llret, LLSTATE *llin, LLSTATE *llout);
  36. int ll_rhss(rhs *llret, LLSTATE *llin, LLSTATE *llout);
  37. int ll_rhss2(rhs *llret, LLSTATE *llin, LLSTATE *llout);
  38. int ll_items(rhs *llret, LLSTATE *llin, LLSTATE *llout);
  39. int ll_item(rhs *llret, LLSTATE *llin, LLSTATE *llout);
  40. int ll_extension(bounds *llret, LLSTATE *llin, LLSTATE *llout);
  41. int ll_lhsargs(string *llret, LLSTATE *llin, LLSTATE *llout, string llarg_ide);
  42. int ll_lhsarglist(string *llret, LLSTATE *llin, LLSTATE *llout, strings llarg_tags, string llarg_ide);
  43. int ll_args(string *llret, LLSTATE *llin, LLSTATE *llout);
  44. int ll_arglist(string *llret, LLSTATE *llin, LLSTATE *llout);
  45. int ll_csect(LLSTATE *llin, LLSTATE *llout);
  46. typedef union LLSTYPE{
  47. string _string;
  48. ccode _ccode;
  49. token _token;
  50. integer _integer;
  51. nterm _nterm;
  52. strings _strings;
  53. lhs _lhs;
  54. rhs _rhs;
  55. bounds _bounds;
  56. } LLSTYPE;
  57. typedef struct LLTERM {
  58. int token;
  59. LLSTYPE lval;
  60. LLPOS pos;
  61. } LLTERM;
  62. void llscanner(LLTERM **tokens, unsigned *ntokens);
  63. int llparser(LLTERM *tokens, unsigned ntokens, LLSTATE *llin, LLSTATE *llout);
  64. void llprinterror(FILE *f);
  65. void llverror(FILE *f, LLPOS *pos, char *fmt, va_list args);
  66. void llerror(FILE *f, LLPOS *pos, char *fmt, ...);
  67. int llgettoken(int *token, LLSTYPE *lval, LLPOS *pos);
  68. #if LLDEBUG > 0
  69. void lldebug_init();
  70. #endif
  71. #define IDENTIFIER 257
  72. #define ARG 258
  73. #define CCODE 259
  74. #define TAGDEF 260
  75. #define PERCENT_PERCENT 261
  76. #define PERCENT_TOKEN 262
  77. #define PERCENT_TYPE 263
  78. #define PERCENT_EXTERNAL 264
  79. #define PERCENT_UNION 265
  80. #define PERCENT_STATE 266
  81. #define PERCENT_START 267
  82. #define PERCENT_PREFIX 268
  83. #define PERCENT_MODULE 269
  84. #define PERCENT_LBRACE 270
  85. #define PERCENT_RBRACE 271