A set of classes for parsing, evaluating, and formatting die roll strings.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

SA_DiceExpressionStringConstants.h 4.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //
  2. // SA_DiceExpressionStringConstants.h
  3. //
  4. // Copyright (c) 2016 Said Achmiz.
  5. //
  6. // This software is licensed under the MIT license.
  7. // See the file "LICENSE" for more information.
  8. #import <Foundation/Foundation.h>
  9. /***************************************************************/
  10. #pragma mark String constants for retrieving string format rules
  11. /***************************************************************/
  12. extern NSString * const SA_DB_STRING_FORMAT_RULES_PLIST_NAME;
  13. /*
  14. The string format rules file (whose basename (i.e., filename minus the .plist
  15. extension) is given by the SA_DB_STRING_FORMAT_RULES_PLIST_NAME string)
  16. contains values for variables that define the properties of legal die roll
  17. strings, as well as certain variables that define the format of result strings.
  18. The file is organized as a dictionary contaning several sub-dictionaries. The
  19. valid keys (those for which values are present in the file), and the values
  20. that those keys may be expected to have, are listed below.
  21. */
  22. // The value for the top-level key SA_DB_VALID_CHARACTERS is a dictionary that
  23. // defines those characters that are recognized as valid representations of
  24. // various components of a die roll string. This dictionary has values for the
  25. // keys listed below whose names begin with SA_DB_VALID_.
  26. extern NSString * const SA_DB_VALID_CHARACTERS;
  27. // The value for the key SA_DB_VALID_NUMERAL_CHARACTERS is a string that
  28. // contains all characters that are recognized as representing decimal numerals.
  29. // (Usually, this will be the 10 characters representing the standard Arabic
  30. // numerals.)
  31. extern NSString * const SA_DB_VALID_NUMERAL_CHARACTERS;
  32. // The value for the key SA_DB_VALID_OPERATOR_CHARACTERS is a dictionary that
  33. // defines those characters that are recognized as valid representations of
  34. // the supported mathematical operators. This dictionary has values for keys
  35. // corresponding to the names of each of the supported operators.
  36. extern NSString * const SA_DB_VALID_OPERATOR_CHARACTERS;
  37. // The value for the key SA_DB_VALID_ROLL_COMMAND_DELIMITER_CHARACTERS is a
  38. // dictionary that defines those characters that are recognized as valid
  39. // representations of delimiters for each of the allowed roll commands. This
  40. // dictionary has values for keys corresponding to the names of each of the
  41. // supported roll modifiers.
  42. extern NSString * const SA_DB_VALID_ROLL_COMMAND_DELIMITER_CHARACTERS;
  43. // The value for the key SA_DB_VALID_ROLL_MODIFIER_DELIMITER_CHARACTERS is a
  44. // dictionary that defines those characters that are recognized as valid
  45. // representations of delimiters for each of the allowed roll modifiers. This
  46. // dictionary has values for keys corresponding to the names of each of the
  47. // supported roll modifiers.
  48. extern NSString * const SA_DB_VALID_ROLL_MODIFIER_DELIMITER_CHARACTERS;
  49. // The value for the top-level key SA_DB_CANONICAL_REPRESENTATIONS is a
  50. // dictionary that defines canonical representations of certain components
  51. // of a formatted die roll string. This dictionary has values for the keys
  52. // listed below whose names begin with SA_DB_CANONICAL_.
  53. extern NSString * const SA_DB_CANONICAL_REPRESENTATIONS;
  54. // The value for the key SA_DB_CANONICAL_OPERATOR_REPRESENTATIONS is a
  55. // dictionary that defines canonical representations of each of the
  56. // supported mathematical operators (for use when formatting results for
  57. // output). This dictionary has values for keys corresponding to the names of
  58. // each of the supported operators.
  59. extern NSString * const SA_DB_CANONICAL_OPERATOR_REPRESENTATIONS;
  60. // The value for the key SA_DB_CANONICAL_ROLL_COMMAND_DELIMITER_REPRESENTATIONS
  61. // is a dictionary that defines canonical representations of each of the
  62. // supported roll commands (for use when formatting results for
  63. // output). This dictionary has values for keys corresponding to the names of
  64. // each of the supported roll commands.
  65. extern NSString * const SA_DB_CANONICAL_ROLL_COMMAND_DELIMITER_REPRESENTATIONS;
  66. // The value for the key SA_DB_CANONICAL_ROLL_MODIFIER_REPRESENTATIONS is a
  67. // dictionary that defines canonical representations of each of the
  68. // supported roll modifiers (for use when formatting results for
  69. // output). This dictionary has values for keys corresponding to the names of
  70. // each of the supported roll modifiers.
  71. extern NSString * const SA_DB_CANONICAL_ROLL_MODIFIER_DELIMITER_REPRESENTATIONS;