pyfcstm.dsl
pyfcstm DSL package initialization and public API exports.
This package aggregates the public interface for the pyfcstm domain-specific
language (DSL). It re-exports parser entry points, grammar nodes, error
types, and the parse tree listener so users can import them directly from
pyfcstm.dsl.
The module exposes the following public components:
GrammarParseListener- Parse tree listener that builds AST nodes from the grammar.parse_condition()- Parse a conditional expression.parse_preamble()- Parse a preamble program.parse_operation()- Parse an operation program.parse_with_grammar_entry()- Parse using a specific grammar rule entry.Error classes from
pyfcstm.dsl.error, includingGrammarParseErrorandGrammarItemError.
The grammar nodes and parser definitions are re-exported via
pyfcstm.dsl.grammar and pyfcstm.dsl.node.
Example:
>>> from pyfcstm.dsl import parse_condition, GrammarParseError
>>> try:
... node = parse_condition("x > 1 && y < 3")
... except GrammarParseError as exc:
... print(exc)
- pyfcstm.dsl.error
- pyfcstm.dsl.grammar
- pyfcstm.dsl.listener
- pyfcstm.dsl.node
- __all__
- INIT_STATE
- EXIT_STATE
- ALL
- ASTNode
- Identifier
- ChainID
- Expr
- Literal
- Integer
- HexInt
- Float
- Boolean
- Constant
- Name
- Paren
- UnaryOp
- BinaryOp
- ConditionalOp
- UFunc
- Statement
- ConstantDefinition
- InitialAssignment
- DefAssignment
- OperationalDeprecatedAssignment
- Condition
- Preamble
- Operation
- TransitionDefinition
- ForceTransitionDefinition
- StateDefinition
- OperationAssignment
- EventDefinition
- StateMachineDSLProgram
- EnterStatement
- EnterOperations
- EnterAbstractFunction
- EnterRefFunction
- ExitStatement
- ExitOperations
- ExitAbstractFunction
- ExitRefFunction
- DuringStatement
- DuringOperations
- DuringAbstractFunction
- DuringRefFunction
- DuringAspectStatement
- DuringAspectOperations
- DuringAspectAbstractFunction
- DuringAspectRefFunction
- pyfcstm.dsl.parse