Skip to content

OperantKit/contingency-dsl-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

contingency-dsl-py

🇯🇵 日本語版 README

Python reference parser for contingency-dsl.

Zero external dependencies. Implements the full grammar and ships the core recommended annotation vocabulary.

Usage

from contingency_dsl import parse

program = parse("FR 5 @reinforcer('food')")

Annotation extensions

Six core annotators (stimulus, temporal, subjects, apparatus, composed, measurement) are shipped under contingency_dsl.annotations. They validate @-prefixed keywords introduced by the DSL spec:

from contingency_dsl.annotations import StimulusExtension, MeasurementExtension
from contingency_dsl.extensions import ExtensionRegistry

registry = ExtensionRegistry.build(StimulusExtension(), MeasurementExtension())

Third-party extensions can implement the ExtensionModule Protocol (contingency_dsl.extensions) and compose alongside the built-ins.

License

MIT. See LICENSE.

About

Python reference parser for contingency-dsl. Zero runtime dependencies; implements the full EBNF grammar and produces an AST that validates against contingency-dsl's JSON Schema.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages