-/* The possible states of the tid range parser's state machine. */
-enum tid_range_state
-{
- /* Parsing the inferior number. */
- TID_RANGE_STATE_INFERIOR,
-
- /* Parsing the thread number or thread number range. */
- TID_RANGE_STATE_THREAD_RANGE,
-
- /* Parsing a star wildcard thread range. E.g., "1.*". */
- TID_RANGE_STATE_STAR_RANGE,
-};
-
-/* An object of this type is passed to tid_range_parser_get_tid. It
- must be initialized by calling tid_range_parser_init. This type is
- defined here so that it can be stack-allocated, but all members
- should be treated as opaque. */
-struct tid_range_parser
-{
- /* What sub-component are we expecting. */
- enum tid_range_state state;
-
- /* The string being parsed. When parsing has finished, this points
- past the last parsed token. */
- const char *string;
-
- /* The range parser state when we're parsing the thread number
- sub-component. */
- struct get_number_or_range_state range_parser;
-
- /* Last inferior number returned. */
- int inf_num;
-
- /* True if the TID last parsed was explicitly inferior-qualified.
- IOW, whether the spec specified an inferior number
- explicitly. */
- int qualified;
-
- /* The inferior number to assume if the TID is not qualified. */
- int default_inferior;
-};
-
-/* Initialize a tid_range_parser for use with
- tid_range_parser_get_tid. TIDLIST is the string to be parsed.
- DEFAULT_INFERIOR is the inferior number to assume if a
- non-qualified thread ID is found. */
-extern void tid_range_parser_init (struct tid_range_parser *parser,
- const char *tidlist,
- int default_inferior);
-