A set of classes for parsing, evaluating, and formatting die roll strings.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

SA_DiceExpressionStringConstants.h 4.2KB

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