Functions | |
| def | get_tag |
| def | parse_order |
| def | parse_action |
| def | parse_actions |
| def | parse_multiple_files |
| def | get_all_names |
This is the parser for the actions files. Recall that the actions should all be defined in such a file.
| def parsing.actions_parser.get_all_names | ( | actions | ) |
Returns all action names present in the given actions dictionnary.
| def parsing.actions_parser.get_tag | ( | order_tag, | |
| tag, | |||
optionnal = False |
|||
| ) |
Gets the value of an argument. If optionnal is set to True, it returns None if nothing is found, it will stop the game else.
| def parsing.actions_parser.parse_action | ( | action_tag | ) |
Parses an action tag. It return the dictionnary with the interesting values.
| def parsing.actions_parser.parse_actions | ( | action_xml | ) |
Parses a whole action file.
It should return a dictionnay {event: orders} of all described actions.
Please note that only actions are being looked for, other tag will simply
be ignored by this function. This shouldn't bother anybody however, since
other tags would break the semantics of this file.
| def parsing.actions_parser.parse_multiple_files | ( | actions_files | ) |
Parses multiple files. Broadly speaking, it parses sequentially all files, and concatenates all answers.
| def parsing.actions_parser.parse_order | ( | order_tag | ) |
Parses an order tag. Returns the type of order, and the code to run.
1.7.6.1