Pelzini

This is the code documentation for the Pelzini project

source of /processor/constants.php

All of the constats used in Pelzini
  1. <?php
  2. /*
  3. Copyright 2008 Josh Heidenreich
  4.  
  5. This file is part of Pelzini.
  6.  
  7. Pelzini is free software: you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation, either version 3 of the License, or
  10. (at your option) any later version.
  11.  
  12. Pelzini is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with Pelzini. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20.  
  21.  
  22. /**
  23.  * All of the constats used in Pelzini
  24.  *
  25.  * @since 0.1
  26.  * @author Josh
  27.  * @package Processor
  28.  **/
  29.  
  30. /**
  31.  * The current version of Pelzini.
  32.  **/
  33. define('PELZINI_VERSION', '0.9.0');
  34.  
  35. // The output engines
  36. define('OUTPUTTER_MYSQL', 1);
  37. define('OUTPUTTER_DEBUG', 2);
  38. define('OUTPUTTER_PGSQL', 3);
  39. define('OUTPUTTER_SQLITE', 4);
  40. define('OUTPUTTER_XML', 5);
  41.  
  42. // The transformers - these alter and mutate the parser model before outptting
  43. define('TRANSFORMER_QUALITY_CHECK', 1);
  44. define('TRANSFORMER_VIRTUAL_ENUMS', 2);
  45.  
  46. // The link types
  47. // These are used when linking from tables such as Authors
  48. // which can potentinally link to multiple tables
  49. // NOTE: These link types must match the ones defined in viewer/constants.php
  50. define('LINK_TYPE_FILE', 1);
  51. define('LINK_TYPE_CLASS', 2);
  52. define('LINK_TYPE_INTERFACE', 3);
  53. define('LINK_TYPE_CONSTANT', 4);
  54. define('LINK_TYPE_FUNCTION', 5);
  55. define('LINK_TYPE_VARIABLE', 6);
  56. define('LINK_TYPE_ENUMERATION', 7);
  57.  
  58.  
  59. // These are all of the valid tokens for all languages
  60. // Some of these tokens represent specific strings, others represent language-specific concepts
  61. // These tokens are grouped by type, with each type begining on a 50-number boundry
  62.  
  63. // Punctuation
  64. define('TOKEN_OPEN_NORMAL_BRACKET', 1); // A normal bracket, i.e. '('
  65. define('TOKEN_OPEN_CURLY_BRACKET', 2); // A curly bracket, i.e. '{'
  66. define('TOKEN_OPEN_SQUARE_BRACKET', 3); // A square bracket, i.e. '['
  67. define('TOKEN_CLOSE_NORMAL_BRACKET', 4); // A normal bracket, i.e. ')'
  68. define('TOKEN_CLOSE_CURLY_BRACKET', 5); // A curly bracket, i.e. '}'
  69. define('TOKEN_CLOSE_SQUARE_BRACKET', 6); // A square bracket, i.e. ']'
  70. define('TOKEN_EQUALS', 7); // An equals sign, i.e. '='
  71. define('TOKEN_PERIOD', 8); // A period, i.e. '.'
  72. define('TOKEN_COMMA', 9); // A comma, i.e. ','
  73. define('TOKEN_SEMICOLON', 10); // A semi-colon, i.e. ';'
  74. define('TOKEN_ASTERIX', 11); // An asterix, i.e. '*'
  75.  
  76. // Keywords
  77. define('TOKEN_FUNCTION', 50); // A function definition, e.g. 'function'
  78. define('TOKEN_CLASS', 51); // A class definition, e.g. 'class'
  79. define('TOKEN_CONST', 52); // Constants stuff, e.g. 'const'
  80.  
  81. // Comments
  82. define('TOKEN_DOCBLOCK', 100); // A docblock comment, e.g. '/** whee */'
  83. define('TOKEN_COMMENT', 101); // A docblock comment, e.g. '/* whee */' or '// whee'
  84.  
  85. // Generic items
  86. define('TOKEN_IDENTIFIER', 150); // An identifier, e.g. 'whee'
  87. define('TOKEN_STRING', 151); // A quoted string, e.g. '"hello"'
  88. define('TOKEN_RESERVED_WORD', 152); // An unknown reserved word (i.e. not specified above as a specific constant)
  89. define('TOKEN_RESERVED_VALUE', 153); // A reserved value, e.g. 'null' or 'true'
  90. define('TOKEN_NUMBER', 154); // A number, e.g. '123' or '12.34' or '0x3A'
  91.  
  92. // Language-specific
  93. define('TOKEN_C_PREPROCESSOR', 200); // A 'C' preprocessor directive, e.g. #define whee
  94. ?>
  95.