raesl.compile.machine_files.sub_clause
#
Line matcher for sub-clause lines.
Module Contents#
Functions#
|
Guess whether the provided token is a variable or a value. |
Decode tags of a matched 'machine_parts.get_disjunctive_comparison_part' part |
|
|
Decode tags of a matched subclauses line to one or more disjunctive equations. |
Attributes#
- raesl.compile.machine_files.sub_clause.SUB_CLAUSE_SPEC#
- raesl.compile.machine_files.sub_clause.guess_is_var(varvalue: raesl.compile.scanner.Token) bool #
Guess whether the provided token is a variable or a value. (Answer: If it is not “t.b.d.” and starts with a letter it’s a variable.)
- raesl.compile.machine_files.sub_clause.decode_disjunctive_comparisons(tags: Dict[str, List[raesl.compile.scanner.Token]]) raesl.compile.ast.exprs.Expression #
Decode tags of a matched ‘machine_parts.get_disjunctive_comparison_part’ part to an disjunction with comparisons.
- Parameters:
tags – Extracted data from a match of the machine defined in ‘machine_parts.get_disjunctive_comparison_part’.
- Returns:
The expression equivalent to the matched text.
- raesl.compile.machine_files.sub_clause.decode_subclause(tags: Dict[str, List[raesl.compile.scanner.Token]]) raesl.compile.ast.components.SubClause #
Decode tags of a matched subclauses line to one or more disjunctive equations.
- Parameters:
tags – Extracted data from a match of the machine defined in SUB_CLAUSE_SPEC.
- Returns:
The found subclause.