diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html new file mode 100644 index 0000000..ced090e --- /dev/null +++ b/index.html @@ -0,0 +1,9 @@ + + + + + + +

Go to the default documentation.

+ + \ No newline at end of file diff --git a/master/.buildinfo b/master/.buildinfo new file mode 100644 index 0000000..a059665 --- /dev/null +++ b/master/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 86e1b738867210d74fdb738d635c8517 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/master/.nojekyll b/master/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/master/_modules/blark/apischema_compat.html b/master/_modules/blark/apischema_compat.html new file mode 100644 index 0000000..70d45ec --- /dev/null +++ b/master/_modules/blark/apischema_compat.html @@ -0,0 +1,277 @@ + + + + + + blark.apischema_compat — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.apischema_compat

+"""
+Serialization helpers for apischema, an optional dependency.
+"""
+# Largely based on issue discussions regarding tagged unions.
+from __future__ import annotations
+
+from collections import defaultdict
+from collections.abc import Callable, Iterator
+from types import new_class
+from typing import Any, Dict, Generic, List, Tuple, TypeVar, get_type_hints
+
+import lark
+from apischema import deserializer, serializer, type_name
+from apischema.conversions import Conversion
+from apischema.metadata import conversion
+from apischema.objects import object_deserialization
+from apischema.tagged_unions import Tagged, TaggedUnion, get_tagged
+from apischema.typing import get_origin
+from apischema.utils import to_pascal_case
+
+_alternative_constructors: Dict[type, List[Callable]] = defaultdict(list)
+Func = TypeVar("Func", bound=Callable)
+
+
+
+[docs] +def alternative_constructor(func: Func) -> Func: + """Alternative constructor for a given type.""" + return_type = get_type_hints(func)["return"] + _alternative_constructors[get_origin(return_type) or return_type].append(func) + return func
+ + + +
+[docs] +def get_all_subclasses(cls: type) -> Iterator[type]: + """Recursive implementation of type.__subclasses__""" + for sub_cls in cls.__subclasses__(): + yield sub_cls + yield from get_all_subclasses(sub_cls)
+ + + +Cls = TypeVar("Cls", bound=type) + + +def _get_generic_name_factory(cls: type, *args: type): + def _capitalized(name: str) -> str: + return name[0].upper() + name[1:] + + return "".join((cls.__name__, *(_capitalized(arg.__name__) for arg in args))) + + +generic_name = type_name(_get_generic_name_factory) + + +
+[docs] +def as_tagged_union(cls: Cls) -> Cls: + """ + Tagged union decorator, to be used on base class. + + Supports generics as well, with names generated by way of + `_get_generic_name_factory`. + """ + params = tuple(getattr(cls, "__parameters__", ())) + tagged_union_bases: Tuple[type, ...] = (TaggedUnion,) + + # Generic handling is here: + if params: + tagged_union_bases = (TaggedUnion, Generic[params]) + generic_name(cls) + prev_init_subclass = getattr(cls, "__init_subclass__", None) + + def __init_subclass__(cls, **kwargs): + if prev_init_subclass is not None: + prev_init_subclass(**kwargs) + generic_name(cls) + + cls.__init_subclass__ = classmethod(__init_subclass__) + + def with_params(cls: type) -> Any: + """Specify type of Generic if set.""" + return cls[params] if params else cls + + def serialization() -> Conversion: + """ + Define the serializer Conversion for the tagged union. + + source is the base ``cls`` (or ``cls[T]``). + target is the new tagged union class ``TaggedUnion`` which gets the + dictionary {cls.__name__: obj} as its arguments. + """ + annotations = { + # Assume that subclasses have same generic parameters than cls + sub.__name__: Tagged[with_params(sub)] + for sub in get_all_subclasses(cls) + } + namespace = {"__annotations__": annotations} + tagged_union = new_class( + cls.__name__, tagged_union_bases, exec_body=lambda ns: ns.update(namespace) + ) + return Conversion( + lambda obj: tagged_union(**{obj.__class__.__name__: obj}), + source=with_params(cls), + target=with_params(tagged_union), + # Conversion must not be inherited because it would lead to + # infinite recursion otherwise + inherited=False, + ) + + def deserialization() -> Conversion: + """ + Define the deserializer Conversion for the tagged union. + + Allows for alternative standalone constructors as per the apischema + example. + """ + annotations: dict[str, Any] = {} + namespace: dict[str, Any] = {"__annotations__": annotations} + for sub in get_all_subclasses(cls): + annotations[sub.__name__] = Tagged[with_params(sub)] + for constructor in _alternative_constructors.get(sub, ()): + # Build the alias of the field + alias = to_pascal_case(constructor.__name__) + # object_deserialization uses get_type_hints, but the constructor + # return type is stringified and the class not defined yet, + # so it must be assigned manually + constructor.__annotations__["return"] = with_params(sub) + # Use object_deserialization to wrap constructor as deserializer + deserialization = object_deserialization(constructor, generic_name) + # Add constructor tagged field with its conversion + annotations[alias] = Tagged[with_params(sub)] + namespace[alias] = Tagged(conversion(deserialization=deserialization)) + # Create the deserialization tagged union class + tagged_union = new_class( + cls.__name__, tagged_union_bases, exec_body=lambda ns: ns.update(namespace) + ) + return Conversion( + lambda obj: get_tagged(obj)[1], + source=with_params(tagged_union), + target=with_params(cls), + ) + + deserializer(lazy=deserialization, target=cls) + serializer(lazy=serialization, source=cls) + return cls
+ + + +
+[docs] +@serializer +def token_serializer(token: lark.Token) -> List[str]: + return [token.type, token.value]
+ + + +
+[docs] +@deserializer +def token_deserializer(parts: List[str]) -> lark.Token: + return lark.Token(*parts)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/dependency_store.html b/master/_modules/blark/dependency_store.html new file mode 100644 index 0000000..c1e8fef --- /dev/null +++ b/master/_modules/blark/dependency_store.html @@ -0,0 +1,541 @@ + + + + + + blark.dependency_store — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.dependency_store

+"""
+TwinCAT project dependency handling.
+"""
+from __future__ import annotations
+
+import dataclasses
+import functools
+import json
+import logging
+import pathlib
+from dataclasses import dataclass
+from typing import Any, Dict, Generator, List, Optional, Tuple, Union
+
+import packaging.version
+
+from . import parse, util
+from .config import BLARK_TWINCAT_ROOT
+from .solution import (DependencyVersion, TwincatPlcProject,
+                       make_solution_from_files)
+from .summary import CodeSummary
+
+AnyPath = Union[str, pathlib.Path]
+
+logger = logging.getLogger(__name__)
+_dependency_store = None
+
+
+
+[docs] +@dataclass +class DependencyStoreConfig: + """Dependency store configuration, from ``config.json``.""" + + filename: Optional[pathlib.Path] + libraries: Dict[str, DependencyStoreLibrary] + +
+[docs] + @classmethod + def from_dict( + cls, config: dict, filename: Optional[pathlib.Path] = None + ) -> DependencyStoreConfig: + libraries = config.get("libraries", {}) + for library_name, library_info in libraries.items(): + libraries[library_name] = DependencyStoreLibrary(**library_info) + return cls(filename=filename, libraries=libraries)
+ + +
+[docs] + def as_json(self) -> str: + """Get the configuration as JSON.""" + config = dataclasses.asdict(self) + config.pop("filename") + return json.dumps(config, indent=4)
+ + +
+[docs] + def save(self, path: AnyPath) -> None: + """Save the configuration as JSON to a file.""" + with open(path, "wt") as fp: + print(self.as_json(), file=fp)
+
+ + + +
+[docs] +@dataclass +class DependencyStoreLibrary: + name: str + versioned: bool + path: str + project: str + +
+[docs] + def get_latest_version_path(self, root: pathlib.Path) -> pathlib.Path: + """ + Get the latest version project filename. + + Returns + ------- + pathlib.Path + """ + + def get_version(path: pathlib.Path) -> Optional[packaging.version.Version]: + try: + version_string = path.name.lstrip("v").replace("-", ".") + return packaging.version.parse(version_string) + except Exception: + return None + + project_root = root / self.path + + paths = { + (get_version(path), path) + for path in project_root.iterdir() + if get_version(path) is not None + } + + for version, path in reversed(sorted(paths)): + project_fn = path / self.project + if project_fn.exists(): + logger.debug("Found latest %s %s in %s", self.name, version, project_fn) + return project_fn + + raise FileNotFoundError( + f"No valid versions of {self.name} found in {project_root}" + )
+ + +
+[docs] + def get_project_filename( + self, + root: pathlib.Path, + version: Optional[str], + ) -> pathlib.Path: + """Get the full project filename, given the root path and version.""" + if not self.versioned: + return root / self.path / self.project + if version == "*" or version is None: + return self.get_latest_version_path(root) + + return root / self.path / version / self.project
+
+ + + +
+[docs] +class DependencyStore: + """ + A storage container for dependency configuration and loading. + + Environment variable: ``BLARK_TWINCAT_ROOT`` is required to be set for this + to be functional, along with a "config.json" in that directory. This + should contain information as to the supported library dependencies and + where to find them. + + .. code:: + + { + "libraries": { + "LCLS General": { + "name": "LCLS General", + "versioned": false, + "path": "lcls-twincat-general", + "project": "LCLSGeneral.sln" + }, + "lcls-twincat-motion": { + "name": "lcls-twincat-motion", + "versioned": true, + "path": "lcls-twincat-motion", + "project": "lcls-twincat-motion.sln" + } + } + } + + The above would indicate that the "LCLS General" library + (as named in TwinCAT) is available relative to the root directory in + ``lcls-twincat-general/LCLSGeneral.sln``. + It would also indicate that the "lcls-twincat-motion" library could + be found in + ``lcls-twincat-motion/VERSION/lcls-twincat-motion.sln`` + where VERSION is the project-defined version. + """ + + root: pathlib.Path + config: DependencyStoreConfig + +
+[docs] + def __init__(self, root: pathlib.Path): + self.root = root + self.load_config()
+ + + @property + def config_filename(self): + """The configuration filename.""" + return (self.root / "config.json").expanduser().resolve() + + def _read_config(self) -> Any: + with open(self.config_filename) as fp: + return json.load(fp) + +
+[docs] + def load_config(self): + """Load the dependency store configuration file.""" + logger.debug("Loading dependency store config from %s", self.config_filename) + try: + config = self._read_config() + except FileNotFoundError: + logger.warning( + "Project dependencies will not be loaded as either " + "BLARK_TWINCAT_ROOT is unset or invalid. Expected " + "file %s to exist", + self.root / "config.json", + ) + self.config = DependencyStoreConfig(filename=None, libraries={}) + return + + self.config = DependencyStoreConfig.from_dict( + config, filename=self.config_filename + )
+ + +
+[docs] + @functools.lru_cache(maxsize=50) + def get_dependency( + self, + name: str, + version: Optional[str] = None, + ) -> List[PlcProjectMetadata]: + """Get a dependency by name and version number.""" + try: + info: DependencyStoreLibrary = self.config.libraries[name] + except KeyError: + logger.warning( + "Unable to find library %s in dependency store. Known libraries: %s", + name, + ", ".join(self.config.libraries), + ) + return [] + + try: + filename = info.get_project_filename(self.root, version=version) + except FileNotFoundError: + logger.warning( + "Unable to find library project %s version %s", name, version + ) + return [] + + if not filename.exists(): + logger.warning( + "Library project %s version %s file %s does not exist", + name, + version, + filename, + ) + return [] + + return list( + PlcProjectMetadata.from_project_filename( + str(filename.resolve()), + # TODO: one level only for now to avoid circular deps + include_dependencies=False, + ) + )
+ + +
+[docs] + def get_dependencies( + self, + plc: TwincatPlcProject, + ) -> Generator[Tuple[DependencyVersion, PlcProjectMetadata], None, None]: + """Get dependency projects from a PLC.""" + for _, info in plc.dependencies.items(): + if info.resolution is None: + continue + + for proj in self.get_dependency(info.name, info.resolution.version): + yield info.resolution, proj
+ + +
+[docs] + @staticmethod + def get_instance() -> DependencyStore: + """Get the global DependencyStore instance.""" + return get_dependency_store()
+
+ + + +
+[docs] +def get_dependency_store() -> DependencyStore: + """Get the global DependencyStore instance.""" + global _dependency_store + + if _dependency_store is None: + _dependency_store = DependencyStore(root=pathlib.Path(BLARK_TWINCAT_ROOT)) + return _dependency_store
+ + + +
+[docs] +@dataclass +class PlcProjectMetadata: + """This is a per-PLC project metadata container.""" + + name: str + filename: pathlib.Path + include_dependencies: bool + code: List[parse.ParseResult] + summary: CodeSummary + loaded_files: Dict[pathlib.Path, str] + dependencies: Dict[str, DependencyVersion] + plc: Optional[TwincatPlcProject] + +
+[docs] + @classmethod + def from_plcproject( + cls, + plc: TwincatPlcProject, + include_dependencies: bool = True, + ) -> Optional[PlcProjectMetadata]: + """Create a PlcProjectMetadata instance from a ``TwincatPlcProject``.""" + if plc.plcproj_path is None: + raise ValueError(f"The PLC {plc.name!r} must have a location on disk.") + + filename = plc.plcproj_path.resolve() + loaded_files = {} + deps = {} + code = [] + combined_summary = CodeSummary() + + loaded_files[filename] = util.get_file_sha256(filename) + + if include_dependencies: + store = get_dependency_store() + for resolution, proj in store.get_dependencies(plc): + code.extend(proj.code) + deps.update(proj.dependencies) + loaded_files.update(proj.loaded_files) + deps[resolution.name] = resolution + plc_name = proj.plc.name if proj.plc is not None else "unknown" + combined_summary.append(proj.summary, namespace=plc_name) + + for source in plc.sources: + if not source.contents: + continue + + for item in source.contents.to_blark(): + results = [] + for result in parse.parse_item(item): + if result.exception is not None: + logger.debug( + "Failed to load: %s %s", result.filename, result + ) + continue + assert result.filename is not None + results.append(result) + loaded_files[result.filename] = util.get_file_sha256( + result.filename + ) + + if results: + summary = CodeSummary.from_parse_results(results) + combined_summary.append(summary) + + # tmc = plc.tmc + return cls( + name=plc.name or "unknown", + filename=filename, + include_dependencies=include_dependencies, + code=code, + dependencies=deps, + loaded_files=loaded_files, + summary=combined_summary, + plc=plc, + # tmc_symbols=list(tmc.find(pytmc.parser.Symbol, recurse=False)) if tmc else None, + )
+ + +
+[docs] + @classmethod + def from_project_filename( + cls, + project: AnyPath, + include_dependencies: bool = True, + plc_whitelist: Optional[List[str]] = None, + ) -> Generator[PlcProjectMetadata, None, None]: + """Given a project/solution filename, get all PlcProjectMetadata.""" + solution = make_solution_from_files(project) + logger.debug( + "Solution path %s projects %s", solution.filename, solution.projects + ) + for tsproj_project in solution.projects: + logger.debug("Found tsproj %s", tsproj_project.name) + try: + parsed_tsproj = tsproj_project.load() + except Exception: + logger.exception("Failed to load project %s", tsproj_project.name) + continue + + for plc_name, plc in parsed_tsproj.plcs_by_name.items(): + if plc_whitelist and plc_name not in plc_whitelist: + continue + + logger.debug("Found PLC project %s", plc_name) + plc_md = cls.from_plcproject( + plc, + include_dependencies=include_dependencies, + ) + if plc_md is not None: + yield plc_md
+
+ + + +
+[docs] +def load_projects( + *projects: AnyPath, + include_dependencies: bool = True, + plc_whitelist: Optional[List[str]] = None, +) -> List[PlcProjectMetadata]: + """Load the given projects by filename.""" + result = [] + for project in projects: + mds = PlcProjectMetadata.from_project_filename( + project, + include_dependencies=include_dependencies, + plc_whitelist=plc_whitelist, + ) + result.extend(mds) + return result
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/format.html b/master/_modules/blark/format.html new file mode 100644 index 0000000..b91c03b --- /dev/null +++ b/master/_modules/blark/format.html @@ -0,0 +1,466 @@ + + + + + + blark.format — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.format

+"""
+`blark format` is a command-line utility to parse and print formatted TwinCAT3
+source code files.
+"""
+import argparse
+import logging
+import pathlib
+import sys
+from typing import Any, List, Optional, Tuple, Union
+
+from blark import output
+
+from . import transform as tf
+from .output import OutputBlock
+from .parse import ParseResult
+from .parse import main as parse_main
+from .util import AnyPath
+
+DESCRIPTION = __doc__
+
+logger = logging.getLogger(__name__)
+
+
+
+[docs] +def build_arg_parser(argparser=None): + if argparser is None: + argparser = argparse.ArgumentParser() + + argparser.description = DESCRIPTION + argparser.formatter_class = argparse.RawTextHelpFormatter + + argparser.add_argument( + "filename", + type=str, + help=( + "Path to project, solution, source code file (.tsproj, .sln, " + ".TcPOU, .TcGVL)" + ), + ) + + argparser.add_argument( + "-if", + "--input-format", + type=str, + help="Output file format, if not the same as the input format", + ) + argparser.add_argument( + "--verbose", + "-v", + action="count", + default=0, + help="Increase verbosity, up to -vvv", + ) + + argparser.add_argument( + "--indent", + default=" ", + help="Single indent to reformat with", + ) + + argparser.add_argument( + "--debug", + action="store_true", + help="On failure, still return the results tree", + ) + + argparser.add_argument( + "--overwrite", + action="store_true", + help="Overwrite existing files", + ) + + argparser.add_argument( + "--write-to", + type=str, + help="Write formatted contents to this path", + ) + + argparser.add_argument( + "-of", + "--output-format", + type=str, + help="Output file format, if not the same as the input format", + ) + return argparser
+ + + +
+[docs] +def reformat_code( + code: tf.SourceCode, +) -> str: + """Reformat the code with the provided settings.""" + # For anyone following at home, this is not a "good" formatting + # of the output - just a consistent output formatting. + # Opinionated, stylized output remains a TODO. + return str(code)
+ + + +
+[docs] +def dump_source_to_console(source: Union[bytes, str], encoding: str = "utf-8") -> None: + """ + Output the given source to the console. + + Parameters + ---------- + source : bytes or str + The source code. + encoding : str + Encoding to use for byte strings. + """ + if isinstance(source, bytes): + print(source.decode(encoding, errors="replace")) + else: + print(source)
+ + + +
+[docs] +def write_source_to_file( + filename: pathlib.Path, + source: Union[bytes, str], + encoding: str = "utf-8", + overwrite: bool = False, +) -> None: + """ + Write source code to the given file. + + Parameters + ---------- + filename : pathlib.Path + The filename to write to. + source : bytes or str + The source code. + encoding : str + The encoding to use when writing the file. + overwrite : bool + Overwrite a file, if it exists. Otherwise, raise ValueError. + """ + if filename.exists() and not overwrite: + raise ValueError( + f"File would be overwritten: {filename} " + f"if this is OK use --overwrite" + ) + + if isinstance(source, str): + # NOTE: if this is undesirable, make your output handler + # return bytes instead of a string + source = source.encode(encoding) + + with open(filename, "wb") as fp: + fp.write(source)
+ + + +
+[docs] +def determine_output_filename( + input_filename: pathlib.Path, + write_to: Optional[pathlib.Path], +) -> pathlib.Path: + """ + Get an output filename based on the input filename and destination path. + + Parameters + ---------- + input_filename : pathlib.Path + The file the source code comes from. + write_to : Optional[pathlib.Path] + The destination path to write to. + + Returns + ------- + pathlib.Path + The output filename to write to. + """ + if write_to: + output_filename = pathlib.Path(write_to) + if output_filename.is_dir(): + return output_filename / input_filename.name + return output_filename + + return input_filename
+ + + +
+[docs] +def get_reformatted_code_blocks( + results: List[ParseResult], + user: Optional[Any] = None, + filename: Optional[pathlib.Path] = None, + raise_on_error: bool = True, +) -> List[OutputBlock]: + """ + For each parsed code block, generate an OutputBlock for writing to disk. + + Parameters + ---------- + results : List[ParseResult] + The parsed source code. + user : Any, optional + The loader used for parsing the above (may be a + `blark.plain.PlainFileLoader` or a `blark.solution.TcPOU`, for example) + filename : pathlib.Path, optional + The filename associated with the source code parts. + raise_on_error : bool + In the event of a reformatting error, raise immediately. If False, + the original (not reformatted) source code will be used as-is. + + Returns + ------- + List[OutputBlock] + [TODO:description] + """ + blocks: List[OutputBlock] = [] + + logger.debug( + "Reformatting %d parse results from file %s by way of loader %s", + len(results), + filename, + user, + ) + for res in results: + try: + formatted = reformat_code(res.transform()) + except Exception: + logger.exception( + "Failed to reformat code block for identifier %s", + res.identifier, + ) + if raise_on_error: + raise + formatted = res.source_code + + blocks.append( + OutputBlock( + code=formatted, + metadata={}, # what might go here? + origin=res, + ) + ) + return blocks
+ + + +
+[docs] +def main( + filename: AnyPath, + verbose: int = 0, + debug: bool = False, + interactive: bool = False, + indent: str = " ", + write_to: Optional[AnyPath] = None, + overwrite: bool = False, + input_format: Optional[str] = None, + output_format: Optional[str] = None, +): + if write_to is not None: + write_to = pathlib.Path(write_to) + + result_by_filename = parse_main( + filename, + verbose=verbose, # deprecated + debug=debug, + interactive=interactive, + ) + + settings = tf.FormatSettings( + indent=indent, + ) + tf.configure_formatting(settings) + + def group_by_user_loader() -> List[Tuple[Any, pathlib.Path, List[ParseResult]]]: + """ + Group all ParseResults by their loader (or "user" defined wrapper.) + + This grouping ensures that things like POUs (which may contain multiple + actions, methods, and properties stored in different parts of a source + file) have their rewrite stage happen in two steps: (1) reformat and + then rewrite all disjoint parts of the source and (2) write the final + results to the user-specified destination. + """ + by_loader_obj = [] + last_user = object() + last_filename = object() + current_group = [] + for _, results in result_by_filename.items(): + for res in results: + user = res.item.user + if res.item.user is not last_user or res.filename != last_filename: + current_group = [res] + by_loader_obj.append((user, res.filename, current_group)) + last_user = user + last_filename = res.filename + else: + current_group.append(res) + + return by_loader_obj + + for user, filename, results in group_by_user_loader(): + blocks = get_reformatted_code_blocks(results, user=user, filename=filename) + if not blocks: + continue + + # Default to 'output format' if specified + # Fall back to writing to the user-provided input format + # Finally try to detect the input format to determine the output format + output_handler = output.get_handler_by_name( + output_format or input_format or filename.suffix + ) + logger.debug( + "Chose output handler %s based on %r -> %r -> %r (%s)", + output_handler, + output_format, + input_format, + filename.suffix, + filename, + ) + + # Possibilities: + # 1. Save to same file in same format (--overwrite) + # 2. Save to different file/directory in same format (--write-to) + # 3. Save to different file in different format (--output-format, --write-to) + # 4. Save to same file in different format (--output-format xyz, --overwrite) + + # For now, we'll only *really* support cases (1) and (2) + # Exceptions: + # - Allow anything->plain conversion because it's easy. + + try: + output_contents = output_handler(user, filename, blocks) + except Exception: + logger.exception( + "Failed to transform output for handler %s", + output_format, + ) + sys.exit(1) + + if not write_to and not overwrite: + dump_source_to_console(output_contents) + continue + + output_filename = determine_output_filename(filename, write_to) + write_source_to_file(output_filename, output_contents, overwrite=overwrite) + + return result_by_filename
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/html.html b/master/_modules/blark/html.html new file mode 100644 index 0000000..31b56b0 --- /dev/null +++ b/master/_modules/blark/html.html @@ -0,0 +1,310 @@ + + + + + + blark.html — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.html

+"""Syntax-highlighted HTML file writer."""
+from __future__ import annotations
+
+import collections
+import dataclasses
+import pathlib
+from typing import Any, DefaultDict, Dict, Generator, List, Optional
+
+import lark
+
+from .output import OutputBlock, register_output_handler
+
+
+
+[docs] +@dataclasses.dataclass(frozen=True) +class HighlighterAnnotation: + """A single HTML tag annotation which applies to a position range of source code.""" + + name: str + terminal: bool + is_open_tag: bool + other_tag_pos: int + + def __str__(self) -> str: + return self.as_string() + +
+[docs] + def as_string(self, tag: str = "span") -> str: + # some options here? + if not self.is_open_tag: + return f'</{tag}>' + + if self.terminal: + classes = " ".join(("term", self.name)) + else: + classes = " ".join(("rule", self.name)) + + return f'<{tag} class="{classes}">'
+
+ + + +def _add_annotation_pair( + annotations: DefaultDict[int, List[HighlighterAnnotation]], + name: str, + start_pos: int, + end_pos: int, + terminal: bool, +) -> None: + """ + Add a pair of HTML tag annotations to the position-indexed list. + + Parameters + ---------- + annotations : DefaultDict[int, List[HighlighterAnnotation]] + Annotations keyed by 0-indexed string position. + name : str + Name of the annotation. + start_pos : int + String index position which the annotation applies to. + end_pos : int + String index position which the annotation ends at. + terminal : bool + Whether this is a TERMINAL (True) or a rule (false). + """ + annotations[start_pos].append( + HighlighterAnnotation( + name=name, + terminal=terminal, + is_open_tag=True, + other_tag_pos=end_pos, + ) + ) + annotations[end_pos].append( + HighlighterAnnotation( + name=name, + terminal=terminal, + is_open_tag=False, + other_tag_pos=start_pos, + ) + ) + + +
+[docs] +def get_annotations(tree: lark.Tree) -> DefaultDict[int, List[HighlighterAnnotation]]: + """Get annotations for syntax elements in the given parse tree.""" + annotations: DefaultDict[int, List[HighlighterAnnotation]] = collections.defaultdict( + list + ) + + for subtree in tree.iter_subtrees(): + if hasattr(subtree.meta, "start_pos"): + _add_annotation_pair( + annotations, + name=subtree.data, + terminal=False, + start_pos=subtree.meta.start_pos, + end_pos=subtree.meta.end_pos, + ) + for child in subtree.children: + if isinstance(child, lark.Token): + if child.start_pos is not None and child.end_pos is not None: + _add_annotation_pair( + annotations, + name=child.type, + terminal=True, + start_pos=child.start_pos, + end_pos=child.end_pos, + ) + return annotations
+ + + +
+[docs] +def apply_annotations_to_code( + code: str, + annotations: Dict[int, List[HighlighterAnnotation]] +) -> str: + def annotate() -> Generator[str, None, None]: + pos = 0 + for pos, ch in enumerate(code): + for ann in reversed(annotations.get(pos, [])): + yield str(ann) + if ch == " ": + yield "&nbsp;" + else: + yield ch + + for ann in annotations.get(pos + 1, []): + yield str(ann) + + return "".join(annotate())
+ + + +
+[docs] +@dataclasses.dataclass +class HtmlWriter: + user: Any + source_filename: Optional[pathlib.Path] + block: OutputBlock + + @property + def source_code(self) -> str: + """The source code associated with the block.""" + assert self.block.origin is not None + return self.block.origin.source_code + +
+[docs] + def to_html(self) -> str: + """HTML tag-annotated source code.""" + assert self.block.origin is not None + assert self.block.origin.tree is not None + annotations = get_annotations(self.block.origin.tree) + + for comment in self.block.origin.comments: + if comment.start_pos is not None and comment.end_pos is not None: + _add_annotation_pair( + annotations, + name=comment.type, + start_pos=comment.start_pos, + end_pos=comment.end_pos, + terminal=True, + ) + + return apply_annotations_to_code(self.source_code, annotations)
+ + +
+[docs] + @staticmethod + def save( + user: Any, + source_filename: Optional[pathlib.Path], + parts: List[OutputBlock], + ) -> str: + """Convert the source code block to HTML and return it.""" + result = [] + for part in parts: + writer = HtmlWriter(user, source_filename, part) + result.append(writer.to_html()) + + return "\n\n".join(result)
+
+ + + +def _register(): + """Register the HTML output file handlers.""" + register_output_handler("html", HtmlWriter.save) + register_output_handler(".htm", HtmlWriter.save) + register_output_handler(".html", HtmlWriter.save) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/input.html b/master/_modules/blark/input.html new file mode 100644 index 0000000..9e65e20 --- /dev/null +++ b/master/_modules/blark/input.html @@ -0,0 +1,338 @@ + + + + + + blark.input — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.input

+from __future__ import annotations
+
+import dataclasses
+import logging
+import pathlib
+from typing import Any, Callable, Dict, List, Optional, Type, Union
+
+from .typing import Self
+from .util import AnyPath, SourceType
+
+logger = logging.getLogger(__name__)
+
+
+
+[docs] +@dataclasses.dataclass(frozen=True) +class BlarkSourceLine: + filename: Optional[pathlib.Path] + lineno: int + code: str + +
+[docs] + @classmethod + def from_code( + cls: Type[Self], + code: str, + first_lineno: int = 1, + filename: Optional[pathlib.Path] = None, + ) -> list[Self]: + return [ + BlarkSourceLine( + code=line, + lineno=lineno, + filename=filename, + ) + for lineno, line in enumerate(code.splitlines(), start=first_lineno) + ]
+
+ + + +
+[docs] +@dataclasses.dataclass +class BlarkSourceItem: + identifier: str + lines: list[BlarkSourceLine] + type: SourceType + grammar_rule: Optional[str] + implicit_end: Optional[str] + user: Optional[Any] = None + +
+[docs] + @classmethod + def from_code( + cls: type[Self], + code: str, + *, + identifier: str = "", + source_type: SourceType = SourceType.general, + grammar_rule: Optional[str] = None, + implicit_end: Optional[str] = None, + first_lineno: int = 1, + filename: Optional[pathlib.Path] = None, + user: Optional[Any] = None, + ) -> Self: + grammar_rule = grammar_rule or source_type.get_grammar_rule() + if implicit_end is None: + implicit_end = source_type.get_implicit_block_end() + return BlarkSourceItem( + identifier=identifier, + lines=BlarkSourceLine.from_code( + code, + first_lineno=first_lineno, + filename=filename, + ), + type=source_type, + grammar_rule=grammar_rule, + implicit_end=implicit_end, + user=user, + )
+ + +
+[docs] + def get_filenames(self) -> set[pathlib.Path]: + return {line.filename for line in self.lines if line.filename is not None}
+ + +
+[docs] + def get_code_and_line_map( + self, + include_end: bool = True, + blark_lineno: int = 1, + ) -> tuple[str, dict[int, int]]: + code = "\n".join(line.code for line in self.lines) + line_map = { + blark_line: line.lineno + for blark_line, line in enumerate(self.lines, start=blark_lineno) + } + if line_map and self.implicit_end and include_end: + line_map[max(line_map) + 1] = max(line_map.values()) + code = "\n".join((code, self.implicit_end)) + return code, line_map
+
+ + + +
+[docs] +@dataclasses.dataclass +class BlarkCompositeSourceItem: + identifier: str + filename: Optional[pathlib.Path] # primary filename? + parts: list[Union[BlarkSourceItem, BlarkCompositeSourceItem]] + user: Optional[Any] = None + + @property + def lines(self) -> list[BlarkSourceLine]: + lines = [] + for part in self.parts: + lines.extend(part.lines) + return lines + +
+[docs] + def get_code_and_line_map( + self, + include_end: bool = True, + blark_lineno: int = 1, + ) -> tuple[str, dict[int, int]]: + line_to_file_line = {} + result = [] + for part in self.parts: + code, inner_line_map = part.get_code_and_line_map( + include_end=include_end, + blark_lineno=blark_lineno, + ) + if code: + result.append(code) + line_to_file_line.update(inner_line_map) + blark_lineno = max(line_to_file_line) + 1 + + return "\n".join(result), line_to_file_line
+ + +
+[docs] + def get_filenames(self) -> set[pathlib.Path]: + return { + line.filename + for part in self.parts + for line in part.lines + if line.filename is not None + }
+
+ + + +Handler = Callable[ + [pathlib.Path], List[Union[BlarkSourceItem, BlarkCompositeSourceItem]] +] + + +handlers: Dict[str, Callable] = {} + + +
+[docs] +class UnsupportedFileFormatError(Exception): + ...
+ + + +
+[docs] +def register_input_handler(extension: str, handler: Handler): + handlers[extension.lower()] = handler
+ + + +
+[docs] +def load_file_by_name( + filename: AnyPath, + input_format: Optional[str] = None, +) -> list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]: + """ + Load a file using blark's file input handlers. + + Parameters + ---------- + filename : pathlib.Path or str + The filename to load. + input_format : str, optional + Optionally specify the loader to use, if auto-detection based on + filename is insufficient. This may be either the loader name (e.g., + "plain") or an equivalent filename extension (e.g., ".tcpou") + + Returns + ------- + list[BlarkSourceItem | BlarkCompositeSourceItem] + A list of items that were loaded, which may be either singular + (`BlarkSourceItem`) or composite (`BlarkCompositeSourceItem`). An + example of a composite file is a Beckhoff TwinCAT TcPOU file, which may + contain a declaration, implementation, and a number of + properties/methods/actions each with their own grammar rules). + """ + filename = pathlib.Path(filename).expanduser().resolve() + if input_format is not None: + extension = input_format.lower() + else: + extension = filename.suffix.lower() + try: + handler = handlers[extension] + except KeyError: + raise UnsupportedFileFormatError( + f"Unable to find a handler for {filename} based on file extension. " + f"Supported extensions: {list(handlers)}" + ) from None + + return handler(filename)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/main.html b/master/_modules/blark/main.html new file mode 100644 index 0000000..cb6d909 --- /dev/null +++ b/master/_modules/blark/main.html @@ -0,0 +1,213 @@ + + + + + + blark.main — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.main

+"""
+`blark` is the top-level command for accessing various subcommands.
+
+Try::
+
+"""
+
+import argparse
+import importlib
+import logging
+
+import blark
+
+DESCRIPTION = __doc__
+
+
+MODULES = ("parse", "format")
+
+
+def _try_import(module):
+    relative_module = f".{module}"
+    return importlib.import_module(relative_module, "blark")
+
+
+def _build_commands():
+    global DESCRIPTION
+    result = {}
+    unavailable = []
+
+    for module in sorted(MODULES):
+        try:
+            mod = _try_import(module)
+        except ImportError as ex:
+            unavailable.append((module, ex))
+        else:
+            result[module] = (mod.build_arg_parser, mod.main)
+            DESCRIPTION += f"\n    $ blark {module} --help"
+
+    if unavailable:
+        DESCRIPTION += "\n\n"
+
+        for module, ex in unavailable:
+            DESCRIPTION += (
+                f"WARNING: blark {module!r} is unavailable due to:"
+                f"\n\t{ex.__class__.__name__}: {ex}"
+            )
+
+    return result
+
+
+COMMANDS = _build_commands()
+
+
+
+[docs] +def main(): + # Console entry point in setup.py + top_parser = argparse.ArgumentParser( + prog="blark", + description=DESCRIPTION, + formatter_class=argparse.RawTextHelpFormatter, + ) + + top_parser.add_argument( + "--version", + "-V", + action="version", + version=blark.__version__, + help="Show the blark version number and exit.", + ) + + top_parser.add_argument( + "--log", + "-l", + dest="log_level", + default="INFO", + type=str, + help="Python logging level (e.g. DEBUG, INFO, WARNING)", + ) + + subparsers = top_parser.add_subparsers(help="Possible subcommands") + for command_name, (build_func, main) in COMMANDS.items(): + sub = subparsers.add_parser(command_name) + build_func(sub) + sub.set_defaults(func=main) + + args = top_parser.parse_args() + kwargs = vars(args) + log_level = kwargs.pop("log_level") + + logger = logging.getLogger("blark") + logger.setLevel(log_level) + logging.basicConfig() + + if hasattr(args, "func"): + func = kwargs.pop("func") + logger.debug("%s(**%r)", func.__name__, kwargs) + func(**kwargs) + else: + top_parser.print_help()
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/output.html b/master/_modules/blark/output.html new file mode 100644 index 0000000..6eb4d53 --- /dev/null +++ b/master/_modules/blark/output.html @@ -0,0 +1,173 @@ + + + + + + blark.output — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.output

+from __future__ import annotations
+
+import dataclasses
+import pathlib
+import typing
+from typing import Any, Callable, Dict, List, Optional, Union
+
+if typing.TYPE_CHECKING:
+    from .parse import ParseResult
+
+
+
+[docs] +@dataclasses.dataclass +class OutputBlock: + #: The (optionally modified) code to write as output. + code: str + #: Metadata to add/modify. + metadata: Dict[str, Any] = dataclasses.field(default_factory=dict) + #: The origin of the above code block. + origin: Optional[ParseResult] = None
+ + + +OutputHandler = Callable[ + [ + # The "user" object that parsed the input file. + # For now, we're assuming that all output is based on existing + # files that were parsed. + object, + # The input filename, if it exists. + Optional[pathlib.Path], + # The code the user wants to write to the file. + List[OutputBlock] + ], + # The file contents to be written. + Union[str, bytes], +] + +handlers: Dict[str, OutputHandler] = {} + + +
+[docs] +def register_output_handler(name: str, handler: OutputHandler): + handlers[name.lower()] = handler
+ + + +
+[docs] +def get_handler_by_name(name: str) -> OutputHandler: + try: + return handlers[name.lower()] + except KeyError: + available = ", ".join(sorted(handlers)) + raise ValueError( + f"Unknown output handler {name!r}. " + f"Available handlers include: {available}" + ) from None
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/parse.html b/master/_modules/blark/parse.html new file mode 100644 index 0000000..364e279 --- /dev/null +++ b/master/_modules/blark/parse.html @@ -0,0 +1,738 @@ + + + + + + blark.parse — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.parse

+"""
+`blark parse` is a command-line utility to parse TwinCAT3 source code projects
+and files.
+"""
+from __future__ import annotations
+
+import argparse
+import enum
+import json
+import logging
+import pathlib
+import sys
+import typing
+from dataclasses import dataclass
+from typing import Generator, Optional, Sequence, Type, TypeVar, Union
+
+import lark
+
+from . import solution
+from . import transform as tf
+from . import util
+from .input import BlarkCompositeSourceItem, BlarkSourceItem, load_file_by_name
+from .typing import Preprocessor
+from .util import AnyPath
+
+try:
+    import apischema
+except ImportError:
+    apischema = None
+
+if typing.TYPE_CHECKING:
+    from .summary import CodeSummary
+
+
+logger = logging.getLogger(__name__)
+
+
+DESCRIPTION = __doc__
+AnyFile = Union[str, pathlib.Path]
+
+_PARSER = None
+
+
+
+[docs] +class BlarkStartingRule(enum.Enum): + iec_source = enum.auto() + action = enum.auto() + data_type_declaration = enum.auto() + function_block_method_declaration = enum.auto() + function_block_property_declaration = enum.auto() + function_block_type_declaration = enum.auto() + function_declaration = enum.auto() + global_var_declarations = enum.auto() + interface_declaration = enum.auto() + program_declaration = enum.auto() + statement_list = enum.auto()
+ + + +
+[docs] +def new_parser(start: Optional[list[str]] = None, **kwargs) -> lark.Lark: + """ + Get a new parser for TwinCAT flavor IEC61131-3 code. + + Parameters + ---------- + **kwargs : + See :class:`lark.lark.LarkOptions`. + """ + if start is None: + start = [rule.name for rule in BlarkStartingRule] + + from . import GRAMMAR_FILENAME + return lark.Lark.open_from_package( + "blark", + GRAMMAR_FILENAME.name, + parser="earley", + maybe_placeholders=True, + propagate_positions=True, + start=start, + **kwargs, + )
+ + + +
+[docs] +def get_parser() -> lark.Lark: + """Get a cached lark.Lark parser for TwinCAT flavor IEC61131-3 code.""" + global _PARSER + + if _PARSER is None: + _PARSER = new_parser() + return _PARSER
+ + + +DEFAULT_PREPROCESSORS = tuple() + + +
+[docs] +@dataclass +class ParseResult: + source_code: str + item: BlarkSourceItem + processed_source_code: str + comments: list[lark.Token] + line_map: Optional[dict[int, int]] = None + filename: Optional[pathlib.Path] = None + exception: Optional[Exception] = None + tree: Optional[lark.Tree] = None + parent: Optional[BlarkCompositeSourceItem] = None + transformed: Optional[tf.SourceCode] = None + + @property + def identifier(self) -> Optional[str]: + if self.item is None: + return None + return self.item.identifier + +
+[docs] + def transform(self) -> tf.SourceCode: + if self.tree is None: + raise ValueError( + f"Source code was not successfully parsed; cannot transform. " + f"Exception was {type(self.exception).__name__}: {self.exception}" + ) + + if self.transformed is None: + self.transformed = tf.transform( + source_code=self.source_code, + tree=self.tree, + comments=self.comments, + line_map=self.line_map, + filename=self.filename, + ) + return self.transformed
+ + +
+[docs] + def dump_source(self, fp=sys.stdout) -> None: + if self.line_map is not None: + # NOTE: split("\n") and splitlines() differ wrt the final newline + code_lines = dict(enumerate(self.source_code.split("\n"), 1)) + for code_lineno, source_lineno in self.line_map.items(): + line = code_lines[code_lineno] + print(f"{code_lineno} ({source_lineno}) {line}", file=fp) + else: + for lineno, line in enumerate(self.source_code.splitlines(), 1): + print(f"{lineno}: {line}", file=fp)
+
+ + + +
+[docs] +def parse_source_code( + source_code: str, + *, + verbose: int = 0, + fn: AnyPath = "unknown", + preprocessors: Sequence[Preprocessor] = DEFAULT_PREPROCESSORS, + parser: Optional[lark.Lark] = None, + starting_rule: Optional[str] = None, + line_map: Optional[dict[int, int]] = None, + item: Optional[BlarkSourceItem] = None, +) -> ParseResult: + """ + Parse source code into a ``ParseResult``. + + Parameters + ---------- + source_code : str + The source code text. + + verbose : int, optional + Verbosity level for output. (deprecated) + + fn : pathlib.Path or str, optional + The filename associated with the source code. + + preprocessors : list, optional + Callable preprocessors to apply to the source code. + + parser : lark.Lark, optional + The parser instance to use. Defaults to the global shared one from + ``get_parser``. + """ + processed_source = source_code + for preprocessor in preprocessors: + processed_source = preprocessor(processed_source) + + comments, processed_source = util.find_and_clean_comments( + processed_source, + line_map=line_map, + ) + if parser is None: + parser = get_parser() + + if starting_rule is None: + # NOTE: back-compat -> default to 'iec_source' here + if "iec_source" in parser.options.start: + starting_rule = "iec_source" + else: + starting_rule = parser.options.start[0] + + if item is None: + item = BlarkSourceItem.from_code( + source_code, + grammar_rule=starting_rule, + ) + + result = ParseResult( + item=item, + source_code=source_code, + processed_source_code=processed_source, + line_map=line_map, + comments=comments, + filename=pathlib.Path(fn), + ) + + try: + result.tree = parser.parse(processed_source, start=starting_rule) + except lark.UnexpectedInput as ex: + if line_map: + ex.line = line_map.get(ex.line, ex.line) + result.exception = ex + except lark.LarkError as ex: + result.exception = ex + + return result
+ + + +
+[docs] +def parse_single_file(fn: AnyPath, **kwargs) -> ParseResult: + """Parse a single source code file.""" + source_code = util.get_source_code(fn) + return parse_source_code(source_code, fn=fn, **kwargs)
+ + + +
+[docs] +def parse_project( + tsproj_project: AnyFile, + **kwargs, +) -> Generator[ParseResult, None, None]: + """Parse an entire tsproj project file.""" + sol = solution.make_solution_from_files(tsproj_project) + for item in solution.get_blark_input_from_solution(sol): + yield from parse_item(item, **kwargs)
+ + + +
+[docs] +def parse_item( + item: Union[BlarkSourceItem, BlarkCompositeSourceItem], + **kwargs, +) -> Generator[ParseResult, None, None]: + if isinstance(item, BlarkCompositeSourceItem): + for part in item.parts: + for res in parse_item(part, **kwargs): + res.filename = res.filename or item.filename + res.parent = item + yield res + return + + code, line_map = item.get_code_and_line_map() + + try: + filename = list(item.get_filenames())[0] + except IndexError: + if not item.lines: + return + filename = None + + result = parse_source_code( + code, + starting_rule=item.grammar_rule, + line_map=line_map, + fn=filename or "unknown", + **kwargs, + ) + result.item = item + yield result
+ + + +
+[docs] +def parse( + path: AnyPath, + input_format: Optional[str] = None, + **kwargs, +) -> Generator[ParseResult, None, None]: + """ + Parse the given source code file (or all files from the given project). + """ + for item in load_file_by_name(path, input_format=input_format): + yield from parse_item(item, **kwargs)
+ + + +
+[docs] +def build_arg_parser(argparser=None): + if argparser is None: + argparser = argparse.ArgumentParser() + + argparser.description = DESCRIPTION + argparser.formatter_class = argparse.RawTextHelpFormatter + + argparser.add_argument( + "filename", + type=str, + help=( + "Path to project, solution, source code file (.tsproj, .sln, " + ".TcPOU, .TcGVL)" + ), + ) + + # TODO: may eventually do file format checking + argparser.add_argument( + "-if", + "--input-format", + required=False, + help=( + "Load the provided files as the given type, overriding built-in " + "filename extension mapping." + ), + ) + + argparser.add_argument( + "--verbose", + "-v", + action="count", + default=0, + help="Increase verbosity, up to -vvv", + ) + + argparser.add_argument( + "--print-filename", + action="store_true", + help="Print filenames along with results", + ) + + argparser.add_argument( + "--print-source", + action="store_true", + help="Dump the source code", + ) + + argparser.add_argument( + "--print-tree", + action="store_true", + help="Dump the source code tree", + ) + + argparser.add_argument( + "--debug", + action="store_true", + help="On failure, still return the results tree", + ) + + argparser.add_argument( + "-i", + "--interactive", + action="store_true", + help="Enter IPython (or Python) to explore source trees", + ) + + argparser.add_argument( + "-s", + "--summary", + dest="output_summary", + action="store_true", + help="Summarize code inputs and outputs", + ) + + argparser.add_argument( + "--json", + dest="use_json", + action="store_true", + help="Output JSON representation only", + ) + + argparser.add_argument( + "--no-meta", + action="store_false", + dest="include_meta", + help="Summarize code inputs and outputs", + ) + + argparser.add_argument( + "--filter", + nargs="*", + dest="filter_by_name", + help="Filter items to parse by name", + ) + + return argparser
+ + + +
+[docs] +def summarize( + parsed: Union[ParseResult, list[ParseResult]], + squash: bool = True, +) -> CodeSummary: + """Get a code summary instance from one or more ParseResult instances.""" + from .summary import CodeSummary + return CodeSummary.from_parse_results(parsed, squash=squash)
+ + + +T = TypeVar("T") + + +
+[docs] +def dump_json( + type_: Type[T], + obj: T, + include_meta: bool = True, + indent: Optional[int] = 2, +) -> str: + """ + Dump object ``obj`` as type ``type_`` with apischema and serialize to a string. + + Parameters + ---------- + type_ : Type[T] + The type of ``obj``. + obj : T + The object to serialize. + include_meta : bool + Include ``meta`` information in the dump. + indent : int or None + Make the JSON output prettier with indentation. + + Returns + ------- + str + """ + if apischema is None: + raise RuntimeError( + "Optional dependency apischema is required to output a JSON " + "representation of source code." + ) + + serialized = apischema.serialize( + type_, + obj, + exclude_defaults=True, + no_copy=True, + ) + if not include_meta: + serialized = util.recursively_remove_keys(serialized, {"meta"}) + return json.dumps(serialized, indent=indent)
+ + + +
+[docs] +def main( + filename: Union[str, pathlib.Path], + verbose: int = 0, + debug: bool = False, + interactive: bool = False, + output_summary: bool = False, + use_json: bool = False, + print_filename: bool = False, + print_source: bool = False, + print_tree: bool = False, + include_meta: bool = True, + filter_by_name: Optional[list[str]] = None, + input_format: Optional[str] = None, +) -> dict[str, list[ParseResult]]: + """ + Parse the given source code/project. + """ + results_by_filename = {} + filter_by_name = filter_by_name or [] + filename = pathlib.Path(filename) + + if use_json: + print_filename = False + + if apischema is None: + raise RuntimeError( + "Optional dependency apischema is required to output a JSON " + "representation of source code." + ) + + print_filename = print_filename or verbose > 1 + print_source = print_source or verbose > 1 + print_tree = print_tree or verbose > 1 + print_tracebacks = verbose > 1 + + def get_items(): + for item in load_file_by_name(filename, input_format): + if filter_by_name: + if any(flt.lower() in str(filename) for flt in filter_by_name): + logger.debug( + "Included by filter (filename match): %s (%s)", + item.identifier, + type(item), + ) + elif not any(flt.lower() in item.identifier for flt in filter_by_name): + logger.debug("Filtered out: %s (%s)", item.identifier, type(item)) + continue + else: + logger.debug("Included by filter: %s", item.identifier) + yield from parse_item(item) + + all_results = [] + try: + for index, res in enumerate(get_items(), start=1): + all_results.append(res) + results_by_filename.setdefault(str(filename), []).append(res) + if print_filename: + print(f"[{index}] Parsing {res.filename}: {res.identifier} ({res.item.type})") + + if print_source: + res.dump_source() + + if print_tree and res.tree is not None: + print(res.tree.pretty()) + + if res.exception is not None: + tb = getattr(res.exception, "traceback", None) + if print_tracebacks: + print(tb) + print( + f"Failed to parse {res.filename} {res.identifier}: " + f"Exception: {type(res.exception).__name__}: {res.exception}" + ) + if interactive: + util.python_debug_session( + namespace={"result": res}, + message=( + f"Failed to parse {res.filename} {res.identifier}.\n" + f"Exception: {type(res.exception).__name__}: {res.exception}\n" + f"{tb}" + ), + ) + + if output_summary: + # Summary comes at the end + continue + + if use_json: + assert apischema is not None + + # We allow for StatementList to be parsed directly here, though + # it's not acceptable as a top-level item in the grammar + serialized = dump_json( + tf.ExtendedSourceCode, + res.transform(), + include_meta=include_meta, + ) + print(serialized) + + except KeyboardInterrupt: + print("\nCaught KeyboardInterrupt; stopping parsing.") + + if output_summary: + summarized = summarize(all_results) + if use_json: + from .summary import CodeSummary + print(dump_json(CodeSummary, summarized, include_meta=include_meta)) + else: + print(summarized) + else: + summarized = None + + if not results_by_filename: + return {} + + results = [] + for _, items in results_by_filename.items(): + results.extend(items) + failures = [item for item in results if item.exception is not None] + + if interactive: + util.python_debug_session( + namespace={ + "results": results, + "by_filename": results_by_filename, + "failures": failures, + "summary": summarized, + }, + message=( + f"Saw {len(results_by_filename)} files with {len(results)} " + f"total source code items.\n" + f"There were {len(failures)} failures.\n" + f"Results by filename are in ``by_filename``.\n" + f"All results are also in a list ``results``.\n" + f"Any failures are included in ``failures``.\n" + ), + ) + + if failures: + print("Failed to parse some source code files:") + for failure in failures: + header = f"{failure.filename}: {failure.identifier}" + print(header) + print("-" * len(header)) + print(f"({type(failure.exception).__name__}) {failure.exception}") + print() + # traceback.print_exc() + + if not debug: + sys.exit(1) + + return results_by_filename
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/plain.html b/master/_modules/blark/plain.html new file mode 100644 index 0000000..9c7bd38 --- /dev/null +++ b/master/_modules/blark/plain.html @@ -0,0 +1,217 @@ + + + + + + blark.plain — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.plain

+"""Plain (plain text or human-readble flat structured text) file loader."""
+from __future__ import annotations
+
+import dataclasses
+import pathlib
+from typing import Any, List, Optional, Union
+
+from .input import (BlarkCompositeSourceItem, BlarkSourceItem,
+                    register_input_handler)
+from .output import OutputBlock, register_output_handler
+from .util import AnyPath, SourceType, find_pou_type_and_identifier
+
+
+
+[docs] +@dataclasses.dataclass +class PlainFileLoader: + filename: pathlib.Path + raw_source: str + source_type: SourceType = SourceType.general + identifier: Optional[str] = None + formatted_code: Optional[str] = None + +
+[docs] + def rewrite_code(self, identifier: str, code: str) -> None: + self.formatted_code = code
+ + +
+[docs] + def save_to(self, path: AnyPath) -> None: + code = self.to_file_contents() + with open(path, "wt") as fp: + print(code, file=fp)
+ + +
+[docs] + def to_file_contents(self) -> str: + if self.formatted_code is not None: + return self.formatted_code + return self.raw_source
+ + +
+[docs] + @classmethod + def load( + cls, + filename: pathlib.Path, + ) -> List[Union[BlarkSourceItem, BlarkCompositeSourceItem]]: + with open(filename, "rt") as fp: + contents = fp.read() + + source_type, identifier = find_pou_type_and_identifier(contents) + # if source_type is None: + # return [] + source_type = SourceType.general + # We'll pick the first identifier here only. IEC source (as what blark + # accepts for iput) it's allowed to have multiple declarations in the same + # file. + # TODO: If people want to use it like this, we could pre-parse the file for + # all identifiers and return a BlarkCompositeSourceItem. + # As-is, the focus is now on loading TwinCAT XML files directly. + loader = cls( + filename=filename, + identifier=identifier, + source_type=source_type, + raw_source=contents, + ) + return [ + BlarkSourceItem.from_code( + code=contents, + source_type=source_type, + identifier=identifier or "", + first_lineno=1, + user=loader, + filename=filename, + ) + ]
+ + +
+[docs] + @staticmethod + def save( + user: Any, + source_filename: Optional[pathlib.Path], + parts: List[OutputBlock], + ) -> str: + return "\n\n".join(part.code for part in parts)
+
+ + + +def _register(): + """Register the plain file handlers.""" + register_input_handler("plain", PlainFileLoader.load) + register_input_handler(".txt", PlainFileLoader.load) + register_input_handler(".st", PlainFileLoader.load) + + register_output_handler("plain", PlainFileLoader.save) + register_output_handler(".st", PlainFileLoader.save) + register_output_handler(".txt", PlainFileLoader.save) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/solution.html b/master/_modules/blark/solution.html new file mode 100644 index 0000000..0d306d5 --- /dev/null +++ b/master/_modules/blark/solution.html @@ -0,0 +1,2208 @@ + + + + + + blark.solution — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.solution

+"""
+``blark.solution`` - TwinCAT solution/tsproj/plcproj/source code loading helpers.
+
+
+TwinCAT source file extensions for reference:
+    .tcdut    data unit type
+    .tcgtlo   global text list object
+    .tcgvl    global variable list
+    .tcio     interface
+    .tcipo    image pool
+    .tcpou    program organization unit
+    .tcrmo    recipe manager
+    .tctlo    text list object
+    .tctto    task object
+    .tcvis    visualization
+    .tcvmo    visualization manager object
+    .tmc      module class - description of project
+    .tpy      tmc-like inter-vendor format
+    .xti      independent project file
+    .sln      Visual Studio solution
+    .tsproj   TwinCAT project
+    .plcproj  TwinCAT PLC project
+"""
+from __future__ import annotations
+
+import codecs
+import copy
+import dataclasses
+import functools
+import logging
+import pathlib
+import re
+from collections.abc import Generator
+from typing import Any, ClassVar, Optional, Union
+
+import lxml
+import lxml.etree
+
+from . import util
+from .input import (BlarkCompositeSourceItem, BlarkSourceItem, BlarkSourceLine,
+                    register_input_handler)
+from .output import OutputBlock, register_output_handler
+from .typing import ContainsBlarkCode, Self
+from .util import AnyPath, Identifier, SourceType
+
+logger = logging.getLogger(__name__)
+
+
+_solution_project_regex = re.compile(
+    (
+        r"^Project\("
+        r'"(?P<solution_guid>.*)"'
+        r"\)"
+        r"\s*=\s*"
+        r'"(?P<project_name>.*?)"'
+        r"\s*,\s*"
+        r'"(?P<project_path>.*?)"'
+        r"\s*,\s*"
+        r'"(?P<project_guid>.*?)"'
+        r"\s*$"
+    ),
+    re.MULTILINE,
+)
+
+
+TcHandlers = Union[
+    "TcDUT",
+    "TcTTO",
+    "TcPOU",
+    "TcIO",
+    "TcGVL",
+    "Solution",
+]
+
+
+
+[docs] +class SolutionLoaderError(Exception): + """Solution loader-related exception base class."""
+ + + +
+[docs] +class UnsupportedSourceFileError(SolutionLoaderError): + """ + Unsupported project file. + + blark does not support loading of these compilable items: + 1. GlobalTextList + 2. Any other non-structured text source code files + """ + + type: Optional[str] = None + +
+[docs] + def __init__(self, msg: str, type: Optional[str] = None): + self.type = type + super().__init__(msg)
+
+ + + +
+[docs] +@functools.lru_cache(maxsize=2048) +def strip_xml_namespace(tag: str) -> str: + """Strip off {{namespace}} from: {{namespace}}tag.""" + return lxml.etree.QName(tag).localname
+ + + +
+[docs] +def split_property_and_base_decl(code: str) -> tuple[str, str]: + lines = code.splitlines() + base_decl = [] + for idx, line in enumerate(lines): + if line.lower().startswith("property "): + base_decl = "\n".join(lines[:idx + 1]) + decl = "\n".join(lines[idx + 1:]) + return base_decl, decl + return "", code
+ + + +
+[docs] +def strip_implicit_lines(code: str, source_type: SourceType) -> str: + """Strip off (e.g.) END_FUNCTION_BLOCK the provided code.""" + implicit_end = source_type.get_implicit_block_end() + if not implicit_end or not code: + return code + + # Don't think too hard about this; blark appends this consistently. + # We shouldn't have to do more than this, I think. Reformatting tools + # should be careful around the implicit lines. + lines = list(code.splitlines()) + # NOTE: switched actions to statement_list + # if source_type == SourceType.action: + # if lines[0].startswith("ACTION "): + # lines.pop(0) + + if lines[-1] == implicit_end: + lines.pop(-1) + return "\n".join(lines)
+ + + +
+[docs] +def parse_xml_file(fn: AnyPath) -> lxml.etree.Element: + """Parse a given XML file with lxml.etree.parse.""" + fn = util.fix_case_insensitive_path(fn) + + with open(fn, "rb") as f: + tree = lxml.etree.parse(f) + + return tree.getroot()
+ + + +
+[docs] +def parse_xml_contents(contents: Union[bytes, str]) -> lxml.etree.Element: + """Parse the given XML contents with lxml.etree.""" + if isinstance(contents, str): + contents = contents.encode("utf-8") + return lxml.etree.fromstring(contents)
+ + + +
+[docs] +def projects_from_solution_source( + solution_source: Union[str, bytes], + root: pathlib.Path, + encoding: str = "utf-8", +) -> Generator[Project, None, None]: + """ + Find project filenames from the contents of a solution. + + Parameters + ---------- + solution_source : str + The solution (.sln) file source. + root : pathlib.Path + The root path to look for project files. + """ + if isinstance(solution_source, bytes): + solution_source = solution_source.decode(encoding) + + for match in _solution_project_regex.finditer(solution_source): + group = match.groupdict() + path = pathlib.PureWindowsPath(group["project_path"]) + try: + local_path = util.fix_case_insensitive_path(root / path) + except FileNotFoundError: + local_path = None + logger.debug( + "Unable to find local file while loading projects from solution: %s", + path, + ) + + yield Project( + name=group["project_name"], + saved_path=path, + local_path=local_path, + guid=group["project_guid"], + solution_guid=group["solution_guid"], + )
+ + + +
+[docs] +def filename_from_xml(xml: Optional[lxml.etree.Element]) -> Optional[pathlib.Path]: + if xml is None: + return None + + if hasattr(xml, "getroot"): # TODO -> switch to isinstance + root = xml.getroot() + elif hasattr(xml, "getroottree"): + root = xml.getroottree() + else: + raise ValueError(f"Unexpected type: {type(xml)}") + + if root.docinfo.URL is None: + return None + url = str(root.docinfo.URL) + if url.startswith("file:/"): + # Note: this only seems to be necessary on Windows and I'm not entirely sure why + url = url[len("file:/"):] + return pathlib.Path(url)
+ + + +
+[docs] +def get_child_text( + xml: lxml.etree.Element, + tag: str, + namespace: Optional[str] = None, + namespaces: Optional[dict[str, str]] = None, + default: Optional[str] = None, +) -> Optional[str]: + namespace = f"{namespace}:" if namespace else "" + elements = xml.xpath(f"{namespace}{tag}", namespaces=namespaces) + try: + return elements[0].text + except IndexError: + return default
+ + + +
+[docs] +def get_child_located_text( + xml: lxml.etree.Element, + tag: str, + namespace: Optional[str] = None, + namespaces: Optional[dict[str, str]] = None, + filename: Optional[pathlib.Path] = None, +) -> Optional[LocatedString]: + namespace = f"{namespace}:" if namespace else "" + elements = xml.xpath(f"{namespace}{tag}", namespaces=namespaces) + try: + return LocatedString( + filename=filename, + lineno=elements[0].sourceline, + value=elements[0].text, + ) + except IndexError: + return None
+ + + +
+[docs] +@dataclasses.dataclass +class LocatedString: + filename: Optional[pathlib.Path] + lineno: int = 0 + value: str = "" + column: int = 0 + +
+[docs] + def to_lines(self) -> list[BlarkSourceLine]: + return BlarkSourceLine.from_code( + self.value, + first_lineno=self.lineno, + filename=self.filename, + )
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcDeclImpl: + identifier: str + filename: Optional[pathlib.Path] + source_type: Optional[SourceType] + declaration: Optional[LocatedString] + implementation: Optional[LocatedString] + parent: Optional[TcSource] = None + metadata: Optional[dict[str, Any]] = None + +
+[docs] + def rewrite_code(self, identifier: str, contents: str): + if self.source_type is not None: + contents = strip_implicit_lines(contents, self.source_type) + + ident = Identifier.from_string(identifier) + if ident.decl_impl == "declaration": + if self.declaration is None: + self.declaration = LocatedString(filename=self.filename) + self.declaration.value = contents + elif ident.decl_impl == "implementation": + if self.implementation is None: + self.implementation = LocatedString(filename=self.filename) + self.implementation.value = contents + else: + raise ValueError( + f"Unexpected rewrite portion: {identifier} ({ident.decl_impl})" + )
+ + +
+[docs] + def declaration_to_blark(self) -> Optional[BlarkSourceItem]: + if self.source_type is None: + return None + + if self.declaration is None: + return None + + return BlarkSourceItem( + identifier=f"{self.identifier}/declaration", + type=self.source_type, + lines=self.declaration.to_lines(), + grammar_rule=self.source_type.get_grammar_rule(), + implicit_end=self.source_type.get_implicit_block_end(), + user=self.parent or self, + )
+ + +
+[docs] + def implementation_to_blark(self) -> Optional[BlarkSourceItem]: + if self.source_type is None: + return None + if self.implementation is None: + return None + + # TODO: statement_list in the grammar cannot be empty. We + # pre-filter the implementation to ensure that it has some code. + # If this affects how you're using blark, feel free to open an issue + # and we can resolve it. + if not util.remove_all_comments(self.implementation.value).strip(): + return None + + return BlarkSourceItem( + identifier=f"{self.identifier}/implementation", + type=self.source_type, + lines=self.implementation.to_lines(), + grammar_rule=SourceType.statement_list.name, + implicit_end=SourceType.statement_list.get_implicit_block_end(), + user=self.parent or self, + )
+ + +
+[docs] + def to_blark(self) -> list[BlarkSourceItem]: + return [ + part + for part in (self.declaration_to_blark(), self.implementation_to_blark()) + if part is not None + ]
+ + + def _serialize(self, parent: lxml.etree.Element) -> None: + if self.declaration is not None: + decl = lxml.etree.Element("Declaration") + decl.text = lxml.etree.CDATA(self.declaration.value) + parent.append(decl) + + if self.implementation is not None: + impl = lxml.etree.Element("Implementation") + st = lxml.etree.Element("ST") + st.text = lxml.etree.CDATA(self.implementation.value) + impl.append(st) + parent.append(impl) + +
+[docs] + @classmethod + def from_xml( + cls: type[Self], + xml: lxml.etree.Element, + filename: Optional[pathlib.Path] = None, + default_source_type: Optional[SourceType] = None, + default_identifier: Optional[str] = None, + ) -> Self: + declaration = get_child_located_text(xml, "Declaration", filename=filename) + if declaration is not None: + source_type, identifier = util.find_pou_type_and_identifier( + declaration.value + ) + else: + source_type, identifier = None, None + + source_type = source_type or default_source_type + identifier = identifier or default_identifier + return cls( + identifier=identifier or (filename and filename.stem) or "unknown", + declaration=declaration, + # TODO: ST only supported for now + implementation=get_child_located_text( + xml, "Implementation/ST", filename=filename + ), + metadata=xml.attrib, + source_type=source_type, + filename=filename, + )
+
+ + + +
+[docs] +def get_tcplc_from_xml( + xml: lxml.etree.Element, +) -> Optional[lxml.etree.Element]: + try: + return xml.xpath("/TcPlcObject")[0] + except IndexError: + return None
+ + + +
+[docs] +def get_code_object_from_xml( + xml: lxml.etree.Element, +) -> tuple[Optional[type[TcSource]], Optional[lxml.etree.Element]]: + tcplc_object = get_tcplc_from_xml(xml) + if tcplc_object is not None: + cls_to_xpath = { + TcDUT: TcDUT._tag, + TcGVL: TcGVL._tag, + TcPOU: TcPOU._tag, + TcIO: TcIO._tag, + TcTTO: TcTTO._tag, + } + + for cls, xpath in cls_to_xpath.items(): + items = tcplc_object.xpath(xpath) + if items: + return cls, items[0] + + return None, None
+ + + +
+[docs] +@dataclasses.dataclass +class TcSource: + _tag: ClassVar[str] = "" # TODO: set in subclass + name: str + guid: str + decl: TcDeclImpl + metadata: dict[str, str] + filename: Optional[pathlib.Path] + parent: Optional[TwincatSourceCodeItem] + xml: dataclasses.InitVar[lxml.etree.Element | None] = None + source_type: Optional[SourceType] = None + default_source_type: ClassVar[Optional[SourceType]] = None + + # TODO + # @property + # def source_type(self) -> Optional[SourceType]: + # if self.decl is None: + # return None + # return self.decl.source_type + +
+[docs] + def rewrite_code(self, identifier: str, contents: str): + raise NotImplementedError( + f"Rewriting code not yet supported for {type(self)}" + )
+ + +
+[docs] + def to_file_contents(self, delimiter: str = "\r\n") -> bytes: + parent_to_file_contents = getattr(self.parent, "to_file_contents", None) + if parent_to_file_contents is not None: + # If we have a parent, we can't serialize just part of the file. + # Serialize the whole thing. + return parent_to_file_contents() + + tree = self.to_xml() + return util.tree_to_xml_source(tree, delimiter=delimiter)
+ + +
+[docs] + def to_xml(self) -> lxml.etree.Element: + md = dict(self.metadata) + plc_obj = lxml.etree.Element("TcPlcObject") + plc_obj.attrib["Version"] = md.pop("version", "") + plc_obj.attrib["ProductVersion"] = md.pop("product_version", "") + primary = lxml.etree.Element(self._tag) + plc_obj.append(primary) + self._serialize(primary) + primary.attrib.update(md) + return plc_obj
+ + + def _serialize(self, primary: lxml.etree.Element): + primary.attrib["Name"] = self.name + primary.attrib["Id"] = self.guid + if self.decl is not None: + self.decl._serialize(primary) + +
+[docs] + @staticmethod + def from_xml( + xml: lxml.etree.Element, + filename: Optional[pathlib.Path] = None, + parent: Optional[TwincatSourceCodeItem] = None, + ) -> Union[TcDUT, TcTTO, TcPOU, TcIO, TcGVL]: + tcplc_object = get_tcplc_from_xml(xml) + if tcplc_object is None: + plc_attribs = {} + else: + plc_attribs = tcplc_object.attrib + + source_cls, item = get_code_object_from_xml(xml) + if source_cls is None or item is None: + try: + child_type = xml.getchildren()[0].tag + except Exception: + child_type = "unknown" + raise UnsupportedSourceFileError( + f"Unsupported xml type for TcSource in " + f"{filename_from_xml(xml)}: {xml.tag}/{child_type} " + f"(parent={parent})", + type=child_type, + ) + + metadata = dict(item.attrib) + metadata["version"] = plc_attribs.get("Version", "") + metadata["product_version"] = plc_attribs.get("ProductVersion", "") + + decl = TcDeclImpl.from_xml( + item, + filename=filename, + default_identifier=filename.stem if filename else None, + default_source_type=source_cls.default_source_type, + ) + + source = source_cls( + filename=filename or filename_from_xml(xml), + name=metadata.pop("Name", ""), + guid=metadata.pop("Id", ""), + decl=decl, + metadata=metadata, + parent=parent, + xml=xml, + source_type=decl.source_type, + ) + # TODO annotations + assert isinstance(source, (TcDUT, TcTTO, TcPOU, TcIO, TcGVL)) + source.decl.parent = source + return source
+ + +
+[docs] + @classmethod + def from_contents( + cls: type[Self], + contents: bytes, + filename: Optional[pathlib.Path] = None, + parent: Optional[TcSource] = None, + ) -> Union[TcDUT, TcPOU, TcIO, TcTTO, TcGVL]: + return cls.from_xml( + parse_xml_contents(contents), + filename=filename, + parent=parent, + )
+ + +
+[docs] + @classmethod + def from_filename( + cls: type[Self], + filename: AnyPath, + parent: Optional[TcSource] = None, + ) -> Union[TcDUT, TcPOU, TcIO, TcTTO, TcGVL]: + with open(filename, "rb") as fp: + raw_contents = fp.read() + return cls.from_contents(raw_contents, filename=pathlib.Path(filename), parent=parent)
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcDUT(TcSource): + _tag: ClassVar[str] = "DUT" + file_extension: ClassVar[str] = ".TcDUT" + default_source_type: ClassVar[SourceType] = SourceType.dut + +
+[docs] + def rewrite_code(self, identifier: str, contents: str): + contents = strip_implicit_lines( + contents, + source_type=self.source_type, + ) + + return self.decl.rewrite_code(identifier, contents)
+ + +
+[docs] + def to_blark(self) -> list[BlarkCompositeSourceItem]: + if self.decl is None: + return [] + + res = self.decl.to_blark() + for item in res: + item.user = self + + return [ + BlarkCompositeSourceItem( + identifier=self.decl.identifier, + filename=self.filename, + parts=res, + user=self, + ) + ]
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcGVL(TcSource): + _tag: ClassVar[str] = "GVL" + file_extension: ClassVar[str] = ".TcGVL" + default_source_type: ClassVar[SourceType] = SourceType.var_global + +
+[docs] + def rewrite_code(self, identifier: str, contents: str): + # TODO: need to not save the implicit end line + return self.decl.rewrite_code(identifier, contents)
+ + +
+[docs] + def to_blark(self) -> list[BlarkCompositeSourceItem]: + if self.decl is None: + return [] + + res = self.decl.to_blark() + for item in res: + item.user = self + return [ + BlarkCompositeSourceItem( + identifier=self.decl.identifier, + filename=self.filename, + parts=res, + user=self, + ) + ]
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcIO(TcSource): + """TcIO file - for INTERFACE definitions.""" + + _tag: ClassVar[str] = "Itf" + file_extension: ClassVar[str] = ".TcIO" + default_source_type: ClassVar[SourceType] = SourceType.interface + + parts: list[Union[TcMethod, TcProperty, TcUnknownXml]] = dataclasses.field( + default_factory=list + ) + + def __post_init__(self, xml: Optional[lxml.etree.Element]) -> None: + if xml is None: + return + _, item = get_code_object_from_xml(xml) + self.parts = [ + self.create_source_child_from_xml( + child, + filename=self.filename, + parent=self, + ) + for child in item.iterchildren() + if child.tag not in ("Declaration", "Implementation") + ] + +
+[docs] + def to_blark(self) -> list[Union[BlarkCompositeSourceItem, BlarkSourceItem]]: + if self.source_type is None: + raise RuntimeError("No source type set?") + + parts = [] + + if self.decl is not None: + identifier = self.decl.identifier + parts.extend(self.decl.to_blark()) + else: + identifier = None + + for part in self.parts: + if isinstance(part, ContainsBlarkCode): + for item in part.to_blark(): + if identifier: + item.identifier = f"{identifier}.{item.identifier}" + item.user = self + parts.append(item) + elif not isinstance(part, (TcExtraInfo, TcUnknownXml)): + raise NotImplementedError( + f"TcPOU portion {type(part)} not yet implemented" + ) + + return [ + BlarkCompositeSourceItem( + filename=self.filename, + identifier=self.decl.identifier if self.decl is not None else "unknown", + parts=parts, + user=self, + ) + ]
+ + + def _serialize(self, primary: lxml.etree.Element) -> None: + super()._serialize(primary) + for part in self.parts: + if isinstance(part, (TcUnknownXml, TcExtraInfo)): + primary.append(copy.deepcopy(part.xml)) + else: + part_tag = lxml.etree.Element(part._tag) + part._serialize(part_tag) + primary.append(part_tag) + +
+[docs] + @classmethod + def create_source_child_from_xml( + cls, + child: lxml.etree.Element, + parent: TcSource, + filename: Optional[pathlib.Path] = None, + ) -> Union[TcAction, TcMethod, TcProperty, TcExtraInfo, TcUnknownXml]: + if child.tag == "Action": + return TcAction.from_xml(child, filename=filename, parent=parent) + if child.tag == "Method": + return TcMethod.from_xml(child, filename=filename, parent=parent) + if child.tag == "Property": + return TcProperty.from_xml(child, filename=filename, parent=parent) + if child.tag in ("Folder", "LineIds"): + return TcExtraInfo.from_xml(child, parent=parent) + return TcUnknownXml(child, parent=parent)
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcTTO(TcSource): + _tag: ClassVar[str] = "Task" + file_extension: ClassVar[str] = ".TcTTO" + xml: Optional[lxml.etree.Element] = None + +
+[docs] + def to_blark(self) -> list[Union[BlarkCompositeSourceItem, BlarkSourceItem]]: + return []
+ + + def _serialize(self, primary: lxml.etree.Element) -> None: + primary.getparent().replace(primary, self.xml)
+ + + +SupportedPOUPart = Union["TcAction", "TcMethod", "TcProperty"] +POUPart = Union[SupportedPOUPart, "TcUnknownXml"] + + +
+[docs] +@dataclasses.dataclass +class TcPOU(TcSource): + _tag: ClassVar[str] = "POU" + file_extension: ClassVar[str] = ".TcPOU" + parts: list[POUPart] = dataclasses.field(default_factory=list) + + def __post_init__(self, xml: Optional[lxml.etree.Element]) -> None: + if xml is None: + return + + _, item = get_code_object_from_xml(xml) + self.parts = [ + self.create_source_child_from_xml( + child, + filename=self.filename, + parent=self, + ) + for child in item.iterchildren() + if child.tag not in ("Declaration", "Implementation") + ] + + @property + def parts_by_name(self) -> dict[str, SupportedPOUPart]: + return { + part.name: part + for part in self.parts + if isinstance(part, (TcAction, TcMethod, TcProperty)) + } + +
+[docs] + def get_child_by_identifier( + self, identifier: str + ) -> Union[SupportedPOUPart, TcDeclImpl]: + ident = Identifier.from_string(identifier) + if len(ident.parts) < 1: + raise ValueError("Empty identifier") + + if ident.parts[0] != self.name: + raise ValueError( + f"Unexpected identifier to rewrite for POU {self.name}: " + f"{ident.parts[0]} ({ident.decl_impl})" + ) + + if len(ident.parts) == 1: + return self.decl + + parts = ident.parts[1:] + name = parts[0] + return self.parts_by_name[name]
+ + +
+[docs] + def rewrite_code(self, identifier: str, contents: str): + # TODO: need to not save the implicit end line + part = self.get_child_by_identifier(identifier) + return part.rewrite_code(identifier, contents)
+ + +
+[docs] + def to_blark(self) -> list[Union[BlarkCompositeSourceItem, BlarkSourceItem]]: + if self.source_type is None: + raise RuntimeError("No source type set?") + + parts = [] + + if self.decl is not None: + identifier = self.decl.identifier + parts.extend(self.decl.to_blark()) + else: + identifier = None + + for part in self.parts: + if isinstance(part, ContainsBlarkCode): + for item in part.to_blark(): + if identifier: + item.identifier = f"{identifier}.{item.identifier}" + item.user = self + parts.append(item) + elif not isinstance(part, (TcExtraInfo, TcUnknownXml)): + raise NotImplementedError( + f"TcPOU portion {type(part)} not yet implemented" + ) + + return [ + BlarkCompositeSourceItem( + filename=self.filename, + identifier=self.decl.identifier if self.decl is not None else "unknown", + parts=parts, + user=self, + ) + ]
+ + + def _serialize(self, primary: lxml.etree.Element) -> None: + super()._serialize(primary) + for part in self.parts: + if isinstance(part, (TcUnknownXml, TcExtraInfo)): + primary.append(copy.deepcopy(part.xml)) + else: + part_tag = lxml.etree.Element(part._tag) + part._serialize(part_tag) + primary.append(part_tag) + +
+[docs] + @classmethod + def create_source_child_from_xml( + cls, + child: lxml.etree.Element, + parent: TcSource, + filename: Optional[pathlib.Path] = None, + ) -> Optional[Union[TcAction, TcMethod, TcProperty, TcExtraInfo, TcUnknownXml]]: + if child.tag == "Action": + return TcAction.from_xml(child, filename=filename, parent=parent) + if child.tag == "Method": + return TcMethod.from_xml(child, filename=filename, parent=parent) + if child.tag == "Property": + return TcProperty.from_xml(child, filename=filename, parent=parent) + if child.tag in ("Folder", "LineIds"): + return TcExtraInfo.from_xml(child, parent=parent) + return TcUnknownXml(child, parent=parent)
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcSourceChild(TcSource): + parent: Optional[TcSource] = None + + def _serialize(self, parent: lxml.etree.Element) -> None: + super()._serialize(parent) + parent.attrib.update(self.metadata or {}) + +
+[docs] + @classmethod + def from_xml( + cls: type[Self], + xml: lxml.etree.Element, + filename: Optional[pathlib.Path] = None, + parent: Optional[TcSource] = None, + ) -> Self: + metadata = dict(xml.attrib) + decl = TcDeclImpl.from_xml(xml, filename=filename) + source = cls( + filename=filename or filename_from_xml(xml), + name=metadata.pop("Name", ""), + guid=metadata.pop("Id", ""), + decl=decl, + metadata=metadata, + parent=parent, + xml=xml, + ) + source.decl.parent = source + return source
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcMethod(TcSourceChild): + _tag: ClassVar[str] = "Method" + +
+[docs] + def rewrite_code(self, identifier: str, contents: str): + return self.decl.rewrite_code(identifier, contents)
+ + +
+[docs] + def to_blark(self) -> list[Union[BlarkCompositeSourceItem, BlarkSourceItem]]: + if self.decl.declaration is None: + return [] + res = self.decl.to_blark() + for item in res: + # item.identifier = f"{self.name}/{item.identifier}" + item.user = self + return res
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcAction(TcSourceChild): + _tag: ClassVar[str] = "Action" + +
+[docs] + def rewrite_code(self, identifier: str, contents: str): + # TODO: need to not save the implicit end line + # self.decl.implementation.value = contents + ident = Identifier.from_string(identifier) + ident.decl_impl = "implementation" + return self.decl.rewrite_code(ident.to_string(), contents)
+ + +
+[docs] + def to_blark(self) -> list[Union[BlarkCompositeSourceItem, BlarkSourceItem]]: + if self.decl is None or self.decl.implementation is None: + return [] + + if not util.remove_all_comments(self.decl.implementation.value).strip(): + return [] + + # Actions have no declaration section; the implementation just has + # a statement list + lines = self.decl.implementation.to_lines() + return [ + BlarkSourceItem( + identifier=self.name, + lines=lines, + type=SourceType.action, + grammar_rule=SourceType.action.get_grammar_rule(), + implicit_end=SourceType.action.get_implicit_block_end(), + user=self.parent or self, + ) + ]
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcProperty(TcSourceChild): + _tag: ClassVar[str] = "Property" + + get: Optional[TcDeclImpl] = None + set: Optional[TcDeclImpl] = None + + def __post_init__(self, xml: Optional[lxml.etree.Element]) -> None: + if xml is None: + return + + try: + get_section = xml.xpath("Get")[0] + except IndexError: + get = None + else: + get = TcDeclImpl.from_xml(get_section, filename=self.filename) + get.source_type = SourceType.property_get + + try: + set_section = xml.xpath("Set")[0] + except IndexError: + set = None + else: + set = TcDeclImpl.from_xml(set_section, filename=self.filename) + set.source_type = SourceType.property_set + + self.get = get + self.set = set + +
+[docs] + def rewrite_code(self, identifier: str, contents: str): + ident = Identifier.from_string(identifier) + get_or_set: Optional[TcDeclImpl] = getattr(self, ident.parts[-1]) + if get_or_set is None: + # get_or_set = TcDeclImpl(identifier=identifier) + # setattr(self, get_or_set, ident.parts[-1], get_or_set) + raise NotImplementedError("Empty get/set (TODO)") + + contents = strip_implicit_lines( + contents, + source_type=SourceType.property, + ) + # TODO: move this out + if ident.decl_impl == "declaration": + base_decl, contents = split_property_and_base_decl(contents) + if base_decl: + self.decl.rewrite_code("/declaration", base_decl) + + return get_or_set.rewrite_code(identifier, contents)
+ + +
+[docs] + def to_blark(self) -> list[Union[BlarkCompositeSourceItem, BlarkSourceItem]]: + try: + base_decl: BlarkSourceItem = self.decl.to_blark()[0] + except IndexError: + # The top-level Declaration holds the first line - ``PROPERTY name`` + # If it's not there, we don't have a property to use. + return [] + + property_ident = Identifier.from_string(base_decl.identifier) + + parts = [] + for get_or_set, obj in (("get", self.get), ("set", self.set)): + if obj is None: + continue + + decl = obj.declaration_to_blark() + # Note: the parent will add on the FB name + if decl is not None: + parts.append( + BlarkSourceItem( + identifier=Identifier( + parts=[*property_ident.parts, get_or_set], + decl_impl="declaration", + ).to_string(), + type=SourceType.property, + lines=base_decl.lines + decl.lines, + grammar_rule=SourceType.property.get_grammar_rule(), + implicit_end="END_PROPERTY", + user=self.parent or self, + ) + ) + + impl = obj.implementation_to_blark() + if impl is not None: + parts.append( + BlarkSourceItem( + identifier=Identifier( + parts=[*property_ident.parts, get_or_set], + decl_impl="implementation", + ).to_string(), + type=SourceType.property, + lines=impl.lines, + grammar_rule=SourceType.statement_list.get_grammar_rule(), + implicit_end="", + user=self.parent or self, + ) + ) + + return parts
+ + + def _serialize(self, parent: lxml.etree.Element) -> None: + super()._serialize(parent) + if self.get is not None: + get = lxml.etree.Element("Get") + parent.append(get) + self.get._serialize(get) + get.attrib.update(self.get.metadata or {}) + + if self.set is not None: + set = lxml.etree.Element("Set") + parent.append(set) + self.set._serialize(set) + set.attrib.update(self.set.metadata or {})
+ + + +
+[docs] +@dataclasses.dataclass +class TcExtraInfo: + """ + Extra information in the project XML such as Line IDs. + + blark supports getting the metadata from the file but does not dig any + deeper. + """ + metadata: dict[str, str] + xml: lxml.etree.Element + parent: TcSource + +
+[docs] + @classmethod + def from_xml( + cls: type[Self], + xml: lxml.etree.Element, + parent: TcSource, + ) -> Self: + return cls(metadata=xml.attrib, xml=xml, parent=parent)
+
+ + + +
+[docs] +@dataclasses.dataclass +class TcUnknownXml: + """A currently unsupported block of XML in the project.""" + xml: lxml.etree.Element + parent: TcSource + +
+[docs] + def to_blark(self) -> list[BlarkSourceItem]: + return []
+
+ + + +
+[docs] +@dataclasses.dataclass +class TwincatSourceCodeItem: + """ + A wrapper for all TwinCAT project source code files. + + Information from the project may be stored here alongside that of the + source code file itself. The contents of the source code file are + stored in ``contents``, with ``raw_contents`` holding raw bytes from + the file. + """ + #: The path according to the solution:r likely a Windows-formatted path + #: which is case-insensitive. + saved_path: pathlib.PurePath + #: The corresponding local filename. + local_path: Optional[pathlib.Path] + #: The subtype of the file. + subtype: Optional[str] + #: Link always set? + link_always: bool + #: Raw file contents. + raw_contents: bytes + #: Contents loaded into a type-specific class. + contents: Union[TcDUT, TcPOU, TcIO, TcGVL, TcTTO] + #: The globally unique identifier for the source code item. + guid: Optional[str] = None + #: The parent project, if applicable. + parent: Optional[TwincatPlcProject] = None + +
+[docs] + def to_file_contents(self, delimiter: str = "\r\n") -> bytes: + if self.contents is None: + raise ValueError( + f"No contents to save (file not found on host for {self.saved_path})" + ) + + tree = self.contents.to_xml() + return util.tree_to_xml_source(tree, delimiter=delimiter)
+ + +
+[docs] + def save_to(self, path: AnyPath, delimiter: str = "\r\n") -> None: + code = self.to_file_contents(delimiter) + with codecs.open(str(path), "w", "utf-8-sig") as fp: + fp.write(code)
+ + +
+[docs] + @classmethod + def from_compile_xml( + cls: type[Self], + xml: lxml.etree.Element, + parent: Optional[TwincatPlcProject] = None, + ) -> Optional[Self]: + saved_path = pathlib.PureWindowsPath(xml.attrib["Include"]) + try: + plcproj_filename = filename_from_xml(xml) + if plcproj_filename is None: + raise FileNotFoundError("No project filename?") + local_path = util.fix_case_insensitive_path( + plcproj_filename.parent / saved_path + ) + except FileNotFoundError: + local_path = None + raw_contents = b'' + contents = None + logger.debug( + "Unable to find local file while loading projects from solution: %s", + saved_path, + exc_info=True, + ) + else: + with open(local_path, "rb") as fp: + raw_contents = fp.read() + try: + contents = TcSource.from_contents( + raw_contents, + filename=local_path, + parent=None, + ) + except UnsupportedSourceFileError: + logger.debug( + "Unsupported source code file not loaded: %s", + local_path, + exc_info=True, + ) + return None + + namespaces = {"msbuild": xml.xpath("namespace-uri()")} + subtype = get_child_text( + xml, + "SubType", + namespace="msbuild", + namespaces=namespaces, + default="", + ) + link_always = ( + get_child_text( + xml, + "LinkAlways", + namespace="msbuild", + namespaces=namespaces, + default="false", + ) + == "true" + ) + + item = cls( + contents=contents, + guid=None, + link_always=link_always, + local_path=local_path, + raw_contents=raw_contents, + saved_path=saved_path, + subtype=subtype, + parent=parent, + ) + if contents is not None: + contents.parent = item + return item
+
+ + + +
+[docs] +@dataclasses.dataclass +class DependencyVersion: + #: Dependency name. + name: str + #: Dependency version. + version: str + #: Dependency vendor/author. + vendor: str + #: Dependency namespace name, used in code. + namespace: str + +
+[docs] + @classmethod + def from_string( + cls: type[Self], + text: str, + namespace: str, + ) -> Self: + library_name, version_and_vendor = text.split(",", 1) + version, vendor = version_and_vendor.strip().split("(", 1) + vendor = vendor.rstrip(")") + version = version.strip() + return cls( + name=library_name, + version=version, + vendor=vendor, + namespace=namespace, + )
+
+ + + +
+[docs] +@dataclasses.dataclass +class DependencyInformation: + #: The dependency name. + name: str + #: The default version information. + default: Optional[DependencyVersion] = None + #: The resolved version information. + resolution: Optional[DependencyVersion] = None + +
+[docs] + @classmethod + def from_xml( + cls: type[Self], + references: list[lxml.etree.Element], + resolutions: list[lxml.etree.Element], + xmlns: Optional[dict[str, str]] = None, + ) -> dict[str, Self]: + by_name = {} + for ref in references: + try: + name = ref.attrib["Include"] + res = ref.xpath("msbuild:DefaultResolution", namespaces=xmlns)[0].text + namespace = ref.xpath("msbuild:Namespace", namespaces=xmlns)[0].text + except (KeyError, IndexError): + logger.warning( + "Incompatible dependency reference? %s", lxml.etree.tostring(ref) + ) + continue + by_name[name] = cls( + name=name, + default=DependencyVersion.from_string(res, namespace=namespace), + resolution=None, + ) + + for ref in resolutions: + try: + name = ref.attrib["Include"] + res = ref.xpath("msbuild:Resolution", namespaces=xmlns)[0].text + except (KeyError, IndexError): + logger.warning( + "Incompatible dependency reference? %s", lxml.etree.tostring(ref) + ) + continue + try: + namespace = by_name[name].default.namespace + except KeyError: + # Unclear if we can infer the namespace without a default here. + # Let's default to just its name. + by_name[name] = DependencyInformation(name=name) + namespace = name + + by_name[name].resolution = DependencyVersion.from_string( + res, namespace=namespace + ) + return by_name
+
+ + + +
+[docs] +@dataclasses.dataclass +class TwincatPlcProject: + """ + A TwinCAT PLC project. + + This typically corresponds to a single ``.plcproj`` file. + """ + + file_extension: ClassVar[str] = ".plcproj" + #: The globally unique identifier for the tsproj. + guid: str + #: Path to an XTI file for the project. + xti_path: Optional[pathlib.Path] + #: The PLC Project - plcproj - path. + plcproj_path: Optional[pathlib.Path] + #: plcproj-defined properties (name, project build, etc.) + properties: dict[str, str] + #: Dependencies for the PLC project. + dependencies: dict[str, DependencyInformation] + #: Source code parts which blark can extract information from. + sources: list[TwincatSourceCodeItem] + +
+[docs] + @classmethod + def from_standalone_xml( + cls: type[Self], + tsproj_or_xti_xml: Optional[lxml.etree.Element], + plcproj_xml: lxml.etree.Element, + ) -> Self: + """ + Load a PLC project from standalone XML code. + + Parameters + ---------- + tsproj_or_xti_xml : Optional[lxml.etree.Element] + lxml-loaded .tsproj or .xti contents. + plcproj_xml : lxml.etree.Element + lxml-loaded .plcproj contents. + + Returns + ------- + Self + [TODO:description] + """ + namespaces = {"msbuild": plcproj_xml.xpath("namespace-uri()")} + properties = { + strip_xml_namespace(element.tag): element.text + for element in plcproj_xml.xpath( + "/msbuild:Project/msbuild:PropertyGroup/msbuild:*", + namespaces=namespaces, + ) + } + dependencies = DependencyInformation.from_xml( + plcproj_xml.xpath( + "/msbuild:Project/msbuild:ItemGroup/msbuild:PlaceholderReference", + namespaces=namespaces, + ), + plcproj_xml.xpath( + "/msbuild:Project/msbuild:ItemGroup/msbuild:PlaceholderResolution", + namespaces=namespaces, + ), + xmlns=namespaces, + ) + plc_project = cls( + guid=properties.get("ProjectGuid", ""), + xti_path=filename_from_xml(tsproj_or_xti_xml), + plcproj_path=filename_from_xml(plcproj_xml), + sources=[], + properties=properties, + dependencies=dependencies, + ) + sources = [ + TwincatSourceCodeItem.from_compile_xml(xml, parent=plc_project) + for xml in plcproj_xml.xpath( + "/msbuild:Project/msbuild:ItemGroup/msbuild:Compile", + namespaces=namespaces, + ) + ] + plc_project.sources = [source for source in sources if source is not None] + return plc_project
+ + + @property + def name(self) -> Optional[str]: + """The project name.""" + return self.properties.get("Name", None) + +
+[docs] + @classmethod + def from_filename( + cls: type[Self], + filename: pathlib.Path, + ) -> Self: + """ + Load a plcproj from its filename. + + Parameters + ---------- + filename : pathlib.Path + + Returns + ------- + Self + """ + plcproj = parse_xml_file(filename) + return cls.from_standalone_xml(None, plcproj)
+ + +
+[docs] + @classmethod + def from_xti_filename(cls: type[Self], xti_filename: pathlib.Path) -> Self: + """ + Load a .plcproj from its XTI contents. + + Parameters + ---------- + xti_filename : pathlib.Path + XTI filename. + + Returns + ------- + Self + """ + xti = parse_xml_file(xti_filename) + (project,) = xti.xpath("/TcSmItem/Project") + prj_file_path = pathlib.PureWindowsPath(project.attrib.get("PrjFilePath")) + + plcproj_path = util.fix_case_insensitive_path( + xti_filename.parent / prj_file_path + ) + plcproj = parse_xml_file(plcproj_path) + return cls.from_standalone_xml(xti, plcproj)
+ + +
+[docs] + @classmethod + def from_project_xml( + cls: type[Self], + xml: lxml.etree.Element, + root: pathlib.Path, + ) -> Self: + """ + Load a plcproj from the tsproj itself. + + The loading procedure typically happens in the following order: + + Solution -> tsproj -> xti -> plcproj + + Parameters + ---------- + xml : lxml.etree.Element + root : pathlib.Path + The root path to load files from the project. + + Returns + ------- + Self + """ + file = xml.attrib.get("File", None) + if file is not None: + # The PLC project is saved externally in ``xti_filename``. + plc_filename = pathlib.Path(file) + xti_filename = root / "_Config" / "PLC" / plc_filename + return cls.from_xti_filename(xti_filename=xti_filename) + + project_file_path = xml.attrib.get("PrjFilePath") + if project_file_path is None: + raise RuntimeError( + f"Unsupported project saving format; neither 'File' nor 'PrjFilePath' " + f"is present in the XML attributes of {xml.tag}" + ) + + # The PLC project settings are partly saved in the tsproj file; the rest + # will come from the .plcproj (as part of PlcProjPath). + xml_filename = filename_from_xml(xml) + plcproj_parent = xml_filename.parent if xml_filename is not None else root + plcproj_path = util.fix_case_insensitive_path( + plcproj_parent / pathlib.PureWindowsPath(project_file_path) + ) + plcproj = parse_xml_file(plcproj_path) + return cls.from_standalone_xml(xml, plcproj)
+
+ + + +
+[docs] +def get_project_guid(element: lxml.etree.Element) -> str: + """ + Get a project target GUID from its xml. + + Parameters + ---------- + element : lxml.etree.Element + + Returns + ------- + str + """ + try: + proj = element.xpath("/TcSmProject/Project")[0] + except IndexError: + return "" + + return proj.attrib.get("ProjectGUID", "")
+ + + +
+[docs] +def get_project_target_netid(element: lxml.etree.Element) -> str: + """ + Get a project target AMS Net ID from its xml. + + Parameters + ---------- + element : lxml.etree.Element + + Returns + ------- + str + """ + try: + proj = element.xpath("/TcSmProject/Project")[0] + except IndexError: + return "" + + return proj.attrib.get("TargetNetId", "")
+ + + +
+[docs] +@dataclasses.dataclass +class TwincatTsProject: + """ + Container for a loaded TwinCAT tsproj project. + + This is typically instantiated after the `Solution` parser generates a + `Project` instance. This contains information about the target PLC and all + loaded PLC projects. + """ + file_extension: ClassVar[str] = ".tsproj" + #: The globally unique identifier for the tsproj. + guid: str + #: The AMS Net ID of the target PLC. + netid: str + #: The path to this project on disk. + path: Optional[pathlib.Path] + #: PLC projects (.plcproj) part of this tsproj. + plcs: list[TwincatPlcProject] + + @property + def plcs_by_name(self) -> dict[str, TwincatPlcProject]: + """ + A dictionary of PLCs by name. + + Returns + ------- + dict[str, TwincatPlcProject] + """ + return {plc.name: plc for plc in self.plcs if plc.name is not None} + +
+[docs] + @classmethod + def from_xml( + cls: type[Self], + tsproj: lxml.etree.Element, + root: pathlib.Path, + filename: Optional[pathlib.Path] = None, + ) -> Self: + """ + Load a tsproj project from its XML source. + + Parameters + ---------- + xml : lxml.etree.Element + filename : pathlib.Path + + Returns + ------- + TwincatTsProject + """ + plcs = [ + TwincatPlcProject.from_project_xml(plc_project, root=root) + for plc_project in tsproj.xpath("/TcSmProject/Project/Plc/Project") + ] + + return cls( + path=filename, + guid=get_project_guid(tsproj), + netid=get_project_target_netid(tsproj), + plcs=plcs, + )
+ + +
+[docs] + @classmethod + def from_filename(cls, filename: pathlib.Path) -> Self: + """ + Load a tsproj project from its filename. + + Parameters + ---------- + filename : pathlib.Path + + Returns + ------- + TwincatTsProject + """ + root = filename.resolve().absolute().parent + tsproj = parse_xml_file(filename) + return cls.from_xml(tsproj, filename=filename, root=root)
+
+ + + +
+[docs] +@dataclasses.dataclass +class Project: + """ + A stub container for a TwinCAT project (.tsproj) file. + + This only contains metadata about the tsproj and allows for full project + loading by way of `.load()`. + """ + #: The project name. + name: str + #: The path according to the solution:r likely a Windows-formatted path + #: which is case-insensitive. + saved_path: pathlib.PurePath + #: The corresponding local filename. + local_path: Optional[pathlib.Path] + #: The globally unique identifier for the project. + guid: str + #: The unique identifier for the solution. + solution_guid: str + #: The loaded project. + loaded: Optional[TwincatTsProject] = None + +
+[docs] + @classmethod + def from_filename(cls: type[Self], filename: AnyPath) -> Self: + """ + Create a stub project loader from the given filename. + + Parameters + ---------- + filename : AnyPath + + Returns + ------- + Project + """ + filename = pathlib.Path(filename) + if filename.suffix.lower() in (".plcproj",): + plc = TwincatPlcProject.from_filename(filename) + loaded = TwincatTsProject( + guid="", + netid="", + path=None, + plcs=[plc], + ) + else: + loaded = TwincatTsProject.from_filename(filename) + return cls( + name=filename.name, # TODO + solution_guid="", # TODO + saved_path=filename, # TODO + local_path=filename, + guid=loaded.guid, + loaded=loaded, + )
+ + +
+[docs] + def load(self) -> TwincatTsProject: + """Load the project into a `TwincatTsProject`.""" + if self.loaded is not None: + return self.loaded + + if self.local_path is None: + raise FileNotFoundError( + f"File from project settings not found: {self.saved_path}" + ) + + if self.local_path.suffix.lower() in (".tsproj",): + self.loaded = TwincatTsProject.from_filename(self.local_path) + return self.loaded + + raise NotImplementedError(f"Format not yet supported: {self.local_path.suffix}")
+
+ + + +
+[docs] +@dataclasses.dataclass +class Solution: + """A container for a TwinCAT/Visual Studio solution (.sln).""" + + file_extension: ClassVar[str] = ".sln" + root: pathlib.Path + projects: list[Project] + filename: Optional[pathlib.Path] = None + + @property + def projects_by_name(self) -> dict[str, Project]: + return {project.name: project for project in self.projects} + +
+[docs] + @classmethod + def from_projects( + cls: type[Self], + root: pathlib.Path, + projects: list[pathlib.Path], + ) -> Self: + return cls( + root=root, + filename=None, + projects=[Project.from_filename(proj) for proj in projects], + )
+ + +
+[docs] + @classmethod + def from_contents( + cls: type[Self], + solution_source: str, + root: pathlib.Path, + filename: Optional[pathlib.Path] = None, + ) -> Self: + return cls( + root=root, + filename=filename, + projects=list(projects_from_solution_source(solution_source, root=root)), + )
+ + +
+[docs] + @classmethod + def from_filename(cls: type[Self], filename: AnyPath) -> Self: + filename = pathlib.Path(filename).expanduser().resolve() + with open(filename, "rt") as f: + solution_source = f.read() + return cls.from_contents( + solution_source=solution_source, + root=filename.parent, + filename=filename, + )
+
+ + + +
+[docs] +def make_solution_from_files(filename: AnyPath) -> Solution: + """ + From a TwinCAT solution (.sln) or .tsproj, get a Solution instance. + + Returns + ------- + Solution + """ + abs_path = pathlib.Path(filename).resolve() + if abs_path.suffix.lower() == ".sln": + return Solution.from_filename(abs_path) + + return Solution.from_projects(root=abs_path.parent, projects=[abs_path])
+ + + +
+[docs] +def twincat_file_loader( + filename: pathlib.Path, +) -> list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]: + """ + Load a single TwinCAT file based on its extension. + + Parameters + ---------- + filename : pathlib.Path + + Returns + ------- + list[Union[BlarkSourceItem, BlarkCompositeSourceItem]] + """ + # TODO: consider checking more than file extension here... + suffix = filename.suffix.lower() + if suffix == Solution.file_extension: + return solution_loader(filename) + + if suffix in { + TwincatTsProject.file_extension, + TwincatPlcProject.file_extension, + }: + return project_loader(filename) + + source = TcSource.from_filename(filename) + return source.to_blark()
+ + + +
+[docs] +def get_blark_input_from_solution( + solution: Solution, +) -> list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]: + """ + Get all blark input from the given solution. + + Parameters + ---------- + solution : Solution + + Returns + ------- + list[Union[BlarkSourceItem, BlarkCompositeSourceItem]] + """ + all_source = [] + for project in solution.projects: + project = project.load() + for plc in project.plcs: + for source in plc.sources: + all_source.append(source) + + inputs = [] + for item in all_source: + if item.contents is not None: + inputs.extend(item.contents.to_blark()) + return inputs
+ + + +
+[docs] +def project_loader( + filename: pathlib.Path, +) -> list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]: + """ + Load a TwinCAT project (.tsproj) file. + + Parameters + ---------- + filename : pathlib.Path + The project filename. + + Returns + ------- + list[Union[BlarkSourceItem, BlarkCompositeSourceItem]] + """ + solution = Solution.from_projects(filename.parent, [filename]) + return get_blark_input_from_solution(solution)
+ + + +
+[docs] +def solution_loader( + filename: pathlib.Path, +) -> list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]: + """ + Load a TwinCAT solution (.sln) file. + + Parameters + ---------- + filename : pathlib.Path + The solution filename. + + Returns + ------- + list[Union[BlarkSourceItem, BlarkCompositeSourceItem]] + """ + solution = Solution.from_filename(filename) + return get_blark_input_from_solution(solution)
+ + + +
+[docs] +def twincat_file_writer( + user: TcHandlers, + source_filename: Optional[pathlib.Path], + parts: list[OutputBlock], +) -> bytes: + """ + Write source code + + Parameters + ---------- + user : TcHandler + The user handler that loaded all the files. + source_filename : Optional[pathlib.Path] + The source filename associatied with all code blocks + parts : list[OutputBlock] + The output blocks to write. + + Returns + ------- + bytes + The contents of the file to write. + """ + if not isinstance(user, TcSource): + raise ValueError( + "Sorry, blark only supports writing files in the same output " + "format as input format currently." + ) + + for part in parts: + if part.origin is None: + raise ValueError( + "New code not originally based on existing code from a " + "TwinCAT project is not yet supported" + ) + + logger.debug( + "Rewriting code from %s %s", + source_filename, + part.origin.item.identifier, + ) + user.rewrite_code(part.origin.item.identifier, part.code) + + # TODO xml with utf-8-sig? + return user.to_file_contents()
+ + + +register_input_handler("twincat", twincat_file_loader) +register_input_handler(TcPOU.file_extension, twincat_file_loader) +register_input_handler(TcGVL.file_extension, twincat_file_loader) +register_input_handler(TcIO.file_extension, twincat_file_loader) +register_input_handler(TcDUT.file_extension, twincat_file_loader) +register_input_handler(Solution.file_extension, twincat_file_loader) +register_input_handler(TwincatTsProject.file_extension, twincat_file_loader) +register_input_handler(TwincatPlcProject.file_extension, twincat_file_loader) + +register_output_handler("twincat", twincat_file_writer) +register_output_handler(TcPOU.file_extension, twincat_file_writer) +register_output_handler(TcGVL.file_extension, twincat_file_writer) +register_output_handler(TcIO.file_extension, twincat_file_writer) +register_output_handler(TcDUT.file_extension, twincat_file_writer) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/sphinxdomain.html b/master/_modules/blark/sphinxdomain.html new file mode 100644 index 0000000..7a5680a --- /dev/null +++ b/master/_modules/blark/sphinxdomain.html @@ -0,0 +1,860 @@ + + + + + + blark.sphinxdomain — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.sphinxdomain

+from __future__ import annotations
+
+import dataclasses
+import logging
+import pathlib
+import typing
+import warnings
+from typing import (Any, ClassVar, Dict, Generator, Iterable, List, Optional,
+                    Tuple, Type, Union)
+
+import docutils.parsers.rst.directives as rst_directives
+import sphinx
+import sphinx.application
+import sphinx.environment
+from docutils import nodes
+from sphinx import addnodes
+from sphinx.directives import ObjectDescription
+from sphinx.domains import Domain, Index, ObjType
+from sphinx.locale import _ as l_
+from sphinx.roles import XRefRole
+from sphinx.util.docfields import Field, GroupedField
+from sphinx.util.nodes import make_refnode
+from sphinx.util.typing import OptionSpec
+
+from . import parse, summary, util
+
+logger = logging.getLogger(__name__)
+
+if typing.TYPE_CHECKING:
+    from sphinx.builders import Builder
+
+
+MODULE_PATH = pathlib.Path(__file__).parent.resolve()
+STATIC_PATH = MODULE_PATH / "docs"
+DEFAULT_CSS_FILE = STATIC_PATH / "blark_default.css"
+
+
+
+[docs] +@dataclasses.dataclass +class BlarkSphinxCache: + cache: Dict[pathlib.Path, summary.CodeSummary] = dataclasses.field( + default_factory=dict + ) + _instance_: ClassVar[BlarkSphinxCache] + +
+[docs] + @staticmethod + def instance(): + if not hasattr(BlarkSphinxCache, "_instance_"): + BlarkSphinxCache._instance_ = BlarkSphinxCache() + return BlarkSphinxCache._instance_
+ + +
+[docs] + def find_by_name(self, name: str) -> summary.CodeSummaryType: + for item in self.cache.values(): + obj = item.find(name) + if obj is not None: + return obj + + raise KeyError(f"{name!r} not found")
+ + +
+[docs] + def configure(self, app: sphinx.application.Sphinx, config) -> None: + + def parse_verbose(filename: pathlib.Path) -> list[parse.ParseResult]: + result = [] + for res in parse.parse(filename): + logger.warning("-> %s: %r", res.filename, res.identifier) + result.append(res) + return result + + for filename in config.blark_projects: + logger.warning("Loading %s...", filename) + parsed = parse_verbose(filename) + logger.debug("Parsed %s into %d objects", filename, len(parsed)) + self.cache[filename] = summary.CodeSummary.from_parse_results(parsed)
+
+ + + +
+[docs] +class BlarkDirective(ObjectDescription[Tuple[str, str]]): + # From SphinxRole: + #: The role name actually used in the document. + name: str + #: A string containing the entire interpreted text input. + rawtext: str + #: The interpreted text content. + text: str + #: The line number where the interpreted text begins. + lineno: int + #: The ``docutils.parsers.rst.states.Inliner`` object. + # inliner: Inliner + #: A dictionary of directive options for customization ("role" directive). + options: Dict + #: A list of strings, the directive content for customization ("role" directive). + content: List[str] + + # From ObjectDescription: + doc_field_types: List[Field] = [] + domain: Optional[str] = None + objtype: Optional[str] = None + indexnode: addnodes.index = addnodes.index() + + # Customizing ObjectDescription: + has_content: ClassVar[bool] = True + required_arguments: ClassVar[int] = 1 + optional_arguments: ClassVar[int] = 0 + final_argument_whitespace: ClassVar[bool] = True + doc_field_types = [] + option_spec: ClassVar[OptionSpec] = { + "noblocks": rst_directives.flag, + "nolinks": rst_directives.flag, + "nosource": rst_directives.flag, + "noindex": rst_directives.flag, + "noindexentry": rst_directives.flag, + "canonical": rst_directives.unchanged, + "annotation": rst_directives.unchanged, + }
+ + + +
+[docs] +def declaration_to_signature( + signode: addnodes.desc_signature, + obj: summary.DeclarationSummary, + *, + env: Optional[sphinx.environment.BuildEnvironment] = None, +): + if env is not None: + signode["ids"] = [obj.qualified_name] + signode["docname"] = env.docname + signode["qualified_name"] = obj.qualified_name + env.domaindata["bk"]["declaration"].setdefault(obj.qualified_name, []).append( + signode + ) + yield addnodes.desc_sig_name(obj.name, obj.name) + yield addnodes.desc_sig_punctuation(text=" : ") + yield addnodes.pending_xref( + obj.base_type, nodes.Text(obj.type), refdomain="bk", + reftype="type", reftarget=obj.base_type + )
+ + + +
+[docs] +def declaration_to_content( + obj: summary.DeclarationSummary, +) -> Generator[nodes.paragraph, None, None]: + if obj.value: + default = nodes.paragraph(text="Default: ") + default += addnodes.literal_strong(text=str(obj.value)) + yield default + + if obj.location: + location = nodes.paragraph( + text=f"Linkable {obj.location_type}: " + ) + location += addnodes.literal_strong(text=str(obj.location)) + yield location + + for comment in obj.comments: + yield nodes.paragraph(comment, text=util.remove_comment_characters(comment))
+ + + +
+[docs] +def declarations_to_block( + declarations: Iterable[summary.DeclarationSummary], + *, + env: Optional[sphinx.environment.BuildEnvironment] = None, +) -> Generator[addnodes.desc, None, None]: + # These nodes translate into the following in html: + # desc -> dl + # desc_signature -> dt + # desc_content -> dd + # So: + # desc + # -> desc_signature + # -> desc_sig_name, desc_sig_punctuation, etc. + # -> desc_content + # -> paragraph, etc. + for decl in declarations: + desc = addnodes.desc(classes=["declaration"]) + signode = addnodes.desc_signature() + signode += declaration_to_signature(signode, decl, env=env) + + decl_info = addnodes.desc_content() + decl_info += declaration_to_content(decl) + + desc += signode + desc += decl_info + + yield desc
+ + + +
+[docs] +class DeclarationDirective(BlarkDirective): + block_header: str + obj: summary.DeclarationSummary + +
+[docs] + def handle_signature( + self, + sig: str, + signode: addnodes.desc_signature, + ) -> Tuple[str, str]: + # def transform_content(self, contentnode: addnodes.desc_content) -> None: + func = self.env.ref_context["bk:function"] + variable = sig + self.obj = func.declarations[variable] + signode += declaration_to_signature(signode, self.obj, env=self.env) + return sig, func.name
+ + +
+[docs] + def transform_content(self, contentnode: addnodes.desc_content) -> None: + contentnode += declaration_to_content(self.obj)
+
+ + + +
+[docs] +class VariableBlockDirective(BlarkDirective): + block_header: str + parent_name: str + declarations: Optional[List[summary.DeclarationSummary]] + +
+[docs] + def handle_signature( + self, sig: str, signode: addnodes.desc_signature + ) -> Tuple[str, str]: + self.block_header = sig.upper() + func = self.env.ref_context.get("bk:function", None) + if func is None: + self.declarations = None + return "", "" + + self.parent_name = func.name + self.declarations = list(func.declarations_by_block[self.block_header].values()) + signode += addnodes.desc_name( + text=self.block_header, classes=["variable_block", self.block_header] + ) + signode.classes = ["variable_block"] + return self.block_header, ""
+ + +
+[docs] + def transform_content(self, contentnode: addnodes.desc_content) -> None: + if not self.env.ref_context.get("bk:function", None): + return + if self.declarations: + contentnode += declarations_to_block(self.declarations, env=self.env)
+
+ + + +def _build_table_from_lists( + table_data: List[List[nodes.Node]], + col_widths: List[int], + *, + header_rows: int = 1, + stub_columns: int = 0, +) -> nodes.table: + """Create a docutils table from a list of elements.""" + table = nodes.table() + tgroup = nodes.tgroup(cols=len(col_widths)) + table += tgroup + for col_width in col_widths: + colspec = nodes.colspec(colwidth=col_width) + if stub_columns: + colspec.attributes["stub"] = 1 + stub_columns -= 1 + tgroup += colspec + + def _to_row(row: List[nodes.Node]) -> nodes.row: + row_node = nodes.row() + for cell in row: + entry = nodes.entry() + entry += cell + row_node += entry + return row_node + + rows = list(_to_row(row) for row in table_data) + if header_rows: + thead = nodes.thead() + thead += rows[:header_rows] + tgroup += thead + + tbody = nodes.tbody() + tbody += rows[header_rows:] + tgroup += tbody + return table + + +def _to_link_table( + parent_name: str, + decls: Iterable[summary.DeclarationSummary], +) -> nodes.table: + def decl_items() -> Generator[List[nodes.Node], None, None]: + for decl in sorted(decls, key=lambda decl: decl.name): + paragraph = nodes.paragraph() + paragraph += addnodes.pending_xref( + decl.qualified_name, + nodes.Text(decl.name), + refdomain="bk", + reftype="declaration", + reftarget=decl.qualified_name, + ) + yield [paragraph, nodes.Text(decl.location or "")] + + return _build_table_from_lists( + table_data=[ + [nodes.Text("Name"), nodes.Text("Link")], + *decl_items() + ], + col_widths=[50, 50], + header_rows=1 + ) + + +
+[docs] +class MissingDeclaration: + name: str + declarations: dict + declarations_by_block: dict + source_code: str + +
+[docs] + def __init__(self, name: str): + self.declarations = {} + self.declarations_by_block = {} + self.name = name + self.source_code = f"(Missing item: {name})"
+
+ + + +
+[docs] +class BlarkDirectiveWithDeclarations(BlarkDirective): + obj: Union[ + summary.FunctionSummary, + summary.FunctionBlockSummary, + MissingDeclaration, + ] + doc_field_types = [ + GroupedField( + "declaration", + label=l_("VAR"), + names=("declaration", ), + rolename="declaration", + can_collapse=True, + ), + # GroupedField( + # "variable_block", + # label=l_("VAR"), + # names=("variable_block", "var", ), + # rolename="variable_block", + # typerolename="variable_block", + # typenames=("variable_block", "var"), + # can_collapse=True, + # ), + ] + +
+[docs] + def handle_signature( + self, + sig: str, + signode: addnodes.desc_signature, + ) -> Tuple[str, str]: + """Transform a signature/object into RST nodes.""" + try: + self.obj = BlarkSphinxCache.instance().find_by_name(sig) + except KeyError: + self.obj = MissingDeclaration(sig) + logger.error( + "Could not find object: %r (signatures unsupported)", sig + ) + raise ValueError(f"Code object not found: {sig!r}") + + self.env.ref_context["bk:function"] = self.obj + + signode["ids"] = [sig] + signode["docname"] = self.env.docname + signode["qualified_name"] = sig + domain_data = self.env.domaindata["bk"][self.signature_prefix.lower()] + domain_data.setdefault(sig, []).append(signode) + sig_prefix = self.get_signature_prefix(sig) + signode += addnodes.desc_annotation(str(sig_prefix), '', *sig_prefix) + signode += addnodes.desc_name(self.obj.name, self.obj.name) + + paramlist = addnodes.desc_parameterlist("paramlist") + + for block in ("VAR_INPUT", "VAR_IN_OUT", "VAR_OUTPUT", "STRUCT"): + decls = self.obj.declarations_by_block.get(block, {}) + for variable, decl in decls.items(): + node = addnodes.desc_parameter() + # node += addnodes.desc_sig_operator('', '*') + node += addnodes.desc_type("", decl.type) + node += addnodes.desc_sig_space() + node += addnodes.desc_sig_name("", variable) + if block == "VAR_OUTPUT": + node += addnodes.desc_sig_punctuation(text="=>") + + paramlist += node + + signode += paramlist + + if getattr(self.obj, "return_type", None) is not None: + signode += addnodes.desc_returns() + signode += addnodes.desc_type(text=self.obj.return_type) + + prefix = "" + return sig, prefix
+ + +
+[docs] + def before_content(self) -> None: + self.env.ref_context['bk:obj'] = self.obj
+ + + def _get_links(self) -> Generator[addnodes.desc, None, None]: + """Get the linkable inputs/outputs as sphinx nodes.""" + linkable = summary.get_linkable_declarations( + self.obj.declarations.values() + ) + for attr in ("input", "output", "memory"): + decls = getattr(linkable, attr, []) + if decls: + block_desc = addnodes.desc(classes=["linkable"]) + name = { + "input": "Inputs", + "output": "Outputs", + "memory": "Memory", + }[attr] + sig = addnodes.desc_signature( + classes=[f"linkable_{attr}"], + ids=[f"{self.obj.name}._linkable_{attr}_"], + ) + sig += addnodes.desc_name(text=f"Linkable {name}") + block_desc += sig + + block_desc += _to_link_table(self.obj.name, decls) + yield block_desc + + def _get_basic_variable_blocks(self) -> Generator[addnodes.desc, None, None]: + """Get the usual input/output variable blocks as sphinx nodes.""" + blocks = ("VAR_INPUT", "VAR_IN_OUT", "VAR_OUTPUT", "VAR_GLOBAL") + if isinstance(self.obj, summary.ProgramSummary): + blocks += ("VAR", ) + + for block in blocks: + decls = self.obj.declarations_by_block.get(block, {}) + if not decls: + continue + + block_desc = addnodes.desc() + block_desc += addnodes.desc_name( + text=block, classes=["variable_block", block] + ) + block_contents = addnodes.desc_content() + block_contents += declarations_to_block(decls.values(), env=self.env) + + block_desc += block_contents + yield block_desc + + def _get_source(self) -> Generator[nodes.container, None, None]: + """Get the usual input/output variable blocks as sphinx nodes.""" + yield nodes.container( + "", + nodes.literal_block(self.obj.source_code, self.obj.source_code), + classes=["plc_source"], + ) + +
+[docs] + def transform_content(self, contentnode: addnodes.desc_content) -> None: + if "nolinks" not in self.options: + contentnode += self._get_links() + + if "noblocks" not in self.options: + contentnode += self._get_basic_variable_blocks() + + if "nosource" not in self.options: + contentnode += self._get_source() + + if "noindexentry" not in self.options: + self._add_index_entries()
+ + + def _add_index_entries(self): + self.indexnode["entries"].append( + ("single", self.obj.name, self.obj.name, "", None) + ) + + linkable = summary.get_linkable_declarations(self.obj.declarations.values()) + for attr in ("input", "output", "memory"): + decls = getattr(linkable, attr, []) + for decl in decls: + self.indexnode["entries"].append( + ("single", f"{decl.name} ({self.obj.name} {attr})", + decl.qualified_name, "", None) + ) + +
+[docs] + def get_signature_prefix(self, sig: str) -> List[nodes.Node]: + return [ + addnodes.desc_sig_keyword(text=self.signature_prefix), + ]
+
+ + + +
+[docs] +class FunctionDirective(BlarkDirectiveWithDeclarations): + obj: summary.FunctionSummary + signature_prefix: ClassVar[str] = "FUNCTION" + doc_field_types = list(BlarkDirectiveWithDeclarations.doc_field_types) + [ + Field( + "returntype", + label=l_("Return type"), + has_arg=False, + names=("rtype",), + bodyrolename="obj", + ), + ]
+ + + +
+[docs] +class FunctionBlockDirective(BlarkDirectiveWithDeclarations): + obj: summary.FunctionBlockSummary + signature_prefix: ClassVar[str] = "FUNCTION_BLOCK"
+ + + +
+[docs] +class TypeDirective(BlarkDirectiveWithDeclarations): + obj: summary.DataTypeSummary + signature_prefix: ClassVar[str] = "TYPE"
+ + + +
+[docs] +class ProgramDirective(BlarkDirectiveWithDeclarations): + obj: summary.ProgramSummary + signature_prefix: ClassVar[str] = "PROGRAM"
+ + + +
+[docs] +class GvlDirective(BlarkDirectiveWithDeclarations): + obj: summary.GlobalVariableSummary + signature_prefix: ClassVar[str] = "GVL"
+ + + +
+[docs] +class BlarkXRefRole(XRefRole): + +
+ + + +
+[docs] +class BlarkDomain(Domain): + """ + Blark IEC61131-3 language domain. + """ + name = "bk" + label = "Blark" + object_types: ClassVar[Dict[str, ObjType]] = { + "declaration": ObjType(l_("declaration"), "declaration"), + "function": ObjType(l_("function"), l_("func")), + "function_block": ObjType(l_("functionblock"), l_("function_block"), l_("fb")), + "gvl": ObjType(l_("gvl"), "global_variable_list"), + "module": ObjType(l_("module"), "mod"), + "program": ObjType(l_("program"), ), + "source_code": ObjType(l_("source_code"), "plc_source"), + "type": ObjType(l_("type"), "type"), + "variable_block": ObjType(l_("variable_block"), "var"), + } + + directives: ClassVar[Dict[str, Type[BlarkDirective]]] = { + "declaration": DeclarationDirective, + "function": FunctionDirective, + "function_block": FunctionBlockDirective, + "gvl": GvlDirective, + "program": ProgramDirective, + "type": TypeDirective, + "variable_block": VariableBlockDirective, + } + + roles: Dict[str, BlarkXRefRole] = { + "declaration": BlarkXRefRole(), + "fb": BlarkXRefRole(fix_parens=False), + "function": BlarkXRefRole(fix_parens=False), + "function_block": BlarkXRefRole(fix_parens=False), + "gvl": BlarkXRefRole(fix_parens=False), + "mod": BlarkXRefRole(), + "program": BlarkXRefRole(fix_parens=False), + "type": BlarkXRefRole(), + } + + initial_data: ClassVar[Dict[str, Dict[str, Any]]] = { + "action": {}, + "declaration": {}, + "function": {}, + "function_block": {}, + "gvl": {}, + "method": {}, + "module": {}, + "program": {}, + "type": {}, + } + indices: List[Index] = [ + # BlarkModuleIndex, + ] + +
+[docs] + def find_obj( + self, + rolename: str, + node: nodes.Node, + targetstring: str, + ): + for typename, objtype in self.object_types.items(): + if rolename in objtype.roles: + break + else: + return [] + # TODO: scoping? + # parent_obj = self.env.ref_context.get("bk:function", None) + # print("scope", parent_obj, rolename, node) + domaindata = self.env.domaindata["bk"][typename] + # print("scope", rolename, node, list(domaindata)) + return domaindata.get(targetstring, [])
+ + +
+[docs] + def resolve_xref( + self, + env: sphinx.environment.BuildEnvironment, + fromdocname: str, + builder: Builder, + typ: str, + target: str, + node: addnodes.pending_xref, + contnode: nodes.Element, + ) -> nodes.reference: + matches = self.find_obj(typ, node, target) + if not matches: + warnings.warn(f"No target found for cross-reference: {target}") + return None + if len(matches) > 1: + options = ", ".join(match["qualified_name"] for match in matches) + warnings.warn( + f"More than one target found for cross-reference " + f"{target!r}: {options}", + ) + match = matches[0] + return make_refnode( + builder, + fromdocname, + match["docname"], + match["qualified_name"], + contnode, + target, + )
+ + +
+[docs] + def clear_doc(self, docname: str) -> None: + for name in self.initial_data: + for name, methods in self.env.domaindata["bk"][name].items(): + to_delete = [] + for idx, method in enumerate(methods): + if method["docname"] == docname: + to_delete.insert(0, idx) + for idx in to_delete: + methods.pop(idx)
+
+ + + +def _initialize_domain(app: sphinx.application.Sphinx, config) -> None: + """Callback function for 'config-inited'.""" + cache = BlarkSphinxCache.instance() + cache.configure(app, config) + + +
+[docs] +def setup(app: sphinx.application.Sphinx) -> None: + # These are the configuration settings in ``conf.py``: + app.add_config_value("blark_projects", [], "html") + app.add_config_value("blark_signature_show_type", True, "html") + + app.add_domain(BlarkDomain) + app.connect("config-inited", _initialize_domain)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/summary.html b/master/_modules/blark/summary.html new file mode 100644 index 0000000..15fa1d0 --- /dev/null +++ b/master/_modules/blark/summary.html @@ -0,0 +1,1605 @@ + + + + + + blark.summary — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.summary

+from __future__ import annotations
+
+import collections
+import logging
+import pathlib
+import textwrap
+from dataclasses import dataclass, field, fields, is_dataclass
+from typing import Any, Dict, Generator, Iterable, List, Optional, Tuple, Union
+
+import lark
+
+from . import transform as tf
+from .parse import ParseResult
+from .typing import Literal
+from .util import Identifier, SourceType
+
+LocationType = Literal["input", "output", "memory"]
+
+logger = logging.getLogger(__name__)
+
+
+def _indented_outline(item: Any, indent: str = "    ") -> Optional[str]:
+    """Outline and indent the given item."""
+    text = text_outline(item)
+    if text is None:
+        return None
+    result = textwrap.indent(text, indent)
+    if "\n" in result:
+        return "\n" + result
+    return result.lstrip()
+
+
+
+[docs] +def text_outline(item: Any) -> Optional[str]: + """ + Get a generic multiline string representation of the given object. + + Attempts to include field information for dataclasses, put list items + on separate lines, and generally keep sensible indentation. + + Parameters + ---------- + item : Any + The item to outline. + + Returns + ------- + formatted : str or None + The formatted result. + """ + if item is None: + return None + + if is_dataclass(item): + result = [ + f"<{item.__class__.__name__}>" + ] + for fld in fields(item): + if fld.name in ("meta", ): + continue + value = _indented_outline(getattr(item, fld.name, None)) + if value is not None: + result.append(f"{fld.name}: {value}") + if not result: + return None + return "\n".join(result) + + if isinstance(item, (list, tuple)): + result = [] + for value in item: + value = _indented_outline(value) + if value is not None: + result.append(f"- {value.lstrip()}") + if not result: + return None + return "\n".join(result) + + if isinstance(item, dict): + result = [] + for key, value in item.items(): + value = _indented_outline(value) + if value is not None: + result.append(f"- {key}: {value}") + return "\n".join(result) + + return str(item)
+ + + +
+[docs] +@dataclass +class Summary: + """Base class for summary objects.""" + comments: List[str] + pragmas: List[str] + filename: Optional[pathlib.Path] + meta: Optional[tf.Meta] = field(repr=False) + + def __getitem__(self, _: str) -> None: + return None + + def __str__(self) -> str: + return text_outline(self) or "" + +
+[docs] + @staticmethod + def get_meta_kwargs(meta: Optional[tf.Meta]) -> Dict[str, Any]: + if meta is None: + return dict( + comments=[], + pragmas=[], + meta=None, + ) + + comments, pragmas = meta.get_comments_and_pragmas() + return dict( + comments=comments, + pragmas=pragmas, + meta=meta, + )
+
+ + + +
+[docs] +@dataclass +class DeclarationSummary(Summary): + """Summary representation of a single declaration.""" + name: str + item: Union[ + tf.Declaration, + tf.GlobalVariableDeclaration, + tf.VariableInitDeclaration, + tf.StructureElementDeclaration, + tf.UnionElementDeclaration, + tf.ExternalVariableDeclaration, + tf.InitDeclaration, + ] + parent: Optional[str] + location: Optional[str] + block: str + base_type: str + type: str + value: Optional[str] + + def __getitem__(self, key: str) -> None: + raise KeyError(f"{self.name}[{key!r}]: declarations do not contain keys") + + @property + def qualified_name(self) -> str: + """Qualified name including parent. For example, ``fbName.DeclName``.""" + if self.parent: + return f"{self.parent}.{self.name}" + return self.name + + @property + def location_type(self) -> Optional[LocationType]: + """If located, one of {'input', 'output', 'memory"}.""" + if not self.location: + return None + + location = self.location.upper() + if location.startswith("%I"): + return "input" + if location.startswith("%Q"): + return "output" + if location.startswith("%M"): + return "memory" + return None + +
+[docs] + @classmethod + def from_declaration( + cls, + item: Union[tf.InitDeclaration, tf.StructureElementDeclaration, tf.UnionElementDeclaration], + parent: Optional[ + Union[tf.Function, tf.Method, tf.FunctionBlock, tf.StructureTypeDeclaration] + ] = None, + block_header: str = "unknown", + filename: Optional[pathlib.Path] = None, + ) -> Dict[str, DeclarationSummary]: + result = {} + + if isinstance(item, tf.StructureElementDeclaration): + result[item.name] = DeclarationSummary( + name=str(item.name), + item=item, + location=item.location.name if item.location else None, + block=block_header, + type=item.full_type_name, # TODO -> get_type_summary? + base_type=item.base_type_name, + value=str(item.value), + parent=parent.name if parent is not None else "", + filename=filename, + **Summary.get_meta_kwargs(item.meta), + ) + elif isinstance(item, tf.UnionElementDeclaration): + result[item.name] = DeclarationSummary( + name=str(item.name), + item=item, + location=None, + block=block_header, + type=item.spec.full_type_name, + base_type=item.spec.base_type_name, + value="", + parent=parent.name if parent is not None else "", + filename=filename, + **Summary.get_meta_kwargs(item.meta), + ) + elif isinstance( + item, + ( + tf.FunctionBlockNameDeclaration, + tf.FunctionBlockInvocationDeclaration, + ), + ): + for var in item.variables: + result[var] = DeclarationSummary( + name=str(var), + item=item, + location=None, + block=block_header, + type=item.init.full_type_name, + base_type=item.init.base_type_name, + value=str(item.init.value), + parent=parent.name if parent is not None else "", + filename=filename, + **Summary.get_meta_kwargs(item.meta), + ) + elif isinstance(item, tf.InitDeclaration): + for var in item.variables: + result[var.name] = DeclarationSummary( + name=str(var.name), + item=item, + location=str(var.location).replace("AT ", "") if var.location else None, + block=block_header, + type=item.init.full_type_name, + base_type=item.init.base_type_name, + value=str(item.init.value), + parent=parent.name if parent is not None else "", + filename=filename, + **Summary.get_meta_kwargs(item.meta), + ) + elif isinstance(item, tf.ExternalVariableDeclaration): + location = str(getattr(item.spec, "location", None)) + init = str(getattr(item.spec, "init", None)) + type_ = getattr(init, "full_type_name", str(item.spec)) + base_type = getattr(init, "base_type_name", str(item.spec)) + result[item.name] = DeclarationSummary( + name=str(item.name), + item=item, + location=location, + block=block_header, + type=type_, + base_type=base_type, + value="None", # TODO + parent=parent.name if parent is not None else "", + filename=filename, + **Summary.get_meta_kwargs(item.meta), + ) + else: + raise NotImplementedError(f"TODO: {type(item)}") + + return result
+ + +
+[docs] + @classmethod + def from_global_variable( + cls, + item: tf.GlobalVariableDeclaration, + parent: Optional[tf.GlobalVariableDeclarations] = None, + block_header: str = "VAR_GLOBAL", + filename: Optional[pathlib.Path] = None, + ) -> Dict[str, DeclarationSummary]: + result = {} + location = (str(item.spec.location or "").replace("AT ", "")) or None + + for var in item.spec.variables: + name = getattr(var, "name", var) + result[name] = DeclarationSummary( + name=str(name), + item=item, + location=location, + block=block_header, + type=item.full_type_name, + base_type=item.base_type_name, + value=str(item.init.value), + parent=parent.name if parent is not None else "", + filename=filename, + **Summary.get_meta_kwargs(item.meta), + ) + return result
+ + +
+[docs] + @classmethod + def from_block( + cls, + block: tf.VariableDeclarationBlock, + parent: Union[tf.Function, tf.Method, tf.FunctionBlock], + filename: Optional[pathlib.Path] = None, + ) -> Dict[str, DeclarationSummary]: + result = {} + for decl in block.items: + result.update( + cls.from_declaration( + decl, + parent=parent, + block_header=block.block_header, + filename=filename, + ) + ) + return result
+
+ + + +
+[docs] +@dataclass +class ActionSummary(Summary): + """Summary representation of a single action.""" + name: str + item: tf.Action + source_code: str + implementation: Optional[tf.StatementList] = None + + def __getitem__(self, key: str) -> None: + raise KeyError(f"{key}: Actions do not contain declarations") + +
+[docs] + @classmethod + def from_statement_list( + cls, + name: str, + statements: tf.StatementList, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> ActionSummary: + if source_code is None: + source_code = str(statements) + + return ActionSummary( + name=name, + item=tf.Action( + name=lark.Token(name, name), + body=statements, + meta=statements.meta, + ), + source_code=source_code, + filename=filename, + implementation=statements, # TODO: this is no good + **Summary.get_meta_kwargs(statements.meta), + )
+ + +
+[docs] + @classmethod + def from_action( + cls, + action: tf.Action, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> ActionSummary: + if source_code is None: + source_code = str(action) + + return ActionSummary( + name=str(action.name), + item=action, + source_code=source_code, + filename=filename, + **Summary.get_meta_kwargs(action.meta), + )
+
+ + + +
+[docs] +@dataclass +class MethodSummary(Summary): + """Summary representation of a single method.""" + name: str + item: tf.Method + return_type: Optional[str] + source_code: str + implementation: Optional[tf.StatementList] = None + declarations: Dict[str, DeclarationSummary] = field(default_factory=dict) + + def __getitem__(self, key: str) -> DeclarationSummary: + return self.declarations[key] + + @property + def declarations_by_block(self) -> Dict[str, Dict[str, DeclarationSummary]]: + result = {} + for decl in self.declarations.values(): + result.setdefault(decl.block, {})[decl.name] = decl + return result + +
+[docs] + @classmethod + def from_method( + cls, + method: tf.Method, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> MethodSummary: + if source_code is None: + source_code = str(method) + + summary = MethodSummary( + name=method.name, + item=method, + return_type=str(method.return_type) if method.return_type else None, + source_code=source_code, + filename=filename, + **Summary.get_meta_kwargs(method.meta), + ) + for decl in method.declarations: + summary.declarations.update( + DeclarationSummary.from_block(decl, parent=method, filename=filename) + ) + + return summary
+
+ + + +
+[docs] +@dataclass +class PropertyGetSetSummary(Summary): + name: str + item: tf.Property + source_code: str + declarations: Dict[str, DeclarationSummary] = field(default_factory=dict) + implementation: Optional[tf.StatementList] = None + + def __getitem__(self, key: str) -> DeclarationSummary: + return self.declarations[key]
+ + + +
+[docs] +@dataclass +class PropertySummary(Summary): + """Summary representation of a single property.""" + name: str + getter: PropertyGetSetSummary + setter: PropertyGetSetSummary + source_code: str + # implementation: Optional[tf.StatementList] = None + + def __getitem__(self, key: str): + if key == "get": + return self.getter + if key == "set": + return self.setter + raise KeyError(f"{key}: Properties do not contain declarations") + +
+[docs] + @classmethod + def from_property( + cls, + property: tf.Property, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> PropertySummary: + if source_code is None: + source_code = str(property) + + # TODO: this is broken at the moment + return PropertySummary( + name=str(property.name), + getter=PropertyGetSetSummary( + name=str(property.name), + item=property, + source_code=source_code, + filename=filename, + **Summary.get_meta_kwargs(property.meta), + ), + setter=PropertyGetSetSummary( + name=str(property.name), + item=property, + source_code=source_code, + filename=filename, + **Summary.get_meta_kwargs(property.meta), + ), + source_code=source_code, + filename=filename, + **Summary.get_meta_kwargs(property.meta), + )
+
+ + + +
+[docs] +@dataclass +class FunctionSummary(Summary): + """Summary representation of a single function.""" + name: str + item: tf.Function + return_type: Optional[str] + source_code: str + implementation: Optional[tf.StatementList] = None + declarations: Dict[str, DeclarationSummary] = field(default_factory=dict) + + def __getitem__(self, key: str) -> DeclarationSummary: + return self.declarations[key] + + @property + def declarations_by_block(self) -> Dict[str, Dict[str, DeclarationSummary]]: + result = {} + for decl in self.declarations.values(): + result.setdefault(decl.block, {})[decl.name] = decl + return result + +
+[docs] + @classmethod + def from_function( + cls, + func: tf.Function, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> FunctionSummary: + if source_code is None: + source_code = str(func) + + summary = FunctionSummary( + name=func.name, + item=func, + return_type=str(func.return_type) if func.return_type else None, + source_code=source_code, + filename=filename, + **Summary.get_meta_kwargs(func.meta), + ) + + for decl in func.declarations: + summary.declarations.update( + DeclarationSummary.from_block(decl, parent=func, filename=filename) + ) + + return summary
+
+ + + +
+[docs] +@dataclass +class FunctionBlockSummary(Summary): + """Summary representation of a single function block.""" + name: str + source_code: str + item: tf.FunctionBlock + extends: Optional[str] + squashed: bool + implementation: Optional[tf.StatementList] = None + declarations: Dict[str, DeclarationSummary] = field(default_factory=dict) + actions: List[ActionSummary] = field(default_factory=list) + methods: List[MethodSummary] = field(default_factory=list) + properties: List[PropertySummary] = field(default_factory=list) + + def __getitem__( + self, key: str + ) -> Union[DeclarationSummary, MethodSummary, PropertySummary, ActionSummary]: + if key in self.declarations: + return self.declarations[key] + for item in self.actions + self.methods + self.properties: + if item.name == key: + return item + raise KeyError(key) + + @property + def declarations_by_block(self) -> Dict[str, Dict[str, DeclarationSummary]]: + result = {} + for decl in self.declarations.values(): + result.setdefault(decl.block, {})[decl.name] = decl + return result + +
+[docs] + @classmethod + def from_function_block( + cls, + fb: tf.FunctionBlock, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> FunctionBlockSummary: + if source_code is None: + source_code = str(fb) + + summary = FunctionBlockSummary( + name=fb.name, + item=fb, + source_code=source_code, + filename=filename, + extends=fb.extends.name if fb.extends else None, + squashed=False, + **Summary.get_meta_kwargs(fb.meta), + ) + + for decl in fb.declarations: + summary.declarations.update( + DeclarationSummary.from_block(decl, parent=fb, filename=filename) + ) + + return summary
+ + +
+[docs] + def squash_base_extends( + self, function_blocks: Dict[str, FunctionBlockSummary] + ) -> FunctionBlockSummary: + """Squash the "EXTENDS" function block into this one.""" + if self.extends is None: + return self + + extends_from = function_blocks.get(str(self.extends), None) + if extends_from is None: + return self + + if extends_from.extends: + extends_from = extends_from.squash_base_extends(function_blocks) + + declarations = dict(extends_from.declarations) + declarations.update(self.declarations) + actions = list(extends_from.actions) + self.actions + methods = list(extends_from.methods) + self.methods + properties = list(extends_from.properties) + self.properties + return FunctionBlockSummary( + name=self.name, + comments=extends_from.comments + self.comments, + pragmas=extends_from.pragmas + self.pragmas, + meta=self.meta, + filename=self.filename, + source_code="\n\n".join((extends_from.source_code, self.source_code)), + item=self.item, + extends=self.extends, + declarations=declarations, + actions=actions, + methods=methods, + properties=properties, + squashed=True, + )
+
+ + + +
+[docs] +@dataclass +class InterfaceSummary(Summary): + """Summary representation of an Interfae.""" + + name: str + source_code: str + item: tf.Interface + extends: Optional[str] + squashed: bool + declarations: Dict[str, DeclarationSummary] = field(default_factory=dict) + methods: List[MethodSummary] = field(default_factory=list) + properties: List[PropertySummary] = field(default_factory=list) + # TwinCAT IDE doesn't allow for actions to be added to interfaces, it + # seems. Overlap with methods? + # actions: List[ActionSummary] = field(default_factory=list) + + def __getitem__( + self, key: str + ) -> Union[DeclarationSummary, MethodSummary, PropertySummary]: + if key in self.declarations: + return self.declarations[key] + for item in self.methods + self.properties: + if item.name == key: + return item + raise KeyError(key) + + @property + def declarations_by_block(self) -> Dict[str, Dict[str, DeclarationSummary]]: + result = {} + for decl in self.declarations.values(): + result.setdefault(decl.block, {})[decl.name] = decl + return result + +
+[docs] + @classmethod + def from_interface( + cls, + itf: tf.Interface, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> InterfaceSummary: + if source_code is None: + source_code = str(itf) + + summary = InterfaceSummary( + name=itf.name, + item=itf, + source_code=source_code, + filename=filename, + extends=itf.extends.name if itf.extends else None, + squashed=False, + **Summary.get_meta_kwargs(itf.meta), + ) + + for decl in itf.declarations: + summary.declarations.update( + DeclarationSummary.from_block(decl, parent=itf, filename=filename) + ) + + return summary
+ + +
+[docs] + def squash_base_extends( + self, interfaces: Dict[str, InterfaceSummary] + ) -> InterfaceSummary: + """Squash the "EXTENDS" INTERFACE into this one.""" + if self.extends is None: + return self + + extends_from = interfaces.get(str(self.extends), None) + if extends_from is None: + return self + + if extends_from.extends: + extends_from = extends_from.squash_base_extends(interfaces) + + declarations = dict(extends_from.declarations) + declarations.update(self.declarations) + methods = list(extends_from.methods) + self.methods + properties = list(extends_from.properties) + self.properties + return InterfaceSummary( + name=self.name, + comments=extends_from.comments + self.comments, + pragmas=extends_from.pragmas + self.pragmas, + meta=self.meta, + filename=self.filename, + source_code="\n\n".join((extends_from.source_code, self.source_code)), + item=self.item, + extends=self.extends, + declarations=declarations, + properties=properties, + methods=methods, + squashed=True, + )
+
+ + + +
+[docs] +@dataclass +class DataTypeSummary(Summary): + """Summary representation of a single data type.""" + # Note: structures only for now. + name: str + item: tf.TypeDeclarationItem + source_code: str + type: str + extends: Optional[str] + squashed: bool = False + declarations: Dict[str, DeclarationSummary] = field(default_factory=dict) + + def __getitem__(self, key: str) -> DeclarationSummary: + return self.declarations[key] + + @property + def declarations_by_block(self) -> Dict[str, Dict[str, DeclarationSummary]]: + return { + "STRUCT": self.declarations + } + +
+[docs] + @classmethod + def from_data_type( + cls, + dtype: tf.TypeDeclarationItem, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> DataTypeSummary: + if source_code is None: + source_code = str(dtype) + + if isinstance(dtype, tf.StructureTypeDeclaration): + extends = dtype.extends.name if dtype.extends else None + else: + extends = None + + summary = cls( + name=dtype.name, + item=dtype, + extends=extends, + source_code=source_code, + type=type(dtype).__name__, + filename=filename, + squashed=False, + **Summary.get_meta_kwargs(dtype.meta), + ) + + if isinstance(dtype, tf.StructureTypeDeclaration): + for decl in dtype.declarations: + summary.declarations.update( + DeclarationSummary.from_declaration( + decl, + parent=dtype, + block_header="STRUCT", + filename=filename, + ) + ) + + if isinstance(dtype, tf.UnionTypeDeclaration): + for decl in dtype.declarations: + summary.declarations.update( + DeclarationSummary.from_declaration( + decl, + parent=dtype, + block_header="UNION", + filename=filename, + ) + ) + + return summary
+ + +
+[docs] + def squash_base_extends( + self, data_types: Dict[str, DataTypeSummary] + ) -> DataTypeSummary: + """Squash the "EXTENDS" function block into this one.""" + if self.extends is None: + return self + + extends_from = data_types.get(str(self.extends), None) + if extends_from is None: + return self + + if extends_from.extends: + extends_from = extends_from.squash_base_extends(data_types) + + declarations = dict(extends_from.declarations) + declarations.update(self.declarations) + return DataTypeSummary( + name=self.name, + type=self.type, + comments=extends_from.comments + self.comments, + pragmas=extends_from.pragmas + self.pragmas, + meta=self.meta, + filename=self.filename, + source_code="\n\n".join((extends_from.source_code, self.source_code)), + item=self.item, + extends=self.extends, + declarations=declarations, + squashed=True, + )
+
+ + + +
+[docs] +@dataclass +class GlobalVariableSummary(Summary): + """Summary representation of a VAR_GLOBAL block.""" + name: str + item: tf.GlobalVariableDeclarations + source_code: str + type: str + qualified_only: bool = False + declarations: Dict[str, DeclarationSummary] = field(default_factory=dict) + + def __getitem__(self, key: str) -> DeclarationSummary: + return self.declarations[key] + + @property + def declarations_by_block(self) -> Dict[str, Dict[str, DeclarationSummary]]: + return { + "VAR_GLOBAL": self.declarations + } + +
+[docs] + @classmethod + def from_globals( + cls, + decls: tf.GlobalVariableDeclarations, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> GlobalVariableSummary: + if source_code is None: + source_code = str(decls) + + summary = GlobalVariableSummary( + name=decls.name or "(unknown)", + item=decls, + source_code=source_code, + type=type(decls).__name__, + filename=filename, + qualified_only="qualified_only" in decls.attribute_pragmas, + **Summary.get_meta_kwargs(decls.meta), + ) + + for decl in decls.items: + summary.declarations.update( + **DeclarationSummary.from_global_variable( + decl, + parent=summary, + block_header="VAR_GLOBAL", + filename=filename, + ) + ) + + return summary
+
+ + + +
+[docs] +@dataclass +class ProgramSummary(Summary): + """Summary representation of a single program.""" + name: str + source_code: str + item: tf.Program + implementation: Optional[tf.StatementList] = None + declarations: Dict[str, DeclarationSummary] = field(default_factory=dict) + actions: List[ActionSummary] = field(default_factory=list) + methods: List[MethodSummary] = field(default_factory=list) + properties: List[PropertySummary] = field(default_factory=list) + + def __getitem__(self, key: str) -> DeclarationSummary: + if key in self.declarations: + return self.declarations[key] + for item in self.actions + self.methods + self.properties: + if item.name == key: + return item + raise KeyError(key) + + @property + def declarations_by_block(self) -> Dict[str, Dict[str, DeclarationSummary]]: + result = {} + for decl in self.declarations.values(): + result.setdefault(decl.block, {})[decl.name] = decl + return result + +
+[docs] + @classmethod + def from_program( + cls, + program: tf.Program, + source_code: Optional[str] = None, + filename: Optional[pathlib.Path] = None, + ) -> ProgramSummary: + if source_code is None: + source_code = str(program) + + summary = ProgramSummary( + name=program.name, + item=program, + source_code=source_code, + filename=filename, + **Summary.get_meta_kwargs(program.meta), + ) + + for decl in program.declarations: + summary.declarations.update( + DeclarationSummary.from_block(decl, parent=program, filename=filename) + ) + + return summary
+
+ + + +
+[docs] +def path_to_file_and_line(path: List[Summary]) -> List[Tuple[pathlib.Path, int]]: + """Get the file/line number context for the summary items.""" + return [(part.filename, part.item.meta.line) for part in path]
+ + + +TopLevelCodeSummaryType = Union[ + FunctionSummary, + FunctionBlockSummary, + DataTypeSummary, + ProgramSummary, + InterfaceSummary, + GlobalVariableSummary, +] + +NestedCodeSummaryType = Union[ + DeclarationSummary, + MethodSummary, + PropertySummary, + ActionSummary, + PropertyGetSetSummary, +] + +CodeSummaryType = Union[ + TopLevelCodeSummaryType, + NestedCodeSummaryType, +] + + +
+[docs] +@dataclass +class CodeSummary: + """Summary representation of a set of code - functions, function blocks, etc.""" + functions: Dict[str, FunctionSummary] = field(default_factory=dict) + function_blocks: Dict[str, FunctionBlockSummary] = field( + default_factory=dict + ) + data_types: Dict[str, DataTypeSummary] = field(default_factory=dict) + programs: Dict[str, ProgramSummary] = field(default_factory=dict) + globals: Dict[str, GlobalVariableSummary] = field(default_factory=dict) + interfaces: Dict[str, InterfaceSummary] = field(default_factory=dict) + + def __str__(self) -> str: + attr_to_header = { + "data_types": "Data Types", + "globals": "Global Variable Declarations", + "interfaces": "Interface Declarations", + "functions": "Functions", + "function_blocks": "Function Blocks", + "programs": "Programs", + } + summary_text = [] + for attr, header in attr_to_header.items(): + name_to_obj = getattr(self, attr) + if name_to_obj: + summary_text.extend( + [ + header, + "-" * len(header), + ] + ) + + for name, obj in name_to_obj.items(): + obj_info = "\n".join( + ( + name, + "=" * len(name), + str(obj) + ) + ) + summary_text.append(textwrap.indent(obj_info, " " * 4)) + + return "\n".join(summary_text) + +
+[docs] + def find(self, name: str) -> Optional[CodeSummaryType]: + """Find a declaration or other item by its qualified name.""" + path = self.find_path(name, allow_partial=False) + return path[-1] if path else None
+ + +
+[docs] + def find_path( + self, + name: str, + allow_partial: bool = False, + ) -> Optional[List[CodeSummaryType]]: + """ + Given a qualified variable name, find the path of CodeSummary objects top-down. + + For example, a variable declared in a function block would return a + list containing the FunctionBlockSummary and then the + DeclarationSummary. + + Parameters + ---------- + name : str + The qualified ("dotted") variable name to find. + + allow_partial : bool, optional + If an attribute is missing along the way, return the partial + path that was found. + + Returns + ------- + list of CodeSummaryType or None + The full path to the given object. + """ + parts = collections.deque(name.split(".")) + if len(parts) <= 1: + item = self.get_item_by_name(name) + if item is None: + return None + return [item] + + variable_name = parts.pop() + parent = None + path = [] + while parts: + part = parts.popleft() + if "[" in part: # ] + part = part.split("[")[0] # ] + + try: + if parent is None: + parent = self.get_item_by_name(part) + path.append(parent) + else: + part_obj = parent[part] + path.append(part_obj) + part_type = str(part_obj.base_type) + parent = self.get_item_by_name(part_type) + except KeyError: + if allow_partial: + return path + return + + if parent is None: + return + + try: + path.append(parent[variable_name]) + except KeyError: + if not allow_partial: + return None + + return path
+ + +
+[docs] + def find_code_object_by_dotted_name(self, name: str) -> Optional[CodeSummaryType]: + """ + Given a qualified code object name, find its Summary object(s). + + This works to find CodeSummary objects such as:: + + FB_Block.ActionName + FB_Block.PropertyName.get + FB_Block.PropertyName.set + """ + parts = Identifier.from_string(name).parts + obj = self.get_item_by_name(parts[0]) + if len(parts) == 1: + return obj + if obj is None: + raise ValueError(f"No object by the name of {parts[0]} exists") + + for remainder in parts[1:]: + next_obj = obj[remainder] + if next_obj is None: + raise ValueError(f"{name}: {obj} has no attribute {remainder!r}") + obj = next_obj + + return obj
+ + +
+[docs] + def get_all_items_by_name( + self, + name: str, + ) -> Generator[TopLevelCodeSummaryType, None, None]: + """Get any code item (function, data type, global variable, etc.) by name.""" + for dct in ( + self.globals, + self.programs, + self.functions, + self.function_blocks, + self.data_types, + ): + # Very inefficient, be warned + try: + yield dct[name] + except KeyError: + ...
+ + +
+[docs] + def get_item_by_name(self, name: str) -> Optional[TopLevelCodeSummaryType]: + """ + Get a single code item (function, data type, global variable, etc.) by name. + + Does not handle scenarios where names are shadowed by other + declarations. The first one found will take precedence. + """ + try: + return next(self.get_all_items_by_name(name)) + except StopIteration: + return None
+ + + def __getitem__(self, name: str) -> TopLevelCodeSummaryType: + item = self.get_item_by_name(name) + if item is None: + raise KeyError(f"{name!r} is not a top-level code object name") + return item + +
+[docs] + def append(self, other: CodeSummary, namespace: Optional[str] = None): + """ + In-place add code summary information from another instance. + + New entries take precedence over old ones. + """ + + self.functions.update(other.functions) + self.function_blocks.update(other.function_blocks) + self.data_types.update(other.data_types) + self.globals.update(other.globals) + self.programs.update(other.programs) + self.interfaces.update(other.interfaces) + + if namespace: + # LCLS_General.GVL_Logger and GVL_Logger are equally valid + for name, item in other.functions.items(): + self.functions[f"{namespace}.{name}"] = item + for name, item in other.function_blocks.items(): + self.function_blocks[f"{namespace}.{name}"] = item + for name, item in other.data_types.items(): + self.data_types[f"{namespace}.{name}"] = item + for name, item in other.globals.items(): + self.globals[f"{namespace}.{name}"] = item + # for name, item in other.programs.items(): + # self.programs[f"{namespace}.{name}"] = item + + self.squash()
+ + +
+[docs] + @staticmethod + def from_parse_results( + all_parsed_items: Union[ParseResult, list[ParseResult]], + squash: bool = True, + ) -> CodeSummary: + if isinstance(all_parsed_items, ParseResult): + all_parsed_items = [all_parsed_items] + + result = CodeSummary() + + def get_code_by_meta(parsed: ParseResult, meta: Optional[tf.Meta]) -> str: + if meta is None or meta.line is None or meta.end_line is None: + return "" + + transformed = parsed.transform() + return "\n".join( + transformed.range_from_file_lines(meta.line, meta.end_line) + ) + + def add_implementation(parsed: ParseResult, impl: tf.StatementList): + assert parsed.identifier is not None + identifier = Identifier.from_string(parsed.identifier) + assert identifier.decl_impl == "implementation" + + match = result.find_code_object_by_dotted_name(identifier.dotted_name) + if match is None: + raise RuntimeError( + f"Implementation without previous declaration? " + f"{parsed.filename} {parsed.identifier}" + ) + # if len(matches) > 1: + # raise RuntimeError( + # f"Multiple matches for implementation? " + # f"{parsed.filename} {parsed.identifier}" + # ) + + if match.implementation is not None: + raise RuntimeError( + f"Implementation specified twice for {parsed.filename} " + f"{parsed.identifier}" + ) + + if isinstance(match, PropertyGetSetSummary): + ... + + match.implementation = impl + + context = [] + + def clear_context(): + context.clear() + + def new_context(summary: Summary): + context[:] = [summary] + + def push_context(summary: Summary): + context.append(summary) + + def get_pou_context() -> Union[ + ProgramSummary, FunctionBlockSummary, InterfaceSummary + ]: + for item in reversed(context): + if isinstance( + item, (ProgramSummary, FunctionBlockSummary, InterfaceSummary) + ): + return item + + raise ValueError( + "Expected to parse a POU prior to this but none were in the context " + "list. Code summaries of PROPERTY objects, for example, require " + "that a FUNCTION_BLOCK, INTERFACE, or PROGRAM be parsed previously." + ) + + for parsed in all_parsed_items: + transformed = parsed.transform() + identifier = Identifier.from_string(parsed.identifier) if parsed.identifier else None + for item in transformed.items: + if isinstance(item, tf.FunctionBlock): + summary = FunctionBlockSummary.from_function_block( + item, + source_code=get_code_by_meta(parsed, item.meta), + filename=parsed.filename, + ) + result.function_blocks[item.name] = summary + new_context(summary) + elif isinstance(item, tf.Function): + summary = FunctionSummary.from_function( + item, + source_code=get_code_by_meta(parsed, item.meta), + filename=parsed.filename, + ) + result.functions[item.name] = summary + new_context(summary) + elif isinstance(item, tf.DataTypeDeclaration): + if isinstance( + item.declaration, + (tf.StructureTypeDeclaration, tf.UnionTypeDeclaration) + ): + summary = DataTypeSummary.from_data_type( + item.declaration, + source_code=get_code_by_meta(parsed, item.declaration.meta), + filename=parsed.filename, + ) + result.data_types[item.declaration.name] = summary + clear_context() + elif isinstance(item, tf.Method): + pou = get_pou_context() + summary = MethodSummary.from_method( + item, + source_code=get_code_by_meta(parsed, item.meta), + filename=parsed.filename, + ) + pou.methods.append(summary) + push_context(summary) + elif isinstance(item, tf.Action): + pou = get_pou_context() + summary = ActionSummary.from_action( + item, + source_code=get_code_by_meta(parsed, item.meta), + filename=parsed.filename, + ) + pou.actions.append(summary) + push_context(summary) + elif isinstance(item, tf.Property): + pou = get_pou_context() + summary = PropertySummary.from_property( + item, + source_code=get_code_by_meta(parsed, item.meta), + filename=parsed.filename, + ) + pou.properties.append(summary) + push_context(summary) + elif isinstance(item, tf.GlobalVariableDeclarations): + clear_context() + summary = GlobalVariableSummary.from_globals( + item, + source_code=get_code_by_meta(parsed, item.meta), + filename=parsed.filename, + ) + result.globals[item.name] = summary + # for global_var in summary.declarations.values(): + # if not qualified_only: + # result.globals[global_var.name] = summary + # result.globals[global_var.qualified_name] = summary + + elif isinstance(item, tf.Program): + summary = ProgramSummary.from_program( + item, + source_code=get_code_by_meta(parsed, item.meta), + filename=parsed.filename, + ) + result.programs[item.name] = summary + new_context(summary) + elif isinstance(item, tf.Interface): + summary = InterfaceSummary.from_interface( + item, + source_code=get_code_by_meta(parsed, item.meta), + filename=parsed.filename, + ) + result.interfaces[item.name] = summary + new_context(summary) + elif isinstance(item, tf.StatementList): + if parsed.item.type != SourceType.action: + add_implementation(parsed, item) + else: + assert identifier is not None + # Special-case: actions only have implementations + parent_identifier = Identifier(parts=identifier.parts[:-1]) + parent, = result.find_path(parent_identifier.dotted_name) + assert isinstance(parent, (FunctionBlockSummary, ProgramSummary)) + action = ActionSummary.from_statement_list( + name=identifier.parts[-1], + statements=item, + source_code=parsed.source_code, # TODO above? + filename=parsed.filename, + ) + parent.actions.append(action) + else: + raise ValueError(type(item)) + logger.warning("Unhandled: %s", type(item)) + + if squash: + result.squash() + + return result
+ + +
+[docs] + def squash(self) -> None: + """Squash derived interfaces/etc to include base summaries.""" + for name, item in list(self.function_blocks.items()): + if item.extends and not item.squashed: + self.function_blocks[name] = item.squash_base_extends( + self.function_blocks + ) + + for name, item in list(self.data_types.items()): + if item.extends and not item.squashed: + self.data_types[name] = item.squash_base_extends( + self.data_types + ) + + for name, item in list(self.interfaces.items()): + if item.extends and not item.squashed: + self.interfaces[name] = item.squash_base_extends( + self.interfaces + )
+
+ + + +
+[docs] +@dataclass +class LinkableItems: + """A summary of linkable (located) declarations.""" + input: List[DeclarationSummary] = field(default_factory=list) + output: List[DeclarationSummary] = field(default_factory=list) + memory: List[DeclarationSummary] = field(default_factory=list)
+ + + +
+[docs] +def get_linkable_declarations( + declarations: Iterable[DeclarationSummary], +) -> LinkableItems: + """ + Get all located/linkable declarations. + """ + linkable = LinkableItems() + for decl in declarations: + linkable_list = getattr(linkable, decl.location_type or "", None) + if linkable_list is not None: + linkable_list.append(decl) + return linkable
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/transform.html b/master/_modules/blark/transform.html new file mode 100644 index 0000000..0db8dae --- /dev/null +++ b/master/_modules/blark/transform.html @@ -0,0 +1,5598 @@ + + + + + + blark.transform — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.transform

+from __future__ import annotations
+
+import dataclasses
+import enum
+import functools
+import pathlib
+import textwrap
+import typing
+from dataclasses import dataclass, fields, is_dataclass
+from enum import Enum
+from typing import (Any, Callable, ClassVar, Dict, Generator, List, Optional,
+                    Tuple, Type, TypeVar, Union)
+
+try:
+    from typing import Self
+except ImportError:
+    from typing_extensions import Self
+
+import lark
+
+from . import util
+from .util import AnyPath, maybe_add_brackets, rebuild_lark_tree_with_line_map
+
+T = TypeVar("T")
+
+try:
+    # NOTE: apischema is an optional requirement; this should work regardless.
+    import apischema
+
+    from .apischema_compat import as_tagged_union
+except ImportError:
+    apischema = None
+
+    def as_tagged_union(cls: Type[T]) -> Type[T]:
+        """No-operation stand-in for when apischema is not available."""
+        return cls
+
+
+_rule_to_class: Dict[str, type] = {}
+_class_handlers = {}
+_comment_consumers = []
+
+
+
+[docs] +@dataclasses.dataclass +class FormatSettings: + indent: str = " "
+ + + +_format_settings = FormatSettings() + + +
+[docs] +def configure_formatting(settings: FormatSettings): + """Override the default code formatting settings.""" + global _format_settings + _format_settings = settings
+ + + +
+[docs] +def multiline_code_block(block: str) -> str: + """Multiline code block with lax beginning/end newlines.""" + return textwrap.dedent(block.strip("\n")).rstrip()
+ + + +
+[docs] +def join_if(value1: Optional[Any], delimiter: str, value2: Optional[Any]) -> str: + """'{value1}{delimiter}{value2} if value1 and value2, otherwise just {value1} or {value2}.""" + return delimiter.join( + str(value) for value in (value1, value2) + if value is not None + )
+ + + +
+[docs] +def indent_if(value: Optional[Any], prefix: Optional[str] = None) -> Optional[str]: + """Stringified and indented {value} if not None.""" + if value is not None: + if prefix is None: + prefix = _format_settings.indent + return textwrap.indent(str(value), prefix) + return None
+ + + +
+[docs] +def indent(value: Any, prefix: Optional[str] = None) -> str: + """Stringified and indented {value}.""" + if prefix is None: + prefix = _format_settings.indent + return textwrap.indent(str(value), prefix)
+ + + +def _commented(meta: Meta, item: Any, indent: str = "", suffix="") -> str: + comments = getattr(meta, "comments", None) + if not comments: + return f"{indent}{item}{suffix}" + + block = "\n".join((*comments, f"{item}{suffix}")) + return textwrap.indent(block, prefix=indent) + + +def _add_comments_to_return_value(func): + @functools.wraps(func) + def wrapped(self): + return _commented( + self.meta, + func(self) + ) + + if getattr(func, "_comment_wrapped", None): + return func # pragma: no cover + + wrapped._comment_wrapped = True + return wrapped + + +def _get_default_instantiator(cls: Type[T]): + def instantiator(*args) -> T: + return cls(*args) + + return instantiator + + +def _rule_handler( + *rules: str, + comments: bool = False +) -> Callable[[Type[T]], Type[T]]: + """Decorator - the wrapped class will handle the provided rules.""" + def wrapper(cls: Type[T]) -> Type[T]: + if not hasattr(cls, "from_lark"): + cls.from_lark = _get_default_instantiator(cls) + + for rule in rules: + handler = _rule_to_class.get(rule, None) + if handler is not None: + raise ValueError( + f"Handler already specified for: {rule} ({handler})" + ) # pragma: no cover + + _rule_to_class[rule] = cls + _class_handlers[rule] = cls.from_lark + + if comments: + # Mark ``cls`` as one that consumes comments when stringifying code. + _comment_consumers.append(cls) + cls.__str__ = _add_comments_to_return_value(cls.__str__) + + return cls + + return wrapper + + +
+[docs] +@dataclasses.dataclass +class Meta: + """Lark-derived meta information in the form of a dataclass.""" + #: If the metadata information is not yet filled. + empty: bool = True + #: Column number. + column: Optional[int] = None + #: Comments relating to the line. + comments: List[lark.Token] = dataclasses.field(default_factory=list) + #: Containing start column. + container_column: Optional[int] = None + #: Containing end column. + container_end_column: Optional[int] = None + #: Containing end line. + container_end_line: Optional[int] = None + #: Containing start line. + container_line: Optional[int] = None + #: Final column number. + end_column: Optional[int] = None + #: Final line number. + end_line: Optional[int] = None + #: Final character position. + end_pos: Optional[int] = None + #: Line number. + line: Optional[int] = None + #: Starting character position. + start_pos: Optional[int] = None + +
+[docs] + @staticmethod + def from_lark(lark_meta: lark.tree.Meta) -> Meta: + """Generate a Meta instance from the lark Metadata.""" + return Meta( + empty=lark_meta.empty, + column=getattr(lark_meta, "column", None), + comments=getattr(lark_meta, "comments", []), + container_column=getattr(lark_meta, "container_column", None), + container_end_column=getattr(lark_meta, "container_end_column", None), + container_end_line=getattr(lark_meta, "container_end_line", None), + container_line=getattr(lark_meta, "container_line", None), + end_column=getattr(lark_meta, "end_column", None), + end_line=getattr(lark_meta, "end_line", None), + end_pos=getattr(lark_meta, "end_pos", None), + line=getattr(lark_meta, "line", None), + start_pos=getattr(lark_meta, "start_pos", None), + )
+ + +
+[docs] + def get_comments_and_pragmas(self) -> Tuple[List[lark.Token], List[lark.Token]]: + """ + Split the contained comments into comments/pragmas. + + Returns + ------- + comments : List[lark.Token] + pragmas : List[lark.Token] + """ + if not self.comments: + return [], [] + + pragmas: List[lark.Token] = [] + comments: List[lark.Token] = [] + by_type = { + "SINGLE_LINE_COMMENT": comments, + "MULTI_LINE_COMMENT": comments, + "PRAGMA": pragmas, + } + + for comment in self.comments: + by_type[comment.type].append(comment) + + return comments, pragmas
+ + + @property + def attribute_pragmas(self) -> List[str]: + """Get {attribute ...} pragmas associated with this code block.""" + + _, pragmas = self.get_comments_and_pragmas() + attributes = [] + for pragma in pragmas: + # TODO: better pragma parsing; it's its own grammar + if pragma.startswith("{attribute "): # } + attributes.append(pragma.split(" ")[1].strip(" }'")) + return attributes
+ + + +
+[docs] +def meta_field(): + """Create the Meta field for the dataclass magic.""" + return dataclasses.field(default=None, repr=False, compare=False)
+ + + +
+[docs] +def get_grammar_for_class(cls: type) -> Dict[str, str]: + """ + Given a class, get blark's ``iec.lark`` associated grammar definition(s). + """ + matches = {} + for rule, othercls in _rule_to_class.items(): + if othercls is cls: + matches[rule] = "unknown" + + if not matches: + return matches + + for rule in list(matches): + matches[rule] = util.get_grammar_for_rule(rule) + + return matches
+ + + +
+[docs] +class _FlagHelper: + """A helper base class which translates tokens to ``enum.Flag`` instances.""" + +
+[docs] + @classmethod + def from_lark(cls, token: lark.Token, *tokens: lark.Token): + result = cls[token.lower()] + for token in tokens: + result |= cls[token.lower()] + return result
+ + + def __str__(self): + return " ".join( + option.name.upper() + for option in type(self) + if option in self + )
+ + + +
+[docs] +@dataclasses.dataclass(frozen=True) +class TypeInformation: + """Type information derived from a specification or initialization.""" + + base_type_name: Union[str, lark.Token] + full_type_name: Union[str, lark.Token] + context: Any + +
+[docs] + @classmethod + def from_init( + cls: Type[Self], + init: Union[ + StructureInitialization, + ArrayTypeInitialization, + StringTypeInitialization, + TypeInitialization, + SubrangeTypeInitialization, + EnumeratedTypeInitialization, + InitializedStructure, + FunctionCall, + ], + ) -> Self: + if isinstance(init, StructureInitialization): + return UnresolvedTypeInformation( # TODO + base_type_name="", + full_type_name="", + context=init, + ) + if isinstance(init, InitializedStructure): + return cls( + base_type_name=init.name, + full_type_name=init.name, + context=init, + ) + if isinstance(init, FunctionCall): + # May be multi-element variable referenve; stringified here. + return cls( + base_type_name=str(init.name), + full_type_name=str(init.name), + context=init, + ) + spec_type = cls.from_spec(init.spec) + if isinstance(init, TypeInitialization): + return cls( + base_type_name=spec_type.base_type_name, + full_type_name=spec_type.full_type_name, + context=init, + ) + return spec_type
+ + +
+[docs] + @classmethod + def from_spec( + cls: Type[Self], + spec: Union[ + ArraySpecification, + DataType, + EnumeratedSpecification, + FunctionCall, + IndirectSimpleSpecification, + ObjectInitializerArray, + SimpleSpecification, + StringTypeSpecification, + SubrangeSpecification, + ], + ) -> Self: + full_type_name = str(spec) + if isinstance(spec, DataType): + if isinstance(spec.type_name, StringTypeSpecification): + base_type_name = str(spec) + else: + base_type_name = spec.type_name + elif isinstance(spec, ArraySpecification): + base_type_name = spec.base_type_name + elif isinstance(spec, StringTypeSpecification): + base_type_name = spec.base_type_name + elif isinstance(spec, EnumeratedSpecification): + base_type_name = str(spec.type_name or spec._implicit_type_default_) + full_type_name = base_type_name + elif isinstance(spec, (SimpleSpecification, IndirectSimpleSpecification)): + base_type_name = str(spec.type) + elif isinstance(spec, SubrangeSpecification): + base_type_name = str(spec.type_name) + elif isinstance(spec, FunctionCall): + base_type_name = spec.base_type_name + else: + # base_type_name = str(spec.name) + raise NotImplementedError(spec) + return cls( + base_type_name=base_type_name, + full_type_name=full_type_name, + context=spec, + )
+
+ + + +
+[docs] +@dataclasses.dataclass(frozen=True) +class UnresolvedTypeInformation(TypeInformation): + ...
+ + + +
+[docs] +@_rule_handler("variable_attributes") +class VariableAttributes(_FlagHelper, enum.IntFlag): + constant = 0b0000_0001 + retain = 0b0000_0010 + non_retain = 0b0000_0100 + persistent = 0b0000_1000
+ + + +
+[docs] +@_rule_handler("global_variable_attributes") +class GlobalVariableAttributes(_FlagHelper, enum.IntFlag): + constant = 0b0000_0001 + retain = 0b0000_0010 + non_retain = 0b0000_0100 + persistent = 0b0000_1000 + internal = 0b0001_0000
+ + + +
+[docs] +@_rule_handler( + "access_specifier", +) +class AccessSpecifier(_FlagHelper, enum.IntFlag): + public = 0b0000_0001 + private = 0b0000_0010 + abstract = 0b0000_0100 + protected = 0b0000_1000 + internal = 0b0001_0000 + final = 0b010_0000
+ + + +
+[docs] +@dataclass +@as_tagged_union +class Expression: + """ + Base class for all types of expressions. + + This includes all literals (integers, etc.) and more complicated + mathematical expressions. + + Marked as a "tagged union" so that serialization will uniquely identify the + Python class. + """ + + def __str__(self) -> str: + raise NotImplementedError
+ + + +
+[docs] +@as_tagged_union +class Literal(Expression): + """ + Base class for all literal values. + + Marked as a "tagged union" so that serialization will uniquely identify the + Python class. + """
+ + + +
+[docs] +@dataclass +@_rule_handler("integer_literal") +class Integer(Literal): + """Integer literal value.""" + + value: lark.Token + type_name: Optional[lark.Token] = None + base: ClassVar[int] = 10 + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + type_name: Optional[lark.Token], + value: Union[Integer, lark.Token], + *, + base: int = 10, + ) -> Integer: + if isinstance(value, Integer): + # Adding type_name information; wrap Integer + value.type_name = type_name + return value + cls = _base_to_integer_class[base] + return cls( + type_name=type_name, + value=value, + )
+ + + def __str__(self) -> str: + value = f"{self.base}#{self.value}" if self.base != 10 else str(self.value) + if self.type_name: + return f"{self.type_name}#{value}" + return value
+ + + +
+[docs] +@dataclass +@_rule_handler("binary_integer") +class BinaryInteger(Integer): + base: ClassVar[int] = 2
+ + + +
+[docs] +@dataclass +@_rule_handler("octal_integer") +class OctalInteger(Integer): + base: ClassVar[int] = 8
+ + + +
+[docs] +@dataclass +@_rule_handler("hex_integer") +class HexInteger(Integer): + base: ClassVar[int] = 16
+ + + +_base_to_integer_class: Dict[int, Type[Integer]] = { + 2: BinaryInteger, + 8: OctalInteger, + 10: Integer, + 16: HexInteger, +} + + +
+[docs] +@dataclass +@_rule_handler("real_literal") +class Real(Literal): + """Floating point (real) literal value.""" + + value: lark.Token + type_name: Optional[lark.Token] = None + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(type_name: Optional[lark.Token], value: lark.Token) -> Real: + return Real(type_name=type_name, value=value)
+ + + def __str__(self) -> str: + if self.type_name: + return f"{self.type_name}#{self.value}" + return str(self.value)
+ + + +
+[docs] +@dataclass +@_rule_handler("bit_string_literal") +class BitString(Literal): + """Bit string literal value.""" + + #: The optional type name of the string. + type_name: Optional[lark.Token] + #: The string literal. + value: lark.Token + #: The numeric base of the value (e.g., 10 is decimal) + base: ClassVar[int] = 10 + #: Lark metadata. + meta: Optional[Meta] = meta_field() + +
+[docs] + @classmethod + def from_lark(cls, type_name: Optional[lark.Token], value: lark.Token): + return cls(type_name, value)
+ + + def __str__(self) -> str: + value = f"{self.base}#{self.value}" if self.base != 10 else str(self.value) + if self.type_name: + return f"{self.type_name}#{value}" + return value
+ + + +
+[docs] +@dataclass +@_rule_handler("binary_bit_string_literal") +class BinaryBitString(BitString): + """Binary bit string literal value.""" + base: ClassVar[int] = 2 + meta: Optional[Meta] = meta_field()
+ + + +
+[docs] +@dataclass +@_rule_handler("octal_bit_string_literal") +class OctalBitString(BitString): + """Octal bit string literal value.""" + base: ClassVar[int] = 8 + meta: Optional[Meta] = meta_field()
+ + + +
+[docs] +@dataclass +@_rule_handler("hex_bit_string_literal") +class HexBitString(BitString): + """Hex bit string literal value.""" + base: ClassVar[int] = 16 + meta: Optional[Meta] = meta_field()
+ + + +
+[docs] +@dataclass +class Boolean(Literal): + """Boolean literal value.""" + value: lark.Token + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + value = self.value.lower() in ("1", "true") + return "TRUE" if value else "FALSE"
+ + + +
+[docs] +@dataclass +@_rule_handler("duration") +class Duration(Literal): + """Duration literal value.""" + + days: Optional[lark.Token] = None + hours: Optional[lark.Token] = None + minutes: Optional[lark.Token] = None + seconds: Optional[lark.Token] = None + milliseconds: Optional[lark.Token] = None + negative: bool = False + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(minus: Optional[lark.Token], interval: lark.Tree) -> Duration: + kwargs = typing.cast( + Dict[str, lark.Token], + { + tree.data: tree.children[0] + for tree in interval.iter_subtrees() + } + ) + return Duration(**kwargs, negative=minus is not None, meta=None)
+ + + @property + def value(self) -> str: + """The duration value.""" + prefix = "-" if self.negative else "" + return prefix + "".join( + f"{value}{suffix}" + for value, suffix in ( + (self.days, "D"), + (self.hours, "H"), + (self.minutes, "M"), + (self.seconds, "S"), + (self.milliseconds, "MS"), + ) + if value is not None + ) + + def __str__(self): + return f"TIME#{self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("lduration") +class Lduration(Literal): + """Long duration literal value.""" + + days: Optional[lark.Token] = None + hours: Optional[lark.Token] = None + minutes: Optional[lark.Token] = None + seconds: Optional[lark.Token] = None + milliseconds: Optional[lark.Token] = None + microseconds: Optional[lark.Token] = None + nanoseconds: Optional[lark.Token] = None + negative: bool = False + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(minus: Optional[lark.Token], interval: lark.Tree) -> Lduration: + kwargs = typing.cast( + Dict[str, lark.Token], + { + tree.data: tree.children[0] + for tree in interval.iter_subtrees() + } + ) + return Lduration(**kwargs, negative=minus is not None, meta=None)
+ + + @property + def value(self) -> str: + """The long duration value.""" + prefix = "-" if self.negative else "" + return prefix + "".join( + f"{value}{suffix}" + for value, suffix in ( + (self.days, "D"), + (self.hours, "H"), + (self.minutes, "M"), + (self.seconds, "S"), + (self.milliseconds, "MS"), + (self.microseconds, "US"), + (self.nanoseconds, "NS"), + ) + if value is not None + ) + + def __str__(self): + return f"LTIME#{self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("time_of_day") +class TimeOfDay(Literal): + """Time of day literal value.""" + hour: lark.Token + minute: lark.Token + second: Optional[lark.Token] = None + meta: Optional[Meta] = meta_field() + + @property + def value(self) -> str: + """The time of day value.""" + return join_if(f"{self.hour}:{self.minute}", ":", self.second) + + def __str__(self): + return f"TIME_OF_DAY#{self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("ltime_of_day") +class LtimeOfDay(Literal): + """Long time of day literal value.""" + hour: lark.Token + minute: lark.Token + second: Optional[lark.Token] = None + meta: Optional[Meta] = meta_field() + + @property + def value(self) -> str: + """The long time of day value.""" + return f"{self.hour}:{self.minute}:{self.second}" + + def __str__(self): + return f"LTIME_OF_DAY#{self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("date") +class Date(Literal): + """Date literal value.""" + + year: lark.Token + month: lark.Token + day: Optional[lark.Token] + meta: Optional[Meta] = meta_field() + + @property + def value(self) -> str: + """The time of day value.""" + return f"{self.year}-{self.month}-{self.day}" + + def __str__(self): + return f"DATE#{self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("ldate") +class Ldate(Literal): + """Long date literal value.""" + + year: lark.Token + month: lark.Token + day: lark.Token + meta: Optional[Meta] = meta_field() + + @property + def value(self) -> str: + """The long time of day value.""" + return f"{self.year}-{self.month}-{self.day}" + + def __str__(self): + return f"LDATE#{self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("date_and_time") +class DateTime(Literal): + """Date and time literal value.""" + + date: Date + time: TimeOfDay + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + year: lark.Token, + month: lark.Token, + day: lark.Token, + hour: lark.Token, + minute: lark.Token, + second: Optional[lark.Token], + ) -> DateTime: + return DateTime( + date=Date(year=year, month=month, day=day), + time=TimeOfDay(hour=hour, minute=minute, second=second), + )
+ + + @property + def value(self) -> str: + """The time of day value.""" + return f"{self.date.value}-{self.time.value}" + + def __str__(self): + return f"DT#{self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("ldate_and_time") +class LdateTime(Literal): + """Long date and time literal value.""" + + ldate: Ldate + ltime: LtimeOfDay + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + year: lark.Token, + month: lark.Token, + day: lark.Token, + hour: lark.Token, + minute: lark.Token, + second: Optional[lark.Token], + ) -> LdateTime: + return LdateTime( + ldate=Ldate(year=year, month=month, day=day), + ltime=LtimeOfDay(hour=hour, minute=minute, second=second), + )
+ + + @property + def value(self) -> str: + """The time of day value.""" + return f"{self.ldate.value}-{self.ltime.value}" + + def __str__(self): + return f"LDT#{self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("string_literal") +class String(Literal): + """String literal value.""" + value: lark.Token + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return str(self.value)
+ + + +
+[docs] +@as_tagged_union +class Variable(Expression): + """ + Variable base class. + + Marked as a "tagged union" so that serialization will uniquely identify the + Python class. + + Includes: + + 1. Direct variables with I/O linkage (e.g., ``var AT %I*``); may be + located (e.g., ``AT %IX1.1``) or incomplete (e.g., just ``%I*``). + 2. "Simple", single-element variables (referenced by name, potentially + dereferenced pointers) (e.g., ``var`` or ``var^``). + 3. Multi-element variables (e.g., ``a.b.c`` or ``a^.b[1].c``). + """ + ...
+ + + +
+[docs] +@dataclass +@_rule_handler( + "indirection_type", + "pointer_type", +) +class IndirectionType: + """Indirect access through a pointer or reference.""" + #: A depth of 1 is "POINTER TO", a depth of 2 is "POINTER TO POINTER TO". + pointer_depth: int + #: If set, "REFERENCE TO POINTER TO..." + reference: bool + meta: Optional[Meta] = meta_field() + + @property + def is_indirect(self) -> bool: + """True if this denotes a pointer (of any depth) or a reference.""" + return self.reference or (self.pointer_depth > 0) + +
+[docs] + @staticmethod + def from_lark(*tokens: lark.Token) -> IndirectionType: + pointer_depth = 0 + reference = False + upper_tokens = list(map(lambda s: str(s).upper(), tokens)) + if len(tokens) > 0: + pointer_depth = upper_tokens.count("POINTER TO") + reference = "REFERENCE TO" in upper_tokens + return IndirectionType( + pointer_depth=pointer_depth, + reference=reference + )
+ + + @property + def value(self) -> str: + return " ".join( + ["REFERENCE TO"] * self.reference + + ["POINTER TO"] * self.pointer_depth + ) + + def __str__(self): + return self.value
+ + + +
+[docs] +@_rule_handler("incomplete_location") +class IncompleteLocation(Enum): + """Incomplete location information.""" + none = enum.auto() + #: I/O to PLC task. + input = "%I*" + #: PLC task to I/O. + output = "%Q*" + #: Memory. + memory = "%M*" + +
+[docs] + @staticmethod + def from_lark(token: Optional[lark.Token]) -> IncompleteLocation: + return IncompleteLocation(str(token).upper())
+ + + def __str__(self): + if self == IncompleteLocation.none: + return "" + return f"AT {self.value}"
+ + + +
+[docs] +class VariableLocationPrefix(str, Enum): + #: I/O to PLC task. + input = "I" + #: PLC task to I/O. + output = "Q" + memory = "M" + + def __str__(self) -> str: + return self.value
+ + + +
+[docs] +class VariableSizePrefix(str, Enum): + """Size prefix, used in locations (e.g., ``%IX1.1`` has a bit prefix).""" + bit = "X" + byte = "B" + word_16 = "W" + dword_32 = "D" + lword_64 = "L" + + def __str__(self) -> str: + return self.value
+ + + +
+[docs] +@dataclass +@_rule_handler("direct_variable") +class DirectVariable(Variable): + """ + Direct variables with I/O linkage. + + Example: ``var AT %I*`` + + May be located (e.g., ``AT %IX1.1``) or incomplete (e.g., just ``%I*``). + """ + + #: The location prefix (e.g., I, Q, or M) + location_prefix: VariableLocationPrefix + #: The location number itself (e.g., 2 of %IX2.1) + location: lark.Token + #: Size prefix, used in locations (e.g., ``%IX1.1`` has a bit prefix). + size_prefix: VariableSizePrefix + #: The number of bits. + bits: Optional[List[lark.Token]] = None + #: Lark metadata. + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + location_prefix: lark.Token, + size_prefix: Optional[lark.Token], + location: lark.Token, + *bits: lark.Token, + ): + return DirectVariable( + location_prefix=VariableLocationPrefix(location_prefix), + size_prefix=( + VariableSizePrefix(size_prefix) + if size_prefix else VariableSizePrefix.bit + ), + location=location, + bits=list(bits) if bits else None, + )
+ + + def __str__(self) -> str: + bits = ("." + ".".join(self.bits)) if self.bits else "" + return f"%{self.location_prefix}{self.size_prefix}{self.location}{bits}"
+ + + +
+[docs] +@_rule_handler("location") +class Location(DirectVariable): + """A located direct variable. (e.g., ``AT %IX1.1``)""" + +
+[docs] + @staticmethod + def from_lark(var: DirectVariable) -> Location: + return Location( + location_prefix=var.location_prefix, + location=var.location, + size_prefix=var.size_prefix, + bits=var.bits, + meta=var.meta, + )
+ + + def __str__(self) -> str: + direct_loc = super().__str__() + return f"AT {direct_loc}"
+ + + +
+[docs] +@dataclass +@_rule_handler("variable_name") +class SimpleVariable(Variable): + """ + A simple, single-element variable. + + Specified by name, may potentially be dereferenced pointers. + Examples:: + + var + var^ + """ + name: lark.Token + dereferenced: bool + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + identifier: lark.Token, dereferenced: Optional[lark.Token] + ) -> SimpleVariable: + return SimpleVariable( + name=identifier, + dereferenced=dereferenced is not None + )
+ + + def __str__(self) -> str: + return f"{self.name}^" if self.dereferenced else f"{self.name}"
+ + + +
+[docs] +@dataclass +@_rule_handler("subscript_list") +class SubscriptList: + """ + A list of subscripts. + + Examples:: + + [1, 2, 3] + [Constant, GVL.Value, 1 + 3] + [1]^ + """ + subscripts: List[Expression] + dereferenced: bool + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*args): + *subscripts, dereferenced = args + return SubscriptList( + subscripts=list(subscripts), + dereferenced=dereferenced is not None, + )
+ + + def __str__(self) -> str: + parts = ", ".join(str(subscript) for subscript in self.subscripts) + return f"[{parts}]^" if self.dereferenced else f"[{parts}]"
+ + + +
+[docs] +@dataclass +@_rule_handler("field_selector") +class FieldSelector: + """ + Field - or attribute - selector as part of a multi-element variable. + + Examples:: + + .field + .field^ + """ + field: SimpleVariable + dereferenced: bool + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(dereferenced: Optional[lark.Token], field: SimpleVariable): + return FieldSelector( + field=field, + dereferenced=dereferenced is not None + )
+ + + def __str__(self) -> str: + return f"^.{self.field}" if self.dereferenced else f".{self.field}"
+ + + +
+[docs] +@dataclass +@_rule_handler("multi_element_variable") +class MultiElementVariable(Variable): + """ + A multi-element variable - with one or more subscripts and fields. + + Examples:: + + a.b.c + a^.b[1].c + a.b[SomeConstant].c^ + + Where ``a`` is the "name" + """ + #: The first part of the variable name. + name: SimpleVariable + #: This is unused (TODO / perhaps for compat elsewhere?) + #: Dereference status is held on a per-element basis. + dereferenced: bool + #: The subscripts/fields that make up the multi-element variable. + elements: List[Union[SubscriptList, FieldSelector]] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + variable_name: SimpleVariable, + *subscript_or_field: Union[SubscriptList, FieldSelector] + ) -> MultiElementVariable: + return MultiElementVariable( + name=variable_name, + elements=list(subscript_or_field), + dereferenced=False, + )
+ + + def __str__(self) -> str: + return "".join(str(part) for part in (self.name, *self.elements))
+ + + +SymbolicVariable = Union[SimpleVariable, MultiElementVariable] + + +
+[docs] +class TypeInitializationBase: + """ + Base class for type initializations. + """ + + @property + def type_info(self) -> TypeInformation: + """The base type name.""" + return TypeInformation.from_init(self) + + @property + def base_type_name(self) -> Union[lark.Token, str]: + """The base type name.""" + return self.type_info.base_type_name + + @property + def full_type_name(self) -> Union[lark.Token, str]: + """The full, qualified type name.""" + return self.type_info.full_type_name
+ + + +
+[docs] +class TypeSpecificationBase: + """ + Base class for a specification of a type. + + Can specify a: + + 1. Enumeration:: + + ( 1, 1 ) INT + TYPE_NAME (TODO; ambiguous with 2) + + 2. A simple or string type specification:: + + TYPE_NAME + STRING + STRING[255] + + 3. An indirect simple specification:: + + POINTER TO TYPE_NAME + REFERENCE TO TYPE_NAME + REFERENCE TO POINTER TO TYPE_NAME + + 4. An array specification:: + + ARRAY [1..2] OF TypeName + ARRAY [1..2] OF TypeName(1, 2) + """ + @property + def type_info(self) -> TypeInformation: + """The base type name.""" + return TypeInformation.from_spec(self) + + @property + def base_type_name(self) -> Union[lark.Token, str]: + """The full type name.""" + return self.type_info.base_type_name + + @property + def full_type_name(self) -> Union[lark.Token, str]: + """The full type name.""" + return self.type_info.full_type_name
+ + + +
+[docs] +@dataclass +@_rule_handler("simple_spec_init") +class TypeInitialization(TypeInitializationBase): + """ + A simple initialization specification of a type name. + + Example:: + + TypeName := Value1 + STRING[100] := "value" + """ + spec: Union[SimpleSpecification, IndirectSimpleSpecification] + value: Optional[Expression] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return join_if(self.full_type_name, " := ", self.value)
+ + + +
+[docs] +@dataclass +@_rule_handler("simple_type_declaration") +class SimpleTypeDeclaration: + """ + A declaration of a simple type. + + Examples:: + + TypeName : INT + TypeName : INT := 5 + TypeName : INT := 5 + 1 * (2) + TypeName : REFERENCE TO INT + TypeName : POINTER TO INT + TypeName : POINTER TO POINTER TO INT + TypeName : REFERENCE TO POINTER TO INT + TypeName EXTENDS a.b : POINTER TO INT + """ + name: lark.Token + extends: Optional[Extends] + init: TypeInitialization + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + if self.extends: + return f"{self.name} {self.extends} : {self.init}" + return f"{self.name} : {self.init}"
+ + + +
+[docs] +@dataclass +@_rule_handler("string_type_declaration") +class StringTypeDeclaration: + """ + A string type declaration. + + Examples:: + TypeName : STRING + TypeName : STRING := 'literal' + TypeName : STRING[5] + TypeName : STRING[100] := 'literal' + TypeName : WSTRING[100] := "literal" + """ + name: lark.Token + string_type: StringTypeSpecification + value: Optional[String] + meta: Optional[Meta] = meta_field() + + @property + def type_name(self) -> lark.Token: + return self.string_type.type_name + + def __str__(self) -> str: + type_and_value = join_if(self.string_type, " := ", self.value) + return f"{self.name} : {type_and_value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("string_type_specification") +class StringTypeSpecification(TypeSpecificationBase): + """ + Specification of a string type. + + Examples:: + + STRING(2_500_000) + STRING(Param.iLower) + STRING(Param.iLower * 2 + 10) + STRING(Param.iLower / 2 + 10) + + Bracketed versions are also acceptable:: + + STRING[2_500_000] + STRING[Param.iLower] + """ + type_name: lark.Token + length: Optional[StringSpecLength] = None + meta: Optional[Meta] = meta_field() + + @property + def base_type_name(self) -> lark.Token: + """The base type name.""" + return self.type_name + + @property + def full_type_name(self) -> str: + """The full type name.""" + return join_if(self.type_name, "", self.length) + + def __str__(self) -> str: + return self.full_type_name
+ + + +
+[docs] +@dataclass +@_rule_handler( + "single_byte_string_spec", + "double_byte_string_spec", +) +class StringTypeInitialization(TypeInitializationBase): + """ + Single or double-byte string specification. + + Examples:: + + STRING := 'test' + STRING(2_500_000) := 'test' + STRING(Param.iLower) := 'test' + + Bracketed versions are also acceptable. + """ + spec: StringTypeSpecification + value: Optional[lark.Token] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + string_type: lark.Token, + length: Optional[StringSpecLength] = None, + value: Optional[lark.Token] = None, + ) -> StringTypeInitialization: + spec = StringTypeSpecification(string_type, length) + return StringTypeInitialization(spec=spec, value=value)
+ + + def __str__(self) -> str: + return join_if(self.spec, " := ", self.value)
+ + + +
+[docs] +@dataclass +@as_tagged_union +class Subrange: + """ + Subrange base class. + + May be a full or partial sub-range. Marked as a "tagged union" so that + serialization will uniquely identify the Python class. + """ + ...
+ + + +
+[docs] +@dataclass +class FullSubrange(Subrange): + """ + A full subrange (i.e., asterisk ``*``). + + Example:: + + Array[*] + ^ + """ + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return "*"
+ + + +
+[docs] +@dataclass +@_rule_handler("subrange") +class PartialSubrange(Subrange): + """ + A partial subrange, including a start/stop element index. + + Examples:: + + 1..2 + iStart..iEnd + """ + start: Expression + stop: Expression + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return f"{self.start}..{self.stop}"
+ + + +
+[docs] +@dataclass +@_rule_handler("subrange_specification") +class SubrangeSpecification(TypeSpecificationBase): + """ + A subrange specification. + + Examples:: + + INT (*) + INT (1..2) + TYPE_NAME (TODO; overlap) + """ + type_name: lark.Token + subrange: Optional[Subrange] = None + meta: Optional[Meta] = meta_field() + + @property + def base_type_name(self) -> lark.Token: + """The base type name.""" + return self.type_name + + @property + def full_type_name(self) -> str: + """The full type name.""" + if self.subrange: + return f"{self.type_name} ({self.subrange})" + return f"{self.type_name}" + + def __str__(self) -> str: + return self.full_type_name
+ + + +
+[docs] +@dataclass +@_rule_handler("subrange_spec_init") +class SubrangeTypeInitialization(TypeInitializationBase): + """ + A subrange type initialization. + + Examples:: + + INT (1..2) := 25 + """ + # TODO: coverage + examples? + indirection: Optional[IndirectionType] + spec: SubrangeSpecification + value: Optional[Expression] = None + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + spec = join_if(self.indirection, " ", self.spec) + if not self.value: + return spec + + return f"{spec} := {self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("subrange_type_declaration") +class SubrangeTypeDeclaration: + """ + A subrange type declaration. + + Examples:: + + TypeName : INT (1..2) + TypeName : INT (*) := 1 + """ + name: lark.Token + init: SubrangeTypeInitialization + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return f"{self.name} : {self.init}"
+ + + +
+[docs] +@dataclass +@_rule_handler("enumerated_value") +class EnumeratedValue: + """ + An enumerated value. + + Examples:: + + IdentifierB + IdentifierB := 1 + INT#IdentifierB + INT#IdentifierB := 1 + """ + # TODO: coverage? + type_name: Optional[lark.Token] + name: lark.Token + value: Optional[Union[Integer, lark.Token]] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + name = join_if(self.type_name, "#", self.name) + return join_if(name, " := ", self.value)
+ + + +
+[docs] +@dataclass +@_rule_handler("enumerated_specification") +class EnumeratedSpecification(TypeSpecificationBase): + """ + An enumerated specification. + + Examples:: + + (Value1, Value2 := 1) + (Value1, Value2 := 1) INT + INT + """ + _implicit_type_default_: ClassVar[str] = "INT" + type_name: Optional[lark.Token] + values: Optional[List[EnumeratedValue]] = None + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*args): + if len(args) == 1: + type_name, = args + return EnumeratedSpecification(type_name=type_name) + *values, type_name = args + return EnumeratedSpecification(type_name=type_name, values=list(values))
+ + + def __str__(self) -> str: + if self.values: + values = ", ".join(str(value) for value in self.values) + return join_if(f"({values})", " ", self.type_name) + return f"{self.type_name}"
+ + + +
+[docs] +@dataclass +@_rule_handler("enumerated_spec_init") +class EnumeratedTypeInitialization(TypeInitializationBase): + """ + Enumerated specification with initialization enumerated value. + + May be indirect (i.e., POINTER TO). + + Examples:: + + (Value1, Value2 := 1) := IdentifierB + (Value1, Value2 := 1) INT := IdentifierC + INT := IdentifierD + """ + # TODO coverage + double-check examples (doctest-like?) + indirection: Optional[IndirectionType] + spec: EnumeratedSpecification + value: Optional[EnumeratedValue] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + spec = join_if(self.indirection, " ", self.spec) + return join_if(spec, " := ", self.value)
+ + + +
+[docs] +@dataclass +@_rule_handler("enumerated_type_declaration", comments=True) +class EnumeratedTypeDeclaration: + """ + An enumerated type declaration. + + Examples:: + + TypeName : TypeName := Va + TypeName : (Value1 := 1, Value2 := 2) + TypeName : (Value1 := 1, Value2 := 2) INT := Value1 + """ + name: lark.Token + init: EnumeratedTypeInitialization + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return f"{self.name} : {self.init}"
+ + + +
+[docs] +@dataclass +@_rule_handler("non_generic_type_name") +class DataType: + """ + A non-generic type name, or a data type name. + + May be indirect (e.g., POINTER TO). + + An elementary type name, a derived type name, or a general dotted + identifier are valid for this. + """ + # TODO: more grammar overlaps with dotted/simple names? + indirection: Optional[IndirectionType] + type_name: Union[lark.Token, StringTypeSpecification] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + if self.indirection and self.indirection.is_indirect: + return f"{self.indirection} {self.type_name}" + return f"{self.type_name}"
+ + + +
+[docs] +@dataclass +@_rule_handler("simple_specification") +class SimpleSpecification(TypeSpecificationBase): + """ + A simple specification with just a type name (or a string type name). + + An elementary type name, a simple type name, or a general dotted + identifier are valid for this. + """ + type: Union[lark.Token, StringTypeSpecification] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return str(self.type)
+ + + +
+[docs] +@dataclass +@_rule_handler("indirect_simple_specification") +class IndirectSimpleSpecification(TypeSpecificationBase): + """ + A simple specification with the possibility of indirection. + + Examples:: + + TypeName + POINTER TO TypeName + REFERENCE TO TypeName + REFERENCE TO POINTER TO TypeName + + Initialization parameters such as these are parsed but otherwise ignored + by TwinCAT:: + + POINTER TO TypeName(1, 2) + POINTER TO TypeName(1, 2, C := 4) + """ + indirection: Optional[IndirectionType] + type: SimpleSpecification + init_parameters: Optional[List[InputParameterAssignment]] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + indirection: Optional[IndirectionType], + type_: SimpleSpecification, + init_parameters_tree: Optional[lark.Tree], + ) -> IndirectSimpleSpecification: + if init_parameters_tree is None: + init_parameters = None + else: + init_parameters = typing.cast( + List[InputParameterAssignment], + list(init_parameters_tree.children) + ) + return IndirectSimpleSpecification( + indirection, + type_, + init_parameters, + )
+ + + def __str__(self) -> str: + full_type = join_if(self.indirection, " ", self.type) + if not self.init_parameters: + return full_type + + initializers = ", ".join( + str(init) + for init in self.init_parameters + ) + return f"{full_type}({initializers})"
+ + + +# _array_spec_type +ArraySpecType = Union[ + DataType, + "FunctionCall", + "ObjectInitializerArray", + "ArraySpecification", + StringTypeSpecification, +] + + +
+[docs] +@dataclass +@_rule_handler("array_specification") +class ArraySpecification(TypeSpecificationBase): + """ + An array specification. + + Examples:: + + ARRAY[*] OF TypeName + ARRAY[1..2] OF Call(1, 2) + ARRAY[1..2] OF Call(1, 2) + ARRAY[1..5] OF Vec(SIZEOF(TestStruct), 0) + ARRAY[1..5] OF STRING[10] + ARRAY[1..5] OF STRING(Param.iLower) + """ + subranges: List[Subrange] + type: ArraySpecType + meta: Optional[Meta] = meta_field() + + @property + def base_type_name(self) -> Union[str, lark.Token]: + """The base type name.""" + if isinstance(self.type, DataType): + if isinstance(self.type.type_name, StringTypeSpecification): + return str(self.type) + return self.type.type_name + if isinstance(self.type, ArraySpecification): + return self.type.base_type_name + if isinstance(self.type, StringTypeSpecification): + return self.type.base_type_name + return str(self.type.name) + + @property + def full_type_name(self) -> str: + """The full type name.""" + return str(self) + +
+[docs] + @staticmethod + def from_lark(*args): + *subranges, type = args + if isinstance(type, lark.Token): + # STRING_TYPE + type = DataType( + indirection=None, + type_name=type, + ) + + return ArraySpecification(type=type, subranges=subranges)
+ + + def __str__(self) -> str: + subranges = ", ".join(str(subrange) for subrange in self.subranges) + return f"ARRAY [{subranges}] OF {self.type}"
+ + + +
+[docs] +@dataclass +@_rule_handler("array_initial_element") +class ArrayInitialElement: + """ + Initial value for an array element (potentialy repeated). + + The element itself may be an expression, a structure initialization, an + enumerated value, or an array initialization. + + It may have a repeat value (``count``) as in:: + + Repeat(Value) + 10(5) + Repeat(5 + 3) + INT#IdentifierB(5 + 3) + """ + # NOTE: order is correct here; see rule array_initial_element_count + # TODO: check enumerated value for count? specifically the := one + element: ArrayInitialElementType + count: Optional[Union[EnumeratedValue, Integer]] = None + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + if self.count is None: + return f"{self.element}" + return f"{self.count}({self.element})"
+ + + +
+[docs] +@_rule_handler("array_initial_element_count") +class _ArrayInitialElementCount: + """ + An internal handler for array initial elements with repeat count + values. + """ +
+[docs] + @staticmethod + def from_lark( + count: Union[EnumeratedValue, Integer], + element: ArrayInitialElementType + ) -> ArrayInitialElement: + return ArrayInitialElement( + element=element, + count=count, + )
+
+ + + +
+[docs] +@dataclass +@_rule_handler("bracketed_array_initialization") +class _BracketedArrayInitialization: + """ + Internal handler for array initialization with brackets. + + See also :class:`ArrayInitialization` + """ +
+[docs] + @staticmethod + def from_lark(*elements: ArrayInitialElement) -> ArrayInitialization: + return ArrayInitialization(list(elements), brackets=True)
+
+ + + +
+[docs] +@dataclass +@_rule_handler("bare_array_initialization") +class _BareArrayInitialization: + """ + Internal handler for array initialization, without brackets + + See also :class:`ArrayInitialization` + """ +
+[docs] + @staticmethod + def from_lark(*elements: ArrayInitialElement) -> ArrayInitialization: + return ArrayInitialization(list(elements), brackets=False)
+
+ + + +
+[docs] +@dataclass +class ArrayInitialization: + """ + Array initialization (bare or bracketed). + + Examples:: + + [1, 2, 3] + 1, 2, 3 + """ + elements: List[ArrayInitialElement] + brackets: bool = False + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + elements = ", ".join(str(element) for element in self.elements) + if self.brackets: + return f"[{elements}]" + return elements
+ + + +
+[docs] +@dataclass +@_rule_handler("object_initializer_array") +class ObjectInitializerArray: + """ + Object initialization in array form. + + Examples:: + + FB_Runner[(name := 'one'), (name := 'two')] + """ + name: lark.Token + initializers: List[StructureInitialization] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + function_block_type_name: lark.Token, + *initializers: StructureInitialization + ) -> ObjectInitializerArray: + return ObjectInitializerArray( + name=function_block_type_name, + initializers=list(initializers) + )
+ + + def __str__(self) -> str: + initializers = ", ".join( + maybe_add_brackets(str(init), "()") + for init in self.initializers + ) + return f"{self.name}[{initializers}]"
+ + + +
+[docs] +@dataclass +@_rule_handler("array_spec_init") +class ArrayTypeInitialization(TypeInitializationBase): + """ + Array specification and optional default (initialization) value. + + May be indirect (e.g., POINTER TO). + + Examples:: + + ARRAY[*] OF TypeName + ARRAY[1..2] OF Call(1, 2) := [1, 2] + POINTER TO ARRAY[1..2] OF Call(1, 2) + """ + indirection: Optional[IndirectionType] + spec: ArraySpecification + value: Optional[ArrayInitialization] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + if self.indirection: + spec = f"{self.indirection} {self.spec}" + else: + spec = f"{self.spec}" + + if not self.value: + return spec + + return f"{spec} := {self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("array_type_declaration", comments=True) +class ArrayTypeDeclaration: + """ + Full declaration of an array type. + + Examples:: + + ArrayType : ARRAY[*] OF TypeName + ArrayType : ARRAY[1..2] OF Call(1, 2) := [1, 2] + ArrayType : POINTER TO ARRAY[1..2] OF Call(1, 2) + TypeName : ARRAY [1..2, 3..4] OF INT + TypeName : ARRAY [1..2] OF INT := [1, 2] + TypeName : ARRAY [1..2, 3..4] OF INT := [2(3), 3(4)] + TypeName : ARRAY [1..2, 3..4] OF Tc.SomeType + TypeName : ARRAY [1..2, 3..4] OF Tc.SomeType(someInput := 3) + TypeName : ARRAY [1..2, 3..4] OF ARRAY [1..2] OF INT + TypeName : ARRAY [1..2, 3..4] OF ARRAY [1..2] OF ARRAY [3..4] OF INT + """ + name: lark.Token + init: ArrayTypeInitialization + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return f"{self.name} : {self.init}"
+ + + +
+[docs] +@dataclass +@_rule_handler("structure_type_declaration", comments=True) +class StructureTypeDeclaration: + """ + Full structure type declaration, as part of a TYPE. + + Examples:: + + TypeName EXTENDS Other.Type : + STRUCT + iValue : INT; + END_STRUCT + + TypeName : POINTER TO + STRUCT + iValue : INT; + END_STRUCT + + TypeName : POINTER TO + STRUCT + iValue : INT := 3 + 4; + stTest : ST_Testing := (1, 2); + eValue : E_Test := E_Test.ABC; + arrValue : ARRAY [1..2] OF INT := [1, 2]; + arrValue1 : INT (1..2); + arrValue1 : (Value1 := 1) INT; + sValue : STRING := 'abc'; + iValue1 AT %I* : INT := 5; + sValue1 : STRING[10] := 'test'; + END_STRUCT + """ + name: lark.Token + extends: Optional[Extends] + indirection: Optional[IndirectionType] + declarations: List[StructureElementDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + name: lark.Token, + extends: Optional[Extends], + indirection: Optional[IndirectionType], + *declarations: StructureElementDeclaration, + ): + return StructureTypeDeclaration( + name=name, + extends=extends, + indirection=indirection, + declarations=list(declarations), + )
+ + + def __str__(self) -> str: + if self.declarations: + body = "\n".join( + ( + "STRUCT", + indent("\n".join(str(decl) for decl in self.declarations)), + "END_STRUCT", + ) + ) + else: + body = "\n".join(("STRUCT", "END_STRUCT")) + + definition = join_if(self.name, " ", self.extends) + indirection = f" {self.indirection}" if self.indirection else "" + return f"{definition} :{indirection}\n{body}"
+ + + +
+[docs] +@dataclass +@_rule_handler("structure_element_declaration", comments=True) +class StructureElementDeclaration: + """ + Declaration of a single element of a structure. + + Examples:: + + iValue : INT := 3 + 4; + stTest : ST_Testing := (1, 2); + eValue : E_Test := E_Test.ABC; + arrValue : ARRAY [1..2] OF INT := [1, 2]; + arrValue1 : INT (1..2); + arrValue1 : (Value1 := 1) INT; + sValue : STRING := 'abc'; + iValue1 AT %I* : INT := 5; + sValue1 : STRING[10] := 'test'; + """ + name: lark.Token + location: Optional[IncompleteLocation] + init: Union[ + StructureInitialization, + ArrayTypeInitialization, + StringTypeInitialization, + TypeInitialization, + SubrangeTypeInitialization, + EnumeratedTypeInitialization, + InitializedStructure, + FunctionCall, + ] + meta: Optional[Meta] = meta_field() + + @property + def variables(self) -> List[str]: + """API compat: list of variable names.""" + return [self.name] + + @property + def value(self) -> str: + """The initialization value, if applicable.""" + if isinstance(self.init, StructureInitialization): + return str(self.init) + return str(self.init.value) + + @property + def base_type_name(self) -> Union[lark.Token, str]: + """The base type name.""" + if isinstance(self.init, StructureInitialization): + return self.name + return self.init.base_type_name + + @property + def full_type_name(self) -> lark.Token: + """The full type name.""" + if isinstance(self.init, StructureInitialization): + return self.name + return self.init.full_type_name + + def __str__(self) -> str: + name_and_location = join_if(self.name, " ", self.location) + return f"{name_and_location} : {self.init};"
+ + + +UnionElementSpecification = Union[ + ArraySpecification, + SimpleSpecification, + SubrangeSpecification, + EnumeratedSpecification, + IndirectSimpleSpecification, +] + + +
+[docs] +@dataclass +@_rule_handler("union_element_declaration", comments=True) +class UnionElementDeclaration: + """ + Declaration of a single element of a union. + + Similar to a structure element, but not all types are supported and no + initialization/default values are allowed. + + Examples:: + + iValue : INT; + arrValue : ARRAY [1..2] OF INT; + arrValue1 : INT (1..2); + arrValue1 : (Value1 := 1) INT; + sValue : STRING; + psValue1 : POINTER TO STRING[10]; + """ + name: lark.Token + spec: UnionElementSpecification + meta: Optional[Meta] = meta_field() + + @property + def variables(self) -> List[str]: + """API compat""" + return [self.name] + + def __str__(self) -> str: + return f"{self.name} : {self.spec};"
+ + + +
+[docs] +@dataclass +@_rule_handler("union_type_declaration", comments=True) +class UnionTypeDeclaration: + """ + A full declaration of a UNION type, as part of a TYPE/END_TYPE block. + + Examples:: + + UNION + iVal : INT; + aAsBytes : ARRAY [0..2] OF BYTE; + END_UNION + + UNION + iValue : INT; + eValue : (iValue := 1, iValue2 := 2) INT; + END_UNION + """ + name: lark.Token + declarations: List[UnionElementDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(name: lark.Token, *decls: UnionElementDeclaration): + return UnionTypeDeclaration( + name=name, + declarations=list(decls), + )
+ + + def __str__(self) -> str: + if not self.declarations: + decls = None + else: + decls = indent( + "\n".join( + str(decl) for decl in self.declarations + ) + ) + + return "\n".join( + line for line in ( + f"{self.name} :", + "UNION", + decls, + "END_UNION", + ) + if line is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("initialized_structure") +class InitializedStructure(TypeInitializationBase): + """ + A named initialized structure. + + Examples:: + + ST_TypeName := (iValue := 0, bValue := TRUE) + """ + name: lark.Token + init: StructureInitialization + meta: Optional[Meta] = meta_field() + + @property + def value(self) -> str: + """The initialization value (call).""" + return str(self.init) + + def __str__(self) -> str: + return f"{self.name} := {self.init}"
+ + + +
+[docs] +@dataclass +@_rule_handler("structure_initialization") +class StructureInitialization: + """ + A structure initialization (i.e., default values) of one or more elements. + + Elements may be either positional or named. Used in the following: + + 1. Structure element initialization of default values:: + + stStruct : ST_TypeName := (iValue := 0, bValue := TRUE) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + 2. Function block declarations (fb_name_decl, fb_invocation_decl):: + + fbSample : FB_Sample(nInitParam := 1) := (nInput := 2, nMyProperty := 3) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + fbSample : FB_Sample := (nInput := 2, nMyProperty := 3) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + 3. Array object initializers (object_initializer_array):: + + runners : ARRAY[1..2] OF FB_Runner[(name := 'one'), (name := 'two')] + [^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^] + """ + elements: List[StructureElementInitialization] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*elements: StructureElementInitialization): + return StructureInitialization(elements=list(elements))
+ + + def __str__(self) -> str: + parts = ", ".join(str(element) for element in self.elements) + return f"({parts})"
+ + + +
+[docs] +@dataclass +@_rule_handler("structure_element_initialization") +class StructureElementInitialization: + """ + An initialization (default) value for a structure element. + + This may come in the form of:: + + name := value + + or simply:: + + value + + ``value`` may refer to an expression, an enumerated value, represent + a whole array, or represent a nested structure. + """ + name: Optional[lark.Token] + value: Union[ + Constant, + Expression, + EnumeratedValue, + ArrayInitialization, + StructureInitialization, + ] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*args): + if len(args) == 1: + name = None + value, = args + else: + name, value = args + return StructureElementInitialization(name=name, value=value)
+ + + def __str__(self) -> str: + if self.name: + return f"{self.name} := {self.value}" + return f"{self.value}"
+ + + +
+[docs] +@dataclass +@_rule_handler("unary_expression") +class UnaryOperation(Expression): + """A unary - single operand - operation: ``NOT``, ``-``, or ``+``.""" + op: lark.Token + expr: Expression + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(operator: Optional[lark.Token], expr: Expression): + if operator is None: + return expr + return UnaryOperation( + op=operator, + expr=expr, + )
+ + + def __str__(self) -> str: + if self.op in "-+": + return f"{self.op}{self.expr}" + return f"{self.op} {self.expr}"
+ + + +
+[docs] +@dataclass +@_rule_handler( + "expression", + "add_expression", + "and_expression", + "and_then_expression", + "or_else_expression", + "assignment_expression", + "xor_expression", + "comparison_expression", + "equality_expression", + "expression_term" +) +class BinaryOperation(Expression): + """ + A binary (i.e., two operand) operation. + + Examples:: + + a + b + a AND b + a AND_THEN b + a OR_ELSE b + a := b + a XOR b + a = b + -a * b + a * 1.0 + + Expressions may be nested in either the left or right operand. + """ + left: Expression + op: lark.Token + right: Expression + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(left: Expression, *operator_and_expr: Union[lark.Token, Expression]): + if not operator_and_expr: + return left + + def get_operator_and_expr() -> Generator[Tuple[lark.Token, Expression], None, None]: + operators = typing.cast(Tuple[lark.Token, ...], operator_and_expr[::2]) + expressions = typing.cast(Tuple[Expression, ...], operator_and_expr[1::2]) + yield from zip(operators, expressions) + + binop = None + for operator, expression in get_operator_and_expr(): + if binop is None: + binop = BinaryOperation( + left=left, + op=operator, + right=expression + ) + else: + binop = BinaryOperation( + left=binop, + op=operator, + right=expression, + ) + return binop
+ + + def __str__(self): + return f"{self.left} {self.op} {self.right}"
+ + + +
+[docs] +@dataclass +@_rule_handler("parenthesized_expression") +class ParenthesizedExpression(Expression): + """ + An expression with parentheses around it. + + Examples:: + + (a * b) + (1 + b) + """ + expr: Expression + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return f"({self.expr})"
+ + + +
+[docs] +@dataclass +@_rule_handler("bracketed_expression") +class BracketedExpression(Expression): + """ + An expression with square brackets around it. + + This is used exclusively in string length specifications. + + Examples:: + + [a * b] + [255] + + See also :class:`StringSpecLength`. + """ + expression: Expression + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return f"[{self.expression}]"
+ + + +
+[docs] +@dataclass +@_rule_handler("string_spec_length") +class StringSpecLength: + """ + The length of a defined string. + + The grammar makes a distinction between brackets and parentheses, though + they appear to be functionally equivalent. + + Examples:: + + [1] + (1) + [255] + """ + + length: Union[ParenthesizedExpression, BracketedExpression] + + def __str__(self) -> str: + return str(self.length)
+ + + +
+[docs] +@dataclass +@_rule_handler("function_call") +class FunctionCall(Expression): + """ + A function (function block, method, action, etc.) call. + + The return value may be dereferenced with a carat (``^``). + + Examples:: + + A()^ + A(1, 2) + A(1, 2, sName:='test', iOutput=>) + A.B[1].C(1, 2) + """ + #: The function name. + name: SymbolicVariable + #: Positional, naed, or output parameters. + parameters: List[ParameterAssignment] + #: Dereference the return value? + dereferenced: bool + meta: Optional[Meta] = meta_field() + + @property + def base_type_name(self) -> str: + """ + The base type name. + + This is used as part of the summary mechanism. The "type" is that + of the underlying function block or function. + """ + if isinstance(self.name, SimpleVariable): + return str(self.name.name) + return str(self.name) + + @property + def full_type_name(self) -> str: + """The full type name, including any dereferencing or subscripts.""" + return str(self.name) + + @property + def value(self) -> str: + """ + The initialization value (the function call itself). + + This is used as part of the summary tool. + """ + return str(self) + +
+[docs] + @staticmethod + def from_lark( + name: SymbolicVariable, + *params: Union[ParameterAssignment, lark.Token, None], + ) -> FunctionCall: + # Condition parameters (which may be `None`) to represent empty tuple + if params and params[0] is None: + params = params[1:] + dereferenced = bool(params and params[-1] == "^") + if dereferenced: + params = params[:-1] + + return FunctionCall( + name=name, + parameters=typing.cast(List[ParameterAssignment], list(params)), + dereferenced=dereferenced, + )
+ + + def __str__(self) -> str: + dereference = "" + parameters = ", ".join(str(param) for param in self.parameters) + if self.dereferenced: + dereference = "^" + return f"{self.name}({parameters}){dereference}"
+ + + +
+[docs] +@dataclass +@_rule_handler("chained_function_call") +class ChainedFunctionCall(Expression): + """ + A set of chained function (function block, method, action, etc.) calls. + + The return value may be dereferenced with a carat (``^``). + + Examples:: + + A()^.B() + A(1, 2).B().C() + A(1, 2, sName:='test', iOutput=>).C().D() + A.B[1].C(1, 2) + """ + invocations: List[FunctionCall] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*invocations: FunctionCall) -> ChainedFunctionCall: + return ChainedFunctionCall( + invocations=list(invocations) + )
+ + + def __str__(self) -> str: + return ".".join(str(invocation) for invocation in self.invocations)
+ + + +
+[docs] +@dataclass +@_rule_handler("var1") +class DeclaredVariable: + """ + A single declared variable name and optional [direct or incomplete] location. + + Examples:: + + iVar + iVar AT %I* + iVar AT %IX1.1 + """ + + # Alternate name: VariableWithLocation? MaybeLocatedVariable? + variable: SimpleVariable + location: Optional[Union[IncompleteLocation, Location]] + meta: Optional[Meta] = meta_field() + + @property + def name(self) -> lark.Token: + """The variable name.""" + return self.variable.name + + @property + def dereferenced(self) -> bool: + """Is the variable dereferenced with '^'?.""" + return self.variable.dereferenced + + def __str__(self) -> str: + return join_if(self.variable, " ", self.location)
+ + + +
+[docs] +@dataclass +class _GenericInit: + """API compat to give a valid init attribute.""" + # TODO: can we restructure this to be less confusing? + base_type_name: str + full_type_name: str + repr: str + value: Optional[str] + + def __str__(self) -> str: + return str(self.repr)
+ + + +InitDeclarationType = Union[ + TypeInitialization, + SubrangeTypeInitialization, + EnumeratedTypeInitialization, + ArrayTypeInitialization, + InitializedStructure, + _GenericInit, # StringVariableInitDeclaration, EdgeDeclaration +] + + +
+[docs] +class InitDeclaration: + """ + Base class for a declaration of one or more variables with a type initialization. + """ + variables: List[DeclaredVariable] + init: InitDeclarationType + meta: Optional[Meta] + + def __str__(self) -> str: + variables = ", ".join(str(variable) for variable in self.variables) + return f"{variables} : {self.init}"
+ + + +
+[docs] +@dataclass +@_rule_handler("var1_init_decl", comments=True) +class VariableOneInitDeclaration(InitDeclaration): + """ + A declaration of one or more variables with a type, subrange, or enumerated + type initialization. + + Examples:: + + stVar1, stVar2 : (Value1, Value2) + stVar1, stVar2 : (Value1 := 0, Value2 := 1) + stVar1 : INT (1..2) := 25 + stVar1, stVar2 : TypeName := Value + stVar1, stVar2 : (Value1 := 1, Value2 := 2) + stVar1, stVar2 : (Value1 := 1, Value2 := 2) INT := Value1 + """ + variables: List[DeclaredVariable] + init: Union[TypeInitialization, SubrangeTypeInitialization, EnumeratedTypeInitialization] + meta: Optional[Meta] = meta_field()
+ + + +
+[docs] +@dataclass +@_rule_handler("array_var_init_decl", comments=True) +class ArrayVariableInitDeclaration(InitDeclaration): + """ + A declaration of one or more variables with array type initialization and + optional default (initialization) value. + + May be indirect (e.g., POINTER TO). + + Examples:: + + aVal1, aVal2 : ARRAY[*] OF TypeName + aVal1 : ARRAY[1..2] OF Call(1, 2) := [1, 2] + aVal1 : POINTER TO ARRAY[1..2] OF Call(1, 2) + """ + variables: List[DeclaredVariable] + init: ArrayTypeInitialization + meta: Optional[Meta] = meta_field()
+ + + +
+[docs] +@dataclass +@_rule_handler("structured_var_init_decl", comments=True) +class StructuredVariableInitDeclaration(InitDeclaration): + """ + A declaration of one or more variables using a named initialized structure. + + Examples:: + + stVar1 : ST_TypeName := (iValue := 0, bValue := TRUE) + stVar1, stVar2 : ST_TypeName := (iValue = 0, bValue := TRUE) + """ + variables: List[DeclaredVariable] + init: InitializedStructure + meta: Optional[Meta] = meta_field()
+ + + +
+[docs] +@dataclass +@_rule_handler( + "single_byte_string_var_declaration", + "double_byte_string_var_declaration", + comments=True +) +class StringVariableInitDeclaration(InitDeclaration): + """ + A declaration of one or more variables using single/double byte strings, + with an optinoal initialization value. + + Examples:: + + sVar1 : STRING(2_500_000) := 'test1' + sVar2, sVar3 : STRING(Param.iLower) := 'test2' + sVar4, sVar5 : WSTRING(Param.iLower) := "test3" + """ + variables: List[DeclaredVariable] + spec: StringTypeSpecification + value: Optional[lark.Token] + init: _GenericInit + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(variables: List[DeclaredVariable], string_info: StringTypeInitialization): + return StringVariableInitDeclaration( + variables=variables, + spec=string_info.spec, + value=string_info.value, + init=_GenericInit( + base_type_name=str(string_info.spec.base_type_name), + full_type_name=str(string_info.spec.full_type_name), + value=str(string_info.value), + repr=join_if(string_info.spec, " := ", string_info.value), + ) + )
+
+ + + +
+[docs] +@dataclass +@_rule_handler("edge_declaration", comments=True) +class EdgeDeclaration(InitDeclaration): + """ + An edge declaration of one or more variables. + + Examples:: + + iValue AT %IX1.1 : BOOL R_EDGE + iValue : BOOL F_EDGE + """ + variables: List[DeclaredVariable] + edge: lark.Token + meta: Optional[Meta] = meta_field() + + def __post_init__(self): + full_type_name = f"BOOL {self.edge}" + self.init = _GenericInit( + base_type_name="BOOL", + full_type_name=full_type_name, + value=None, + repr=full_type_name, + ) + + def __str__(self): + variables = ", ".join(str(variable) for variable in self.variables) + return f"{variables} : {self.init.full_type_name}"
+ + + +
+[docs] +@as_tagged_union +class FunctionBlockDeclaration: + """ + Base class for declarations of variables using function blocks. + + May either be by name (:class:`FunctionBlockNameDeclaration`) or invocation + :class:`FunctionBlockInvocationDeclaration`). Marked as a "tagged union" so + that serialization will uniquely identify the Python class. + """ + ...
+ + + +
+[docs] +@dataclass +@_rule_handler("fb_name_decl", comments=True) +class FunctionBlockNameDeclaration(FunctionBlockDeclaration): + """ + Base class for declarations of variables using function blocks by name. + + Examples:: + + fbName1 : FB_Name + fbName1 : FB_Name := (iValue := 0, bValue := TRUE) + """ + variables: List[lark.Token] # fb_decl_name_list -> fb_name + spec: lark.Token + init: Optional[StructureInitialization] = None + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + variables = ", ".join(self.variables) + name_and_type = f"{variables} : {self.spec}" + return join_if(name_and_type, " := ", self.init)
+ + + +
+[docs] +@dataclass +@_rule_handler("fb_invocation_decl", comments=True) +class FunctionBlockInvocationDeclaration(FunctionBlockDeclaration): + """ + Base class for declarations of variables using function blocks by invocation. + + Examples:: + + fbSample : FB_Sample(nInitParam := 1) := (nInput := 2, nMyProperty := 3) + """ + variables: List[lark.Token] + init: FunctionCall + defaults: Optional[StructureInitialization] = None + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + variables = ", ".join(self.variables) + name_and_type = f"{variables} : {self.init}" + return join_if(name_and_type, " := ", self.defaults)
+ + + +
+[docs] +@as_tagged_union +class ParameterAssignment: + """ + Base class for assigned parameters in function calls. + + May be either input parameters (positional or named ``name :=``) or output + parameters (named as in ``name =>``, ``NOT name =>``). Marked as a "tagged + union" so that serialization will uniquely identify the Python class. + """ + ...
+ + + +
+[docs] +@dataclass +@_rule_handler("param_assignment", "input_param_assignment") +class InputParameterAssignment(ParameterAssignment): + """ + An input parameter in a function call. + + May be a nameless positional parameter or a named one. + + Examples:: + + name := value + """ + name: Optional[SimpleVariable] + value: Optional[Expression] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*args) -> InputParameterAssignment: + if len(args) == 1: + value, = args + name = None + else: + name, value = args + return InputParameterAssignment(name, value)
+ + + def __str__(self) -> str: + return join_if(self.name, " := ", self.value)
+ + + +
+[docs] +@dataclass +@_rule_handler("output_parameter_assignment") +class OutputParameterAssignment(ParameterAssignment): + """ + A named output parameter, which may be inverted. + + Examples:: + + name => output + NOT name => output2 + name => + NOT name => + """ + name: SimpleVariable + value: Optional[Expression] + inverted: bool = False + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + inverted: Optional[lark.Token], + name: SimpleVariable, + value: Expression, + ) -> OutputParameterAssignment: + return OutputParameterAssignment( + name=name, value=value, inverted=inverted is not None + )
+ + + def __str__(self) -> str: + prefix = "NOT " if self.inverted else "" + return prefix + join_if(self.name, " => ", self.value)
+ + + +AnyLocation = Union[Location, IncompleteLocation] + + +
+[docs] +@dataclass +@_rule_handler("global_var_spec") +class GlobalVariableSpec: + """ + Global variable specification; the part that comes before the + initialization. + + Located (or incomplete located) specifications only apply to one variable, + whereas simple specifications can have multiple variables. + + Examples:: + + iValue1, iValue2 + iValue3 AT %I* + iValue4 AT %IX1.1 + """ + variables: List[lark.Token] + location: Optional[AnyLocation] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + name_or_names: Union[lark.Token, lark.Tree], + location: Optional[AnyLocation] = None + ) -> GlobalVariableSpec: + if location is None: + # Multiple variables without a location + name_tree = typing.cast(lark.Tree, name_or_names) + variables = typing.cast(List[lark.Token], name_tree.children) + else: + # Only one variable allowed with a location + variables = typing.cast(List[lark.Token], [name_or_names]) + return GlobalVariableSpec(variables=variables, location=location)
+ + + def __str__(self) -> str: + if not self.location: + return ", ".join(self.variables) + return f"{self.variables[0]} {self.location}"
+ + + +LocatedVariableSpecInit = Union[ + TypeInitialization, + SubrangeTypeInitialization, + EnumeratedTypeInitialization, + ArrayTypeInitialization, + InitializedStructure, + StringTypeInitialization, +] + + +
+[docs] +@dataclass +@_rule_handler("global_var_decl", comments=True) +class GlobalVariableDeclaration: + """ + A declaration of one or more global variables: name and location + specification and initialization type. + + Examples:: + + fValue1 : INT; + fValue2 : INT (0..10); + fValue3 : (A, B); + fValue4 : (A, B) DINT; + fValue5 : ARRAY [1..10] OF INT; + fValue6 : ARRAY [1..10] OF ARRAY [1..10] OF INT; + fValue7 : FB_Test(1, 2, 3); + fValue8 : FB_Test(A := 1, B := 2, C => 3); + fValue9 : STRING[10] := 'abc'; + """ + spec: GlobalVariableSpec + init: Union[LocatedVariableSpecInit, FunctionCall] + meta: Optional[Meta] = meta_field() + + @property + def variables(self) -> List[lark.Token]: + """The variable names contained.""" + return self.spec.variables + + @property + def location(self) -> Optional[AnyLocation]: + """The (optional) variable location.""" + return self.spec.location + + @property + def base_type_name(self) -> Union[str, lark.Token]: + """The base type name of the variable(s).""" + return self.init.base_type_name + + @property + def full_type_name(self) -> Union[str, lark.Token]: + """The full type name of the variable(s).""" + return self.init.full_type_name + + def __str__(self) -> str: + return f"{self.spec} : {self.init};"
+ + + +
+[docs] +@dataclass +@_rule_handler("extends") +class Extends: + """ + The "EXTENDS" portion of a function block, interface, structure, etc. + + Examples:: + + EXTENDS stName + EXTENDS FB_Name + """ + + name: lark.Token + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return f"EXTENDS {self.name}"
+ + + +
+[docs] +@dataclass +@_rule_handler("implements") +class Implements: + """ + The "IMPLEMENTS" portion of a function block, indicating it implements + one or more interfaces. + + Examples:: + + IMPLEMENTS I_Interface1 + IMPLEMENTS I_Interface1, I_Interface2 + """ + + interfaces: List[lark.Token] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + *interfaces: lark.Token, + ) -> Implements: + return Implements(interfaces=list(interfaces))
+ + + def __str__(self) -> str: + return "IMPLEMENTS " + ", ".join(self.interfaces)
+ + + +
+[docs] +@dataclass +@_rule_handler("function_block_type_declaration", comments=True) +class FunctionBlock: + """ + A full function block type declaration. + + A function block distinguishes itself from a regular function by having + state and potentially having actions, methods, and properties. These + additional parts are separate in this grammar (i.e., they do not appear + within the FUNCTION_BLOCK itself). + + An implementation is optional, but ``END_FUNCTION_BLOCK`` is required. + + Examples:: + + FUNCTION_BLOCK FB_EmptyFunctionBlock + END_FUNCTION_BLOCK + + FUNCTION_BLOCK FB_Implementer IMPLEMENTS I_fbName + END_FUNCTION_BLOCK + + FUNCTION_BLOCK ABSTRACT FB_Extender EXTENDS OtherFbName + END_FUNCTION_BLOCK + + FUNCTION_BLOCK FB_WithVariables + VAR_INPUT + bExecute : BOOL; + END_VAR + VAR_OUTPUT + iResult : INT; + END_VAR + END_FUNCTION_BLOCK + """ + name: lark.Token + access: Optional[AccessSpecifier] + extends: Optional[Extends] + implements: Optional[Implements] + declarations: List[VariableDeclarationBlock] + body: Optional[FunctionBlockBody] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + fb_token: lark.Token, + access: Optional[AccessSpecifier], + derived_name: lark.Token, + extends: Optional[Extends], + implements: Optional[Implements], + *args + ) -> FunctionBlock: + *declarations, body, _ = args + return FunctionBlock( + name=derived_name, + access=access, + extends=extends, + implements=implements, + declarations=list(declarations), + body=body, + )
+ + + def __str__(self) -> str: + access_and_name = join_if(self.access, " ", self.name) + header = f"FUNCTION_BLOCK {access_and_name}" + header = join_if(header, " ", self.implements) + header = join_if(header, " ", self.extends) + return "\n".join( + line for line in + ( + header, + *[str(declaration) for declaration in self.declarations], + indent_if(self.body), + "END_FUNCTION_BLOCK", + ) + if line is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("function_declaration", comments=True) +class Function: + """ + A full function block type declaration, with nested variable declaration blocks. + + An implementation is optional, but ``END_FUNCTION`` is required. + + Examples:: + + FUNCTION FuncName : INT + VAR_INPUT + iValue : INT := 0; + END_VAR + FuncName := iValue; + END_FUNCTION + """ + access: Optional[AccessSpecifier] + name: lark.Token + return_type: Optional[Union[SimpleSpecification, IndirectSimpleSpecification]] + declarations: List[VariableDeclarationBlock] + body: Optional[FunctionBody] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + access: Optional[AccessSpecifier], + name: lark.Token, + return_type: Optional[Union[SimpleSpecification, IndirectSimpleSpecification]], + *remainder + ) -> Function: + *declarations, body = remainder + return Function( + name=name, + access=access, + return_type=return_type, + declarations=typing.cast( + List[VariableDeclarationBlock], list(declarations) + ), + body=typing.cast(Optional[FunctionBody], body), + )
+ + + def __str__(self) -> str: + access_and_name = join_if(self.access, " ", self.name) + function = f"FUNCTION {access_and_name}" + return_type = f": {self.return_type}" if self.return_type else None + return "\n".join( + line for line in + ( + join_if(function, " ", return_type), + *[indent_if(declaration) for declaration in self.declarations], + indent_if(self.body), + "END_FUNCTION", + ) + if line is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("program_declaration", comments=True) +class Program: + """ + A full program declaration, with nested variable declaration blocks. + + An implementation is optional, but ``END_PROGRAM`` is required. + + Examples:: + + PROGRAM ProgramName + VAR_INPUT + iValue : INT; + END_VAR + VAR_ACCESS + AccessName : SymbolicVariable : TypeName READ_WRITE; + END_VAR + iValue := iValue + 1; + END_PROGRAM + """ + name: lark.Token + declarations: List[VariableDeclarationBlock] + body: Optional[FunctionBody] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return "\n".join( + s for s in ( + f"PROGRAM {self.name}", + *[indent_if(decl) for decl in self.declarations], + indent_if(self.body), + "END_PROGRAM", + ) + if s is not None + )
+ + + +InterfaceVariableDeclarationBlock = Union[ + "InputDeclarations", + "OutputDeclarations", + "InputOutputDeclarations", + "ExternalVariableDeclarations", + "VariableDeclarations", +] + + +
+[docs] +@dataclass +@_rule_handler("interface_declaration", comments=True) +class Interface: + """ + A full interface declaration, with nested variable declaration blocks. + + An implementation is not allowed for interfaces, but ``END_INTERFACE`` is + still required. + + Examples:: + + """ + name: lark.Token + extends: Optional[Extends] + # TODO: want this to be tagged during serialization, so it's kept as + # VariableDeclarationBlock. More specifically it is + # declarations: List[InterfaceVariableDeclarationBlock] + declarations: List[VariableDeclarationBlock] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + name: lark.Token, + # access: Optional[AccessSpecifier], + extends: Optional[Extends], + *decls: VariableDeclarationBlock, + ) -> Interface: + return Interface( + name=name, + extends=extends, + declarations=list(decls), + )
+ + + def __str__(self) -> str: + header = f"INTERFACE {self.name}" + header = join_if(header, " ", self.extends) + return "\n".join( + line for line in + ( + header, + *[str(declaration) for declaration in self.declarations], + "END_INTERFACE", + ) + if line is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("action", comments=True) +class Action: + """ + A full, named action declaration. + + Actions belong to function blocks. Actions may not contain variable blocks, + but may contain an implementation. Variable references are assumed to be + from the local namespace (i.e., the owner function block) or in the global + scope. + + Examples:: + + ACTION ActName + END_ACTION + + ACTION ActName + iValue := iValue + 2; + END_ACTION + """ + name: lark.Token + body: Optional[FunctionBody] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return "\n".join( + line for line in + ( + f"ACTION {self.name}:", + indent_if(self.body), + "END_ACTION", + ) + if line is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("function_block_method_declaration", comments=True) +class Method: + """ + A full, named method declaration. + + Methods belong to function blocks. Methods may contain variable blocks + and a return type, and may also contain an implementation. + + Examples:: + + METHOD PRIVATE MethodName : ARRAY [1..2] OF INT + END_METHOD + + METHOD MethodName : INT + MethodName := 1; + END_METHOD + """ + access: Optional[AccessSpecifier] + name: lark.Token + return_type: Optional[LocatedVariableSpecInit] + declarations: List[VariableDeclarationBlock] + body: Optional[FunctionBody] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + access: Optional[AccessSpecifier], + name: lark.Token, + return_type: Optional[LocatedVariableSpecInit], + *args + ) -> Method: + *declarations, body = args + return Method( + name=name, + access=access, + return_type=return_type, + declarations=list(declarations), + body=body, + )
+ + + def __str__(self) -> str: + access_and_name = join_if(self.access, " ", self.name) + method = join_if(access_and_name, " : ", self.return_type) + return "\n".join( + line for line in + ( + f"METHOD {method}", + *[indent_if(declaration) for declaration in self.declarations], + indent_if(self.body), + "END_METHOD", + ) + if line is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("function_block_property_declaration", comments=True) +class Property: + """ + A named property declaration, which may pertain to a ``get`` or ``set``. + + Properties belong to function blocks. Properties may contain variable + blocks and a return type, and may also contain an implementation. + + Examples:: + + PROPERTY PropertyName : RETURNTYPE + VAR_INPUT + bExecute : BOOL; + END_VAR + VAR_OUTPUT + iResult : INT; + END_VAR + iResult := 5; + PropertyName := iResult + 1; + END_PROPERTY + + PROPERTY PRIVATE PropertyName : ARRAY [1..2] OF INT + END_PROPERTY + """ + access: Optional[AccessSpecifier] + name: lark.Token + return_type: Optional[LocatedVariableSpecInit] + declarations: List[VariableDeclarationBlock] + body: Optional[FunctionBody] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + access: Optional[AccessSpecifier], + name: lark.Token, + return_type: Optional[LocatedVariableSpecInit], + *args + ) -> Property: + *declarations, body = args + return Property( + name=name, + access=access, + return_type=return_type, + declarations=list(declarations), + body=body, + )
+ + + def __str__(self) -> str: + access_and_name = join_if(self.access, " ", self.name) + property = join_if(access_and_name, " : ", self.return_type) + return "\n".join( + line for line in + ( + f"PROPERTY {property}", + *[indent_if(declaration) for declaration in self.declarations], + indent_if(self.body), + "END_PROPERTY", + ) + if line is not None + )
+ + + +VariableInitDeclaration = Union[ + ArrayVariableInitDeclaration, + StringVariableInitDeclaration, + VariableOneInitDeclaration, + FunctionBlockDeclaration, + EdgeDeclaration, + StructuredVariableInitDeclaration, +] + +InputOutputDeclaration = VariableInitDeclaration +OutputDeclaration = VariableInitDeclaration + +InputDeclaration = Union[ + VariableInitDeclaration, + EdgeDeclaration, +] +GlobalVariableDeclarationType = Union[ + VariableInitDeclaration, + GlobalVariableDeclaration, +] + + +
+[docs] +@as_tagged_union +class VariableDeclarationBlock: + """ + Base class for variable declaration blocks. + + Marked as a "tagged union" so that serialization will uniquely identify the + Python class. + """ + block_header: ClassVar[str] = "VAR" + items: List[Any] + meta: Optional[Meta] + + @property + def attribute_pragmas(self) -> List[str]: + """Attribute pragmas associated with the variable declaration block.""" + # TODO: deprecate + return getattr(self.meta, "attribute_pragmas", [])
+ + + +
+[docs] +@dataclass +@_rule_handler("var_declarations", comments=True) +class VariableDeclarations(VariableDeclarationBlock): + """ + Variable declarations block (``VAR``). + + May be annotated with attributes (see :class:`VariableAttributes`). + """ + block_header: ClassVar[str] = "VAR" + attrs: Optional[VariableAttributes] + items: List[VariableInitDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], tree: lark.Tree + ) -> VariableDeclarations: + items = typing.cast(List[VariableInitDeclaration], tree.children) + return VariableDeclarations(attrs=attrs, items=items)
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR", " ", self.attrs), + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("static_var_declarations", comments=True) +class StaticDeclarations(VariableDeclarationBlock): + """ + Static variable declarations block (``VAR_STAT``). + + May be annotated with attributes (see :class:`VariableAttributes`). + """ + block_header: ClassVar[str] = "VAR_STAT" + attrs: Optional[VariableAttributes] + items: List[VariableInitDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], + tree: lark.Tree, + ) -> StaticDeclarations: + items = typing.cast(List[VariableInitDeclaration], tree.children) + return StaticDeclarations(attrs, list(items))
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR_STAT", " ", self.attrs), + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("temp_var_decls", comments=True) +class TemporaryVariableDeclarations(VariableDeclarationBlock): + """ + Temporary variable declarations block (``VAR_TEMP``). + + May be annotated with attributes (see :class:`VariableAttributes`). + """ + block_header: ClassVar[str] = "VAR_TEMP" + items: List[VariableInitDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(items: lark.Tree) -> TemporaryVariableDeclarations: + return TemporaryVariableDeclarations( + typing.cast(List[VariableInitDeclaration], items.children) + )
+ + + def __str__(self) -> str: + return "\n".join( + ( + "VAR_TEMP", + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("var_inst_declaration", comments=True) +class MethodInstanceVariableDeclarations(VariableDeclarationBlock): + """ + Declarations block for instance variables in methods (``VAR_INST``). + + May be annotated with attributes (see :class:`VariableAttributes`). + """ + block_header: ClassVar[str] = "VAR_INST" + attrs: Optional[VariableAttributes] + items: List[VariableInitDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], items: lark.Tree + ) -> MethodInstanceVariableDeclarations: + return MethodInstanceVariableDeclarations( + attrs=attrs, + items=typing.cast( + List[VariableInitDeclaration], + items.children + ) + )
+ + + def __str__(self) -> str: + return "\n".join( + ( + "VAR_INST", + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("located_var_decl", comments=True) +class LocatedVariableDeclaration: + """ + Declaration of a variable in a VAR block that is located. + """ + # TODO examples + name: Optional[SimpleVariable] + location: Location + init: LocatedVariableSpecInit + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + name_and_location = join_if(self.name, " ", self.location) + return f"{name_and_location} : {self.init}"
+ + + +
+[docs] +@dataclass +@_rule_handler("located_var_declarations", comments=True) +class LocatedVariableDeclarations(VariableDeclarationBlock): + """ + Located variable declarations block (``VAR``). + + May be annotated with attributes (see :class:`VariableAttributes`). + + All variables in this are expected to be located (e.g., ``AT %IX1.1``). + """ + block_header: ClassVar[str] = "VAR" + attrs: Optional[VariableAttributes] + items: List[LocatedVariableDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], + *items: LocatedVariableDeclaration, + ) -> LocatedVariableDeclarations: + return LocatedVariableDeclarations( + attrs=attrs, + items=list(items), + )
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR", " ", self.attrs), + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +#: var_spec in the grammar +IncompleteLocatedVariableSpecInit = Union[ + SimpleSpecification, + SubrangeTypeInitialization, + EnumeratedTypeInitialization, + StringTypeSpecification, +] + + +
+[docs] +@dataclass +@_rule_handler("incomplete_located_var_decl", comments=True) +class IncompleteLocatedVariableDeclaration: + """ + A named, incomplete located variable declaration inside a variable block. + """ + name: SimpleVariable + location: IncompleteLocation + init: IncompleteLocatedVariableSpecInit + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + name_and_location = join_if(self.name, " ", self.location) + return f"{name_and_location} : {self.init}"
+ + + +
+[docs] +@dataclass +@_rule_handler("incomplete_located_var_declarations", comments=True) +class IncompleteLocatedVariableDeclarations(VariableDeclarationBlock): + """ + Incomplete located variable declarations block (``VAR``). + + May be annotated with attributes (see :class:`VariableAttributes`). + + All variables in this are expected to have incomplete locations (e.g., just + ``%I*``). + """ + block_header: ClassVar[str] = "VAR" + attrs: Optional[VariableAttributes] + items: List[IncompleteLocatedVariableDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], + *items: IncompleteLocatedVariableDeclaration, + ) -> IncompleteLocatedVariableDeclarations: + return IncompleteLocatedVariableDeclarations( + attrs=attrs, + items=list(items), + )
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR", " ", self.attrs), + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("external_declaration", comments=True) +class ExternalVariableDeclaration: + """ + A named, external variable declaration inside a variable block. + """ + name: lark.Token + spec: Union[ + SimpleSpecification, + lark.Token, # SIMPLE_SPECIFICATION / STRUCTURE_TYPE_NAME / FUNCTION_BLOCK_TYPE_NAME + SubrangeSpecification, + EnumeratedSpecification, + ArraySpecification, + ] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return f"{self.name} : {self.spec}"
+ + + +
+[docs] +@dataclass +@_rule_handler("external_var_declarations", comments=True) +class ExternalVariableDeclarations(VariableDeclarationBlock): + """ + A block of named, external variable declarations (``VAR_EXTERNAL``). + + May be annotated with attributes (see :class:`VariableAttributes`). + """ + block_header: ClassVar[str] = "VAR_EXTERNAL" + attrs: Optional[VariableAttributes] + items: List[ExternalVariableDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], + *items: ExternalVariableDeclaration, + ) -> ExternalVariableDeclarations: + return ExternalVariableDeclarations( + attrs=attrs, + items=list(items), + )
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR_EXTERNAL", " ", self.attrs), + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("input_declarations", comments=True) +class InputDeclarations(VariableDeclarationBlock): + """ + A block of named, input variable declarations (``VAR_INPUT``). + + May be annotated with attributes (see :class:`VariableAttributes`). + """ + block_header: ClassVar[str] = "VAR_INPUT" + attrs: Optional[VariableAttributes] + items: List[InputDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], *items: InputDeclaration + ) -> InputDeclarations: + return InputDeclarations(attrs, list(items) if items else [])
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR_INPUT", " ", self.attrs), + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("output_declarations", comments=True) +class OutputDeclarations(VariableDeclarationBlock): + """ + A block of named, output variable declarations (``VAR_OUTPUT``). + + May be annotated with attributes (see :class:`VariableAttributes`). + """ + block_header: ClassVar[str] = "VAR_OUTPUT" + attrs: Optional[VariableAttributes] + items: List[OutputDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], items: lark.Tree + ) -> OutputDeclarations: + return OutputDeclarations( + attrs, typing.cast(List[OutputDeclaration], items.children) + )
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR_OUTPUT", " ", self.attrs), + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("input_output_declarations", comments=True) +class InputOutputDeclarations(VariableDeclarationBlock): + """ + A block of named, input/output variable declarations (``VAR_IN_OUT``). + + May be annotated with attributes (see :class:`VariableAttributes`). + """ + block_header: ClassVar[str] = "VAR_IN_OUT" + attrs: Optional[VariableAttributes] + items: List[InputOutputDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], items: lark.Tree + ) -> InputOutputDeclarations: + return InputOutputDeclarations( + attrs, + typing.cast(List[InputOutputDeclaration], items.children) + )
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR_IN_OUT", " ", self.attrs), + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("function_var_declarations", comments=True) +class FunctionVariableDeclarations(VariableDeclarationBlock): + block_header: ClassVar[str] = "VAR" + attrs: Optional[VariableAttributes] + items: List[VariableInitDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[VariableAttributes], + body: lark.Tree, + ) -> FunctionVariableDeclarations: + items = typing.cast(List[VariableInitDeclaration], body.children) + return FunctionVariableDeclarations( + attrs=attrs, + items=items, + )
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR", " ", self.attrs), + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("program_access_decl", comments=True) +class AccessDeclaration: + """ + A single, named program access declaration. + + Examples:: + + AccessName : SymbolicVariable : TypeName READ_WRITE; + AccessName1 : SymbolicVariable1 : TypeName1 READ_ONLY; + AccessName2 : SymbolicVariable2 : TypeName2; + """ + name: lark.Token + variable: SymbolicVariable + type: DataType + direction: Optional[lark.Token] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return join_if( + f"{self.name} : {self.variable} : {self.type}", + " ", + self.direction + )
+ + + +
+[docs] +@dataclass +@_rule_handler("program_access_decls", comments=True) +class AccessDeclarations(VariableDeclarationBlock): + """ + A block of named, program access variable declarations (``VAR_ACCESS``). + + See Also + -------- + :class:`AccessDeclaration` + """ + block_header: ClassVar[str] = "VAR_ACCESS" + items: List[AccessDeclaration] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*items: AccessDeclaration) -> AccessDeclarations: + return AccessDeclarations(list(items))
+ + + def __str__(self) -> str: + return "\n".join( + ( + "VAR_ACCESS", + *(indent(f"{item};") for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@dataclass +@_rule_handler("global_var_declarations", comments=True) +class GlobalVariableDeclarations(VariableDeclarationBlock): + """ + Global variable declarations block (``VAR_GLOBAL``). + + May be annotated with attributes (see :class:`GlobalVariableAttributes`). + """ + block_header: ClassVar[str] = "VAR_GLOBAL" + attrs: Optional[GlobalVariableAttributes] + items: List[GlobalVariableDeclaration] + meta: Optional[Meta] = meta_field() + name: Optional[str] = None + +
+[docs] + @staticmethod + def from_lark( + attrs: Optional[GlobalVariableAttributes], + *items: GlobalVariableDeclaration + ) -> GlobalVariableDeclarations: + return GlobalVariableDeclarations( + name=None, # This isn't in the code; set later + attrs=attrs, + items=list(items) + )
+ + + def __str__(self) -> str: + return "\n".join( + ( + join_if("VAR_GLOBAL", " ", self.attrs), + *(indent(str(item)) for item in self.items), + "END_VAR", + ) + )
+ + + +
+[docs] +@as_tagged_union +class Statement: + """ + Base class for all statements in a structured text implementation section. + + Marked as a "tagged union" so that serialization will uniquely identify the + Python class. + """
+ + + +
+[docs] +@_rule_handler("function_call_statement", comments=True) +class FunctionCallStatement(Statement, FunctionCall): + """ + A function (function block, method, action, etc.) call as a statement. + + Examples:: + + A(1, 2); + A(1, 2, sName:='test', iOutput=>); + A.B[1].C(1, 2); + """ + +
+[docs] + @staticmethod + def from_lark( + invocation: FunctionCall, + ) -> FunctionCallStatement: + return FunctionCallStatement( + name=invocation.name, + parameters=invocation.parameters, + dereferenced=invocation.dereferenced, + meta=invocation.meta, + )
+ + + def __str__(self): + invoc = super().__str__() + return f"{invoc};"
+ + + +
+[docs] +@dataclass +@_rule_handler("chained_function_call_statement", comments=True) +class ChainedFunctionCallStatement(Statement): + """ + A chained set of function calls as a statement, in a "fluent" style. + + Examples:: + + uut.dothis().andthenthis().andthenthat(); + uut.getPointerToStruct()^.dothis(A := 1).dothat(B := 2).done(); + """ + invocations: List[FunctionCall] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(chain: ChainedFunctionCall) -> ChainedFunctionCallStatement: + return ChainedFunctionCallStatement( + invocations=chain.invocations, + )
+ + + def __str__(self) -> str: + invoc = ".".join(str(invocation) for invocation in self.invocations) + return f"{invoc};"
+ + + +
+[docs] +@dataclass +@_rule_handler("else_if_clause", comments=True) +class ElseIfClause: + """The else-if ``ELSIF`` part of an ``IF/ELSIF/ELSE/END_IF`` block.""" + if_expression: Expression + statements: Optional[StatementList] + meta: Optional[Meta] = meta_field() + + def __str__(self): + return "\n".join( + s for s in ( + f"ELSIF {self.if_expression} THEN", + indent_if(self.statements), + ) + if s is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("else_clause", comments=True) +class ElseClause: + """The ``ELSE`` part of an ``IF/ELSIF/ELSE/END_IF`` block.""" + statements: Optional[StatementList] + meta: Optional[Meta] = meta_field() + + def __str__(self): + return "\n".join( + s for s in ( + "ELSE", + indent_if(self.statements), + ) + if s is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("if_statement", comments=True) +class IfStatement(Statement): + """The ``IF`` part of an ``IF/ELSIF/ELSE/END_IF`` block.""" + if_expression: Expression + statements: Optional[StatementList] + else_ifs: List[ElseIfClause] + else_clause: Optional[ElseClause] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + if_expr: Expression, + then: Optional[StatementList], + *args: Optional[Union[ElseIfClause, ElseClause]] + ) -> IfStatement: + else_clause: Optional[ElseClause] = None + if args and isinstance(args[-1], ElseClause) or args[-1] is None: + else_clause = args[-1] + args = args[:-1] + + else_ifs = typing.cast(List[ElseIfClause], list(args)) + return IfStatement( + if_expression=if_expr, + statements=then, + else_ifs=else_ifs, + else_clause=else_clause, + )
+ + + def __str__(self): + return "\n".join( + s for s in ( + f"IF {self.if_expression} THEN", + indent_if(self.statements), + *[str(else_if) for else_if in self.else_ifs], + str(self.else_clause) if self.else_clause else None, + "END_IF", + ) + if s is not None + )
+ + + +CaseMatch = Union[ + Subrange, + Integer, + EnumeratedValue, + SymbolicVariable, + BitString, + Boolean, +] + + +
+[docs] +@dataclass +@_rule_handler("case_element", comments=True) +class CaseElement(Statement): + """ + A single element of a ``CASE`` statement block. + + May contain one or more matches with corresponding statements. Matches + may include subranges, integers, enumerated values, symbolic variables, + bit strings, or boolean values. + + See Also + -------- + :class:`CaseMatch` + """ + matches: List[CaseMatch] + statements: Optional[StatementList] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + matches: lark.Tree, + statements: Optional[StatementList], + ) -> CaseElement: + return CaseElement( + matches=typing.cast(List[CaseMatch], matches.children), + statements=statements, + )
+ + + def __str__(self): + matches = ", ".join(str(match) for match in self.matches) + return "\n".join( + s for s in ( + f"{matches}:", + indent_if(self.statements), + ) + if s is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("case_statement", comments=True) +class CaseStatement(Statement): + """ + A switch-like ``CASE`` statement block. + + May contain one or more cases with corresponding statements, and a default + ``ELSE`` clause. + + See Also + -------- + :class:`CaseElement` + :class:`ElseClause` + """ + expression: Expression + cases: List[CaseElement] + else_clause: Optional[ElseClause] + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return "\n".join( + s for s in ( + f"CASE {self.expression} OF", + *[str(case) for case in self.cases], + str(self.else_clause) if self.else_clause else None, + "END_CASE", + ) + if s is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("no_op_statement", comments=True) +class NoOpStatement(Statement): + """ + A no-operation statement referring to a variable and nothing else. + + Distinguished from an action depending on if the context-sensitive + name matches an action or a variable name. + + Note that blark does not handle this for you and may arbitrarily choose + one or the other. + + Examples:: + + variable; + """ + variable: Variable + meta: Optional[Meta] = meta_field() + + def __str__(self): + return f"{self.variable};"
+ + + +
+[docs] +@dataclass +@_rule_handler("set_statement", comments=True) +class SetStatement(Statement): + """ + A "set" statement which conditionally sets a variable to ``TRUE``. + + Examples:: + + bValue S= iValue > 5; + """ + variable: SymbolicVariable + op: lark.Token + expression: Expression + meta: Optional[Meta] = meta_field() + + def __str__(self): + return f"{self.variable} S= {self.expression};"
+ + + +
+[docs] +@dataclass +@_rule_handler("reference_assignment_statement", comments=True) +class ReferenceAssignmentStatement(Statement): + """ + A reference assignment statement. + + Examples:: + + refOne REF= refOtherOne; + """ + variable: SymbolicVariable + op: lark.Token + expression: Expression + meta: Optional[Meta] = meta_field() + + def __str__(self): + return f"{self.variable} REF= {self.expression};"
+ + + +
+[docs] +@dataclass +@_rule_handler("reset_statement") +class ResetStatement(Statement): + """ + A "reset" statement which conditionally clears a variable to ``FALSE``. + + Examples:: + + bValue R= iValue <= 5; + """ + variable: SymbolicVariable + op: lark.Token + expression: Expression + meta: Optional[Meta] = meta_field() + + def __str__(self): + return f"{self.variable} R= {self.expression};"
+ + + +
+[docs] +@dataclass +@_rule_handler("exit_statement", comments=True) +class ExitStatement(Statement): + """A statement used to exit a loop, ``EXIT``.""" + meta: Optional[Meta] = meta_field() + + def __str__(self): + return "EXIT;"
+ + + +
+[docs] +@dataclass +@_rule_handler("continue_statement", comments=True) +class ContinueStatement(Statement): + """A statement used to jump to the top of a loop, ``CONTINUE``.""" + meta: Optional[Meta] = meta_field() + + def __str__(self): + return "CONTINUE;"
+ + + +
+[docs] +@dataclass +@_rule_handler("return_statement", comments=True) +class ReturnStatement(Statement): + """ + A statement used to return from a function [block], ``RETURN``. + + No value is allowed to be returned with this statement. + """ + meta: Optional[Meta] = meta_field() + + def __str__(self): + return "RETURN;"
+ + + +
+[docs] +@dataclass +@_rule_handler("assignment_statement", comments=True) +class AssignmentStatement(Statement): + """ + An assignment statement. + + Examples:: + + iValue := 5; + iValue1 := iValue2 := 6; + """ + variables: List[Variable] + expression: Expression + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*args) -> AssignmentStatement: + *variables_and_ops, expression = args + variables = variables_and_ops[::2] + return AssignmentStatement( + variables=list(variables), + expression=expression + )
+ + + def __str__(self): + variables = " := ".join(str(var) for var in self.variables) + return f"{variables} := {self.expression};"
+ + + +
+[docs] +@dataclass +@_rule_handler("while_statement", comments=True) +class WhileStatement(Statement): + """A beginning conditional loop statement, ``WHILE``.""" + expression: Expression + statements: StatementList + meta: Optional[Meta] = meta_field() + + def __str__(self): + return "\n".join( + s for s in ( + f"WHILE {self.expression}", + "DO", + indent_if(self.statements), + "END_WHILE", + ) + if s is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("repeat_statement", comments=True) +class RepeatStatement(Statement): + """An ending conditional loop statement, ``REPEAT``.""" + statements: StatementList + expression: Expression + meta: Optional[Meta] = meta_field() + + def __str__(self): + return "\n".join( + s for s in ( + "REPEAT", + indent_if(self.statements), + f"UNTIL {self.expression}", + "END_REPEAT", + ) + if s is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler("for_statement", comments=True) +class ForStatement(Statement): + """ + A loop with a control variable and a start, stop, and (optional) step value. + + Examples:: + + FOR iIndex := 0 TO 10 + DO + iValue := iIndex * 2; + END_FOR + + FOR iIndex := (iValue - 5) TO (iValue + 5) BY 2 + DO + arrArray[iIndex] := iIndex * 2; + END_FOR + """ + control: SymbolicVariable + from_: Expression + to: Expression + step: Optional[Expression] + statements: StatementList + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + step = f" BY {self.step}" if self.step else "" + return "\n".join( + line for line in ( + f"FOR {self.control} := {self.from_} TO {self.to}{step}", + "DO", + indent_if(self.statements), + "END_FOR", + ) + if line is not None + )
+ + + +
+[docs] +@dataclass +@_rule_handler( + "labeled_statement", + "end_of_statement_list_label", + comments=True, +) +class LabeledStatement(Statement): + """ + A statement marked with a user-defined label. + + This is to support the "goto"-style ``JMP``. + + Examples:: + + label1: A := 1; + + label2: + IF iValue = 1 THEN + A := 3; + END_IF + """ + label: lark.Token + statement: Optional[Statement] = None + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + if self.statement is None: + return f"{self.label} :" + + statement = str(self.statement) + if statement.count("\n") > 1: + # Multiline statement after label - put it on the next line + return f"{self.label} :\n{statement}" + # Single line statement after label - put it on the same line + return f"{self.label} : {statement}"
+ + + +
+[docs] +@dataclass +@_rule_handler("jmp_statement", comments=True) +class JumpStatement(Statement): + """ + This is the "goto"-style ``JMP``, which points at a label. + + Examples:: + + JMP label; + """ + label: lark.Token + meta: Optional[Meta] = meta_field() + + def __str__(self) -> str: + return f"JMP {self.label};"
+ + + +
+[docs] +@dataclass +@_rule_handler("statement_list", "case_element_statement_list") +class StatementList: + """A list of statements, making up a structured text implementation.""" + statements: List[Statement] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*statements: Statement) -> StatementList: + return StatementList( + statements=list(statements) + )
+ + + def __str__(self) -> str: + return "\n".join(str(statement) for statement in self.statements)
+ + + +# FunctionBlockBody = Union[ +# StatementList, +# ] + +FunctionBlockBody = StatementList # Only supported option, for now +FunctionBody = FunctionBlockBody # Identical, currently + + +TypeDeclarationItem = Union[ + ArrayTypeDeclaration, + StructureTypeDeclaration, + StringTypeDeclaration, + SimpleTypeDeclaration, + SubrangeTypeDeclaration, + EnumeratedTypeDeclaration, + UnionTypeDeclaration, +] + + +
+[docs] +@dataclass +@_rule_handler("data_type_declaration", comments=True) +class DataTypeDeclaration: + """ + A data type declaration, wrapping the other declaration types with + ``TYPE``/``END_TYPE``. + + Access specifiers may be included. + + See Also + -------- + :class:`AccessSpecifier` + :class:`ArrayTypeDeclaration` + :class:`StructureTypeDeclaration` + :class:`StringTypeDeclaration` + :class:`SimpleTypeDeclaration` + :class:`SubrangeTypeDeclaration` + :class:`EnumeratedTypeDeclaration` + :class:`UnionTypeDeclaration` + """ + declaration: Optional[TypeDeclarationItem] + access: Optional[AccessSpecifier] + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark( + access: Optional[AccessSpecifier], + declaration: Optional[TypeDeclarationItem] = None, + ) -> DataTypeDeclaration: + return DataTypeDeclaration(access=access, declaration=declaration)
+ + + def __str__(self) -> str: + if not self.declaration: + return "TYPE\nEND_TYPE" + + decl = indent(self.declaration).lstrip() + if not isinstance( + self.declaration, (StructureTypeDeclaration, UnionTypeDeclaration) + ): + # note: END_STRUCT; END_UNION; result in "END_TYPE expected not ;" + decl = decl + ";" + + decl = join_if(self.access, " ", decl) + + return "\n".join( + ( + f"TYPE {decl}", + "END_TYPE", + ) + )
+ + + +SourceCodeItem = Union[ + DataTypeDeclaration, + Function, + FunctionBlock, + Action, + Method, + Program, + Property, + GlobalVariableDeclarations, +] + + +
+[docs] +@dataclass +@_rule_handler("iec_source") +class SourceCode: + """ + Top-level source code item. + + May contain zero or more of the following as items: + + * :class:`DataTypeDeclaration` + * :class:`Function` + * :class:`FunctionBlock` + * :class:`Action` + * :class:`Method` + * :class:`Program` + * :class:`Property` + * :class:`GlobalVariableDeclarations` + """ + items: List[SourceCodeItem] + filename: Optional[pathlib.Path] = None + raw_source: Optional[str] = None + line_map: Optional[Dict[int, int]] = None + meta: Optional[Meta] = meta_field() + +
+[docs] + @staticmethod + def from_lark(*args: SourceCodeItem) -> SourceCode: + return SourceCode(list(args))
+ + +
+[docs] + def range_from_file_lines(self, start: int, end: int) -> list[str]: + if not self.raw_source: + return [] + + code_lines = self.raw_source.split("\n") # not splitlines() + if not self.line_map: + return code_lines[start - 1: end] + + line_map = { + raw_line: file_line for (file_line, raw_line) in self.line_map.items() + } + return code_lines[line_map[start] - 1: line_map[end]]
+ + + def __str__(self): + return "\n".join(str(item) for item in self.items)
+ + + +
+[docs] +@dataclass +class ExtendedSourceCode(SourceCode): + """ + Top-level source code item - extended to include the possibility of + standalone implementation details (i.e., statement lists). + + See Also + -------- + :class:`SourceCodeItem` + :class:`StatementList` + """ + + items: List[Union[SourceCodeItem, StatementList]]
+ + + +def _annotator_wrapper(handler): + def wrapped(self: GrammarTransformer, data: Any, children: list, meta: lark.tree.Meta) -> Any: + result = handler(*children) + if result is not None and not isinstance(result, (lark.Tree, lark.Token, list)): + result.meta = Meta.from_lark(meta) + return result + + return wrapped + + +def _annotator_method_wrapper(handler): + def wrapped(self: GrammarTransformer, data: Any, children: list, meta: lark.tree.Meta) -> Any: + result = handler(self, *children) + if result is not None and not isinstance(result, (lark.Tree, lark.Token, list)): + result.meta = Meta.from_lark(meta) + return result + + return wrapped + + +
+[docs] +class GrammarTransformer(lark.visitors.Transformer_InPlaceRecursive): + """ + Grammar transformer which takes lark objects and makes a :class:`SourceCode`. + + Attributes + ---------- + _filename : str + Filename of grammar being transformed. + + comments : list of lark.Token + Sorted list of comments and pragmas for annotating the resulting + transformed grammar. + """ + _filename: Optional[pathlib.Path] + comments: List[lark.Token] + +
+[docs] + def __init__( + self, + comments: Optional[List[lark.Token]] = None, + fn: Optional[AnyPath] = None, + source_code: Optional[str] = None, + ): + super().__init__() + self._filename = pathlib.Path(fn) if fn else None + self._source_code = source_code + self.comments = comments or []
+ + + locals().update( + **dict( + (str(name), _annotator_wrapper(handler)) + for name, handler in _class_handlers.items() + ) + ) + +
+[docs] + def transform(self, tree: lark.Tree, *, line_map: Optional[dict[int, int]] = None): + if line_map is not None: + tree = rebuild_lark_tree_with_line_map( + tree, + code_line_to_file_line=line_map, + ) + + transformed = super().transform(tree) + if self.comments: + merge_comments(transformed, self.comments) + if isinstance(transformed, SourceCode): + transformed.raw_source = self._source_code + transformed.filename = ( + self._filename + if self._filename is not None else None + ) + for item in transformed.items: + if isinstance(item, GlobalVariableDeclarations): + item.name = self._filename.stem if self._filename else None + + return transformed
+ + +
+[docs] + @_annotator_method_wrapper + def constant(self, constant: Constant) -> Constant: + return constant
+ + +
+[docs] + @_annotator_method_wrapper + def full_subrange(self): + return FullSubrange()
+ + +
+[docs] + @_annotator_method_wrapper + def var1_list(self, *items: DeclaredVariable) -> List[DeclaredVariable]: + return list(items)
+ + +
+[docs] + @_annotator_method_wrapper + def fb_decl_name_list(self, *items: lark.Token) -> List[lark.Token]: + return list(items)
+ + +
+[docs] + @_annotator_method_wrapper + def signed_integer(self, value: lark.Token): + return Integer.from_lark(None, value)
+ + +
+[docs] + @_annotator_method_wrapper + def integer(self, value: lark.Token): + return Integer.from_lark(None, value)
+ + +
+[docs] + @_annotator_method_wrapper + def binary_integer(self, value: Union[Integer, lark.Token]): + return Integer.from_lark(None, value, base=2)
+ + +
+[docs] + @_annotator_method_wrapper + def octal_integer(self, value: Union[Integer, lark.Token]): + return Integer.from_lark(None, value, base=8)
+ + +
+[docs] + @_annotator_method_wrapper + def hex_integer(self, value: Union[Integer, lark.Token]): + return Integer.from_lark(None, value, base=16)
+ + +
+[docs] + @_annotator_method_wrapper + def true(self, value: lark.Token): + return Boolean(value=value)
+ + +
+[docs] + @_annotator_method_wrapper + def false(self, value: lark.Token): + return Boolean(value=value)
+ + +
+[docs] + @_annotator_method_wrapper + def program_var_declarations(self, *declarations: VariableDeclarationBlock): + return list(declarations)
+ + +
+[docs] + @_annotator_method_wrapper + def case_elements(self, *cases: CaseStatement): + return list(cases)
+ + + def __default__(self, data, children, meta): + """ + Default function that is called if there is no attribute matching ``data`` + """ + return lark.Tree(data, children, meta) + + def _call_userfunc(self, tree, new_children=None): + """ + Assumes tree is already transformed + + Re-implementation of lark.visitors.Transformer to make the code paths + easier to follow. May break based on upstream API. + """ + children = new_children if new_children is not None else tree.children + try: + handler = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + + return handler(tree.data, children, tree.meta)
+ + + +
+[docs] +def merge_comments(source: Any, comments: List[lark.Token]): + """ + Take the transformed tree and annotate comments back into meta information. + """ + if source is None or not comments: + return + + if isinstance(source, (lark.Tree, lark.Token)): + ... + elif isinstance(source, (list, tuple)): + for item in source: + merge_comments(item, comments) + elif is_dataclass(source): + meta = getattr(source, "meta", None) + if meta: + if type(source) in _comment_consumers: + if not hasattr(meta, "comments"): + meta.comments = [] + while comments and comments[0].line <= meta.line: + meta.comments.append(comments.pop(0)) + for field in fields(source): + obj = getattr(source, field.name, None) + if obj is not None: + merge_comments(obj, comments)
+ + + +
+[docs] +def transform( + source_code: str, + tree: lark.Tree, + comments: Optional[list[lark.Token]] = None, + line_map: Optional[dict[int, int]] = None, + filename: Optional[pathlib.Path] = None, +) -> SourceCode: + """ + Transform a ``lark.Tree`` into dataclasses. + + Parameters + ---------- + source_code : str + The plain source code. + tree : lark.Tree + The parse tree from lark. + comments : list[lark.Token], optional + A list of pre-processed comments. + line_map : dict[int, int], optional + A map of lines from ``source_code`` to file lines. + filename : pathlib.Path, optional + The file associated with the source code. + + Returns + ------- + SourceCode + """ + transformer = GrammarTransformer( + comments=list(comments or []), + fn=filename, + source_code=source_code, + ) + transformed = transformer.transform(tree, line_map=line_map) + + if isinstance(transformed, SourceCode): + return transformed + + # TODO: this is for custom starting points and ignores that 'transformed' + # may not be a typical "SourceCodeItem". Goal is just returning a + # consistent SourceCode instance + return SourceCode( + items=[transformed], + filename=filename, + raw_source=source_code, + line_map=line_map, + meta=transformed.meta, + )
+ + + +Constant = Union[ + Duration, + Lduration, + TimeOfDay, + Date, + DateTime, + Ldate, + LdateTime, + Real, + Integer, + String, + BitString, + Boolean, +] + + +ArrayInitialElementType = Union[ + Expression, + StructureInitialization, + EnumeratedValue, + ArrayInitialization, +] + + +if apischema is not None: + # Optional apischema deserializers + + @apischema.deserializer + def _method_access_deserializer(access: int) -> AccessSpecifier: + return AccessSpecifier(access) + + @apischema.deserializer + def _var_attrs_deserializer(attrs: int) -> VariableAttributes: + return VariableAttributes(attrs) + + @apischema.deserializer + def _global_var_attrs_deserializer(attrs: int) -> GlobalVariableAttributes: + return GlobalVariableAttributes(attrs) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/typing.html b/master/_modules/blark/typing.html new file mode 100644 index 0000000..da8b914 --- /dev/null +++ b/master/_modules/blark/typing.html @@ -0,0 +1,209 @@ + + + + + + blark.typing — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.typing

+from __future__ import annotations
+
+import pathlib
+import typing
+from typing import Callable, Optional, Union, overload
+
+try:
+    from typing import Literal
+except ImportError:
+    from typing_extensions import Literal
+
+__all__ = ["Self", "Literal"]
+
+
+if typing.TYPE_CHECKING:
+    from .input import BlarkCompositeSourceItem, BlarkSourceItem
+
+
+try:
+    from typing import Protocol, runtime_checkable
+except ImportError:
+    from typing_extensions import Protocol, runtime_checkable
+
+try:
+    from typing import Self
+except ImportError:
+    from typing_extensions import Self
+
+
+#: Support both pathlib paths and regular strings with AnyPath:
+AnyPath = Union[str, pathlib.Path]
+AnyBlarkSourceItem = Union["BlarkCompositeSourceItem", "BlarkSourceItem"]
+Preprocessor = Callable[[str], str]
+
+
+DeclarationOrImplementation = Literal["declaration", "implementation"]
+
+
+
+[docs] +@runtime_checkable +class ContainsBlarkCode(Protocol): + """Indicates that the given class can emit blark-compatible source items.""" + + @overload + def to_blark(self) -> list[BlarkSourceItem]: + ... + + @overload + def to_blark(self) -> list[BlarkCompositeSourceItem]: + ... + + @overload + def to_blark(self) -> list[AnyBlarkSourceItem]: + ...
+ + + +# TODO: these got refactored out; any use for them? + + +
+[docs] +@runtime_checkable +class SupportsRewrite(Protocol): +
+[docs] + def rewrite_code(self, identifier: Optional[str], contents: str): + ...
+
+ + + +
+[docs] +@runtime_checkable +class SupportsWrite(Protocol): + @overload + def to_file_contents(self, **kwargs) -> str: + ... + + @overload + def to_file_contents(self, **kwargs) -> bytes: + ...
+ + + +
+[docs] +@runtime_checkable +class SupportsSaveToPath(Protocol): +
+[docs] + def save_to(self, path: AnyPath, **kwargs) -> None: + ...
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/blark/util.html b/master/_modules/blark/util.html new file mode 100644 index 0000000..5ecae6d --- /dev/null +++ b/master/_modules/blark/util.html @@ -0,0 +1,941 @@ + + + + + + blark.util — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for blark.util

+from __future__ import annotations
+
+import codecs
+import dataclasses
+import enum
+import functools
+import hashlib
+import os
+import pathlib
+import re
+from typing import Any, Dict, Generator, List, Optional, Set, Tuple, TypeVar
+
+import lark
+import lxml.etree
+
+from .typing import AnyPath, DeclarationOrImplementation, Self
+
+RE_LEADING_WHITESPACE = re.compile("^[ \t]+", re.MULTILINE)
+NEWLINES = "\n\r"
+SINGLE_COMMENT = "//"
+OPEN_COMMENT = "(*"
+CLOSE_COMMENT = "*)"
+OPEN_PRAGMA = "{"
+CLOSE_PRAGMA = "}"
+
+
+
+[docs] +class SourceType(enum.Enum): + general = enum.auto() + action = enum.auto() + function = enum.auto() + function_block = enum.auto() + interface = enum.auto() + method = enum.auto() + program = enum.auto() + property = enum.auto() + property_get = enum.auto() + property_set = enum.auto() + dut = enum.auto() + statement_list = enum.auto() + var_global = enum.auto() + + def __str__(self) -> str: + return self.name + +
+[docs] + def get_grammar_rule(self) -> str: + return { + SourceType.action: "statement_list", + SourceType.function: "function_declaration", + SourceType.function_block: "function_block_type_declaration", + SourceType.general: "iec_source", + SourceType.interface: "interface_declaration", + SourceType.method: "function_block_method_declaration", + SourceType.program: "program_declaration", + SourceType.property: "function_block_property_declaration", + SourceType.property_get: "function_block_property_declaration", + SourceType.property_set: "function_block_property_declaration", + SourceType.statement_list: "statement_list", + SourceType.dut: "data_type_declaration", + # NOTE: multiple definitions can be present in GVLs: + SourceType.var_global: "iec_source", + }[self]
+ + +
+[docs] + def get_implicit_block_end(self) -> str: + return { + SourceType.action: "", + SourceType.function: "END_FUNCTION", + SourceType.function_block: "END_FUNCTION_BLOCK", + SourceType.general: "", + SourceType.interface: "END_INTERFACE", + SourceType.method: "END_METHOD", + SourceType.program: "END_PROGRAM", + SourceType.property: "END_PROPERTY", + SourceType.property_get: "", + SourceType.property_set: "", + SourceType.statement_list: "", + SourceType.dut: "", + SourceType.var_global: "", + }[self]
+
+ + + +
+[docs] +@dataclasses.dataclass +class Identifier: + """ + A blark convention for giving portions of code unique names. + + Examples of valid identifiers include: + + * FB_Name/declaration + * FB_Name/implementation + * FB_Name.Action/declaration + * FB_Name.Action/implementation + * FB_Name.Property.get/implementation + * FB_Name.Property.set/implementation + + Attributes + ---------- + parts : list of str + Parts of the name, split by the "." character. + decl_impl : "declaration" or "implementation" + The final "/portion", indicating whether the code section is describing + the declaration portion or the implementation portion. + """ + parts: List[str] + decl_impl: Optional[DeclarationOrImplementation] = None + + @property + def dotted_name(self) -> str: + return ".".join(self.parts) + +
+[docs] + def to_string(self) -> str: + parts = ".".join(self.parts) + if self.decl_impl: + return f"{parts}/{self.decl_impl}" + return parts
+ + +
+[docs] + @classmethod + def from_string(cls: type[Self], value: str) -> Self: + if "/" in value: + identifier, decl_impl = value.split("/") + assert decl_impl in {"declaration", "implementation", None} + return cls( + parts=identifier.split("."), + decl_impl=decl_impl, + ) + return cls( + parts=value.split("."), + decl_impl=None, + )
+
+ + + +
+[docs] +def get_source_code(fn: AnyPath, *, encoding: str = "utf-8") -> str: + """ + Get source code from the given file. + + Supports TwinCAT source files (in XML format) or plain text files. + + Parameters + ---------- + fn : str or pathlib.Path + The path to the source code file. + + encoding : str, optional, keyword-only + The encoding to use when opening the file. Defaults to utf-8. + + Returns + ------- + str + The source code. + + Raises + ------ + FileNotFoundError + If ``fn`` does not point to a valid file. + + ValueError + If a TwinCAT file is specified but no source code is associated with + it. + """ + fn = pathlib.Path(fn) + from .input import load_file_by_name + result = [] + for item in load_file_by_name(fn): + code, _ = item.get_code_and_line_map() + result.append(code) + + return "\n\n".join(result)
+ + + +
+[docs] +def indent_inner(text: str, prefix: str) -> str: + """Indent the inner lines of ``text`` (not first and last) with ``prefix``.""" + lines = text.splitlines() + if len(lines) < 3: + return text + + return "\n".join( + ( + lines[0], + *(f"{prefix}{line}" for line in lines[1:-1]), + lines[-1], + ) + )
+ + + +
+[docs] +def python_debug_session(namespace: Dict[str, Any], message: str): + """ + Enter an interactive debug session with pdb or IPython, if available. + """ + import blark # noqa + + debug_namespace = {"blark": blark} + debug_namespace.update( + **{k: v for k, v in namespace.items() if not k.startswith("__")} + ) + globals().update(debug_namespace) + + print( + "\n".join( + ( + "-- blark debug --", + message, + "-- blark debug --", + ) + ) + ) + + try: + from IPython import embed # noqa + except ImportError: + import pdb # noqa + + pdb.set_trace() + else: + embed()
+ + + +
+[docs] +def find_pou_type_and_identifier(code: str) -> tuple[Optional[SourceType], Optional[str]]: + types = {source.name for source in SourceType} + clean_code = remove_all_comments(code) + for line in clean_code.splitlines(): + parts = line.lstrip().split() + if parts and parts[0].lower() in types: + source_type = SourceType[parts[0].lower()] + identifier = None + if source_type != SourceType.var_global: + for identifier in parts[1:]: + if identifier.lower() not in { + "abstract", + "public", + "private", + "protected", + "internal", + "final", + }: + break + return source_type, identifier + return None, None
+ + + +
+[docs] +def remove_all_comments(text: str, *, replace_char: str = " ") -> str: + """ + Remove all comments and replace them with the provided character. + """ + # TODO review the logic here! it's Friday after 5PM + multiline_comments = [] + in_single_comment = False + in_single_quote = False + in_double_quote = False + pragma_state = [] + skip = 0 + + def get_characters() -> Generator[Tuple[int, int, str, str], None, None]: + """Yield line information and characters.""" + for lineno, line in enumerate(text.splitlines()): + colno = 0 + for colno, (this_ch, next_ch) in enumerate(zip(line, line[1:] + "\n")): + yield lineno, colno, this_ch, next_ch + yield lineno, colno, "\n", "" + + result = [] + for lineno, colno, this_ch, next_ch in get_characters(): + if skip: + skip -= 1 + continue + + if in_single_comment: + in_single_comment = this_ch not in NEWLINES + continue + + pair = this_ch + next_ch + if not in_single_quote and not in_double_quote: + if this_ch == OPEN_PRAGMA and not multiline_comments: + pragma_state.append((lineno, colno)) + continue + if this_ch == CLOSE_PRAGMA and not multiline_comments: + pragma_state.pop(-1) + continue + + if pragma_state: + continue + + if pair == OPEN_COMMENT: + multiline_comments.append((lineno, colno)) + skip = 1 + continue + if pair == CLOSE_COMMENT: + multiline_comments.pop(-1) + skip = 1 + continue + if pair == SINGLE_COMMENT: + in_single_comment = True + continue + + if not multiline_comments and not in_single_comment: + if pair == "$'" and in_single_quote: + # This is an escape for single quotes + skip = 1 + result.append(pair) + elif pair == '$"' and in_double_quote: + # This is an escape for double quotes + skip = 1 + result.append(pair) + elif this_ch == "'" and not in_double_quote: + in_single_quote = not in_single_quote + result.append(this_ch) + elif this_ch == '"' and not in_single_quote: + in_double_quote = not in_double_quote + result.append(this_ch) + elif pair == SINGLE_COMMENT: + in_single_comment = True + else: + result.append(this_ch) + + if multiline_comments or in_single_quote or in_double_quote: + # Syntax error in source? Return the original and let lark fail + return text + + return "".join(result)
+ + + +
+[docs] +def find_and_clean_comments( + text: str, + *, + replace_char: str = " ", + line_map: Optional[dict[int, int]] = None, +) -> Tuple[List[lark.Token], str]: + """ + Clean nested multiline comments from ``text``. + + For a nested comment like ``"(* (* abc *) *)"``, the inner comment markers + would be replaced with ``replace_char``, resulting in the return value + ``"(* abc *)"``. + """ + lines = text.splitlines() + multiline_comments = [] + in_single_comment = False + in_single_quote = False + in_double_quote = False + pragma_state = [] + skip = 0 + + comments_and_pragmas: List[lark.Token] = [] + + def get_characters() -> Generator[Tuple[int, int, str, str], None, None]: + """Yield line information and characters.""" + for lineno, line in enumerate(text.splitlines()): + colno = 0 + for colno, (this_ch, next_ch) in enumerate(zip(line, line[1:] + "\n")): + yield lineno, colno, this_ch, next_ch + yield lineno, colno, "\n", "" + + def fix_line(lineno: int, colno: int) -> str: + """Uncomment a nested multiline comment at (line, col).""" + replacement_line = list(lines[lineno]) + replacement_line[colno] = replace_char + replacement_line[colno + 1] = replace_char + return "".join(replacement_line) + + def get_token( + start_pos, + start_line: int, + start_col: int, + end_pos: int, + end_line: int, + end_col: int, + ) -> lark.Token: + block = text[start_pos:end_pos + 1] + + if block.startswith("//"): + type_ = "SINGLE_LINE_COMMENT" + elif block.startswith("(*"): # *) + type_ = "MULTI_LINE_COMMENT" + elif block.startswith("{"): # } + type_ = "PRAGMA" + else: + raise RuntimeError(f"Unexpected block: {block!r}") + + if start_line != end_line: + # TODO: move "*)" to separate line + block = indent_inner( + RE_LEADING_WHITESPACE.sub("", block), + prefix={ + "SINGLE_LINE_COMMENT": "", # this would be a bug + "MULTI_LINE_COMMENT": " ", + "PRAGMA": " ", + }[type_], + ) + + token = lark.Token( + type_, + block, + start_pos=start_pos, + line=start_line + 1, + end_line=end_line + 1, + end_pos=end_pos, + column=start_col + 1, + end_column=end_col + 1, + ) + if line_map is not None: + token.line = line_map[start_line + 1] + token.end_line = line_map[end_line + 1] + # token.line = line_map.get(start_line + 1, start_line + 1) + # token.end_line = line_map.get(end_line + 1, end_line + 1) + return token + + for pos, (lineno, colno, this_ch, next_ch) in enumerate(get_characters()): + if skip: + skip -= 1 + continue + + if in_single_comment: + in_single_comment = this_ch not in NEWLINES + continue + + pair = this_ch + next_ch + if not in_single_quote and not in_double_quote: + if this_ch == OPEN_PRAGMA and not multiline_comments: + pragma_state.append((pos, lineno, colno)) + continue + if this_ch == CLOSE_PRAGMA and not multiline_comments: + start_pos, start_line, start_col = pragma_state.pop(-1) + if len(pragma_state) == 0: + comments_and_pragmas.append( + get_token( + start_pos, + start_line, + start_col, + pos, + lineno, + colno + 1, + ) + ) + continue + + if pragma_state: + continue + + if pair == OPEN_COMMENT: + multiline_comments.append((pos, lineno, colno)) + skip = 1 + if len(multiline_comments) > 1: + # Nested multi-line comment + lines[lineno] = fix_line(lineno, colno) + continue + if pair == CLOSE_COMMENT: + start_pos, start_line, start_col = multiline_comments.pop(-1) + if len(multiline_comments) > 0: + # Nested multi-line comment + lines[lineno] = fix_line(lineno, colno) + else: + comments_and_pragmas.append( + get_token( + start_pos, + start_line, + start_col, + pos + 1, # two character ending + lineno, + colno + 1, # two character ending + ) + ) + skip = 1 + continue + if pair == SINGLE_COMMENT: + in_single_comment = True + comments_and_pragmas.append( + get_token( + pos, + lineno, + colno, + pos + (len(lines[lineno]) - colno - 1), + lineno, + len(lines[lineno]), + ) + ) + continue + + if not multiline_comments and not in_single_comment: + if pair == "$'" and in_single_quote: + # This is an escape for single quotes + skip = 1 + elif pair == '$"' and in_double_quote: + # This is an escape for double quotes + skip = 1 + elif this_ch == "'" and not in_double_quote: + in_single_quote = not in_single_quote + elif this_ch == '"' and not in_single_quote: + in_double_quote = not in_double_quote + elif pair == SINGLE_COMMENT: + in_single_comment = True + + if multiline_comments or in_single_quote or in_double_quote: + # Syntax error in source? Return the original and let lark fail + return comments_and_pragmas, text + + return comments_and_pragmas, "\n".join(lines)
+ + + +
+[docs] +def remove_comment_characters(text: str) -> str: + """Take only the inner contents of a given comment.""" + text = text.strip() + if text.startswith("/"): + return text.lstrip("/ ") + return text.strip("()").strip("* ")
+ + + +
+[docs] +def get_file_sha256(filename: AnyPath) -> str: + """Hash a file's contents with the SHA-256 algorithm.""" + with open(filename, "rb") as fp: + return hashlib.sha256(fp.read()).hexdigest()
+ + + +
+[docs] +def fix_case_insensitive_path(path: AnyPath) -> pathlib.Path: + """ + Match a path in a case-insensitive manner. + + Required on Linux to find files in a case-insensitive way. Not required on + OSX/Windows, but platform checks are not done here. + + Parameters + ---------- + path : pathlib.Path or str + The case-insensitive path + + Returns + ------- + path : pathlib.Path + The case-corrected path. + + Raises + ------ + FileNotFoundError + When the file can't be found + """ + path = pathlib.Path(path).expanduser().resolve() + if path.exists(): + return path.resolve() + + new_path = pathlib.Path(path.parts[0]) + for part in path.parts[1:]: + if not (new_path / part).exists(): + all_files = {fn.name.lower(): fn.name for fn in new_path.iterdir()} + try: + part = all_files[part.lower()] + except KeyError: + raise FileNotFoundError( + f"Path does not exist: {path}\n{new_path}{os.pathsep}{part} missing" + ) from None + new_path = new_path / part + return new_path.resolve()
+ + + +
+[docs] +def try_paths(paths: List[AnyPath]) -> Optional[pathlib.Path]: + for path in paths: + try: + return fix_case_insensitive_path(path) + except FileNotFoundError: + pass + + options = "\n".join(str(path) for path in paths) + raise FileNotFoundError(f"None of the possible files were found:\n{options}")
+ + + +_T_Lark = TypeVar("_T_Lark", lark.Tree, lark.Token) + + +
+[docs] +def rebuild_lark_tree_with_line_map( + item: _T_Lark, code_line_to_file_line: dict[int, int] +) -> _T_Lark: + """Rebuild a given lark tree, adjusting line numbers to match up with the source.""" + if isinstance(item, lark.Token): + if item.line is not None: + item.line = code_line_to_file_line.get(item.line, item.line) + if item.end_line is not None: + item.end_line = code_line_to_file_line.get(item.end_line, item.end_line) + return item + + if not isinstance(item, lark.Tree): + raise NotImplementedError(f"Type: {item.__class__.__name__}") + + try: + meta = item.meta + except AttributeError: + meta = None + else: + if not meta.empty: + meta.line = code_line_to_file_line.get(meta.line, meta.line) + meta.end_line = code_line_to_file_line.get(meta.end_line, meta.end_line) + + return lark.Tree( + item.data, + children=[ + None + if child is None + else rebuild_lark_tree_with_line_map(child, code_line_to_file_line) + for child in item.children + ], + meta=meta, + )
+ + + +
+[docs] +def tree_to_xml_source( + tree: lxml.etree.Element, + encoding: str = "utf-8", + delimiter: str = "\r\n", + xml_header: str = '<?xml version="1.0" encoding="{encoding}"?>', + indent: str = " ", + include_utf8_sig: bool = True, +) -> bytes: + """Return the contents to write for the given XML tree.""" + # NOTE: we avoid lxml.etree.tostring(xml_declaration=True) as we want + # to write a declaration that matches what TwinCAT writes. It uses double + # quotes instead of single quotes. + delim_bytes = delimiter.encode(encoding) + header_bytes = xml_header.format(encoding=encoding).encode(encoding) + lxml.etree.indent(tree, space=indent) + if encoding.startswith("utf-8") and include_utf8_sig: + # Additionally, TwinCAT includes a utf-8 byte order marker (BOM). + # Let's include that or our formatted output will differ. + header_bytes = codecs.BOM_UTF8 + header_bytes + + source = header_bytes + delim_bytes + lxml.etree.tostring( + tree, + pretty_print=True, + encoding=encoding, + ) + + if delim_bytes == b"\n": + # This is what lxml gives us + return source + + source_lines = source.split(b"\n") + return delim_bytes.join(source_lines)
+ + + +
+[docs] +def recursively_remove_keys(obj, keys: Set[str]) -> Any: + """Remove the provided keys from the JSON object.""" + if isinstance(obj, dict): + return {key: recursively_remove_keys(value, keys) for key, value in obj.items() + if key not in keys} + if isinstance(obj, (list, tuple)): + return [recursively_remove_keys(value, keys) for value in obj] + return obj
+ + + +
+[docs] +def simplify_brackets(text: str, brackets: str = "[]") -> str: + """ + Simplify repeated brackets/parentheses in ``text``. + + Parameters + ---------- + text : str + The text to process. + brackets : str, optional + Remove this flavor of brackets - a 2 character string of open and close + brackets. Defaults to ``"[]"``. + """ + open_ch, close_ch = brackets + open_stack: List[int] = [] + start_to_end: Dict[int, int] = {} + to_remove: List[int] = [] + for idx, ch in enumerate(text): + if ch == open_ch: + open_stack.append(idx) + elif ch == close_ch: + if not open_stack: + raise ValueError(f"Unbalanced {brackets} in {text!r}") + open_pos = open_stack.pop(-1) + if start_to_end.get(open_pos + 1, -1) == idx - 1: + to_remove.append(open_pos) + to_remove.append(idx) + start_to_end[open_pos] = idx + + if not to_remove: + return text + + if open_stack: + raise ValueError(f"Unbalanced {brackets} in {text!r}") + + return "".join(ch for idx, ch in enumerate(text) if idx not in to_remove)
+ + + +
+[docs] +def maybe_add_brackets(text: str, brackets: str = "[]") -> str: + """ + Add brackets to ``text`` if there are no enclosing brackets. + + Parameters + ---------- + text : str + The text to process. + brackets : str, optional + Add this flavor of brackets - a 2 character string of open and close + brackets. Defaults to ``"[]"``. + """ + open_ch, close_ch = brackets + if not text or text[0] != open_ch or text[-1] != close_ch: + return text + + open_stack: List[int] = [] + start_to_end: Dict[int, int] = {} + for idx, ch in enumerate(text): + if ch == open_ch: + open_stack.append(idx) + elif ch == close_ch: + if not open_stack: + raise ValueError(f"Unbalanced {brackets} in {text!r}") + start_to_end[open_stack.pop(-1)] = idx + + if start_to_end[0] == len(text): + return text[1:-1] + return text
+ + + +
+[docs] +@functools.lru_cache() +def get_grammar_source() -> str: + from . import GRAMMAR_FILENAME + with open(GRAMMAR_FILENAME) as fp: + return fp.read()
+ + + +
+[docs] +def get_grammar_for_rule(rule: str) -> str: + """ + Get the lark grammar source for the provided rule. + + Parameters + ---------- + rule : str + The grammar identifier - rule or token name. + """ + # TODO: there may be support for this in lark; consider refactoring + + def split_rule(text: str) -> str: + """ + ``text`` contains the rule and the remainder of ``iec.lark``. + + Split it to just contain the rule, removing the rest. + """ + lines = text.splitlines() + for idx, line in enumerate(lines[1:], 1): + line = line.strip() + if not line.startswith("|"): + return "\n".join(lines[:idx]) + return text + + match = re.search( + rf"^\s*(.*->\s*{rule}$)", + get_grammar_source(), + flags=re.MULTILINE, + ) + if match is not None: + return match.groups()[0] + + match = re.search( + rf"^(\??{rule}(\.\d)?:.*)", + get_grammar_source(), + flags=re.MULTILINE | re.DOTALL, + ) + if match is not None: + text = match.groups()[0] + return split_rule(text) + + raise ValueError(f"Grammar rule not found in source: {rule}")
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_modules/index.html b/master/_modules/index.html new file mode 100644 index 0000000..c4f43ed --- /dev/null +++ b/master/_modules/index.html @@ -0,0 +1,126 @@ + + + + + + Overview: module code — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/_sources/api.rst.txt b/master/_sources/api.rst.txt new file mode 100644 index 0000000..7ac7e97 --- /dev/null +++ b/master/_sources/api.rst.txt @@ -0,0 +1,416 @@ +API +### + +blark.apischema_compat +---------------------- + +.. autosummary:: + :toctree: api + + blark.apischema_compat.alternative_constructor + blark.apischema_compat.as_tagged_union + blark.apischema_compat.get_all_subclasses + blark.apischema_compat.token_deserializer + blark.apischema_compat.token_serializer + +blark.config +------------ + +blark.dependency_store +---------------------- + +.. autosummary:: + :toctree: api + + blark.dependency_store.DependencyStore + blark.dependency_store.DependencyStoreConfig + blark.dependency_store.DependencyStoreLibrary + blark.dependency_store.PlcProjectMetadata + blark.dependency_store.get_dependency_store + blark.dependency_store.load_projects + +blark.format +------------ + +.. autosummary:: + :toctree: api + + blark.format.build_arg_parser + blark.format.determine_output_filename + blark.format.dump_source_to_console + blark.format.get_reformatted_code_blocks + blark.format.main + blark.format.reformat_code + blark.format.write_source_to_file + +blark.html +---------- + +.. autosummary:: + :toctree: api + + blark.html.HighlighterAnnotation + blark.html.HtmlWriter + blark.html.apply_annotations_to_code + blark.html.get_annotations + +blark.input +----------- + +.. autosummary:: + :toctree: api + + blark.input.BlarkCompositeSourceItem + blark.input.BlarkSourceItem + blark.input.BlarkSourceLine + blark.input.UnsupportedFileFormatError + blark.input.load_file_by_name + blark.input.register_input_handler + +blark.main +---------- + +.. autosummary:: + :toctree: api + + blark.main.main + +blark.output +------------ + +.. autosummary:: + :toctree: api + + blark.output.OutputBlock + blark.output.get_handler_by_name + blark.output.register_output_handler + +blark.parse +----------- + +.. autosummary:: + :toctree: api + + blark.parse.BlarkStartingRule + blark.parse.ParseResult + blark.parse.build_arg_parser + blark.parse.dump_json + blark.parse.get_parser + blark.parse.main + blark.parse.new_parser + blark.parse.parse + blark.parse.parse_item + blark.parse.parse_project + blark.parse.parse_single_file + blark.parse.parse_source_code + blark.parse.summarize + +blark.plain +----------- + +.. autosummary:: + :toctree: api + + blark.plain.PlainFileLoader + +blark.solution +-------------- + +.. autosummary:: + :toctree: api + + blark.solution.DependencyInformation + blark.solution.DependencyVersion + blark.solution.LocatedString + blark.solution.Project + blark.solution.Solution + blark.solution.SolutionLoaderError + blark.solution.TcAction + blark.solution.TcDUT + blark.solution.TcDeclImpl + blark.solution.TcExtraInfo + blark.solution.TcGVL + blark.solution.TcIO + blark.solution.TcMethod + blark.solution.TcPOU + blark.solution.TcProperty + blark.solution.TcSource + blark.solution.TcSourceChild + blark.solution.TcTTO + blark.solution.TcUnknownXml + blark.solution.TwincatPlcProject + blark.solution.TwincatSourceCodeItem + blark.solution.TwincatTsProject + blark.solution.UnsupportedSourceFileError + blark.solution.filename_from_xml + blark.solution.get_blark_input_from_solution + blark.solution.get_child_located_text + blark.solution.get_child_text + blark.solution.get_code_object_from_xml + blark.solution.get_project_guid + blark.solution.get_project_target_netid + blark.solution.get_tcplc_from_xml + blark.solution.make_solution_from_files + blark.solution.parse_xml_contents + blark.solution.parse_xml_file + blark.solution.project_loader + blark.solution.projects_from_solution_source + blark.solution.solution_loader + blark.solution.split_property_and_base_decl + blark.solution.strip_implicit_lines + blark.solution.strip_xml_namespace + blark.solution.twincat_file_loader + blark.solution.twincat_file_writer + +blark.sphinxdomain +------------------ + +.. autosummary:: + :toctree: api + + blark.sphinxdomain.BlarkDirective + blark.sphinxdomain.BlarkDirectiveWithDeclarations + blark.sphinxdomain.BlarkDomain + blark.sphinxdomain.BlarkSphinxCache + blark.sphinxdomain.BlarkXRefRole + blark.sphinxdomain.DeclarationDirective + blark.sphinxdomain.FunctionBlockDirective + blark.sphinxdomain.FunctionDirective + blark.sphinxdomain.GvlDirective + blark.sphinxdomain.MissingDeclaration + blark.sphinxdomain.ProgramDirective + blark.sphinxdomain.TypeDirective + blark.sphinxdomain.VariableBlockDirective + blark.sphinxdomain.declaration_to_content + blark.sphinxdomain.declaration_to_signature + blark.sphinxdomain.declarations_to_block + blark.sphinxdomain.setup + +blark.summary +------------- + +.. autosummary:: + :toctree: api + + blark.summary.ActionSummary + blark.summary.CodeSummary + blark.summary.DataTypeSummary + blark.summary.DeclarationSummary + blark.summary.FunctionBlockSummary + blark.summary.FunctionSummary + blark.summary.GlobalVariableSummary + blark.summary.InterfaceSummary + blark.summary.LinkableItems + blark.summary.MethodSummary + blark.summary.ProgramSummary + blark.summary.PropertyGetSetSummary + blark.summary.PropertySummary + blark.summary.Summary + blark.summary.get_linkable_declarations + blark.summary.path_to_file_and_line + blark.summary.text_outline + +blark.transform +--------------- + +.. autosummary:: + :toctree: api + + blark.transform.AccessDeclaration + blark.transform.AccessDeclarations + blark.transform.AccessSpecifier + blark.transform.Action + blark.transform.ArrayInitialElement + blark.transform.ArrayInitialization + blark.transform.ArraySpecification + blark.transform.ArrayTypeDeclaration + blark.transform.ArrayTypeInitialization + blark.transform.ArrayVariableInitDeclaration + blark.transform.AssignmentStatement + blark.transform.BinaryBitString + blark.transform.BinaryInteger + blark.transform.BinaryOperation + blark.transform.BitString + blark.transform.Boolean + blark.transform.BracketedExpression + blark.transform.CaseElement + blark.transform.CaseStatement + blark.transform.ChainedFunctionCall + blark.transform.ChainedFunctionCallStatement + blark.transform.ContinueStatement + blark.transform.DataType + blark.transform.DataTypeDeclaration + blark.transform.Date + blark.transform.DateTime + blark.transform.DeclaredVariable + blark.transform.DirectVariable + blark.transform.Duration + blark.transform.EdgeDeclaration + blark.transform.ElseClause + blark.transform.ElseIfClause + blark.transform.EnumeratedSpecification + blark.transform.EnumeratedTypeDeclaration + blark.transform.EnumeratedTypeInitialization + blark.transform.EnumeratedValue + blark.transform.ExitStatement + blark.transform.Expression + blark.transform.ExtendedSourceCode + blark.transform.Extends + blark.transform.ExternalVariableDeclaration + blark.transform.ExternalVariableDeclarations + blark.transform.FieldSelector + blark.transform.ForStatement + blark.transform.FormatSettings + blark.transform.FullSubrange + blark.transform.Function + blark.transform.FunctionBlock + blark.transform.FunctionBlockDeclaration + blark.transform.FunctionBlockInvocationDeclaration + blark.transform.FunctionBlockNameDeclaration + blark.transform.FunctionCall + blark.transform.FunctionCallStatement + blark.transform.FunctionVariableDeclarations + blark.transform.GlobalVariableAttributes + blark.transform.GlobalVariableDeclaration + blark.transform.GlobalVariableDeclarations + blark.transform.GlobalVariableSpec + blark.transform.GrammarTransformer + blark.transform.HexBitString + blark.transform.HexInteger + blark.transform.IfStatement + blark.transform.Implements + blark.transform.IncompleteLocatedVariableDeclaration + blark.transform.IncompleteLocatedVariableDeclarations + blark.transform.IncompleteLocation + blark.transform.IndirectSimpleSpecification + blark.transform.IndirectionType + blark.transform.InitDeclaration + blark.transform.InitializedStructure + blark.transform.InputDeclarations + blark.transform.InputOutputDeclarations + blark.transform.InputParameterAssignment + blark.transform.Integer + blark.transform.Interface + blark.transform.JumpStatement + blark.transform.LabeledStatement + blark.transform.Ldate + blark.transform.LdateTime + blark.transform.Lduration + blark.transform.Literal + blark.transform.LocatedVariableDeclaration + blark.transform.LocatedVariableDeclarations + blark.transform.Location + blark.transform.LtimeOfDay + blark.transform.Meta + blark.transform.Method + blark.transform.MethodInstanceVariableDeclarations + blark.transform.MultiElementVariable + blark.transform.NoOpStatement + blark.transform.ObjectInitializerArray + blark.transform.OctalBitString + blark.transform.OctalInteger + blark.transform.OutputDeclarations + blark.transform.OutputParameterAssignment + blark.transform.ParameterAssignment + blark.transform.ParenthesizedExpression + blark.transform.PartialSubrange + blark.transform.Program + blark.transform.Property + blark.transform.Real + blark.transform.ReferenceAssignmentStatement + blark.transform.RepeatStatement + blark.transform.ResetStatement + blark.transform.ReturnStatement + blark.transform.SetStatement + blark.transform.SimpleSpecification + blark.transform.SimpleTypeDeclaration + blark.transform.SimpleVariable + blark.transform.SourceCode + blark.transform.Statement + blark.transform.StatementList + blark.transform.StaticDeclarations + blark.transform.String + blark.transform.StringSpecLength + blark.transform.StringTypeDeclaration + blark.transform.StringTypeInitialization + blark.transform.StringTypeSpecification + blark.transform.StringVariableInitDeclaration + blark.transform.StructureElementDeclaration + blark.transform.StructureElementInitialization + blark.transform.StructureInitialization + blark.transform.StructureTypeDeclaration + blark.transform.StructuredVariableInitDeclaration + blark.transform.Subrange + blark.transform.SubrangeSpecification + blark.transform.SubrangeTypeDeclaration + blark.transform.SubrangeTypeInitialization + blark.transform.SubscriptList + blark.transform.TemporaryVariableDeclarations + blark.transform.TimeOfDay + blark.transform.TypeInformation + blark.transform.TypeInitialization + blark.transform.TypeInitializationBase + blark.transform.TypeSpecificationBase + blark.transform.UnaryOperation + blark.transform.UnionElementDeclaration + blark.transform.UnionTypeDeclaration + blark.transform.UnresolvedTypeInformation + blark.transform.Variable + blark.transform.VariableAttributes + blark.transform.VariableDeclarationBlock + blark.transform.VariableDeclarations + blark.transform.VariableLocationPrefix + blark.transform.VariableOneInitDeclaration + blark.transform.VariableSizePrefix + blark.transform.WhileStatement + blark.transform._ArrayInitialElementCount + blark.transform._BareArrayInitialization + blark.transform._BracketedArrayInitialization + blark.transform._FlagHelper + blark.transform._GenericInit + blark.transform.configure_formatting + blark.transform.get_grammar_for_class + blark.transform.indent + blark.transform.indent_if + blark.transform.join_if + blark.transform.merge_comments + blark.transform.meta_field + blark.transform.multiline_code_block + blark.transform.transform + +blark.typing +------------ + +.. autosummary:: + :toctree: api + + blark.typing.ContainsBlarkCode + blark.typing.SupportsRewrite + blark.typing.SupportsSaveToPath + blark.typing.SupportsWrite + +blark.util +---------- + +.. autosummary:: + :toctree: api + + blark.util.Identifier + blark.util.SourceType + blark.util.find_and_clean_comments + blark.util.find_pou_type_and_identifier + blark.util.fix_case_insensitive_path + blark.util.get_file_sha256 + blark.util.get_grammar_for_rule + blark.util.get_grammar_source + blark.util.get_source_code + blark.util.indent_inner + blark.util.maybe_add_brackets + blark.util.python_debug_session + blark.util.rebuild_lark_tree_with_line_map + blark.util.recursively_remove_keys + blark.util.remove_all_comments + blark.util.remove_comment_characters + blark.util.simplify_brackets + blark.util.tree_to_xml_source + blark.util.try_paths diff --git a/master/_sources/api/blark.apischema_compat.alternative_constructor.rst.txt b/master/_sources/api/blark.apischema_compat.alternative_constructor.rst.txt new file mode 100644 index 0000000..83e4c21 --- /dev/null +++ b/master/_sources/api/blark.apischema_compat.alternative_constructor.rst.txt @@ -0,0 +1,6 @@ +blark.apischema\_compat.alternative\_constructor +================================================ + +.. currentmodule:: blark.apischema_compat + +.. autofunction:: alternative_constructor \ No newline at end of file diff --git a/master/_sources/api/blark.apischema_compat.as_tagged_union.rst.txt b/master/_sources/api/blark.apischema_compat.as_tagged_union.rst.txt new file mode 100644 index 0000000..7de2229 --- /dev/null +++ b/master/_sources/api/blark.apischema_compat.as_tagged_union.rst.txt @@ -0,0 +1,6 @@ +blark.apischema\_compat.as\_tagged\_union +========================================= + +.. currentmodule:: blark.apischema_compat + +.. autofunction:: as_tagged_union \ No newline at end of file diff --git a/master/_sources/api/blark.apischema_compat.get_all_subclasses.rst.txt b/master/_sources/api/blark.apischema_compat.get_all_subclasses.rst.txt new file mode 100644 index 0000000..1e38064 --- /dev/null +++ b/master/_sources/api/blark.apischema_compat.get_all_subclasses.rst.txt @@ -0,0 +1,6 @@ +blark.apischema\_compat.get\_all\_subclasses +============================================ + +.. currentmodule:: blark.apischema_compat + +.. autofunction:: get_all_subclasses \ No newline at end of file diff --git a/master/_sources/api/blark.apischema_compat.token_deserializer.rst.txt b/master/_sources/api/blark.apischema_compat.token_deserializer.rst.txt new file mode 100644 index 0000000..2fc675e --- /dev/null +++ b/master/_sources/api/blark.apischema_compat.token_deserializer.rst.txt @@ -0,0 +1,6 @@ +blark.apischema\_compat.token\_deserializer +=========================================== + +.. currentmodule:: blark.apischema_compat + +.. autofunction:: token_deserializer \ No newline at end of file diff --git a/master/_sources/api/blark.apischema_compat.token_serializer.rst.txt b/master/_sources/api/blark.apischema_compat.token_serializer.rst.txt new file mode 100644 index 0000000..b1d49b4 --- /dev/null +++ b/master/_sources/api/blark.apischema_compat.token_serializer.rst.txt @@ -0,0 +1,6 @@ +blark.apischema\_compat.token\_serializer +========================================= + +.. currentmodule:: blark.apischema_compat + +.. autofunction:: token_serializer \ No newline at end of file diff --git a/master/_sources/api/blark.dependency_store.DependencyStore.rst.txt b/master/_sources/api/blark.dependency_store.DependencyStore.rst.txt new file mode 100644 index 0000000..57e50ce --- /dev/null +++ b/master/_sources/api/blark.dependency_store.DependencyStore.rst.txt @@ -0,0 +1,36 @@ +blark.dependency\_store.DependencyStore +======================================= + +.. currentmodule:: blark.dependency_store + +.. autoclass:: DependencyStore + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DependencyStore.__init__ + ~DependencyStore.get_dependencies + ~DependencyStore.get_dependency + ~DependencyStore.get_instance + ~DependencyStore.load_config + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DependencyStore.config_filename + ~DependencyStore.root + ~DependencyStore.config + \ No newline at end of file diff --git a/master/_sources/api/blark.dependency_store.DependencyStoreConfig.rst.txt b/master/_sources/api/blark.dependency_store.DependencyStoreConfig.rst.txt new file mode 100644 index 0000000..622952e --- /dev/null +++ b/master/_sources/api/blark.dependency_store.DependencyStoreConfig.rst.txt @@ -0,0 +1,34 @@ +blark.dependency\_store.DependencyStoreConfig +============================================= + +.. currentmodule:: blark.dependency_store + +.. autoclass:: DependencyStoreConfig + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DependencyStoreConfig.__init__ + ~DependencyStoreConfig.as_json + ~DependencyStoreConfig.from_dict + ~DependencyStoreConfig.save + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DependencyStoreConfig.filename + ~DependencyStoreConfig.libraries + \ No newline at end of file diff --git a/master/_sources/api/blark.dependency_store.DependencyStoreLibrary.rst.txt b/master/_sources/api/blark.dependency_store.DependencyStoreLibrary.rst.txt new file mode 100644 index 0000000..cae0d9c --- /dev/null +++ b/master/_sources/api/blark.dependency_store.DependencyStoreLibrary.rst.txt @@ -0,0 +1,35 @@ +blark.dependency\_store.DependencyStoreLibrary +============================================== + +.. currentmodule:: blark.dependency_store + +.. autoclass:: DependencyStoreLibrary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DependencyStoreLibrary.__init__ + ~DependencyStoreLibrary.get_latest_version_path + ~DependencyStoreLibrary.get_project_filename + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DependencyStoreLibrary.name + ~DependencyStoreLibrary.versioned + ~DependencyStoreLibrary.path + ~DependencyStoreLibrary.project + \ No newline at end of file diff --git a/master/_sources/api/blark.dependency_store.PlcProjectMetadata.rst.txt b/master/_sources/api/blark.dependency_store.PlcProjectMetadata.rst.txt new file mode 100644 index 0000000..6be3c26 --- /dev/null +++ b/master/_sources/api/blark.dependency_store.PlcProjectMetadata.rst.txt @@ -0,0 +1,39 @@ +blark.dependency\_store.PlcProjectMetadata +========================================== + +.. currentmodule:: blark.dependency_store + +.. autoclass:: PlcProjectMetadata + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~PlcProjectMetadata.__init__ + ~PlcProjectMetadata.from_plcproject + ~PlcProjectMetadata.from_project_filename + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~PlcProjectMetadata.name + ~PlcProjectMetadata.filename + ~PlcProjectMetadata.include_dependencies + ~PlcProjectMetadata.code + ~PlcProjectMetadata.summary + ~PlcProjectMetadata.loaded_files + ~PlcProjectMetadata.dependencies + ~PlcProjectMetadata.plc + \ No newline at end of file diff --git a/master/_sources/api/blark.dependency_store.get_dependency_store.rst.txt b/master/_sources/api/blark.dependency_store.get_dependency_store.rst.txt new file mode 100644 index 0000000..94a1f0c --- /dev/null +++ b/master/_sources/api/blark.dependency_store.get_dependency_store.rst.txt @@ -0,0 +1,6 @@ +blark.dependency\_store.get\_dependency\_store +============================================== + +.. currentmodule:: blark.dependency_store + +.. autofunction:: get_dependency_store \ No newline at end of file diff --git a/master/_sources/api/blark.dependency_store.load_projects.rst.txt b/master/_sources/api/blark.dependency_store.load_projects.rst.txt new file mode 100644 index 0000000..3e0432d --- /dev/null +++ b/master/_sources/api/blark.dependency_store.load_projects.rst.txt @@ -0,0 +1,6 @@ +blark.dependency\_store.load\_projects +====================================== + +.. currentmodule:: blark.dependency_store + +.. autofunction:: load_projects \ No newline at end of file diff --git a/master/_sources/api/blark.format.build_arg_parser.rst.txt b/master/_sources/api/blark.format.build_arg_parser.rst.txt new file mode 100644 index 0000000..ba18041 --- /dev/null +++ b/master/_sources/api/blark.format.build_arg_parser.rst.txt @@ -0,0 +1,6 @@ +blark.format.build\_arg\_parser +=============================== + +.. currentmodule:: blark.format + +.. autofunction:: build_arg_parser \ No newline at end of file diff --git a/master/_sources/api/blark.format.determine_output_filename.rst.txt b/master/_sources/api/blark.format.determine_output_filename.rst.txt new file mode 100644 index 0000000..6c539a2 --- /dev/null +++ b/master/_sources/api/blark.format.determine_output_filename.rst.txt @@ -0,0 +1,6 @@ +blark.format.determine\_output\_filename +======================================== + +.. currentmodule:: blark.format + +.. autofunction:: determine_output_filename \ No newline at end of file diff --git a/master/_sources/api/blark.format.dump_source_to_console.rst.txt b/master/_sources/api/blark.format.dump_source_to_console.rst.txt new file mode 100644 index 0000000..fc98977 --- /dev/null +++ b/master/_sources/api/blark.format.dump_source_to_console.rst.txt @@ -0,0 +1,6 @@ +blark.format.dump\_source\_to\_console +====================================== + +.. currentmodule:: blark.format + +.. autofunction:: dump_source_to_console \ No newline at end of file diff --git a/master/_sources/api/blark.format.get_reformatted_code_blocks.rst.txt b/master/_sources/api/blark.format.get_reformatted_code_blocks.rst.txt new file mode 100644 index 0000000..7dc04e4 --- /dev/null +++ b/master/_sources/api/blark.format.get_reformatted_code_blocks.rst.txt @@ -0,0 +1,6 @@ +blark.format.get\_reformatted\_code\_blocks +=========================================== + +.. currentmodule:: blark.format + +.. autofunction:: get_reformatted_code_blocks \ No newline at end of file diff --git a/master/_sources/api/blark.format.main.rst.txt b/master/_sources/api/blark.format.main.rst.txt new file mode 100644 index 0000000..40f8797 --- /dev/null +++ b/master/_sources/api/blark.format.main.rst.txt @@ -0,0 +1,6 @@ +blark.format.main +================= + +.. currentmodule:: blark.format + +.. autofunction:: main \ No newline at end of file diff --git a/master/_sources/api/blark.format.reformat_code.rst.txt b/master/_sources/api/blark.format.reformat_code.rst.txt new file mode 100644 index 0000000..b4e9aa6 --- /dev/null +++ b/master/_sources/api/blark.format.reformat_code.rst.txt @@ -0,0 +1,6 @@ +blark.format.reformat\_code +=========================== + +.. currentmodule:: blark.format + +.. autofunction:: reformat_code \ No newline at end of file diff --git a/master/_sources/api/blark.format.write_source_to_file.rst.txt b/master/_sources/api/blark.format.write_source_to_file.rst.txt new file mode 100644 index 0000000..1914f07 --- /dev/null +++ b/master/_sources/api/blark.format.write_source_to_file.rst.txt @@ -0,0 +1,6 @@ +blark.format.write\_source\_to\_file +==================================== + +.. currentmodule:: blark.format + +.. autofunction:: write_source_to_file \ No newline at end of file diff --git a/master/_sources/api/blark.html.HighlighterAnnotation.rst.txt b/master/_sources/api/blark.html.HighlighterAnnotation.rst.txt new file mode 100644 index 0000000..98a4748 --- /dev/null +++ b/master/_sources/api/blark.html.HighlighterAnnotation.rst.txt @@ -0,0 +1,34 @@ +blark.html.HighlighterAnnotation +================================ + +.. currentmodule:: blark.html + +.. autoclass:: HighlighterAnnotation + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~HighlighterAnnotation.__init__ + ~HighlighterAnnotation.as_string + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~HighlighterAnnotation.name + ~HighlighterAnnotation.terminal + ~HighlighterAnnotation.is_open_tag + ~HighlighterAnnotation.other_tag_pos + \ No newline at end of file diff --git a/master/_sources/api/blark.html.HtmlWriter.rst.txt b/master/_sources/api/blark.html.HtmlWriter.rst.txt new file mode 100644 index 0000000..55dbbdb --- /dev/null +++ b/master/_sources/api/blark.html.HtmlWriter.rst.txt @@ -0,0 +1,35 @@ +blark.html.HtmlWriter +===================== + +.. currentmodule:: blark.html + +.. autoclass:: HtmlWriter + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~HtmlWriter.__init__ + ~HtmlWriter.save + ~HtmlWriter.to_html + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~HtmlWriter.source_code + ~HtmlWriter.user + ~HtmlWriter.source_filename + ~HtmlWriter.block + \ No newline at end of file diff --git a/master/_sources/api/blark.html.apply_annotations_to_code.rst.txt b/master/_sources/api/blark.html.apply_annotations_to_code.rst.txt new file mode 100644 index 0000000..31b8c63 --- /dev/null +++ b/master/_sources/api/blark.html.apply_annotations_to_code.rst.txt @@ -0,0 +1,6 @@ +blark.html.apply\_annotations\_to\_code +======================================= + +.. currentmodule:: blark.html + +.. autofunction:: apply_annotations_to_code \ No newline at end of file diff --git a/master/_sources/api/blark.html.get_annotations.rst.txt b/master/_sources/api/blark.html.get_annotations.rst.txt new file mode 100644 index 0000000..c4decda --- /dev/null +++ b/master/_sources/api/blark.html.get_annotations.rst.txt @@ -0,0 +1,6 @@ +blark.html.get\_annotations +=========================== + +.. currentmodule:: blark.html + +.. autofunction:: get_annotations \ No newline at end of file diff --git a/master/_sources/api/blark.input.BlarkCompositeSourceItem.rst.txt b/master/_sources/api/blark.input.BlarkCompositeSourceItem.rst.txt new file mode 100644 index 0000000..a27bdd3 --- /dev/null +++ b/master/_sources/api/blark.input.BlarkCompositeSourceItem.rst.txt @@ -0,0 +1,36 @@ +blark.input.BlarkCompositeSourceItem +==================================== + +.. currentmodule:: blark.input + +.. autoclass:: BlarkCompositeSourceItem + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BlarkCompositeSourceItem.__init__ + ~BlarkCompositeSourceItem.get_code_and_line_map + ~BlarkCompositeSourceItem.get_filenames + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BlarkCompositeSourceItem.lines + ~BlarkCompositeSourceItem.user + ~BlarkCompositeSourceItem.identifier + ~BlarkCompositeSourceItem.filename + ~BlarkCompositeSourceItem.parts + \ No newline at end of file diff --git a/master/_sources/api/blark.input.BlarkSourceItem.rst.txt b/master/_sources/api/blark.input.BlarkSourceItem.rst.txt new file mode 100644 index 0000000..d7a92e8 --- /dev/null +++ b/master/_sources/api/blark.input.BlarkSourceItem.rst.txt @@ -0,0 +1,38 @@ +blark.input.BlarkSourceItem +=========================== + +.. currentmodule:: blark.input + +.. autoclass:: BlarkSourceItem + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BlarkSourceItem.__init__ + ~BlarkSourceItem.from_code + ~BlarkSourceItem.get_code_and_line_map + ~BlarkSourceItem.get_filenames + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BlarkSourceItem.user + ~BlarkSourceItem.identifier + ~BlarkSourceItem.lines + ~BlarkSourceItem.type + ~BlarkSourceItem.grammar_rule + ~BlarkSourceItem.implicit_end + \ No newline at end of file diff --git a/master/_sources/api/blark.input.BlarkSourceLine.rst.txt b/master/_sources/api/blark.input.BlarkSourceLine.rst.txt new file mode 100644 index 0000000..6ba9a73 --- /dev/null +++ b/master/_sources/api/blark.input.BlarkSourceLine.rst.txt @@ -0,0 +1,33 @@ +blark.input.BlarkSourceLine +=========================== + +.. currentmodule:: blark.input + +.. autoclass:: BlarkSourceLine + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BlarkSourceLine.__init__ + ~BlarkSourceLine.from_code + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BlarkSourceLine.filename + ~BlarkSourceLine.lineno + ~BlarkSourceLine.code + \ No newline at end of file diff --git a/master/_sources/api/blark.input.UnsupportedFileFormatError.rst.txt b/master/_sources/api/blark.input.UnsupportedFileFormatError.rst.txt new file mode 100644 index 0000000..0771859 --- /dev/null +++ b/master/_sources/api/blark.input.UnsupportedFileFormatError.rst.txt @@ -0,0 +1,6 @@ +blark.input.UnsupportedFileFormatError +====================================== + +.. currentmodule:: blark.input + +.. autoexception:: UnsupportedFileFormatError \ No newline at end of file diff --git a/master/_sources/api/blark.input.load_file_by_name.rst.txt b/master/_sources/api/blark.input.load_file_by_name.rst.txt new file mode 100644 index 0000000..90c953e --- /dev/null +++ b/master/_sources/api/blark.input.load_file_by_name.rst.txt @@ -0,0 +1,6 @@ +blark.input.load\_file\_by\_name +================================ + +.. currentmodule:: blark.input + +.. autofunction:: load_file_by_name \ No newline at end of file diff --git a/master/_sources/api/blark.input.register_input_handler.rst.txt b/master/_sources/api/blark.input.register_input_handler.rst.txt new file mode 100644 index 0000000..6614625 --- /dev/null +++ b/master/_sources/api/blark.input.register_input_handler.rst.txt @@ -0,0 +1,6 @@ +blark.input.register\_input\_handler +==================================== + +.. currentmodule:: blark.input + +.. autofunction:: register_input_handler \ No newline at end of file diff --git a/master/_sources/api/blark.main.main.rst.txt b/master/_sources/api/blark.main.main.rst.txt new file mode 100644 index 0000000..694f960 --- /dev/null +++ b/master/_sources/api/blark.main.main.rst.txt @@ -0,0 +1,6 @@ +blark.main.main +=============== + +.. currentmodule:: blark.main + +.. autofunction:: main \ No newline at end of file diff --git a/master/_sources/api/blark.output.OutputBlock.rst.txt b/master/_sources/api/blark.output.OutputBlock.rst.txt new file mode 100644 index 0000000..abd43c9 --- /dev/null +++ b/master/_sources/api/blark.output.OutputBlock.rst.txt @@ -0,0 +1,32 @@ +blark.output.OutputBlock +======================== + +.. currentmodule:: blark.output + +.. autoclass:: OutputBlock + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~OutputBlock.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~OutputBlock.origin + ~OutputBlock.code + ~OutputBlock.metadata + \ No newline at end of file diff --git a/master/_sources/api/blark.output.get_handler_by_name.rst.txt b/master/_sources/api/blark.output.get_handler_by_name.rst.txt new file mode 100644 index 0000000..c331212 --- /dev/null +++ b/master/_sources/api/blark.output.get_handler_by_name.rst.txt @@ -0,0 +1,6 @@ +blark.output.get\_handler\_by\_name +=================================== + +.. currentmodule:: blark.output + +.. autofunction:: get_handler_by_name \ No newline at end of file diff --git a/master/_sources/api/blark.output.register_output_handler.rst.txt b/master/_sources/api/blark.output.register_output_handler.rst.txt new file mode 100644 index 0000000..4c315d9 --- /dev/null +++ b/master/_sources/api/blark.output.register_output_handler.rst.txt @@ -0,0 +1,6 @@ +blark.output.register\_output\_handler +====================================== + +.. currentmodule:: blark.output + +.. autofunction:: register_output_handler \ No newline at end of file diff --git a/master/_sources/api/blark.parse.BlarkStartingRule.rst.txt b/master/_sources/api/blark.parse.BlarkStartingRule.rst.txt new file mode 100644 index 0000000..355ec00 --- /dev/null +++ b/master/_sources/api/blark.parse.BlarkStartingRule.rst.txt @@ -0,0 +1,33 @@ +blark.parse.BlarkStartingRule +============================= + +.. currentmodule:: blark.parse + +.. autoclass:: BlarkStartingRule + + + + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BlarkStartingRule.iec_source + ~BlarkStartingRule.action + ~BlarkStartingRule.data_type_declaration + ~BlarkStartingRule.function_block_method_declaration + ~BlarkStartingRule.function_block_property_declaration + ~BlarkStartingRule.function_block_type_declaration + ~BlarkStartingRule.function_declaration + ~BlarkStartingRule.global_var_declarations + ~BlarkStartingRule.interface_declaration + ~BlarkStartingRule.program_declaration + ~BlarkStartingRule.statement_list + \ No newline at end of file diff --git a/master/_sources/api/blark.parse.ParseResult.rst.txt b/master/_sources/api/blark.parse.ParseResult.rst.txt new file mode 100644 index 0000000..9944fd6 --- /dev/null +++ b/master/_sources/api/blark.parse.ParseResult.rst.txt @@ -0,0 +1,42 @@ +blark.parse.ParseResult +======================= + +.. currentmodule:: blark.parse + +.. autoclass:: ParseResult + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ParseResult.__init__ + ~ParseResult.dump_source + ~ParseResult.transform + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ParseResult.exception + ~ParseResult.filename + ~ParseResult.identifier + ~ParseResult.line_map + ~ParseResult.parent + ~ParseResult.transformed + ~ParseResult.tree + ~ParseResult.source_code + ~ParseResult.item + ~ParseResult.processed_source_code + ~ParseResult.comments + \ No newline at end of file diff --git a/master/_sources/api/blark.parse.build_arg_parser.rst.txt b/master/_sources/api/blark.parse.build_arg_parser.rst.txt new file mode 100644 index 0000000..89132ef --- /dev/null +++ b/master/_sources/api/blark.parse.build_arg_parser.rst.txt @@ -0,0 +1,6 @@ +blark.parse.build\_arg\_parser +============================== + +.. currentmodule:: blark.parse + +.. autofunction:: build_arg_parser \ No newline at end of file diff --git a/master/_sources/api/blark.parse.dump_json.rst.txt b/master/_sources/api/blark.parse.dump_json.rst.txt new file mode 100644 index 0000000..f493a1e --- /dev/null +++ b/master/_sources/api/blark.parse.dump_json.rst.txt @@ -0,0 +1,6 @@ +blark.parse.dump\_json +====================== + +.. currentmodule:: blark.parse + +.. autofunction:: dump_json \ No newline at end of file diff --git a/master/_sources/api/blark.parse.get_parser.rst.txt b/master/_sources/api/blark.parse.get_parser.rst.txt new file mode 100644 index 0000000..cb7f83d --- /dev/null +++ b/master/_sources/api/blark.parse.get_parser.rst.txt @@ -0,0 +1,6 @@ +blark.parse.get\_parser +======================= + +.. currentmodule:: blark.parse + +.. autofunction:: get_parser \ No newline at end of file diff --git a/master/_sources/api/blark.parse.main.rst.txt b/master/_sources/api/blark.parse.main.rst.txt new file mode 100644 index 0000000..01946a8 --- /dev/null +++ b/master/_sources/api/blark.parse.main.rst.txt @@ -0,0 +1,6 @@ +blark.parse.main +================ + +.. currentmodule:: blark.parse + +.. autofunction:: main \ No newline at end of file diff --git a/master/_sources/api/blark.parse.new_parser.rst.txt b/master/_sources/api/blark.parse.new_parser.rst.txt new file mode 100644 index 0000000..4c34b4e --- /dev/null +++ b/master/_sources/api/blark.parse.new_parser.rst.txt @@ -0,0 +1,6 @@ +blark.parse.new\_parser +======================= + +.. currentmodule:: blark.parse + +.. autofunction:: new_parser \ No newline at end of file diff --git a/master/_sources/api/blark.parse.parse.rst.txt b/master/_sources/api/blark.parse.parse.rst.txt new file mode 100644 index 0000000..b4449eb --- /dev/null +++ b/master/_sources/api/blark.parse.parse.rst.txt @@ -0,0 +1,6 @@ +blark.parse.parse +================= + +.. currentmodule:: blark.parse + +.. autofunction:: parse \ No newline at end of file diff --git a/master/_sources/api/blark.parse.parse_item.rst.txt b/master/_sources/api/blark.parse.parse_item.rst.txt new file mode 100644 index 0000000..8c8a894 --- /dev/null +++ b/master/_sources/api/blark.parse.parse_item.rst.txt @@ -0,0 +1,6 @@ +blark.parse.parse\_item +======================= + +.. currentmodule:: blark.parse + +.. autofunction:: parse_item \ No newline at end of file diff --git a/master/_sources/api/blark.parse.parse_project.rst.txt b/master/_sources/api/blark.parse.parse_project.rst.txt new file mode 100644 index 0000000..12f2153 --- /dev/null +++ b/master/_sources/api/blark.parse.parse_project.rst.txt @@ -0,0 +1,6 @@ +blark.parse.parse\_project +========================== + +.. currentmodule:: blark.parse + +.. autofunction:: parse_project \ No newline at end of file diff --git a/master/_sources/api/blark.parse.parse_single_file.rst.txt b/master/_sources/api/blark.parse.parse_single_file.rst.txt new file mode 100644 index 0000000..49b1e72 --- /dev/null +++ b/master/_sources/api/blark.parse.parse_single_file.rst.txt @@ -0,0 +1,6 @@ +blark.parse.parse\_single\_file +=============================== + +.. currentmodule:: blark.parse + +.. autofunction:: parse_single_file \ No newline at end of file diff --git a/master/_sources/api/blark.parse.parse_source_code.rst.txt b/master/_sources/api/blark.parse.parse_source_code.rst.txt new file mode 100644 index 0000000..8167ed7 --- /dev/null +++ b/master/_sources/api/blark.parse.parse_source_code.rst.txt @@ -0,0 +1,6 @@ +blark.parse.parse\_source\_code +=============================== + +.. currentmodule:: blark.parse + +.. autofunction:: parse_source_code \ No newline at end of file diff --git a/master/_sources/api/blark.parse.summarize.rst.txt b/master/_sources/api/blark.parse.summarize.rst.txt new file mode 100644 index 0000000..c6978e4 --- /dev/null +++ b/master/_sources/api/blark.parse.summarize.rst.txt @@ -0,0 +1,6 @@ +blark.parse.summarize +===================== + +.. currentmodule:: blark.parse + +.. autofunction:: summarize \ No newline at end of file diff --git a/master/_sources/api/blark.plain.PlainFileLoader.rst.txt b/master/_sources/api/blark.plain.PlainFileLoader.rst.txt new file mode 100644 index 0000000..f3a314a --- /dev/null +++ b/master/_sources/api/blark.plain.PlainFileLoader.rst.txt @@ -0,0 +1,39 @@ +blark.plain.PlainFileLoader +=========================== + +.. currentmodule:: blark.plain + +.. autoclass:: PlainFileLoader + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~PlainFileLoader.__init__ + ~PlainFileLoader.load + ~PlainFileLoader.rewrite_code + ~PlainFileLoader.save + ~PlainFileLoader.save_to + ~PlainFileLoader.to_file_contents + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~PlainFileLoader.formatted_code + ~PlainFileLoader.identifier + ~PlainFileLoader.source_type + ~PlainFileLoader.filename + ~PlainFileLoader.raw_source + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.DependencyInformation.rst.txt b/master/_sources/api/blark.solution.DependencyInformation.rst.txt new file mode 100644 index 0000000..51bd969 --- /dev/null +++ b/master/_sources/api/blark.solution.DependencyInformation.rst.txt @@ -0,0 +1,33 @@ +blark.solution.DependencyInformation +==================================== + +.. currentmodule:: blark.solution + +.. autoclass:: DependencyInformation + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DependencyInformation.__init__ + ~DependencyInformation.from_xml + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DependencyInformation.default + ~DependencyInformation.resolution + ~DependencyInformation.name + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.DependencyVersion.rst.txt b/master/_sources/api/blark.solution.DependencyVersion.rst.txt new file mode 100644 index 0000000..34fedef --- /dev/null +++ b/master/_sources/api/blark.solution.DependencyVersion.rst.txt @@ -0,0 +1,34 @@ +blark.solution.DependencyVersion +================================ + +.. currentmodule:: blark.solution + +.. autoclass:: DependencyVersion + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DependencyVersion.__init__ + ~DependencyVersion.from_string + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DependencyVersion.name + ~DependencyVersion.version + ~DependencyVersion.vendor + ~DependencyVersion.namespace + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.LocatedString.rst.txt b/master/_sources/api/blark.solution.LocatedString.rst.txt new file mode 100644 index 0000000..18f01d1 --- /dev/null +++ b/master/_sources/api/blark.solution.LocatedString.rst.txt @@ -0,0 +1,34 @@ +blark.solution.LocatedString +============================ + +.. currentmodule:: blark.solution + +.. autoclass:: LocatedString + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~LocatedString.__init__ + ~LocatedString.to_lines + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~LocatedString.column + ~LocatedString.lineno + ~LocatedString.value + ~LocatedString.filename + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.Project.rst.txt b/master/_sources/api/blark.solution.Project.rst.txt new file mode 100644 index 0000000..0f333e0 --- /dev/null +++ b/master/_sources/api/blark.solution.Project.rst.txt @@ -0,0 +1,37 @@ +blark.solution.Project +====================== + +.. currentmodule:: blark.solution + +.. autoclass:: Project + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Project.__init__ + ~Project.from_filename + ~Project.load + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Project.loaded + ~Project.name + ~Project.saved_path + ~Project.local_path + ~Project.guid + ~Project.solution_guid + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.Solution.rst.txt b/master/_sources/api/blark.solution.Solution.rst.txt new file mode 100644 index 0000000..d8cb59a --- /dev/null +++ b/master/_sources/api/blark.solution.Solution.rst.txt @@ -0,0 +1,37 @@ +blark.solution.Solution +======================= + +.. currentmodule:: blark.solution + +.. autoclass:: Solution + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Solution.__init__ + ~Solution.from_contents + ~Solution.from_filename + ~Solution.from_projects + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Solution.file_extension + ~Solution.filename + ~Solution.projects_by_name + ~Solution.root + ~Solution.projects + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.SolutionLoaderError.rst.txt b/master/_sources/api/blark.solution.SolutionLoaderError.rst.txt new file mode 100644 index 0000000..b26ce87 --- /dev/null +++ b/master/_sources/api/blark.solution.SolutionLoaderError.rst.txt @@ -0,0 +1,6 @@ +blark.solution.SolutionLoaderError +================================== + +.. currentmodule:: blark.solution + +.. autoexception:: SolutionLoaderError \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcAction.rst.txt b/master/_sources/api/blark.solution.TcAction.rst.txt new file mode 100644 index 0000000..e788fec --- /dev/null +++ b/master/_sources/api/blark.solution.TcAction.rst.txt @@ -0,0 +1,40 @@ +blark.solution.TcAction +======================= + +.. currentmodule:: blark.solution + +.. autoclass:: TcAction + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcAction.__init__ + ~TcAction.rewrite_code + ~TcAction.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcAction.default_source_type + ~TcAction.parent + ~TcAction.source_type + ~TcAction.xml + ~TcAction.name + ~TcAction.guid + ~TcAction.decl + ~TcAction.metadata + ~TcAction.filename + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcDUT.rst.txt b/master/_sources/api/blark.solution.TcDUT.rst.txt new file mode 100644 index 0000000..d8e1ece --- /dev/null +++ b/master/_sources/api/blark.solution.TcDUT.rst.txt @@ -0,0 +1,41 @@ +blark.solution.TcDUT +==================== + +.. currentmodule:: blark.solution + +.. autoclass:: TcDUT + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcDUT.__init__ + ~TcDUT.rewrite_code + ~TcDUT.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcDUT.default_source_type + ~TcDUT.file_extension + ~TcDUT.source_type + ~TcDUT.xml + ~TcDUT.name + ~TcDUT.guid + ~TcDUT.decl + ~TcDUT.metadata + ~TcDUT.filename + ~TcDUT.parent + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcDeclImpl.rst.txt b/master/_sources/api/blark.solution.TcDeclImpl.rst.txt new file mode 100644 index 0000000..f3f6b6a --- /dev/null +++ b/master/_sources/api/blark.solution.TcDeclImpl.rst.txt @@ -0,0 +1,41 @@ +blark.solution.TcDeclImpl +========================= + +.. currentmodule:: blark.solution + +.. autoclass:: TcDeclImpl + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcDeclImpl.__init__ + ~TcDeclImpl.declaration_to_blark + ~TcDeclImpl.from_xml + ~TcDeclImpl.implementation_to_blark + ~TcDeclImpl.rewrite_code + ~TcDeclImpl.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcDeclImpl.metadata + ~TcDeclImpl.parent + ~TcDeclImpl.identifier + ~TcDeclImpl.filename + ~TcDeclImpl.source_type + ~TcDeclImpl.declaration + ~TcDeclImpl.implementation + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcExtraInfo.rst.txt b/master/_sources/api/blark.solution.TcExtraInfo.rst.txt new file mode 100644 index 0000000..227c707 --- /dev/null +++ b/master/_sources/api/blark.solution.TcExtraInfo.rst.txt @@ -0,0 +1,33 @@ +blark.solution.TcExtraInfo +========================== + +.. currentmodule:: blark.solution + +.. autoclass:: TcExtraInfo + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcExtraInfo.__init__ + ~TcExtraInfo.from_xml + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcExtraInfo.metadata + ~TcExtraInfo.xml + ~TcExtraInfo.parent + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcGVL.rst.txt b/master/_sources/api/blark.solution.TcGVL.rst.txt new file mode 100644 index 0000000..a9f2a7e --- /dev/null +++ b/master/_sources/api/blark.solution.TcGVL.rst.txt @@ -0,0 +1,41 @@ +blark.solution.TcGVL +==================== + +.. currentmodule:: blark.solution + +.. autoclass:: TcGVL + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcGVL.__init__ + ~TcGVL.rewrite_code + ~TcGVL.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcGVL.default_source_type + ~TcGVL.file_extension + ~TcGVL.source_type + ~TcGVL.xml + ~TcGVL.name + ~TcGVL.guid + ~TcGVL.decl + ~TcGVL.metadata + ~TcGVL.filename + ~TcGVL.parent + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcIO.rst.txt b/master/_sources/api/blark.solution.TcIO.rst.txt new file mode 100644 index 0000000..ed1feab --- /dev/null +++ b/master/_sources/api/blark.solution.TcIO.rst.txt @@ -0,0 +1,42 @@ +blark.solution.TcIO +=================== + +.. currentmodule:: blark.solution + +.. autoclass:: TcIO + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcIO.__init__ + ~TcIO.create_source_child_from_xml + ~TcIO.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcIO.default_source_type + ~TcIO.file_extension + ~TcIO.source_type + ~TcIO.xml + ~TcIO.parts + ~TcIO.name + ~TcIO.guid + ~TcIO.decl + ~TcIO.metadata + ~TcIO.filename + ~TcIO.parent + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcMethod.rst.txt b/master/_sources/api/blark.solution.TcMethod.rst.txt new file mode 100644 index 0000000..5a6e818 --- /dev/null +++ b/master/_sources/api/blark.solution.TcMethod.rst.txt @@ -0,0 +1,40 @@ +blark.solution.TcMethod +======================= + +.. currentmodule:: blark.solution + +.. autoclass:: TcMethod + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcMethod.__init__ + ~TcMethod.rewrite_code + ~TcMethod.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcMethod.default_source_type + ~TcMethod.parent + ~TcMethod.source_type + ~TcMethod.xml + ~TcMethod.name + ~TcMethod.guid + ~TcMethod.decl + ~TcMethod.metadata + ~TcMethod.filename + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcPOU.rst.txt b/master/_sources/api/blark.solution.TcPOU.rst.txt new file mode 100644 index 0000000..1eb51ca --- /dev/null +++ b/master/_sources/api/blark.solution.TcPOU.rst.txt @@ -0,0 +1,45 @@ +blark.solution.TcPOU +==================== + +.. currentmodule:: blark.solution + +.. autoclass:: TcPOU + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcPOU.__init__ + ~TcPOU.create_source_child_from_xml + ~TcPOU.get_child_by_identifier + ~TcPOU.rewrite_code + ~TcPOU.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcPOU.default_source_type + ~TcPOU.file_extension + ~TcPOU.parts_by_name + ~TcPOU.source_type + ~TcPOU.xml + ~TcPOU.parts + ~TcPOU.name + ~TcPOU.guid + ~TcPOU.decl + ~TcPOU.metadata + ~TcPOU.filename + ~TcPOU.parent + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcProperty.rst.txt b/master/_sources/api/blark.solution.TcProperty.rst.txt new file mode 100644 index 0000000..58e4c71 --- /dev/null +++ b/master/_sources/api/blark.solution.TcProperty.rst.txt @@ -0,0 +1,42 @@ +blark.solution.TcProperty +========================= + +.. currentmodule:: blark.solution + +.. autoclass:: TcProperty + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcProperty.__init__ + ~TcProperty.rewrite_code + ~TcProperty.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcProperty.default_source_type + ~TcProperty.get + ~TcProperty.parent + ~TcProperty.set + ~TcProperty.source_type + ~TcProperty.xml + ~TcProperty.name + ~TcProperty.guid + ~TcProperty.decl + ~TcProperty.metadata + ~TcProperty.filename + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcSource.rst.txt b/master/_sources/api/blark.solution.TcSource.rst.txt new file mode 100644 index 0000000..7f7b1e7 --- /dev/null +++ b/master/_sources/api/blark.solution.TcSource.rst.txt @@ -0,0 +1,44 @@ +blark.solution.TcSource +======================= + +.. currentmodule:: blark.solution + +.. autoclass:: TcSource + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcSource.__init__ + ~TcSource.from_contents + ~TcSource.from_filename + ~TcSource.from_xml + ~TcSource.rewrite_code + ~TcSource.to_file_contents + ~TcSource.to_xml + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcSource.default_source_type + ~TcSource.source_type + ~TcSource.xml + ~TcSource.name + ~TcSource.guid + ~TcSource.decl + ~TcSource.metadata + ~TcSource.filename + ~TcSource.parent + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcSourceChild.rst.txt b/master/_sources/api/blark.solution.TcSourceChild.rst.txt new file mode 100644 index 0000000..020ff70 --- /dev/null +++ b/master/_sources/api/blark.solution.TcSourceChild.rst.txt @@ -0,0 +1,39 @@ +blark.solution.TcSourceChild +============================ + +.. currentmodule:: blark.solution + +.. autoclass:: TcSourceChild + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcSourceChild.__init__ + ~TcSourceChild.from_xml + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcSourceChild.default_source_type + ~TcSourceChild.parent + ~TcSourceChild.source_type + ~TcSourceChild.xml + ~TcSourceChild.name + ~TcSourceChild.guid + ~TcSourceChild.decl + ~TcSourceChild.metadata + ~TcSourceChild.filename + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcTTO.rst.txt b/master/_sources/api/blark.solution.TcTTO.rst.txt new file mode 100644 index 0000000..c953e47 --- /dev/null +++ b/master/_sources/api/blark.solution.TcTTO.rst.txt @@ -0,0 +1,40 @@ +blark.solution.TcTTO +==================== + +.. currentmodule:: blark.solution + +.. autoclass:: TcTTO + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcTTO.__init__ + ~TcTTO.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcTTO.default_source_type + ~TcTTO.file_extension + ~TcTTO.source_type + ~TcTTO.xml + ~TcTTO.name + ~TcTTO.guid + ~TcTTO.decl + ~TcTTO.metadata + ~TcTTO.filename + ~TcTTO.parent + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TcUnknownXml.rst.txt b/master/_sources/api/blark.solution.TcUnknownXml.rst.txt new file mode 100644 index 0000000..d4cd997 --- /dev/null +++ b/master/_sources/api/blark.solution.TcUnknownXml.rst.txt @@ -0,0 +1,32 @@ +blark.solution.TcUnknownXml +=========================== + +.. currentmodule:: blark.solution + +.. autoclass:: TcUnknownXml + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TcUnknownXml.__init__ + ~TcUnknownXml.to_blark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TcUnknownXml.xml + ~TcUnknownXml.parent + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TwincatPlcProject.rst.txt b/master/_sources/api/blark.solution.TwincatPlcProject.rst.txt new file mode 100644 index 0000000..442d65f --- /dev/null +++ b/master/_sources/api/blark.solution.TwincatPlcProject.rst.txt @@ -0,0 +1,41 @@ +blark.solution.TwincatPlcProject +================================ + +.. currentmodule:: blark.solution + +.. autoclass:: TwincatPlcProject + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TwincatPlcProject.__init__ + ~TwincatPlcProject.from_filename + ~TwincatPlcProject.from_project_xml + ~TwincatPlcProject.from_standalone_xml + ~TwincatPlcProject.from_xti_filename + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TwincatPlcProject.file_extension + ~TwincatPlcProject.name + ~TwincatPlcProject.guid + ~TwincatPlcProject.xti_path + ~TwincatPlcProject.plcproj_path + ~TwincatPlcProject.properties + ~TwincatPlcProject.dependencies + ~TwincatPlcProject.sources + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TwincatSourceCodeItem.rst.txt b/master/_sources/api/blark.solution.TwincatSourceCodeItem.rst.txt new file mode 100644 index 0000000..69bb1a0 --- /dev/null +++ b/master/_sources/api/blark.solution.TwincatSourceCodeItem.rst.txt @@ -0,0 +1,40 @@ +blark.solution.TwincatSourceCodeItem +==================================== + +.. currentmodule:: blark.solution + +.. autoclass:: TwincatSourceCodeItem + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TwincatSourceCodeItem.__init__ + ~TwincatSourceCodeItem.from_compile_xml + ~TwincatSourceCodeItem.save_to + ~TwincatSourceCodeItem.to_file_contents + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TwincatSourceCodeItem.guid + ~TwincatSourceCodeItem.parent + ~TwincatSourceCodeItem.saved_path + ~TwincatSourceCodeItem.local_path + ~TwincatSourceCodeItem.subtype + ~TwincatSourceCodeItem.link_always + ~TwincatSourceCodeItem.raw_contents + ~TwincatSourceCodeItem.contents + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.TwincatTsProject.rst.txt b/master/_sources/api/blark.solution.TwincatTsProject.rst.txt new file mode 100644 index 0000000..283cf3d --- /dev/null +++ b/master/_sources/api/blark.solution.TwincatTsProject.rst.txt @@ -0,0 +1,37 @@ +blark.solution.TwincatTsProject +=============================== + +.. currentmodule:: blark.solution + +.. autoclass:: TwincatTsProject + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TwincatTsProject.__init__ + ~TwincatTsProject.from_filename + ~TwincatTsProject.from_xml + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TwincatTsProject.file_extension + ~TwincatTsProject.plcs_by_name + ~TwincatTsProject.guid + ~TwincatTsProject.netid + ~TwincatTsProject.path + ~TwincatTsProject.plcs + \ No newline at end of file diff --git a/master/_sources/api/blark.solution.UnsupportedSourceFileError.rst.txt b/master/_sources/api/blark.solution.UnsupportedSourceFileError.rst.txt new file mode 100644 index 0000000..deda99e --- /dev/null +++ b/master/_sources/api/blark.solution.UnsupportedSourceFileError.rst.txt @@ -0,0 +1,6 @@ +blark.solution.UnsupportedSourceFileError +========================================= + +.. currentmodule:: blark.solution + +.. autoexception:: UnsupportedSourceFileError \ No newline at end of file diff --git a/master/_sources/api/blark.solution.filename_from_xml.rst.txt b/master/_sources/api/blark.solution.filename_from_xml.rst.txt new file mode 100644 index 0000000..1c76806 --- /dev/null +++ b/master/_sources/api/blark.solution.filename_from_xml.rst.txt @@ -0,0 +1,6 @@ +blark.solution.filename\_from\_xml +================================== + +.. currentmodule:: blark.solution + +.. autofunction:: filename_from_xml \ No newline at end of file diff --git a/master/_sources/api/blark.solution.get_blark_input_from_solution.rst.txt b/master/_sources/api/blark.solution.get_blark_input_from_solution.rst.txt new file mode 100644 index 0000000..67e0150 --- /dev/null +++ b/master/_sources/api/blark.solution.get_blark_input_from_solution.rst.txt @@ -0,0 +1,6 @@ +blark.solution.get\_blark\_input\_from\_solution +================================================ + +.. currentmodule:: blark.solution + +.. autofunction:: get_blark_input_from_solution \ No newline at end of file diff --git a/master/_sources/api/blark.solution.get_child_located_text.rst.txt b/master/_sources/api/blark.solution.get_child_located_text.rst.txt new file mode 100644 index 0000000..0d28514 --- /dev/null +++ b/master/_sources/api/blark.solution.get_child_located_text.rst.txt @@ -0,0 +1,6 @@ +blark.solution.get\_child\_located\_text +======================================== + +.. currentmodule:: blark.solution + +.. autofunction:: get_child_located_text \ No newline at end of file diff --git a/master/_sources/api/blark.solution.get_child_text.rst.txt b/master/_sources/api/blark.solution.get_child_text.rst.txt new file mode 100644 index 0000000..6e2dd5d --- /dev/null +++ b/master/_sources/api/blark.solution.get_child_text.rst.txt @@ -0,0 +1,6 @@ +blark.solution.get\_child\_text +=============================== + +.. currentmodule:: blark.solution + +.. autofunction:: get_child_text \ No newline at end of file diff --git a/master/_sources/api/blark.solution.get_code_object_from_xml.rst.txt b/master/_sources/api/blark.solution.get_code_object_from_xml.rst.txt new file mode 100644 index 0000000..f9c172b --- /dev/null +++ b/master/_sources/api/blark.solution.get_code_object_from_xml.rst.txt @@ -0,0 +1,6 @@ +blark.solution.get\_code\_object\_from\_xml +=========================================== + +.. currentmodule:: blark.solution + +.. autofunction:: get_code_object_from_xml \ No newline at end of file diff --git a/master/_sources/api/blark.solution.get_project_guid.rst.txt b/master/_sources/api/blark.solution.get_project_guid.rst.txt new file mode 100644 index 0000000..ca624b0 --- /dev/null +++ b/master/_sources/api/blark.solution.get_project_guid.rst.txt @@ -0,0 +1,6 @@ +blark.solution.get\_project\_guid +================================= + +.. currentmodule:: blark.solution + +.. autofunction:: get_project_guid \ No newline at end of file diff --git a/master/_sources/api/blark.solution.get_project_target_netid.rst.txt b/master/_sources/api/blark.solution.get_project_target_netid.rst.txt new file mode 100644 index 0000000..ef49f35 --- /dev/null +++ b/master/_sources/api/blark.solution.get_project_target_netid.rst.txt @@ -0,0 +1,6 @@ +blark.solution.get\_project\_target\_netid +========================================== + +.. currentmodule:: blark.solution + +.. autofunction:: get_project_target_netid \ No newline at end of file diff --git a/master/_sources/api/blark.solution.get_tcplc_from_xml.rst.txt b/master/_sources/api/blark.solution.get_tcplc_from_xml.rst.txt new file mode 100644 index 0000000..69a9037 --- /dev/null +++ b/master/_sources/api/blark.solution.get_tcplc_from_xml.rst.txt @@ -0,0 +1,6 @@ +blark.solution.get\_tcplc\_from\_xml +==================================== + +.. currentmodule:: blark.solution + +.. autofunction:: get_tcplc_from_xml \ No newline at end of file diff --git a/master/_sources/api/blark.solution.make_solution_from_files.rst.txt b/master/_sources/api/blark.solution.make_solution_from_files.rst.txt new file mode 100644 index 0000000..41e92c7 --- /dev/null +++ b/master/_sources/api/blark.solution.make_solution_from_files.rst.txt @@ -0,0 +1,6 @@ +blark.solution.make\_solution\_from\_files +========================================== + +.. currentmodule:: blark.solution + +.. autofunction:: make_solution_from_files \ No newline at end of file diff --git a/master/_sources/api/blark.solution.parse_xml_contents.rst.txt b/master/_sources/api/blark.solution.parse_xml_contents.rst.txt new file mode 100644 index 0000000..024db5e --- /dev/null +++ b/master/_sources/api/blark.solution.parse_xml_contents.rst.txt @@ -0,0 +1,6 @@ +blark.solution.parse\_xml\_contents +=================================== + +.. currentmodule:: blark.solution + +.. autofunction:: parse_xml_contents \ No newline at end of file diff --git a/master/_sources/api/blark.solution.parse_xml_file.rst.txt b/master/_sources/api/blark.solution.parse_xml_file.rst.txt new file mode 100644 index 0000000..7646130 --- /dev/null +++ b/master/_sources/api/blark.solution.parse_xml_file.rst.txt @@ -0,0 +1,6 @@ +blark.solution.parse\_xml\_file +=============================== + +.. currentmodule:: blark.solution + +.. autofunction:: parse_xml_file \ No newline at end of file diff --git a/master/_sources/api/blark.solution.project_loader.rst.txt b/master/_sources/api/blark.solution.project_loader.rst.txt new file mode 100644 index 0000000..cc70edf --- /dev/null +++ b/master/_sources/api/blark.solution.project_loader.rst.txt @@ -0,0 +1,6 @@ +blark.solution.project\_loader +============================== + +.. currentmodule:: blark.solution + +.. autofunction:: project_loader \ No newline at end of file diff --git a/master/_sources/api/blark.solution.projects_from_solution_source.rst.txt b/master/_sources/api/blark.solution.projects_from_solution_source.rst.txt new file mode 100644 index 0000000..366848d --- /dev/null +++ b/master/_sources/api/blark.solution.projects_from_solution_source.rst.txt @@ -0,0 +1,6 @@ +blark.solution.projects\_from\_solution\_source +=============================================== + +.. currentmodule:: blark.solution + +.. autofunction:: projects_from_solution_source \ No newline at end of file diff --git a/master/_sources/api/blark.solution.solution_loader.rst.txt b/master/_sources/api/blark.solution.solution_loader.rst.txt new file mode 100644 index 0000000..23bef7e --- /dev/null +++ b/master/_sources/api/blark.solution.solution_loader.rst.txt @@ -0,0 +1,6 @@ +blark.solution.solution\_loader +=============================== + +.. currentmodule:: blark.solution + +.. autofunction:: solution_loader \ No newline at end of file diff --git a/master/_sources/api/blark.solution.split_property_and_base_decl.rst.txt b/master/_sources/api/blark.solution.split_property_and_base_decl.rst.txt new file mode 100644 index 0000000..8642c29 --- /dev/null +++ b/master/_sources/api/blark.solution.split_property_and_base_decl.rst.txt @@ -0,0 +1,6 @@ +blark.solution.split\_property\_and\_base\_decl +=============================================== + +.. currentmodule:: blark.solution + +.. autofunction:: split_property_and_base_decl \ No newline at end of file diff --git a/master/_sources/api/blark.solution.strip_implicit_lines.rst.txt b/master/_sources/api/blark.solution.strip_implicit_lines.rst.txt new file mode 100644 index 0000000..68601b7 --- /dev/null +++ b/master/_sources/api/blark.solution.strip_implicit_lines.rst.txt @@ -0,0 +1,6 @@ +blark.solution.strip\_implicit\_lines +===================================== + +.. currentmodule:: blark.solution + +.. autofunction:: strip_implicit_lines \ No newline at end of file diff --git a/master/_sources/api/blark.solution.strip_xml_namespace.rst.txt b/master/_sources/api/blark.solution.strip_xml_namespace.rst.txt new file mode 100644 index 0000000..c8de7fc --- /dev/null +++ b/master/_sources/api/blark.solution.strip_xml_namespace.rst.txt @@ -0,0 +1,6 @@ +blark.solution.strip\_xml\_namespace +==================================== + +.. currentmodule:: blark.solution + +.. autofunction:: strip_xml_namespace \ No newline at end of file diff --git a/master/_sources/api/blark.solution.twincat_file_loader.rst.txt b/master/_sources/api/blark.solution.twincat_file_loader.rst.txt new file mode 100644 index 0000000..7ba3f95 --- /dev/null +++ b/master/_sources/api/blark.solution.twincat_file_loader.rst.txt @@ -0,0 +1,6 @@ +blark.solution.twincat\_file\_loader +==================================== + +.. currentmodule:: blark.solution + +.. autofunction:: twincat_file_loader \ No newline at end of file diff --git a/master/_sources/api/blark.solution.twincat_file_writer.rst.txt b/master/_sources/api/blark.solution.twincat_file_writer.rst.txt new file mode 100644 index 0000000..35c5abd --- /dev/null +++ b/master/_sources/api/blark.solution.twincat_file_writer.rst.txt @@ -0,0 +1,6 @@ +blark.solution.twincat\_file\_writer +==================================== + +.. currentmodule:: blark.solution + +.. autofunction:: twincat_file_writer \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.BlarkDirective.rst.txt b/master/_sources/api/blark.sphinxdomain.BlarkDirective.rst.txt new file mode 100644 index 0000000..c8f6cfe --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.BlarkDirective.rst.txt @@ -0,0 +1,45 @@ +blark.sphinxdomain.BlarkDirective +================================= + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: BlarkDirective + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BlarkDirective.config + ~BlarkDirective.doc_field_types + ~BlarkDirective.domain + ~BlarkDirective.env + ~BlarkDirective.final_argument_whitespace + ~BlarkDirective.has_content + ~BlarkDirective.indexnode + ~BlarkDirective.objtype + ~BlarkDirective.option_spec + ~BlarkDirective.optional_arguments + ~BlarkDirective.required_arguments + ~BlarkDirective.name + ~BlarkDirective.rawtext + ~BlarkDirective.text + ~BlarkDirective.lineno + ~BlarkDirective.options + ~BlarkDirective.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.BlarkDirectiveWithDeclarations.rst.txt b/master/_sources/api/blark.sphinxdomain.BlarkDirectiveWithDeclarations.rst.txt new file mode 100644 index 0000000..5b1d239 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.BlarkDirectiveWithDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.sphinxdomain.BlarkDirectiveWithDeclarations +================================================= + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: BlarkDirectiveWithDeclarations + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BlarkDirectiveWithDeclarations.before_content + ~BlarkDirectiveWithDeclarations.get_signature_prefix + ~BlarkDirectiveWithDeclarations.handle_signature + ~BlarkDirectiveWithDeclarations.transform_content + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BlarkDirectiveWithDeclarations.config + ~BlarkDirectiveWithDeclarations.doc_field_types + ~BlarkDirectiveWithDeclarations.domain + ~BlarkDirectiveWithDeclarations.env + ~BlarkDirectiveWithDeclarations.final_argument_whitespace + ~BlarkDirectiveWithDeclarations.has_content + ~BlarkDirectiveWithDeclarations.indexnode + ~BlarkDirectiveWithDeclarations.objtype + ~BlarkDirectiveWithDeclarations.option_spec + ~BlarkDirectiveWithDeclarations.optional_arguments + ~BlarkDirectiveWithDeclarations.required_arguments + ~BlarkDirectiveWithDeclarations.obj + ~BlarkDirectiveWithDeclarations.name + ~BlarkDirectiveWithDeclarations.rawtext + ~BlarkDirectiveWithDeclarations.text + ~BlarkDirectiveWithDeclarations.lineno + ~BlarkDirectiveWithDeclarations.options + ~BlarkDirectiveWithDeclarations.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.BlarkDomain.rst.txt b/master/_sources/api/blark.sphinxdomain.BlarkDomain.rst.txt new file mode 100644 index 0000000..4f081b1 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.BlarkDomain.rst.txt @@ -0,0 +1,42 @@ +blark.sphinxdomain.BlarkDomain +============================== + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: BlarkDomain + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BlarkDomain.clear_doc + ~BlarkDomain.find_obj + ~BlarkDomain.resolve_xref + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BlarkDomain.dangling_warnings + ~BlarkDomain.data_version + ~BlarkDomain.directives + ~BlarkDomain.enumerable_nodes + ~BlarkDomain.indices + ~BlarkDomain.initial_data + ~BlarkDomain.label + ~BlarkDomain.name + ~BlarkDomain.object_types + ~BlarkDomain.roles + ~BlarkDomain.data + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.BlarkSphinxCache.rst.txt b/master/_sources/api/blark.sphinxdomain.BlarkSphinxCache.rst.txt new file mode 100644 index 0000000..7d3304c --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.BlarkSphinxCache.rst.txt @@ -0,0 +1,33 @@ +blark.sphinxdomain.BlarkSphinxCache +=================================== + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: BlarkSphinxCache + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BlarkSphinxCache.__init__ + ~BlarkSphinxCache.configure + ~BlarkSphinxCache.find_by_name + ~BlarkSphinxCache.instance + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BlarkSphinxCache.cache + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.BlarkXRefRole.rst.txt b/master/_sources/api/blark.sphinxdomain.BlarkXRefRole.rst.txt new file mode 100644 index 0000000..0a3d6cd --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.BlarkXRefRole.rst.txt @@ -0,0 +1,43 @@ +blark.sphinxdomain.BlarkXRefRole +================================ + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: BlarkXRefRole + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BlarkXRefRole.process_link + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BlarkXRefRole.config + ~BlarkXRefRole.env + ~BlarkXRefRole.explicit_title_re + ~BlarkXRefRole.has_explicit_title + ~BlarkXRefRole.disabled + ~BlarkXRefRole.title + ~BlarkXRefRole.target + ~BlarkXRefRole.name + ~BlarkXRefRole.rawtext + ~BlarkXRefRole.text + ~BlarkXRefRole.lineno + ~BlarkXRefRole.inliner + ~BlarkXRefRole.options + ~BlarkXRefRole.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.DeclarationDirective.rst.txt b/master/_sources/api/blark.sphinxdomain.DeclarationDirective.rst.txt new file mode 100644 index 0000000..4ed5830 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.DeclarationDirective.rst.txt @@ -0,0 +1,49 @@ +blark.sphinxdomain.DeclarationDirective +======================================= + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: DeclarationDirective + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DeclarationDirective.handle_signature + ~DeclarationDirective.transform_content + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DeclarationDirective.config + ~DeclarationDirective.doc_field_types + ~DeclarationDirective.domain + ~DeclarationDirective.env + ~DeclarationDirective.final_argument_whitespace + ~DeclarationDirective.has_content + ~DeclarationDirective.indexnode + ~DeclarationDirective.objtype + ~DeclarationDirective.option_spec + ~DeclarationDirective.optional_arguments + ~DeclarationDirective.required_arguments + ~DeclarationDirective.block_header + ~DeclarationDirective.obj + ~DeclarationDirective.name + ~DeclarationDirective.rawtext + ~DeclarationDirective.text + ~DeclarationDirective.lineno + ~DeclarationDirective.options + ~DeclarationDirective.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.FunctionBlockDirective.rst.txt b/master/_sources/api/blark.sphinxdomain.FunctionBlockDirective.rst.txt new file mode 100644 index 0000000..9b4bb1d --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.FunctionBlockDirective.rst.txt @@ -0,0 +1,47 @@ +blark.sphinxdomain.FunctionBlockDirective +========================================= + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: FunctionBlockDirective + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionBlockDirective.config + ~FunctionBlockDirective.doc_field_types + ~FunctionBlockDirective.domain + ~FunctionBlockDirective.env + ~FunctionBlockDirective.final_argument_whitespace + ~FunctionBlockDirective.has_content + ~FunctionBlockDirective.indexnode + ~FunctionBlockDirective.objtype + ~FunctionBlockDirective.option_spec + ~FunctionBlockDirective.optional_arguments + ~FunctionBlockDirective.required_arguments + ~FunctionBlockDirective.signature_prefix + ~FunctionBlockDirective.obj + ~FunctionBlockDirective.name + ~FunctionBlockDirective.rawtext + ~FunctionBlockDirective.text + ~FunctionBlockDirective.lineno + ~FunctionBlockDirective.options + ~FunctionBlockDirective.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.FunctionDirective.rst.txt b/master/_sources/api/blark.sphinxdomain.FunctionDirective.rst.txt new file mode 100644 index 0000000..d11c8e3 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.FunctionDirective.rst.txt @@ -0,0 +1,47 @@ +blark.sphinxdomain.FunctionDirective +==================================== + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: FunctionDirective + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionDirective.config + ~FunctionDirective.doc_field_types + ~FunctionDirective.domain + ~FunctionDirective.env + ~FunctionDirective.final_argument_whitespace + ~FunctionDirective.has_content + ~FunctionDirective.indexnode + ~FunctionDirective.objtype + ~FunctionDirective.option_spec + ~FunctionDirective.optional_arguments + ~FunctionDirective.required_arguments + ~FunctionDirective.signature_prefix + ~FunctionDirective.obj + ~FunctionDirective.name + ~FunctionDirective.rawtext + ~FunctionDirective.text + ~FunctionDirective.lineno + ~FunctionDirective.options + ~FunctionDirective.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.GvlDirective.rst.txt b/master/_sources/api/blark.sphinxdomain.GvlDirective.rst.txt new file mode 100644 index 0000000..1096031 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.GvlDirective.rst.txt @@ -0,0 +1,47 @@ +blark.sphinxdomain.GvlDirective +=============================== + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: GvlDirective + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~GvlDirective.config + ~GvlDirective.doc_field_types + ~GvlDirective.domain + ~GvlDirective.env + ~GvlDirective.final_argument_whitespace + ~GvlDirective.has_content + ~GvlDirective.indexnode + ~GvlDirective.objtype + ~GvlDirective.option_spec + ~GvlDirective.optional_arguments + ~GvlDirective.required_arguments + ~GvlDirective.signature_prefix + ~GvlDirective.obj + ~GvlDirective.name + ~GvlDirective.rawtext + ~GvlDirective.text + ~GvlDirective.lineno + ~GvlDirective.options + ~GvlDirective.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.MissingDeclaration.rst.txt b/master/_sources/api/blark.sphinxdomain.MissingDeclaration.rst.txt new file mode 100644 index 0000000..d28ea7f --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.MissingDeclaration.rst.txt @@ -0,0 +1,33 @@ +blark.sphinxdomain.MissingDeclaration +===================================== + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: MissingDeclaration + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~MissingDeclaration.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~MissingDeclaration.name + ~MissingDeclaration.declarations + ~MissingDeclaration.declarations_by_block + ~MissingDeclaration.source_code + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.ProgramDirective.rst.txt b/master/_sources/api/blark.sphinxdomain.ProgramDirective.rst.txt new file mode 100644 index 0000000..ca5c6f6 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.ProgramDirective.rst.txt @@ -0,0 +1,47 @@ +blark.sphinxdomain.ProgramDirective +=================================== + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: ProgramDirective + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ProgramDirective.config + ~ProgramDirective.doc_field_types + ~ProgramDirective.domain + ~ProgramDirective.env + ~ProgramDirective.final_argument_whitespace + ~ProgramDirective.has_content + ~ProgramDirective.indexnode + ~ProgramDirective.objtype + ~ProgramDirective.option_spec + ~ProgramDirective.optional_arguments + ~ProgramDirective.required_arguments + ~ProgramDirective.signature_prefix + ~ProgramDirective.obj + ~ProgramDirective.name + ~ProgramDirective.rawtext + ~ProgramDirective.text + ~ProgramDirective.lineno + ~ProgramDirective.options + ~ProgramDirective.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.TypeDirective.rst.txt b/master/_sources/api/blark.sphinxdomain.TypeDirective.rst.txt new file mode 100644 index 0000000..f909a2f --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.TypeDirective.rst.txt @@ -0,0 +1,47 @@ +blark.sphinxdomain.TypeDirective +================================ + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: TypeDirective + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TypeDirective.config + ~TypeDirective.doc_field_types + ~TypeDirective.domain + ~TypeDirective.env + ~TypeDirective.final_argument_whitespace + ~TypeDirective.has_content + ~TypeDirective.indexnode + ~TypeDirective.objtype + ~TypeDirective.option_spec + ~TypeDirective.optional_arguments + ~TypeDirective.required_arguments + ~TypeDirective.signature_prefix + ~TypeDirective.obj + ~TypeDirective.name + ~TypeDirective.rawtext + ~TypeDirective.text + ~TypeDirective.lineno + ~TypeDirective.options + ~TypeDirective.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.VariableBlockDirective.rst.txt b/master/_sources/api/blark.sphinxdomain.VariableBlockDirective.rst.txt new file mode 100644 index 0000000..32d6a87 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.VariableBlockDirective.rst.txt @@ -0,0 +1,50 @@ +blark.sphinxdomain.VariableBlockDirective +========================================= + +.. currentmodule:: blark.sphinxdomain + +.. autoclass:: VariableBlockDirective + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~VariableBlockDirective.handle_signature + ~VariableBlockDirective.transform_content + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~VariableBlockDirective.config + ~VariableBlockDirective.doc_field_types + ~VariableBlockDirective.domain + ~VariableBlockDirective.env + ~VariableBlockDirective.final_argument_whitespace + ~VariableBlockDirective.has_content + ~VariableBlockDirective.indexnode + ~VariableBlockDirective.objtype + ~VariableBlockDirective.option_spec + ~VariableBlockDirective.optional_arguments + ~VariableBlockDirective.required_arguments + ~VariableBlockDirective.block_header + ~VariableBlockDirective.parent_name + ~VariableBlockDirective.declarations + ~VariableBlockDirective.name + ~VariableBlockDirective.rawtext + ~VariableBlockDirective.text + ~VariableBlockDirective.lineno + ~VariableBlockDirective.options + ~VariableBlockDirective.content + \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.declaration_to_content.rst.txt b/master/_sources/api/blark.sphinxdomain.declaration_to_content.rst.txt new file mode 100644 index 0000000..6ea1d48 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.declaration_to_content.rst.txt @@ -0,0 +1,6 @@ +blark.sphinxdomain.declaration\_to\_content +=========================================== + +.. currentmodule:: blark.sphinxdomain + +.. autofunction:: declaration_to_content \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.declaration_to_signature.rst.txt b/master/_sources/api/blark.sphinxdomain.declaration_to_signature.rst.txt new file mode 100644 index 0000000..c4ad8e1 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.declaration_to_signature.rst.txt @@ -0,0 +1,6 @@ +blark.sphinxdomain.declaration\_to\_signature +============================================= + +.. currentmodule:: blark.sphinxdomain + +.. autofunction:: declaration_to_signature \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.declarations_to_block.rst.txt b/master/_sources/api/blark.sphinxdomain.declarations_to_block.rst.txt new file mode 100644 index 0000000..8147785 --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.declarations_to_block.rst.txt @@ -0,0 +1,6 @@ +blark.sphinxdomain.declarations\_to\_block +========================================== + +.. currentmodule:: blark.sphinxdomain + +.. autofunction:: declarations_to_block \ No newline at end of file diff --git a/master/_sources/api/blark.sphinxdomain.setup.rst.txt b/master/_sources/api/blark.sphinxdomain.setup.rst.txt new file mode 100644 index 0000000..5bede0e --- /dev/null +++ b/master/_sources/api/blark.sphinxdomain.setup.rst.txt @@ -0,0 +1,6 @@ +blark.sphinxdomain.setup +======================== + +.. currentmodule:: blark.sphinxdomain + +.. autofunction:: setup \ No newline at end of file diff --git a/master/_sources/api/blark.summary.ActionSummary.rst.txt b/master/_sources/api/blark.summary.ActionSummary.rst.txt new file mode 100644 index 0000000..b45b317 --- /dev/null +++ b/master/_sources/api/blark.summary.ActionSummary.rst.txt @@ -0,0 +1,39 @@ +blark.summary.ActionSummary +=========================== + +.. currentmodule:: blark.summary + +.. autoclass:: ActionSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ActionSummary.__init__ + ~ActionSummary.from_action + ~ActionSummary.from_statement_list + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ActionSummary.implementation + ~ActionSummary.name + ~ActionSummary.item + ~ActionSummary.source_code + ~ActionSummary.comments + ~ActionSummary.pragmas + ~ActionSummary.filename + ~ActionSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.CodeSummary.rst.txt b/master/_sources/api/blark.summary.CodeSummary.rst.txt new file mode 100644 index 0000000..08f2a19 --- /dev/null +++ b/master/_sources/api/blark.summary.CodeSummary.rst.txt @@ -0,0 +1,43 @@ +blark.summary.CodeSummary +========================= + +.. currentmodule:: blark.summary + +.. autoclass:: CodeSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~CodeSummary.__init__ + ~CodeSummary.append + ~CodeSummary.find + ~CodeSummary.find_code_object_by_dotted_name + ~CodeSummary.find_path + ~CodeSummary.from_parse_results + ~CodeSummary.get_all_items_by_name + ~CodeSummary.get_item_by_name + ~CodeSummary.squash + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~CodeSummary.functions + ~CodeSummary.function_blocks + ~CodeSummary.data_types + ~CodeSummary.programs + ~CodeSummary.globals + ~CodeSummary.interfaces + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.DataTypeSummary.rst.txt b/master/_sources/api/blark.summary.DataTypeSummary.rst.txt new file mode 100644 index 0000000..7303216 --- /dev/null +++ b/master/_sources/api/blark.summary.DataTypeSummary.rst.txt @@ -0,0 +1,43 @@ +blark.summary.DataTypeSummary +============================= + +.. currentmodule:: blark.summary + +.. autoclass:: DataTypeSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DataTypeSummary.__init__ + ~DataTypeSummary.from_data_type + ~DataTypeSummary.squash_base_extends + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DataTypeSummary.declarations_by_block + ~DataTypeSummary.squashed + ~DataTypeSummary.name + ~DataTypeSummary.item + ~DataTypeSummary.source_code + ~DataTypeSummary.type + ~DataTypeSummary.extends + ~DataTypeSummary.declarations + ~DataTypeSummary.comments + ~DataTypeSummary.pragmas + ~DataTypeSummary.filename + ~DataTypeSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.DeclarationSummary.rst.txt b/master/_sources/api/blark.summary.DeclarationSummary.rst.txt new file mode 100644 index 0000000..330f017 --- /dev/null +++ b/master/_sources/api/blark.summary.DeclarationSummary.rst.txt @@ -0,0 +1,46 @@ +blark.summary.DeclarationSummary +================================ + +.. currentmodule:: blark.summary + +.. autoclass:: DeclarationSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DeclarationSummary.__init__ + ~DeclarationSummary.from_block + ~DeclarationSummary.from_declaration + ~DeclarationSummary.from_global_variable + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DeclarationSummary.location_type + ~DeclarationSummary.qualified_name + ~DeclarationSummary.name + ~DeclarationSummary.item + ~DeclarationSummary.parent + ~DeclarationSummary.location + ~DeclarationSummary.block + ~DeclarationSummary.base_type + ~DeclarationSummary.type + ~DeclarationSummary.value + ~DeclarationSummary.comments + ~DeclarationSummary.pragmas + ~DeclarationSummary.filename + ~DeclarationSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.FunctionBlockSummary.rst.txt b/master/_sources/api/blark.summary.FunctionBlockSummary.rst.txt new file mode 100644 index 0000000..696e33e --- /dev/null +++ b/master/_sources/api/blark.summary.FunctionBlockSummary.rst.txt @@ -0,0 +1,46 @@ +blark.summary.FunctionBlockSummary +================================== + +.. currentmodule:: blark.summary + +.. autoclass:: FunctionBlockSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FunctionBlockSummary.__init__ + ~FunctionBlockSummary.from_function_block + ~FunctionBlockSummary.squash_base_extends + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionBlockSummary.declarations_by_block + ~FunctionBlockSummary.implementation + ~FunctionBlockSummary.name + ~FunctionBlockSummary.source_code + ~FunctionBlockSummary.item + ~FunctionBlockSummary.extends + ~FunctionBlockSummary.squashed + ~FunctionBlockSummary.declarations + ~FunctionBlockSummary.actions + ~FunctionBlockSummary.methods + ~FunctionBlockSummary.properties + ~FunctionBlockSummary.comments + ~FunctionBlockSummary.pragmas + ~FunctionBlockSummary.filename + ~FunctionBlockSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.FunctionSummary.rst.txt b/master/_sources/api/blark.summary.FunctionSummary.rst.txt new file mode 100644 index 0000000..1bf4266 --- /dev/null +++ b/master/_sources/api/blark.summary.FunctionSummary.rst.txt @@ -0,0 +1,41 @@ +blark.summary.FunctionSummary +============================= + +.. currentmodule:: blark.summary + +.. autoclass:: FunctionSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FunctionSummary.__init__ + ~FunctionSummary.from_function + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionSummary.declarations_by_block + ~FunctionSummary.implementation + ~FunctionSummary.name + ~FunctionSummary.item + ~FunctionSummary.return_type + ~FunctionSummary.source_code + ~FunctionSummary.declarations + ~FunctionSummary.comments + ~FunctionSummary.pragmas + ~FunctionSummary.filename + ~FunctionSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.GlobalVariableSummary.rst.txt b/master/_sources/api/blark.summary.GlobalVariableSummary.rst.txt new file mode 100644 index 0000000..d33bc0a --- /dev/null +++ b/master/_sources/api/blark.summary.GlobalVariableSummary.rst.txt @@ -0,0 +1,41 @@ +blark.summary.GlobalVariableSummary +=================================== + +.. currentmodule:: blark.summary + +.. autoclass:: GlobalVariableSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~GlobalVariableSummary.__init__ + ~GlobalVariableSummary.from_globals + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~GlobalVariableSummary.declarations_by_block + ~GlobalVariableSummary.qualified_only + ~GlobalVariableSummary.name + ~GlobalVariableSummary.item + ~GlobalVariableSummary.source_code + ~GlobalVariableSummary.type + ~GlobalVariableSummary.declarations + ~GlobalVariableSummary.comments + ~GlobalVariableSummary.pragmas + ~GlobalVariableSummary.filename + ~GlobalVariableSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.InterfaceSummary.rst.txt b/master/_sources/api/blark.summary.InterfaceSummary.rst.txt new file mode 100644 index 0000000..125b552 --- /dev/null +++ b/master/_sources/api/blark.summary.InterfaceSummary.rst.txt @@ -0,0 +1,44 @@ +blark.summary.InterfaceSummary +============================== + +.. currentmodule:: blark.summary + +.. autoclass:: InterfaceSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~InterfaceSummary.__init__ + ~InterfaceSummary.from_interface + ~InterfaceSummary.squash_base_extends + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~InterfaceSummary.declarations_by_block + ~InterfaceSummary.name + ~InterfaceSummary.source_code + ~InterfaceSummary.item + ~InterfaceSummary.extends + ~InterfaceSummary.squashed + ~InterfaceSummary.declarations + ~InterfaceSummary.methods + ~InterfaceSummary.properties + ~InterfaceSummary.comments + ~InterfaceSummary.pragmas + ~InterfaceSummary.filename + ~InterfaceSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.LinkableItems.rst.txt b/master/_sources/api/blark.summary.LinkableItems.rst.txt new file mode 100644 index 0000000..04f77f7 --- /dev/null +++ b/master/_sources/api/blark.summary.LinkableItems.rst.txt @@ -0,0 +1,32 @@ +blark.summary.LinkableItems +=========================== + +.. currentmodule:: blark.summary + +.. autoclass:: LinkableItems + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~LinkableItems.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~LinkableItems.input + ~LinkableItems.output + ~LinkableItems.memory + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.MethodSummary.rst.txt b/master/_sources/api/blark.summary.MethodSummary.rst.txt new file mode 100644 index 0000000..7e804a3 --- /dev/null +++ b/master/_sources/api/blark.summary.MethodSummary.rst.txt @@ -0,0 +1,41 @@ +blark.summary.MethodSummary +=========================== + +.. currentmodule:: blark.summary + +.. autoclass:: MethodSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~MethodSummary.__init__ + ~MethodSummary.from_method + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~MethodSummary.declarations_by_block + ~MethodSummary.implementation + ~MethodSummary.name + ~MethodSummary.item + ~MethodSummary.return_type + ~MethodSummary.source_code + ~MethodSummary.declarations + ~MethodSummary.comments + ~MethodSummary.pragmas + ~MethodSummary.filename + ~MethodSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.ProgramSummary.rst.txt b/master/_sources/api/blark.summary.ProgramSummary.rst.txt new file mode 100644 index 0000000..7b9a571 --- /dev/null +++ b/master/_sources/api/blark.summary.ProgramSummary.rst.txt @@ -0,0 +1,43 @@ +blark.summary.ProgramSummary +============================ + +.. currentmodule:: blark.summary + +.. autoclass:: ProgramSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ProgramSummary.__init__ + ~ProgramSummary.from_program + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ProgramSummary.declarations_by_block + ~ProgramSummary.implementation + ~ProgramSummary.name + ~ProgramSummary.source_code + ~ProgramSummary.item + ~ProgramSummary.declarations + ~ProgramSummary.actions + ~ProgramSummary.methods + ~ProgramSummary.properties + ~ProgramSummary.comments + ~ProgramSummary.pragmas + ~ProgramSummary.filename + ~ProgramSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.PropertyGetSetSummary.rst.txt b/master/_sources/api/blark.summary.PropertyGetSetSummary.rst.txt new file mode 100644 index 0000000..fb83031 --- /dev/null +++ b/master/_sources/api/blark.summary.PropertyGetSetSummary.rst.txt @@ -0,0 +1,38 @@ +blark.summary.PropertyGetSetSummary +=================================== + +.. currentmodule:: blark.summary + +.. autoclass:: PropertyGetSetSummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~PropertyGetSetSummary.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~PropertyGetSetSummary.implementation + ~PropertyGetSetSummary.name + ~PropertyGetSetSummary.item + ~PropertyGetSetSummary.source_code + ~PropertyGetSetSummary.declarations + ~PropertyGetSetSummary.comments + ~PropertyGetSetSummary.pragmas + ~PropertyGetSetSummary.filename + ~PropertyGetSetSummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.PropertySummary.rst.txt b/master/_sources/api/blark.summary.PropertySummary.rst.txt new file mode 100644 index 0000000..bade046 --- /dev/null +++ b/master/_sources/api/blark.summary.PropertySummary.rst.txt @@ -0,0 +1,38 @@ +blark.summary.PropertySummary +============================= + +.. currentmodule:: blark.summary + +.. autoclass:: PropertySummary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~PropertySummary.__init__ + ~PropertySummary.from_property + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~PropertySummary.name + ~PropertySummary.getter + ~PropertySummary.setter + ~PropertySummary.source_code + ~PropertySummary.comments + ~PropertySummary.pragmas + ~PropertySummary.filename + ~PropertySummary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.Summary.rst.txt b/master/_sources/api/blark.summary.Summary.rst.txt new file mode 100644 index 0000000..7e16209 --- /dev/null +++ b/master/_sources/api/blark.summary.Summary.rst.txt @@ -0,0 +1,34 @@ +blark.summary.Summary +===================== + +.. currentmodule:: blark.summary + +.. autoclass:: Summary + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Summary.__init__ + ~Summary.get_meta_kwargs + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Summary.comments + ~Summary.pragmas + ~Summary.filename + ~Summary.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.summary.get_linkable_declarations.rst.txt b/master/_sources/api/blark.summary.get_linkable_declarations.rst.txt new file mode 100644 index 0000000..082c3be --- /dev/null +++ b/master/_sources/api/blark.summary.get_linkable_declarations.rst.txt @@ -0,0 +1,6 @@ +blark.summary.get\_linkable\_declarations +========================================= + +.. currentmodule:: blark.summary + +.. autofunction:: get_linkable_declarations \ No newline at end of file diff --git a/master/_sources/api/blark.summary.path_to_file_and_line.rst.txt b/master/_sources/api/blark.summary.path_to_file_and_line.rst.txt new file mode 100644 index 0000000..7c47e03 --- /dev/null +++ b/master/_sources/api/blark.summary.path_to_file_and_line.rst.txt @@ -0,0 +1,6 @@ +blark.summary.path\_to\_file\_and\_line +======================================= + +.. currentmodule:: blark.summary + +.. autofunction:: path_to_file_and_line \ No newline at end of file diff --git a/master/_sources/api/blark.summary.text_outline.rst.txt b/master/_sources/api/blark.summary.text_outline.rst.txt new file mode 100644 index 0000000..6c266ad --- /dev/null +++ b/master/_sources/api/blark.summary.text_outline.rst.txt @@ -0,0 +1,6 @@ +blark.summary.text\_outline +=========================== + +.. currentmodule:: blark.summary + +.. autofunction:: text_outline \ No newline at end of file diff --git a/master/_sources/api/blark.transform.AccessDeclaration.rst.txt b/master/_sources/api/blark.transform.AccessDeclaration.rst.txt new file mode 100644 index 0000000..866966a --- /dev/null +++ b/master/_sources/api/blark.transform.AccessDeclaration.rst.txt @@ -0,0 +1,50 @@ +blark.transform.AccessDeclaration +================================= + +.. currentmodule:: blark.transform + +.. autoclass:: AccessDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``program_access_decl`` + + .. code:: + + program_access_decl: access_name ":" symbolic_variable ":" non_generic_type_name [ access_direction ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~AccessDeclaration.__init__ + ~AccessDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~AccessDeclaration.meta + ~AccessDeclaration.name + ~AccessDeclaration.variable + ~AccessDeclaration.type + ~AccessDeclaration.direction + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.AccessDeclarations.rst.txt b/master/_sources/api/blark.transform.AccessDeclarations.rst.txt new file mode 100644 index 0000000..fe6c481 --- /dev/null +++ b/master/_sources/api/blark.transform.AccessDeclarations.rst.txt @@ -0,0 +1,49 @@ +blark.transform.AccessDeclarations +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: AccessDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``program_access_decls`` + + .. code:: + + program_access_decls: "VAR_ACCESS"i (program_access_decl ";"+)+ "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~AccessDeclarations.__init__ + ~AccessDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~AccessDeclarations.attribute_pragmas + ~AccessDeclarations.block_header + ~AccessDeclarations.meta + ~AccessDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.AccessSpecifier.rst.txt b/master/_sources/api/blark.transform.AccessSpecifier.rst.txt new file mode 100644 index 0000000..5e0c0d7 --- /dev/null +++ b/master/_sources/api/blark.transform.AccessSpecifier.rst.txt @@ -0,0 +1,43 @@ +blark.transform.AccessSpecifier +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: AccessSpecifier + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``access_specifier`` + + .. code:: + + access_specifier: ACCESS_SPECIFIER+ + + + + + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~AccessSpecifier.public + ~AccessSpecifier.private + ~AccessSpecifier.abstract + ~AccessSpecifier.protected + ~AccessSpecifier.internal + ~AccessSpecifier.final + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Action.rst.txt b/master/_sources/api/blark.transform.Action.rst.txt new file mode 100644 index 0000000..9f112b2 --- /dev/null +++ b/master/_sources/api/blark.transform.Action.rst.txt @@ -0,0 +1,48 @@ +blark.transform.Action +====================== + +.. currentmodule:: blark.transform + +.. autoclass:: Action + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``action`` + + .. code:: + + action: "ACTION"i action_name ":" [ function_block_body ] "END_ACTION"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Action.__init__ + ~Action.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Action.meta + ~Action.name + ~Action.body + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ArrayInitialElement.rst.txt b/master/_sources/api/blark.transform.ArrayInitialElement.rst.txt new file mode 100644 index 0000000..f3767d7 --- /dev/null +++ b/master/_sources/api/blark.transform.ArrayInitialElement.rst.txt @@ -0,0 +1,49 @@ +blark.transform.ArrayInitialElement +=================================== + +.. currentmodule:: blark.transform + +.. autoclass:: ArrayInitialElement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``array_initial_element`` + + .. code:: + + array_initial_element: ( integer | enumerated_value ) "(" [ _array_initial_element ] ")" -> array_initial_element_count + | _array_initial_element + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ArrayInitialElement.__init__ + ~ArrayInitialElement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ArrayInitialElement.count + ~ArrayInitialElement.meta + ~ArrayInitialElement.element + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ArrayInitialization.rst.txt b/master/_sources/api/blark.transform.ArrayInitialization.rst.txt new file mode 100644 index 0000000..e63891e --- /dev/null +++ b/master/_sources/api/blark.transform.ArrayInitialization.rst.txt @@ -0,0 +1,32 @@ +blark.transform.ArrayInitialization +=================================== + +.. currentmodule:: blark.transform + +.. autoclass:: ArrayInitialization + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ArrayInitialization.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ArrayInitialization.brackets + ~ArrayInitialization.meta + ~ArrayInitialization.elements + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ArraySpecification.rst.txt b/master/_sources/api/blark.transform.ArraySpecification.rst.txt new file mode 100644 index 0000000..a41758f --- /dev/null +++ b/master/_sources/api/blark.transform.ArraySpecification.rst.txt @@ -0,0 +1,51 @@ +blark.transform.ArraySpecification +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: ArraySpecification + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``array_specification`` + + .. code:: + + array_specification: "ARRAY"i "[" subrange ( "," subrange )* "]" "OF"i _array_spec_type + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ArraySpecification.__init__ + ~ArraySpecification.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ArraySpecification.base_type_name + ~ArraySpecification.full_type_name + ~ArraySpecification.meta + ~ArraySpecification.type_info + ~ArraySpecification.subranges + ~ArraySpecification.type + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ArrayTypeDeclaration.rst.txt b/master/_sources/api/blark.transform.ArrayTypeDeclaration.rst.txt new file mode 100644 index 0000000..5671d85 --- /dev/null +++ b/master/_sources/api/blark.transform.ArrayTypeDeclaration.rst.txt @@ -0,0 +1,48 @@ +blark.transform.ArrayTypeDeclaration +==================================== + +.. currentmodule:: blark.transform + +.. autoclass:: ArrayTypeDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``array_type_declaration`` + + .. code:: + + array_type_declaration: array_type_name ":" array_spec_init + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ArrayTypeDeclaration.__init__ + ~ArrayTypeDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ArrayTypeDeclaration.meta + ~ArrayTypeDeclaration.name + ~ArrayTypeDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ArrayTypeInitialization.rst.txt b/master/_sources/api/blark.transform.ArrayTypeInitialization.rst.txt new file mode 100644 index 0000000..51af3f9 --- /dev/null +++ b/master/_sources/api/blark.transform.ArrayTypeInitialization.rst.txt @@ -0,0 +1,52 @@ +blark.transform.ArrayTypeInitialization +======================================= + +.. currentmodule:: blark.transform + +.. autoclass:: ArrayTypeInitialization + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``array_spec_init`` + + .. code:: + + array_spec_init: [ indirection_type ] array_specification [ ":=" array_initialization ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ArrayTypeInitialization.__init__ + ~ArrayTypeInitialization.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ArrayTypeInitialization.base_type_name + ~ArrayTypeInitialization.full_type_name + ~ArrayTypeInitialization.meta + ~ArrayTypeInitialization.type_info + ~ArrayTypeInitialization.indirection + ~ArrayTypeInitialization.spec + ~ArrayTypeInitialization.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ArrayVariableInitDeclaration.rst.txt b/master/_sources/api/blark.transform.ArrayVariableInitDeclaration.rst.txt new file mode 100644 index 0000000..dda7e42 --- /dev/null +++ b/master/_sources/api/blark.transform.ArrayVariableInitDeclaration.rst.txt @@ -0,0 +1,48 @@ +blark.transform.ArrayVariableInitDeclaration +============================================ + +.. currentmodule:: blark.transform + +.. autoclass:: ArrayVariableInitDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``array_var_init_decl`` + + .. code:: + + array_var_init_decl: var1_list ":" array_spec_init + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ArrayVariableInitDeclaration.__init__ + ~ArrayVariableInitDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ArrayVariableInitDeclaration.meta + ~ArrayVariableInitDeclaration.variables + ~ArrayVariableInitDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.AssignmentStatement.rst.txt b/master/_sources/api/blark.transform.AssignmentStatement.rst.txt new file mode 100644 index 0000000..a20def5 --- /dev/null +++ b/master/_sources/api/blark.transform.AssignmentStatement.rst.txt @@ -0,0 +1,48 @@ +blark.transform.AssignmentStatement +=================================== + +.. currentmodule:: blark.transform + +.. autoclass:: AssignmentStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``assignment_statement`` + + .. code:: + + assignment_statement: _variable ASSIGNMENT ( _variable ASSIGNMENT )* expression ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~AssignmentStatement.__init__ + ~AssignmentStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~AssignmentStatement.meta + ~AssignmentStatement.variables + ~AssignmentStatement.expression + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.BinaryBitString.rst.txt b/master/_sources/api/blark.transform.BinaryBitString.rst.txt new file mode 100644 index 0000000..26f4120 --- /dev/null +++ b/master/_sources/api/blark.transform.BinaryBitString.rst.txt @@ -0,0 +1,48 @@ +blark.transform.BinaryBitString +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: BinaryBitString + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``binary_bit_string_literal`` + + .. code:: + + bit_string_literal: [ BIT_STRING_TYPE_NAME "#" ] "2#" BIT_STRING -> binary_bit_string_literal + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BinaryBitString.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BinaryBitString.base + ~BinaryBitString.meta + ~BinaryBitString.type_name + ~BinaryBitString.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.BinaryInteger.rst.txt b/master/_sources/api/blark.transform.BinaryInteger.rst.txt new file mode 100644 index 0000000..a1ff742 --- /dev/null +++ b/master/_sources/api/blark.transform.BinaryInteger.rst.txt @@ -0,0 +1,48 @@ +blark.transform.BinaryInteger +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: BinaryInteger + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``binary_integer`` + + .. code:: + + ?any_integer: "2#" BIT_STRING -> binary_integer + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BinaryInteger.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BinaryInteger.base + ~BinaryInteger.meta + ~BinaryInteger.type_name + ~BinaryInteger.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.BinaryOperation.rst.txt b/master/_sources/api/blark.transform.BinaryOperation.rst.txt new file mode 100644 index 0000000..a74e9db --- /dev/null +++ b/master/_sources/api/blark.transform.BinaryOperation.rst.txt @@ -0,0 +1,112 @@ +blark.transform.BinaryOperation +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: BinaryOperation + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``expression`` + + .. code:: + + expression: assignment_expression ( ASSIGNMENT assignment_expression )* + + + ``add_expression`` + + .. code:: + + add_expression: expression_term ( ADD_OPERATOR expression_term )* + + + ``and_expression`` + + .. code:: + + and_expression: comparison_expression ( LOGICAL_AND comparison_expression )* + + + ``and_then_expression`` + + .. code:: + + and_then_expression: xor_expression ( LOGICAL_OR xor_expression )* + + + ``or_else_expression`` + + .. code:: + + or_else_expression: and_then_expression ( LOGICAL_AND_THEN and_then_expression )* + + + ``assignment_expression`` + + .. code:: + + assignment_expression: or_else_expression ( LOGICAL_OR_ELSE or_else_expression )* + + + ``xor_expression`` + + .. code:: + + xor_expression: and_expression ( LOGICAL_XOR and_expression )* + + + ``comparison_expression`` + + .. code:: + + comparison_expression: equality_expression ( EQUALS_OP equality_expression )* + + + ``equality_expression`` + + .. code:: + + equality_expression: add_expression ( COMPARE_OP add_expression )* + + + ``expression_term`` + + .. code:: + + expression_term: unary_expression ( MULTIPLY_OPERATOR unary_expression )* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BinaryOperation.__init__ + ~BinaryOperation.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BinaryOperation.meta + ~BinaryOperation.left + ~BinaryOperation.op + ~BinaryOperation.right + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.BitString.rst.txt b/master/_sources/api/blark.transform.BitString.rst.txt new file mode 100644 index 0000000..5df76b9 --- /dev/null +++ b/master/_sources/api/blark.transform.BitString.rst.txt @@ -0,0 +1,52 @@ +blark.transform.BitString +========================= + +.. currentmodule:: blark.transform + +.. autoclass:: BitString + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``bit_string_literal`` + + .. code:: + + bit_string_literal: [ BIT_STRING_TYPE_NAME "#" ] "2#" BIT_STRING -> binary_bit_string_literal + | [ BIT_STRING_TYPE_NAME "#" ] "8#" OCTAL_STRING -> octal_bit_string_literal + | [ BIT_STRING_TYPE_NAME "#" ] "16#" HEX_STRING -> hex_bit_string_literal + | [ BIT_STRING_TYPE_NAME "#" ] INTEGER + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BitString.__init__ + ~BitString.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BitString.base + ~BitString.meta + ~BitString.type_name + ~BitString.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Boolean.rst.txt b/master/_sources/api/blark.transform.Boolean.rst.txt new file mode 100644 index 0000000..e843e26 --- /dev/null +++ b/master/_sources/api/blark.transform.Boolean.rst.txt @@ -0,0 +1,31 @@ +blark.transform.Boolean +======================= + +.. currentmodule:: blark.transform + +.. autoclass:: Boolean + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Boolean.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Boolean.meta + ~Boolean.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.BracketedExpression.rst.txt b/master/_sources/api/blark.transform.BracketedExpression.rst.txt new file mode 100644 index 0000000..9a1b01c --- /dev/null +++ b/master/_sources/api/blark.transform.BracketedExpression.rst.txt @@ -0,0 +1,47 @@ +blark.transform.BracketedExpression +=================================== + +.. currentmodule:: blark.transform + +.. autoclass:: BracketedExpression + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``bracketed_expression`` + + .. code:: + + bracketed_expression: "[" expression "]" + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~BracketedExpression.__init__ + ~BracketedExpression.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~BracketedExpression.meta + ~BracketedExpression.expression + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.CaseElement.rst.txt b/master/_sources/api/blark.transform.CaseElement.rst.txt new file mode 100644 index 0000000..2533094 --- /dev/null +++ b/master/_sources/api/blark.transform.CaseElement.rst.txt @@ -0,0 +1,48 @@ +blark.transform.CaseElement +=========================== + +.. currentmodule:: blark.transform + +.. autoclass:: CaseElement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``case_element`` + + .. code:: + + case_element: case_list ":" [ case_element_statement_list ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~CaseElement.__init__ + ~CaseElement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~CaseElement.meta + ~CaseElement.matches + ~CaseElement.statements + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.CaseStatement.rst.txt b/master/_sources/api/blark.transform.CaseStatement.rst.txt new file mode 100644 index 0000000..4ebeee7 --- /dev/null +++ b/master/_sources/api/blark.transform.CaseStatement.rst.txt @@ -0,0 +1,49 @@ +blark.transform.CaseStatement +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: CaseStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``case_statement`` + + .. code:: + + case_statement: "CASE"i expression "OF"i case_elements [ else_clause ] "END_CASE"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~CaseStatement.__init__ + ~CaseStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~CaseStatement.meta + ~CaseStatement.expression + ~CaseStatement.cases + ~CaseStatement.else_clause + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ChainedFunctionCall.rst.txt b/master/_sources/api/blark.transform.ChainedFunctionCall.rst.txt new file mode 100644 index 0000000..cabc096 --- /dev/null +++ b/master/_sources/api/blark.transform.ChainedFunctionCall.rst.txt @@ -0,0 +1,47 @@ +blark.transform.ChainedFunctionCall +=================================== + +.. currentmodule:: blark.transform + +.. autoclass:: ChainedFunctionCall + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``chained_function_call`` + + .. code:: + + chained_function_call: function_call ( "." function_call )+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ChainedFunctionCall.__init__ + ~ChainedFunctionCall.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ChainedFunctionCall.meta + ~ChainedFunctionCall.invocations + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ChainedFunctionCallStatement.rst.txt b/master/_sources/api/blark.transform.ChainedFunctionCallStatement.rst.txt new file mode 100644 index 0000000..f0fb8f8 --- /dev/null +++ b/master/_sources/api/blark.transform.ChainedFunctionCallStatement.rst.txt @@ -0,0 +1,47 @@ +blark.transform.ChainedFunctionCallStatement +============================================ + +.. currentmodule:: blark.transform + +.. autoclass:: ChainedFunctionCallStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``chained_function_call_statement`` + + .. code:: + + chained_function_call_statement: chained_function_call ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ChainedFunctionCallStatement.__init__ + ~ChainedFunctionCallStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ChainedFunctionCallStatement.meta + ~ChainedFunctionCallStatement.invocations + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ContinueStatement.rst.txt b/master/_sources/api/blark.transform.ContinueStatement.rst.txt new file mode 100644 index 0000000..f985d0b --- /dev/null +++ b/master/_sources/api/blark.transform.ContinueStatement.rst.txt @@ -0,0 +1,46 @@ +blark.transform.ContinueStatement +================================= + +.. currentmodule:: blark.transform + +.. autoclass:: ContinueStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``continue_statement`` + + .. code:: + + continue_statement.1: "CONTINUE"i ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ContinueStatement.__init__ + ~ContinueStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ContinueStatement.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.DataType.rst.txt b/master/_sources/api/blark.transform.DataType.rst.txt new file mode 100644 index 0000000..6aa1524 --- /dev/null +++ b/master/_sources/api/blark.transform.DataType.rst.txt @@ -0,0 +1,48 @@ +blark.transform.DataType +======================== + +.. currentmodule:: blark.transform + +.. autoclass:: DataType + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``non_generic_type_name`` + + .. code:: + + non_generic_type_name: [ pointer_type ] ( elementary_type_name | derived_type_name | DOTTED_IDENTIFIER ) + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DataType.__init__ + ~DataType.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DataType.meta + ~DataType.indirection + ~DataType.type_name + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.DataTypeDeclaration.rst.txt b/master/_sources/api/blark.transform.DataTypeDeclaration.rst.txt new file mode 100644 index 0000000..fc2b403 --- /dev/null +++ b/master/_sources/api/blark.transform.DataTypeDeclaration.rst.txt @@ -0,0 +1,48 @@ +blark.transform.DataTypeDeclaration +=================================== + +.. currentmodule:: blark.transform + +.. autoclass:: DataTypeDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``data_type_declaration`` + + .. code:: + + data_type_declaration: "TYPE"i [ access_specifier ] [ _type_declaration ] ";"* "END_TYPE"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DataTypeDeclaration.__init__ + ~DataTypeDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DataTypeDeclaration.meta + ~DataTypeDeclaration.declaration + ~DataTypeDeclaration.access + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Date.rst.txt b/master/_sources/api/blark.transform.Date.rst.txt new file mode 100644 index 0000000..77eb1b5 --- /dev/null +++ b/master/_sources/api/blark.transform.Date.rst.txt @@ -0,0 +1,50 @@ +blark.transform.Date +==================== + +.. currentmodule:: blark.transform + +.. autoclass:: Date + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``date`` + + .. code:: + + date: ( "DATE"i | "D"i | "d"i ) "#" _date_literal + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Date.__init__ + ~Date.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Date.meta + ~Date.value + ~Date.year + ~Date.month + ~Date.day + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.DateTime.rst.txt b/master/_sources/api/blark.transform.DateTime.rst.txt new file mode 100644 index 0000000..8a2c01e --- /dev/null +++ b/master/_sources/api/blark.transform.DateTime.rst.txt @@ -0,0 +1,49 @@ +blark.transform.DateTime +======================== + +.. currentmodule:: blark.transform + +.. autoclass:: DateTime + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``date_and_time`` + + .. code:: + + date_and_time: ( "DATE_AND_TIME"i | "DT"i ) "#" _date_literal "-" _daytime + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DateTime.__init__ + ~DateTime.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DateTime.meta + ~DateTime.value + ~DateTime.date + ~DateTime.time + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.DeclaredVariable.rst.txt b/master/_sources/api/blark.transform.DeclaredVariable.rst.txt new file mode 100644 index 0000000..a28f6ed --- /dev/null +++ b/master/_sources/api/blark.transform.DeclaredVariable.rst.txt @@ -0,0 +1,51 @@ +blark.transform.DeclaredVariable +================================ + +.. currentmodule:: blark.transform + +.. autoclass:: DeclaredVariable + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``var1`` + + .. code:: + + var1: variable_name [ location ] + | variable_name [ incomplete_location ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DeclaredVariable.__init__ + ~DeclaredVariable.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DeclaredVariable.dereferenced + ~DeclaredVariable.meta + ~DeclaredVariable.name + ~DeclaredVariable.variable + ~DeclaredVariable.location + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.DirectVariable.rst.txt b/master/_sources/api/blark.transform.DirectVariable.rst.txt new file mode 100644 index 0000000..ae719c1 --- /dev/null +++ b/master/_sources/api/blark.transform.DirectVariable.rst.txt @@ -0,0 +1,50 @@ +blark.transform.DirectVariable +============================== + +.. currentmodule:: blark.transform + +.. autoclass:: DirectVariable + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``direct_variable`` + + .. code:: + + direct_variable: "%" LOCATION_PREFIX [ SIZE_PREFIX ] INTEGER ( "." INTEGER )* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~DirectVariable.__init__ + ~DirectVariable.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~DirectVariable.bits + ~DirectVariable.meta + ~DirectVariable.location_prefix + ~DirectVariable.location + ~DirectVariable.size_prefix + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Duration.rst.txt b/master/_sources/api/blark.transform.Duration.rst.txt new file mode 100644 index 0000000..d0c3259 --- /dev/null +++ b/master/_sources/api/blark.transform.Duration.rst.txt @@ -0,0 +1,53 @@ +blark.transform.Duration +======================== + +.. currentmodule:: blark.transform + +.. autoclass:: Duration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``duration`` + + .. code:: + + duration: ( "TIME"i | "T"i ) "#" [ MINUS ] _interval + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Duration.__init__ + ~Duration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Duration.days + ~Duration.hours + ~Duration.meta + ~Duration.milliseconds + ~Duration.minutes + ~Duration.negative + ~Duration.seconds + ~Duration.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.EdgeDeclaration.rst.txt b/master/_sources/api/blark.transform.EdgeDeclaration.rst.txt new file mode 100644 index 0000000..14c1665 --- /dev/null +++ b/master/_sources/api/blark.transform.EdgeDeclaration.rst.txt @@ -0,0 +1,49 @@ +blark.transform.EdgeDeclaration +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: EdgeDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``edge_declaration`` + + .. code:: + + edge_declaration: var1_list ":" "BOOL"i ( R_EDGE | F_EDGE ) + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~EdgeDeclaration.__init__ + ~EdgeDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~EdgeDeclaration.meta + ~EdgeDeclaration.variables + ~EdgeDeclaration.edge + ~EdgeDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ElseClause.rst.txt b/master/_sources/api/blark.transform.ElseClause.rst.txt new file mode 100644 index 0000000..d097249 --- /dev/null +++ b/master/_sources/api/blark.transform.ElseClause.rst.txt @@ -0,0 +1,47 @@ +blark.transform.ElseClause +========================== + +.. currentmodule:: blark.transform + +.. autoclass:: ElseClause + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``else_clause`` + + .. code:: + + else_clause: "ELSE"i [ statement_list ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ElseClause.__init__ + ~ElseClause.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ElseClause.meta + ~ElseClause.statements + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ElseIfClause.rst.txt b/master/_sources/api/blark.transform.ElseIfClause.rst.txt new file mode 100644 index 0000000..e3c9338 --- /dev/null +++ b/master/_sources/api/blark.transform.ElseIfClause.rst.txt @@ -0,0 +1,48 @@ +blark.transform.ElseIfClause +============================ + +.. currentmodule:: blark.transform + +.. autoclass:: ElseIfClause + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``else_if_clause`` + + .. code:: + + else_if_clause: "ELSIF"i expression "THEN"i [ statement_list ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ElseIfClause.__init__ + ~ElseIfClause.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ElseIfClause.meta + ~ElseIfClause.if_expression + ~ElseIfClause.statements + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.EnumeratedSpecification.rst.txt b/master/_sources/api/blark.transform.EnumeratedSpecification.rst.txt new file mode 100644 index 0000000..45e6825 --- /dev/null +++ b/master/_sources/api/blark.transform.EnumeratedSpecification.rst.txt @@ -0,0 +1,52 @@ +blark.transform.EnumeratedSpecification +======================================= + +.. currentmodule:: blark.transform + +.. autoclass:: EnumeratedSpecification + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``enumerated_specification`` + + .. code:: + + enumerated_specification: "(" enumerated_value ( "," enumerated_value )* ")" [ ENUM_DATA_TYPE_NAME ] + | enumerated_type_name + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~EnumeratedSpecification.__init__ + ~EnumeratedSpecification.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~EnumeratedSpecification.base_type_name + ~EnumeratedSpecification.full_type_name + ~EnumeratedSpecification.meta + ~EnumeratedSpecification.type_info + ~EnumeratedSpecification.values + ~EnumeratedSpecification.type_name + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.EnumeratedTypeDeclaration.rst.txt b/master/_sources/api/blark.transform.EnumeratedTypeDeclaration.rst.txt new file mode 100644 index 0000000..0fa9240 --- /dev/null +++ b/master/_sources/api/blark.transform.EnumeratedTypeDeclaration.rst.txt @@ -0,0 +1,48 @@ +blark.transform.EnumeratedTypeDeclaration +========================================= + +.. currentmodule:: blark.transform + +.. autoclass:: EnumeratedTypeDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``enumerated_type_declaration`` + + .. code:: + + enumerated_type_declaration: enumerated_type_name ":" enumerated_spec_init + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~EnumeratedTypeDeclaration.__init__ + ~EnumeratedTypeDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~EnumeratedTypeDeclaration.meta + ~EnumeratedTypeDeclaration.name + ~EnumeratedTypeDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.EnumeratedTypeInitialization.rst.txt b/master/_sources/api/blark.transform.EnumeratedTypeInitialization.rst.txt new file mode 100644 index 0000000..4cfbcaf --- /dev/null +++ b/master/_sources/api/blark.transform.EnumeratedTypeInitialization.rst.txt @@ -0,0 +1,52 @@ +blark.transform.EnumeratedTypeInitialization +============================================ + +.. currentmodule:: blark.transform + +.. autoclass:: EnumeratedTypeInitialization + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``enumerated_spec_init`` + + .. code:: + + enumerated_spec_init: [ indirection_type ] enumerated_specification [ ":=" enumerated_value ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~EnumeratedTypeInitialization.__init__ + ~EnumeratedTypeInitialization.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~EnumeratedTypeInitialization.base_type_name + ~EnumeratedTypeInitialization.full_type_name + ~EnumeratedTypeInitialization.meta + ~EnumeratedTypeInitialization.type_info + ~EnumeratedTypeInitialization.indirection + ~EnumeratedTypeInitialization.spec + ~EnumeratedTypeInitialization.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.EnumeratedValue.rst.txt b/master/_sources/api/blark.transform.EnumeratedValue.rst.txt new file mode 100644 index 0000000..fd22488 --- /dev/null +++ b/master/_sources/api/blark.transform.EnumeratedValue.rst.txt @@ -0,0 +1,49 @@ +blark.transform.EnumeratedValue +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: EnumeratedValue + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``enumerated_value`` + + .. code:: + + enumerated_value: [ enumerated_type_name "#" ] DOTTED_IDENTIFIER [ ":=" integer_or_constant ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~EnumeratedValue.__init__ + ~EnumeratedValue.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~EnumeratedValue.meta + ~EnumeratedValue.type_name + ~EnumeratedValue.name + ~EnumeratedValue.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ExitStatement.rst.txt b/master/_sources/api/blark.transform.ExitStatement.rst.txt new file mode 100644 index 0000000..128b6cd --- /dev/null +++ b/master/_sources/api/blark.transform.ExitStatement.rst.txt @@ -0,0 +1,46 @@ +blark.transform.ExitStatement +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: ExitStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``exit_statement`` + + .. code:: + + exit_statement.1: "EXIT"i ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ExitStatement.__init__ + ~ExitStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ExitStatement.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Expression.rst.txt b/master/_sources/api/blark.transform.Expression.rst.txt new file mode 100644 index 0000000..8e0192f --- /dev/null +++ b/master/_sources/api/blark.transform.Expression.rst.txt @@ -0,0 +1,24 @@ +blark.transform.Expression +========================== + +.. currentmodule:: blark.transform + +.. autoclass:: Expression + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Expression.__init__ + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ExtendedSourceCode.rst.txt b/master/_sources/api/blark.transform.ExtendedSourceCode.rst.txt new file mode 100644 index 0000000..938fd03 --- /dev/null +++ b/master/_sources/api/blark.transform.ExtendedSourceCode.rst.txt @@ -0,0 +1,34 @@ +blark.transform.ExtendedSourceCode +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: ExtendedSourceCode + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ExtendedSourceCode.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ExtendedSourceCode.filename + ~ExtendedSourceCode.line_map + ~ExtendedSourceCode.meta + ~ExtendedSourceCode.raw_source + ~ExtendedSourceCode.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Extends.rst.txt b/master/_sources/api/blark.transform.Extends.rst.txt new file mode 100644 index 0000000..246714e --- /dev/null +++ b/master/_sources/api/blark.transform.Extends.rst.txt @@ -0,0 +1,47 @@ +blark.transform.Extends +======================= + +.. currentmodule:: blark.transform + +.. autoclass:: Extends + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``extends`` + + .. code:: + + extends: "EXTENDS"i DOTTED_IDENTIFIER + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Extends.__init__ + ~Extends.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Extends.meta + ~Extends.name + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ExternalVariableDeclaration.rst.txt b/master/_sources/api/blark.transform.ExternalVariableDeclaration.rst.txt new file mode 100644 index 0000000..c8db2b2 --- /dev/null +++ b/master/_sources/api/blark.transform.ExternalVariableDeclaration.rst.txt @@ -0,0 +1,48 @@ +blark.transform.ExternalVariableDeclaration +=========================================== + +.. currentmodule:: blark.transform + +.. autoclass:: ExternalVariableDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``external_declaration`` + + .. code:: + + external_declaration: global_var_name ":" ( simple_specification | subrange_specification | enumerated_specification | array_specification | structure_type_name | function_block_type_name ) ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ExternalVariableDeclaration.__init__ + ~ExternalVariableDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ExternalVariableDeclaration.meta + ~ExternalVariableDeclaration.name + ~ExternalVariableDeclaration.spec + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ExternalVariableDeclarations.rst.txt b/master/_sources/api/blark.transform.ExternalVariableDeclarations.rst.txt new file mode 100644 index 0000000..fe37a02 --- /dev/null +++ b/master/_sources/api/blark.transform.ExternalVariableDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.ExternalVariableDeclarations +============================================ + +.. currentmodule:: blark.transform + +.. autoclass:: ExternalVariableDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``external_var_declarations`` + + .. code:: + + external_var_declarations: "VAR_EXTERNAL"i [ variable_attributes ] external_declaration* "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ExternalVariableDeclarations.__init__ + ~ExternalVariableDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ExternalVariableDeclarations.attribute_pragmas + ~ExternalVariableDeclarations.block_header + ~ExternalVariableDeclarations.meta + ~ExternalVariableDeclarations.attrs + ~ExternalVariableDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FieldSelector.rst.txt b/master/_sources/api/blark.transform.FieldSelector.rst.txt new file mode 100644 index 0000000..1181a4f --- /dev/null +++ b/master/_sources/api/blark.transform.FieldSelector.rst.txt @@ -0,0 +1,48 @@ +blark.transform.FieldSelector +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: FieldSelector + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``field_selector`` + + .. code:: + + field_selector: [ DEREFERENCED ] "." ( variable_name | INTEGER ) + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FieldSelector.__init__ + ~FieldSelector.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FieldSelector.meta + ~FieldSelector.field + ~FieldSelector.dereferenced + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ForStatement.rst.txt b/master/_sources/api/blark.transform.ForStatement.rst.txt new file mode 100644 index 0000000..1ebe2ab --- /dev/null +++ b/master/_sources/api/blark.transform.ForStatement.rst.txt @@ -0,0 +1,51 @@ +blark.transform.ForStatement +============================ + +.. currentmodule:: blark.transform + +.. autoclass:: ForStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``for_statement`` + + .. code:: + + for_statement: "FOR"i control_variable ":=" _for_list "DO"i statement_list "END_FOR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ForStatement.__init__ + ~ForStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ForStatement.meta + ~ForStatement.control + ~ForStatement.from_ + ~ForStatement.to + ~ForStatement.step + ~ForStatement.statements + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FormatSettings.rst.txt b/master/_sources/api/blark.transform.FormatSettings.rst.txt new file mode 100644 index 0000000..79783b0 --- /dev/null +++ b/master/_sources/api/blark.transform.FormatSettings.rst.txt @@ -0,0 +1,30 @@ +blark.transform.FormatSettings +============================== + +.. currentmodule:: blark.transform + +.. autoclass:: FormatSettings + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FormatSettings.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FormatSettings.indent + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FullSubrange.rst.txt b/master/_sources/api/blark.transform.FullSubrange.rst.txt new file mode 100644 index 0000000..c97f8ef --- /dev/null +++ b/master/_sources/api/blark.transform.FullSubrange.rst.txt @@ -0,0 +1,30 @@ +blark.transform.FullSubrange +============================ + +.. currentmodule:: blark.transform + +.. autoclass:: FullSubrange + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FullSubrange.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FullSubrange.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Function.rst.txt b/master/_sources/api/blark.transform.Function.rst.txt new file mode 100644 index 0000000..d79ed43 --- /dev/null +++ b/master/_sources/api/blark.transform.Function.rst.txt @@ -0,0 +1,51 @@ +blark.transform.Function +======================== + +.. currentmodule:: blark.transform + +.. autoclass:: Function + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``function_declaration`` + + .. code:: + + function_declaration: "FUNCTION"i [ access_specifier ] derived_function_name [ ":" indirect_simple_specification ] ";"* [ function_var_block+ ] [ function_body ] "END_FUNCTION"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Function.__init__ + ~Function.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Function.meta + ~Function.access + ~Function.name + ~Function.return_type + ~Function.declarations + ~Function.body + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FunctionBlock.rst.txt b/master/_sources/api/blark.transform.FunctionBlock.rst.txt new file mode 100644 index 0000000..e533040 --- /dev/null +++ b/master/_sources/api/blark.transform.FunctionBlock.rst.txt @@ -0,0 +1,52 @@ +blark.transform.FunctionBlock +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: FunctionBlock + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``function_block_type_declaration`` + + .. code:: + + function_block_type_declaration: FUNCTION_BLOCK [ access_specifier ] derived_function_block_name [ extends ] [ implements ] fb_var_declaration* [ function_block_body ] END_FUNCTION_BLOCK ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FunctionBlock.__init__ + ~FunctionBlock.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionBlock.meta + ~FunctionBlock.name + ~FunctionBlock.access + ~FunctionBlock.extends + ~FunctionBlock.implements + ~FunctionBlock.declarations + ~FunctionBlock.body + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FunctionBlockDeclaration.rst.txt b/master/_sources/api/blark.transform.FunctionBlockDeclaration.rst.txt new file mode 100644 index 0000000..c48a311 --- /dev/null +++ b/master/_sources/api/blark.transform.FunctionBlockDeclaration.rst.txt @@ -0,0 +1,23 @@ +blark.transform.FunctionBlockDeclaration +======================================== + +.. currentmodule:: blark.transform + +.. autoclass:: FunctionBlockDeclaration + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FunctionBlockInvocationDeclaration.rst.txt b/master/_sources/api/blark.transform.FunctionBlockInvocationDeclaration.rst.txt new file mode 100644 index 0000000..14de77b --- /dev/null +++ b/master/_sources/api/blark.transform.FunctionBlockInvocationDeclaration.rst.txt @@ -0,0 +1,49 @@ +blark.transform.FunctionBlockInvocationDeclaration +================================================== + +.. currentmodule:: blark.transform + +.. autoclass:: FunctionBlockInvocationDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``fb_invocation_decl`` + + .. code:: + + | fb_decl_name_list ":" function_call [ ":=" structure_initialization ] -> fb_invocation_decl + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FunctionBlockInvocationDeclaration.__init__ + ~FunctionBlockInvocationDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionBlockInvocationDeclaration.defaults + ~FunctionBlockInvocationDeclaration.meta + ~FunctionBlockInvocationDeclaration.variables + ~FunctionBlockInvocationDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FunctionBlockNameDeclaration.rst.txt b/master/_sources/api/blark.transform.FunctionBlockNameDeclaration.rst.txt new file mode 100644 index 0000000..26094c0 --- /dev/null +++ b/master/_sources/api/blark.transform.FunctionBlockNameDeclaration.rst.txt @@ -0,0 +1,49 @@ +blark.transform.FunctionBlockNameDeclaration +============================================ + +.. currentmodule:: blark.transform + +.. autoclass:: FunctionBlockNameDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``fb_name_decl`` + + .. code:: + + fb_decl: fb_decl_name_list ":" function_block_type_name [ ":=" structure_initialization ] -> fb_name_decl + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FunctionBlockNameDeclaration.__init__ + ~FunctionBlockNameDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionBlockNameDeclaration.init + ~FunctionBlockNameDeclaration.meta + ~FunctionBlockNameDeclaration.variables + ~FunctionBlockNameDeclaration.spec + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FunctionCall.rst.txt b/master/_sources/api/blark.transform.FunctionCall.rst.txt new file mode 100644 index 0000000..79d9c38 --- /dev/null +++ b/master/_sources/api/blark.transform.FunctionCall.rst.txt @@ -0,0 +1,52 @@ +blark.transform.FunctionCall +============================ + +.. currentmodule:: blark.transform + +.. autoclass:: FunctionCall + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``function_call`` + + .. code:: + + function_call: symbolic_variable "(" [ param_assignment ( "," param_assignment )* ","? ] ")" DEREFERENCED? + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FunctionCall.__init__ + ~FunctionCall.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionCall.base_type_name + ~FunctionCall.full_type_name + ~FunctionCall.meta + ~FunctionCall.value + ~FunctionCall.name + ~FunctionCall.parameters + ~FunctionCall.dereferenced + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FunctionCallStatement.rst.txt b/master/_sources/api/blark.transform.FunctionCallStatement.rst.txt new file mode 100644 index 0000000..4b970aa --- /dev/null +++ b/master/_sources/api/blark.transform.FunctionCallStatement.rst.txt @@ -0,0 +1,51 @@ +blark.transform.FunctionCallStatement +===================================== + +.. currentmodule:: blark.transform + +.. autoclass:: FunctionCallStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``function_call_statement`` + + .. code:: + + function_call_statement: function_call ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FunctionCallStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionCallStatement.base_type_name + ~FunctionCallStatement.full_type_name + ~FunctionCallStatement.meta + ~FunctionCallStatement.value + ~FunctionCallStatement.name + ~FunctionCallStatement.parameters + ~FunctionCallStatement.dereferenced + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.FunctionVariableDeclarations.rst.txt b/master/_sources/api/blark.transform.FunctionVariableDeclarations.rst.txt new file mode 100644 index 0000000..3a64b0a --- /dev/null +++ b/master/_sources/api/blark.transform.FunctionVariableDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.FunctionVariableDeclarations +============================================ + +.. currentmodule:: blark.transform + +.. autoclass:: FunctionVariableDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``function_var_declarations`` + + .. code:: + + function_var_declarations: "VAR"i [ variable_attributes ] var_body "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~FunctionVariableDeclarations.__init__ + ~FunctionVariableDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~FunctionVariableDeclarations.attribute_pragmas + ~FunctionVariableDeclarations.block_header + ~FunctionVariableDeclarations.meta + ~FunctionVariableDeclarations.attrs + ~FunctionVariableDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.GlobalVariableAttributes.rst.txt b/master/_sources/api/blark.transform.GlobalVariableAttributes.rst.txt new file mode 100644 index 0000000..f723120 --- /dev/null +++ b/master/_sources/api/blark.transform.GlobalVariableAttributes.rst.txt @@ -0,0 +1,42 @@ +blark.transform.GlobalVariableAttributes +======================================== + +.. currentmodule:: blark.transform + +.. autoclass:: GlobalVariableAttributes + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``global_variable_attributes`` + + .. code:: + + global_variable_attributes: GLOBAL_VAR_ATTRIB+ + + + + + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~GlobalVariableAttributes.constant + ~GlobalVariableAttributes.retain + ~GlobalVariableAttributes.non_retain + ~GlobalVariableAttributes.persistent + ~GlobalVariableAttributes.internal + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.GlobalVariableDeclaration.rst.txt b/master/_sources/api/blark.transform.GlobalVariableDeclaration.rst.txt new file mode 100644 index 0000000..99968e2 --- /dev/null +++ b/master/_sources/api/blark.transform.GlobalVariableDeclaration.rst.txt @@ -0,0 +1,52 @@ +blark.transform.GlobalVariableDeclaration +========================================= + +.. currentmodule:: blark.transform + +.. autoclass:: GlobalVariableDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``global_var_decl`` + + .. code:: + + global_var_decl: global_var_spec ":" ( _located_var_spec_init | function_call ) ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~GlobalVariableDeclaration.__init__ + ~GlobalVariableDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~GlobalVariableDeclaration.base_type_name + ~GlobalVariableDeclaration.full_type_name + ~GlobalVariableDeclaration.location + ~GlobalVariableDeclaration.meta + ~GlobalVariableDeclaration.variables + ~GlobalVariableDeclaration.spec + ~GlobalVariableDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.GlobalVariableDeclarations.rst.txt b/master/_sources/api/blark.transform.GlobalVariableDeclarations.rst.txt new file mode 100644 index 0000000..c00e755 --- /dev/null +++ b/master/_sources/api/blark.transform.GlobalVariableDeclarations.rst.txt @@ -0,0 +1,51 @@ +blark.transform.GlobalVariableDeclarations +========================================== + +.. currentmodule:: blark.transform + +.. autoclass:: GlobalVariableDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``global_var_declarations`` + + .. code:: + + global_var_declarations: "VAR_GLOBAL"i [ global_variable_attributes ] global_var_body_item* "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~GlobalVariableDeclarations.__init__ + ~GlobalVariableDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~GlobalVariableDeclarations.attribute_pragmas + ~GlobalVariableDeclarations.block_header + ~GlobalVariableDeclarations.meta + ~GlobalVariableDeclarations.name + ~GlobalVariableDeclarations.attrs + ~GlobalVariableDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.GlobalVariableSpec.rst.txt b/master/_sources/api/blark.transform.GlobalVariableSpec.rst.txt new file mode 100644 index 0000000..8c420d8 --- /dev/null +++ b/master/_sources/api/blark.transform.GlobalVariableSpec.rst.txt @@ -0,0 +1,49 @@ +blark.transform.GlobalVariableSpec +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: GlobalVariableSpec + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``global_var_spec`` + + .. code:: + + global_var_spec: global_var_list + | global_var_name (location | incomplete_location) + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~GlobalVariableSpec.__init__ + ~GlobalVariableSpec.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~GlobalVariableSpec.meta + ~GlobalVariableSpec.variables + ~GlobalVariableSpec.location + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.GrammarTransformer.rst.txt b/master/_sources/api/blark.transform.GrammarTransformer.rst.txt new file mode 100644 index 0000000..eecd78a --- /dev/null +++ b/master/_sources/api/blark.transform.GrammarTransformer.rst.txt @@ -0,0 +1,184 @@ +blark.transform.GrammarTransformer +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: GrammarTransformer + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~GrammarTransformer.__init__ + ~GrammarTransformer.access_specifier + ~GrammarTransformer.action + ~GrammarTransformer.add_expression + ~GrammarTransformer.and_expression + ~GrammarTransformer.and_then_expression + ~GrammarTransformer.array_initial_element + ~GrammarTransformer.array_initial_element_count + ~GrammarTransformer.array_spec_init + ~GrammarTransformer.array_specification + ~GrammarTransformer.array_type_declaration + ~GrammarTransformer.array_var_init_decl + ~GrammarTransformer.assignment_expression + ~GrammarTransformer.assignment_statement + ~GrammarTransformer.bare_array_initialization + ~GrammarTransformer.binary_bit_string_literal + ~GrammarTransformer.binary_integer + ~GrammarTransformer.bit_string_literal + ~GrammarTransformer.bracketed_array_initialization + ~GrammarTransformer.bracketed_expression + ~GrammarTransformer.case_element + ~GrammarTransformer.case_element_statement_list + ~GrammarTransformer.case_elements + ~GrammarTransformer.case_statement + ~GrammarTransformer.chained_function_call + ~GrammarTransformer.chained_function_call_statement + ~GrammarTransformer.comparison_expression + ~GrammarTransformer.constant + ~GrammarTransformer.continue_statement + ~GrammarTransformer.data_type_declaration + ~GrammarTransformer.date + ~GrammarTransformer.date_and_time + ~GrammarTransformer.direct_variable + ~GrammarTransformer.double_byte_string_spec + ~GrammarTransformer.double_byte_string_var_declaration + ~GrammarTransformer.duration + ~GrammarTransformer.edge_declaration + ~GrammarTransformer.else_clause + ~GrammarTransformer.else_if_clause + ~GrammarTransformer.end_of_statement_list_label + ~GrammarTransformer.enumerated_spec_init + ~GrammarTransformer.enumerated_specification + ~GrammarTransformer.enumerated_type_declaration + ~GrammarTransformer.enumerated_value + ~GrammarTransformer.equality_expression + ~GrammarTransformer.exit_statement + ~GrammarTransformer.expression + ~GrammarTransformer.expression_term + ~GrammarTransformer.extends + ~GrammarTransformer.external_declaration + ~GrammarTransformer.external_var_declarations + ~GrammarTransformer.false + ~GrammarTransformer.fb_decl_name_list + ~GrammarTransformer.fb_invocation_decl + ~GrammarTransformer.fb_name_decl + ~GrammarTransformer.field_selector + ~GrammarTransformer.for_statement + ~GrammarTransformer.full_subrange + ~GrammarTransformer.function_block_method_declaration + ~GrammarTransformer.function_block_property_declaration + ~GrammarTransformer.function_block_type_declaration + ~GrammarTransformer.function_call + ~GrammarTransformer.function_call_statement + ~GrammarTransformer.function_declaration + ~GrammarTransformer.function_var_declarations + ~GrammarTransformer.global_var_decl + ~GrammarTransformer.global_var_declarations + ~GrammarTransformer.global_var_spec + ~GrammarTransformer.global_variable_attributes + ~GrammarTransformer.hex_bit_string_literal + ~GrammarTransformer.hex_integer + ~GrammarTransformer.iec_source + ~GrammarTransformer.if_statement + ~GrammarTransformer.implements + ~GrammarTransformer.incomplete_located_var_decl + ~GrammarTransformer.incomplete_located_var_declarations + ~GrammarTransformer.incomplete_location + ~GrammarTransformer.indirect_simple_specification + ~GrammarTransformer.indirection_type + ~GrammarTransformer.initialized_structure + ~GrammarTransformer.input_declarations + ~GrammarTransformer.input_output_declarations + ~GrammarTransformer.input_param_assignment + ~GrammarTransformer.integer + ~GrammarTransformer.integer_literal + ~GrammarTransformer.interface_declaration + ~GrammarTransformer.jmp_statement + ~GrammarTransformer.labeled_statement + ~GrammarTransformer.ldate + ~GrammarTransformer.ldate_and_time + ~GrammarTransformer.lduration + ~GrammarTransformer.located_var_decl + ~GrammarTransformer.located_var_declarations + ~GrammarTransformer.location + ~GrammarTransformer.ltime_of_day + ~GrammarTransformer.multi_element_variable + ~GrammarTransformer.no_op_statement + ~GrammarTransformer.non_generic_type_name + ~GrammarTransformer.object_initializer_array + ~GrammarTransformer.octal_bit_string_literal + ~GrammarTransformer.octal_integer + ~GrammarTransformer.or_else_expression + ~GrammarTransformer.output_declarations + ~GrammarTransformer.output_parameter_assignment + ~GrammarTransformer.param_assignment + ~GrammarTransformer.parenthesized_expression + ~GrammarTransformer.pointer_type + ~GrammarTransformer.program_access_decl + ~GrammarTransformer.program_access_decls + ~GrammarTransformer.program_declaration + ~GrammarTransformer.program_var_declarations + ~GrammarTransformer.real_literal + ~GrammarTransformer.reference_assignment_statement + ~GrammarTransformer.repeat_statement + ~GrammarTransformer.reset_statement + ~GrammarTransformer.return_statement + ~GrammarTransformer.set_statement + ~GrammarTransformer.signed_integer + ~GrammarTransformer.simple_spec_init + ~GrammarTransformer.simple_specification + ~GrammarTransformer.simple_type_declaration + ~GrammarTransformer.single_byte_string_spec + ~GrammarTransformer.single_byte_string_var_declaration + ~GrammarTransformer.statement_list + ~GrammarTransformer.static_var_declarations + ~GrammarTransformer.string_literal + ~GrammarTransformer.string_spec_length + ~GrammarTransformer.string_type_declaration + ~GrammarTransformer.string_type_specification + ~GrammarTransformer.structure_element_declaration + ~GrammarTransformer.structure_element_initialization + ~GrammarTransformer.structure_initialization + ~GrammarTransformer.structure_type_declaration + ~GrammarTransformer.structured_var_init_decl + ~GrammarTransformer.subrange + ~GrammarTransformer.subrange_spec_init + ~GrammarTransformer.subrange_specification + ~GrammarTransformer.subrange_type_declaration + ~GrammarTransformer.subscript_list + ~GrammarTransformer.temp_var_decls + ~GrammarTransformer.time_of_day + ~GrammarTransformer.transform + ~GrammarTransformer.true + ~GrammarTransformer.unary_expression + ~GrammarTransformer.union_element_declaration + ~GrammarTransformer.union_type_declaration + ~GrammarTransformer.var1 + ~GrammarTransformer.var1_init_decl + ~GrammarTransformer.var1_list + ~GrammarTransformer.var_declarations + ~GrammarTransformer.var_inst_declaration + ~GrammarTransformer.variable_attributes + ~GrammarTransformer.variable_name + ~GrammarTransformer.while_statement + ~GrammarTransformer.xor_expression + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~GrammarTransformer.comments + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.HexBitString.rst.txt b/master/_sources/api/blark.transform.HexBitString.rst.txt new file mode 100644 index 0000000..5a2c0b3 --- /dev/null +++ b/master/_sources/api/blark.transform.HexBitString.rst.txt @@ -0,0 +1,48 @@ +blark.transform.HexBitString +============================ + +.. currentmodule:: blark.transform + +.. autoclass:: HexBitString + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``hex_bit_string_literal`` + + .. code:: + + | [ BIT_STRING_TYPE_NAME "#" ] "16#" HEX_STRING -> hex_bit_string_literal + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~HexBitString.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~HexBitString.base + ~HexBitString.meta + ~HexBitString.type_name + ~HexBitString.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.HexInteger.rst.txt b/master/_sources/api/blark.transform.HexInteger.rst.txt new file mode 100644 index 0000000..c9b15a8 --- /dev/null +++ b/master/_sources/api/blark.transform.HexInteger.rst.txt @@ -0,0 +1,48 @@ +blark.transform.HexInteger +========================== + +.. currentmodule:: blark.transform + +.. autoclass:: HexInteger + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``hex_integer`` + + .. code:: + + | "16#" HEX_STRING -> hex_integer + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~HexInteger.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~HexInteger.base + ~HexInteger.meta + ~HexInteger.type_name + ~HexInteger.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.IfStatement.rst.txt b/master/_sources/api/blark.transform.IfStatement.rst.txt new file mode 100644 index 0000000..54d5c7d --- /dev/null +++ b/master/_sources/api/blark.transform.IfStatement.rst.txt @@ -0,0 +1,50 @@ +blark.transform.IfStatement +=========================== + +.. currentmodule:: blark.transform + +.. autoclass:: IfStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``if_statement`` + + .. code:: + + if_statement: "IF"i expression "THEN"i [ statement_list ] ( else_if_clause )* [ else_clause ] "END_IF"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~IfStatement.__init__ + ~IfStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~IfStatement.meta + ~IfStatement.if_expression + ~IfStatement.statements + ~IfStatement.else_ifs + ~IfStatement.else_clause + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Implements.rst.txt b/master/_sources/api/blark.transform.Implements.rst.txt new file mode 100644 index 0000000..119bab9 --- /dev/null +++ b/master/_sources/api/blark.transform.Implements.rst.txt @@ -0,0 +1,47 @@ +blark.transform.Implements +========================== + +.. currentmodule:: blark.transform + +.. autoclass:: Implements + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``implements`` + + .. code:: + + implements: "IMPLEMENTS"i DOTTED_IDENTIFIER ("," DOTTED_IDENTIFIER)* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Implements.__init__ + ~Implements.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Implements.meta + ~Implements.interfaces + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.IncompleteLocatedVariableDeclaration.rst.txt b/master/_sources/api/blark.transform.IncompleteLocatedVariableDeclaration.rst.txt new file mode 100644 index 0000000..703efd8 --- /dev/null +++ b/master/_sources/api/blark.transform.IncompleteLocatedVariableDeclaration.rst.txt @@ -0,0 +1,49 @@ +blark.transform.IncompleteLocatedVariableDeclaration +==================================================== + +.. currentmodule:: blark.transform + +.. autoclass:: IncompleteLocatedVariableDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``incomplete_located_var_decl`` + + .. code:: + + incomplete_located_var_decl: variable_name incomplete_location ":" var_spec ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~IncompleteLocatedVariableDeclaration.__init__ + ~IncompleteLocatedVariableDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~IncompleteLocatedVariableDeclaration.meta + ~IncompleteLocatedVariableDeclaration.name + ~IncompleteLocatedVariableDeclaration.location + ~IncompleteLocatedVariableDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.IncompleteLocatedVariableDeclarations.rst.txt b/master/_sources/api/blark.transform.IncompleteLocatedVariableDeclarations.rst.txt new file mode 100644 index 0000000..f820fd3 --- /dev/null +++ b/master/_sources/api/blark.transform.IncompleteLocatedVariableDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.IncompleteLocatedVariableDeclarations +===================================================== + +.. currentmodule:: blark.transform + +.. autoclass:: IncompleteLocatedVariableDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``incomplete_located_var_declarations`` + + .. code:: + + incomplete_located_var_declarations: "VAR"i [ variable_attributes ] incomplete_located_var_decl* "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~IncompleteLocatedVariableDeclarations.__init__ + ~IncompleteLocatedVariableDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~IncompleteLocatedVariableDeclarations.attribute_pragmas + ~IncompleteLocatedVariableDeclarations.block_header + ~IncompleteLocatedVariableDeclarations.meta + ~IncompleteLocatedVariableDeclarations.attrs + ~IncompleteLocatedVariableDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.IncompleteLocation.rst.txt b/master/_sources/api/blark.transform.IncompleteLocation.rst.txt new file mode 100644 index 0000000..8e88706 --- /dev/null +++ b/master/_sources/api/blark.transform.IncompleteLocation.rst.txt @@ -0,0 +1,48 @@ +blark.transform.IncompleteLocation +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: IncompleteLocation + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``incomplete_location`` + + .. code:: + + incomplete_location: "AT"i /\%(I|Q|M)\*/ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~IncompleteLocation.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~IncompleteLocation.none + ~IncompleteLocation.input + ~IncompleteLocation.output + ~IncompleteLocation.memory + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.IndirectSimpleSpecification.rst.txt b/master/_sources/api/blark.transform.IndirectSimpleSpecification.rst.txt new file mode 100644 index 0000000..8d66eb3 --- /dev/null +++ b/master/_sources/api/blark.transform.IndirectSimpleSpecification.rst.txt @@ -0,0 +1,52 @@ +blark.transform.IndirectSimpleSpecification +=========================================== + +.. currentmodule:: blark.transform + +.. autoclass:: IndirectSimpleSpecification + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``indirect_simple_specification`` + + .. code:: + + indirect_simple_specification: [ indirection_type ] simple_specification [ input_param_args ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~IndirectSimpleSpecification.__init__ + ~IndirectSimpleSpecification.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~IndirectSimpleSpecification.base_type_name + ~IndirectSimpleSpecification.full_type_name + ~IndirectSimpleSpecification.meta + ~IndirectSimpleSpecification.type_info + ~IndirectSimpleSpecification.indirection + ~IndirectSimpleSpecification.type + ~IndirectSimpleSpecification.init_parameters + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.IndirectionType.rst.txt b/master/_sources/api/blark.transform.IndirectionType.rst.txt new file mode 100644 index 0000000..fa8cfef --- /dev/null +++ b/master/_sources/api/blark.transform.IndirectionType.rst.txt @@ -0,0 +1,59 @@ +blark.transform.IndirectionType +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: IndirectionType + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``indirection_type`` + + .. code:: + + indirection_type: REFERENCE_TO + | POINTER_TO+ + | REFERENCE_TO POINTER_TO+ + + + ``pointer_type`` + + .. code:: + + pointer_type: POINTER_TO+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~IndirectionType.__init__ + ~IndirectionType.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~IndirectionType.is_indirect + ~IndirectionType.meta + ~IndirectionType.value + ~IndirectionType.pointer_depth + ~IndirectionType.reference + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.InitDeclaration.rst.txt b/master/_sources/api/blark.transform.InitDeclaration.rst.txt new file mode 100644 index 0000000..78ff71a --- /dev/null +++ b/master/_sources/api/blark.transform.InitDeclaration.rst.txt @@ -0,0 +1,31 @@ +blark.transform.InitDeclaration +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: InitDeclaration + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~InitDeclaration.variables + ~InitDeclaration.init + ~InitDeclaration.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.InitializedStructure.rst.txt b/master/_sources/api/blark.transform.InitializedStructure.rst.txt new file mode 100644 index 0000000..0a17b9c --- /dev/null +++ b/master/_sources/api/blark.transform.InitializedStructure.rst.txt @@ -0,0 +1,52 @@ +blark.transform.InitializedStructure +==================================== + +.. currentmodule:: blark.transform + +.. autoclass:: InitializedStructure + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``initialized_structure`` + + .. code:: + + initialized_structure: structure_type_name ":=" structure_initialization + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~InitializedStructure.__init__ + ~InitializedStructure.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~InitializedStructure.base_type_name + ~InitializedStructure.full_type_name + ~InitializedStructure.meta + ~InitializedStructure.type_info + ~InitializedStructure.value + ~InitializedStructure.name + ~InitializedStructure.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.InputDeclarations.rst.txt b/master/_sources/api/blark.transform.InputDeclarations.rst.txt new file mode 100644 index 0000000..52309a8 --- /dev/null +++ b/master/_sources/api/blark.transform.InputDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.InputDeclarations +================================= + +.. currentmodule:: blark.transform + +.. autoclass:: InputDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``input_declarations`` + + .. code:: + + input_declarations: "VAR_INPUT"i [ variable_attributes ] _var_input_body "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~InputDeclarations.__init__ + ~InputDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~InputDeclarations.attribute_pragmas + ~InputDeclarations.block_header + ~InputDeclarations.meta + ~InputDeclarations.attrs + ~InputDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.InputOutputDeclarations.rst.txt b/master/_sources/api/blark.transform.InputOutputDeclarations.rst.txt new file mode 100644 index 0000000..e0deb8c --- /dev/null +++ b/master/_sources/api/blark.transform.InputOutputDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.InputOutputDeclarations +======================================= + +.. currentmodule:: blark.transform + +.. autoclass:: InputOutputDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``input_output_declarations`` + + .. code:: + + input_output_declarations: "VAR_IN_OUT"i [ variable_attributes ] var_body "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~InputOutputDeclarations.__init__ + ~InputOutputDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~InputOutputDeclarations.attribute_pragmas + ~InputOutputDeclarations.block_header + ~InputOutputDeclarations.meta + ~InputOutputDeclarations.attrs + ~InputOutputDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.InputParameterAssignment.rst.txt b/master/_sources/api/blark.transform.InputParameterAssignment.rst.txt new file mode 100644 index 0000000..dbc23e0 --- /dev/null +++ b/master/_sources/api/blark.transform.InputParameterAssignment.rst.txt @@ -0,0 +1,58 @@ +blark.transform.InputParameterAssignment +======================================== + +.. currentmodule:: blark.transform + +.. autoclass:: InputParameterAssignment + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``param_assignment`` + + .. code:: + + param_assignment: [ LOGICAL_NOT ] variable_name "=>" [ expression ] -> output_parameter_assignment + | variable_name ":=" [ expression ] + | expression + + + ``input_param_assignment`` + + .. code:: + + input_param_assignment: variable_name ":=" [ expression ] + | expression + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~InputParameterAssignment.__init__ + ~InputParameterAssignment.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~InputParameterAssignment.meta + ~InputParameterAssignment.name + ~InputParameterAssignment.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Integer.rst.txt b/master/_sources/api/blark.transform.Integer.rst.txt new file mode 100644 index 0000000..78e547e --- /dev/null +++ b/master/_sources/api/blark.transform.Integer.rst.txt @@ -0,0 +1,49 @@ +blark.transform.Integer +======================= + +.. currentmodule:: blark.transform + +.. autoclass:: Integer + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``integer_literal`` + + .. code:: + + integer_literal: [ INTEGER_TYPE_NAME "#" ] any_integer + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Integer.__init__ + ~Integer.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Integer.base + ~Integer.meta + ~Integer.type_name + ~Integer.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Interface.rst.txt b/master/_sources/api/blark.transform.Interface.rst.txt new file mode 100644 index 0000000..13f8d10 --- /dev/null +++ b/master/_sources/api/blark.transform.Interface.rst.txt @@ -0,0 +1,49 @@ +blark.transform.Interface +========================= + +.. currentmodule:: blark.transform + +.. autoclass:: Interface + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``interface_declaration`` + + .. code:: + + interface_declaration: "INTERFACE"i IDENTIFIER [ extends ] interface_var_declaration* "END_INTERFACE"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Interface.__init__ + ~Interface.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Interface.meta + ~Interface.name + ~Interface.extends + ~Interface.declarations + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.JumpStatement.rst.txt b/master/_sources/api/blark.transform.JumpStatement.rst.txt new file mode 100644 index 0000000..3b2e73b --- /dev/null +++ b/master/_sources/api/blark.transform.JumpStatement.rst.txt @@ -0,0 +1,48 @@ +blark.transform.JumpStatement +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: JumpStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``jmp_statement`` + + .. code:: + + jmp_statement: "JMP"i LABEL ";"+ + + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~JumpStatement.__init__ + ~JumpStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~JumpStatement.meta + ~JumpStatement.label + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.LabeledStatement.rst.txt b/master/_sources/api/blark.transform.LabeledStatement.rst.txt new file mode 100644 index 0000000..89d504e --- /dev/null +++ b/master/_sources/api/blark.transform.LabeledStatement.rst.txt @@ -0,0 +1,55 @@ +blark.transform.LabeledStatement +================================ + +.. currentmodule:: blark.transform + +.. autoclass:: LabeledStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``labeled_statement`` + + .. code:: + + labeled_statement.1: LABEL ":" _statement + + + ``end_of_statement_list_label`` + + .. code:: + + end_of_statement_list_label: LABEL ":" + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~LabeledStatement.__init__ + ~LabeledStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~LabeledStatement.meta + ~LabeledStatement.statement + ~LabeledStatement.label + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Ldate.rst.txt b/master/_sources/api/blark.transform.Ldate.rst.txt new file mode 100644 index 0000000..a5e2b6a --- /dev/null +++ b/master/_sources/api/blark.transform.Ldate.rst.txt @@ -0,0 +1,50 @@ +blark.transform.Ldate +===================== + +.. currentmodule:: blark.transform + +.. autoclass:: Ldate + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``ldate`` + + .. code:: + + ldate: "LDATE"i "#" _date_literal + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Ldate.__init__ + ~Ldate.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Ldate.meta + ~Ldate.value + ~Ldate.year + ~Ldate.month + ~Ldate.day + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.LdateTime.rst.txt b/master/_sources/api/blark.transform.LdateTime.rst.txt new file mode 100644 index 0000000..939a509 --- /dev/null +++ b/master/_sources/api/blark.transform.LdateTime.rst.txt @@ -0,0 +1,49 @@ +blark.transform.LdateTime +========================= + +.. currentmodule:: blark.transform + +.. autoclass:: LdateTime + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``ldate_and_time`` + + .. code:: + + ldate_and_time: ( "LDATE_AND_TIME"i | "LDT"i ) "#" _date_literal "-" _daytime + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~LdateTime.__init__ + ~LdateTime.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~LdateTime.meta + ~LdateTime.value + ~LdateTime.ldate + ~LdateTime.ltime + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Lduration.rst.txt b/master/_sources/api/blark.transform.Lduration.rst.txt new file mode 100644 index 0000000..5a36762 --- /dev/null +++ b/master/_sources/api/blark.transform.Lduration.rst.txt @@ -0,0 +1,55 @@ +blark.transform.Lduration +========================= + +.. currentmodule:: blark.transform + +.. autoclass:: Lduration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``lduration`` + + .. code:: + + lduration: ( "LTIME"i | "LT"i ) "#" [ MINUS ] _linterval + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Lduration.__init__ + ~Lduration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Lduration.days + ~Lduration.hours + ~Lduration.meta + ~Lduration.microseconds + ~Lduration.milliseconds + ~Lduration.minutes + ~Lduration.nanoseconds + ~Lduration.negative + ~Lduration.seconds + ~Lduration.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Literal.rst.txt b/master/_sources/api/blark.transform.Literal.rst.txt new file mode 100644 index 0000000..157385a --- /dev/null +++ b/master/_sources/api/blark.transform.Literal.rst.txt @@ -0,0 +1,23 @@ +blark.transform.Literal +======================= + +.. currentmodule:: blark.transform + +.. autoclass:: Literal + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.LocatedVariableDeclaration.rst.txt b/master/_sources/api/blark.transform.LocatedVariableDeclaration.rst.txt new file mode 100644 index 0000000..dd4c68d --- /dev/null +++ b/master/_sources/api/blark.transform.LocatedVariableDeclaration.rst.txt @@ -0,0 +1,49 @@ +blark.transform.LocatedVariableDeclaration +========================================== + +.. currentmodule:: blark.transform + +.. autoclass:: LocatedVariableDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``located_var_decl`` + + .. code:: + + located_var_decl: [ variable_name ] location ":" _located_var_spec_init ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~LocatedVariableDeclaration.__init__ + ~LocatedVariableDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~LocatedVariableDeclaration.meta + ~LocatedVariableDeclaration.name + ~LocatedVariableDeclaration.location + ~LocatedVariableDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.LocatedVariableDeclarations.rst.txt b/master/_sources/api/blark.transform.LocatedVariableDeclarations.rst.txt new file mode 100644 index 0000000..d3f4682 --- /dev/null +++ b/master/_sources/api/blark.transform.LocatedVariableDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.LocatedVariableDeclarations +=========================================== + +.. currentmodule:: blark.transform + +.. autoclass:: LocatedVariableDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``located_var_declarations`` + + .. code:: + + located_var_declarations: "VAR"i [ variable_attributes ] located_var_decl* "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~LocatedVariableDeclarations.__init__ + ~LocatedVariableDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~LocatedVariableDeclarations.attribute_pragmas + ~LocatedVariableDeclarations.block_header + ~LocatedVariableDeclarations.meta + ~LocatedVariableDeclarations.attrs + ~LocatedVariableDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Location.rst.txt b/master/_sources/api/blark.transform.Location.rst.txt new file mode 100644 index 0000000..0760daa --- /dev/null +++ b/master/_sources/api/blark.transform.Location.rst.txt @@ -0,0 +1,49 @@ +blark.transform.Location +======================== + +.. currentmodule:: blark.transform + +.. autoclass:: Location + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``location`` + + .. code:: + + location: "AT"i direct_variable + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Location.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Location.bits + ~Location.meta + ~Location.location_prefix + ~Location.location + ~Location.size_prefix + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.LtimeOfDay.rst.txt b/master/_sources/api/blark.transform.LtimeOfDay.rst.txt new file mode 100644 index 0000000..2252523 --- /dev/null +++ b/master/_sources/api/blark.transform.LtimeOfDay.rst.txt @@ -0,0 +1,50 @@ +blark.transform.LtimeOfDay +========================== + +.. currentmodule:: blark.transform + +.. autoclass:: LtimeOfDay + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``ltime_of_day`` + + .. code:: + + ltime_of_day: ("LTIME_OF_DAY"i | "LTOD"i) "#" _daytime + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~LtimeOfDay.__init__ + ~LtimeOfDay.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~LtimeOfDay.meta + ~LtimeOfDay.second + ~LtimeOfDay.value + ~LtimeOfDay.hour + ~LtimeOfDay.minute + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Meta.rst.txt b/master/_sources/api/blark.transform.Meta.rst.txt new file mode 100644 index 0000000..39e0265 --- /dev/null +++ b/master/_sources/api/blark.transform.Meta.rst.txt @@ -0,0 +1,44 @@ +blark.transform.Meta +==================== + +.. currentmodule:: blark.transform + +.. autoclass:: Meta + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Meta.__init__ + ~Meta.from_lark + ~Meta.get_comments_and_pragmas + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Meta.attribute_pragmas + ~Meta.column + ~Meta.container_column + ~Meta.container_end_column + ~Meta.container_end_line + ~Meta.container_line + ~Meta.empty + ~Meta.end_column + ~Meta.end_line + ~Meta.end_pos + ~Meta.line + ~Meta.start_pos + ~Meta.comments + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Method.rst.txt b/master/_sources/api/blark.transform.Method.rst.txt new file mode 100644 index 0000000..f33dcb1 --- /dev/null +++ b/master/_sources/api/blark.transform.Method.rst.txt @@ -0,0 +1,51 @@ +blark.transform.Method +====================== + +.. currentmodule:: blark.transform + +.. autoclass:: Method + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``function_block_method_declaration`` + + .. code:: + + function_block_method_declaration: "METHOD"i [ access_specifier ] DOTTED_IDENTIFIER [ ":" method_return_type ] ";"* method_var_declaration* [ function_block_body ] "END_METHOD"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Method.__init__ + ~Method.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Method.meta + ~Method.access + ~Method.name + ~Method.return_type + ~Method.declarations + ~Method.body + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.MethodInstanceVariableDeclarations.rst.txt b/master/_sources/api/blark.transform.MethodInstanceVariableDeclarations.rst.txt new file mode 100644 index 0000000..e9f8904 --- /dev/null +++ b/master/_sources/api/blark.transform.MethodInstanceVariableDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.MethodInstanceVariableDeclarations +================================================== + +.. currentmodule:: blark.transform + +.. autoclass:: MethodInstanceVariableDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``var_inst_declaration`` + + .. code:: + + var_inst_declaration: "VAR_INST"i [ variable_attributes ] var_body "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~MethodInstanceVariableDeclarations.__init__ + ~MethodInstanceVariableDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~MethodInstanceVariableDeclarations.attribute_pragmas + ~MethodInstanceVariableDeclarations.block_header + ~MethodInstanceVariableDeclarations.meta + ~MethodInstanceVariableDeclarations.attrs + ~MethodInstanceVariableDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.MultiElementVariable.rst.txt b/master/_sources/api/blark.transform.MultiElementVariable.rst.txt new file mode 100644 index 0000000..269c468 --- /dev/null +++ b/master/_sources/api/blark.transform.MultiElementVariable.rst.txt @@ -0,0 +1,49 @@ +blark.transform.MultiElementVariable +==================================== + +.. currentmodule:: blark.transform + +.. autoclass:: MultiElementVariable + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``multi_element_variable`` + + .. code:: + + multi_element_variable: variable_name ( subscript_list | field_selector )+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~MultiElementVariable.__init__ + ~MultiElementVariable.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~MultiElementVariable.meta + ~MultiElementVariable.name + ~MultiElementVariable.dereferenced + ~MultiElementVariable.elements + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.NoOpStatement.rst.txt b/master/_sources/api/blark.transform.NoOpStatement.rst.txt new file mode 100644 index 0000000..2786a9b --- /dev/null +++ b/master/_sources/api/blark.transform.NoOpStatement.rst.txt @@ -0,0 +1,47 @@ +blark.transform.NoOpStatement +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: NoOpStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``no_op_statement`` + + .. code:: + + no_op_statement: _variable ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~NoOpStatement.__init__ + ~NoOpStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~NoOpStatement.meta + ~NoOpStatement.variable + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ObjectInitializerArray.rst.txt b/master/_sources/api/blark.transform.ObjectInitializerArray.rst.txt new file mode 100644 index 0000000..cd4b1d1 --- /dev/null +++ b/master/_sources/api/blark.transform.ObjectInitializerArray.rst.txt @@ -0,0 +1,48 @@ +blark.transform.ObjectInitializerArray +====================================== + +.. currentmodule:: blark.transform + +.. autoclass:: ObjectInitializerArray + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``object_initializer_array`` + + .. code:: + + object_initializer_array: function_block_type_name "[" structure_initialization ( "," structure_initialization )* "]" + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ObjectInitializerArray.__init__ + ~ObjectInitializerArray.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ObjectInitializerArray.meta + ~ObjectInitializerArray.name + ~ObjectInitializerArray.initializers + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.OctalBitString.rst.txt b/master/_sources/api/blark.transform.OctalBitString.rst.txt new file mode 100644 index 0000000..09626e0 --- /dev/null +++ b/master/_sources/api/blark.transform.OctalBitString.rst.txt @@ -0,0 +1,48 @@ +blark.transform.OctalBitString +============================== + +.. currentmodule:: blark.transform + +.. autoclass:: OctalBitString + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``octal_bit_string_literal`` + + .. code:: + + | [ BIT_STRING_TYPE_NAME "#" ] "8#" OCTAL_STRING -> octal_bit_string_literal + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~OctalBitString.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~OctalBitString.base + ~OctalBitString.meta + ~OctalBitString.type_name + ~OctalBitString.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.OctalInteger.rst.txt b/master/_sources/api/blark.transform.OctalInteger.rst.txt new file mode 100644 index 0000000..2f60b33 --- /dev/null +++ b/master/_sources/api/blark.transform.OctalInteger.rst.txt @@ -0,0 +1,48 @@ +blark.transform.OctalInteger +============================ + +.. currentmodule:: blark.transform + +.. autoclass:: OctalInteger + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``octal_integer`` + + .. code:: + + | "8#" OCTAL_STRING -> octal_integer + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~OctalInteger.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~OctalInteger.base + ~OctalInteger.meta + ~OctalInteger.type_name + ~OctalInteger.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.OutputDeclarations.rst.txt b/master/_sources/api/blark.transform.OutputDeclarations.rst.txt new file mode 100644 index 0000000..97934e5 --- /dev/null +++ b/master/_sources/api/blark.transform.OutputDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.OutputDeclarations +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: OutputDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``output_declarations`` + + .. code:: + + output_declarations: "VAR_OUTPUT"i [ variable_attributes ] var_body "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~OutputDeclarations.__init__ + ~OutputDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~OutputDeclarations.attribute_pragmas + ~OutputDeclarations.block_header + ~OutputDeclarations.meta + ~OutputDeclarations.attrs + ~OutputDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.OutputParameterAssignment.rst.txt b/master/_sources/api/blark.transform.OutputParameterAssignment.rst.txt new file mode 100644 index 0000000..2b0597e --- /dev/null +++ b/master/_sources/api/blark.transform.OutputParameterAssignment.rst.txt @@ -0,0 +1,49 @@ +blark.transform.OutputParameterAssignment +========================================= + +.. currentmodule:: blark.transform + +.. autoclass:: OutputParameterAssignment + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``output_parameter_assignment`` + + .. code:: + + param_assignment: [ LOGICAL_NOT ] variable_name "=>" [ expression ] -> output_parameter_assignment + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~OutputParameterAssignment.__init__ + ~OutputParameterAssignment.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~OutputParameterAssignment.inverted + ~OutputParameterAssignment.meta + ~OutputParameterAssignment.name + ~OutputParameterAssignment.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ParameterAssignment.rst.txt b/master/_sources/api/blark.transform.ParameterAssignment.rst.txt new file mode 100644 index 0000000..467b3e2 --- /dev/null +++ b/master/_sources/api/blark.transform.ParameterAssignment.rst.txt @@ -0,0 +1,23 @@ +blark.transform.ParameterAssignment +=================================== + +.. currentmodule:: blark.transform + +.. autoclass:: ParameterAssignment + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ParenthesizedExpression.rst.txt b/master/_sources/api/blark.transform.ParenthesizedExpression.rst.txt new file mode 100644 index 0000000..6af7157 --- /dev/null +++ b/master/_sources/api/blark.transform.ParenthesizedExpression.rst.txt @@ -0,0 +1,47 @@ +blark.transform.ParenthesizedExpression +======================================= + +.. currentmodule:: blark.transform + +.. autoclass:: ParenthesizedExpression + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``parenthesized_expression`` + + .. code:: + + parenthesized_expression: "(" expression ")" + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ParenthesizedExpression.__init__ + ~ParenthesizedExpression.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ParenthesizedExpression.meta + ~ParenthesizedExpression.expr + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.PartialSubrange.rst.txt b/master/_sources/api/blark.transform.PartialSubrange.rst.txt new file mode 100644 index 0000000..d550857 --- /dev/null +++ b/master/_sources/api/blark.transform.PartialSubrange.rst.txt @@ -0,0 +1,49 @@ +blark.transform.PartialSubrange +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: PartialSubrange + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``subrange`` + + .. code:: + + subrange: expression ".." expression + | "*" -> full_subrange + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~PartialSubrange.__init__ + ~PartialSubrange.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~PartialSubrange.meta + ~PartialSubrange.start + ~PartialSubrange.stop + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Program.rst.txt b/master/_sources/api/blark.transform.Program.rst.txt new file mode 100644 index 0000000..f9d625b --- /dev/null +++ b/master/_sources/api/blark.transform.Program.rst.txt @@ -0,0 +1,49 @@ +blark.transform.Program +======================= + +.. currentmodule:: blark.transform + +.. autoclass:: Program + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``program_declaration`` + + .. code:: + + program_declaration: "PROGRAM"i program_type_name program_var_declarations [ function_block_body ] "END_PROGRAM"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Program.__init__ + ~Program.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Program.meta + ~Program.name + ~Program.declarations + ~Program.body + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Property.rst.txt b/master/_sources/api/blark.transform.Property.rst.txt new file mode 100644 index 0000000..5822a9e --- /dev/null +++ b/master/_sources/api/blark.transform.Property.rst.txt @@ -0,0 +1,51 @@ +blark.transform.Property +======================== + +.. currentmodule:: blark.transform + +.. autoclass:: Property + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``function_block_property_declaration`` + + .. code:: + + function_block_property_declaration: "PROPERTY"i [ access_specifier ] DOTTED_IDENTIFIER [ ":" property_return_type ] ";"* property_var_declaration* [ function_block_body ] "END_PROPERTY"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Property.__init__ + ~Property.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Property.meta + ~Property.access + ~Property.name + ~Property.return_type + ~Property.declarations + ~Property.body + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Real.rst.txt b/master/_sources/api/blark.transform.Real.rst.txt new file mode 100644 index 0000000..9819e30 --- /dev/null +++ b/master/_sources/api/blark.transform.Real.rst.txt @@ -0,0 +1,49 @@ +blark.transform.Real +==================== + +.. currentmodule:: blark.transform + +.. autoclass:: Real + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``real_literal`` + + .. code:: + + real_literal: [ REAL_TYPE_NAME "#" ] /((\+|\-)?[0-9](_?[0-9])*)\.([0-9](_?[0-9])*)((e|E)(\+|\-)?([0-9](_?[0-9])*))?/ + | [ REAL_TYPE_NAME "#" ] /((\+|\-)?[0-9](_?[0-9])*)((e|E)(\+|\-)?([0-9](_?[0-9])*))/ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Real.__init__ + ~Real.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Real.meta + ~Real.type_name + ~Real.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ReferenceAssignmentStatement.rst.txt b/master/_sources/api/blark.transform.ReferenceAssignmentStatement.rst.txt new file mode 100644 index 0000000..33e4a2a --- /dev/null +++ b/master/_sources/api/blark.transform.ReferenceAssignmentStatement.rst.txt @@ -0,0 +1,49 @@ +blark.transform.ReferenceAssignmentStatement +============================================ + +.. currentmodule:: blark.transform + +.. autoclass:: ReferenceAssignmentStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``reference_assignment_statement`` + + .. code:: + + reference_assignment_statement: _variable REF_ASSIGNMENT expression ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ReferenceAssignmentStatement.__init__ + ~ReferenceAssignmentStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ReferenceAssignmentStatement.meta + ~ReferenceAssignmentStatement.variable + ~ReferenceAssignmentStatement.op + ~ReferenceAssignmentStatement.expression + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.RepeatStatement.rst.txt b/master/_sources/api/blark.transform.RepeatStatement.rst.txt new file mode 100644 index 0000000..5d3f592 --- /dev/null +++ b/master/_sources/api/blark.transform.RepeatStatement.rst.txt @@ -0,0 +1,48 @@ +blark.transform.RepeatStatement +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: RepeatStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``repeat_statement`` + + .. code:: + + repeat_statement: "REPEAT"i statement_list "UNTIL"i expression "END_REPEAT"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~RepeatStatement.__init__ + ~RepeatStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~RepeatStatement.meta + ~RepeatStatement.statements + ~RepeatStatement.expression + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ResetStatement.rst.txt b/master/_sources/api/blark.transform.ResetStatement.rst.txt new file mode 100644 index 0000000..6685a00 --- /dev/null +++ b/master/_sources/api/blark.transform.ResetStatement.rst.txt @@ -0,0 +1,49 @@ +blark.transform.ResetStatement +============================== + +.. currentmodule:: blark.transform + +.. autoclass:: ResetStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``reset_statement`` + + .. code:: + + reset_statement: _variable RESET_ASSIGNMENT expression ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ResetStatement.__init__ + ~ResetStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ResetStatement.meta + ~ResetStatement.variable + ~ResetStatement.op + ~ResetStatement.expression + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.ReturnStatement.rst.txt b/master/_sources/api/blark.transform.ReturnStatement.rst.txt new file mode 100644 index 0000000..218148d --- /dev/null +++ b/master/_sources/api/blark.transform.ReturnStatement.rst.txt @@ -0,0 +1,46 @@ +blark.transform.ReturnStatement +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: ReturnStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``return_statement`` + + .. code:: + + return_statement.1: "RETURN"i ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ReturnStatement.__init__ + ~ReturnStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~ReturnStatement.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.SetStatement.rst.txt b/master/_sources/api/blark.transform.SetStatement.rst.txt new file mode 100644 index 0000000..1efb46d --- /dev/null +++ b/master/_sources/api/blark.transform.SetStatement.rst.txt @@ -0,0 +1,49 @@ +blark.transform.SetStatement +============================ + +.. currentmodule:: blark.transform + +.. autoclass:: SetStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``set_statement`` + + .. code:: + + set_statement: _variable SET_ASSIGNMENT expression ";"+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SetStatement.__init__ + ~SetStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SetStatement.meta + ~SetStatement.variable + ~SetStatement.op + ~SetStatement.expression + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.SimpleSpecification.rst.txt b/master/_sources/api/blark.transform.SimpleSpecification.rst.txt new file mode 100644 index 0000000..4e887d5 --- /dev/null +++ b/master/_sources/api/blark.transform.SimpleSpecification.rst.txt @@ -0,0 +1,52 @@ +blark.transform.SimpleSpecification +=================================== + +.. currentmodule:: blark.transform + +.. autoclass:: SimpleSpecification + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``simple_specification`` + + .. code:: + + simple_specification: elementary_type_name + | simple_type_name + | DOTTED_IDENTIFIER + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SimpleSpecification.__init__ + ~SimpleSpecification.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SimpleSpecification.base_type_name + ~SimpleSpecification.full_type_name + ~SimpleSpecification.meta + ~SimpleSpecification.type_info + ~SimpleSpecification.type + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.SimpleTypeDeclaration.rst.txt b/master/_sources/api/blark.transform.SimpleTypeDeclaration.rst.txt new file mode 100644 index 0000000..2e9e09b --- /dev/null +++ b/master/_sources/api/blark.transform.SimpleTypeDeclaration.rst.txt @@ -0,0 +1,49 @@ +blark.transform.SimpleTypeDeclaration +===================================== + +.. currentmodule:: blark.transform + +.. autoclass:: SimpleTypeDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``simple_type_declaration`` + + .. code:: + + simple_type_declaration: simple_type_name [ extends ] ":" simple_spec_init + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SimpleTypeDeclaration.__init__ + ~SimpleTypeDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SimpleTypeDeclaration.meta + ~SimpleTypeDeclaration.name + ~SimpleTypeDeclaration.extends + ~SimpleTypeDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.SimpleVariable.rst.txt b/master/_sources/api/blark.transform.SimpleVariable.rst.txt new file mode 100644 index 0000000..fa9864e --- /dev/null +++ b/master/_sources/api/blark.transform.SimpleVariable.rst.txt @@ -0,0 +1,48 @@ +blark.transform.SimpleVariable +============================== + +.. currentmodule:: blark.transform + +.. autoclass:: SimpleVariable + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``variable_name`` + + .. code:: + + variable_name: IDENTIFIER [ DEREFERENCED ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SimpleVariable.__init__ + ~SimpleVariable.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SimpleVariable.meta + ~SimpleVariable.name + ~SimpleVariable.dereferenced + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.SourceCode.rst.txt b/master/_sources/api/blark.transform.SourceCode.rst.txt new file mode 100644 index 0000000..3870ed6 --- /dev/null +++ b/master/_sources/api/blark.transform.SourceCode.rst.txt @@ -0,0 +1,51 @@ +blark.transform.SourceCode +========================== + +.. currentmodule:: blark.transform + +.. autoclass:: SourceCode + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``iec_source`` + + .. code:: + + iec_source: _library_element_declaration* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SourceCode.__init__ + ~SourceCode.from_lark + ~SourceCode.range_from_file_lines + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SourceCode.filename + ~SourceCode.line_map + ~SourceCode.meta + ~SourceCode.raw_source + ~SourceCode.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Statement.rst.txt b/master/_sources/api/blark.transform.Statement.rst.txt new file mode 100644 index 0000000..b72fccf --- /dev/null +++ b/master/_sources/api/blark.transform.Statement.rst.txt @@ -0,0 +1,23 @@ +blark.transform.Statement +========================= + +.. currentmodule:: blark.transform + +.. autoclass:: Statement + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StatementList.rst.txt b/master/_sources/api/blark.transform.StatementList.rst.txt new file mode 100644 index 0000000..b6bdb31 --- /dev/null +++ b/master/_sources/api/blark.transform.StatementList.rst.txt @@ -0,0 +1,54 @@ +blark.transform.StatementList +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: StatementList + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``statement_list`` + + .. code:: + + statement_list: _statement+ end_of_statement_list_label? + + + ``case_element_statement_list`` + + .. code:: + + case_element_statement_list: _case_element_statement+ + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StatementList.__init__ + ~StatementList.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StatementList.meta + ~StatementList.statements + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StaticDeclarations.rst.txt b/master/_sources/api/blark.transform.StaticDeclarations.rst.txt new file mode 100644 index 0000000..797e132 --- /dev/null +++ b/master/_sources/api/blark.transform.StaticDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.StaticDeclarations +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: StaticDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``static_var_declarations`` + + .. code:: + + static_var_declarations: "VAR_STAT"i [ variable_attributes ] var_body "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StaticDeclarations.__init__ + ~StaticDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StaticDeclarations.attribute_pragmas + ~StaticDeclarations.block_header + ~StaticDeclarations.meta + ~StaticDeclarations.attrs + ~StaticDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.String.rst.txt b/master/_sources/api/blark.transform.String.rst.txt new file mode 100644 index 0000000..74a7f84 --- /dev/null +++ b/master/_sources/api/blark.transform.String.rst.txt @@ -0,0 +1,48 @@ +blark.transform.String +====================== + +.. currentmodule:: blark.transform + +.. autoclass:: String + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``string_literal`` + + .. code:: + + string_literal: SINGLE_BYTE_CHARACTER_STRING + | DOUBLE_BYTE_CHARACTER_STRING + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~String.__init__ + ~String.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~String.meta + ~String.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StringSpecLength.rst.txt b/master/_sources/api/blark.transform.StringSpecLength.rst.txt new file mode 100644 index 0000000..338a4db --- /dev/null +++ b/master/_sources/api/blark.transform.StringSpecLength.rst.txt @@ -0,0 +1,47 @@ +blark.transform.StringSpecLength +================================ + +.. currentmodule:: blark.transform + +.. autoclass:: StringSpecLength + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``string_spec_length`` + + .. code:: + + string_spec_length: parenthesized_expression + | bracketed_expression + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StringSpecLength.__init__ + ~StringSpecLength.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StringSpecLength.length + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StringTypeDeclaration.rst.txt b/master/_sources/api/blark.transform.StringTypeDeclaration.rst.txt new file mode 100644 index 0000000..5970557 --- /dev/null +++ b/master/_sources/api/blark.transform.StringTypeDeclaration.rst.txt @@ -0,0 +1,50 @@ +blark.transform.StringTypeDeclaration +===================================== + +.. currentmodule:: blark.transform + +.. autoclass:: StringTypeDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``string_type_declaration`` + + .. code:: + + string_type_declaration: string_type_name ":" string_type_specification [ ":=" string_literal ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StringTypeDeclaration.__init__ + ~StringTypeDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StringTypeDeclaration.meta + ~StringTypeDeclaration.type_name + ~StringTypeDeclaration.name + ~StringTypeDeclaration.string_type + ~StringTypeDeclaration.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StringTypeInitialization.rst.txt b/master/_sources/api/blark.transform.StringTypeInitialization.rst.txt new file mode 100644 index 0000000..3e3502f --- /dev/null +++ b/master/_sources/api/blark.transform.StringTypeInitialization.rst.txt @@ -0,0 +1,58 @@ +blark.transform.StringTypeInitialization +======================================== + +.. currentmodule:: blark.transform + +.. autoclass:: StringTypeInitialization + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``single_byte_string_spec`` + + .. code:: + + single_byte_string_spec: STRING [ string_spec_length ] [ ":=" SINGLE_BYTE_CHARACTER_STRING ] + + + ``double_byte_string_spec`` + + .. code:: + + double_byte_string_spec: WSTRING [ string_spec_length ] [ ":=" DOUBLE_BYTE_CHARACTER_STRING ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StringTypeInitialization.__init__ + ~StringTypeInitialization.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StringTypeInitialization.base_type_name + ~StringTypeInitialization.full_type_name + ~StringTypeInitialization.meta + ~StringTypeInitialization.type_info + ~StringTypeInitialization.spec + ~StringTypeInitialization.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StringTypeSpecification.rst.txt b/master/_sources/api/blark.transform.StringTypeSpecification.rst.txt new file mode 100644 index 0000000..a89d305 --- /dev/null +++ b/master/_sources/api/blark.transform.StringTypeSpecification.rst.txt @@ -0,0 +1,51 @@ +blark.transform.StringTypeSpecification +======================================= + +.. currentmodule:: blark.transform + +.. autoclass:: StringTypeSpecification + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``string_type_specification`` + + .. code:: + + string_type_specification: (STRING | WSTRING) [ string_spec_length ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StringTypeSpecification.__init__ + ~StringTypeSpecification.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StringTypeSpecification.base_type_name + ~StringTypeSpecification.full_type_name + ~StringTypeSpecification.length + ~StringTypeSpecification.meta + ~StringTypeSpecification.type_info + ~StringTypeSpecification.type_name + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StringVariableInitDeclaration.rst.txt b/master/_sources/api/blark.transform.StringVariableInitDeclaration.rst.txt new file mode 100644 index 0000000..0d4c7fd --- /dev/null +++ b/master/_sources/api/blark.transform.StringVariableInitDeclaration.rst.txt @@ -0,0 +1,57 @@ +blark.transform.StringVariableInitDeclaration +============================================= + +.. currentmodule:: blark.transform + +.. autoclass:: StringVariableInitDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``single_byte_string_var_declaration`` + + .. code:: + + single_byte_string_var_declaration: var1_list ":" single_byte_string_spec + + + ``double_byte_string_var_declaration`` + + .. code:: + + double_byte_string_var_declaration: var1_list ":" double_byte_string_spec + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StringVariableInitDeclaration.__init__ + ~StringVariableInitDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StringVariableInitDeclaration.meta + ~StringVariableInitDeclaration.variables + ~StringVariableInitDeclaration.spec + ~StringVariableInitDeclaration.value + ~StringVariableInitDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StructureElementDeclaration.rst.txt b/master/_sources/api/blark.transform.StructureElementDeclaration.rst.txt new file mode 100644 index 0000000..ea7e720 --- /dev/null +++ b/master/_sources/api/blark.transform.StructureElementDeclaration.rst.txt @@ -0,0 +1,53 @@ +blark.transform.StructureElementDeclaration +=========================================== + +.. currentmodule:: blark.transform + +.. autoclass:: StructureElementDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``structure_element_declaration`` + + .. code:: + + structure_element_declaration: structure_element_name [ incomplete_location ] ":" ( initialized_structure | array_spec_init | simple_spec_init | subrange_spec_init | enumerated_spec_init | function_call ) + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StructureElementDeclaration.__init__ + ~StructureElementDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StructureElementDeclaration.base_type_name + ~StructureElementDeclaration.full_type_name + ~StructureElementDeclaration.meta + ~StructureElementDeclaration.value + ~StructureElementDeclaration.variables + ~StructureElementDeclaration.name + ~StructureElementDeclaration.location + ~StructureElementDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StructureElementInitialization.rst.txt b/master/_sources/api/blark.transform.StructureElementInitialization.rst.txt new file mode 100644 index 0000000..7f2cd5a --- /dev/null +++ b/master/_sources/api/blark.transform.StructureElementInitialization.rst.txt @@ -0,0 +1,49 @@ +blark.transform.StructureElementInitialization +============================================== + +.. currentmodule:: blark.transform + +.. autoclass:: StructureElementInitialization + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``structure_element_initialization`` + + .. code:: + + structure_element_initialization: constant + | structure_element_name ":=" ( constant | expression | enumerated_value | array_initialization | structure_initialization ) + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StructureElementInitialization.__init__ + ~StructureElementInitialization.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StructureElementInitialization.meta + ~StructureElementInitialization.name + ~StructureElementInitialization.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StructureInitialization.rst.txt b/master/_sources/api/blark.transform.StructureInitialization.rst.txt new file mode 100644 index 0000000..56e4136 --- /dev/null +++ b/master/_sources/api/blark.transform.StructureInitialization.rst.txt @@ -0,0 +1,47 @@ +blark.transform.StructureInitialization +======================================= + +.. currentmodule:: blark.transform + +.. autoclass:: StructureInitialization + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``structure_initialization`` + + .. code:: + + structure_initialization: "(" structure_element_initialization ( "," structure_element_initialization )* ")" + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StructureInitialization.__init__ + ~StructureInitialization.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StructureInitialization.meta + ~StructureInitialization.elements + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StructureTypeDeclaration.rst.txt b/master/_sources/api/blark.transform.StructureTypeDeclaration.rst.txt new file mode 100644 index 0000000..8c0e89c --- /dev/null +++ b/master/_sources/api/blark.transform.StructureTypeDeclaration.rst.txt @@ -0,0 +1,50 @@ +blark.transform.StructureTypeDeclaration +======================================== + +.. currentmodule:: blark.transform + +.. autoclass:: StructureTypeDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``structure_type_declaration`` + + .. code:: + + structure_type_declaration: structure_type_name_declaration [ extends ] ":" [ indirection_type ] "STRUCT"i ( structure_element_declaration ";"+ )* "END_STRUCT"i + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StructureTypeDeclaration.__init__ + ~StructureTypeDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StructureTypeDeclaration.meta + ~StructureTypeDeclaration.name + ~StructureTypeDeclaration.extends + ~StructureTypeDeclaration.indirection + ~StructureTypeDeclaration.declarations + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.StructuredVariableInitDeclaration.rst.txt b/master/_sources/api/blark.transform.StructuredVariableInitDeclaration.rst.txt new file mode 100644 index 0000000..8304956 --- /dev/null +++ b/master/_sources/api/blark.transform.StructuredVariableInitDeclaration.rst.txt @@ -0,0 +1,48 @@ +blark.transform.StructuredVariableInitDeclaration +================================================= + +.. currentmodule:: blark.transform + +.. autoclass:: StructuredVariableInitDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``structured_var_init_decl`` + + .. code:: + + structured_var_init_decl: var1_list ":" initialized_structure + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~StructuredVariableInitDeclaration.__init__ + ~StructuredVariableInitDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~StructuredVariableInitDeclaration.meta + ~StructuredVariableInitDeclaration.variables + ~StructuredVariableInitDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Subrange.rst.txt b/master/_sources/api/blark.transform.Subrange.rst.txt new file mode 100644 index 0000000..033fc35 --- /dev/null +++ b/master/_sources/api/blark.transform.Subrange.rst.txt @@ -0,0 +1,24 @@ +blark.transform.Subrange +======================== + +.. currentmodule:: blark.transform + +.. autoclass:: Subrange + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Subrange.__init__ + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.SubrangeSpecification.rst.txt b/master/_sources/api/blark.transform.SubrangeSpecification.rst.txt new file mode 100644 index 0000000..0680435 --- /dev/null +++ b/master/_sources/api/blark.transform.SubrangeSpecification.rst.txt @@ -0,0 +1,52 @@ +blark.transform.SubrangeSpecification +===================================== + +.. currentmodule:: blark.transform + +.. autoclass:: SubrangeSpecification + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``subrange_specification`` + + .. code:: + + subrange_specification: INTEGER_TYPE_NAME "(" subrange ")" + | subrange_type_name + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SubrangeSpecification.__init__ + ~SubrangeSpecification.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SubrangeSpecification.base_type_name + ~SubrangeSpecification.full_type_name + ~SubrangeSpecification.meta + ~SubrangeSpecification.subrange + ~SubrangeSpecification.type_info + ~SubrangeSpecification.type_name + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.SubrangeTypeDeclaration.rst.txt b/master/_sources/api/blark.transform.SubrangeTypeDeclaration.rst.txt new file mode 100644 index 0000000..ceae2e5 --- /dev/null +++ b/master/_sources/api/blark.transform.SubrangeTypeDeclaration.rst.txt @@ -0,0 +1,48 @@ +blark.transform.SubrangeTypeDeclaration +======================================= + +.. currentmodule:: blark.transform + +.. autoclass:: SubrangeTypeDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``subrange_type_declaration`` + + .. code:: + + subrange_type_declaration: subrange_type_name ":" subrange_spec_init + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SubrangeTypeDeclaration.__init__ + ~SubrangeTypeDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SubrangeTypeDeclaration.meta + ~SubrangeTypeDeclaration.name + ~SubrangeTypeDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.SubrangeTypeInitialization.rst.txt b/master/_sources/api/blark.transform.SubrangeTypeInitialization.rst.txt new file mode 100644 index 0000000..689a77f --- /dev/null +++ b/master/_sources/api/blark.transform.SubrangeTypeInitialization.rst.txt @@ -0,0 +1,52 @@ +blark.transform.SubrangeTypeInitialization +========================================== + +.. currentmodule:: blark.transform + +.. autoclass:: SubrangeTypeInitialization + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``subrange_spec_init`` + + .. code:: + + subrange_spec_init: [ indirection_type ] subrange_specification [ ":=" expression ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SubrangeTypeInitialization.__init__ + ~SubrangeTypeInitialization.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SubrangeTypeInitialization.base_type_name + ~SubrangeTypeInitialization.full_type_name + ~SubrangeTypeInitialization.meta + ~SubrangeTypeInitialization.type_info + ~SubrangeTypeInitialization.value + ~SubrangeTypeInitialization.indirection + ~SubrangeTypeInitialization.spec + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.SubscriptList.rst.txt b/master/_sources/api/blark.transform.SubscriptList.rst.txt new file mode 100644 index 0000000..fa907b5 --- /dev/null +++ b/master/_sources/api/blark.transform.SubscriptList.rst.txt @@ -0,0 +1,48 @@ +blark.transform.SubscriptList +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: SubscriptList + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``subscript_list`` + + .. code:: + + subscript_list: "[" _subscript ( "," _subscript )* "]" [ DEREFERENCED ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SubscriptList.__init__ + ~SubscriptList.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SubscriptList.meta + ~SubscriptList.subscripts + ~SubscriptList.dereferenced + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.TemporaryVariableDeclarations.rst.txt b/master/_sources/api/blark.transform.TemporaryVariableDeclarations.rst.txt new file mode 100644 index 0000000..48ff4ad --- /dev/null +++ b/master/_sources/api/blark.transform.TemporaryVariableDeclarations.rst.txt @@ -0,0 +1,49 @@ +blark.transform.TemporaryVariableDeclarations +============================================= + +.. currentmodule:: blark.transform + +.. autoclass:: TemporaryVariableDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``temp_var_decls`` + + .. code:: + + temp_var_decls: "VAR_TEMP"i var_body "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TemporaryVariableDeclarations.__init__ + ~TemporaryVariableDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TemporaryVariableDeclarations.attribute_pragmas + ~TemporaryVariableDeclarations.block_header + ~TemporaryVariableDeclarations.meta + ~TemporaryVariableDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.TimeOfDay.rst.txt b/master/_sources/api/blark.transform.TimeOfDay.rst.txt new file mode 100644 index 0000000..71a80a9 --- /dev/null +++ b/master/_sources/api/blark.transform.TimeOfDay.rst.txt @@ -0,0 +1,50 @@ +blark.transform.TimeOfDay +========================= + +.. currentmodule:: blark.transform + +.. autoclass:: TimeOfDay + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``time_of_day`` + + .. code:: + + time_of_day: ("TIME_OF_DAY"i | "TOD"i) "#" _daytime + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TimeOfDay.__init__ + ~TimeOfDay.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TimeOfDay.meta + ~TimeOfDay.second + ~TimeOfDay.value + ~TimeOfDay.hour + ~TimeOfDay.minute + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.TypeInformation.rst.txt b/master/_sources/api/blark.transform.TypeInformation.rst.txt new file mode 100644 index 0000000..bd46bea --- /dev/null +++ b/master/_sources/api/blark.transform.TypeInformation.rst.txt @@ -0,0 +1,34 @@ +blark.transform.TypeInformation +=============================== + +.. currentmodule:: blark.transform + +.. autoclass:: TypeInformation + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TypeInformation.__init__ + ~TypeInformation.from_init + ~TypeInformation.from_spec + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TypeInformation.base_type_name + ~TypeInformation.full_type_name + ~TypeInformation.context + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.TypeInitialization.rst.txt b/master/_sources/api/blark.transform.TypeInitialization.rst.txt new file mode 100644 index 0000000..7e578fe --- /dev/null +++ b/master/_sources/api/blark.transform.TypeInitialization.rst.txt @@ -0,0 +1,51 @@ +blark.transform.TypeInitialization +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: TypeInitialization + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``simple_spec_init`` + + .. code:: + + simple_spec_init: ( simple_specification | indirect_simple_specification ) [ ":=" expression ] + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~TypeInitialization.__init__ + ~TypeInitialization.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TypeInitialization.base_type_name + ~TypeInitialization.full_type_name + ~TypeInitialization.meta + ~TypeInitialization.type_info + ~TypeInitialization.spec + ~TypeInitialization.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.TypeInitializationBase.rst.txt b/master/_sources/api/blark.transform.TypeInitializationBase.rst.txt new file mode 100644 index 0000000..f3cf88a --- /dev/null +++ b/master/_sources/api/blark.transform.TypeInitializationBase.rst.txt @@ -0,0 +1,31 @@ +blark.transform.TypeInitializationBase +====================================== + +.. currentmodule:: blark.transform + +.. autoclass:: TypeInitializationBase + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TypeInitializationBase.base_type_name + ~TypeInitializationBase.full_type_name + ~TypeInitializationBase.type_info + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.TypeSpecificationBase.rst.txt b/master/_sources/api/blark.transform.TypeSpecificationBase.rst.txt new file mode 100644 index 0000000..cddcf05 --- /dev/null +++ b/master/_sources/api/blark.transform.TypeSpecificationBase.rst.txt @@ -0,0 +1,31 @@ +blark.transform.TypeSpecificationBase +===================================== + +.. currentmodule:: blark.transform + +.. autoclass:: TypeSpecificationBase + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~TypeSpecificationBase.base_type_name + ~TypeSpecificationBase.full_type_name + ~TypeSpecificationBase.type_info + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.UnaryOperation.rst.txt b/master/_sources/api/blark.transform.UnaryOperation.rst.txt new file mode 100644 index 0000000..7a2ed84 --- /dev/null +++ b/master/_sources/api/blark.transform.UnaryOperation.rst.txt @@ -0,0 +1,48 @@ +blark.transform.UnaryOperation +============================== + +.. currentmodule:: blark.transform + +.. autoclass:: UnaryOperation + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``unary_expression`` + + .. code:: + + unary_expression: [ UNARY_OPERATOR ] primary_expression + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~UnaryOperation.__init__ + ~UnaryOperation.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~UnaryOperation.meta + ~UnaryOperation.op + ~UnaryOperation.expr + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.UnionElementDeclaration.rst.txt b/master/_sources/api/blark.transform.UnionElementDeclaration.rst.txt new file mode 100644 index 0000000..91a2e91 --- /dev/null +++ b/master/_sources/api/blark.transform.UnionElementDeclaration.rst.txt @@ -0,0 +1,49 @@ +blark.transform.UnionElementDeclaration +======================================= + +.. currentmodule:: blark.transform + +.. autoclass:: UnionElementDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``union_element_declaration`` + + .. code:: + + union_element_declaration: structure_element_name ":" ( array_specification | simple_specification | indirect_simple_specification | subrange_specification | enumerated_specification ) + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~UnionElementDeclaration.__init__ + ~UnionElementDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~UnionElementDeclaration.meta + ~UnionElementDeclaration.variables + ~UnionElementDeclaration.name + ~UnionElementDeclaration.spec + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.UnionTypeDeclaration.rst.txt b/master/_sources/api/blark.transform.UnionTypeDeclaration.rst.txt new file mode 100644 index 0000000..5746dee --- /dev/null +++ b/master/_sources/api/blark.transform.UnionTypeDeclaration.rst.txt @@ -0,0 +1,48 @@ +blark.transform.UnionTypeDeclaration +==================================== + +.. currentmodule:: blark.transform + +.. autoclass:: UnionTypeDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``union_type_declaration`` + + .. code:: + + union_type_declaration: structure_type_name_declaration ":" "UNION"i ( union_element_declaration ";"+ )* "END_UNION"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~UnionTypeDeclaration.__init__ + ~UnionTypeDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~UnionTypeDeclaration.meta + ~UnionTypeDeclaration.name + ~UnionTypeDeclaration.declarations + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.UnresolvedTypeInformation.rst.txt b/master/_sources/api/blark.transform.UnresolvedTypeInformation.rst.txt new file mode 100644 index 0000000..b5c7e5b --- /dev/null +++ b/master/_sources/api/blark.transform.UnresolvedTypeInformation.rst.txt @@ -0,0 +1,32 @@ +blark.transform.UnresolvedTypeInformation +========================================= + +.. currentmodule:: blark.transform + +.. autoclass:: UnresolvedTypeInformation + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~UnresolvedTypeInformation.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~UnresolvedTypeInformation.base_type_name + ~UnresolvedTypeInformation.full_type_name + ~UnresolvedTypeInformation.context + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.Variable.rst.txt b/master/_sources/api/blark.transform.Variable.rst.txt new file mode 100644 index 0000000..fb2a0c8 --- /dev/null +++ b/master/_sources/api/blark.transform.Variable.rst.txt @@ -0,0 +1,23 @@ +blark.transform.Variable +======================== + +.. currentmodule:: blark.transform + +.. autoclass:: Variable + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.VariableAttributes.rst.txt b/master/_sources/api/blark.transform.VariableAttributes.rst.txt new file mode 100644 index 0000000..536a234 --- /dev/null +++ b/master/_sources/api/blark.transform.VariableAttributes.rst.txt @@ -0,0 +1,41 @@ +blark.transform.VariableAttributes +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: VariableAttributes + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``variable_attributes`` + + .. code:: + + variable_attributes: VAR_ATTRIB+ + + + + + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~VariableAttributes.constant + ~VariableAttributes.retain + ~VariableAttributes.non_retain + ~VariableAttributes.persistent + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.VariableDeclarationBlock.rst.txt b/master/_sources/api/blark.transform.VariableDeclarationBlock.rst.txt new file mode 100644 index 0000000..296f602 --- /dev/null +++ b/master/_sources/api/blark.transform.VariableDeclarationBlock.rst.txt @@ -0,0 +1,32 @@ +blark.transform.VariableDeclarationBlock +======================================== + +.. currentmodule:: blark.transform + +.. autoclass:: VariableDeclarationBlock + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~VariableDeclarationBlock.attribute_pragmas + ~VariableDeclarationBlock.block_header + ~VariableDeclarationBlock.items + ~VariableDeclarationBlock.meta + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.VariableDeclarations.rst.txt b/master/_sources/api/blark.transform.VariableDeclarations.rst.txt new file mode 100644 index 0000000..489eca6 --- /dev/null +++ b/master/_sources/api/blark.transform.VariableDeclarations.rst.txt @@ -0,0 +1,50 @@ +blark.transform.VariableDeclarations +==================================== + +.. currentmodule:: blark.transform + +.. autoclass:: VariableDeclarations + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``var_declarations`` + + .. code:: + + var_declarations: "VAR"i [ variable_attributes ] var_body "END_VAR"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~VariableDeclarations.__init__ + ~VariableDeclarations.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~VariableDeclarations.attribute_pragmas + ~VariableDeclarations.block_header + ~VariableDeclarations.meta + ~VariableDeclarations.attrs + ~VariableDeclarations.items + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.VariableLocationPrefix.rst.txt b/master/_sources/api/blark.transform.VariableLocationPrefix.rst.txt new file mode 100644 index 0000000..4124f16 --- /dev/null +++ b/master/_sources/api/blark.transform.VariableLocationPrefix.rst.txt @@ -0,0 +1,25 @@ +blark.transform.VariableLocationPrefix +====================================== + +.. currentmodule:: blark.transform + +.. autoclass:: VariableLocationPrefix + + + + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~VariableLocationPrefix.input + ~VariableLocationPrefix.output + ~VariableLocationPrefix.memory + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.VariableOneInitDeclaration.rst.txt b/master/_sources/api/blark.transform.VariableOneInitDeclaration.rst.txt new file mode 100644 index 0000000..4fbb679 --- /dev/null +++ b/master/_sources/api/blark.transform.VariableOneInitDeclaration.rst.txt @@ -0,0 +1,48 @@ +blark.transform.VariableOneInitDeclaration +========================================== + +.. currentmodule:: blark.transform + +.. autoclass:: VariableOneInitDeclaration + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``var1_init_decl`` + + .. code:: + + var1_init_decl: var1_list ":" ( simple_spec_init | subrange_spec_init | enumerated_spec_init ) + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~VariableOneInitDeclaration.__init__ + ~VariableOneInitDeclaration.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~VariableOneInitDeclaration.meta + ~VariableOneInitDeclaration.variables + ~VariableOneInitDeclaration.init + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.VariableSizePrefix.rst.txt b/master/_sources/api/blark.transform.VariableSizePrefix.rst.txt new file mode 100644 index 0000000..d8e6853 --- /dev/null +++ b/master/_sources/api/blark.transform.VariableSizePrefix.rst.txt @@ -0,0 +1,27 @@ +blark.transform.VariableSizePrefix +================================== + +.. currentmodule:: blark.transform + +.. autoclass:: VariableSizePrefix + + + + + + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~VariableSizePrefix.bit + ~VariableSizePrefix.byte + ~VariableSizePrefix.word_16 + ~VariableSizePrefix.dword_32 + ~VariableSizePrefix.lword_64 + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.WhileStatement.rst.txt b/master/_sources/api/blark.transform.WhileStatement.rst.txt new file mode 100644 index 0000000..a91909d --- /dev/null +++ b/master/_sources/api/blark.transform.WhileStatement.rst.txt @@ -0,0 +1,48 @@ +blark.transform.WhileStatement +============================== + +.. currentmodule:: blark.transform + +.. autoclass:: WhileStatement + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``while_statement`` + + .. code:: + + while_statement: "WHILE"i expression "DO"i statement_list "END_WHILE"i ";"* + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~WhileStatement.__init__ + ~WhileStatement.from_lark + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~WhileStatement.meta + ~WhileStatement.expression + ~WhileStatement.statements + \ No newline at end of file diff --git a/master/_sources/api/blark.transform._ArrayInitialElementCount.rst.txt b/master/_sources/api/blark.transform._ArrayInitialElementCount.rst.txt new file mode 100644 index 0000000..0353438 --- /dev/null +++ b/master/_sources/api/blark.transform._ArrayInitialElementCount.rst.txt @@ -0,0 +1,39 @@ +blark.transform.\_ArrayInitialElementCount +========================================== + +.. currentmodule:: blark.transform + +.. autoclass:: _ArrayInitialElementCount + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``array_initial_element_count`` + + .. code:: + + array_initial_element: ( integer | enumerated_value ) "(" [ _array_initial_element ] ")" -> array_initial_element_count + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~_ArrayInitialElementCount.from_lark + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform._BareArrayInitialization.rst.txt b/master/_sources/api/blark.transform._BareArrayInitialization.rst.txt new file mode 100644 index 0000000..53fd6ee --- /dev/null +++ b/master/_sources/api/blark.transform._BareArrayInitialization.rst.txt @@ -0,0 +1,40 @@ +blark.transform.\_BareArrayInitialization +========================================= + +.. currentmodule:: blark.transform + +.. autoclass:: _BareArrayInitialization + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``bare_array_initialization`` + + .. code:: + + | array_initial_element ( "," array_initial_element )* -> bare_array_initialization + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~_BareArrayInitialization.__init__ + ~_BareArrayInitialization.from_lark + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform._BracketedArrayInitialization.rst.txt b/master/_sources/api/blark.transform._BracketedArrayInitialization.rst.txt new file mode 100644 index 0000000..58da67f --- /dev/null +++ b/master/_sources/api/blark.transform._BracketedArrayInitialization.rst.txt @@ -0,0 +1,40 @@ +blark.transform.\_BracketedArrayInitialization +============================================== + +.. currentmodule:: blark.transform + +.. autoclass:: _BracketedArrayInitialization + + + + + .. rubric:: Lark grammar + + This class is used by the following grammar rules: + + + ``bracketed_array_initialization`` + + .. code:: + + array_initialization: "[" array_initial_element ( "," array_initial_element )* "]" -> bracketed_array_initialization + + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~_BracketedArrayInitialization.__init__ + ~_BracketedArrayInitialization.from_lark + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform._FlagHelper.rst.txt b/master/_sources/api/blark.transform._FlagHelper.rst.txt new file mode 100644 index 0000000..5024061 --- /dev/null +++ b/master/_sources/api/blark.transform._FlagHelper.rst.txt @@ -0,0 +1,24 @@ +blark.transform.\_FlagHelper +============================ + +.. currentmodule:: blark.transform + +.. autoclass:: _FlagHelper + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~_FlagHelper.from_lark + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.transform._GenericInit.rst.txt b/master/_sources/api/blark.transform._GenericInit.rst.txt new file mode 100644 index 0000000..6e4d81e --- /dev/null +++ b/master/_sources/api/blark.transform._GenericInit.rst.txt @@ -0,0 +1,33 @@ +blark.transform.\_GenericInit +============================= + +.. currentmodule:: blark.transform + +.. autoclass:: _GenericInit + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~_GenericInit.__init__ + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~_GenericInit.base_type_name + ~_GenericInit.full_type_name + ~_GenericInit.repr + ~_GenericInit.value + \ No newline at end of file diff --git a/master/_sources/api/blark.transform.configure_formatting.rst.txt b/master/_sources/api/blark.transform.configure_formatting.rst.txt new file mode 100644 index 0000000..c091304 --- /dev/null +++ b/master/_sources/api/blark.transform.configure_formatting.rst.txt @@ -0,0 +1,6 @@ +blark.transform.configure\_formatting +===================================== + +.. currentmodule:: blark.transform + +.. autofunction:: configure_formatting \ No newline at end of file diff --git a/master/_sources/api/blark.transform.get_grammar_for_class.rst.txt b/master/_sources/api/blark.transform.get_grammar_for_class.rst.txt new file mode 100644 index 0000000..46cd9ed --- /dev/null +++ b/master/_sources/api/blark.transform.get_grammar_for_class.rst.txt @@ -0,0 +1,6 @@ +blark.transform.get\_grammar\_for\_class +======================================== + +.. currentmodule:: blark.transform + +.. autofunction:: get_grammar_for_class \ No newline at end of file diff --git a/master/_sources/api/blark.transform.indent.rst.txt b/master/_sources/api/blark.transform.indent.rst.txt new file mode 100644 index 0000000..fe52f37 --- /dev/null +++ b/master/_sources/api/blark.transform.indent.rst.txt @@ -0,0 +1,6 @@ +blark.transform.indent +====================== + +.. currentmodule:: blark.transform + +.. autofunction:: indent \ No newline at end of file diff --git a/master/_sources/api/blark.transform.indent_if.rst.txt b/master/_sources/api/blark.transform.indent_if.rst.txt new file mode 100644 index 0000000..5439bd6 --- /dev/null +++ b/master/_sources/api/blark.transform.indent_if.rst.txt @@ -0,0 +1,6 @@ +blark.transform.indent\_if +========================== + +.. currentmodule:: blark.transform + +.. autofunction:: indent_if \ No newline at end of file diff --git a/master/_sources/api/blark.transform.join_if.rst.txt b/master/_sources/api/blark.transform.join_if.rst.txt new file mode 100644 index 0000000..0b9bca5 --- /dev/null +++ b/master/_sources/api/blark.transform.join_if.rst.txt @@ -0,0 +1,6 @@ +blark.transform.join\_if +======================== + +.. currentmodule:: blark.transform + +.. autofunction:: join_if \ No newline at end of file diff --git a/master/_sources/api/blark.transform.merge_comments.rst.txt b/master/_sources/api/blark.transform.merge_comments.rst.txt new file mode 100644 index 0000000..6f3e192 --- /dev/null +++ b/master/_sources/api/blark.transform.merge_comments.rst.txt @@ -0,0 +1,6 @@ +blark.transform.merge\_comments +=============================== + +.. currentmodule:: blark.transform + +.. autofunction:: merge_comments \ No newline at end of file diff --git a/master/_sources/api/blark.transform.meta_field.rst.txt b/master/_sources/api/blark.transform.meta_field.rst.txt new file mode 100644 index 0000000..7a2bee0 --- /dev/null +++ b/master/_sources/api/blark.transform.meta_field.rst.txt @@ -0,0 +1,6 @@ +blark.transform.meta\_field +=========================== + +.. currentmodule:: blark.transform + +.. autofunction:: meta_field \ No newline at end of file diff --git a/master/_sources/api/blark.transform.multiline_code_block.rst.txt b/master/_sources/api/blark.transform.multiline_code_block.rst.txt new file mode 100644 index 0000000..e8c6e11 --- /dev/null +++ b/master/_sources/api/blark.transform.multiline_code_block.rst.txt @@ -0,0 +1,6 @@ +blark.transform.multiline\_code\_block +====================================== + +.. currentmodule:: blark.transform + +.. autofunction:: multiline_code_block \ No newline at end of file diff --git a/master/_sources/api/blark.transform.transform.rst.txt b/master/_sources/api/blark.transform.transform.rst.txt new file mode 100644 index 0000000..43c4a30 --- /dev/null +++ b/master/_sources/api/blark.transform.transform.rst.txt @@ -0,0 +1,6 @@ +blark.transform.transform +========================= + +.. currentmodule:: blark.transform + +.. autofunction:: transform \ No newline at end of file diff --git a/master/_sources/api/blark.typing.ContainsBlarkCode.rst.txt b/master/_sources/api/blark.typing.ContainsBlarkCode.rst.txt new file mode 100644 index 0000000..68fa3db --- /dev/null +++ b/master/_sources/api/blark.typing.ContainsBlarkCode.rst.txt @@ -0,0 +1,25 @@ +blark.typing.ContainsBlarkCode +============================== + +.. currentmodule:: blark.typing + +.. autoclass:: ContainsBlarkCode + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~ContainsBlarkCode.__init__ + ~ContainsBlarkCode.to_blark + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.typing.SupportsRewrite.rst.txt b/master/_sources/api/blark.typing.SupportsRewrite.rst.txt new file mode 100644 index 0000000..197f640 --- /dev/null +++ b/master/_sources/api/blark.typing.SupportsRewrite.rst.txt @@ -0,0 +1,25 @@ +blark.typing.SupportsRewrite +============================ + +.. currentmodule:: blark.typing + +.. autoclass:: SupportsRewrite + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SupportsRewrite.__init__ + ~SupportsRewrite.rewrite_code + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.typing.SupportsSaveToPath.rst.txt b/master/_sources/api/blark.typing.SupportsSaveToPath.rst.txt new file mode 100644 index 0000000..5df94ed --- /dev/null +++ b/master/_sources/api/blark.typing.SupportsSaveToPath.rst.txt @@ -0,0 +1,25 @@ +blark.typing.SupportsSaveToPath +=============================== + +.. currentmodule:: blark.typing + +.. autoclass:: SupportsSaveToPath + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SupportsSaveToPath.__init__ + ~SupportsSaveToPath.save_to + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.typing.SupportsWrite.rst.txt b/master/_sources/api/blark.typing.SupportsWrite.rst.txt new file mode 100644 index 0000000..64e06fb --- /dev/null +++ b/master/_sources/api/blark.typing.SupportsWrite.rst.txt @@ -0,0 +1,25 @@ +blark.typing.SupportsWrite +========================== + +.. currentmodule:: blark.typing + +.. autoclass:: SupportsWrite + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SupportsWrite.__init__ + ~SupportsWrite.to_file_contents + + + + + + \ No newline at end of file diff --git a/master/_sources/api/blark.util.Identifier.rst.txt b/master/_sources/api/blark.util.Identifier.rst.txt new file mode 100644 index 0000000..2144ca1 --- /dev/null +++ b/master/_sources/api/blark.util.Identifier.rst.txt @@ -0,0 +1,34 @@ +blark.util.Identifier +===================== + +.. currentmodule:: blark.util + +.. autoclass:: Identifier + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~Identifier.__init__ + ~Identifier.from_string + ~Identifier.to_string + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~Identifier.decl_impl + ~Identifier.dotted_name + ~Identifier.parts + \ No newline at end of file diff --git a/master/_sources/api/blark.util.SourceType.rst.txt b/master/_sources/api/blark.util.SourceType.rst.txt new file mode 100644 index 0000000..45290b1 --- /dev/null +++ b/master/_sources/api/blark.util.SourceType.rst.txt @@ -0,0 +1,43 @@ +blark.util.SourceType +===================== + +.. currentmodule:: blark.util + +.. autoclass:: SourceType + + + + + + + .. rubric:: Methods + + .. autosummary:: + + + ~SourceType.get_grammar_rule + ~SourceType.get_implicit_block_end + + + + + + .. rubric:: Attributes + + .. autosummary:: + + + ~SourceType.general + ~SourceType.action + ~SourceType.function + ~SourceType.function_block + ~SourceType.interface + ~SourceType.method + ~SourceType.program + ~SourceType.property + ~SourceType.property_get + ~SourceType.property_set + ~SourceType.dut + ~SourceType.statement_list + ~SourceType.var_global + \ No newline at end of file diff --git a/master/_sources/api/blark.util.find_and_clean_comments.rst.txt b/master/_sources/api/blark.util.find_and_clean_comments.rst.txt new file mode 100644 index 0000000..6f1ccdd --- /dev/null +++ b/master/_sources/api/blark.util.find_and_clean_comments.rst.txt @@ -0,0 +1,6 @@ +blark.util.find\_and\_clean\_comments +===================================== + +.. currentmodule:: blark.util + +.. autofunction:: find_and_clean_comments \ No newline at end of file diff --git a/master/_sources/api/blark.util.find_pou_type_and_identifier.rst.txt b/master/_sources/api/blark.util.find_pou_type_and_identifier.rst.txt new file mode 100644 index 0000000..568a36e --- /dev/null +++ b/master/_sources/api/blark.util.find_pou_type_and_identifier.rst.txt @@ -0,0 +1,6 @@ +blark.util.find\_pou\_type\_and\_identifier +=========================================== + +.. currentmodule:: blark.util + +.. autofunction:: find_pou_type_and_identifier \ No newline at end of file diff --git a/master/_sources/api/blark.util.fix_case_insensitive_path.rst.txt b/master/_sources/api/blark.util.fix_case_insensitive_path.rst.txt new file mode 100644 index 0000000..992d9f4 --- /dev/null +++ b/master/_sources/api/blark.util.fix_case_insensitive_path.rst.txt @@ -0,0 +1,6 @@ +blark.util.fix\_case\_insensitive\_path +======================================= + +.. currentmodule:: blark.util + +.. autofunction:: fix_case_insensitive_path \ No newline at end of file diff --git a/master/_sources/api/blark.util.get_file_sha256.rst.txt b/master/_sources/api/blark.util.get_file_sha256.rst.txt new file mode 100644 index 0000000..bbcd269 --- /dev/null +++ b/master/_sources/api/blark.util.get_file_sha256.rst.txt @@ -0,0 +1,6 @@ +blark.util.get\_file\_sha256 +============================ + +.. currentmodule:: blark.util + +.. autofunction:: get_file_sha256 \ No newline at end of file diff --git a/master/_sources/api/blark.util.get_grammar_for_rule.rst.txt b/master/_sources/api/blark.util.get_grammar_for_rule.rst.txt new file mode 100644 index 0000000..01cec33 --- /dev/null +++ b/master/_sources/api/blark.util.get_grammar_for_rule.rst.txt @@ -0,0 +1,6 @@ +blark.util.get\_grammar\_for\_rule +================================== + +.. currentmodule:: blark.util + +.. autofunction:: get_grammar_for_rule \ No newline at end of file diff --git a/master/_sources/api/blark.util.get_grammar_source.rst.txt b/master/_sources/api/blark.util.get_grammar_source.rst.txt new file mode 100644 index 0000000..fb61269 --- /dev/null +++ b/master/_sources/api/blark.util.get_grammar_source.rst.txt @@ -0,0 +1,6 @@ +blark.util.get\_grammar\_source +=============================== + +.. currentmodule:: blark.util + +.. autofunction:: get_grammar_source \ No newline at end of file diff --git a/master/_sources/api/blark.util.get_source_code.rst.txt b/master/_sources/api/blark.util.get_source_code.rst.txt new file mode 100644 index 0000000..a0d0061 --- /dev/null +++ b/master/_sources/api/blark.util.get_source_code.rst.txt @@ -0,0 +1,6 @@ +blark.util.get\_source\_code +============================ + +.. currentmodule:: blark.util + +.. autofunction:: get_source_code \ No newline at end of file diff --git a/master/_sources/api/blark.util.indent_inner.rst.txt b/master/_sources/api/blark.util.indent_inner.rst.txt new file mode 100644 index 0000000..1fd1d3c --- /dev/null +++ b/master/_sources/api/blark.util.indent_inner.rst.txt @@ -0,0 +1,6 @@ +blark.util.indent\_inner +======================== + +.. currentmodule:: blark.util + +.. autofunction:: indent_inner \ No newline at end of file diff --git a/master/_sources/api/blark.util.maybe_add_brackets.rst.txt b/master/_sources/api/blark.util.maybe_add_brackets.rst.txt new file mode 100644 index 0000000..91680e0 --- /dev/null +++ b/master/_sources/api/blark.util.maybe_add_brackets.rst.txt @@ -0,0 +1,6 @@ +blark.util.maybe\_add\_brackets +=============================== + +.. currentmodule:: blark.util + +.. autofunction:: maybe_add_brackets \ No newline at end of file diff --git a/master/_sources/api/blark.util.python_debug_session.rst.txt b/master/_sources/api/blark.util.python_debug_session.rst.txt new file mode 100644 index 0000000..285f45a --- /dev/null +++ b/master/_sources/api/blark.util.python_debug_session.rst.txt @@ -0,0 +1,6 @@ +blark.util.python\_debug\_session +================================= + +.. currentmodule:: blark.util + +.. autofunction:: python_debug_session \ No newline at end of file diff --git a/master/_sources/api/blark.util.rebuild_lark_tree_with_line_map.rst.txt b/master/_sources/api/blark.util.rebuild_lark_tree_with_line_map.rst.txt new file mode 100644 index 0000000..c26a332 --- /dev/null +++ b/master/_sources/api/blark.util.rebuild_lark_tree_with_line_map.rst.txt @@ -0,0 +1,6 @@ +blark.util.rebuild\_lark\_tree\_with\_line\_map +=============================================== + +.. currentmodule:: blark.util + +.. autofunction:: rebuild_lark_tree_with_line_map \ No newline at end of file diff --git a/master/_sources/api/blark.util.recursively_remove_keys.rst.txt b/master/_sources/api/blark.util.recursively_remove_keys.rst.txt new file mode 100644 index 0000000..ac3c96d --- /dev/null +++ b/master/_sources/api/blark.util.recursively_remove_keys.rst.txt @@ -0,0 +1,6 @@ +blark.util.recursively\_remove\_keys +==================================== + +.. currentmodule:: blark.util + +.. autofunction:: recursively_remove_keys \ No newline at end of file diff --git a/master/_sources/api/blark.util.remove_all_comments.rst.txt b/master/_sources/api/blark.util.remove_all_comments.rst.txt new file mode 100644 index 0000000..b4a801c --- /dev/null +++ b/master/_sources/api/blark.util.remove_all_comments.rst.txt @@ -0,0 +1,6 @@ +blark.util.remove\_all\_comments +================================ + +.. currentmodule:: blark.util + +.. autofunction:: remove_all_comments \ No newline at end of file diff --git a/master/_sources/api/blark.util.remove_comment_characters.rst.txt b/master/_sources/api/blark.util.remove_comment_characters.rst.txt new file mode 100644 index 0000000..defb4ac --- /dev/null +++ b/master/_sources/api/blark.util.remove_comment_characters.rst.txt @@ -0,0 +1,6 @@ +blark.util.remove\_comment\_characters +====================================== + +.. currentmodule:: blark.util + +.. autofunction:: remove_comment_characters \ No newline at end of file diff --git a/master/_sources/api/blark.util.simplify_brackets.rst.txt b/master/_sources/api/blark.util.simplify_brackets.rst.txt new file mode 100644 index 0000000..8d11d60 --- /dev/null +++ b/master/_sources/api/blark.util.simplify_brackets.rst.txt @@ -0,0 +1,6 @@ +blark.util.simplify\_brackets +============================= + +.. currentmodule:: blark.util + +.. autofunction:: simplify_brackets \ No newline at end of file diff --git a/master/_sources/api/blark.util.tree_to_xml_source.rst.txt b/master/_sources/api/blark.util.tree_to_xml_source.rst.txt new file mode 100644 index 0000000..bdea5d3 --- /dev/null +++ b/master/_sources/api/blark.util.tree_to_xml_source.rst.txt @@ -0,0 +1,6 @@ +blark.util.tree\_to\_xml\_source +================================ + +.. currentmodule:: blark.util + +.. autofunction:: tree_to_xml_source \ No newline at end of file diff --git a/master/_sources/api/blark.util.try_paths.rst.txt b/master/_sources/api/blark.util.try_paths.rst.txt new file mode 100644 index 0000000..914f5c4 --- /dev/null +++ b/master/_sources/api/blark.util.try_paths.rst.txt @@ -0,0 +1,6 @@ +blark.util.try\_paths +===================== + +.. currentmodule:: blark.util + +.. autofunction:: try_paths \ No newline at end of file diff --git a/master/_sources/index.rst.txt b/master/_sources/index.rst.txt new file mode 100644 index 0000000..abce19a --- /dev/null +++ b/master/_sources/index.rst.txt @@ -0,0 +1,32 @@ +blark +===== + +.. toctree:: + :maxdepth: 2 + :caption: User documentation + + introduction.rst + sphinx.rst + + +.. toctree:: + :maxdepth: 2 + :caption: Developer documentation + + api.rst + +.. toctree:: + :maxdepth: 1 + :caption: Links + :hidden: + + GitHub Repository + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/master/_sources/introduction.rst.txt b/master/_sources/introduction.rst.txt new file mode 100644 index 0000000..a649f98 --- /dev/null +++ b/master/_sources/introduction.rst.txt @@ -0,0 +1,286 @@ +Introduction +############ + +The Grammar +----------- + +The `grammar `__ uses Lark’s Earley parser algorithm. + +The grammar itself is not perfect. It may not reliably parse your source +code or produce useful Python instances just yet. + +See `issues `__ for further +details. + +As a fun side project, blark isn’t at the top of my priority list. For +an idea of where the project is going, see the issues list. + +Requirements +------------ + +- `lark `__ (for grammar-based + parsing) +- `lxml `__ (for parsing TwinCAT + projects) + +Capabilities +------------ + +- TwinCAT source code file parsing (``*.TcPOU`` and others) +- TwinCAT project and solution loading +- ``lark.Tree`` generation of any supported source code +- Python dataclasses of supported source code, with introspection and + code refactoring + +Works-in-progress +~~~~~~~~~~~~~~~~~ + +- Sphinx API documentation generation (a new Sphinx domain) +- Code reformatting +- “Dependency store” - recursively parse and inspect project + dependencies +- Summary generation - a layer on top of dataclasses to summarize + source code details +- Rewriting source code directly in TwinCAT source code files + +Installation +------------ + +Installation is quick with Pip. + +.. code:: bash + + pip install --upgrade blark + +Quickstart (pip / virtualenv with venv) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Set up an environment using venv: + +.. code:: bash + + $ python -m venv blark_venv + $ source blark_venv/bin/activate + +2. Install the library with pip: + +.. code:: bash + + $ python -m pip install blark + +Quickstart (Conda) +~~~~~~~~~~~~~~~~~~ + +1. Set up an environment using conda: + +.. code:: bash + + $ conda create -n blark-env -c conda-forge python=3.10 pip blark + $ conda activate blark-env + +2. Install the library from conda: + +.. code:: bash + + $ conda install blark + +Development install +~~~~~~~~~~~~~~~~~~~ + +If you run into issues or wish to run an unreleased version of blark, +you may install directly from this repository like so: + +.. code:: bash + + $ python -m pip install git+https://github.com/klauer/blark + +Sample runs +----------- + +Run the parser or experimental formatter utility. Current supported file +types include those from TwinCAT3 projects ( ``.tsproj``, ``.sln``, +``.TcPOU``, ``.TcGVL``) and plain-text ``.st`` files. + +.. code:: bash + + $ blark parse --print-tree blark/tests/POUs/F_SetStateParams.TcPOU + function_declaration + None + F_SetStateParams + indirect_simple_specification + None + simple_specification BOOL + input_declarations + None + var1_init_decl + var1_list + ... (clipped) ... + +To interact with the Python dataclasses directly, make sure IPython is +installed first and then try: + +:: + + $ blark parse --interactive blark/tests/POUs/F_SetStateParams.TcPOU + # Assuming IPython is installed, the following prompt will come up: + + In [1]: results[0].identifier + Out[1]: 'F_SetStateParams/declaration' + + In [2]: results[1].identifier + Out[2]: 'F_SetStateParams/implementation' + +Dump out a parsed and reformatted set of source code: + +.. code:: bash + + $ blark format blark/tests/source/array_of_objects.st + {attribute 'hide'} + METHOD prv_Detection : BOOL + VAR_IN_OUT + currentChannel : ARRAY [APhase..CPhase] OF class_baseVector(SIZEOF(vector_t), 0); + END_VAR + END_METHOD + +blark supports rewriting TwinCAT source code files directly as well: + +.. code:: bash + + $ blark format blark/tests/POUs/F_SetStateParams.TcPOU + + + + `__ (GitHub fork +`here `__) and `A Syntactic +Specification for the Programming Languages of theIEC 61131-3 +Standard `__ +by Flor Narciso et al. Many aspects of the grammar have been added to, +modified, and in cases entirely rewritten to better support lark +grammars and transformers. + +Special thanks to the blark contributors: + +- @engineerjoe440 + +Related, Similar, or Alternative Projects +----------------------------------------- + +There are a number of similar, or related projects that are available. + +- `“MATIEC” `__ - another IEC + 61131-3 Structured Text parser which supports IEC 61131-3 second + edition, without classes, namespaces and other fancy features. An + updated version is also `available on + Github `__ +- `OpenPLC Runtime Version + 3 `__ - As stated by the + project: > OpenPLC is an open-source Programmable Logic Controller + that is based on easy to use software. Our focus is to provide a low + cost industrial solution for automation and research. OpenPLC has + been used in many research papers as a framework for industrial cyber + security research, given that it is the only controller to provide + the entire source code. +- `RuSTy `__ + `documentation `__ - + Structured text compiler written in Rust. As stated by the project: > + RuSTy is a structured text (ST) compiler written in Rust. RuSTy + utilizes the LLVM framework to compile eventually to native code. +- `IEC Checker `__ - Static + analysis tool for IEC 61131-3 logic. As described by the maintainer: + > iec-checker has the ability to parse ST source code and dump AST + and CFG to JSON format, so you can process it with your language of + choice. +- `TcBlack `__ - Python black-like + code formatter for TwinCAT code. diff --git a/master/_sources/sphinx.rst.txt b/master/_sources/sphinx.rst.txt new file mode 100644 index 0000000..c772ead --- /dev/null +++ b/master/_sources/sphinx.rst.txt @@ -0,0 +1,2 @@ +Sphinx API Docs +############### diff --git a/master/_static/_sphinx_javascript_frameworks_compat.js b/master/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 0000000..8141580 --- /dev/null +++ b/master/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,123 @@ +/* Compatability shim for jQuery and underscores.js. + * + * Copyright Sphinx contributors + * Released under the two clause BSD licence + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/master/_static/basic.css b/master/_static/basic.css new file mode 100644 index 0000000..30fee9d --- /dev/null +++ b/master/_static/basic.css @@ -0,0 +1,925 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/master/_static/css/badge_only.css b/master/_static/css/badge_only.css new file mode 100644 index 0000000..c718cee --- /dev/null +++ b/master/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/master/_static/css/fonts/Roboto-Slab-Bold.woff b/master/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 0000000..6cb6000 Binary files /dev/null and b/master/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/master/_static/css/fonts/Roboto-Slab-Bold.woff2 b/master/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 0000000..7059e23 Binary files /dev/null and b/master/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/master/_static/css/fonts/Roboto-Slab-Regular.woff b/master/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 0000000..f815f63 Binary files /dev/null and b/master/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/master/_static/css/fonts/Roboto-Slab-Regular.woff2 b/master/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 0000000..f2c76e5 Binary files /dev/null and b/master/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/master/_static/css/fonts/fontawesome-webfont.eot b/master/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..e9f60ca Binary files /dev/null and b/master/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/master/_static/css/fonts/fontawesome-webfont.svg b/master/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/master/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/master/_static/css/fonts/fontawesome-webfont.ttf b/master/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/master/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/master/_static/css/fonts/fontawesome-webfont.woff b/master/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..400014a Binary files /dev/null and b/master/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/master/_static/css/fonts/fontawesome-webfont.woff2 b/master/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..4d13fc6 Binary files /dev/null and b/master/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/master/_static/css/fonts/lato-bold-italic.woff b/master/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 0000000..88ad05b Binary files /dev/null and b/master/_static/css/fonts/lato-bold-italic.woff differ diff --git a/master/_static/css/fonts/lato-bold-italic.woff2 b/master/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 0000000..c4e3d80 Binary files /dev/null and b/master/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/master/_static/css/fonts/lato-bold.woff b/master/_static/css/fonts/lato-bold.woff new file mode 100644 index 0000000..c6dff51 Binary files /dev/null and b/master/_static/css/fonts/lato-bold.woff differ diff --git a/master/_static/css/fonts/lato-bold.woff2 b/master/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 0000000..bb19504 Binary files /dev/null and b/master/_static/css/fonts/lato-bold.woff2 differ diff --git a/master/_static/css/fonts/lato-normal-italic.woff b/master/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 0000000..76114bc Binary files /dev/null and b/master/_static/css/fonts/lato-normal-italic.woff differ diff --git a/master/_static/css/fonts/lato-normal-italic.woff2 b/master/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 0000000..3404f37 Binary files /dev/null and b/master/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/master/_static/css/fonts/lato-normal.woff b/master/_static/css/fonts/lato-normal.woff new file mode 100644 index 0000000..ae1307f Binary files /dev/null and b/master/_static/css/fonts/lato-normal.woff differ diff --git a/master/_static/css/fonts/lato-normal.woff2 b/master/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 0000000..3bf9843 Binary files /dev/null and b/master/_static/css/fonts/lato-normal.woff2 differ diff --git a/master/_static/css/theme.css b/master/_static/css/theme.css new file mode 100644 index 0000000..19a446a --- /dev/null +++ b/master/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel,.rst-content .menuselection{font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .guilabel,.rst-content .menuselection{border:1px solid #7fbbe3;background:#e7f2fa}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/master/_static/docs-versions-menu.js b/master/_static/docs-versions-menu.js new file mode 100644 index 0000000..696095a --- /dev/null +++ b/master/_static/docs-versions-menu.js @@ -0,0 +1,148 @@ +"use strict"; + +function getGhPagesCurrentFolder() { + // Extract version folder under the assumpgion that the URL is of the form + // https://.github.io///... + if (window.location.hostname.includes("github.io")){ + return window.location.pathname.split('/')[2]; + } +} + +function getRootUrl() { + // Return the "root" URL, i.e. everything before the current folder + // (getGhPagesCurrentFolder). On gh-pages, this includes the project name. + var root_url = window.location.origin; + if (window.location.hostname.includes("github.io")){ + root_url = root_url + '/' + window.location.pathname.split('/')[1]; + } + return root_url; +} + +function getGithubProjectUrl(){ + // Return the project url on Github, under the assumption that the current + // page is hosted on github-pages (https://.github.io//) + var root_url = getRootUrl(); + var match = root_url.match(/([\w\d-]+)\.github\.io\/([\w\d-]+)/) + if (match !== null){ + var username = match[1]; + var projectname = match[2]; + return "https://github.com/" + username + "/" + projectname; + } else { + return null + } +} + +function _addVersionsMenu(version_data) { + // The menu was reverse-engineered from the RTD websites, so it's very + // specific to the sphinx_rtd_theme + var folders = version_data["versions"]; + var root_url = getRootUrl(); + var current_url = document.URL; + var current_folder = getGhPagesCurrentFolder(); + if (current_folder === undefined) return; + var current_version = version_data["labels"][current_folder]; + var menu = document.createElement('div'); + menu.setAttribute('class', 'rst-versions'); + menu.setAttribute('data-toggle', 'rst-versions'); + menu.setAttribute('role', 'note'); + menu.setAttribute('aria-label', 'versions'); + var inner_html = + "" + + " Docs " + + "" + current_version + " " + + "" + + "" + + "
" + + "
" + + "
" + + "
Versions
"; + var i; + for (i in folders) { + var folder = folders[i]; + if (folder == current_folder){ + var inner_html = inner_html + "
" + current_version + "
"; + } else { + var inner_html = inner_html + "
" + version_data["labels"][folder] + "
"; + } + } + var downloads = version_data["downloads"][current_folder]; + if (downloads.length > 0){ + var inner_html = inner_html + + "
Downloads
"; + for (i in downloads) { + var download_label = downloads[i][0]; + var download_url = downloads[i][1]; + if (!(/^(https?|ftp):/.test(download_url))){ + if (!download_url.startsWith('/')){ + var download_url = '/' + download_url; + } + var download_url = root_url + download_url; + } + var inner_html = inner_html + "
" + + download_label + "
"; + } + } + var github_project_url = getGithubProjectUrl(); + if (github_project_url !== null && github_project_url.length > 0){ + var inner_html = inner_html + + "
On Github
" + + "
Project Home
" + + "
Issues
"; + } + var inner_html = inner_html + + "
" + + "
" + + "Generated by Docs Versions Menu" + + "" + + "
" + + "
"; + menu.innerHTML = inner_html; + var parent = document.body; + parent.insertBefore(menu, parent.lastChild); + + // Add a warning banner for dev/outdated versions + var warning; + var msg; + if (version_data["warnings"][current_folder].indexOf("outdated") >=0){ + warning = document.createElement('div'); + warning.setAttribute('class', 'admonition danger'); + msg = "This document is for an outdated version."; + } else if (version_data["warnings"][current_folder].indexOf("unreleased") >=0){ + warning = document.createElement('div'); + warning.setAttribute('class', 'admonition danger'); + msg = "This document is for an unreleased development version."; + } else if (version_data["warnings"][current_folder].indexOf("prereleased") >=0){ + warning = document.createElement('div'); + warning.setAttribute('class', 'admonition danger'); + msg = "This document is for a pre-release development version."; + } + if (warning !== undefined){ + if (version_data["latest"] !== null){ + msg = msg + " Documentation is available for the " + "latest public release." + } + warning.innerHTML = "

Note

" + + "

" + msg + "

"; + var parent = document.querySelector('div.body') + || document.querySelector('div.document') + || document.body; + parent.insertBefore(warning, parent.firstChild); + } + + +} + +function addVersionsMenu() { + // We assume that we can load versions.json from + // https://.github.io//versions.json + // That is, there's a path between the hostname and versions.json + var json_file = "/" + window.location.pathname.split("/")[1] + "/versions.json"; + $.getJSON(json_file, _addVersionsMenu); +} + +document.addEventListener('DOMContentLoaded', addVersionsMenu); \ No newline at end of file diff --git a/master/_static/doctools.js b/master/_static/doctools.js new file mode 100644 index 0000000..d06a71d --- /dev/null +++ b/master/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/master/_static/documentation_options.js b/master/_static/documentation_options.js new file mode 100644 index 0000000..7e4c114 --- /dev/null +++ b/master/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/master/_static/file.png b/master/_static/file.png new file mode 100644 index 0000000..a858a41 Binary files /dev/null and b/master/_static/file.png differ diff --git a/master/_static/graphviz.css b/master/_static/graphviz.css new file mode 100644 index 0000000..8d81c02 --- /dev/null +++ b/master/_static/graphviz.css @@ -0,0 +1,19 @@ +/* + * graphviz.css + * ~~~~~~~~~~~~ + * + * Sphinx stylesheet -- graphviz extension. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +img.graphviz { + border: 0; + max-width: 100%; +} + +object.graphviz { + max-width: 100%; +} diff --git a/master/_static/jquery.js b/master/_static/jquery.js new file mode 100644 index 0000000..c4c6022 --- /dev/null +++ b/master/_static/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/master/_static/js/html5shiv.min.js b/master/_static/js/html5shiv.min.js new file mode 100644 index 0000000..cd1c674 --- /dev/null +++ b/master/_static/js/html5shiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/master/_static/js/theme.js b/master/_static/js/theme.js new file mode 100644 index 0000000..1fddb6e --- /dev/null +++ b/master/_static/js/theme.js @@ -0,0 +1 @@ +!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/master/_static/minus.png b/master/_static/minus.png new file mode 100644 index 0000000..d96755f Binary files /dev/null and b/master/_static/minus.png differ diff --git a/master/_static/plus.png b/master/_static/plus.png new file mode 100644 index 0000000..7107cec Binary files /dev/null and b/master/_static/plus.png differ diff --git a/master/_static/pygments.css b/master/_static/pygments.css new file mode 100644 index 0000000..0d49244 --- /dev/null +++ b/master/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeffcc; } +.highlight .c { color: #408090; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #333333 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #208050 } /* Literal.Number */ +.highlight .s { color: #4070a0 } /* Literal.String */ +.highlight .na { color: #4070a0 } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60add5 } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287e } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #bb60d5 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #208050 } /* Literal.Number.Bin */ +.highlight .mf { color: #208050 } /* Literal.Number.Float */ +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ +.highlight .mi { color: #208050 } /* Literal.Number.Integer */ +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ +.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070a0 } /* Literal.String.Char */ +.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ +.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #c65d09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #06287e } /* Name.Function.Magic */ +.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ +.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ +.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/master/_static/searchtools.js b/master/_static/searchtools.js new file mode 100644 index 0000000..7918c3f --- /dev/null +++ b/master/_static/searchtools.js @@ -0,0 +1,574 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms) + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent !== undefined) return docContent.textContent; + console.warn( + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + // array of [docname, title, anchor, descr, score, filename] + let results = []; + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + results.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // lookup as object + objectTerms.forEach((term) => + results.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); + + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + results = results.reverse(); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/master/_static/sphinx_highlight.js b/master/_static/sphinx_highlight.js new file mode 100644 index 0000000..8a96c69 --- /dev/null +++ b/master/_static/sphinx_highlight.js @@ -0,0 +1,154 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore( + span, + parent.insertBefore( + rest, + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/master/api.html b/master/api.html new file mode 100644 index 0000000..429a964 --- /dev/null +++ b/master/api.html @@ -0,0 +1,1500 @@ + + + + + + + API — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

API

+
+

blark.apischema_compat

+ + + + + + + + + + + + + + + + + + +

blark.apischema_compat.alternative_constructor(func)

Alternative constructor for a given type.

blark.apischema_compat.as_tagged_union(cls)

Tagged union decorator, to be used on base class.

blark.apischema_compat.get_all_subclasses(cls)

Recursive implementation of type.__subclasses__

blark.apischema_compat.token_deserializer(parts)

blark.apischema_compat.token_serializer(token)

+
+
+

blark.config

+
+
+

blark.dependency_store

+ + + + + + + + + + + + + + + + + + + + + +

blark.dependency_store.DependencyStore(root)

A storage container for dependency configuration and loading.

blark.dependency_store.DependencyStoreConfig(...)

Dependency store configuration, from config.json.

blark.dependency_store.DependencyStoreLibrary(...)

blark.dependency_store.PlcProjectMetadata(...)

This is a per-PLC project metadata container.

blark.dependency_store.get_dependency_store()

Get the global DependencyStore instance.

blark.dependency_store.load_projects(*projects)

Load the given projects by filename.

+
+
+

blark.format

+ + + + + + + + + + + + + + + + + + + + + + + + +

blark.format.build_arg_parser([argparser])

blark.format.determine_output_filename(...)

Get an output filename based on the input filename and destination path.

blark.format.dump_source_to_console(source)

Output the given source to the console.

blark.format.get_reformatted_code_blocks(results)

For each parsed code block, generate an OutputBlock for writing to disk.

blark.format.main(filename[, verbose, ...])

blark.format.reformat_code(code)

Reformat the code with the provided settings.

blark.format.write_source_to_file(filename, ...)

Write source code to the given file.

+
+
+

blark.html

+ + + + + + + + + + + + + + + +

blark.html.HighlighterAnnotation(name, ...)

A single HTML tag annotation which applies to a position range of source code.

blark.html.HtmlWriter(user, source_filename, ...)

blark.html.apply_annotations_to_code(code, ...)

blark.html.get_annotations(tree)

Get annotations for syntax elements in the given parse tree.

+
+
+

blark.input

+ + + + + + + + + + + + + + + + + + + + + +

blark.input.BlarkCompositeSourceItem(...[, user])

blark.input.BlarkSourceItem(identifier, ...)

blark.input.BlarkSourceLine(filename, ...)

blark.input.UnsupportedFileFormatError

blark.input.load_file_by_name(filename[, ...])

Load a file using blark's file input handlers.

blark.input.register_input_handler(...)

+
+
+

blark.main

+ + + + + + +

blark.main.main()

+
+
+

blark.output

+ + + + + + + + + + + + +

blark.output.OutputBlock(code, metadata, origin)

blark.output.get_handler_by_name(name)

blark.output.register_output_handler(name, ...)

+
+
+

blark.parse

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

blark.parse.BlarkStartingRule(value)

An enumeration.

blark.parse.ParseResult(source_code, item, ...)

blark.parse.build_arg_parser([argparser])

blark.parse.dump_json(type_, obj[, ...])

Dump object obj as type type_ with apischema and serialize to a string.

blark.parse.get_parser()

Get a cached lark.Lark parser for TwinCAT flavor IEC61131-3 code.

blark.parse.main(filename[, verbose, debug, ...])

Parse the given source code/project.

blark.parse.new_parser([start])

Get a new parser for TwinCAT flavor IEC61131-3 code.

blark.parse.parse(path[, input_format])

Parse the given source code file (or all files from the given project).

blark.parse.parse_item(item, **kwargs)

blark.parse.parse_project(tsproj_project, ...)

Parse an entire tsproj project file.

blark.parse.parse_single_file(fn, **kwargs)

Parse a single source code file.

blark.parse.parse_source_code(source_code, *)

Parse source code into a ParseResult.

blark.parse.summarize(parsed[, squash])

Get a code summary instance from one or more ParseResult instances.

+
+
+

blark.plain

+ + + + + + +

blark.plain.PlainFileLoader(filename, ...)

+
+
+

blark.solution

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

blark.solution.DependencyInformation(name[, ...])

blark.solution.DependencyVersion(name, ...)

blark.solution.LocatedString(filename[, ...])

blark.solution.Project(name, saved_path, ...)

A stub container for a TwinCAT project (.tsproj) file.

blark.solution.Solution(root, projects[, ...])

A container for a TwinCAT/Visual Studio solution (.sln).

blark.solution.SolutionLoaderError

Solution loader-related exception base class.

blark.solution.TcAction(name, guid, decl, ...)

blark.solution.TcDUT(name, guid, decl, ...)

blark.solution.TcDeclImpl(identifier, ...[, ...])

blark.solution.TcExtraInfo(metadata, xml, parent)

Extra information in the project XML such as Line IDs.

blark.solution.TcGVL(name, guid, decl, ...)

blark.solution.TcIO(name, guid, decl, ...)

TcIO file - for INTERFACE definitions.

blark.solution.TcMethod(name, guid, decl, ...)

blark.solution.TcPOU(name, guid, decl, ...)

blark.solution.TcProperty(name, guid, decl, ...)

blark.solution.TcSource(name, guid, decl, ...)

blark.solution.TcSourceChild(name, guid, ...)

blark.solution.TcTTO(name, guid, decl, ...)

blark.solution.TcUnknownXml(xml, parent)

A currently unsupported block of XML in the project.

blark.solution.TwincatPlcProject(guid, ...)

A TwinCAT PLC project.

blark.solution.TwincatSourceCodeItem(...[, ...])

A wrapper for all TwinCAT project source code files.

blark.solution.TwincatTsProject(guid, netid, ...)

Container for a loaded TwinCAT tsproj project.

blark.solution.UnsupportedSourceFileError(msg)

Unsupported project file.

blark.solution.filename_from_xml(xml)

blark.solution.get_blark_input_from_solution(...)

Get all blark input from the given solution.

blark.solution.get_child_located_text(xml, tag)

blark.solution.get_child_text(xml, tag[, ...])

blark.solution.get_code_object_from_xml(xml)

blark.solution.get_project_guid(element)

Get a project target GUID from its xml.

blark.solution.get_project_target_netid(element)

Get a project target AMS Net ID from its xml.

blark.solution.get_tcplc_from_xml(xml)

blark.solution.make_solution_from_files(filename)

From a TwinCAT solution (.sln) or .tsproj, get a Solution instance.

blark.solution.parse_xml_contents(contents)

Parse the given XML contents with lxml.etree.

blark.solution.parse_xml_file(fn)

Parse a given XML file with lxml.etree.parse.

blark.solution.project_loader(filename)

Load a TwinCAT project (.tsproj) file.

blark.solution.projects_from_solution_source(...)

Find project filenames from the contents of a solution.

blark.solution.solution_loader(filename)

Load a TwinCAT solution (.sln) file.

blark.solution.split_property_and_base_decl(code)

blark.solution.strip_implicit_lines(code, ...)

Strip off (e.g.) END_FUNCTION_BLOCK the provided code.

blark.solution.strip_xml_namespace(tag)

Strip off {{namespace}} from: {{namespace}}tag.

blark.solution.twincat_file_loader(filename)

Load a single TwinCAT file based on its extension.

blark.solution.twincat_file_writer(user, ...)

Write source code

+
+
+

blark.sphinxdomain

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

blark.sphinxdomain.BlarkDirective(name, ...)

blark.sphinxdomain.BlarkDirectiveWithDeclarations(...)

blark.sphinxdomain.BlarkDomain(env)

Blark IEC61131-3 language domain.

blark.sphinxdomain.BlarkSphinxCache(cache)

blark.sphinxdomain.BlarkXRefRole([...])

blark.sphinxdomain.DeclarationDirective(...)

blark.sphinxdomain.FunctionBlockDirective(...)

blark.sphinxdomain.FunctionDirective(name, ...)

blark.sphinxdomain.GvlDirective(name, ...)

blark.sphinxdomain.MissingDeclaration(name)

blark.sphinxdomain.ProgramDirective(name, ...)

blark.sphinxdomain.TypeDirective(name, ...)

blark.sphinxdomain.VariableBlockDirective(...)

blark.sphinxdomain.declaration_to_content(obj)

blark.sphinxdomain.declaration_to_signature(...)

blark.sphinxdomain.declarations_to_block(...)

blark.sphinxdomain.setup(app)

+
+
+

blark.summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

blark.summary.ActionSummary(comments, ...[, ...])

Summary representation of a single action.

blark.summary.CodeSummary(functions, ...)

Summary representation of a set of code - functions, function blocks, etc.

blark.summary.DataTypeSummary(comments, ...)

Summary representation of a single data type.

blark.summary.DeclarationSummary(comments, ...)

Summary representation of a single declaration.

blark.summary.FunctionBlockSummary(comments, ...)

Summary representation of a single function block.

blark.summary.FunctionSummary(comments, ...)

Summary representation of a single function.

blark.summary.GlobalVariableSummary(...)

Summary representation of a VAR_GLOBAL block.

blark.summary.InterfaceSummary(comments, ...)

Summary representation of an Interfae.

blark.summary.LinkableItems(input, output, ...)

A summary of linkable (located) declarations.

blark.summary.MethodSummary(comments, ...)

Summary representation of a single method.

blark.summary.ProgramSummary(comments, ...)

Summary representation of a single program.

blark.summary.PropertyGetSetSummary(...)

blark.summary.PropertySummary(comments, ...)

Summary representation of a single property.

blark.summary.Summary(comments, pragmas, ...)

Base class for summary objects.

blark.summary.get_linkable_declarations(...)

Get all located/linkable declarations.

blark.summary.path_to_file_and_line(path)

Get the file/line number context for the summary items.

blark.summary.text_outline(item)

Get a generic multiline string representation of the given object.

+
+
+

blark.transform

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

blark.transform.AccessDeclaration(name, ...)

A single, named program access declaration.

blark.transform.AccessDeclarations(items[, meta])

A block of named, program access variable declarations (VAR_ACCESS).

blark.transform.AccessSpecifier(value)

An enumeration.

blark.transform.Action(name, body[, meta])

A full, named action declaration.

blark.transform.ArrayInitialElement(element)

Initial value for an array element (potentialy repeated).

blark.transform.ArrayInitialization(elements)

Array initialization (bare or bracketed).

blark.transform.ArraySpecification(...[, meta])

An array specification.

blark.transform.ArrayTypeDeclaration(name, init)

Full declaration of an array type.

blark.transform.ArrayTypeInitialization(...)

Array specification and optional default (initialization) value.

blark.transform.ArrayVariableInitDeclaration(...)

A declaration of one or more variables with array type initialization and optional default (initialization) value.

blark.transform.AssignmentStatement(...[, meta])

An assignment statement.

blark.transform.BinaryBitString(type_name, value)

Binary bit string literal value.

blark.transform.BinaryInteger(value[, ...])

blark.transform.BinaryOperation(left, op, right)

A binary (i.e., two operand) operation.

blark.transform.BitString(type_name, value)

Bit string literal value.

blark.transform.Boolean(value[, meta])

Boolean literal value.

blark.transform.BracketedExpression(expression)

An expression with square brackets around it.

blark.transform.CaseElement(matches, statements)

A single element of a CASE statement block.

blark.transform.CaseStatement(expression, ...)

A switch-like CASE statement block.

blark.transform.ChainedFunctionCall(invocations)

A set of chained function (function block, method, action, etc.) calls.

blark.transform.ChainedFunctionCallStatement(...)

A chained set of function calls as a statement, in a "fluent" style.

blark.transform.ContinueStatement([meta])

A statement used to jump to the top of a loop, CONTINUE.

blark.transform.DataType(indirection, type_name)

A non-generic type name, or a data type name.

blark.transform.DataTypeDeclaration(...[, meta])

A data type declaration, wrapping the other declaration types with TYPE/END_TYPE.

blark.transform.Date(year, month, day[, meta])

Date literal value.

blark.transform.DateTime(date, time[, meta])

Date and time literal value.

blark.transform.DeclaredVariable(variable, ...)

A single declared variable name and optional [direct or incomplete] location.

blark.transform.DirectVariable(...[, bits, meta])

Direct variables with I/O linkage.

blark.transform.Duration([days, hours, ...])

Duration literal value.

blark.transform.EdgeDeclaration(variables, edge)

An edge declaration of one or more variables.

blark.transform.ElseClause(statements[, meta])

The ELSE part of an IF/ELSIF/ELSE/END_IF block.

blark.transform.ElseIfClause(if_expression, ...)

The else-if ELSIF part of an IF/ELSIF/ELSE/END_IF block.

blark.transform.EnumeratedSpecification(...)

An enumerated specification.

blark.transform.EnumeratedTypeDeclaration(...)

An enumerated type declaration.

blark.transform.EnumeratedTypeInitialization(...)

Enumerated specification with initialization enumerated value.

blark.transform.EnumeratedValue(type_name, ...)

An enumerated value.

blark.transform.ExitStatement([meta])

A statement used to exit a loop, EXIT.

blark.transform.Expression()

Base class for all types of expressions.

blark.transform.ExtendedSourceCode(items[, ...])

Top-level source code item - extended to include the possibility of standalone implementation details (i.e., statement lists).

blark.transform.Extends(name[, meta])

The "EXTENDS" portion of a function block, interface, structure, etc.

blark.transform.ExternalVariableDeclaration(...)

A named, external variable declaration inside a variable block.

blark.transform.ExternalVariableDeclarations(...)

A block of named, external variable declarations (VAR_EXTERNAL).

blark.transform.FieldSelector(field, ...[, meta])

Field - or attribute - selector as part of a multi-element variable.

blark.transform.ForStatement(control, from_, ...)

A loop with a control variable and a start, stop, and (optional) step value.

blark.transform.FormatSettings([indent])

blark.transform.FullSubrange([meta])

A full subrange (i.e., asterisk *).

blark.transform.Function(access, name, ...)

A full function block type declaration, with nested variable declaration blocks.

blark.transform.FunctionBlock(name, access, ...)

A full function block type declaration.

blark.transform.FunctionBlockDeclaration()

Base class for declarations of variables using function blocks.

blark.transform.FunctionBlockInvocationDeclaration(...)

Base class for declarations of variables using function blocks by invocation.

blark.transform.FunctionBlockNameDeclaration(...)

Base class for declarations of variables using function blocks by name.

blark.transform.FunctionCall(name, ...[, meta])

A function (function block, method, action, etc.) call.

blark.transform.FunctionCallStatement(name, ...)

A function (function block, method, action, etc.) call as a statement.

blark.transform.FunctionVariableDeclarations(...)

blark.transform.GlobalVariableAttributes(value)

An enumeration.

blark.transform.GlobalVariableDeclaration(...)

A declaration of one or more global variables: name and location specification and initialization type.

blark.transform.GlobalVariableDeclarations(...)

Global variable declarations block (VAR_GLOBAL).

blark.transform.GlobalVariableSpec(...[, meta])

Global variable specification; the part that comes before the initialization.

blark.transform.GrammarTransformer([...])

Grammar transformer which takes lark objects and makes a SourceCode.

blark.transform.HexBitString(type_name, value)

Hex bit string literal value.

blark.transform.HexInteger(value[, ...])

blark.transform.IfStatement(if_expression, ...)

The IF part of an IF/ELSIF/ELSE/END_IF block.

blark.transform.Implements(interfaces[, meta])

The "IMPLEMENTS" portion of a function block, indicating it implements one or more interfaces.

blark.transform.IncompleteLocatedVariableDeclaration(...)

A named, incomplete located variable declaration inside a variable block.

blark.transform.IncompleteLocatedVariableDeclarations(...)

Incomplete located variable declarations block (VAR).

blark.transform.IncompleteLocation(value)

Incomplete location information.

blark.transform.IndirectSimpleSpecification(...)

A simple specification with the possibility of indirection.

blark.transform.IndirectionType(...[, meta])

Indirect access through a pointer or reference.

blark.transform.InitDeclaration()

Base class for a declaration of one or more variables with a type initialization.

blark.transform.InitializedStructure(name, init)

A named initialized structure.

blark.transform.InputDeclarations(attrs, items)

A block of named, input variable declarations (VAR_INPUT).

blark.transform.InputOutputDeclarations(...)

A block of named, input/output variable declarations (VAR_IN_OUT).

blark.transform.InputParameterAssignment(...)

An input parameter in a function call.

blark.transform.Integer(value[, type_name, meta])

Integer literal value.

blark.transform.Interface(name, extends, ...)

A full interface declaration, with nested variable declaration blocks.

blark.transform.JumpStatement(label[, meta])

This is the "goto"-style JMP, which points at a label.

blark.transform.LabeledStatement(label[, ...])

A statement marked with a user-defined label.

blark.transform.Ldate(year, month, day[, meta])

Long date literal value.

blark.transform.LdateTime(ldate, ltime[, meta])

Long date and time literal value.

blark.transform.Lduration([days, hours, ...])

Long duration literal value.

blark.transform.Literal()

Base class for all literal values.

blark.transform.LocatedVariableDeclaration(...)

Declaration of a variable in a VAR block that is located.

blark.transform.LocatedVariableDeclarations(...)

Located variable declarations block (VAR).

blark.transform.Location(location_prefix, ...)

A located direct variable.

blark.transform.LtimeOfDay(hour, minute[, ...])

Long time of day literal value.

blark.transform.Meta(empty, column, ...)

Lark-derived meta information in the form of a dataclass.

blark.transform.Method(access, name, ...[, meta])

A full, named method declaration.

blark.transform.MethodInstanceVariableDeclarations(...)

Declarations block for instance variables in methods (VAR_INST).

blark.transform.MultiElementVariable(name, ...)

A multi-element variable - with one or more subscripts and fields.

blark.transform.NoOpStatement(variable[, meta])

A no-operation statement referring to a variable and nothing else.

blark.transform.ObjectInitializerArray(name, ...)

Object initialization in array form.

blark.transform.OctalBitString(type_name, value)

Octal bit string literal value.

blark.transform.OctalInteger(value[, ...])

blark.transform.OutputDeclarations(attrs, items)

A block of named, output variable declarations (VAR_OUTPUT).

blark.transform.OutputParameterAssignment(...)

A named output parameter, which may be inverted.

blark.transform.ParameterAssignment()

Base class for assigned parameters in function calls.

blark.transform.ParenthesizedExpression(expr)

An expression with parentheses around it.

blark.transform.PartialSubrange(start, stop)

A partial subrange, including a start/stop element index.

blark.transform.Program(name, declarations, body)

A full program declaration, with nested variable declaration blocks.

blark.transform.Property(access, name, ...)

A named property declaration, which may pertain to a get or set.

blark.transform.Real(value[, type_name, meta])

Floating point (real) literal value.

blark.transform.ReferenceAssignmentStatement(...)

A reference assignment statement.

blark.transform.RepeatStatement(statements, ...)

An ending conditional loop statement, REPEAT.

blark.transform.ResetStatement(variable, op, ...)

A "reset" statement which conditionally clears a variable to FALSE.

blark.transform.ReturnStatement([meta])

A statement used to return from a function [block], RETURN.

blark.transform.SetStatement(variable, op, ...)

A "set" statement which conditionally sets a variable to TRUE.

blark.transform.SimpleSpecification(type[, meta])

A simple specification with just a type name (or a string type name).

blark.transform.SimpleTypeDeclaration(name, ...)

A declaration of a simple type.

blark.transform.SimpleVariable(name, ...[, meta])

A simple, single-element variable.

blark.transform.SourceCode(items[, ...])

Top-level source code item.

blark.transform.Statement()

Base class for all statements in a structured text implementation section.

blark.transform.StatementList(statements[, meta])

A list of statements, making up a structured text implementation.

blark.transform.StaticDeclarations(attrs, items)

Static variable declarations block (VAR_STAT).

blark.transform.String(value[, meta])

String literal value.

blark.transform.StringSpecLength(length)

The length of a defined string.

blark.transform.StringTypeDeclaration(name, ...)

A string type declaration.

blark.transform.StringTypeInitialization(...)

Single or double-byte string specification.

blark.transform.StringTypeSpecification(...)

Specification of a string type.

blark.transform.StringVariableInitDeclaration(...)

A declaration of one or more variables using single/double byte strings, with an optinoal initialization value.

blark.transform.StructureElementDeclaration(...)

Declaration of a single element of a structure.

blark.transform.StructureElementInitialization(...)

An initialization (default) value for a structure element.

blark.transform.StructureInitialization(elements)

A structure initialization (i.e., default values) of one or more elements.

blark.transform.StructureTypeDeclaration(...)

Full structure type declaration, as part of a TYPE.

blark.transform.StructuredVariableInitDeclaration(...)

A declaration of one or more variables using a named initialized structure.

blark.transform.Subrange()

Subrange base class.

blark.transform.SubrangeSpecification(type_name)

A subrange specification.

blark.transform.SubrangeTypeDeclaration(...)

A subrange type declaration.

blark.transform.SubrangeTypeInitialization(...)

A subrange type initialization.

blark.transform.SubscriptList(subscripts, ...)

A list of subscripts.

blark.transform.TemporaryVariableDeclarations(items)

Temporary variable declarations block (VAR_TEMP).

blark.transform.TimeOfDay(hour, minute[, ...])

Time of day literal value.

blark.transform.TypeInformation(...)

Type information derived from a specification or initialization.

blark.transform.TypeInitialization(spec, value)

A simple initialization specification of a type name.

blark.transform.TypeInitializationBase()

Base class for type initializations.

blark.transform.TypeSpecificationBase()

Base class for a specification of a type.

blark.transform.UnaryOperation(op, expr[, meta])

A unary - single operand - operation: NOT, -, or +.

blark.transform.UnionElementDeclaration(...)

Declaration of a single element of a union.

blark.transform.UnionTypeDeclaration(name, ...)

A full declaration of a UNION type, as part of a TYPE/END_TYPE block.

blark.transform.UnresolvedTypeInformation(...)

blark.transform.Variable()

Variable base class.

blark.transform.VariableAttributes(value)

An enumeration.

blark.transform.VariableDeclarationBlock()

Base class for variable declaration blocks.

blark.transform.VariableDeclarations(attrs, ...)

Variable declarations block (VAR).

blark.transform.VariableLocationPrefix(value)

An enumeration.

blark.transform.VariableOneInitDeclaration(...)

A declaration of one or more variables with a type, subrange, or enumerated type initialization.

blark.transform.VariableSizePrefix(value)

Size prefix, used in locations (e.g., %IX1.1 has a bit prefix).

blark.transform.WhileStatement(expression, ...)

A beginning conditional loop statement, WHILE.

blark.transform._ArrayInitialElementCount()

An internal handler for array initial elements with repeat count values.

blark.transform._BareArrayInitialization()

Internal handler for array initialization, without brackets

blark.transform._BracketedArrayInitialization()

Internal handler for array initialization with brackets.

blark.transform._FlagHelper()

A helper base class which translates tokens to enum.Flag instances.

blark.transform._GenericInit(base_type_name, ...)

API compat to give a valid init attribute.

blark.transform.configure_formatting(settings)

Override the default code formatting settings.

blark.transform.get_grammar_for_class(cls)

Given a class, get blark's iec.lark associated grammar definition(s).

blark.transform.indent(value[, prefix])

Stringified and indented {value}.

blark.transform.indent_if(value[, prefix])

Stringified and indented {value} if not None.

blark.transform.join_if(value1, delimiter, ...)

'{value1}{delimiter}{value2} if value1 and value2, otherwise just {value1} or {value2}.

blark.transform.merge_comments(source, comments)

Take the transformed tree and annotate comments back into meta information.

blark.transform.meta_field()

Create the Meta field for the dataclass magic.

blark.transform.multiline_code_block(block)

Multiline code block with lax beginning/end newlines.

blark.transform.transform(source_code, tree)

Transform a lark.Tree into dataclasses.

+
+
+

blark.typing

+ + + + + + + + + + + + + + + +

blark.typing.ContainsBlarkCode(*args, **kwargs)

Indicates that the given class can emit blark-compatible source items.

blark.typing.SupportsRewrite(*args, **kwargs)

blark.typing.SupportsSaveToPath(*args, **kwargs)

blark.typing.SupportsWrite(*args, **kwargs)

+
+
+

blark.util

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

blark.util.Identifier(parts[, decl_impl])

A blark convention for giving portions of code unique names.

blark.util.SourceType(value)

An enumeration.

blark.util.find_and_clean_comments(text, *)

Clean nested multiline comments from text.

blark.util.find_pou_type_and_identifier(code)

blark.util.fix_case_insensitive_path(path)

Match a path in a case-insensitive manner.

blark.util.get_file_sha256(filename)

Hash a file's contents with the SHA-256 algorithm.

blark.util.get_grammar_for_rule(rule)

Get the lark grammar source for the provided rule.

blark.util.get_grammar_source()

blark.util.get_source_code(fn, *[, encoding])

Get source code from the given file.

blark.util.indent_inner(text, prefix)

Indent the inner lines of text (not first and last) with prefix.

blark.util.maybe_add_brackets(text[, brackets])

Add brackets to text if there are no enclosing brackets.

blark.util.python_debug_session(namespace, ...)

Enter an interactive debug session with pdb or IPython, if available.

blark.util.rebuild_lark_tree_with_line_map(...)

Rebuild a given lark tree, adjusting line numbers to match up with the source.

blark.util.recursively_remove_keys(obj, keys)

Remove the provided keys from the JSON object.

blark.util.remove_all_comments(text, *[, ...])

Remove all comments and replace them with the provided character.

blark.util.remove_comment_characters(text)

Take only the inner contents of a given comment.

blark.util.simplify_brackets(text[, brackets])

Simplify repeated brackets/parentheses in text.

blark.util.tree_to_xml_source(tree[, ...])

Return the contents to write for the given XML tree.

blark.util.try_paths(paths)

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.apischema_compat.alternative_constructor.html b/master/api/blark.apischema_compat.alternative_constructor.html new file mode 100644 index 0000000..7ab2b03 --- /dev/null +++ b/master/api/blark.apischema_compat.alternative_constructor.html @@ -0,0 +1,155 @@ + + + + + + + blark.apischema_compat.alternative_constructor — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.apischema_compat.alternative_constructor

+
+
+blark.apischema_compat.alternative_constructor(func: Func) Func[source]
+

Alternative constructor for a given type.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.apischema_compat.as_tagged_union.html b/master/api/blark.apischema_compat.as_tagged_union.html new file mode 100644 index 0000000..89affea --- /dev/null +++ b/master/api/blark.apischema_compat.as_tagged_union.html @@ -0,0 +1,157 @@ + + + + + + + blark.apischema_compat.as_tagged_union — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.apischema_compat.as_tagged_union

+
+
+blark.apischema_compat.as_tagged_union(cls: Cls) Cls[source]
+

Tagged union decorator, to be used on base class.

+

Supports generics as well, with names generated by way of +_get_generic_name_factory.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.apischema_compat.get_all_subclasses.html b/master/api/blark.apischema_compat.get_all_subclasses.html new file mode 100644 index 0000000..526c6ae --- /dev/null +++ b/master/api/blark.apischema_compat.get_all_subclasses.html @@ -0,0 +1,155 @@ + + + + + + + blark.apischema_compat.get_all_subclasses — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.apischema_compat.get_all_subclasses

+
+
+blark.apischema_compat.get_all_subclasses(cls: type) Iterator[type][source]
+

Recursive implementation of type.__subclasses__

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.apischema_compat.token_deserializer.html b/master/api/blark.apischema_compat.token_deserializer.html new file mode 100644 index 0000000..7568b76 --- /dev/null +++ b/master/api/blark.apischema_compat.token_deserializer.html @@ -0,0 +1,154 @@ + + + + + + + blark.apischema_compat.token_deserializer — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.apischema_compat.token_deserializer

+
+
+blark.apischema_compat.token_deserializer(parts: List[str]) Token[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.apischema_compat.token_serializer.html b/master/api/blark.apischema_compat.token_serializer.html new file mode 100644 index 0000000..4c33f35 --- /dev/null +++ b/master/api/blark.apischema_compat.token_serializer.html @@ -0,0 +1,154 @@ + + + + + + + blark.apischema_compat.token_serializer — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.apischema_compat.token_serializer

+
+
+blark.apischema_compat.token_serializer(token: Token) List[str][source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.dependency_store.DependencyStore.html b/master/api/blark.dependency_store.DependencyStore.html new file mode 100644 index 0000000..e7abb68 --- /dev/null +++ b/master/api/blark.dependency_store.DependencyStore.html @@ -0,0 +1,265 @@ + + + + + + + blark.dependency_store.DependencyStore — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.dependency_store.DependencyStore

+
+
+class blark.dependency_store.DependencyStore(root: Path)[source]
+

Bases: object

+

A storage container for dependency configuration and loading.

+

Environment variable: BLARK_TWINCAT_ROOT is required to be set for this +to be functional, along with a “config.json” in that directory. This +should contain information as to the supported library dependencies and +where to find them.

+
{
+    "libraries": {
+        "LCLS General": {
+            "name": "LCLS General",
+            "versioned": false,
+            "path": "lcls-twincat-general",
+            "project": "LCLSGeneral.sln"
+        },
+        "lcls-twincat-motion": {
+            "name": "lcls-twincat-motion",
+            "versioned": true,
+            "path": "lcls-twincat-motion",
+            "project": "lcls-twincat-motion.sln"
+        }
+    }
+}
+
+
+

The above would indicate that the “LCLS General” library +(as named in TwinCAT) is available relative to the root directory in +lcls-twincat-general/LCLSGeneral.sln. +It would also indicate that the “lcls-twincat-motion” library could +be found in +lcls-twincat-motion/VERSION/lcls-twincat-motion.sln +where VERSION is the project-defined version.

+

Methods

+ + + + + + + + + + + + + + + + + + +

__init__(root)

get_dependencies(plc)

Get dependency projects from a PLC.

get_dependency(name[, version])

Get a dependency by name and version number.

get_instance()

Get the global DependencyStore instance.

load_config()

Load the dependency store configuration file.

+

Attributes

+ + + + + + + + + + + + +

config_filename

The configuration filename.

root

config

+
+
+config: DependencyStoreConfig
+
+ +
+
+__init__(root: Path)[source]
+
+ +
+
+root: Path
+
+ +
+
+property config_filename
+

The configuration filename.

+
+ +
+
+load_config()[source]
+

Load the dependency store configuration file.

+
+ +
+
+get_dependency(name: str, version: str | None = None) List[PlcProjectMetadata][source]
+

Get a dependency by name and version number.

+
+ +
+
+get_dependencies(plc: TwincatPlcProject) Generator[Tuple[DependencyVersion, PlcProjectMetadata], None, None][source]
+

Get dependency projects from a PLC.

+
+ +
+
+static get_instance() DependencyStore[source]
+

Get the global DependencyStore instance.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.dependency_store.DependencyStoreConfig.html b/master/api/blark.dependency_store.DependencyStoreConfig.html new file mode 100644 index 0000000..d38cfbb --- /dev/null +++ b/master/api/blark.dependency_store.DependencyStoreConfig.html @@ -0,0 +1,217 @@ + + + + + + + blark.dependency_store.DependencyStoreConfig — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.dependency_store.DependencyStoreConfig

+
+
+class blark.dependency_store.DependencyStoreConfig(filename: Path | None, libraries: Dict[str, DependencyStoreLibrary])[source]
+

Bases: object

+

Dependency store configuration, from config.json.

+

Methods

+ + + + + + + + + + + + + + + +

__init__(filename, libraries)

as_json()

Get the configuration as JSON.

from_dict(config[, filename])

save(path)

Save the configuration as JSON to a file.

+

Attributes

+ + + + + + + + + +

filename

libraries

+
+
+filename: Path | None
+
+ +
+
+libraries: Dict[str, DependencyStoreLibrary]
+
+ +
+
+classmethod from_dict(config: dict, filename: Path | None = None) DependencyStoreConfig[source]
+
+ +
+
+as_json() str[source]
+

Get the configuration as JSON.

+
+ +
+
+save(path: str | Path) None[source]
+

Save the configuration as JSON to a file.

+
+ +
+
+__init__(filename: Path | None, libraries: Dict[str, DependencyStoreLibrary]) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.dependency_store.DependencyStoreLibrary.html b/master/api/blark.dependency_store.DependencyStoreLibrary.html new file mode 100644 index 0000000..a22f700 --- /dev/null +++ b/master/api/blark.dependency_store.DependencyStoreLibrary.html @@ -0,0 +1,231 @@ + + + + + + + blark.dependency_store.DependencyStoreLibrary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.dependency_store.DependencyStoreLibrary

+
+
+class blark.dependency_store.DependencyStoreLibrary(name: 'str', versioned: 'bool', path: 'str', project: 'str')[source]
+

Bases: object

+

Methods

+ + + + + + + + + + + + +

__init__(name, versioned, path, project)

get_latest_version_path(root)

Get the latest version project filename.

get_project_filename(root, version)

Get the full project filename, given the root path and version.

+

Attributes

+ + + + + + + + + + + + + + + +

name

versioned

path

project

+
+
+name: str
+
+ +
+
+versioned: bool
+
+ +
+
+path: str
+
+ +
+
+project: str
+
+ +
+
+get_latest_version_path(root: Path) Path[source]
+

Get the latest version project filename.

+
+
Returns:
+
+
pathlib.Path
+
+
+
+
+ +
+
+get_project_filename(root: Path, version: str | None) Path[source]
+

Get the full project filename, given the root path and version.

+
+ +
+
+__init__(name: str, versioned: bool, path: str, project: str) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.dependency_store.PlcProjectMetadata.html b/master/api/blark.dependency_store.PlcProjectMetadata.html new file mode 100644 index 0000000..d91374c --- /dev/null +++ b/master/api/blark.dependency_store.PlcProjectMetadata.html @@ -0,0 +1,257 @@ + + + + + + + blark.dependency_store.PlcProjectMetadata — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.dependency_store.PlcProjectMetadata

+
+
+class blark.dependency_store.PlcProjectMetadata(name: str, filename: Path, include_dependencies: bool, code: List[ParseResult], summary: CodeSummary, loaded_files: Dict[Path, str], dependencies: Dict[str, DependencyVersion], plc: TwincatPlcProject | None)[source]
+

Bases: object

+

This is a per-PLC project metadata container.

+

Methods

+ + + + + + + + + + + + +

__init__(name, filename, ...)

from_plcproject(plc[, include_dependencies])

Create a PlcProjectMetadata instance from a TwincatPlcProject.

from_project_filename(project[, ...])

Given a project/solution filename, get all PlcProjectMetadata.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

name

filename

include_dependencies

code

summary

loaded_files

dependencies

plc

+
+
+name: str
+
+ +
+
+filename: Path
+
+ +
+
+include_dependencies: bool
+
+ +
+
+code: List[ParseResult]
+
+ +
+
+summary: CodeSummary
+
+ +
+
+loaded_files: Dict[Path, str]
+
+ +
+
+dependencies: Dict[str, DependencyVersion]
+
+ +
+
+plc: TwincatPlcProject | None
+
+ +
+
+classmethod from_plcproject(plc: TwincatPlcProject, include_dependencies: bool = True) PlcProjectMetadata | None[source]
+

Create a PlcProjectMetadata instance from a TwincatPlcProject.

+
+ +
+
+classmethod from_project_filename(project: str | Path, include_dependencies: bool = True, plc_whitelist: List[str] | None = None) Generator[PlcProjectMetadata, None, None][source]
+

Given a project/solution filename, get all PlcProjectMetadata.

+
+ +
+
+__init__(name: str, filename: Path, include_dependencies: bool, code: List[ParseResult], summary: CodeSummary, loaded_files: Dict[Path, str], dependencies: Dict[str, DependencyVersion], plc: TwincatPlcProject | None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.dependency_store.get_dependency_store.html b/master/api/blark.dependency_store.get_dependency_store.html new file mode 100644 index 0000000..b99fe75 --- /dev/null +++ b/master/api/blark.dependency_store.get_dependency_store.html @@ -0,0 +1,156 @@ + + + + + + + blark.dependency_store.get_dependency_store — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.dependency_store.get_dependency_store

+
+
+blark.dependency_store.get_dependency_store() DependencyStore[source]
+

Get the global DependencyStore instance.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.dependency_store.load_projects.html b/master/api/blark.dependency_store.load_projects.html new file mode 100644 index 0000000..064d5cc --- /dev/null +++ b/master/api/blark.dependency_store.load_projects.html @@ -0,0 +1,156 @@ + + + + + + + blark.dependency_store.load_projects — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.dependency_store.load_projects

+
+
+blark.dependency_store.load_projects(*projects: str | Path, include_dependencies: bool = True, plc_whitelist: List[str] | None = None) List[PlcProjectMetadata][source]
+

Load the given projects by filename.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.format.build_arg_parser.html b/master/api/blark.format.build_arg_parser.html new file mode 100644 index 0000000..1691cd2 --- /dev/null +++ b/master/api/blark.format.build_arg_parser.html @@ -0,0 +1,156 @@ + + + + + + + blark.format.build_arg_parser — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.format.build_arg_parser

+
+
+blark.format.build_arg_parser(argparser=None)[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.format.determine_output_filename.html b/master/api/blark.format.determine_output_filename.html new file mode 100644 index 0000000..d195f6e --- /dev/null +++ b/master/api/blark.format.determine_output_filename.html @@ -0,0 +1,173 @@ + + + + + + + blark.format.determine_output_filename — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.format.determine_output_filename

+
+
+blark.format.determine_output_filename(input_filename: Path, write_to: Path | None) Path[source]
+

Get an output filename based on the input filename and destination path.

+
+
Parameters:
+
+
input_filenamepathlib.Path

The file the source code comes from.

+
+
write_toOptional[pathlib.Path]

The destination path to write to.

+
+
+
+
Returns:
+
+
pathlib.Path

The output filename to write to.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.format.dump_source_to_console.html b/master/api/blark.format.dump_source_to_console.html new file mode 100644 index 0000000..52f5ae5 --- /dev/null +++ b/master/api/blark.format.dump_source_to_console.html @@ -0,0 +1,167 @@ + + + + + + + blark.format.dump_source_to_console — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.format.dump_source_to_console

+
+
+blark.format.dump_source_to_console(source: bytes | str, encoding: str = 'utf-8') None[source]
+

Output the given source to the console.

+
+
Parameters:
+
+
sourcebytes or str

The source code.

+
+
encodingstr

Encoding to use for byte strings.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.format.get_reformatted_code_blocks.html b/master/api/blark.format.get_reformatted_code_blocks.html new file mode 100644 index 0000000..9176cfc --- /dev/null +++ b/master/api/blark.format.get_reformatted_code_blocks.html @@ -0,0 +1,179 @@ + + + + + + + blark.format.get_reformatted_code_blocks — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.format.get_reformatted_code_blocks

+
+
+blark.format.get_reformatted_code_blocks(results: List[ParseResult], user: Any | None = None, filename: Path | None = None, raise_on_error: bool = True) List[OutputBlock][source]
+

For each parsed code block, generate an OutputBlock for writing to disk.

+
+
Parameters:
+
+
resultsList[ParseResult]

The parsed source code.

+
+
userAny, optional

The loader used for parsing the above (may be a +blark.plain.PlainFileLoader or a blark.solution.TcPOU, for example)

+
+
filenamepathlib.Path, optional

The filename associated with the source code parts.

+
+
raise_on_errorbool

In the event of a reformatting error, raise immediately. If False, +the original (not reformatted) source code will be used as-is.

+
+
+
+
Returns:
+
+
List[OutputBlock]

[TODO:description]

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.format.main.html b/master/api/blark.format.main.html new file mode 100644 index 0000000..b9de54a --- /dev/null +++ b/master/api/blark.format.main.html @@ -0,0 +1,156 @@ + + + + + + + blark.format.main — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.format.main

+
+
+blark.format.main(filename: str | Path, verbose: int = 0, debug: bool = False, interactive: bool = False, indent: str = '    ', write_to: str | Path | None = None, overwrite: bool = False, input_format: str | None = None, output_format: str | None = None)[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.format.reformat_code.html b/master/api/blark.format.reformat_code.html new file mode 100644 index 0000000..d6b0328 --- /dev/null +++ b/master/api/blark.format.reformat_code.html @@ -0,0 +1,157 @@ + + + + + + + blark.format.reformat_code — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.format.reformat_code

+
+
+blark.format.reformat_code(code: SourceCode) str[source]
+

Reformat the code with the provided settings.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.format.write_source_to_file.html b/master/api/blark.format.write_source_to_file.html new file mode 100644 index 0000000..a1d3d8d --- /dev/null +++ b/master/api/blark.format.write_source_to_file.html @@ -0,0 +1,171 @@ + + + + + + + blark.format.write_source_to_file — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.format.write_source_to_file

+
+
+blark.format.write_source_to_file(filename: Path, source: bytes | str, encoding: str = 'utf-8', overwrite: bool = False) None[source]
+

Write source code to the given file.

+
+
Parameters:
+
+
filenamepathlib.Path

The filename to write to.

+
+
sourcebytes or str

The source code.

+
+
encodingstr

The encoding to use when writing the file.

+
+
overwritebool

Overwrite a file, if it exists. Otherwise, raise ValueError.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.html.HighlighterAnnotation.html b/master/api/blark.html.HighlighterAnnotation.html new file mode 100644 index 0000000..ff463c2 --- /dev/null +++ b/master/api/blark.html.HighlighterAnnotation.html @@ -0,0 +1,213 @@ + + + + + + + blark.html.HighlighterAnnotation — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.html.HighlighterAnnotation

+
+
+class blark.html.HighlighterAnnotation(name: str, terminal: bool, is_open_tag: bool, other_tag_pos: int)[source]
+

Bases: object

+

A single HTML tag annotation which applies to a position range of source code.

+

Methods

+ + + + + + + + + +

__init__(name, terminal, is_open_tag, ...)

as_string([tag])

+

Attributes

+ + + + + + + + + + + + + + + +

name

terminal

is_open_tag

other_tag_pos

+
+
+name: str
+
+ +
+
+terminal: bool
+
+ +
+
+is_open_tag: bool
+
+ +
+
+other_tag_pos: int
+
+ +
+
+as_string(tag: str = 'span') str[source]
+
+ +
+
+__init__(name: str, terminal: bool, is_open_tag: bool, other_tag_pos: int) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.html.HtmlWriter.html b/master/api/blark.html.HtmlWriter.html new file mode 100644 index 0000000..db364c7 --- /dev/null +++ b/master/api/blark.html.HtmlWriter.html @@ -0,0 +1,223 @@ + + + + + + + blark.html.HtmlWriter — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.html.HtmlWriter

+
+
+class blark.html.HtmlWriter(user: 'Any', source_filename: 'Optional[pathlib.Path]', block: 'OutputBlock')[source]
+

Bases: object

+

Methods

+ + + + + + + + + + + + +

__init__(user, source_filename, block)

save(user, source_filename, parts)

Convert the source code block to HTML and return it.

to_html()

HTML tag-annotated source code.

+

Attributes

+ + + + + + + + + + + + + + + +

source_code

The source code associated with the block.

user

source_filename

block

+
+
+user: Any
+
+ +
+
+source_filename: Path | None
+
+ +
+
+block: OutputBlock
+
+ +
+
+property source_code: str
+

The source code associated with the block.

+
+ +
+
+to_html() str[source]
+

HTML tag-annotated source code.

+
+ +
+
+static save(user: Any, source_filename: Path | None, parts: List[OutputBlock]) str[source]
+

Convert the source code block to HTML and return it.

+
+ +
+
+__init__(user: Any, source_filename: Path | None, block: OutputBlock) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.html.apply_annotations_to_code.html b/master/api/blark.html.apply_annotations_to_code.html new file mode 100644 index 0000000..cb92bbb --- /dev/null +++ b/master/api/blark.html.apply_annotations_to_code.html @@ -0,0 +1,153 @@ + + + + + + + blark.html.apply_annotations_to_code — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.html.apply_annotations_to_code

+
+
+blark.html.apply_annotations_to_code(code: str, annotations: Dict[int, List[HighlighterAnnotation]]) str[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.html.get_annotations.html b/master/api/blark.html.get_annotations.html new file mode 100644 index 0000000..f76af0d --- /dev/null +++ b/master/api/blark.html.get_annotations.html @@ -0,0 +1,154 @@ + + + + + + + blark.html.get_annotations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.html.get_annotations

+
+
+blark.html.get_annotations(tree: Tree) DefaultDict[int, List[HighlighterAnnotation]][source]
+

Get annotations for syntax elements in the given parse tree.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.input.BlarkCompositeSourceItem.html b/master/api/blark.input.BlarkCompositeSourceItem.html new file mode 100644 index 0000000..6d6bb12 --- /dev/null +++ b/master/api/blark.input.BlarkCompositeSourceItem.html @@ -0,0 +1,230 @@ + + + + + + + blark.input.BlarkCompositeSourceItem — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.input.BlarkCompositeSourceItem

+
+
+class blark.input.BlarkCompositeSourceItem(identifier: 'str', filename: 'Optional[pathlib.Path]', parts: 'list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]', user: 'Optional[Any]' = None)[source]
+

Bases: object

+

Methods

+ + + + + + + + + + + + +

__init__(identifier, filename, parts[, user])

get_code_and_line_map([include_end, ...])

get_filenames()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

lines

user

identifier

filename

parts

+
+
+identifier: str
+
+ +
+
+filename: Path | None
+
+ +
+
+parts: list[BlarkSourceItem | BlarkCompositeSourceItem]
+
+ +
+
+user: Any | None = None
+
+ +
+
+property lines: list[BlarkSourceLine]
+
+ +
+
+get_code_and_line_map(include_end: bool = True, blark_lineno: int = 1) tuple[str, dict[int, int]][source]
+
+ +
+
+get_filenames() set[Path][source]
+
+ +
+
+__init__(identifier: str, filename: Path | None, parts: list[BlarkSourceItem | BlarkCompositeSourceItem], user: Any | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.input.BlarkSourceItem.html b/master/api/blark.input.BlarkSourceItem.html new file mode 100644 index 0000000..1916529 --- /dev/null +++ b/master/api/blark.input.BlarkSourceItem.html @@ -0,0 +1,246 @@ + + + + + + + blark.input.BlarkSourceItem — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.input.BlarkSourceItem

+
+
+class blark.input.BlarkSourceItem(identifier: 'str', lines: 'list[BlarkSourceLine]', type: 'SourceType', grammar_rule: 'Optional[str]', implicit_end: 'Optional[str]', user: 'Optional[Any]' = None)[source]
+

Bases: object

+

Methods

+ + + + + + + + + + + + + + + +

__init__(identifier, lines, type, ...[, user])

from_code(code, *[, identifier, ...])

get_code_and_line_map([include_end, ...])

get_filenames()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

user

identifier

lines

type

grammar_rule

implicit_end

+
+
+identifier: str
+
+ +
+
+lines: list[BlarkSourceLine]
+
+ +
+
+type: SourceType
+
+ +
+
+grammar_rule: str | None
+
+ +
+
+implicit_end: str | None
+
+ +
+
+user: Any | None = None
+
+ +
+
+classmethod from_code(code: str, *, identifier: str = '', source_type: SourceType = SourceType.general, grammar_rule: str | None = None, implicit_end: str | None = None, first_lineno: int = 1, filename: Path | None = None, user: Any | None = None) Self[source]
+
+ +
+
+get_filenames() set[Path][source]
+
+ +
+
+get_code_and_line_map(include_end: bool = True, blark_lineno: int = 1) tuple[str, dict[int, int]][source]
+
+ +
+
+__init__(identifier: str, lines: list[BlarkSourceLine], type: SourceType, grammar_rule: str | None, implicit_end: str | None, user: Any | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.input.BlarkSourceLine.html b/master/api/blark.input.BlarkSourceLine.html new file mode 100644 index 0000000..9dfd2ca --- /dev/null +++ b/master/api/blark.input.BlarkSourceLine.html @@ -0,0 +1,206 @@ + + + + + + + blark.input.BlarkSourceLine — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.input.BlarkSourceLine

+
+
+class blark.input.BlarkSourceLine(filename: 'Optional[pathlib.Path]', lineno: 'int', code: 'str')[source]
+

Bases: object

+

Methods

+ + + + + + + + + +

__init__(filename, lineno, code)

from_code(code[, first_lineno, filename])

+

Attributes

+ + + + + + + + + + + + +

filename

lineno

code

+
+
+filename: Path | None
+
+ +
+
+lineno: int
+
+ +
+
+code: str
+
+ +
+
+classmethod from_code(code: str, first_lineno: int = 1, filename: Path | None = None) list[Self][source]
+
+ +
+
+__init__(filename: Path | None, lineno: int, code: str) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.input.UnsupportedFileFormatError.html b/master/api/blark.input.UnsupportedFileFormatError.html new file mode 100644 index 0000000..6f4f09e --- /dev/null +++ b/master/api/blark.input.UnsupportedFileFormatError.html @@ -0,0 +1,156 @@ + + + + + + + blark.input.UnsupportedFileFormatError — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.input.UnsupportedFileFormatError

+
+
+exception blark.input.UnsupportedFileFormatError[source]
+

Bases: Exception

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.input.load_file_by_name.html b/master/api/blark.input.load_file_by_name.html new file mode 100644 index 0000000..67a18d1 --- /dev/null +++ b/master/api/blark.input.load_file_by_name.html @@ -0,0 +1,178 @@ + + + + + + + blark.input.load_file_by_name — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.input.load_file_by_name

+
+
+blark.input.load_file_by_name(filename: str | Path, input_format: str | None = None) list[BlarkSourceItem | BlarkCompositeSourceItem][source]
+

Load a file using blark’s file input handlers.

+
+
Parameters:
+
+
filenamepathlib.Path or str

The filename to load.

+
+
input_formatstr, optional

Optionally specify the loader to use, if auto-detection based on +filename is insufficient. This may be either the loader name (e.g., +“plain”) or an equivalent filename extension (e.g., “.tcpou”)

+
+
+
+
Returns:
+
+
list[BlarkSourceItem | BlarkCompositeSourceItem]

A list of items that were loaded, which may be either singular +(BlarkSourceItem) or composite (BlarkCompositeSourceItem). An +example of a composite file is a Beckhoff TwinCAT TcPOU file, which may +contain a declaration, implementation, and a number of +properties/methods/actions each with their own grammar rules).

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.input.register_input_handler.html b/master/api/blark.input.register_input_handler.html new file mode 100644 index 0000000..e6712dc --- /dev/null +++ b/master/api/blark.input.register_input_handler.html @@ -0,0 +1,155 @@ + + + + + + + blark.input.register_input_handler — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.input.register_input_handler

+
+
+blark.input.register_input_handler(extension: str, handler: Callable[[Path], List[BlarkSourceItem | BlarkCompositeSourceItem]])[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.main.main.html b/master/api/blark.main.main.html new file mode 100644 index 0000000..3dcfdf8 --- /dev/null +++ b/master/api/blark.main.main.html @@ -0,0 +1,150 @@ + + + + + + + blark.main.main — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.main.main

+
+
+blark.main.main()[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.output.OutputBlock.html b/master/api/blark.output.OutputBlock.html new file mode 100644 index 0000000..857d48c --- /dev/null +++ b/master/api/blark.output.OutputBlock.html @@ -0,0 +1,198 @@ + + + + + + + blark.output.OutputBlock — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.output.OutputBlock

+
+
+class blark.output.OutputBlock(code: 'str', metadata: 'Dict[str, Any]' = <factory>, origin: 'Optional[ParseResult]' = None)[source]
+

Bases: object

+

Methods

+ + + + + + +

__init__(code[, metadata, origin])

+

Attributes

+ + + + + + + + + + + + +

origin

The origin of the above code block.

code

The (optionally modified) code to write as output.

metadata

Metadata to add/modify.

+
+
+code: str
+

The (optionally modified) code to write as output.

+
+ +
+
+metadata: Dict[str, Any]
+

Metadata to add/modify.

+
+ +
+
+origin: ParseResult | None = None
+

The origin of the above code block.

+
+ +
+
+__init__(code: str, metadata: Dict[str, Any] = <factory>, origin: Optional[ParseResult] = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.output.get_handler_by_name.html b/master/api/blark.output.get_handler_by_name.html new file mode 100644 index 0000000..496e954 --- /dev/null +++ b/master/api/blark.output.get_handler_by_name.html @@ -0,0 +1,152 @@ + + + + + + + blark.output.get_handler_by_name — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.output.get_handler_by_name

+
+
+blark.output.get_handler_by_name(name: str) Callable[[object, Path | None, List[OutputBlock]], str | bytes][source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.output.register_output_handler.html b/master/api/blark.output.register_output_handler.html new file mode 100644 index 0000000..a8b33f6 --- /dev/null +++ b/master/api/blark.output.register_output_handler.html @@ -0,0 +1,152 @@ + + + + + + + blark.output.register_output_handler — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.output.register_output_handler

+
+
+blark.output.register_output_handler(name: str, handler: Callable[[object, Path | None, List[OutputBlock]], str | bytes])[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.BlarkStartingRule.html b/master/api/blark.parse.BlarkStartingRule.html new file mode 100644 index 0000000..5d1232e --- /dev/null +++ b/master/api/blark.parse.BlarkStartingRule.html @@ -0,0 +1,257 @@ + + + + + + + blark.parse.BlarkStartingRule — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.BlarkStartingRule

+
+
+class blark.parse.BlarkStartingRule(value)[source]
+

Bases: Enum

+

An enumeration.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

iec_source

action

data_type_declaration

function_block_method_declaration

function_block_property_declaration

function_block_type_declaration

function_declaration

global_var_declarations

interface_declaration

program_declaration

statement_list

+
+
+iec_source = 1
+
+ +
+
+action = 2
+
+ +
+
+data_type_declaration = 3
+
+ +
+
+function_block_method_declaration = 4
+
+ +
+
+function_block_property_declaration = 5
+
+ +
+
+function_block_type_declaration = 6
+
+ +
+
+function_declaration = 7
+
+ +
+
+global_var_declarations = 8
+
+ +
+
+interface_declaration = 9
+
+ +
+
+program_declaration = 10
+
+ +
+
+statement_list = 11
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.ParseResult.html b/master/api/blark.parse.ParseResult.html new file mode 100644 index 0000000..54ce70c --- /dev/null +++ b/master/api/blark.parse.ParseResult.html @@ -0,0 +1,285 @@ + + + + + + + blark.parse.ParseResult — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.ParseResult

+
+
+class blark.parse.ParseResult(source_code: 'str', item: 'BlarkSourceItem', processed_source_code: 'str', comments: 'list[lark.Token]', line_map: 'Optional[dict[int, int]]' = None, filename: 'Optional[pathlib.Path]' = None, exception: 'Optional[Exception]' = None, tree: 'Optional[lark.Tree]' = None, parent: 'Optional[BlarkCompositeSourceItem]' = None, transformed: 'Optional[tf.SourceCode]' = None)[source]
+

Bases: object

+

Methods

+ + + + + + + + + + + + +

__init__(source_code, item, ...[, line_map, ...])

dump_source([fp])

transform()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

exception

filename

identifier

line_map

parent

transformed

tree

source_code

item

processed_source_code

comments

+
+
+source_code: str
+
+ +
+
+item: BlarkSourceItem
+
+ +
+
+processed_source_code: str
+
+ +
+
+comments: list[Token]
+
+ +
+
+line_map: dict[int, int] | None = None
+
+ +
+
+filename: Path | None = None
+
+ +
+
+exception: Exception | None = None
+
+ +
+
+tree: Tree | None = None
+
+ +
+
+parent: BlarkCompositeSourceItem | None = None
+
+ +
+
+transformed: SourceCode | None = None
+
+ +
+
+property identifier: str | None
+
+ +
+
+transform() SourceCode[source]
+
+ +
+
+dump_source(fp=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) None[source]
+
+ +
+
+__init__(source_code: str, item: BlarkSourceItem, processed_source_code: str, comments: list[Token], line_map: dict[int, int] | None = None, filename: Path | None = None, exception: Exception | None = None, tree: Tree | None = None, parent: BlarkCompositeSourceItem | None = None, transformed: SourceCode | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.build_arg_parser.html b/master/api/blark.parse.build_arg_parser.html new file mode 100644 index 0000000..38bf084 --- /dev/null +++ b/master/api/blark.parse.build_arg_parser.html @@ -0,0 +1,162 @@ + + + + + + + blark.parse.build_arg_parser — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.build_arg_parser

+
+
+blark.parse.build_arg_parser(argparser=None)[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.dump_json.html b/master/api/blark.parse.dump_json.html new file mode 100644 index 0000000..e875bfa --- /dev/null +++ b/master/api/blark.parse.dump_json.html @@ -0,0 +1,182 @@ + + + + + + + blark.parse.dump_json — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.dump_json

+
+
+blark.parse.dump_json(type_: Type[T], obj: T, include_meta: bool = True, indent: int | None = 2) str[source]
+

Dump object obj as type type_ with apischema and serialize to a string.

+
+
Parameters:
+
+
type_Type[T]

The type of obj.

+
+
objT

The object to serialize.

+
+
include_metabool

Include meta information in the dump.

+
+
indentint or None

Make the JSON output prettier with indentation.

+
+
+
+
Returns:
+
+
str
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.get_parser.html b/master/api/blark.parse.get_parser.html new file mode 100644 index 0000000..14fc336 --- /dev/null +++ b/master/api/blark.parse.get_parser.html @@ -0,0 +1,163 @@ + + + + + + + blark.parse.get_parser — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.get_parser

+
+
+blark.parse.get_parser() Lark[source]
+

Get a cached lark.Lark parser for TwinCAT flavor IEC61131-3 code.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.main.html b/master/api/blark.parse.main.html new file mode 100644 index 0000000..4de8515 --- /dev/null +++ b/master/api/blark.parse.main.html @@ -0,0 +1,163 @@ + + + + + + + blark.parse.main — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.main

+
+
+blark.parse.main(filename: str | Path, verbose: int = 0, debug: bool = False, interactive: bool = False, output_summary: bool = False, use_json: bool = False, print_filename: bool = False, print_source: bool = False, print_tree: bool = False, include_meta: bool = True, filter_by_name: list[str] | None = None, input_format: str | None = None) dict[str, list[ParseResult]][source]
+

Parse the given source code/project.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.new_parser.html b/master/api/blark.parse.new_parser.html new file mode 100644 index 0000000..9bdf6f6 --- /dev/null +++ b/master/api/blark.parse.new_parser.html @@ -0,0 +1,171 @@ + + + + + + + blark.parse.new_parser — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.new_parser

+
+
+blark.parse.new_parser(start: list[str] | None = None, **kwargs) Lark[source]
+

Get a new parser for TwinCAT flavor IEC61131-3 code.

+
+
Parameters:
+
+
**kwargs

See lark.lark.LarkOptions.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.parse.html b/master/api/blark.parse.parse.html new file mode 100644 index 0000000..a2f5733 --- /dev/null +++ b/master/api/blark.parse.parse.html @@ -0,0 +1,163 @@ + + + + + + + blark.parse.parse — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.parse

+
+
+blark.parse.parse(path: str | Path, input_format: str | None = None, **kwargs) Generator[ParseResult, None, None][source]
+

Parse the given source code file (or all files from the given project).

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.parse_item.html b/master/api/blark.parse.parse_item.html new file mode 100644 index 0000000..d7a1a93 --- /dev/null +++ b/master/api/blark.parse.parse_item.html @@ -0,0 +1,162 @@ + + + + + + + blark.parse.parse_item — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.parse.parse_project.html b/master/api/blark.parse.parse_project.html new file mode 100644 index 0000000..9a5c45e --- /dev/null +++ b/master/api/blark.parse.parse_project.html @@ -0,0 +1,163 @@ + + + + + + + blark.parse.parse_project — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.parse_project

+
+
+blark.parse.parse_project(tsproj_project: str | Path, **kwargs) Generator[ParseResult, None, None][source]
+

Parse an entire tsproj project file.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.parse_single_file.html b/master/api/blark.parse.parse_single_file.html new file mode 100644 index 0000000..de673a1 --- /dev/null +++ b/master/api/blark.parse.parse_single_file.html @@ -0,0 +1,163 @@ + + + + + + + blark.parse.parse_single_file — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.parse_single_file

+
+
+blark.parse.parse_single_file(fn: str | Path, **kwargs) ParseResult[source]
+

Parse a single source code file.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.parse_source_code.html b/master/api/blark.parse.parse_source_code.html new file mode 100644 index 0000000..c21ee24 --- /dev/null +++ b/master/api/blark.parse.parse_source_code.html @@ -0,0 +1,180 @@ + + + + + + + blark.parse.parse_source_code — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.parse_source_code

+
+
+blark.parse.parse_source_code(source_code: str, *, verbose: int = 0, fn: str | Path = 'unknown', preprocessors: Sequence[Callable[[str], str]] = (), parser: Lark | None = None, starting_rule: str | None = None, line_map: dict[int, int] | None = None, item: BlarkSourceItem | None = None) ParseResult[source]
+

Parse source code into a ParseResult.

+
+
Parameters:
+
+
source_codestr

The source code text.

+
+
verboseint, optional

Verbosity level for output. (deprecated)

+
+
fnpathlib.Path or str, optional

The filename associated with the source code.

+
+
preprocessorslist, optional

Callable preprocessors to apply to the source code.

+
+
parserlark.Lark, optional

The parser instance to use. Defaults to the global shared one from +get_parser.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.parse.summarize.html b/master/api/blark.parse.summarize.html new file mode 100644 index 0000000..e75eb15 --- /dev/null +++ b/master/api/blark.parse.summarize.html @@ -0,0 +1,163 @@ + + + + + + + blark.parse.summarize — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.parse.summarize

+
+
+blark.parse.summarize(parsed: ParseResult | list[ParseResult], squash: bool = True) CodeSummary[source]
+

Get a code summary instance from one or more ParseResult instances.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.plain.PlainFileLoader.html b/master/api/blark.plain.PlainFileLoader.html new file mode 100644 index 0000000..1c57928 --- /dev/null +++ b/master/api/blark.plain.PlainFileLoader.html @@ -0,0 +1,249 @@ + + + + + + + blark.plain.PlainFileLoader — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.plain.PlainFileLoader

+
+
+class blark.plain.PlainFileLoader(filename: 'pathlib.Path', raw_source: 'str', source_type: 'SourceType' = <SourceType.general: 1>, identifier: 'Optional[str]' = None, formatted_code: 'Optional[str]' = None)[source]
+

Bases: object

+

Methods

+ + + + + + + + + + + + + + + + + + + + + +

__init__(filename, raw_source[, ...])

load(filename)

rewrite_code(identifier, code)

save(user, source_filename, parts)

save_to(path)

to_file_contents()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

formatted_code

identifier

source_type

filename

raw_source

+
+
+filename: Path
+
+ +
+
+raw_source: str
+
+ +
+
+source_type: SourceType = 1
+
+ +
+
+identifier: str | None = None
+
+ +
+
+formatted_code: str | None = None
+
+ +
+
+rewrite_code(identifier: str, code: str) None[source]
+
+ +
+
+save_to(path: str | Path) None[source]
+
+ +
+
+to_file_contents() str[source]
+
+ +
+
+classmethod load(filename: Path) List[BlarkSourceItem | BlarkCompositeSourceItem][source]
+
+ +
+
+static save(user: Any, source_filename: Path | None, parts: List[OutputBlock]) str[source]
+
+ +
+
+__init__(filename: Path, raw_source: str, source_type: SourceType = SourceType.general, identifier: str | None = None, formatted_code: str | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.DependencyInformation.html b/master/api/blark.solution.DependencyInformation.html new file mode 100644 index 0000000..2af013b --- /dev/null +++ b/master/api/blark.solution.DependencyInformation.html @@ -0,0 +1,245 @@ + + + + + + + blark.solution.DependencyInformation — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.DependencyInformation

+
+
+class blark.solution.DependencyInformation(name: 'str', default: 'Optional[DependencyVersion]' = None, resolution: 'Optional[DependencyVersion]' = None)[source]
+

Bases: object

+

Methods

+ + + + + + + + + +

__init__(name[, default, resolution])

from_xml(references, resolutions[, xmlns])

+

Attributes

+ + + + + + + + + + + + +

default

The default version information.

resolution

The resolved version information.

name

The dependency name.

+
+
+name: str
+

The dependency name.

+
+ +
+
+default: DependencyVersion | None = None
+

The default version information.

+
+ +
+
+resolution: DependencyVersion | None = None
+

The resolved version information.

+
+ +
+
+classmethod from_xml(references: list[Element], resolutions: list[Element], xmlns: dict[str, str] | None = None) dict[str, Self][source]
+
+ +
+
+__init__(name: str, default: DependencyVersion | None = None, resolution: DependencyVersion | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.DependencyVersion.html b/master/api/blark.solution.DependencyVersion.html new file mode 100644 index 0000000..1837a13 --- /dev/null +++ b/master/api/blark.solution.DependencyVersion.html @@ -0,0 +1,254 @@ + + + + + + + blark.solution.DependencyVersion — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.DependencyVersion

+
+
+class blark.solution.DependencyVersion(name: 'str', version: 'str', vendor: 'str', namespace: 'str')[source]
+

Bases: object

+

Methods

+ + + + + + + + + +

__init__(name, version, vendor, namespace)

from_string(text, namespace)

+

Attributes

+ + + + + + + + + + + + + + + +

name

Dependency name.

version

Dependency version.

vendor

Dependency vendor/author.

namespace

Dependency namespace name, used in code.

+
+
+name: str
+

Dependency name.

+
+ +
+
+version: str
+

Dependency version.

+
+ +
+
+vendor: str
+

Dependency vendor/author.

+
+ +
+
+namespace: str
+

Dependency namespace name, used in code.

+
+ +
+
+classmethod from_string(text: str, namespace: str) Self[source]
+
+ +
+
+__init__(name: str, version: str, vendor: str, namespace: str) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.LocatedString.html b/master/api/blark.solution.LocatedString.html new file mode 100644 index 0000000..a45f4e9 --- /dev/null +++ b/master/api/blark.solution.LocatedString.html @@ -0,0 +1,250 @@ + + + + + + + blark.solution.LocatedString — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.LocatedString

+
+
+class blark.solution.LocatedString(filename: 'Optional[pathlib.Path]', lineno: 'int' = 0, value: 'str' = '', column: 'int' = 0)[source]
+

Bases: object

+

Methods

+ + + + + + + + + +

__init__(filename[, lineno, value, column])

to_lines()

+

Attributes

+ + + + + + + + + + + + + + + +

column

lineno

value

filename

+
+
+filename: Path | None
+
+ +
+
+lineno: int = 0
+
+ +
+
+value: str = ''
+
+ +
+
+column: int = 0
+
+ +
+
+to_lines() list[BlarkSourceLine][source]
+
+ +
+
+__init__(filename: Path | None, lineno: int = 0, value: str = '', column: int = 0) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.Project.html b/master/api/blark.solution.Project.html new file mode 100644 index 0000000..ffa7e3e --- /dev/null +++ b/master/api/blark.solution.Project.html @@ -0,0 +1,298 @@ + + + + + + + blark.solution.Project — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.Project

+
+
+class blark.solution.Project(name: str, saved_path: PurePath, local_path: Path | None, guid: str, solution_guid: str, loaded: TwincatTsProject | None = None)[source]
+

Bases: object

+

A stub container for a TwinCAT project (.tsproj) file.

+

This only contains metadata about the tsproj and allows for full project +loading by way of .load().

+

Methods

+ + + + + + + + + + + + +

__init__(name, saved_path, local_path, guid, ...)

from_filename(filename)

Create a stub project loader from the given filename.

load()

Load the project into a TwincatTsProject.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

loaded

The loaded project.

name

The project name.

saved_path

The path according to the solution:r likely a Windows-formatted path which is case-insensitive.

local_path

The corresponding local filename.

guid

The globally unique identifier for the project.

solution_guid

The unique identifier for the solution.

+
+
+name: str
+

The project name.

+
+ +
+
+saved_path: PurePath
+

The path according to the solution:r likely a Windows-formatted path +which is case-insensitive.

+
+ +
+
+local_path: Path | None
+

The corresponding local filename.

+
+ +
+
+guid: str
+

The globally unique identifier for the project.

+
+ +
+
+solution_guid: str
+

The unique identifier for the solution.

+
+ +
+
+loaded: TwincatTsProject | None = None
+

The loaded project.

+
+ +
+
+classmethod from_filename(filename: str | Path) Self[source]
+

Create a stub project loader from the given filename.

+
+
Parameters:
+
+
filenameAnyPath
+
+
+
Returns:
+
+
Project
+
+
+
+
+ +
+
+load() TwincatTsProject[source]
+

Load the project into a TwincatTsProject.

+
+ +
+
+__init__(name: str, saved_path: PurePath, local_path: Path | None, guid: str, solution_guid: str, loaded: TwincatTsProject | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.Solution.html b/master/api/blark.solution.Solution.html new file mode 100644 index 0000000..a975554 --- /dev/null +++ b/master/api/blark.solution.Solution.html @@ -0,0 +1,275 @@ + + + + + + + blark.solution.Solution — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.Solution

+
+
+class blark.solution.Solution(root: Path, projects: list[Project], filename: Path | None = None)[source]
+

Bases: object

+

A container for a TwinCAT/Visual Studio solution (.sln).

+

Methods

+ + + + + + + + + + + + + + + +

__init__(root, projects[, filename])

from_contents(solution_source, root[, filename])

from_filename(filename)

from_projects(root, projects)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

file_extension

filename

projects_by_name

root

projects

+
+
+file_extension: ClassVar[str] = '.sln'
+
+ +
+
+root: Path
+
+ +
+
+projects: list[Project]
+
+ +
+
+filename: Path | None = None
+
+ +
+
+property projects_by_name: dict[str, Project]
+
+ +
+
+classmethod from_projects(root: Path, projects: list[Path]) Self[source]
+
+ +
+
+classmethod from_contents(solution_source: str, root: Path, filename: Path | None = None) Self[source]
+
+ +
+
+classmethod from_filename(filename: str | Path) Self[source]
+
+ +
+
+__init__(root: Path, projects: list[Project], filename: Path | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.SolutionLoaderError.html b/master/api/blark.solution.SolutionLoaderError.html new file mode 100644 index 0000000..5d5377c --- /dev/null +++ b/master/api/blark.solution.SolutionLoaderError.html @@ -0,0 +1,193 @@ + + + + + + + blark.solution.SolutionLoaderError — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.SolutionLoaderError

+
+
+exception blark.solution.SolutionLoaderError[source]
+

Bases: Exception

+

Solution loader-related exception base class.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcAction.html b/master/api/blark.solution.TcAction.html new file mode 100644 index 0000000..9e6cd76 --- /dev/null +++ b/master/api/blark.solution.TcAction.html @@ -0,0 +1,253 @@ + + + + + + + blark.solution.TcAction — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcAction

+
+
+class blark.solution.TcAction(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TcSource]' = None, xml: 'dataclasses.InitVar[lxml.etree.Element | None]' = None, source_type: 'Optional[SourceType]' = None)[source]
+

Bases: TcSourceChild

+

Methods

+ + + + + + + + + + + + +

__init__(name, guid, decl, metadata, filename)

rewrite_code(identifier, contents)

to_blark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

parent

source_type

xml

name

guid

decl

metadata

filename

+
+
+rewrite_code(identifier: str, contents: str)[source]
+
+ +
+
+to_blark() list[BlarkCompositeSourceItem | BlarkSourceItem][source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: pathlib.Path | None, parent: TcSource | None = None, xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: SourceType | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcDUT.html b/master/api/blark.solution.TcDUT.html new file mode 100644 index 0000000..2a8fa0f --- /dev/null +++ b/master/api/blark.solution.TcDUT.html @@ -0,0 +1,266 @@ + + + + + + + blark.solution.TcDUT — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcDUT

+
+
+class blark.solution.TcDUT(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TwincatSourceCodeItem]', xml: 'dataclasses.InitVar[lxml.etree.Element | None]' = None, source_type: 'Optional[SourceType]' = None)[source]
+

Bases: TcSource

+

Methods

+ + + + + + + + + + + + +

__init__(name, guid, decl, metadata, ...[, ...])

rewrite_code(identifier, contents)

to_blark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

file_extension

source_type

xml

name

guid

decl

metadata

filename

parent

+
+
+file_extension: ClassVar[str] = '.TcDUT'
+
+ +
+
+default_source_type: ClassVar[SourceType] = 11
+
+ +
+
+rewrite_code(identifier: str, contents: str)[source]
+
+ +
+
+to_blark() list[BlarkCompositeSourceItem][source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: pathlib.Path | None, parent: TwincatSourceCodeItem | None, xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: SourceType | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcDeclImpl.html b/master/api/blark.solution.TcDeclImpl.html new file mode 100644 index 0000000..abea29f --- /dev/null +++ b/master/api/blark.solution.TcDeclImpl.html @@ -0,0 +1,306 @@ + + + + + + + blark.solution.TcDeclImpl — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcDeclImpl

+
+
+class blark.solution.TcDeclImpl(identifier: 'str', filename: 'Optional[pathlib.Path]', source_type: 'Optional[SourceType]', declaration: 'Optional[LocatedString]', implementation: 'Optional[LocatedString]', parent: 'Optional[TcSource]' = None, metadata: 'Optional[dict[str, Any]]' = None)[source]
+

Bases: object

+

Methods

+ + + + + + + + + + + + + + + + + + + + + +

__init__(identifier, filename, source_type, ...)

declaration_to_blark()

from_xml(xml[, filename, ...])

implementation_to_blark()

rewrite_code(identifier, contents)

to_blark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

metadata

parent

identifier

filename

source_type

declaration

implementation

+
+
+identifier: str
+
+ +
+
+filename: Path | None
+
+ +
+
+source_type: SourceType | None
+
+ +
+
+declaration: LocatedString | None
+
+ +
+
+implementation: LocatedString | None
+
+ +
+
+parent: TcSource | None = None
+
+ +
+
+metadata: dict[str, Any] | None = None
+
+ +
+
+rewrite_code(identifier: str, contents: str)[source]
+
+ +
+
+declaration_to_blark() BlarkSourceItem | None[source]
+
+ +
+
+implementation_to_blark() BlarkSourceItem | None[source]
+
+ +
+
+to_blark() list[BlarkSourceItem][source]
+
+ +
+
+classmethod from_xml(xml: Element, filename: Path | None = None, default_source_type: SourceType | None = None, default_identifier: str | None = None) Self[source]
+
+ +
+
+__init__(identifier: str, filename: Path | None, source_type: SourceType | None, declaration: LocatedString | None, implementation: LocatedString | None, parent: TcSource | None = None, metadata: dict[str, Any] | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcExtraInfo.html b/master/api/blark.solution.TcExtraInfo.html new file mode 100644 index 0000000..b6decf6 --- /dev/null +++ b/master/api/blark.solution.TcExtraInfo.html @@ -0,0 +1,245 @@ + + + + + + + blark.solution.TcExtraInfo — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcExtraInfo

+
+
+class blark.solution.TcExtraInfo(metadata: dict[str, str], xml: Element, parent: TcSource)[source]
+

Bases: object

+

Extra information in the project XML such as Line IDs.

+

blark supports getting the metadata from the file but does not dig any +deeper.

+

Methods

+ + + + + + + + + +

__init__(metadata, xml, parent)

from_xml(xml, parent)

+

Attributes

+ + + + + + + + + + + + +

metadata

xml

parent

+
+
+metadata: dict[str, str]
+
+ +
+
+xml: Element
+
+ +
+
+parent: TcSource
+
+ +
+
+classmethod from_xml(xml: Element, parent: TcSource) Self[source]
+
+ +
+
+__init__(metadata: dict[str, str], xml: Element, parent: TcSource) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcGVL.html b/master/api/blark.solution.TcGVL.html new file mode 100644 index 0000000..dd75610 --- /dev/null +++ b/master/api/blark.solution.TcGVL.html @@ -0,0 +1,266 @@ + + + + + + + blark.solution.TcGVL — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcGVL

+
+
+class blark.solution.TcGVL(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TwincatSourceCodeItem]', xml: 'dataclasses.InitVar[lxml.etree.Element | None]' = None, source_type: 'Optional[SourceType]' = None)[source]
+

Bases: TcSource

+

Methods

+ + + + + + + + + + + + +

__init__(name, guid, decl, metadata, ...[, ...])

rewrite_code(identifier, contents)

to_blark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

file_extension

source_type

xml

name

guid

decl

metadata

filename

parent

+
+
+file_extension: ClassVar[str] = '.TcGVL'
+
+ +
+
+default_source_type: ClassVar[SourceType] = 13
+
+ +
+
+rewrite_code(identifier: str, contents: str)[source]
+
+ +
+
+to_blark() list[BlarkCompositeSourceItem][source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: pathlib.Path | None, parent: TwincatSourceCodeItem | None, xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: SourceType | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcIO.html b/master/api/blark.solution.TcIO.html new file mode 100644 index 0000000..f856041 --- /dev/null +++ b/master/api/blark.solution.TcIO.html @@ -0,0 +1,275 @@ + + + + + + + blark.solution.TcIO — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcIO

+
+
+class blark.solution.TcIO(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: Optional[pathlib.Path], parent: Optional[TwincatSourceCodeItem], xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: Optional[SourceType] = None, parts: list[Union[TcMethod, TcProperty, TcUnknownXml]] = <factory>)[source]
+

Bases: TcSource

+

TcIO file - for INTERFACE definitions.

+

Methods

+ + + + + + + + + + + + +

__init__(name, guid, decl, metadata, ...[, ...])

create_source_child_from_xml(child, parent)

to_blark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

file_extension

source_type

xml

parts

name

guid

decl

metadata

filename

parent

+
+
+file_extension: ClassVar[str] = '.TcIO'
+
+ +
+
+default_source_type: ClassVar[SourceType] = 5
+
+ +
+
+parts: list[TcMethod | TcProperty | TcUnknownXml]
+
+ +
+
+to_blark() list[BlarkCompositeSourceItem | BlarkSourceItem][source]
+
+ +
+
+classmethod create_source_child_from_xml(child: Element, parent: TcSource, filename: Path | None = None) TcAction | TcMethod | TcProperty | TcExtraInfo | TcUnknownXml[source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: Optional[pathlib.Path], parent: Optional[TwincatSourceCodeItem], xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: Optional[SourceType] = None, parts: list[Union[TcMethod, TcProperty, TcUnknownXml]] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcMethod.html b/master/api/blark.solution.TcMethod.html new file mode 100644 index 0000000..8791f7e --- /dev/null +++ b/master/api/blark.solution.TcMethod.html @@ -0,0 +1,253 @@ + + + + + + + blark.solution.TcMethod — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcMethod

+
+
+class blark.solution.TcMethod(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TcSource]' = None, xml: 'dataclasses.InitVar[lxml.etree.Element | None]' = None, source_type: 'Optional[SourceType]' = None)[source]
+

Bases: TcSourceChild

+

Methods

+ + + + + + + + + + + + +

__init__(name, guid, decl, metadata, filename)

rewrite_code(identifier, contents)

to_blark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

parent

source_type

xml

name

guid

decl

metadata

filename

+
+
+rewrite_code(identifier: str, contents: str)[source]
+
+ +
+
+to_blark() list[BlarkCompositeSourceItem | BlarkSourceItem][source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: pathlib.Path | None, parent: TcSource | None = None, xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: SourceType | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcPOU.html b/master/api/blark.solution.TcPOU.html new file mode 100644 index 0000000..898ea4b --- /dev/null +++ b/master/api/blark.solution.TcPOU.html @@ -0,0 +1,293 @@ + + + + + + + blark.solution.TcPOU — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcPOU

+
+
+class blark.solution.TcPOU(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TwincatSourceCodeItem]', xml: 'dataclasses.InitVar[lxml.etree.Element | None]' = None, source_type: 'Optional[SourceType]' = None, parts: 'list[POUPart]' = <factory>)[source]
+

Bases: TcSource

+

Methods

+ + + + + + + + + + + + + + + + + + +

__init__(name, guid, decl, metadata, ...[, ...])

create_source_child_from_xml(child, parent)

get_child_by_identifier(identifier)

rewrite_code(identifier, contents)

to_blark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

file_extension

parts_by_name

source_type

xml

parts

name

guid

decl

metadata

filename

parent

+
+
+file_extension: ClassVar[str] = '.TcPOU'
+
+ +
+
+parts: list[POUPart]
+
+ +
+
+property parts_by_name: dict[str, TcAction | TcMethod | TcProperty]
+
+ +
+
+get_child_by_identifier(identifier: str) TcAction | TcMethod | TcProperty | TcDeclImpl[source]
+
+ +
+
+rewrite_code(identifier: str, contents: str)[source]
+
+ +
+
+to_blark() list[BlarkCompositeSourceItem | BlarkSourceItem][source]
+
+ +
+
+classmethod create_source_child_from_xml(child: Element, parent: TcSource, filename: Path | None = None) TcAction | TcMethod | TcProperty | TcExtraInfo | TcUnknownXml | None[source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: Optional[pathlib.Path], parent: Optional[TwincatSourceCodeItem], xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: Optional[SourceType] = None, parts: list[POUPart] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcProperty.html b/master/api/blark.solution.TcProperty.html new file mode 100644 index 0000000..03a5f3d --- /dev/null +++ b/master/api/blark.solution.TcProperty.html @@ -0,0 +1,269 @@ + + + + + + + blark.solution.TcProperty — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcProperty

+
+
+class blark.solution.TcProperty(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TcSource]' = None, xml: 'dataclasses.InitVar[lxml.etree.Element | None]' = None, source_type: 'Optional[SourceType]' = None, get: 'Optional[TcDeclImpl]' = None, set: 'Optional[TcDeclImpl]' = None)[source]
+

Bases: TcSourceChild

+

Methods

+ + + + + + + + + + + + +

__init__(name, guid, decl, metadata, filename)

rewrite_code(identifier, contents)

to_blark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

get

parent

set

source_type

xml

name

guid

decl

metadata

filename

+
+
+get: TcDeclImpl | None = None
+
+ +
+
+set: TcDeclImpl | None = None
+
+ +
+
+rewrite_code(identifier: str, contents: str)[source]
+
+ +
+
+to_blark() list[BlarkCompositeSourceItem | BlarkSourceItem][source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: pathlib.Path | None, parent: TcSource | None = None, xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: SourceType | None = None, get: TcDeclImpl | None = None, set: TcDeclImpl | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcSource.html b/master/api/blark.solution.TcSource.html new file mode 100644 index 0000000..b80c072 --- /dev/null +++ b/master/api/blark.solution.TcSource.html @@ -0,0 +1,330 @@ + + + + + + + blark.solution.TcSource — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcSource

+
+
+class blark.solution.TcSource(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TwincatSourceCodeItem]', xml: 'dataclasses.InitVar[lxml.etree.Element | None]' = None, source_type: 'Optional[SourceType]' = None)[source]
+

Bases: object

+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + +

__init__(name, guid, decl, metadata, ...[, ...])

from_contents(contents[, filename, parent])

from_filename(filename[, parent])

from_xml(xml[, filename, parent])

rewrite_code(identifier, contents)

to_file_contents([delimiter])

to_xml()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

source_type

xml

name

guid

decl

metadata

filename

parent

+
+
+name: str
+
+ +
+
+guid: str
+
+ +
+
+decl: TcDeclImpl
+
+ +
+
+metadata: dict[str, str]
+
+ +
+
+filename: pathlib.Path | None
+
+ +
+
+parent: TwincatSourceCodeItem | None
+
+ +
+
+xml: dataclasses.InitVar[lxml.etree.Element | None] = None
+
+ +
+
+source_type: SourceType | None = None
+
+ +
+
+default_source_type: ClassVar[SourceType | None] = None
+
+ +
+
+rewrite_code(identifier: str, contents: str)[source]
+
+ +
+
+to_file_contents(delimiter: str = '\r\n') bytes[source]
+
+ +
+
+to_xml() Element[source]
+
+ +
+
+static from_xml(xml: Element, filename: Path | None = None, parent: TwincatSourceCodeItem | None = None) TcDUT | TcTTO | TcPOU | TcIO | TcGVL[source]
+
+ +
+
+classmethod from_contents(contents: bytes, filename: Path | None = None, parent: TcSource | None = None) TcDUT | TcPOU | TcIO | TcTTO | TcGVL[source]
+
+ +
+
+classmethod from_filename(filename: str | Path, parent: TcSource | None = None) TcDUT | TcPOU | TcIO | TcTTO | TcGVL[source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: pathlib.Path | None, parent: TwincatSourceCodeItem | None, xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: SourceType | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcSourceChild.html b/master/api/blark.solution.TcSourceChild.html new file mode 100644 index 0000000..82d69c0 --- /dev/null +++ b/master/api/blark.solution.TcSourceChild.html @@ -0,0 +1,250 @@ + + + + + + + blark.solution.TcSourceChild — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcSourceChild

+
+
+class blark.solution.TcSourceChild(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TcSource]' = None, xml: 'dataclasses.InitVar[lxml.etree.Element | None]' = None, source_type: 'Optional[SourceType]' = None)[source]
+

Bases: TcSource

+

Methods

+ + + + + + + + + +

__init__(name, guid, decl, metadata, filename)

from_xml(xml[, filename, parent])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

parent

source_type

xml

name

guid

decl

metadata

filename

+
+
+parent: TcSource | None = None
+
+ +
+
+classmethod from_xml(xml: Element, filename: Path | None = None, parent: TcSource | None = None) Self[source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: pathlib.Path | None, parent: TcSource | None = None, xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: SourceType | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcTTO.html b/master/api/blark.solution.TcTTO.html new file mode 100644 index 0000000..2c6ddd0 --- /dev/null +++ b/master/api/blark.solution.TcTTO.html @@ -0,0 +1,258 @@ + + + + + + + blark.solution.TcTTO — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcTTO

+
+
+class blark.solution.TcTTO(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TwincatSourceCodeItem]', xml: 'Optional[lxml.etree.Element]' = None, source_type: 'Optional[SourceType]' = None)[source]
+

Bases: TcSource

+

Methods

+ + + + + + + + + +

__init__(name, guid, decl, metadata, ...[, ...])

to_blark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

default_source_type

file_extension

source_type

xml

name

guid

decl

metadata

filename

parent

+
+
+file_extension: ClassVar[str] = '.TcTTO'
+
+ +
+
+xml: lxml.etree.Element | None = None
+
+ +
+
+to_blark() list[BlarkCompositeSourceItem | BlarkSourceItem][source]
+
+ +
+
+__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: Path | None, parent: TwincatSourceCodeItem | None, xml: Element | None = None, source_type: SourceType | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TcUnknownXml.html b/master/api/blark.solution.TcUnknownXml.html new file mode 100644 index 0000000..79afea5 --- /dev/null +++ b/master/api/blark.solution.TcUnknownXml.html @@ -0,0 +1,235 @@ + + + + + + + blark.solution.TcUnknownXml — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TcUnknownXml

+
+
+class blark.solution.TcUnknownXml(xml: Element, parent: TcSource)[source]
+

Bases: object

+

A currently unsupported block of XML in the project.

+

Methods

+ + + + + + + + + +

__init__(xml, parent)

to_blark()

+

Attributes

+ + + + + + + + + +

xml

parent

+
+
+xml: Element
+
+ +
+
+parent: TcSource
+
+ +
+
+to_blark() list[BlarkSourceItem][source]
+
+ +
+
+__init__(xml: Element, parent: TcSource) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TwincatPlcProject.html b/master/api/blark.solution.TwincatPlcProject.html new file mode 100644 index 0000000..c925a55 --- /dev/null +++ b/master/api/blark.solution.TwincatPlcProject.html @@ -0,0 +1,376 @@ + + + + + + + blark.solution.TwincatPlcProject — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TwincatPlcProject

+
+
+class blark.solution.TwincatPlcProject(guid: str, xti_path: Path | None, plcproj_path: Path | None, properties: dict[str, str], dependencies: dict[str, DependencyInformation], sources: list[TwincatSourceCodeItem])[source]
+

Bases: object

+

A TwinCAT PLC project.

+

This typically corresponds to a single .plcproj file.

+

Methods

+ + + + + + + + + + + + + + + + + + +

__init__(guid, xti_path, plcproj_path, ...)

from_filename(filename)

Load a plcproj from its filename.

from_project_xml(xml, root)

Load a plcproj from the tsproj itself.

from_standalone_xml(tsproj_or_xti_xml, ...)

Load a PLC project from standalone XML code.

from_xti_filename(xti_filename)

Load a .plcproj from its XTI contents.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

file_extension

name

The project name.

guid

The globally unique identifier for the tsproj.

xti_path

Path to an XTI file for the project.

plcproj_path

The PLC Project - plcproj - path.

properties

plcproj-defined properties (name, project build, etc.)

dependencies

Dependencies for the PLC project.

sources

Source code parts which blark can extract information from.

+
+
+file_extension: ClassVar[str] = '.plcproj'
+
+ +
+
+guid: str
+

The globally unique identifier for the tsproj.

+
+ +
+
+xti_path: Path | None
+

Path to an XTI file for the project.

+
+ +
+
+plcproj_path: Path | None
+

The PLC Project - plcproj - path.

+
+ +
+
+properties: dict[str, str]
+

plcproj-defined properties (name, project build, etc.)

+
+ +
+
+dependencies: dict[str, DependencyInformation]
+

Dependencies for the PLC project.

+
+ +
+
+sources: list[TwincatSourceCodeItem]
+

Source code parts which blark can extract information from.

+
+ +
+
+classmethod from_standalone_xml(tsproj_or_xti_xml: Element | None, plcproj_xml: Element) Self[source]
+

Load a PLC project from standalone XML code.

+
+
Parameters:
+
+
tsproj_or_xti_xmlOptional[lxml.etree.Element]

lxml-loaded .tsproj or .xti contents.

+
+
plcproj_xmllxml.etree.Element

lxml-loaded .plcproj contents.

+
+
+
+
Returns:
+
+
Self

[TODO:description]

+
+
+
+
+
+ +
+
+property name: str | None
+

The project name.

+
+ +
+
+classmethod from_filename(filename: Path) Self[source]
+

Load a plcproj from its filename.

+
+
Parameters:
+
+
filenamepathlib.Path
+
+
+
Returns:
+
+
Self
+
+
+
+
+ +
+
+classmethod from_xti_filename(xti_filename: Path) Self[source]
+

Load a .plcproj from its XTI contents.

+
+
Parameters:
+
+
xti_filenamepathlib.Path

XTI filename.

+
+
+
+
Returns:
+
+
Self
+
+
+
+
+ +
+
+classmethod from_project_xml(xml: Element, root: Path) Self[source]
+

Load a plcproj from the tsproj itself.

+

The loading procedure typically happens in the following order:

+

Solution -> tsproj -> xti -> plcproj

+
+
Parameters:
+
+
xmllxml.etree.Element
+
rootpathlib.Path

The root path to load files from the project.

+
+
+
+
Returns:
+
+
Self
+
+
+
+
+ +
+
+__init__(guid: str, xti_path: Path | None, plcproj_path: Path | None, properties: dict[str, str], dependencies: dict[str, DependencyInformation], sources: list[TwincatSourceCodeItem]) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TwincatSourceCodeItem.html b/master/api/blark.solution.TwincatSourceCodeItem.html new file mode 100644 index 0000000..b277110 --- /dev/null +++ b/master/api/blark.solution.TwincatSourceCodeItem.html @@ -0,0 +1,312 @@ + + + + + + + blark.solution.TwincatSourceCodeItem — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TwincatSourceCodeItem

+
+
+class blark.solution.TwincatSourceCodeItem(saved_path: PurePath, local_path: Path | None, subtype: str | None, link_always: bool, raw_contents: bytes, contents: TcDUT | TcPOU | TcIO | TcGVL | TcTTO, guid: str | None = None, parent: TwincatPlcProject | None = None)[source]
+

Bases: object

+

A wrapper for all TwinCAT project source code files.

+

Information from the project may be stored here alongside that of the +source code file itself. The contents of the source code file are +stored in contents, with raw_contents holding raw bytes from +the file.

+

Methods

+ + + + + + + + + + + + + + + +

__init__(saved_path, local_path, subtype, ...)

from_compile_xml(xml[, parent])

save_to(path[, delimiter])

to_file_contents([delimiter])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

guid

The globally unique identifier for the source code item.

parent

The parent project, if applicable.

saved_path

The path according to the solution:r likely a Windows-formatted path which is case-insensitive.

local_path

The corresponding local filename.

subtype

The subtype of the file.

link_always

Link always set?

raw_contents

Raw file contents.

contents

Contents loaded into a type-specific class.

+
+
+saved_path: PurePath
+

The path according to the solution:r likely a Windows-formatted path +which is case-insensitive.

+
+ +
+
+local_path: Path | None
+

The corresponding local filename.

+
+ +
+
+subtype: str | None
+

The subtype of the file.

+
+ +
+ +

Link always set?

+
+ +
+
+raw_contents: bytes
+

Raw file contents.

+
+ +
+
+contents: TcDUT | TcPOU | TcIO | TcGVL | TcTTO
+

Contents loaded into a type-specific class.

+
+ +
+
+guid: str | None = None
+

The globally unique identifier for the source code item.

+
+ +
+
+parent: TwincatPlcProject | None = None
+

The parent project, if applicable.

+
+ +
+
+to_file_contents(delimiter: str = '\r\n') bytes[source]
+
+ +
+
+save_to(path: str | Path, delimiter: str = '\r\n') None[source]
+
+ +
+
+classmethod from_compile_xml(xml: Element, parent: TwincatPlcProject | None = None) Self | None[source]
+
+ +
+
+__init__(saved_path: PurePath, local_path: Path | None, subtype: str | None, link_always: bool, raw_contents: bytes, contents: TcDUT | TcPOU | TcIO | TcGVL | TcTTO, guid: str | None = None, parent: TwincatPlcProject | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.TwincatTsProject.html b/master/api/blark.solution.TwincatTsProject.html new file mode 100644 index 0000000..b73085f --- /dev/null +++ b/master/api/blark.solution.TwincatTsProject.html @@ -0,0 +1,317 @@ + + + + + + + blark.solution.TwincatTsProject — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.TwincatTsProject

+
+
+class blark.solution.TwincatTsProject(guid: str, netid: str, path: Path | None, plcs: list[TwincatPlcProject])[source]
+

Bases: object

+

Container for a loaded TwinCAT tsproj project.

+

This is typically instantiated after the Solution parser generates a +Project instance. This contains information about the target PLC and all +loaded PLC projects.

+

Methods

+ + + + + + + + + + + + +

__init__(guid, netid, path, plcs)

from_filename(filename)

Load a tsproj project from its filename.

from_xml(tsproj, root[, filename])

Load a tsproj project from its XML source.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

file_extension

plcs_by_name

A dictionary of PLCs by name.

guid

The globally unique identifier for the tsproj.

netid

The AMS Net ID of the target PLC.

path

The path to this project on disk.

plcs

PLC projects (.plcproj) part of this tsproj.

+
+
+file_extension: ClassVar[str] = '.tsproj'
+
+ +
+
+guid: str
+

The globally unique identifier for the tsproj.

+
+ +
+
+netid: str
+

The AMS Net ID of the target PLC.

+
+ +
+
+path: Path | None
+

The path to this project on disk.

+
+ +
+
+plcs: list[TwincatPlcProject]
+

PLC projects (.plcproj) part of this tsproj.

+
+ +
+
+property plcs_by_name: dict[str, TwincatPlcProject]
+

A dictionary of PLCs by name.

+
+
Returns:
+
+
dict[str, TwincatPlcProject]
+
+
+
+
+ +
+
+classmethod from_xml(tsproj: Element, root: Path, filename: Path | None = None) Self[source]
+

Load a tsproj project from its XML source.

+
+
Parameters:
+
+
xmllxml.etree.Element
+
filenamepathlib.Path
+
+
+
Returns:
+
+
TwincatTsProject
+
+
+
+
+ +
+
+classmethod from_filename(filename: Path) Self[source]
+

Load a tsproj project from its filename.

+
+
Parameters:
+
+
filenamepathlib.Path
+
+
+
Returns:
+
+
TwincatTsProject
+
+
+
+
+ +
+
+__init__(guid: str, netid: str, path: Path | None, plcs: list[TwincatPlcProject]) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.UnsupportedSourceFileError.html b/master/api/blark.solution.UnsupportedSourceFileError.html new file mode 100644 index 0000000..c30c94e --- /dev/null +++ b/master/api/blark.solution.UnsupportedSourceFileError.html @@ -0,0 +1,206 @@ + + + + + + + blark.solution.UnsupportedSourceFileError — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.UnsupportedSourceFileError

+
+
+exception blark.solution.UnsupportedSourceFileError(msg: str, type: str | None = None)[source]
+

Bases: SolutionLoaderError

+

Unsupported project file.

+

blark does not support loading of these compilable items: +1. GlobalTextList +2. Any other non-structured text source code files

+
+
+__init__(msg: str, type: str | None = None)[source]
+
+ +
+
+type: str | None = None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.filename_from_xml.html b/master/api/blark.solution.filename_from_xml.html new file mode 100644 index 0000000..0648277 --- /dev/null +++ b/master/api/blark.solution.filename_from_xml.html @@ -0,0 +1,191 @@ + + + + + + + blark.solution.filename_from_xml — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.filename_from_xml

+
+
+blark.solution.filename_from_xml(xml: Element | None) Path | None[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.get_blark_input_from_solution.html b/master/api/blark.solution.get_blark_input_from_solution.html new file mode 100644 index 0000000..b1b7c0a --- /dev/null +++ b/master/api/blark.solution.get_blark_input_from_solution.html @@ -0,0 +1,204 @@ + + + + + + + blark.solution.get_blark_input_from_solution — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.get_blark_input_from_solution

+
+
+blark.solution.get_blark_input_from_solution(solution: Solution) list[BlarkSourceItem | BlarkCompositeSourceItem][source]
+

Get all blark input from the given solution.

+
+
Parameters:
+
+
solutionSolution
+
+
+
Returns:
+
+
list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.get_child_located_text.html b/master/api/blark.solution.get_child_located_text.html new file mode 100644 index 0000000..057651c --- /dev/null +++ b/master/api/blark.solution.get_child_located_text.html @@ -0,0 +1,191 @@ + + + + + + + blark.solution.get_child_located_text — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.get_child_located_text

+
+
+blark.solution.get_child_located_text(xml: Element, tag: str, namespace: str | None = None, namespaces: dict[str, str] | None = None, filename: Path | None = None) LocatedString | None[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.get_child_text.html b/master/api/blark.solution.get_child_text.html new file mode 100644 index 0000000..8cc6851 --- /dev/null +++ b/master/api/blark.solution.get_child_text.html @@ -0,0 +1,191 @@ + + + + + + + blark.solution.get_child_text — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.get_child_text

+
+
+blark.solution.get_child_text(xml: Element, tag: str, namespace: str | None = None, namespaces: dict[str, str] | None = None, default: str | None = None) str | None[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.get_code_object_from_xml.html b/master/api/blark.solution.get_code_object_from_xml.html new file mode 100644 index 0000000..f166ba4 --- /dev/null +++ b/master/api/blark.solution.get_code_object_from_xml.html @@ -0,0 +1,191 @@ + + + + + + + blark.solution.get_code_object_from_xml — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.get_code_object_from_xml

+
+
+blark.solution.get_code_object_from_xml(xml: Element) tuple[type[TcSource] | None, Element | None][source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.get_project_guid.html b/master/api/blark.solution.get_project_guid.html new file mode 100644 index 0000000..ef91286 --- /dev/null +++ b/master/api/blark.solution.get_project_guid.html @@ -0,0 +1,204 @@ + + + + + + + blark.solution.get_project_guid — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.get_project_guid

+
+
+blark.solution.get_project_guid(element: Element) str[source]
+

Get a project target GUID from its xml.

+
+
Parameters:
+
+
elementlxml.etree.Element
+
+
+
Returns:
+
+
str
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.get_project_target_netid.html b/master/api/blark.solution.get_project_target_netid.html new file mode 100644 index 0000000..24a5a9a --- /dev/null +++ b/master/api/blark.solution.get_project_target_netid.html @@ -0,0 +1,204 @@ + + + + + + + blark.solution.get_project_target_netid — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.get_project_target_netid

+
+
+blark.solution.get_project_target_netid(element: Element) str[source]
+

Get a project target AMS Net ID from its xml.

+
+
Parameters:
+
+
elementlxml.etree.Element
+
+
+
Returns:
+
+
str
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.get_tcplc_from_xml.html b/master/api/blark.solution.get_tcplc_from_xml.html new file mode 100644 index 0000000..4aea455 --- /dev/null +++ b/master/api/blark.solution.get_tcplc_from_xml.html @@ -0,0 +1,191 @@ + + + + + + + blark.solution.get_tcplc_from_xml — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.get_tcplc_from_xml

+
+
+blark.solution.get_tcplc_from_xml(xml: Element) Element | None[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.make_solution_from_files.html b/master/api/blark.solution.make_solution_from_files.html new file mode 100644 index 0000000..36acee1 --- /dev/null +++ b/master/api/blark.solution.make_solution_from_files.html @@ -0,0 +1,199 @@ + + + + + + + blark.solution.make_solution_from_files — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.make_solution_from_files

+
+
+blark.solution.make_solution_from_files(filename: str | Path) Solution[source]
+

From a TwinCAT solution (.sln) or .tsproj, get a Solution instance.

+
+
Returns:
+
+
Solution
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.parse_xml_contents.html b/master/api/blark.solution.parse_xml_contents.html new file mode 100644 index 0000000..402acf8 --- /dev/null +++ b/master/api/blark.solution.parse_xml_contents.html @@ -0,0 +1,192 @@ + + + + + + + blark.solution.parse_xml_contents — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.parse_xml_contents

+
+
+blark.solution.parse_xml_contents(contents: bytes | str) Element[source]
+

Parse the given XML contents with lxml.etree.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.parse_xml_file.html b/master/api/blark.solution.parse_xml_file.html new file mode 100644 index 0000000..af32010 --- /dev/null +++ b/master/api/blark.solution.parse_xml_file.html @@ -0,0 +1,192 @@ + + + + + + + blark.solution.parse_xml_file — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.parse_xml_file

+
+
+blark.solution.parse_xml_file(fn: str | Path) Element[source]
+

Parse a given XML file with lxml.etree.parse.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.project_loader.html b/master/api/blark.solution.project_loader.html new file mode 100644 index 0000000..29d8ab6 --- /dev/null +++ b/master/api/blark.solution.project_loader.html @@ -0,0 +1,205 @@ + + + + + + + blark.solution.project_loader — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.project_loader

+
+
+blark.solution.project_loader(filename: Path) list[BlarkSourceItem | BlarkCompositeSourceItem][source]
+

Load a TwinCAT project (.tsproj) file.

+
+
Parameters:
+
+
filenamepathlib.Path

The project filename.

+
+
+
+
Returns:
+
+
list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.projects_from_solution_source.html b/master/api/blark.solution.projects_from_solution_source.html new file mode 100644 index 0000000..19eab46 --- /dev/null +++ b/master/api/blark.solution.projects_from_solution_source.html @@ -0,0 +1,202 @@ + + + + + + + blark.solution.projects_from_solution_source — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.projects_from_solution_source

+
+
+blark.solution.projects_from_solution_source(solution_source: str | bytes, root: Path, encoding: str = 'utf-8') Generator[Project, None, None][source]
+

Find project filenames from the contents of a solution.

+
+
Parameters:
+
+
solution_sourcestr

The solution (.sln) file source.

+
+
rootpathlib.Path

The root path to look for project files.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.solution_loader.html b/master/api/blark.solution.solution_loader.html new file mode 100644 index 0000000..37273ed --- /dev/null +++ b/master/api/blark.solution.solution_loader.html @@ -0,0 +1,205 @@ + + + + + + + blark.solution.solution_loader — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.solution_loader

+
+
+blark.solution.solution_loader(filename: Path) list[BlarkSourceItem | BlarkCompositeSourceItem][source]
+

Load a TwinCAT solution (.sln) file.

+
+
Parameters:
+
+
filenamepathlib.Path

The solution filename.

+
+
+
+
Returns:
+
+
list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.split_property_and_base_decl.html b/master/api/blark.solution.split_property_and_base_decl.html new file mode 100644 index 0000000..546a9f5 --- /dev/null +++ b/master/api/blark.solution.split_property_and_base_decl.html @@ -0,0 +1,191 @@ + + + + + + + blark.solution.split_property_and_base_decl — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.split_property_and_base_decl

+
+
+blark.solution.split_property_and_base_decl(code: str) tuple[str, str][source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.strip_implicit_lines.html b/master/api/blark.solution.strip_implicit_lines.html new file mode 100644 index 0000000..15b50a5 --- /dev/null +++ b/master/api/blark.solution.strip_implicit_lines.html @@ -0,0 +1,192 @@ + + + + + + + blark.solution.strip_implicit_lines — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.strip_implicit_lines

+
+
+blark.solution.strip_implicit_lines(code: str, source_type: SourceType) str[source]
+

Strip off (e.g.) END_FUNCTION_BLOCK the provided code.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.strip_xml_namespace.html b/master/api/blark.solution.strip_xml_namespace.html new file mode 100644 index 0000000..73f0ee7 --- /dev/null +++ b/master/api/blark.solution.strip_xml_namespace.html @@ -0,0 +1,192 @@ + + + + + + + blark.solution.strip_xml_namespace — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.strip_xml_namespace

+
+
+blark.solution.strip_xml_namespace(tag: str) str[source]
+

Strip off {{namespace}} from: {{namespace}}tag.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.twincat_file_loader.html b/master/api/blark.solution.twincat_file_loader.html new file mode 100644 index 0000000..0df7039 --- /dev/null +++ b/master/api/blark.solution.twincat_file_loader.html @@ -0,0 +1,204 @@ + + + + + + + blark.solution.twincat_file_loader — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.twincat_file_loader

+
+
+blark.solution.twincat_file_loader(filename: Path) list[BlarkSourceItem | BlarkCompositeSourceItem][source]
+

Load a single TwinCAT file based on its extension.

+
+
Parameters:
+
+
filenamepathlib.Path
+
+
+
Returns:
+
+
list[Union[BlarkSourceItem, BlarkCompositeSourceItem]]
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.solution.twincat_file_writer.html b/master/api/blark.solution.twincat_file_writer.html new file mode 100644 index 0000000..38c307b --- /dev/null +++ b/master/api/blark.solution.twincat_file_writer.html @@ -0,0 +1,210 @@ + + + + + + + blark.solution.twincat_file_writer — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.solution.twincat_file_writer

+
+
+blark.solution.twincat_file_writer(user: TcDUT | TcTTO | TcPOU | TcIO | TcGVL | Solution, source_filename: Path | None, parts: list[OutputBlock]) bytes[source]
+

Write source code

+
+
Parameters:
+
+
userTcHandler

The user handler that loaded all the files.

+
+
source_filenameOptional[pathlib.Path]

The source filename associatied with all code blocks

+
+
partslist[OutputBlock]

The output blocks to write.

+
+
+
+
Returns:
+
+
bytes

The contents of the file to write.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.BlarkDirective.html b/master/api/blark.sphinxdomain.BlarkDirective.html new file mode 100644 index 0000000..636aa5c --- /dev/null +++ b/master/api/blark.sphinxdomain.BlarkDirective.html @@ -0,0 +1,314 @@ + + + + + + + blark.sphinxdomain.BlarkDirective — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.BlarkDirective

+
+
+class blark.sphinxdomain.BlarkDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
+

Bases: ObjectDescription[Tuple[str, str]]

+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

doc_field_types

domain

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

indexnode

objtype

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

options

A dictionary of directive options for customization ("role" directive).

content

A list of strings, the directive content for customization ("role" directive).

+
+
+name: str
+

The role name actually used in the document.

+
+ +
+
+rawtext: str
+

A string containing the entire interpreted text input.

+
+ +
+
+text: str
+

The interpreted text content.

+
+ +
+
+lineno: int
+

The line number where the interpreted text begins.

+
+ +
+
+options: Dict
+

A dictionary of directive options for customization (“role” directive).

+
+ +
+
+content: List[str]
+

A list of strings, the directive content for customization (“role” directive).

+
+ +
+
+domain: str | None = None
+
+ +
+
+objtype: str | None = None
+
+ +
+
+indexnode: index = <index: >
+
+ +
+
+has_content: ClassVar[bool] = True
+

May the directive have content?

+
+ +
+
+required_arguments: ClassVar[int] = 1
+

Number of required directive arguments.

+
+ +
+
+optional_arguments: ClassVar[int] = 0
+

Number of optional arguments after the required arguments.

+
+ +
+
+final_argument_whitespace: ClassVar[bool] = True
+

May the final argument contain whitespace?

+
+ +
+
+doc_field_types: List[Field] = []
+
+ +
+
+option_spec: ClassVar[dict[str, Callable[[str], Any]]] = {'annotation': <function unchanged>, 'canonical': <function unchanged>, 'noblocks': <function flag>, 'noindex': <function flag>, 'noindexentry': <function flag>, 'nolinks': <function flag>, 'nosource': <function flag>}
+

Mapping of option names to validator functions.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.BlarkDirectiveWithDeclarations.html b/master/api/blark.sphinxdomain.BlarkDirectiveWithDeclarations.html new file mode 100644 index 0000000..63137dc --- /dev/null +++ b/master/api/blark.sphinxdomain.BlarkDirectiveWithDeclarations.html @@ -0,0 +1,280 @@ + + + + + + + blark.sphinxdomain.BlarkDirectiveWithDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.BlarkDirectiveWithDeclarations

+
+
+class blark.sphinxdomain.BlarkDirectiveWithDeclarations(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
+

Bases: BlarkDirective

+

Methods

+ + + + + + + + + + + + + + + +

before_content()

Called before parsing content.

get_signature_prefix(sig)

handle_signature(sig, signode)

Transform a signature/object into RST nodes.

transform_content(contentnode)

Called after creating the content through nested parsing, but before the object-description-transform event is emitted, and before the info-fields are transformed.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

doc_field_types

domain

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

indexnode

objtype

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

obj

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

options

A dictionary of directive options for customization ("role" directive).

content

A list of strings, the directive content for customization ("role" directive).

+
+
+obj: FunctionSummary | FunctionBlockSummary | MissingDeclaration
+
+ +
+
+doc_field_types: List[Field] = [<sphinx.util.docfields.GroupedField object>]
+
+ +
+
+handle_signature(sig: str, signode: desc_signature) Tuple[str, str][source]
+

Transform a signature/object into RST nodes.

+
+ +
+
+before_content() None[source]
+

Called before parsing content. Used to set information about the current +directive context on the build environment.

+
+ +
+
+transform_content(contentnode: desc_content) None[source]
+

Called after creating the content through nested parsing, +but before the object-description-transform event is emitted, +and before the info-fields are transformed. +Can be used to manipulate the content.

+
+ +
+
+get_signature_prefix(sig: str) List[Node][source]
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.BlarkDomain.html b/master/api/blark.sphinxdomain.BlarkDomain.html new file mode 100644 index 0000000..b332bf9 --- /dev/null +++ b/master/api/blark.sphinxdomain.BlarkDomain.html @@ -0,0 +1,287 @@ + + + + + + + blark.sphinxdomain.BlarkDomain — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.BlarkDomain

+
+
+class blark.sphinxdomain.BlarkDomain(env: BuildEnvironment)[source]
+

Bases: Domain

+

Blark IEC61131-3 language domain.

+

Methods

+ + + + + + + + + + + + +

clear_doc(docname)

Remove traces of a document in the domain-specific inventories.

find_obj(rolename, node, targetstring)

resolve_xref(env, fromdocname, builder, typ, ...)

Resolve the pending_xref node with the given typ and target.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

dangling_warnings

role name -> a warning message if reference is missing

data_version

data version, bump this when the format of self.data changes

directives

directive name -> directive class

enumerable_nodes

node_class -> (enum_node_type, title_getter)

indices

a list of Index subclasses

initial_data

data value for a fresh environment

label

domain label: longer, more descriptive (used in messages)

name

domain name: should be short, but unique

object_types

type (usually directive) name -> ObjType instance

roles

role name -> role callable

data

data value

+
+
+name = 'bk'
+

domain name: should be short, but unique

+
+ +
+
+label = 'Blark'
+

domain label: longer, more descriptive (used in messages)

+
+ +
+
+object_types: ClassVar[Dict[str, ObjType]] = {'declaration': <sphinx.domains.ObjType object>, 'function': <sphinx.domains.ObjType object>, 'function_block': <sphinx.domains.ObjType object>, 'gvl': <sphinx.domains.ObjType object>, 'module': <sphinx.domains.ObjType object>, 'program': <sphinx.domains.ObjType object>, 'source_code': <sphinx.domains.ObjType object>, 'type': <sphinx.domains.ObjType object>, 'variable_block': <sphinx.domains.ObjType object>}
+

type (usually directive) name -> ObjType instance

+
+ +
+
+directives: ClassVar[Dict[str, Type[BlarkDirective]]] = {'declaration': <class 'blark.sphinxdomain.DeclarationDirective'>, 'function': <class 'blark.sphinxdomain.FunctionDirective'>, 'function_block': <class 'blark.sphinxdomain.FunctionBlockDirective'>, 'gvl': <class 'blark.sphinxdomain.GvlDirective'>, 'program': <class 'blark.sphinxdomain.ProgramDirective'>, 'type': <class 'blark.sphinxdomain.TypeDirective'>, 'variable_block': <class 'blark.sphinxdomain.VariableBlockDirective'>}
+

directive name -> directive class

+
+ +
+
+roles: Dict[str, BlarkXRefRole] = {'declaration': <blark.sphinxdomain.BlarkXRefRole object>, 'fb': <blark.sphinxdomain.BlarkXRefRole object>, 'function': <blark.sphinxdomain.BlarkXRefRole object>, 'function_block': <blark.sphinxdomain.BlarkXRefRole object>, 'gvl': <blark.sphinxdomain.BlarkXRefRole object>, 'mod': <blark.sphinxdomain.BlarkXRefRole object>, 'program': <blark.sphinxdomain.BlarkXRefRole object>, 'type': <blark.sphinxdomain.BlarkXRefRole object>}
+

role name -> role callable

+
+ +
+
+initial_data: ClassVar[Dict[str, Dict[str, Any]]] = {'action': {}, 'declaration': {}, 'function': {}, 'function_block': {}, 'gvl': {}, 'method': {}, 'module': {}, 'program': {}, 'type': {}}
+

data value for a fresh environment

+
+ +
+
+indices: List[Index] = []
+

a list of Index subclasses

+
+ +
+
+find_obj(rolename: str, node: Node, targetstring: str)[source]
+
+ +
+
+resolve_xref(env: sphinx.environment.BuildEnvironment, fromdocname: str, builder: Builder, typ: str, target: str, node: addnodes.pending_xref, contnode: nodes.Element) nodes.reference[source]
+

Resolve the pending_xref node with the given typ and target.

+

This method should return a new node, to replace the xref node, +containing the contnode which is the markup content of the +cross-reference.

+

If no resolution can be found, None can be returned; the xref node will +then given to the :event:`missing-reference` event, and if that yields no +resolution, replaced by contnode.

+

The method can also raise sphinx.environment.NoUri to suppress +the :event:`missing-reference` event being emitted.

+
+ +
+
+clear_doc(docname: str) None[source]
+

Remove traces of a document in the domain-specific inventories.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.BlarkSphinxCache.html b/master/api/blark.sphinxdomain.BlarkSphinxCache.html new file mode 100644 index 0000000..c2d3ddc --- /dev/null +++ b/master/api/blark.sphinxdomain.BlarkSphinxCache.html @@ -0,0 +1,217 @@ + + + + + + + blark.sphinxdomain.BlarkSphinxCache — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.BlarkSphinxCache

+
+
+class blark.sphinxdomain.BlarkSphinxCache(cache: 'Dict[pathlib.Path, summary.CodeSummary]' = <factory>)[source]
+

Bases: object

+

Methods

+ + + + + + + + + + + + + + + +

__init__([cache])

configure(app, config)

find_by_name(name)

instance()

+

Attributes

+ + + + + + +

cache

+
+
+cache: Dict[Path, CodeSummary]
+
+ +
+
+static instance()[source]
+
+ +
+
+find_by_name(name: str) FunctionSummary | FunctionBlockSummary | DataTypeSummary | ProgramSummary | InterfaceSummary | GlobalVariableSummary | DeclarationSummary | MethodSummary | PropertySummary | ActionSummary | PropertyGetSetSummary[source]
+
+ +
+
+configure(app: Sphinx, config) None[source]
+
+ +
+
+__init__(cache: ~typing.Dict[~pathlib.Path, ~blark.summary.CodeSummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.BlarkXRefRole.html b/master/api/blark.sphinxdomain.BlarkXRefRole.html new file mode 100644 index 0000000..69fba53 --- /dev/null +++ b/master/api/blark.sphinxdomain.BlarkXRefRole.html @@ -0,0 +1,231 @@ + + + + + + + blark.sphinxdomain.BlarkXRefRole — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.BlarkXRefRole

+
+
+class blark.sphinxdomain.BlarkXRefRole(fix_parens: bool = False, lowercase: bool = False, nodeclass: type[Element] | None = None, innernodeclass: type[TextElement] | None = None, warn_dangling: bool = False)[source]
+

Bases: XRefRole

+

Methods

+ + + + + + +

process_link(env, refnode, ...)

Called after parsing title and target text, and creating the reference node (given in refnode).

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

env

Reference to the BuildEnvironment object.

explicit_title_re

has_explicit_title

A boolean indicates the role has explicit title or not.

disabled

A boolean indicates the reference is disabled.

title

The link title for the interpreted text.

target

The link target for the interpreted text.

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

inliner

The docutils.parsers.rst.states.Inliner object.

options

A dictionary of directive options for customisation (from the "role" directive).

content

A list of strings, the directive content for customisation (from the "role" directive).

+
+ +

Called after parsing title and target text, and creating the +reference node (given in refnode). This method can alter the +reference node and must return a new (or the same) (title, target) +tuple.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.DeclarationDirective.html b/master/api/blark.sphinxdomain.DeclarationDirective.html new file mode 100644 index 0000000..b806641 --- /dev/null +++ b/master/api/blark.sphinxdomain.DeclarationDirective.html @@ -0,0 +1,270 @@ + + + + + + + blark.sphinxdomain.DeclarationDirective — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.DeclarationDirective

+
+
+class blark.sphinxdomain.DeclarationDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
+

Bases: BlarkDirective

+

Methods

+ + + + + + + + + +

handle_signature(sig, signode)

Parse the signature sig into individual nodes and append them to signode.

transform_content(contentnode)

Called after creating the content through nested parsing, but before the object-description-transform event is emitted, and before the info-fields are transformed.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

doc_field_types

domain

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

indexnode

objtype

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

block_header

obj

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

options

A dictionary of directive options for customization ("role" directive).

content

A list of strings, the directive content for customization ("role" directive).

+
+
+block_header: str
+
+ +
+
+obj: DeclarationSummary
+
+ +
+
+handle_signature(sig: str, signode: desc_signature) Tuple[str, str][source]
+

Parse the signature sig into individual nodes and append them to +signode. If ValueError is raised, parsing is aborted and the whole +sig is put into a single desc_name node.

+

The return value should be a value that identifies the object. It is +passed to add_target_and_index() unchanged, and otherwise only +used to skip duplicates.

+
+ +
+
+transform_content(contentnode: desc_content) None[source]
+

Called after creating the content through nested parsing, +but before the object-description-transform event is emitted, +and before the info-fields are transformed. +Can be used to manipulate the content.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.FunctionBlockDirective.html b/master/api/blark.sphinxdomain.FunctionBlockDirective.html new file mode 100644 index 0000000..d24e49c --- /dev/null +++ b/master/api/blark.sphinxdomain.FunctionBlockDirective.html @@ -0,0 +1,244 @@ + + + + + + + blark.sphinxdomain.FunctionBlockDirective — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.FunctionBlockDirective

+
+
+class blark.sphinxdomain.FunctionBlockDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
+

Bases: BlarkDirectiveWithDeclarations

+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

doc_field_types

domain

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

indexnode

objtype

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

signature_prefix

obj

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

options

A dictionary of directive options for customization ("role" directive).

content

A list of strings, the directive content for customization ("role" directive).

+
+
+obj: FunctionBlockSummary
+
+ +
+
+signature_prefix: ClassVar[str] = 'FUNCTION_BLOCK'
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.FunctionDirective.html b/master/api/blark.sphinxdomain.FunctionDirective.html new file mode 100644 index 0000000..dc675d9 --- /dev/null +++ b/master/api/blark.sphinxdomain.FunctionDirective.html @@ -0,0 +1,249 @@ + + + + + + + blark.sphinxdomain.FunctionDirective — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.FunctionDirective

+
+
+class blark.sphinxdomain.FunctionDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
+

Bases: BlarkDirectiveWithDeclarations

+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

doc_field_types

domain

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

indexnode

objtype

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

signature_prefix

obj

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

options

A dictionary of directive options for customization ("role" directive).

content

A list of strings, the directive content for customization ("role" directive).

+
+
+obj: FunctionSummary
+
+ +
+
+signature_prefix: ClassVar[str] = 'FUNCTION'
+
+ +
+
+doc_field_types: List[Field] = [<sphinx.util.docfields.GroupedField object>, <sphinx.util.docfields.Field object>]
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.GvlDirective.html b/master/api/blark.sphinxdomain.GvlDirective.html new file mode 100644 index 0000000..4ea6c03 --- /dev/null +++ b/master/api/blark.sphinxdomain.GvlDirective.html @@ -0,0 +1,244 @@ + + + + + + + blark.sphinxdomain.GvlDirective — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.GvlDirective

+
+
+class blark.sphinxdomain.GvlDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
+

Bases: BlarkDirectiveWithDeclarations

+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

doc_field_types

domain

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

indexnode

objtype

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

signature_prefix

obj

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

options

A dictionary of directive options for customization ("role" directive).

content

A list of strings, the directive content for customization ("role" directive).

+
+
+obj: GlobalVariableSummary
+
+ +
+
+signature_prefix: ClassVar[str] = 'GVL'
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.MissingDeclaration.html b/master/api/blark.sphinxdomain.MissingDeclaration.html new file mode 100644 index 0000000..4523427 --- /dev/null +++ b/master/api/blark.sphinxdomain.MissingDeclaration.html @@ -0,0 +1,217 @@ + + + + + + + blark.sphinxdomain.MissingDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.MissingDeclaration

+
+
+class blark.sphinxdomain.MissingDeclaration(name: str)[source]
+

Bases: object

+

Methods

+ + + + + + +

__init__(name)

+

Attributes

+ + + + + + + + + + + + + + + +

name

declarations

declarations_by_block

source_code

+
+
+__init__(name: str)[source]
+
+ +
+
+declarations: dict
+
+ +
+
+declarations_by_block: dict
+
+ +
+
+name: str
+
+ +
+
+source_code: str
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.ProgramDirective.html b/master/api/blark.sphinxdomain.ProgramDirective.html new file mode 100644 index 0000000..686bf5f --- /dev/null +++ b/master/api/blark.sphinxdomain.ProgramDirective.html @@ -0,0 +1,244 @@ + + + + + + + blark.sphinxdomain.ProgramDirective — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.ProgramDirective

+
+
+class blark.sphinxdomain.ProgramDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
+

Bases: BlarkDirectiveWithDeclarations

+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

doc_field_types

domain

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

indexnode

objtype

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

signature_prefix

obj

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

options

A dictionary of directive options for customization ("role" directive).

content

A list of strings, the directive content for customization ("role" directive).

+
+
+obj: ProgramSummary
+
+ +
+
+signature_prefix: ClassVar[str] = 'PROGRAM'
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.TypeDirective.html b/master/api/blark.sphinxdomain.TypeDirective.html new file mode 100644 index 0000000..f172f2c --- /dev/null +++ b/master/api/blark.sphinxdomain.TypeDirective.html @@ -0,0 +1,244 @@ + + + + + + + blark.sphinxdomain.TypeDirective — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.TypeDirective

+
+
+class blark.sphinxdomain.TypeDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
+

Bases: BlarkDirectiveWithDeclarations

+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

doc_field_types

domain

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

indexnode

objtype

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

signature_prefix

obj

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

options

A dictionary of directive options for customization ("role" directive).

content

A list of strings, the directive content for customization ("role" directive).

+
+
+obj: DataTypeSummary
+
+ +
+
+signature_prefix: ClassVar[str] = 'TYPE'
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.VariableBlockDirective.html b/master/api/blark.sphinxdomain.VariableBlockDirective.html new file mode 100644 index 0000000..f04d91c --- /dev/null +++ b/master/api/blark.sphinxdomain.VariableBlockDirective.html @@ -0,0 +1,278 @@ + + + + + + + blark.sphinxdomain.VariableBlockDirective — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.VariableBlockDirective

+
+
+class blark.sphinxdomain.VariableBlockDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
+

Bases: BlarkDirective

+

Methods

+ + + + + + + + + +

handle_signature(sig, signode)

Parse the signature sig into individual nodes and append them to signode.

transform_content(contentnode)

Called after creating the content through nested parsing, but before the object-description-transform event is emitted, and before the info-fields are transformed.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

config

Reference to the Config object.

doc_field_types

domain

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

indexnode

objtype

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

block_header

parent_name

declarations

name

The role name actually used in the document.

rawtext

A string containing the entire interpreted text input.

text

The interpreted text content.

lineno

The line number where the interpreted text begins.

options

A dictionary of directive options for customization ("role" directive).

content

A list of strings, the directive content for customization ("role" directive).

+
+
+block_header: str
+
+ +
+
+parent_name: str
+
+ +
+
+declarations: List[DeclarationSummary] | None
+
+ +
+
+handle_signature(sig: str, signode: desc_signature) Tuple[str, str][source]
+

Parse the signature sig into individual nodes and append them to +signode. If ValueError is raised, parsing is aborted and the whole +sig is put into a single desc_name node.

+

The return value should be a value that identifies the object. It is +passed to add_target_and_index() unchanged, and otherwise only +used to skip duplicates.

+
+ +
+
+transform_content(contentnode: desc_content) None[source]
+

Called after creating the content through nested parsing, +but before the object-description-transform event is emitted, +and before the info-fields are transformed. +Can be used to manipulate the content.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.declaration_to_content.html b/master/api/blark.sphinxdomain.declaration_to_content.html new file mode 100644 index 0000000..a664518 --- /dev/null +++ b/master/api/blark.sphinxdomain.declaration_to_content.html @@ -0,0 +1,166 @@ + + + + + + + blark.sphinxdomain.declaration_to_content — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.declaration_to_content

+
+
+blark.sphinxdomain.declaration_to_content(obj: DeclarationSummary) Generator[paragraph, None, None][source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.declaration_to_signature.html b/master/api/blark.sphinxdomain.declaration_to_signature.html new file mode 100644 index 0000000..a41ed5f --- /dev/null +++ b/master/api/blark.sphinxdomain.declaration_to_signature.html @@ -0,0 +1,166 @@ + + + + + + + blark.sphinxdomain.declaration_to_signature — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.declaration_to_signature

+
+
+blark.sphinxdomain.declaration_to_signature(signode: desc_signature, obj: DeclarationSummary, *, env: BuildEnvironment | None = None)[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.declarations_to_block.html b/master/api/blark.sphinxdomain.declarations_to_block.html new file mode 100644 index 0000000..e776dbd --- /dev/null +++ b/master/api/blark.sphinxdomain.declarations_to_block.html @@ -0,0 +1,166 @@ + + + + + + + blark.sphinxdomain.declarations_to_block — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.sphinxdomain.declarations_to_block

+
+
+blark.sphinxdomain.declarations_to_block(declarations: Iterable[DeclarationSummary], *, env: BuildEnvironment | None = None) Generator[desc, None, None][source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.sphinxdomain.setup.html b/master/api/blark.sphinxdomain.setup.html new file mode 100644 index 0000000..9917109 --- /dev/null +++ b/master/api/blark.sphinxdomain.setup.html @@ -0,0 +1,166 @@ + + + + + + + blark.sphinxdomain.setup — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.summary.ActionSummary.html b/master/api/blark.summary.ActionSummary.html new file mode 100644 index 0000000..c6b4ad5 --- /dev/null +++ b/master/api/blark.summary.ActionSummary.html @@ -0,0 +1,246 @@ + + + + + + + blark.summary.ActionSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.ActionSummary

+
+
+class blark.summary.ActionSummary(comments: List[str], pragmas: List[str], filename: Path | None, meta: Meta | None, name: str, item: Action, source_code: str, implementation: StatementList | None = None)[source]
+

Bases: Summary

+

Summary representation of a single action.

+

Methods

+ + + + + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_action(action[, source_code, filename])

from_statement_list(name, statements[, ...])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

implementation

name

item

source_code

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+item: Action
+
+ +
+
+source_code: str
+
+ +
+
+implementation: StatementList | None = None
+
+ +
+
+classmethod from_statement_list(name: str, statements: StatementList, source_code: str | None = None, filename: Path | None = None) ActionSummary[source]
+
+ +
+
+classmethod from_action(action: Action, source_code: str | None = None, filename: Path | None = None) ActionSummary[source]
+
+ +
+
+__init__(comments: List[str], pragmas: List[str], filename: Path | None, meta: Meta | None, name: str, item: Action, source_code: str, implementation: StatementList | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.CodeSummary.html b/master/api/blark.summary.CodeSummary.html new file mode 100644 index 0000000..4078468 --- /dev/null +++ b/master/api/blark.summary.CodeSummary.html @@ -0,0 +1,334 @@ + + + + + + + blark.summary.CodeSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.CodeSummary

+
+
+class blark.summary.CodeSummary(functions: ~typing.Dict[str, ~blark.summary.FunctionSummary] = <factory>, function_blocks: ~typing.Dict[str, ~blark.summary.FunctionBlockSummary] = <factory>, data_types: ~typing.Dict[str, ~blark.summary.DataTypeSummary] = <factory>, programs: ~typing.Dict[str, ~blark.summary.ProgramSummary] = <factory>, globals: ~typing.Dict[str, ~blark.summary.GlobalVariableSummary] = <factory>, interfaces: ~typing.Dict[str, ~blark.summary.InterfaceSummary] = <factory>)[source]
+

Bases: object

+

Summary representation of a set of code - functions, function blocks, etc.

+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

__init__([functions, function_blocks, ...])

append(other[, namespace])

In-place add code summary information from another instance.

find(name)

Find a declaration or other item by its qualified name.

find_code_object_by_dotted_name(name)

Given a qualified code object name, find its Summary object(s).

find_path(name[, allow_partial])

Given a qualified variable name, find the path of CodeSummary objects top-down.

from_parse_results(all_parsed_items[, squash])

get_all_items_by_name(name)

Get any code item (function, data type, global variable, etc.) by name.

get_item_by_name(name)

Get a single code item (function, data type, global variable, etc.) by name.

squash()

Squash derived interfaces/etc to include base summaries.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

functions

function_blocks

data_types

programs

globals

interfaces

+
+
+functions: Dict[str, FunctionSummary]
+
+ +
+
+function_blocks: Dict[str, FunctionBlockSummary]
+
+ +
+
+data_types: Dict[str, DataTypeSummary]
+
+ +
+
+programs: Dict[str, ProgramSummary]
+
+ +
+
+globals: Dict[str, GlobalVariableSummary]
+
+ +
+
+interfaces: Dict[str, InterfaceSummary]
+
+ +
+
+find(name: str) FunctionSummary | FunctionBlockSummary | DataTypeSummary | ProgramSummary | InterfaceSummary | GlobalVariableSummary | DeclarationSummary | MethodSummary | PropertySummary | ActionSummary | PropertyGetSetSummary | None[source]
+

Find a declaration or other item by its qualified name.

+
+ +
+
+find_path(name: str, allow_partial: bool = False) List[FunctionSummary | FunctionBlockSummary | DataTypeSummary | ProgramSummary | InterfaceSummary | GlobalVariableSummary | DeclarationSummary | MethodSummary | PropertySummary | ActionSummary | PropertyGetSetSummary] | None[source]
+

Given a qualified variable name, find the path of CodeSummary objects top-down.

+

For example, a variable declared in a function block would return a +list containing the FunctionBlockSummary and then the +DeclarationSummary.

+
+
Parameters:
+
+
namestr

The qualified (“dotted”) variable name to find.

+
+
allow_partialbool, optional

If an attribute is missing along the way, return the partial +path that was found.

+
+
+
+
Returns:
+
+
list of CodeSummaryType or None

The full path to the given object.

+
+
+
+
+
+ +
+
+find_code_object_by_dotted_name(name: str) FunctionSummary | FunctionBlockSummary | DataTypeSummary | ProgramSummary | InterfaceSummary | GlobalVariableSummary | DeclarationSummary | MethodSummary | PropertySummary | ActionSummary | PropertyGetSetSummary | None[source]
+

Given a qualified code object name, find its Summary object(s).

+

This works to find CodeSummary objects such as:

+
FB_Block.ActionName
+FB_Block.PropertyName.get
+FB_Block.PropertyName.set
+
+
+
+ +
+
+get_all_items_by_name(name: str) Generator[FunctionSummary | FunctionBlockSummary | DataTypeSummary | ProgramSummary | InterfaceSummary | GlobalVariableSummary, None, None][source]
+

Get any code item (function, data type, global variable, etc.) by name.

+
+ +
+
+get_item_by_name(name: str) FunctionSummary | FunctionBlockSummary | DataTypeSummary | ProgramSummary | InterfaceSummary | GlobalVariableSummary | None[source]
+

Get a single code item (function, data type, global variable, etc.) by name.

+

Does not handle scenarios where names are shadowed by other +declarations. The first one found will take precedence.

+
+ +
+
+append(other: CodeSummary, namespace: str | None = None)[source]
+

In-place add code summary information from another instance.

+

New entries take precedence over old ones.

+
+ +
+
+static from_parse_results(all_parsed_items: ParseResult | list[ParseResult], squash: bool = True) CodeSummary[source]
+
+ +
+
+squash() None[source]
+

Squash derived interfaces/etc to include base summaries.

+
+ +
+
+__init__(functions: ~typing.Dict[str, ~blark.summary.FunctionSummary] = <factory>, function_blocks: ~typing.Dict[str, ~blark.summary.FunctionBlockSummary] = <factory>, data_types: ~typing.Dict[str, ~blark.summary.DataTypeSummary] = <factory>, programs: ~typing.Dict[str, ~blark.summary.ProgramSummary] = <factory>, globals: ~typing.Dict[str, ~blark.summary.GlobalVariableSummary] = <factory>, interfaces: ~typing.Dict[str, ~blark.summary.InterfaceSummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.DataTypeSummary.html b/master/api/blark.summary.DataTypeSummary.html new file mode 100644 index 0000000..96dc3a7 --- /dev/null +++ b/master/api/blark.summary.DataTypeSummary.html @@ -0,0 +1,279 @@ + + + + + + + blark.summary.DataTypeSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.DataTypeSummary

+
+
+class blark.summary.DataTypeSummary(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, item: ~blark.transform.ArrayTypeDeclaration | ~blark.transform.StructureTypeDeclaration | ~blark.transform.StringTypeDeclaration | ~blark.transform.SimpleTypeDeclaration | ~blark.transform.SubrangeTypeDeclaration | ~blark.transform.EnumeratedTypeDeclaration | ~blark.transform.UnionTypeDeclaration, source_code: str, type: str, extends: str | None, squashed: bool = False, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>)[source]
+

Bases: Summary

+

Summary representation of a single data type.

+

Methods

+ + + + + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_data_type(dtype[, source_code, filename])

squash_base_extends(data_types)

Squash the "EXTENDS" function block into this one.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

declarations_by_block

squashed

name

item

source_code

type

extends

declarations

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+item: ArrayTypeDeclaration | StructureTypeDeclaration | StringTypeDeclaration | SimpleTypeDeclaration | SubrangeTypeDeclaration | EnumeratedTypeDeclaration | UnionTypeDeclaration
+
+ +
+
+source_code: str
+
+ +
+
+type: str
+
+ +
+
+extends: str | None
+
+ +
+
+squashed: bool = False
+
+ +
+
+declarations: Dict[str, DeclarationSummary]
+
+ +
+
+property declarations_by_block: Dict[str, Dict[str, DeclarationSummary]]
+
+ +
+
+classmethod from_data_type(dtype: ArrayTypeDeclaration | StructureTypeDeclaration | StringTypeDeclaration | SimpleTypeDeclaration | SubrangeTypeDeclaration | EnumeratedTypeDeclaration | UnionTypeDeclaration, source_code: str | None = None, filename: Path | None = None) DataTypeSummary[source]
+
+ +
+
+squash_base_extends(data_types: Dict[str, DataTypeSummary]) DataTypeSummary[source]
+

Squash the “EXTENDS” function block into this one.

+
+ +
+
+__init__(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, item: ~blark.transform.ArrayTypeDeclaration | ~blark.transform.StructureTypeDeclaration | ~blark.transform.StringTypeDeclaration | ~blark.transform.SimpleTypeDeclaration | ~blark.transform.SubrangeTypeDeclaration | ~blark.transform.EnumeratedTypeDeclaration | ~blark.transform.UnionTypeDeclaration, source_code: str, type: str, extends: str | None, squashed: bool = False, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.DeclarationSummary.html b/master/api/blark.summary.DeclarationSummary.html new file mode 100644 index 0000000..55bc8ae --- /dev/null +++ b/master/api/blark.summary.DeclarationSummary.html @@ -0,0 +1,304 @@ + + + + + + + blark.summary.DeclarationSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.DeclarationSummary

+
+
+class blark.summary.DeclarationSummary(comments: List[str], pragmas: List[str], filename: pathlib.Path | None, meta: tf.Meta | None, name: str, item: tf.Declaration | tf.GlobalVariableDeclaration | tf.VariableInitDeclaration | tf.StructureElementDeclaration | tf.UnionElementDeclaration | tf.ExternalVariableDeclaration | tf.InitDeclaration, parent: str | None, location: str | None, block: str, base_type: str, type: str, value: str | None)[source]
+

Bases: Summary

+

Summary representation of a single declaration.

+

Methods

+ + + + + + + + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_block(block, parent[, filename])

from_declaration(item[, parent, ...])

from_global_variable(item[, parent, ...])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

location_type

If located, one of {'input', 'output', 'memory"}.

qualified_name

Qualified name including parent.

name

item

parent

location

block

base_type

type

value

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+item: tf.Declaration | tf.GlobalVariableDeclaration | tf.VariableInitDeclaration | tf.StructureElementDeclaration | tf.UnionElementDeclaration | tf.ExternalVariableDeclaration | tf.InitDeclaration
+
+ +
+
+parent: str | None
+
+ +
+
+location: str | None
+
+ +
+
+block: str
+
+ +
+
+base_type: str
+
+ +
+
+type: str
+
+ +
+
+value: str | None
+
+ +
+
+property qualified_name: str
+

Qualified name including parent. For example, fbName.DeclName.

+
+ +
+
+property location_type: Literal['input', 'output', 'memory'] | None
+

If located, one of {‘input’, ‘output’, ‘memory”}.

+
+ +
+
+classmethod from_declaration(item: InitDeclaration | StructureElementDeclaration | UnionElementDeclaration, parent: Function | Method | FunctionBlock | StructureTypeDeclaration | None = None, block_header: str = 'unknown', filename: Path | None = None) Dict[str, DeclarationSummary][source]
+
+ +
+
+classmethod from_global_variable(item: GlobalVariableDeclaration, parent: GlobalVariableDeclarations | None = None, block_header: str = 'VAR_GLOBAL', filename: Path | None = None) Dict[str, DeclarationSummary][source]
+
+ +
+
+classmethod from_block(block: VariableDeclarationBlock, parent: Function | Method | FunctionBlock, filename: Path | None = None) Dict[str, DeclarationSummary][source]
+
+ +
+
+__init__(comments: List[str], pragmas: List[str], filename: pathlib.Path | None, meta: tf.Meta | None, name: str, item: tf.Declaration | tf.GlobalVariableDeclaration | tf.VariableInitDeclaration | tf.StructureElementDeclaration | tf.UnionElementDeclaration | tf.ExternalVariableDeclaration | tf.InitDeclaration, parent: str | None, location: str | None, block: str, base_type: str, type: str, value: str | None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.FunctionBlockSummary.html b/master/api/blark.summary.FunctionBlockSummary.html new file mode 100644 index 0000000..615b003 --- /dev/null +++ b/master/api/blark.summary.FunctionBlockSummary.html @@ -0,0 +1,303 @@ + + + + + + + blark.summary.FunctionBlockSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.FunctionBlockSummary

+
+
+class blark.summary.FunctionBlockSummary(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, source_code: str, item: ~blark.transform.FunctionBlock, extends: str | None, squashed: bool, implementation: ~blark.transform.StatementList | None = None, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>, actions: ~typing.List[~blark.summary.ActionSummary] = <factory>, methods: ~typing.List[~blark.summary.MethodSummary] = <factory>, properties: ~typing.List[~blark.summary.PropertySummary] = <factory>)[source]
+

Bases: Summary

+

Summary representation of a single function block.

+

Methods

+ + + + + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_function_block(fb[, source_code, filename])

squash_base_extends(function_blocks)

Squash the "EXTENDS" function block into this one.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

declarations_by_block

implementation

name

source_code

item

extends

squashed

declarations

actions

methods

properties

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+source_code: str
+
+ +
+
+item: FunctionBlock
+
+ +
+
+extends: str | None
+
+ +
+
+squashed: bool
+
+ +
+
+implementation: StatementList | None = None
+
+ +
+
+declarations: Dict[str, DeclarationSummary]
+
+ +
+
+actions: List[ActionSummary]
+
+ +
+
+methods: List[MethodSummary]
+
+ +
+
+properties: List[PropertySummary]
+
+ +
+
+property declarations_by_block: Dict[str, Dict[str, DeclarationSummary]]
+
+ +
+
+classmethod from_function_block(fb: FunctionBlock, source_code: str | None = None, filename: Path | None = None) FunctionBlockSummary[source]
+
+ +
+
+squash_base_extends(function_blocks: Dict[str, FunctionBlockSummary]) FunctionBlockSummary[source]
+

Squash the “EXTENDS” function block into this one.

+
+ +
+
+__init__(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, source_code: str, item: ~blark.transform.FunctionBlock, extends: str | None, squashed: bool, implementation: ~blark.transform.StatementList | None = None, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>, actions: ~typing.List[~blark.summary.ActionSummary] = <factory>, methods: ~typing.List[~blark.summary.MethodSummary] = <factory>, properties: ~typing.List[~blark.summary.PropertySummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.FunctionSummary.html b/master/api/blark.summary.FunctionSummary.html new file mode 100644 index 0000000..4e9ee06 --- /dev/null +++ b/master/api/blark.summary.FunctionSummary.html @@ -0,0 +1,262 @@ + + + + + + + blark.summary.FunctionSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.FunctionSummary

+
+
+class blark.summary.FunctionSummary(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, item: ~blark.transform.Function, return_type: str | None, source_code: str, implementation: ~blark.transform.StatementList | None = None, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>)[source]
+

Bases: Summary

+

Summary representation of a single function.

+

Methods

+ + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_function(func[, source_code, filename])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

declarations_by_block

implementation

name

item

return_type

source_code

declarations

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+item: Function
+
+ +
+
+return_type: str | None
+
+ +
+
+source_code: str
+
+ +
+
+implementation: StatementList | None = None
+
+ +
+
+declarations: Dict[str, DeclarationSummary]
+
+ +
+
+property declarations_by_block: Dict[str, Dict[str, DeclarationSummary]]
+
+ +
+
+classmethod from_function(func: Function, source_code: str | None = None, filename: Path | None = None) FunctionSummary[source]
+
+ +
+
+__init__(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, item: ~blark.transform.Function, return_type: str | None, source_code: str, implementation: ~blark.transform.StatementList | None = None, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.GlobalVariableSummary.html b/master/api/blark.summary.GlobalVariableSummary.html new file mode 100644 index 0000000..60934c7 --- /dev/null +++ b/master/api/blark.summary.GlobalVariableSummary.html @@ -0,0 +1,262 @@ + + + + + + + blark.summary.GlobalVariableSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.GlobalVariableSummary

+
+
+class blark.summary.GlobalVariableSummary(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, item: ~blark.transform.GlobalVariableDeclarations, source_code: str, type: str, qualified_only: bool = False, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>)[source]
+

Bases: Summary

+

Summary representation of a VAR_GLOBAL block.

+

Methods

+ + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_globals(decls[, source_code, filename])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

declarations_by_block

qualified_only

name

item

source_code

type

declarations

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+item: GlobalVariableDeclarations
+
+ +
+
+source_code: str
+
+ +
+
+type: str
+
+ +
+
+qualified_only: bool = False
+
+ +
+
+declarations: Dict[str, DeclarationSummary]
+
+ +
+
+property declarations_by_block: Dict[str, Dict[str, DeclarationSummary]]
+
+ +
+
+classmethod from_globals(decls: GlobalVariableDeclarations, source_code: str | None = None, filename: Path | None = None) GlobalVariableSummary[source]
+
+ +
+
+__init__(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, item: ~blark.transform.GlobalVariableDeclarations, source_code: str, type: str, qualified_only: bool = False, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.InterfaceSummary.html b/master/api/blark.summary.InterfaceSummary.html new file mode 100644 index 0000000..c3fffb0 --- /dev/null +++ b/master/api/blark.summary.InterfaceSummary.html @@ -0,0 +1,287 @@ + + + + + + + blark.summary.InterfaceSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.InterfaceSummary

+
+
+class blark.summary.InterfaceSummary(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, source_code: str, item: ~blark.transform.Interface, extends: str | None, squashed: bool, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>, methods: ~typing.List[~blark.summary.MethodSummary] = <factory>, properties: ~typing.List[~blark.summary.PropertySummary] = <factory>)[source]
+

Bases: Summary

+

Summary representation of an Interfae.

+

Methods

+ + + + + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_interface(itf[, source_code, filename])

squash_base_extends(interfaces)

Squash the "EXTENDS" INTERFACE into this one.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

declarations_by_block

name

source_code

item

extends

squashed

declarations

methods

properties

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+source_code: str
+
+ +
+
+item: Interface
+
+ +
+
+extends: str | None
+
+ +
+
+squashed: bool
+
+ +
+
+declarations: Dict[str, DeclarationSummary]
+
+ +
+
+methods: List[MethodSummary]
+
+ +
+
+properties: List[PropertySummary]
+
+ +
+
+property declarations_by_block: Dict[str, Dict[str, DeclarationSummary]]
+
+ +
+
+classmethod from_interface(itf: Interface, source_code: str | None = None, filename: Path | None = None) InterfaceSummary[source]
+
+ +
+
+squash_base_extends(interfaces: Dict[str, InterfaceSummary]) InterfaceSummary[source]
+

Squash the “EXTENDS” INTERFACE into this one.

+
+ +
+
+__init__(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, source_code: str, item: ~blark.transform.Interface, extends: str | None, squashed: bool, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>, methods: ~typing.List[~blark.summary.MethodSummary] = <factory>, properties: ~typing.List[~blark.summary.PropertySummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.LinkableItems.html b/master/api/blark.summary.LinkableItems.html new file mode 100644 index 0000000..a8a4bda --- /dev/null +++ b/master/api/blark.summary.LinkableItems.html @@ -0,0 +1,210 @@ + + + + + + + blark.summary.LinkableItems — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.LinkableItems

+
+
+class blark.summary.LinkableItems(input: ~typing.List[~blark.summary.DeclarationSummary] = <factory>, output: ~typing.List[~blark.summary.DeclarationSummary] = <factory>, memory: ~typing.List[~blark.summary.DeclarationSummary] = <factory>)[source]
+

Bases: object

+

A summary of linkable (located) declarations.

+

Methods

+ + + + + + +

__init__([input, output, memory])

+

Attributes

+ + + + + + + + + + + + +

input

output

memory

+
+
+input: List[DeclarationSummary]
+
+ +
+
+output: List[DeclarationSummary]
+
+ +
+
+memory: List[DeclarationSummary]
+
+ +
+
+__init__(input: ~typing.List[~blark.summary.DeclarationSummary] = <factory>, output: ~typing.List[~blark.summary.DeclarationSummary] = <factory>, memory: ~typing.List[~blark.summary.DeclarationSummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.MethodSummary.html b/master/api/blark.summary.MethodSummary.html new file mode 100644 index 0000000..3fb281e --- /dev/null +++ b/master/api/blark.summary.MethodSummary.html @@ -0,0 +1,262 @@ + + + + + + + blark.summary.MethodSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.MethodSummary

+
+
+class blark.summary.MethodSummary(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, item: ~blark.transform.Method, return_type: str | None, source_code: str, implementation: ~blark.transform.StatementList | None = None, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>)[source]
+

Bases: Summary

+

Summary representation of a single method.

+

Methods

+ + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_method(method[, source_code, filename])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

declarations_by_block

implementation

name

item

return_type

source_code

declarations

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+item: Method
+
+ +
+
+return_type: str | None
+
+ +
+
+source_code: str
+
+ +
+
+implementation: StatementList | None = None
+
+ +
+
+declarations: Dict[str, DeclarationSummary]
+
+ +
+
+property declarations_by_block: Dict[str, Dict[str, DeclarationSummary]]
+
+ +
+
+classmethod from_method(method: Method, source_code: str | None = None, filename: Path | None = None) MethodSummary[source]
+
+ +
+
+__init__(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, item: ~blark.transform.Method, return_type: str | None, source_code: str, implementation: ~blark.transform.StatementList | None = None, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.ProgramSummary.html b/master/api/blark.summary.ProgramSummary.html new file mode 100644 index 0000000..6b9c5cc --- /dev/null +++ b/master/api/blark.summary.ProgramSummary.html @@ -0,0 +1,278 @@ + + + + + + + blark.summary.ProgramSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.ProgramSummary

+
+
+class blark.summary.ProgramSummary(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, source_code: str, item: ~blark.transform.Program, implementation: ~blark.transform.StatementList | None = None, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>, actions: ~typing.List[~blark.summary.ActionSummary] = <factory>, methods: ~typing.List[~blark.summary.MethodSummary] = <factory>, properties: ~typing.List[~blark.summary.PropertySummary] = <factory>)[source]
+

Bases: Summary

+

Summary representation of a single program.

+

Methods

+ + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_program(program[, source_code, filename])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

declarations_by_block

implementation

name

source_code

item

declarations

actions

methods

properties

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+source_code: str
+
+ +
+
+item: Program
+
+ +
+
+implementation: StatementList | None = None
+
+ +
+
+declarations: Dict[str, DeclarationSummary]
+
+ +
+
+actions: List[ActionSummary]
+
+ +
+
+methods: List[MethodSummary]
+
+ +
+
+properties: List[PropertySummary]
+
+ +
+
+property declarations_by_block: Dict[str, Dict[str, DeclarationSummary]]
+
+ +
+
+classmethod from_program(program: Program, source_code: str | None = None, filename: Path | None = None) ProgramSummary[source]
+
+ +
+
+__init__(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, source_code: str, item: ~blark.transform.Program, implementation: ~blark.transform.StatementList | None = None, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>, actions: ~typing.List[~blark.summary.ActionSummary] = <factory>, methods: ~typing.List[~blark.summary.MethodSummary] = <factory>, properties: ~typing.List[~blark.summary.PropertySummary] = <factory>) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.PropertyGetSetSummary.html b/master/api/blark.summary.PropertyGetSetSummary.html new file mode 100644 index 0000000..2639f48 --- /dev/null +++ b/master/api/blark.summary.PropertyGetSetSummary.html @@ -0,0 +1,237 @@ + + + + + + + blark.summary.PropertyGetSetSummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.PropertyGetSetSummary

+
+
+class blark.summary.PropertyGetSetSummary(comments: 'List[str]', pragmas: 'List[str]', filename: 'Optional[pathlib.Path]', meta: 'Optional[tf.Meta]', name: 'str', item: 'tf.Property', source_code: 'str', declarations: 'Dict[str, DeclarationSummary]' = <factory>, implementation: 'Optional[tf.StatementList]' = None)[source]
+

Bases: Summary

+

Methods

+ + + + + + +

__init__(comments, pragmas, filename, meta, ...)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

implementation

name

item

source_code

declarations

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+item: Property
+
+ +
+
+source_code: str
+
+ +
+
+declarations: Dict[str, DeclarationSummary]
+
+ +
+
+implementation: StatementList | None = None
+
+ +
+
+__init__(comments: ~typing.List[str], pragmas: ~typing.List[str], filename: ~pathlib.Path | None, meta: ~blark.transform.Meta | None, name: str, item: ~blark.transform.Property, source_code: str, declarations: ~typing.Dict[str, ~blark.summary.DeclarationSummary] = <factory>, implementation: ~blark.transform.StatementList | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.PropertySummary.html b/master/api/blark.summary.PropertySummary.html new file mode 100644 index 0000000..a243887 --- /dev/null +++ b/master/api/blark.summary.PropertySummary.html @@ -0,0 +1,238 @@ + + + + + + + blark.summary.PropertySummary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.PropertySummary

+
+
+class blark.summary.PropertySummary(comments: List[str], pragmas: List[str], filename: Path | None, meta: Meta | None, name: str, getter: PropertyGetSetSummary, setter: PropertyGetSetSummary, source_code: str)[source]
+

Bases: Summary

+

Summary representation of a single property.

+

Methods

+ + + + + + + + + +

__init__(comments, pragmas, filename, meta, ...)

from_property(property[, source_code, filename])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

name

getter

setter

source_code

comments

pragmas

filename

meta

+
+
+name: str
+
+ +
+
+getter: PropertyGetSetSummary
+
+ +
+
+setter: PropertyGetSetSummary
+
+ +
+
+source_code: str
+
+ +
+
+classmethod from_property(property: Property, source_code: str | None = None, filename: Path | None = None) PropertySummary[source]
+
+ +
+
+__init__(comments: List[str], pragmas: List[str], filename: Path | None, meta: Meta | None, name: str, getter: PropertyGetSetSummary, setter: PropertyGetSetSummary, source_code: str) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.Summary.html b/master/api/blark.summary.Summary.html new file mode 100644 index 0000000..053129b --- /dev/null +++ b/master/api/blark.summary.Summary.html @@ -0,0 +1,226 @@ + + + + + + + blark.summary.Summary — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.Summary

+
+
+class blark.summary.Summary(comments: List[str], pragmas: List[str], filename: Path | None, meta: Meta | None)[source]
+

Bases: object

+

Base class for summary objects.

+

Methods

+ + + + + + + + + +

__init__(comments, pragmas, filename, meta)

get_meta_kwargs(meta)

+

Attributes

+ + + + + + + + + + + + + + + +

comments

pragmas

filename

meta

+
+
+comments: List[str]
+
+ +
+
+pragmas: List[str]
+
+ +
+
+filename: Path | None
+
+ +
+
+meta: Meta | None
+
+ +
+
+static get_meta_kwargs(meta: Meta | None) Dict[str, Any][source]
+
+ +
+
+__init__(comments: List[str], pragmas: List[str], filename: Path | None, meta: Meta | None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.summary.get_linkable_declarations.html b/master/api/blark.summary.get_linkable_declarations.html new file mode 100644 index 0000000..6ed98c8 --- /dev/null +++ b/master/api/blark.summary.get_linkable_declarations.html @@ -0,0 +1,167 @@ + + + + + + + blark.summary.get_linkable_declarations — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.summary.path_to_file_and_line.html b/master/api/blark.summary.path_to_file_and_line.html new file mode 100644 index 0000000..2f08fb0 --- /dev/null +++ b/master/api/blark.summary.path_to_file_and_line.html @@ -0,0 +1,167 @@ + + + + + + + blark.summary.path_to_file_and_line — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.summary.text_outline.html b/master/api/blark.summary.text_outline.html new file mode 100644 index 0000000..8301f2e --- /dev/null +++ b/master/api/blark.summary.text_outline.html @@ -0,0 +1,183 @@ + + + + + + + blark.summary.text_outline — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.summary.text_outline

+
+
+blark.summary.text_outline(item: Any) str | None[source]
+

Get a generic multiline string representation of the given object.

+

Attempts to include field information for dataclasses, put list items +on separate lines, and generally keep sensible indentation.

+
+
Parameters:
+
+
itemAny

The item to outline.

+
+
+
+
Returns:
+
+
formattedstr or None

The formatted result.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.AccessDeclaration.html b/master/api/blark.transform.AccessDeclaration.html new file mode 100644 index 0000000..cc3fe57 --- /dev/null +++ b/master/api/blark.transform.AccessDeclaration.html @@ -0,0 +1,390 @@ + + + + + + + blark.transform.AccessDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.AccessDeclaration

+
+
+class blark.transform.AccessDeclaration(name: Token, variable: SimpleVariable | MultiElementVariable, type: DataType, direction: Token | None, meta: Meta | None = None)[source]
+

Bases: object

+

A single, named program access declaration.

+

Examples:

+
AccessName : SymbolicVariable : TypeName READ_WRITE;
+AccessName1 : SymbolicVariable1 : TypeName1 READ_ONLY;
+AccessName2 : SymbolicVariable2 : TypeName2;
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

program_access_decl

+
program_access_decl: access_name ":" symbolic_variable ":" non_generic_type_name [ access_direction ]
+
+
+

Methods

+ + + + + + + + + +

__init__(name, variable, type, direction[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

meta

name

variable

type

direction

+
+
+name: Token
+
+ +
+
+variable: SimpleVariable | MultiElementVariable
+
+ +
+
+type: DataType
+
+ +
+
+direction: Token | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: Token, variable: SimpleVariable | MultiElementVariable, type: DataType, direction: Token | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.AccessDeclarations.html b/master/api/blark.transform.AccessDeclarations.html new file mode 100644 index 0000000..833c8a0 --- /dev/null +++ b/master/api/blark.transform.AccessDeclarations.html @@ -0,0 +1,377 @@ + + + + + + + blark.transform.AccessDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.AccessDeclarations

+
+
+class blark.transform.AccessDeclarations(items: List[AccessDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

A block of named, program access variable declarations (VAR_ACCESS).

+
+

See also

+
+
AccessDeclaration
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

program_access_decls

+
program_access_decls: "VAR_ACCESS"i (program_access_decl ";"+)+ "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(items[, meta])

from_lark(*items)

+

Attributes

+ + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

items

+
+
+block_header: ClassVar[str] = 'VAR_ACCESS'
+
+ +
+
+items: List[AccessDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*items: AccessDeclaration) AccessDeclarations[source]
+
+ +
+
+__init__(items: List[AccessDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.AccessSpecifier.html b/master/api/blark.transform.AccessSpecifier.html new file mode 100644 index 0000000..de0352d --- /dev/null +++ b/master/api/blark.transform.AccessSpecifier.html @@ -0,0 +1,371 @@ + + + + + + + blark.transform.AccessSpecifier — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.AccessSpecifier

+
+
+class blark.transform.AccessSpecifier(value)[source]
+

Bases: _FlagHelper, IntFlag

+

An enumeration.

+

Lark grammar

+

This class is used by the following grammar rules:

+

access_specifier

+
access_specifier: ACCESS_SPECIFIER+
+
+
+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

public

private

abstract

protected

internal

final

+
+
+public = 1
+
+ +
+
+private = 2
+
+ +
+
+abstract = 4
+
+ +
+
+protected = 8
+
+ +
+
+internal = 16
+
+ +
+
+final = 32
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Action.html b/master/api/blark.transform.Action.html new file mode 100644 index 0000000..09111a6 --- /dev/null +++ b/master/api/blark.transform.Action.html @@ -0,0 +1,381 @@ + + + + + + + blark.transform.Action — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Action

+
+
+class blark.transform.Action(name: Token, body: StatementList | None, meta: Meta | None = None)[source]
+

Bases: object

+

A full, named action declaration.

+

Actions belong to function blocks. Actions may not contain variable blocks, +but may contain an implementation. Variable references are assumed to be +from the local namespace (i.e., the owner function block) or in the global +scope.

+

Examples:

+
ACTION ActName
+END_ACTION
+
+ACTION ActName
+    iValue := iValue + 2;
+END_ACTION
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

action

+
action: "ACTION"i action_name ":" [ function_block_body ] "END_ACTION"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(name, body[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

name

body

+
+
+name: Token
+
+ +
+
+body: StatementList | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: Token, body: StatementList | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ArrayInitialElement.html b/master/api/blark.transform.ArrayInitialElement.html new file mode 100644 index 0000000..2fd8a2a --- /dev/null +++ b/master/api/blark.transform.ArrayInitialElement.html @@ -0,0 +1,378 @@ + + + + + + + blark.transform.ArrayInitialElement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ArrayInitialElement

+
+
+class blark.transform.ArrayInitialElement(element: Expression | StructureInitialization | EnumeratedValue | ArrayInitialization, count: EnumeratedValue | Integer | None = None, meta: Meta | None = None)[source]
+

Bases: object

+

Initial value for an array element (potentialy repeated).

+

The element itself may be an expression, a structure initialization, an +enumerated value, or an array initialization.

+

It may have a repeat value (count) as in:

+
Repeat(Value)
+10(5)
+Repeat(5 + 3)
+INT#IdentifierB(5 + 3)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

array_initial_element

+
array_initial_element: ( integer | enumerated_value ) "(" [ _array_initial_element ] ")" -> array_initial_element_count
+                     | _array_initial_element
+
+
+

Methods

+ + + + + + + + + +

__init__(element[, count, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

count

meta

element

+
+
+element: Expression | StructureInitialization | EnumeratedValue | ArrayInitialization
+
+ +
+
+count: EnumeratedValue | Integer | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(element: Expression | StructureInitialization | EnumeratedValue | ArrayInitialization, count: EnumeratedValue | Integer | None = None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ArrayInitialization.html b/master/api/blark.transform.ArrayInitialization.html new file mode 100644 index 0000000..24f526f --- /dev/null +++ b/master/api/blark.transform.ArrayInitialization.html @@ -0,0 +1,359 @@ + + + + + + + blark.transform.ArrayInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ArrayInitialization

+
+
+class blark.transform.ArrayInitialization(elements: List[ArrayInitialElement], brackets: bool = False, meta: Meta | None = None)[source]
+

Bases: object

+

Array initialization (bare or bracketed).

+

Examples:

+
[1, 2, 3]
+1, 2, 3
+
+
+

Methods

+ + + + + + +

__init__(elements[, brackets, meta])

+

Attributes

+ + + + + + + + + + + + +

brackets

meta

elements

+
+
+elements: List[ArrayInitialElement]
+
+ +
+
+brackets: bool = False
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(elements: List[ArrayInitialElement], brackets: bool = False, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ArraySpecification.html b/master/api/blark.transform.ArraySpecification.html new file mode 100644 index 0000000..1eab82e --- /dev/null +++ b/master/api/blark.transform.ArraySpecification.html @@ -0,0 +1,398 @@ + + + + + + + blark.transform.ArraySpecification — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ArraySpecification

+
+
+class blark.transform.ArraySpecification(subranges: List[Subrange], type: DataType | FunctionCall | ObjectInitializerArray | ArraySpecification | StringTypeSpecification, meta: Meta | None = None)[source]
+

Bases: TypeSpecificationBase

+

An array specification.

+

Examples:

+
ARRAY[*] OF TypeName
+ARRAY[1..2] OF Call(1, 2)
+ARRAY[1..2] OF Call(1, 2)
+ARRAY[1..5] OF Vec(SIZEOF(TestStruct), 0)
+ARRAY[1..5] OF STRING[10]
+ARRAY[1..5] OF STRING(Param.iLower)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

array_specification

+
array_specification: "ARRAY"i "[" subrange ( "," subrange )* "]" "OF"i _array_spec_type
+
+
+

Methods

+ + + + + + + + + +

__init__(subranges, type[, meta])

from_lark(*args)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full type name.

meta

type_info

The base type name.

subranges

type

+
+
+subranges: List[Subrange]
+
+ +
+
+type: DataType | FunctionCall | ObjectInitializerArray | ArraySpecification | StringTypeSpecification
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property base_type_name: str | Token
+

The base type name.

+
+ +
+
+property full_type_name: str
+

The full type name.

+
+ +
+
+static from_lark(*args)[source]
+
+ +
+
+__init__(subranges: List[Subrange], type: DataType | FunctionCall | ObjectInitializerArray | ArraySpecification | StringTypeSpecification, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ArrayTypeDeclaration.html b/master/api/blark.transform.ArrayTypeDeclaration.html new file mode 100644 index 0000000..0007372 --- /dev/null +++ b/master/api/blark.transform.ArrayTypeDeclaration.html @@ -0,0 +1,381 @@ + + + + + + + blark.transform.ArrayTypeDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ArrayTypeDeclaration

+
+
+class blark.transform.ArrayTypeDeclaration(name: Token, init: ArrayTypeInitialization, meta: Meta | None = None)[source]
+

Bases: object

+

Full declaration of an array type.

+

Examples:

+
ArrayType : ARRAY[*] OF TypeName
+ArrayType : ARRAY[1..2] OF Call(1, 2) := [1, 2]
+ArrayType : POINTER TO ARRAY[1..2] OF Call(1, 2)
+TypeName : ARRAY [1..2, 3..4] OF INT
+TypeName : ARRAY [1..2] OF INT := [1, 2]
+TypeName : ARRAY [1..2, 3..4] OF INT := [2(3), 3(4)]
+TypeName : ARRAY [1..2, 3..4] OF Tc.SomeType
+TypeName : ARRAY [1..2, 3..4] OF Tc.SomeType(someInput := 3)
+TypeName : ARRAY [1..2, 3..4] OF ARRAY [1..2] OF INT
+TypeName : ARRAY [1..2, 3..4] OF ARRAY [1..2] OF ARRAY [3..4] OF INT
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

array_type_declaration

+
array_type_declaration: array_type_name ":" array_spec_init
+
+
+

Methods

+ + + + + + + + + +

__init__(name, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

name

init

+
+
+name: Token
+
+ +
+
+init: ArrayTypeInitialization
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: Token, init: ArrayTypeInitialization, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ArrayTypeInitialization.html b/master/api/blark.transform.ArrayTypeInitialization.html new file mode 100644 index 0000000..f4389dc --- /dev/null +++ b/master/api/blark.transform.ArrayTypeInitialization.html @@ -0,0 +1,392 @@ + + + + + + + blark.transform.ArrayTypeInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ArrayTypeInitialization

+
+
+class blark.transform.ArrayTypeInitialization(indirection: IndirectionType | None, spec: ArraySpecification, value: ArrayInitialization | None, meta: Meta | None = None)[source]
+

Bases: TypeInitializationBase

+

Array specification and optional default (initialization) value.

+

May be indirect (e.g., POINTER TO).

+

Examples:

+
ARRAY[*] OF TypeName
+ARRAY[1..2] OF Call(1, 2) := [1, 2]
+POINTER TO ARRAY[1..2] OF Call(1, 2)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

array_spec_init

+
array_spec_init: [ indirection_type ] array_specification [ ":=" array_initialization ]
+
+
+

Methods

+ + + + + + + + + +

__init__(indirection, spec, value[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full, qualified type name.

meta

type_info

The base type name.

indirection

spec

value

+
+
+indirection: IndirectionType | None
+
+ +
+
+spec: ArraySpecification
+
+ +
+
+value: ArrayInitialization | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(indirection: IndirectionType | None, spec: ArraySpecification, value: ArrayInitialization | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ArrayVariableInitDeclaration.html b/master/api/blark.transform.ArrayVariableInitDeclaration.html new file mode 100644 index 0000000..ef9a8a3 --- /dev/null +++ b/master/api/blark.transform.ArrayVariableInitDeclaration.html @@ -0,0 +1,376 @@ + + + + + + + blark.transform.ArrayVariableInitDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ArrayVariableInitDeclaration

+
+
+class blark.transform.ArrayVariableInitDeclaration(variables: List[DeclaredVariable], init: ArrayTypeInitialization, meta: Meta | None = None)[source]
+

Bases: InitDeclaration

+

A declaration of one or more variables with array type initialization and +optional default (initialization) value.

+

May be indirect (e.g., POINTER TO).

+

Examples:

+
aVal1, aVal2 : ARRAY[*] OF TypeName
+aVal1 : ARRAY[1..2] OF Call(1, 2) := [1, 2]
+aVal1 : POINTER TO ARRAY[1..2] OF Call(1, 2)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

array_var_init_decl

+
array_var_init_decl: var1_list ":" array_spec_init
+
+
+

Methods

+ + + + + + + + + +

__init__(variables, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

variables

init

+
+
+variables: List[DeclaredVariable]
+
+ +
+
+init: ArrayTypeInitialization
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variables: List[DeclaredVariable], init: ArrayTypeInitialization, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.AssignmentStatement.html b/master/api/blark.transform.AssignmentStatement.html new file mode 100644 index 0000000..62f1d15 --- /dev/null +++ b/master/api/blark.transform.AssignmentStatement.html @@ -0,0 +1,373 @@ + + + + + + + blark.transform.AssignmentStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.AssignmentStatement

+
+
+class blark.transform.AssignmentStatement(variables: List[Variable], expression: Expression, meta: Meta | None = None)[source]
+

Bases: Statement

+

An assignment statement.

+

Examples:

+
iValue := 5;
+iValue1 := iValue2 := 6;
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

assignment_statement

+
assignment_statement: _variable ASSIGNMENT ( _variable ASSIGNMENT )* expression ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(variables, expression[, meta])

from_lark(*args)

+

Attributes

+ + + + + + + + + + + + +

meta

variables

expression

+
+
+variables: List[Variable]
+
+ +
+
+expression: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*args) AssignmentStatement[source]
+
+ +
+
+__init__(variables: List[Variable], expression: Expression, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.BinaryBitString.html b/master/api/blark.transform.BinaryBitString.html new file mode 100644 index 0000000..a2b5108 --- /dev/null +++ b/master/api/blark.transform.BinaryBitString.html @@ -0,0 +1,360 @@ + + + + + + + blark.transform.BinaryBitString — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.BinaryBitString

+
+
+class blark.transform.BinaryBitString(type_name: Token | None, value: Token, meta: Meta | None = None)[source]
+

Bases: BitString

+

Binary bit string literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

binary_bit_string_literal

+
bit_string_literal: [ BIT_STRING_TYPE_NAME "#" ] "2#" BIT_STRING    -> binary_bit_string_literal
+
+
+

Methods

+ + + + + + +

__init__(type_name, value[, meta])

+

Attributes

+ + + + + + + + + + + + + + + +

base

The numeric base of the value (e.g., 10 is decimal)

meta

Lark metadata.

type_name

The optional type name of the string.

value

The string literal.

+
+
+base: ClassVar[int] = 2
+

The numeric base of the value (e.g., 10 is decimal)

+
+ +
+
+meta: Meta | None = None
+

Lark metadata.

+
+ +
+
+__init__(type_name: Token | None, value: Token, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.BinaryInteger.html b/master/api/blark.transform.BinaryInteger.html new file mode 100644 index 0000000..055e224 --- /dev/null +++ b/master/api/blark.transform.BinaryInteger.html @@ -0,0 +1,352 @@ + + + + + + + blark.transform.BinaryInteger — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.BinaryInteger

+
+
+class blark.transform.BinaryInteger(value: 'lark.Token', type_name: 'Optional[lark.Token]' = None, meta: 'Optional[Meta]' = None)[source]
+

Bases: Integer

+

Lark grammar

+

This class is used by the following grammar rules:

+

binary_integer

+
?any_integer: "2#" BIT_STRING             -> binary_integer
+
+
+

Methods

+ + + + + + +

__init__(value[, type_name, meta])

+

Attributes

+ + + + + + + + + + + + + + + +

base

meta

type_name

value

+
+
+base: ClassVar[int] = 2
+
+ +
+
+__init__(value: Token, type_name: Token | None = None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.BinaryOperation.html b/master/api/blark.transform.BinaryOperation.html new file mode 100644 index 0000000..dc3736f --- /dev/null +++ b/master/api/blark.transform.BinaryOperation.html @@ -0,0 +1,425 @@ + + + + + + + blark.transform.BinaryOperation — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.BinaryOperation

+
+
+class blark.transform.BinaryOperation(left: Expression, op: Token, right: Expression, meta: Meta | None = None)[source]
+

Bases: Expression

+

A binary (i.e., two operand) operation.

+

Examples:

+
a + b
+a AND b
+a AND_THEN b
+a OR_ELSE b
+a := b
+a XOR b
+a = b
+-a * b
+a * 1.0
+
+
+

Expressions may be nested in either the left or right operand.

+

Lark grammar

+

This class is used by the following grammar rules:

+

expression

+
expression: assignment_expression ( ASSIGNMENT assignment_expression )*
+
+
+

add_expression

+
add_expression: expression_term ( ADD_OPERATOR expression_term )*
+
+
+

and_expression

+
and_expression: comparison_expression ( LOGICAL_AND comparison_expression )*
+
+
+

and_then_expression

+
and_then_expression: xor_expression ( LOGICAL_OR xor_expression )*
+
+
+

or_else_expression

+
or_else_expression: and_then_expression ( LOGICAL_AND_THEN and_then_expression )*
+
+
+

assignment_expression

+
assignment_expression: or_else_expression ( LOGICAL_OR_ELSE or_else_expression )*
+
+
+

xor_expression

+
xor_expression: and_expression ( LOGICAL_XOR and_expression )*
+
+
+

comparison_expression

+
comparison_expression: equality_expression ( EQUALS_OP equality_expression )*
+
+
+

equality_expression

+
equality_expression: add_expression ( COMPARE_OP add_expression )*
+
+
+

expression_term

+
expression_term: unary_expression ( MULTIPLY_OPERATOR unary_expression )*
+
+
+

Methods

+ + + + + + + + + +

__init__(left, op, right[, meta])

from_lark(left, *operator_and_expr)

+

Attributes

+ + + + + + + + + + + + + + + +

meta

left

op

right

+
+
+left: Expression
+
+ +
+
+op: Token
+
+ +
+
+right: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(left: Expression, *operator_and_expr: Token | Expression)[source]
+
+ +
+
+__init__(left: Expression, op: Token, right: Expression, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.BitString.html b/master/api/blark.transform.BitString.html new file mode 100644 index 0000000..a454f6e --- /dev/null +++ b/master/api/blark.transform.BitString.html @@ -0,0 +1,383 @@ + + + + + + + blark.transform.BitString — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.BitString

+
+
+class blark.transform.BitString(type_name: Token | None, value: Token, meta: Meta | None = None)[source]
+

Bases: Literal

+

Bit string literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

bit_string_literal

+
bit_string_literal: [ BIT_STRING_TYPE_NAME "#" ] "2#" BIT_STRING    -> binary_bit_string_literal
+                  | [ BIT_STRING_TYPE_NAME "#" ] "8#" OCTAL_STRING  -> octal_bit_string_literal
+                  | [ BIT_STRING_TYPE_NAME "#" ] "16#" HEX_STRING   -> hex_bit_string_literal
+                  | [ BIT_STRING_TYPE_NAME "#" ] INTEGER
+
+
+

Methods

+ + + + + + + + + +

__init__(type_name, value[, meta])

from_lark(type_name, value)

+

Attributes

+ + + + + + + + + + + + + + + +

base

The numeric base of the value (e.g., 10 is decimal)

meta

Lark metadata.

type_name

The optional type name of the string.

value

The string literal.

+
+
+type_name: Token | None
+

The optional type name of the string.

+
+ +
+
+value: Token
+

The string literal.

+
+ +
+
+base: ClassVar[int] = 10
+

The numeric base of the value (e.g., 10 is decimal)

+
+ +
+
+meta: Meta | None = None
+

Lark metadata.

+
+ +
+
+classmethod from_lark(type_name: Token | None, value: Token)[source]
+
+ +
+
+__init__(type_name: Token | None, value: Token, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Boolean.html b/master/api/blark.transform.Boolean.html new file mode 100644 index 0000000..942e878 --- /dev/null +++ b/master/api/blark.transform.Boolean.html @@ -0,0 +1,346 @@ + + + + + + + blark.transform.Boolean — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Boolean

+
+
+class blark.transform.Boolean(value: Token, meta: Meta | None = None)[source]
+

Bases: Literal

+

Boolean literal value.

+

Methods

+ + + + + + +

__init__(value[, meta])

+

Attributes

+ + + + + + + + + +

meta

value

+
+
+value: Token
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(value: Token, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.BracketedExpression.html b/master/api/blark.transform.BracketedExpression.html new file mode 100644 index 0000000..ff008d2 --- /dev/null +++ b/master/api/blark.transform.BracketedExpression.html @@ -0,0 +1,367 @@ + + + + + + + blark.transform.BracketedExpression — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.BracketedExpression

+
+
+class blark.transform.BracketedExpression(expression: Expression, meta: Meta | None = None)[source]
+

Bases: Expression

+

An expression with square brackets around it.

+

This is used exclusively in string length specifications.

+

Examples:

+
[a * b]
+[255]
+
+
+

See also StringSpecLength.

+

Lark grammar

+

This class is used by the following grammar rules:

+

bracketed_expression

+
bracketed_expression: "[" expression "]"
+
+
+

Methods

+ + + + + + + + + +

__init__(expression[, meta])

from_lark()

+

Attributes

+ + + + + + + + + +

meta

expression

+
+
+expression: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(expression: Expression, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.CaseElement.html b/master/api/blark.transform.CaseElement.html new file mode 100644 index 0000000..7fe11f4 --- /dev/null +++ b/master/api/blark.transform.CaseElement.html @@ -0,0 +1,377 @@ + + + + + + + blark.transform.CaseElement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.CaseElement

+
+
+class blark.transform.CaseElement(matches: List[Subrange | Integer | EnumeratedValue | SimpleVariable | MultiElementVariable | BitString | Boolean], statements: StatementList | None, meta: Meta | None = None)[source]
+

Bases: Statement

+

A single element of a CASE statement block.

+

May contain one or more matches with corresponding statements. Matches +may include subranges, integers, enumerated values, symbolic variables, +bit strings, or boolean values.

+
+

See also

+
+
CaseMatch
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

case_element

+
case_element: case_list ":" [ case_element_statement_list ]
+
+
+

Methods

+ + + + + + + + + +

__init__(matches, statements[, meta])

from_lark(matches, statements)

+

Attributes

+ + + + + + + + + + + + +

meta

matches

statements

+
+
+matches: List[Subrange | Integer | EnumeratedValue | SimpleVariable | MultiElementVariable | BitString | Boolean]
+
+ +
+
+statements: StatementList | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(matches: Tree, statements: StatementList | None) CaseElement[source]
+
+ +
+
+__init__(matches: List[Subrange | Integer | EnumeratedValue | SimpleVariable | MultiElementVariable | BitString | Boolean], statements: StatementList | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.CaseStatement.html b/master/api/blark.transform.CaseStatement.html new file mode 100644 index 0000000..bf55e0f --- /dev/null +++ b/master/api/blark.transform.CaseStatement.html @@ -0,0 +1,385 @@ + + + + + + + blark.transform.CaseStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.CaseStatement

+
+
+class blark.transform.CaseStatement(expression: Expression, cases: List[CaseElement], else_clause: ElseClause | None, meta: Meta | None = None)[source]
+

Bases: Statement

+

A switch-like CASE statement block.

+

May contain one or more cases with corresponding statements, and a default +ELSE clause.

+
+

See also

+
+
CaseElement
+
ElseClause
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

case_statement

+
case_statement: "CASE"i expression "OF"i case_elements [ else_clause ] "END_CASE"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(expression, cases, else_clause[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

expression

cases

else_clause

+
+
+expression: Expression
+
+ +
+
+cases: List[CaseElement]
+
+ +
+
+else_clause: ElseClause | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(expression: Expression, cases: List[CaseElement], else_clause: ElseClause | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ChainedFunctionCall.html b/master/api/blark.transform.ChainedFunctionCall.html new file mode 100644 index 0000000..7f9ecb9 --- /dev/null +++ b/master/api/blark.transform.ChainedFunctionCall.html @@ -0,0 +1,368 @@ + + + + + + + blark.transform.ChainedFunctionCall — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ChainedFunctionCall

+
+
+class blark.transform.ChainedFunctionCall(invocations: List[FunctionCall], meta: Meta | None = None)[source]
+

Bases: Expression

+

A set of chained function (function block, method, action, etc.) calls.

+

The return value may be dereferenced with a carat (^).

+

Examples:

+
A()^.B()
+A(1, 2).B().C()
+A(1, 2, sName:='test', iOutput=>).C().D()
+A.B[1].C(1, 2)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

chained_function_call

+
chained_function_call: function_call ( "." function_call )+
+
+
+

Methods

+ + + + + + + + + +

__init__(invocations[, meta])

from_lark(*invocations)

+

Attributes

+ + + + + + + + + +

meta

invocations

+
+
+invocations: List[FunctionCall]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*invocations: FunctionCall) ChainedFunctionCall[source]
+
+ +
+
+__init__(invocations: List[FunctionCall], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ChainedFunctionCallStatement.html b/master/api/blark.transform.ChainedFunctionCallStatement.html new file mode 100644 index 0000000..af0f799 --- /dev/null +++ b/master/api/blark.transform.ChainedFunctionCallStatement.html @@ -0,0 +1,365 @@ + + + + + + + blark.transform.ChainedFunctionCallStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ChainedFunctionCallStatement

+
+
+class blark.transform.ChainedFunctionCallStatement(invocations: List[FunctionCall], meta: Meta | None = None)[source]
+

Bases: Statement

+

A chained set of function calls as a statement, in a “fluent” style.

+

Examples:

+
uut.dothis().andthenthis().andthenthat();
+uut.getPointerToStruct()^.dothis(A := 1).dothat(B := 2).done();
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

chained_function_call_statement

+
chained_function_call_statement: chained_function_call ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(invocations[, meta])

from_lark(chain)

+

Attributes

+ + + + + + + + + +

meta

invocations

+
+
+invocations: List[FunctionCall]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(chain: ChainedFunctionCall) ChainedFunctionCallStatement[source]
+
+ +
+
+__init__(invocations: List[FunctionCall], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ContinueStatement.html b/master/api/blark.transform.ContinueStatement.html new file mode 100644 index 0000000..88c75a4 --- /dev/null +++ b/master/api/blark.transform.ContinueStatement.html @@ -0,0 +1,352 @@ + + + + + + + blark.transform.ContinueStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ContinueStatement

+
+
+class blark.transform.ContinueStatement(meta: Meta | None = None)[source]
+

Bases: Statement

+

A statement used to jump to the top of a loop, CONTINUE.

+

Lark grammar

+

This class is used by the following grammar rules:

+

continue_statement

+
continue_statement.1: "CONTINUE"i ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__([meta])

from_lark()

+

Attributes

+ + + + + + +

meta

+
+
+meta: Meta | None = None
+
+ +
+
+__init__(meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.DataType.html b/master/api/blark.transform.DataType.html new file mode 100644 index 0000000..1c0969a --- /dev/null +++ b/master/api/blark.transform.DataType.html @@ -0,0 +1,371 @@ + + + + + + + blark.transform.DataType — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.DataType

+
+
+class blark.transform.DataType(indirection: IndirectionType | None, type_name: Token | StringTypeSpecification, meta: Meta | None = None)[source]
+

Bases: object

+

A non-generic type name, or a data type name.

+

May be indirect (e.g., POINTER TO).

+

An elementary type name, a derived type name, or a general dotted +identifier are valid for this.

+

Lark grammar

+

This class is used by the following grammar rules:

+

non_generic_type_name

+
non_generic_type_name: [ pointer_type ] ( elementary_type_name | derived_type_name | DOTTED_IDENTIFIER )
+
+
+

Methods

+ + + + + + + + + +

__init__(indirection, type_name[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

indirection

type_name

+
+
+indirection: IndirectionType | None
+
+ +
+
+type_name: Token | StringTypeSpecification
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(indirection: IndirectionType | None, type_name: Token | StringTypeSpecification, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.DataTypeDeclaration.html b/master/api/blark.transform.DataTypeDeclaration.html new file mode 100644 index 0000000..226ae42 --- /dev/null +++ b/master/api/blark.transform.DataTypeDeclaration.html @@ -0,0 +1,383 @@ + + + + + + + blark.transform.DataTypeDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.DataTypeDeclaration

+
+
+class blark.transform.DataTypeDeclaration(declaration: ArrayTypeDeclaration | StructureTypeDeclaration | StringTypeDeclaration | SimpleTypeDeclaration | SubrangeTypeDeclaration | EnumeratedTypeDeclaration | UnionTypeDeclaration | None, access: AccessSpecifier | None, meta: Meta | None = None)[source]
+

Bases: object

+

A data type declaration, wrapping the other declaration types with +TYPE/END_TYPE.

+

Access specifiers may be included.

+ +

Lark grammar

+

This class is used by the following grammar rules:

+

data_type_declaration

+
data_type_declaration: "TYPE"i [ access_specifier ] [ _type_declaration ] ";"* "END_TYPE"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(declaration, access[, meta])

from_lark(access[, declaration])

+

Attributes

+ + + + + + + + + + + + +

meta

declaration

access

+
+
+declaration: ArrayTypeDeclaration | StructureTypeDeclaration | StringTypeDeclaration | SimpleTypeDeclaration | SubrangeTypeDeclaration | EnumeratedTypeDeclaration | UnionTypeDeclaration | None
+
+ +
+
+access: AccessSpecifier | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(access: AccessSpecifier | None, declaration: ArrayTypeDeclaration | StructureTypeDeclaration | StringTypeDeclaration | SimpleTypeDeclaration | SubrangeTypeDeclaration | EnumeratedTypeDeclaration | UnionTypeDeclaration | None = None) DataTypeDeclaration[source]
+
+ +
+
+__init__(declaration: ArrayTypeDeclaration | StructureTypeDeclaration | StringTypeDeclaration | SimpleTypeDeclaration | SubrangeTypeDeclaration | EnumeratedTypeDeclaration | UnionTypeDeclaration | None, access: AccessSpecifier | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Date.html b/master/api/blark.transform.Date.html new file mode 100644 index 0000000..8e495af --- /dev/null +++ b/master/api/blark.transform.Date.html @@ -0,0 +1,385 @@ + + + + + + + blark.transform.Date — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Date

+
+
+class blark.transform.Date(year: Token, month: Token, day: Token | None, meta: Meta | None = None)[source]
+

Bases: Literal

+

Date literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

date

+
date: ( "DATE"i | "D"i | "d"i ) "#" _date_literal
+
+
+

Methods

+ + + + + + + + + +

__init__(year, month, day[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

meta

value

The time of day value.

year

month

day

+
+
+year: Token
+
+ +
+
+month: Token
+
+ +
+
+day: Token | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property value: str
+

The time of day value.

+
+ +
+
+__init__(year: Token, month: Token, day: Token | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.DateTime.html b/master/api/blark.transform.DateTime.html new file mode 100644 index 0000000..3c65bb9 --- /dev/null +++ b/master/api/blark.transform.DateTime.html @@ -0,0 +1,377 @@ + + + + + + + blark.transform.DateTime — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.DateTime

+
+
+class blark.transform.DateTime(date: Date, time: TimeOfDay, meta: Meta | None = None)[source]
+

Bases: Literal

+

Date and time literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

date_and_time

+
date_and_time: ( "DATE_AND_TIME"i | "DT"i ) "#" _date_literal "-" _daytime
+
+
+

Methods

+ + + + + + + + + +

__init__(date, time[, meta])

from_lark(year, month, day, hour, minute, second)

+

Attributes

+ + + + + + + + + + + + + + + +

meta

value

The time of day value.

date

time

+
+
+date: Date
+
+ +
+
+time: TimeOfDay
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(year: Token, month: Token, day: Token, hour: Token, minute: Token, second: Token | None) DateTime[source]
+
+ +
+
+property value: str
+

The time of day value.

+
+ +
+
+__init__(date: Date, time: TimeOfDay, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.DeclaredVariable.html b/master/api/blark.transform.DeclaredVariable.html new file mode 100644 index 0000000..799ae0f --- /dev/null +++ b/master/api/blark.transform.DeclaredVariable.html @@ -0,0 +1,393 @@ + + + + + + + blark.transform.DeclaredVariable — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.DeclaredVariable

+
+
+class blark.transform.DeclaredVariable(variable: SimpleVariable, location: IncompleteLocation | Location | None, meta: Meta | None = None)[source]
+

Bases: object

+

A single declared variable name and optional [direct or incomplete] location.

+

Examples:

+
iVar
+iVar AT %I*
+iVar AT %IX1.1
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

var1

+
var1: variable_name [ location ]
+    | variable_name [ incomplete_location ]
+
+
+

Methods

+ + + + + + + + + +

__init__(variable, location[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

dereferenced

Is the variable dereferenced with '^'?.

meta

name

The variable name.

variable

location

+
+
+variable: SimpleVariable
+
+ +
+
+location: IncompleteLocation | Location | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property name: Token
+

The variable name.

+
+ +
+
+property dereferenced: bool
+

Is the variable dereferenced with ‘^’?.

+
+ +
+
+__init__(variable: SimpleVariable, location: IncompleteLocation | Location | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.DirectVariable.html b/master/api/blark.transform.DirectVariable.html new file mode 100644 index 0000000..81e7d45 --- /dev/null +++ b/master/api/blark.transform.DirectVariable.html @@ -0,0 +1,391 @@ + + + + + + + blark.transform.DirectVariable — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.DirectVariable

+
+
+class blark.transform.DirectVariable(location_prefix: VariableLocationPrefix, location: Token, size_prefix: VariableSizePrefix, bits: List[Token] | None = None, meta: Meta | None = None)[source]
+

Bases: Variable

+

Direct variables with I/O linkage.

+

Example: var AT %I*

+

May be located (e.g., AT %IX1.1) or incomplete (e.g., just %I*).

+

Lark grammar

+

This class is used by the following grammar rules:

+

direct_variable

+
direct_variable: "%" LOCATION_PREFIX [ SIZE_PREFIX ] INTEGER ( "." INTEGER )*
+
+
+

Methods

+ + + + + + + + + +

__init__(location_prefix, location, size_prefix)

from_lark(location_prefix, size_prefix, ...)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

bits

The number of bits.

meta

Lark metadata.

location_prefix

The location prefix (e.g., I, Q, or M)

location

The location number itself (e.g., 2 of %IX2.1)

size_prefix

Size prefix, used in locations (e.g., %IX1.1 has a bit prefix).

+
+
+location_prefix: VariableLocationPrefix
+

The location prefix (e.g., I, Q, or M)

+
+ +
+
+location: Token
+

The location number itself (e.g., 2 of %IX2.1)

+
+ +
+
+size_prefix: VariableSizePrefix
+

Size prefix, used in locations (e.g., %IX1.1 has a bit prefix).

+
+ +
+
+bits: List[Token] | None = None
+

The number of bits.

+
+ +
+
+meta: Meta | None = None
+

Lark metadata.

+
+ +
+
+static from_lark(location_prefix: Token, size_prefix: Token | None, location: Token, *bits: Token)[source]
+
+ +
+
+__init__(location_prefix: VariableLocationPrefix, location: Token, size_prefix: VariableSizePrefix, bits: List[Token] | None = None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Duration.html b/master/api/blark.transform.Duration.html new file mode 100644 index 0000000..b090de6 --- /dev/null +++ b/master/api/blark.transform.Duration.html @@ -0,0 +1,409 @@ + + + + + + + blark.transform.Duration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Duration

+
+
+class blark.transform.Duration(days: Token | None = None, hours: Token | None = None, minutes: Token | None = None, seconds: Token | None = None, milliseconds: Token | None = None, negative: bool = False, meta: Meta | None = None)[source]
+

Bases: Literal

+

Duration literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

duration

+
duration: ( "TIME"i | "T"i ) "#" [ MINUS ] _interval
+
+
+

Methods

+ + + + + + + + + +

__init__([days, hours, minutes, seconds, ...])

from_lark(minus, interval)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

days

hours

meta

milliseconds

minutes

negative

seconds

value

The duration value.

+
+
+days: Token | None = None
+
+ +
+
+hours: Token | None = None
+
+ +
+
+minutes: Token | None = None
+
+ +
+
+seconds: Token | None = None
+
+ +
+
+milliseconds: Token | None = None
+
+ +
+
+negative: bool = False
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(minus: Token | None, interval: Tree) Duration[source]
+
+ +
+
+property value: str
+

The duration value.

+
+ +
+
+__init__(days: Token | None = None, hours: Token | None = None, minutes: Token | None = None, seconds: Token | None = None, milliseconds: Token | None = None, negative: bool = False, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.EdgeDeclaration.html b/master/api/blark.transform.EdgeDeclaration.html new file mode 100644 index 0000000..f7b7a0a --- /dev/null +++ b/master/api/blark.transform.EdgeDeclaration.html @@ -0,0 +1,376 @@ + + + + + + + blark.transform.EdgeDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.EdgeDeclaration

+
+
+class blark.transform.EdgeDeclaration(variables: List[DeclaredVariable], edge: Token, meta: Meta | None = None)[source]
+

Bases: InitDeclaration

+

An edge declaration of one or more variables.

+

Examples:

+
iValue AT %IX1.1 : BOOL R_EDGE
+iValue : BOOL F_EDGE
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

edge_declaration

+
edge_declaration: var1_list ":" "BOOL"i ( R_EDGE | F_EDGE )
+
+
+

Methods

+ + + + + + + + + +

__init__(variables, edge[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

variables

edge

init

+
+
+variables: List[DeclaredVariable]
+
+ +
+
+edge: Token
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variables: List[DeclaredVariable], edge: Token, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ElseClause.html b/master/api/blark.transform.ElseClause.html new file mode 100644 index 0000000..b081ea4 --- /dev/null +++ b/master/api/blark.transform.ElseClause.html @@ -0,0 +1,360 @@ + + + + + + + blark.transform.ElseClause — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ElseClause

+
+
+class blark.transform.ElseClause(statements: StatementList | None, meta: Meta | None = None)[source]
+

Bases: object

+

The ELSE part of an IF/ELSIF/ELSE/END_IF block.

+

Lark grammar

+

This class is used by the following grammar rules:

+

else_clause

+
else_clause: "ELSE"i [ statement_list ]
+
+
+

Methods

+ + + + + + + + + +

__init__(statements[, meta])

from_lark()

+

Attributes

+ + + + + + + + + +

meta

statements

+
+
+statements: StatementList | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(statements: StatementList | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ElseIfClause.html b/master/api/blark.transform.ElseIfClause.html new file mode 100644 index 0000000..3e5a31b --- /dev/null +++ b/master/api/blark.transform.ElseIfClause.html @@ -0,0 +1,368 @@ + + + + + + + blark.transform.ElseIfClause — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ElseIfClause

+
+
+class blark.transform.ElseIfClause(if_expression: Expression, statements: StatementList | None, meta: Meta | None = None)[source]
+

Bases: object

+

The else-if ELSIF part of an IF/ELSIF/ELSE/END_IF block.

+

Lark grammar

+

This class is used by the following grammar rules:

+

else_if_clause

+
else_if_clause: "ELSIF"i expression "THEN"i [ statement_list ]
+
+
+

Methods

+ + + + + + + + + +

__init__(if_expression, statements[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

if_expression

statements

+
+
+if_expression: Expression
+
+ +
+
+statements: StatementList | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(if_expression: Expression, statements: StatementList | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.EnumeratedSpecification.html b/master/api/blark.transform.EnumeratedSpecification.html new file mode 100644 index 0000000..8abf5be --- /dev/null +++ b/master/api/blark.transform.EnumeratedSpecification.html @@ -0,0 +1,384 @@ + + + + + + + blark.transform.EnumeratedSpecification — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.EnumeratedSpecification

+
+
+class blark.transform.EnumeratedSpecification(type_name: Token | None, values: List[EnumeratedValue] | None = None, meta: Meta | None = None)[source]
+

Bases: TypeSpecificationBase

+

An enumerated specification.

+

Examples:

+
(Value1, Value2 := 1)
+(Value1, Value2 := 1) INT
+INT
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

enumerated_specification

+
enumerated_specification: "(" enumerated_value ( "," enumerated_value )* ")" [ ENUM_DATA_TYPE_NAME ]
+                        | enumerated_type_name
+
+
+

Methods

+ + + + + + + + + +

__init__(type_name[, values, meta])

from_lark(*args)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

base_type_name

The full type name.

full_type_name

The full type name.

meta

type_info

The base type name.

values

type_name

+
+
+type_name: Token | None
+
+ +
+
+values: List[EnumeratedValue] | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*args)[source]
+
+ +
+
+__init__(type_name: Token | None, values: List[EnumeratedValue] | None = None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.EnumeratedTypeDeclaration.html b/master/api/blark.transform.EnumeratedTypeDeclaration.html new file mode 100644 index 0000000..5bf29da --- /dev/null +++ b/master/api/blark.transform.EnumeratedTypeDeclaration.html @@ -0,0 +1,374 @@ + + + + + + + blark.transform.EnumeratedTypeDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.EnumeratedTypeDeclaration

+
+
+class blark.transform.EnumeratedTypeDeclaration(name: Token, init: EnumeratedTypeInitialization, meta: Meta | None = None)[source]
+

Bases: object

+

An enumerated type declaration.

+

Examples:

+
TypeName : TypeName := Va
+TypeName : (Value1 := 1, Value2 := 2)
+TypeName : (Value1 := 1, Value2 := 2) INT := Value1
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

enumerated_type_declaration

+
enumerated_type_declaration: enumerated_type_name ":" enumerated_spec_init
+
+
+

Methods

+ + + + + + + + + +

__init__(name, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

name

init

+
+
+name: Token
+
+ +
+
+init: EnumeratedTypeInitialization
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: Token, init: EnumeratedTypeInitialization, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.EnumeratedTypeInitialization.html b/master/api/blark.transform.EnumeratedTypeInitialization.html new file mode 100644 index 0000000..41528dc --- /dev/null +++ b/master/api/blark.transform.EnumeratedTypeInitialization.html @@ -0,0 +1,392 @@ + + + + + + + blark.transform.EnumeratedTypeInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.EnumeratedTypeInitialization

+
+
+class blark.transform.EnumeratedTypeInitialization(indirection: IndirectionType | None, spec: EnumeratedSpecification, value: EnumeratedValue | None, meta: Meta | None = None)[source]
+

Bases: TypeInitializationBase

+

Enumerated specification with initialization enumerated value.

+

May be indirect (i.e., POINTER TO).

+

Examples:

+
(Value1, Value2 := 1) := IdentifierB
+(Value1, Value2 := 1) INT := IdentifierC
+INT := IdentifierD
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

enumerated_spec_init

+
enumerated_spec_init: [ indirection_type ] enumerated_specification [ ":=" enumerated_value ]
+
+
+

Methods

+ + + + + + + + + +

__init__(indirection, spec, value[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full, qualified type name.

meta

type_info

The base type name.

indirection

spec

value

+
+
+indirection: IndirectionType | None
+
+ +
+
+spec: EnumeratedSpecification
+
+ +
+
+value: EnumeratedValue | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(indirection: IndirectionType | None, spec: EnumeratedSpecification, value: EnumeratedValue | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.EnumeratedValue.html b/master/api/blark.transform.EnumeratedValue.html new file mode 100644 index 0000000..c8dc0e9 --- /dev/null +++ b/master/api/blark.transform.EnumeratedValue.html @@ -0,0 +1,383 @@ + + + + + + + blark.transform.EnumeratedValue — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.EnumeratedValue

+
+
+class blark.transform.EnumeratedValue(type_name: Token | None, name: Token, value: Integer | Token | None, meta: Meta | None = None)[source]
+

Bases: object

+

An enumerated value.

+

Examples:

+
IdentifierB
+IdentifierB := 1
+INT#IdentifierB
+INT#IdentifierB := 1
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

enumerated_value

+
enumerated_value: [ enumerated_type_name "#" ] DOTTED_IDENTIFIER [ ":=" integer_or_constant ]
+
+
+

Methods

+ + + + + + + + + +

__init__(type_name, name, value[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

type_name

name

value

+
+
+type_name: Token | None
+
+ +
+
+name: Token
+
+ +
+
+value: Integer | Token | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(type_name: Token | None, name: Token, value: Integer | Token | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ExitStatement.html b/master/api/blark.transform.ExitStatement.html new file mode 100644 index 0000000..a47c6e5 --- /dev/null +++ b/master/api/blark.transform.ExitStatement.html @@ -0,0 +1,352 @@ + + + + + + + blark.transform.ExitStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ExitStatement

+
+
+class blark.transform.ExitStatement(meta: Meta | None = None)[source]
+

Bases: Statement

+

A statement used to exit a loop, EXIT.

+

Lark grammar

+

This class is used by the following grammar rules:

+

exit_statement

+
exit_statement.1: "EXIT"i ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__([meta])

from_lark()

+

Attributes

+ + + + + + +

meta

+
+
+meta: Meta | None = None
+
+ +
+
+__init__(meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Expression.html b/master/api/blark.transform.Expression.html new file mode 100644 index 0000000..8856f2e --- /dev/null +++ b/master/api/blark.transform.Expression.html @@ -0,0 +1,329 @@ + + + + + + + blark.transform.Expression — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Expression

+
+
+class blark.transform.Expression[source]
+

Bases: object

+

Base class for all types of expressions.

+

This includes all literals (integers, etc.) and more complicated +mathematical expressions.

+

Marked as a “tagged union” so that serialization will uniquely identify the +Python class.

+

Methods

+ + + + + + +

__init__()

+
+
+__init__() None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ExtendedSourceCode.html b/master/api/blark.transform.ExtendedSourceCode.html new file mode 100644 index 0000000..8213c67 --- /dev/null +++ b/master/api/blark.transform.ExtendedSourceCode.html @@ -0,0 +1,358 @@ + + + + + + + blark.transform.ExtendedSourceCode — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ExtendedSourceCode

+
+
+class blark.transform.ExtendedSourceCode(items: List[DataTypeDeclaration | Function | FunctionBlock | Action | Method | Program | Property | GlobalVariableDeclarations | StatementList], filename: Path | None = None, raw_source: str | None = None, line_map: Dict[int, int] | None = None, meta: Meta | None = None)[source]
+

Bases: SourceCode

+

Top-level source code item - extended to include the possibility of +standalone implementation details (i.e., statement lists).

+
+

See also

+
+
SourceCodeItem
+
StatementList
+
+
+

Methods

+ + + + + + +

__init__(items[, filename, raw_source, ...])

+

Attributes

+ + + + + + + + + + + + + + + + + + +

filename

line_map

meta

raw_source

items

+
+
+items: List[DataTypeDeclaration | Function | FunctionBlock | Action | Method | Program | Property | GlobalVariableDeclarations | StatementList]
+
+ +
+
+__init__(items: List[DataTypeDeclaration | Function | FunctionBlock | Action | Method | Program | Property | GlobalVariableDeclarations | StatementList], filename: Path | None = None, raw_source: str | None = None, line_map: Dict[int, int] | None = None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Extends.html b/master/api/blark.transform.Extends.html new file mode 100644 index 0000000..4dfc421 --- /dev/null +++ b/master/api/blark.transform.Extends.html @@ -0,0 +1,365 @@ + + + + + + + blark.transform.Extends — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Extends

+
+
+class blark.transform.Extends(name: Token, meta: Meta | None = None)[source]
+

Bases: object

+

The “EXTENDS” portion of a function block, interface, structure, etc.

+

Examples:

+
EXTENDS stName
+EXTENDS FB_Name
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

extends

+
extends: "EXTENDS"i DOTTED_IDENTIFIER
+
+
+

Methods

+ + + + + + + + + +

__init__(name[, meta])

from_lark()

+

Attributes

+ + + + + + + + + +

meta

name

+
+
+name: Token
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: Token, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ExternalVariableDeclaration.html b/master/api/blark.transform.ExternalVariableDeclaration.html new file mode 100644 index 0000000..20c7fb2 --- /dev/null +++ b/master/api/blark.transform.ExternalVariableDeclaration.html @@ -0,0 +1,368 @@ + + + + + + + blark.transform.ExternalVariableDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ExternalVariableDeclaration

+
+
+class blark.transform.ExternalVariableDeclaration(name: Token, spec: SimpleSpecification | Token | SubrangeSpecification | EnumeratedSpecification | ArraySpecification, meta: Meta | None = None)[source]
+

Bases: object

+

A named, external variable declaration inside a variable block.

+

Lark grammar

+

This class is used by the following grammar rules:

+

external_declaration

+
external_declaration: global_var_name ":" ( simple_specification | subrange_specification | enumerated_specification | array_specification | structure_type_name | function_block_type_name ) ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(name, spec[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

name

spec

+
+
+name: Token
+
+ +
+
+spec: SimpleSpecification | Token | SubrangeSpecification | EnumeratedSpecification | ArraySpecification
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: Token, spec: SimpleSpecification | Token | SubrangeSpecification | EnumeratedSpecification | ArraySpecification, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ExternalVariableDeclarations.html b/master/api/blark.transform.ExternalVariableDeclarations.html new file mode 100644 index 0000000..071d471 --- /dev/null +++ b/master/api/blark.transform.ExternalVariableDeclarations.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.ExternalVariableDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ExternalVariableDeclarations

+
+
+class blark.transform.ExternalVariableDeclarations(attrs: VariableAttributes | None, items: List[ExternalVariableDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

A block of named, external variable declarations (VAR_EXTERNAL).

+

May be annotated with attributes (see VariableAttributes).

+

Lark grammar

+

This class is used by the following grammar rules:

+

external_var_declarations

+
external_var_declarations: "VAR_EXTERNAL"i [ variable_attributes ] external_declaration* "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, *items)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR_EXTERNAL'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[ExternalVariableDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, *items: ExternalVariableDeclaration) ExternalVariableDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[ExternalVariableDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FieldSelector.html b/master/api/blark.transform.FieldSelector.html new file mode 100644 index 0000000..ce39586 --- /dev/null +++ b/master/api/blark.transform.FieldSelector.html @@ -0,0 +1,373 @@ + + + + + + + blark.transform.FieldSelector — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FieldSelector

+
+
+class blark.transform.FieldSelector(field: SimpleVariable, dereferenced: bool, meta: Meta | None = None)[source]
+

Bases: object

+

Field - or attribute - selector as part of a multi-element variable.

+

Examples:

+
.field
+.field^
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

field_selector

+
field_selector: [ DEREFERENCED ] "." ( variable_name | INTEGER )
+
+
+

Methods

+ + + + + + + + + +

__init__(field, dereferenced[, meta])

from_lark(dereferenced, field)

+

Attributes

+ + + + + + + + + + + + +

meta

field

dereferenced

+
+
+field: SimpleVariable
+
+ +
+
+dereferenced: bool
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(dereferenced: Token | None, field: SimpleVariable)[source]
+
+ +
+
+__init__(field: SimpleVariable, dereferenced: bool, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ForStatement.html b/master/api/blark.transform.ForStatement.html new file mode 100644 index 0000000..7bf80bd --- /dev/null +++ b/master/api/blark.transform.ForStatement.html @@ -0,0 +1,404 @@ + + + + + + + blark.transform.ForStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ForStatement

+
+
+class blark.transform.ForStatement(control: SimpleVariable | MultiElementVariable, from_: Expression, to: Expression, step: Expression | None, statements: StatementList, meta: Meta | None = None)[source]
+

Bases: Statement

+

A loop with a control variable and a start, stop, and (optional) step value.

+

Examples:

+
FOR iIndex := 0 TO 10
+DO
+    iValue := iIndex * 2;
+END_FOR
+
+FOR iIndex := (iValue - 5) TO (iValue + 5) BY 2
+DO
+    arrArray[iIndex] := iIndex * 2;
+END_FOR
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

for_statement

+
for_statement: "FOR"i control_variable ":=" _for_list "DO"i statement_list "END_FOR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(control, from_, to, step, statements)

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

meta

control

from_

to

step

statements

+
+
+control: SimpleVariable | MultiElementVariable
+
+ +
+
+from_: Expression
+
+ +
+
+to: Expression
+
+ +
+
+step: Expression | None
+
+ +
+
+statements: StatementList
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(control: SimpleVariable | MultiElementVariable, from_: Expression, to: Expression, step: Expression | None, statements: StatementList, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FormatSettings.html b/master/api/blark.transform.FormatSettings.html new file mode 100644 index 0000000..1711092 --- /dev/null +++ b/master/api/blark.transform.FormatSettings.html @@ -0,0 +1,337 @@ + + + + + + + blark.transform.FormatSettings — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FormatSettings

+
+
+class blark.transform.FormatSettings(indent: 'str' = '    ')[source]
+

Bases: object

+

Methods

+ + + + + + +

__init__([indent])

+

Attributes

+ + + + + + +

indent

+
+
+indent: str = '    '
+
+ +
+
+__init__(indent: str = '    ') None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FullSubrange.html b/master/api/blark.transform.FullSubrange.html new file mode 100644 index 0000000..60866ae --- /dev/null +++ b/master/api/blark.transform.FullSubrange.html @@ -0,0 +1,343 @@ + + + + + + + blark.transform.FullSubrange — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FullSubrange

+
+
+class blark.transform.FullSubrange(meta: Meta | None = None)[source]
+

Bases: Subrange

+

A full subrange (i.e., asterisk *).

+

Example:

+
Array[*]
+      ^
+
+
+

Methods

+ + + + + + +

__init__([meta])

+

Attributes

+ + + + + + +

meta

+
+
+meta: Meta | None = None
+
+ +
+
+__init__(meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Function.html b/master/api/blark.transform.Function.html new file mode 100644 index 0000000..7ebb766 --- /dev/null +++ b/master/api/blark.transform.Function.html @@ -0,0 +1,402 @@ + + + + + + + blark.transform.Function — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Function

+
+
+class blark.transform.Function(access: AccessSpecifier | None, name: Token, return_type: SimpleSpecification | IndirectSimpleSpecification | None, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None)[source]
+

Bases: object

+

A full function block type declaration, with nested variable declaration blocks.

+

An implementation is optional, but END_FUNCTION is required.

+

Examples:

+
FUNCTION FuncName : INT
+    VAR_INPUT
+        iValue : INT := 0;
+    END_VAR
+    FuncName := iValue;
+END_FUNCTION
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

function_declaration

+
function_declaration: "FUNCTION"i [ access_specifier ] derived_function_name [ ":" indirect_simple_specification ] ";"* [ function_var_block+ ] [ function_body ] "END_FUNCTION"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(access, name, return_type, ...[, meta])

from_lark(access, name, return_type, *remainder)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

meta

access

name

return_type

declarations

body

+
+
+access: AccessSpecifier | None
+
+ +
+
+name: Token
+
+ +
+
+return_type: SimpleSpecification | IndirectSimpleSpecification | None
+
+ +
+
+declarations: List[VariableDeclarationBlock]
+
+ +
+
+body: StatementList | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(access: AccessSpecifier | None, name: Token, return_type: SimpleSpecification | IndirectSimpleSpecification | None, *remainder) Function[source]
+
+ +
+
+__init__(access: AccessSpecifier | None, name: Token, return_type: SimpleSpecification | IndirectSimpleSpecification | None, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FunctionBlock.html b/master/api/blark.transform.FunctionBlock.html new file mode 100644 index 0000000..37e942b --- /dev/null +++ b/master/api/blark.transform.FunctionBlock.html @@ -0,0 +1,425 @@ + + + + + + + blark.transform.FunctionBlock — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FunctionBlock

+
+
+class blark.transform.FunctionBlock(name: Token, access: AccessSpecifier | None, extends: Extends | None, implements: Implements | None, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None)[source]
+

Bases: object

+

A full function block type declaration.

+

A function block distinguishes itself from a regular function by having +state and potentially having actions, methods, and properties. These +additional parts are separate in this grammar (i.e., they do not appear +within the FUNCTION_BLOCK itself).

+

An implementation is optional, but END_FUNCTION_BLOCK is required.

+

Examples:

+
FUNCTION_BLOCK FB_EmptyFunctionBlock
+END_FUNCTION_BLOCK
+
+FUNCTION_BLOCK FB_Implementer IMPLEMENTS I_fbName
+END_FUNCTION_BLOCK
+
+FUNCTION_BLOCK ABSTRACT FB_Extender EXTENDS OtherFbName
+END_FUNCTION_BLOCK
+
+FUNCTION_BLOCK FB_WithVariables
+VAR_INPUT
+    bExecute : BOOL;
+END_VAR
+VAR_OUTPUT
+    iResult : INT;
+END_VAR
+END_FUNCTION_BLOCK
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

function_block_type_declaration

+
function_block_type_declaration: FUNCTION_BLOCK [ access_specifier ] derived_function_block_name [ extends ] [ implements ] fb_var_declaration* [ function_block_body ] END_FUNCTION_BLOCK ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(name, access, extends, implements, ...)

from_lark(fb_token, access, derived_name, ...)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

meta

name

access

extends

implements

declarations

body

+
+
+name: Token
+
+ +
+
+access: AccessSpecifier | None
+
+ +
+
+extends: Extends | None
+
+ +
+
+implements: Implements | None
+
+ +
+
+declarations: List[VariableDeclarationBlock]
+
+ +
+
+body: StatementList | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(fb_token: Token, access: AccessSpecifier | None, derived_name: Token, extends: Extends | None, implements: Implements | None, *args) FunctionBlock[source]
+
+ +
+
+__init__(name: Token, access: AccessSpecifier | None, extends: Extends | None, implements: Implements | None, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FunctionBlockDeclaration.html b/master/api/blark.transform.FunctionBlockDeclaration.html new file mode 100644 index 0000000..5a0f860 --- /dev/null +++ b/master/api/blark.transform.FunctionBlockDeclaration.html @@ -0,0 +1,320 @@ + + + + + + + blark.transform.FunctionBlockDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FunctionBlockDeclaration

+
+
+class blark.transform.FunctionBlockDeclaration[source]
+

Bases: object

+

Base class for declarations of variables using function blocks.

+

May either be by name (FunctionBlockNameDeclaration) or invocation +FunctionBlockInvocationDeclaration). Marked as a “tagged union” so +that serialization will uniquely identify the Python class.

+

Methods

+ + + +
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FunctionBlockInvocationDeclaration.html b/master/api/blark.transform.FunctionBlockInvocationDeclaration.html new file mode 100644 index 0000000..5a6fea9 --- /dev/null +++ b/master/api/blark.transform.FunctionBlockInvocationDeclaration.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.FunctionBlockInvocationDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FunctionBlockInvocationDeclaration

+
+
+class blark.transform.FunctionBlockInvocationDeclaration(variables: List[Token], init: FunctionCall, defaults: StructureInitialization | None = None, meta: Meta | None = None)[source]
+

Bases: FunctionBlockDeclaration

+

Base class for declarations of variables using function blocks by invocation.

+

Examples:

+
fbSample : FB_Sample(nInitParam := 1) := (nInput := 2, nMyProperty := 3)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

fb_invocation_decl

+
| fb_decl_name_list ":" function_call [ ":=" structure_initialization ]            -> fb_invocation_decl
+
+
+

Methods

+ + + + + + + + + +

__init__(variables, init[, defaults, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

defaults

meta

variables

init

+
+
+variables: List[Token]
+
+ +
+
+init: FunctionCall
+
+ +
+
+defaults: StructureInitialization | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variables: List[Token], init: FunctionCall, defaults: StructureInitialization | None = None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FunctionBlockNameDeclaration.html b/master/api/blark.transform.FunctionBlockNameDeclaration.html new file mode 100644 index 0000000..5712b15 --- /dev/null +++ b/master/api/blark.transform.FunctionBlockNameDeclaration.html @@ -0,0 +1,381 @@ + + + + + + + blark.transform.FunctionBlockNameDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FunctionBlockNameDeclaration

+
+
+class blark.transform.FunctionBlockNameDeclaration(variables: List[Token], spec: Token, init: StructureInitialization | None = None, meta: Meta | None = None)[source]
+

Bases: FunctionBlockDeclaration

+

Base class for declarations of variables using function blocks by name.

+

Examples:

+
fbName1 : FB_Name
+fbName1 : FB_Name := (iValue := 0, bValue := TRUE)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

fb_name_decl

+
fb_decl: fb_decl_name_list ":" function_block_type_name [ ":=" structure_initialization ] -> fb_name_decl
+
+
+

Methods

+ + + + + + + + + +

__init__(variables, spec[, init, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

init

meta

variables

spec

+
+
+variables: List[Token]
+
+ +
+
+spec: Token
+
+ +
+
+init: StructureInitialization | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variables: List[Token], spec: Token, init: StructureInitialization | None = None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FunctionCall.html b/master/api/blark.transform.FunctionCall.html new file mode 100644 index 0000000..daaf4cc --- /dev/null +++ b/master/api/blark.transform.FunctionCall.html @@ -0,0 +1,417 @@ + + + + + + + blark.transform.FunctionCall — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FunctionCall

+
+
+class blark.transform.FunctionCall(name: SimpleVariable | MultiElementVariable, parameters: List[ParameterAssignment], dereferenced: bool, meta: Meta | None = None)[source]
+

Bases: Expression

+

A function (function block, method, action, etc.) call.

+

The return value may be dereferenced with a carat (^).

+

Examples:

+
A()^
+A(1, 2)
+A(1, 2, sName:='test', iOutput=>)
+A.B[1].C(1, 2)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

function_call

+
function_call: symbolic_variable "(" [ param_assignment ( "," param_assignment )* ","? ] ")" DEREFERENCED?
+
+
+

Methods

+ + + + + + + + + +

__init__(name, parameters, dereferenced[, meta])

from_lark(name, *params)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full type name, including any dereferencing or subscripts.

meta

value

The initialization value (the function call itself).

name

The function name.

parameters

Positional, naed, or output parameters.

dereferenced

Dereference the return value?

+
+
+name: SimpleVariable | MultiElementVariable
+

The function name.

+
+ +
+
+parameters: List[ParameterAssignment]
+

Positional, naed, or output parameters.

+
+ +
+
+dereferenced: bool
+

Dereference the return value?

+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property base_type_name: str
+

The base type name.

+

This is used as part of the summary mechanism. The “type” is that +of the underlying function block or function.

+
+ +
+
+property full_type_name: str
+

The full type name, including any dereferencing or subscripts.

+
+ +
+
+property value: str
+

The initialization value (the function call itself).

+

This is used as part of the summary tool.

+
+ +
+
+static from_lark(name: SimpleVariable | MultiElementVariable, *params: ParameterAssignment | Token | None) FunctionCall[source]
+
+ +
+
+__init__(name: SimpleVariable | MultiElementVariable, parameters: List[ParameterAssignment], dereferenced: bool, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FunctionCallStatement.html b/master/api/blark.transform.FunctionCallStatement.html new file mode 100644 index 0000000..58fcf20 --- /dev/null +++ b/master/api/blark.transform.FunctionCallStatement.html @@ -0,0 +1,363 @@ + + + + + + + blark.transform.FunctionCallStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FunctionCallStatement

+
+
+class blark.transform.FunctionCallStatement(name: SimpleVariable | MultiElementVariable, parameters: List[ParameterAssignment], dereferenced: bool, meta: Meta | None = None)[source]
+

Bases: Statement, FunctionCall

+

A function (function block, method, action, etc.) call as a statement.

+

Examples:

+
A(1, 2);
+A(1, 2, sName:='test', iOutput=>);
+A.B[1].C(1, 2);
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

function_call_statement

+
function_call_statement: function_call ";"+
+
+
+

Methods

+ + + + + + +

from_lark(invocation)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full type name, including any dereferencing or subscripts.

meta

value

The initialization value (the function call itself).

name

The function name.

parameters

Positional, naed, or output parameters.

dereferenced

Dereference the return value?

+
+
+static from_lark(invocation: FunctionCall) FunctionCallStatement[source]
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.FunctionVariableDeclarations.html b/master/api/blark.transform.FunctionVariableDeclarations.html new file mode 100644 index 0000000..63eb6ba --- /dev/null +++ b/master/api/blark.transform.FunctionVariableDeclarations.html @@ -0,0 +1,378 @@ + + + + + + + blark.transform.FunctionVariableDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.FunctionVariableDeclarations

+
+
+class blark.transform.FunctionVariableDeclarations(attrs: 'Optional[VariableAttributes]', items: 'List[VariableInitDeclaration]', meta: 'Optional[Meta]' = None)[source]
+

Bases: VariableDeclarationBlock

+

Lark grammar

+

This class is used by the following grammar rules:

+

function_var_declarations

+
function_var_declarations: "VAR"i [ variable_attributes ] var_body "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, body)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, body: Tree) FunctionVariableDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.GlobalVariableAttributes.html b/master/api/blark.transform.GlobalVariableAttributes.html new file mode 100644 index 0000000..93c157f --- /dev/null +++ b/master/api/blark.transform.GlobalVariableAttributes.html @@ -0,0 +1,363 @@ + + + + + + + blark.transform.GlobalVariableAttributes — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.GlobalVariableAttributes

+
+
+class blark.transform.GlobalVariableAttributes(value)[source]
+

Bases: _FlagHelper, IntFlag

+

An enumeration.

+

Lark grammar

+

This class is used by the following grammar rules:

+

global_variable_attributes

+
global_variable_attributes: GLOBAL_VAR_ATTRIB+
+
+
+

Attributes

+ + + + + + + + + + + + + + + + + + +

constant

retain

non_retain

persistent

internal

+
+
+constant = 1
+
+ +
+
+retain = 2
+
+ +
+
+non_retain = 4
+
+ +
+
+persistent = 8
+
+ +
+
+internal = 16
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.GlobalVariableDeclaration.html b/master/api/blark.transform.GlobalVariableDeclaration.html new file mode 100644 index 0000000..5a30ce3 --- /dev/null +++ b/master/api/blark.transform.GlobalVariableDeclaration.html @@ -0,0 +1,417 @@ + + + + + + + blark.transform.GlobalVariableDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.GlobalVariableDeclaration

+
+
+class blark.transform.GlobalVariableDeclaration(spec: GlobalVariableSpec, init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | FunctionCall, meta: Meta | None = None)[source]
+

Bases: object

+

A declaration of one or more global variables: name and location +specification and initialization type.

+

Examples:

+
fValue1 : INT;
+fValue2 : INT (0..10);
+fValue3 : (A, B);
+fValue4 : (A, B) DINT;
+fValue5 : ARRAY [1..10] OF INT;
+fValue6 : ARRAY [1..10] OF ARRAY [1..10] OF INT;
+fValue7 : FB_Test(1, 2, 3);
+fValue8 : FB_Test(A := 1, B := 2, C => 3);
+fValue9 : STRING[10] := 'abc';
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

global_var_decl

+
global_var_decl: global_var_spec ":" ( _located_var_spec_init | function_call ) ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(spec, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name of the variable(s).

full_type_name

The full type name of the variable(s).

location

The (optional) variable location.

meta

variables

The variable names contained.

spec

init

+
+
+spec: GlobalVariableSpec
+
+ +
+
+init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | FunctionCall
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property variables: List[Token]
+

The variable names contained.

+
+ +
+
+property location: IncompleteLocation | Location | None
+

The (optional) variable location.

+
+ +
+
+property base_type_name: str | Token
+

The base type name of the variable(s).

+
+ +
+
+property full_type_name: str | Token
+

The full type name of the variable(s).

+
+ +
+
+__init__(spec: GlobalVariableSpec, init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | FunctionCall, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.GlobalVariableDeclarations.html b/master/api/blark.transform.GlobalVariableDeclarations.html new file mode 100644 index 0000000..aef4ca4 --- /dev/null +++ b/master/api/blark.transform.GlobalVariableDeclarations.html @@ -0,0 +1,388 @@ + + + + + + + blark.transform.GlobalVariableDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.GlobalVariableDeclarations

+
+
+class blark.transform.GlobalVariableDeclarations(attrs: GlobalVariableAttributes | None, items: List[GlobalVariableDeclaration], meta: Meta | None = None, name: str | None = None)[source]
+

Bases: VariableDeclarationBlock

+

Global variable declarations block (VAR_GLOBAL).

+

May be annotated with attributes (see GlobalVariableAttributes).

+

Lark grammar

+

This class is used by the following grammar rules:

+

global_var_declarations

+
global_var_declarations: "VAR_GLOBAL"i [ global_variable_attributes ] global_var_body_item* "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta, name])

from_lark(attrs, *items)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

name

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR_GLOBAL'
+
+ +
+
+attrs: GlobalVariableAttributes | None
+
+ +
+
+items: List[GlobalVariableDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+name: str | None = None
+
+ +
+
+static from_lark(attrs: GlobalVariableAttributes | None, *items: GlobalVariableDeclaration) GlobalVariableDeclarations[source]
+
+ +
+
+__init__(attrs: GlobalVariableAttributes | None, items: List[GlobalVariableDeclaration], meta: Meta | None = None, name: str | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.GlobalVariableSpec.html b/master/api/blark.transform.GlobalVariableSpec.html new file mode 100644 index 0000000..2a96af7 --- /dev/null +++ b/master/api/blark.transform.GlobalVariableSpec.html @@ -0,0 +1,378 @@ + + + + + + + blark.transform.GlobalVariableSpec — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.GlobalVariableSpec

+
+
+class blark.transform.GlobalVariableSpec(variables: List[Token], location: IncompleteLocation | Location | None, meta: Meta | None = None)[source]
+

Bases: object

+

Global variable specification; the part that comes before the +initialization.

+

Located (or incomplete located) specifications only apply to one variable, +whereas simple specifications can have multiple variables.

+

Examples:

+
iValue1, iValue2
+iValue3 AT %I*
+iValue4 AT %IX1.1
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

global_var_spec

+
global_var_spec: global_var_list
+               | global_var_name (location | incomplete_location)
+
+
+

Methods

+ + + + + + + + + +

__init__(variables, location[, meta])

from_lark(name_or_names[, location])

+

Attributes

+ + + + + + + + + + + + +

meta

variables

location

+
+
+variables: List[Token]
+
+ +
+
+location: IncompleteLocation | Location | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(name_or_names: Token | Tree, location: IncompleteLocation | Location | None = None) GlobalVariableSpec[source]
+
+ +
+
+__init__(variables: List[Token], location: IncompleteLocation | Location | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.GrammarTransformer.html b/master/api/blark.transform.GrammarTransformer.html new file mode 100644 index 0000000..ef7f299 --- /dev/null +++ b/master/api/blark.transform.GrammarTransformer.html @@ -0,0 +1,1582 @@ + + + + + + + blark.transform.GrammarTransformer — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.GrammarTransformer

+
+
+class blark.transform.GrammarTransformer(comments: List[Token] | None = None, fn: str | Path | None = None, source_code: str | None = None)[source]
+

Bases: Transformer_InPlaceRecursive

+

Grammar transformer which takes lark objects and makes a SourceCode.

+
+
Attributes:
+
+
_filenamestr

Filename of grammar being transformed.

+
+
commentslist of lark.Token

Sorted list of comments and pragmas for annotating the resulting +transformed grammar.

+
+
+
+
+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

__init__([comments, fn, source_code])

access_specifier(data, children, meta)

action(data, children, meta)

add_expression(data, children, meta)

and_expression(data, children, meta)

and_then_expression(data, children, meta)

array_initial_element(data, children, meta)

array_initial_element_count(data, children, meta)

array_spec_init(data, children, meta)

array_specification(data, children, meta)

array_type_declaration(data, children, meta)

array_var_init_decl(data, children, meta)

assignment_expression(data, children, meta)

assignment_statement(data, children, meta)

bare_array_initialization(data, children, meta)

binary_bit_string_literal(data, children, meta)

binary_integer(data, children, meta)

bit_string_literal(data, children, meta)

bracketed_array_initialization(data, ...)

bracketed_expression(data, children, meta)

case_element(data, children, meta)

case_element_statement_list(data, children, meta)

case_elements(data, children, meta)

case_statement(data, children, meta)

chained_function_call(data, children, meta)

chained_function_call_statement(data, ...)

comparison_expression(data, children, meta)

constant(data, children, meta)

continue_statement(data, children, meta)

data_type_declaration(data, children, meta)

date(data, children, meta)

date_and_time(data, children, meta)

direct_variable(data, children, meta)

double_byte_string_spec(data, children, meta)

double_byte_string_var_declaration(data, ...)

duration(data, children, meta)

edge_declaration(data, children, meta)

else_clause(data, children, meta)

else_if_clause(data, children, meta)

end_of_statement_list_label(data, children, meta)

enumerated_spec_init(data, children, meta)

enumerated_specification(data, children, meta)

enumerated_type_declaration(data, children, meta)

enumerated_value(data, children, meta)

equality_expression(data, children, meta)

exit_statement(data, children, meta)

expression(data, children, meta)

expression_term(data, children, meta)

extends(data, children, meta)

external_declaration(data, children, meta)

external_var_declarations(data, children, meta)

false(data, children, meta)

fb_decl_name_list(data, children, meta)

fb_invocation_decl(data, children, meta)

fb_name_decl(data, children, meta)

field_selector(data, children, meta)

for_statement(data, children, meta)

full_subrange(data, children, meta)

function_block_method_declaration(data, ...)

function_block_property_declaration(data, ...)

function_block_type_declaration(data, ...)

function_call(data, children, meta)

function_call_statement(data, children, meta)

function_declaration(data, children, meta)

function_var_declarations(data, children, meta)

global_var_decl(data, children, meta)

global_var_declarations(data, children, meta)

global_var_spec(data, children, meta)

global_variable_attributes(data, children, meta)

hex_bit_string_literal(data, children, meta)

hex_integer(data, children, meta)

iec_source(data, children, meta)

if_statement(data, children, meta)

implements(data, children, meta)

incomplete_located_var_decl(data, children, meta)

incomplete_located_var_declarations(data, ...)

incomplete_location(data, children, meta)

indirect_simple_specification(data, ...)

indirection_type(data, children, meta)

initialized_structure(data, children, meta)

input_declarations(data, children, meta)

input_output_declarations(data, children, meta)

input_param_assignment(data, children, meta)

integer(data, children, meta)

integer_literal(data, children, meta)

interface_declaration(data, children, meta)

jmp_statement(data, children, meta)

labeled_statement(data, children, meta)

ldate(data, children, meta)

ldate_and_time(data, children, meta)

lduration(data, children, meta)

located_var_decl(data, children, meta)

located_var_declarations(data, children, meta)

location(data, children, meta)

ltime_of_day(data, children, meta)

multi_element_variable(data, children, meta)

no_op_statement(data, children, meta)

non_generic_type_name(data, children, meta)

object_initializer_array(data, children, meta)

octal_bit_string_literal(data, children, meta)

octal_integer(data, children, meta)

or_else_expression(data, children, meta)

output_declarations(data, children, meta)

output_parameter_assignment(data, children, meta)

param_assignment(data, children, meta)

parenthesized_expression(data, children, meta)

pointer_type(data, children, meta)

program_access_decl(data, children, meta)

program_access_decls(data, children, meta)

program_declaration(data, children, meta)

program_var_declarations(data, children, meta)

real_literal(data, children, meta)

reference_assignment_statement(data, ...)

repeat_statement(data, children, meta)

reset_statement(data, children, meta)

return_statement(data, children, meta)

set_statement(data, children, meta)

signed_integer(data, children, meta)

simple_spec_init(data, children, meta)

simple_specification(data, children, meta)

simple_type_declaration(data, children, meta)

single_byte_string_spec(data, children, meta)

single_byte_string_var_declaration(data, ...)

statement_list(data, children, meta)

static_var_declarations(data, children, meta)

string_literal(data, children, meta)

string_spec_length(data, children, meta)

string_type_declaration(data, children, meta)

string_type_specification(data, children, meta)

structure_element_declaration(data, ...)

structure_element_initialization(data, ...)

structure_initialization(data, children, meta)

structure_type_declaration(data, children, meta)

structured_var_init_decl(data, children, meta)

subrange(data, children, meta)

subrange_spec_init(data, children, meta)

subrange_specification(data, children, meta)

subrange_type_declaration(data, children, meta)

subscript_list(data, children, meta)

temp_var_decls(data, children, meta)

time_of_day(data, children, meta)

transform(tree, *[, line_map])

Transform the given tree, and return the final result

true(data, children, meta)

unary_expression(data, children, meta)

union_element_declaration(data, children, meta)

union_type_declaration(data, children, meta)

var1(data, children, meta)

var1_init_decl(data, children, meta)

var1_list(data, children, meta)

var_declarations(data, children, meta)

var_inst_declaration(data, children, meta)

variable_attributes(data, children, meta)

variable_name(data, children, meta)

while_statement(data, children, meta)

xor_expression(data, children, meta)

+

Attributes

+ + + + + + +

comments

+
+
+__init__(comments: List[Token] | None = None, fn: str | Path | None = None, source_code: str | None = None)[source]
+
+ +
+
+comments: List[Token]
+
+ +
+
+transform(tree: Tree, *, line_map: dict[int, int] | None = None)[source]
+

Transform the given tree, and return the final result

+
+ +
+
+constant(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+full_subrange(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+var1_list(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+fb_decl_name_list(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+signed_integer(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+integer(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+binary_integer(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+octal_integer(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+hex_integer(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+true(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+false(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+program_var_declarations(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+case_elements(data: Any, children: list, meta: Meta) Any[source]
+
+ +
+
+access_specifier(data: Any, children: list, meta: Meta) Any
+
+ +
+
+action(data: Any, children: list, meta: Meta) Any
+
+ +
+
+add_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+and_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+and_then_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+array_initial_element(data: Any, children: list, meta: Meta) Any
+
+ +
+
+array_initial_element_count(data: Any, children: list, meta: Meta) Any
+
+ +
+
+array_spec_init(data: Any, children: list, meta: Meta) Any
+
+ +
+
+array_specification(data: Any, children: list, meta: Meta) Any
+
+ +
+
+array_type_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+array_var_init_decl(data: Any, children: list, meta: Meta) Any
+
+ +
+
+assignment_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+assignment_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+bare_array_initialization(data: Any, children: list, meta: Meta) Any
+
+ +
+
+binary_bit_string_literal(data: Any, children: list, meta: Meta) Any
+
+ +
+
+bit_string_literal(data: Any, children: list, meta: Meta) Any
+
+ +
+
+bracketed_array_initialization(data: Any, children: list, meta: Meta) Any
+
+ +
+
+bracketed_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+case_element(data: Any, children: list, meta: Meta) Any
+
+ +
+
+case_element_statement_list(data: Any, children: list, meta: Meta) Any
+
+ +
+
+case_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+chained_function_call(data: Any, children: list, meta: Meta) Any
+
+ +
+
+chained_function_call_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+comparison_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+continue_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+data_type_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+date(data: Any, children: list, meta: Meta) Any
+
+ +
+
+date_and_time(data: Any, children: list, meta: Meta) Any
+
+ +
+
+direct_variable(data: Any, children: list, meta: Meta) Any
+
+ +
+
+double_byte_string_spec(data: Any, children: list, meta: Meta) Any
+
+ +
+
+double_byte_string_var_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+duration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+edge_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+else_clause(data: Any, children: list, meta: Meta) Any
+
+ +
+
+else_if_clause(data: Any, children: list, meta: Meta) Any
+
+ +
+
+end_of_statement_list_label(data: Any, children: list, meta: Meta) Any
+
+ +
+
+enumerated_spec_init(data: Any, children: list, meta: Meta) Any
+
+ +
+
+enumerated_specification(data: Any, children: list, meta: Meta) Any
+
+ +
+
+enumerated_type_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+enumerated_value(data: Any, children: list, meta: Meta) Any
+
+ +
+
+equality_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+exit_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+expression_term(data: Any, children: list, meta: Meta) Any
+
+ +
+
+extends(data: Any, children: list, meta: Meta) Any
+
+ +
+
+external_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+external_var_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+fb_invocation_decl(data: Any, children: list, meta: Meta) Any
+
+ +
+
+fb_name_decl(data: Any, children: list, meta: Meta) Any
+
+ +
+
+field_selector(data: Any, children: list, meta: Meta) Any
+
+ +
+
+for_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+function_block_method_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+function_block_property_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+function_block_type_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+function_call(data: Any, children: list, meta: Meta) Any
+
+ +
+
+function_call_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+function_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+function_var_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+global_var_decl(data: Any, children: list, meta: Meta) Any
+
+ +
+
+global_var_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+global_var_spec(data: Any, children: list, meta: Meta) Any
+
+ +
+
+global_variable_attributes(data: Any, children: list, meta: Meta) Any
+
+ +
+
+hex_bit_string_literal(data: Any, children: list, meta: Meta) Any
+
+ +
+
+iec_source(data: Any, children: list, meta: Meta) Any
+
+ +
+
+if_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+implements(data: Any, children: list, meta: Meta) Any
+
+ +
+
+incomplete_located_var_decl(data: Any, children: list, meta: Meta) Any
+
+ +
+
+incomplete_located_var_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+incomplete_location(data: Any, children: list, meta: Meta) Any
+
+ +
+
+indirect_simple_specification(data: Any, children: list, meta: Meta) Any
+
+ +
+
+indirection_type(data: Any, children: list, meta: Meta) Any
+
+ +
+
+initialized_structure(data: Any, children: list, meta: Meta) Any
+
+ +
+
+input_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+input_output_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+input_param_assignment(data: Any, children: list, meta: Meta) Any
+
+ +
+
+integer_literal(data: Any, children: list, meta: Meta) Any
+
+ +
+
+interface_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+jmp_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+labeled_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+ldate(data: Any, children: list, meta: Meta) Any
+
+ +
+
+ldate_and_time(data: Any, children: list, meta: Meta) Any
+
+ +
+
+lduration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+located_var_decl(data: Any, children: list, meta: Meta) Any
+
+ +
+
+located_var_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+location(data: Any, children: list, meta: Meta) Any
+
+ +
+
+ltime_of_day(data: Any, children: list, meta: Meta) Any
+
+ +
+
+multi_element_variable(data: Any, children: list, meta: Meta) Any
+
+ +
+
+no_op_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+non_generic_type_name(data: Any, children: list, meta: Meta) Any
+
+ +
+
+object_initializer_array(data: Any, children: list, meta: Meta) Any
+
+ +
+
+octal_bit_string_literal(data: Any, children: list, meta: Meta) Any
+
+ +
+
+or_else_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+output_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+output_parameter_assignment(data: Any, children: list, meta: Meta) Any
+
+ +
+
+param_assignment(data: Any, children: list, meta: Meta) Any
+
+ +
+
+parenthesized_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+pointer_type(data: Any, children: list, meta: Meta) Any
+
+ +
+
+program_access_decl(data: Any, children: list, meta: Meta) Any
+
+ +
+
+program_access_decls(data: Any, children: list, meta: Meta) Any
+
+ +
+
+program_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+real_literal(data: Any, children: list, meta: Meta) Any
+
+ +
+
+reference_assignment_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+repeat_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+reset_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+return_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+set_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+simple_spec_init(data: Any, children: list, meta: Meta) Any
+
+ +
+
+simple_specification(data: Any, children: list, meta: Meta) Any
+
+ +
+
+simple_type_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+single_byte_string_spec(data: Any, children: list, meta: Meta) Any
+
+ +
+
+single_byte_string_var_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+statement_list(data: Any, children: list, meta: Meta) Any
+
+ +
+
+static_var_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+string_literal(data: Any, children: list, meta: Meta) Any
+
+ +
+
+string_spec_length(data: Any, children: list, meta: Meta) Any
+
+ +
+
+string_type_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+string_type_specification(data: Any, children: list, meta: Meta) Any
+
+ +
+
+structure_element_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+structure_element_initialization(data: Any, children: list, meta: Meta) Any
+
+ +
+
+structure_initialization(data: Any, children: list, meta: Meta) Any
+
+ +
+
+structure_type_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+structured_var_init_decl(data: Any, children: list, meta: Meta) Any
+
+ +
+
+subrange(data: Any, children: list, meta: Meta) Any
+
+ +
+
+subrange_spec_init(data: Any, children: list, meta: Meta) Any
+
+ +
+
+subrange_specification(data: Any, children: list, meta: Meta) Any
+
+ +
+
+subrange_type_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+subscript_list(data: Any, children: list, meta: Meta) Any
+
+ +
+
+temp_var_decls(data: Any, children: list, meta: Meta) Any
+
+ +
+
+time_of_day(data: Any, children: list, meta: Meta) Any
+
+ +
+
+unary_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+
+union_element_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+union_type_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+var1(data: Any, children: list, meta: Meta) Any
+
+ +
+
+var1_init_decl(data: Any, children: list, meta: Meta) Any
+
+ +
+
+var_declarations(data: Any, children: list, meta: Meta) Any
+
+ +
+
+var_inst_declaration(data: Any, children: list, meta: Meta) Any
+
+ +
+
+variable_attributes(data: Any, children: list, meta: Meta) Any
+
+ +
+
+variable_name(data: Any, children: list, meta: Meta) Any
+
+ +
+
+while_statement(data: Any, children: list, meta: Meta) Any
+
+ +
+
+xor_expression(data: Any, children: list, meta: Meta) Any
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.HexBitString.html b/master/api/blark.transform.HexBitString.html new file mode 100644 index 0000000..7fb0205 --- /dev/null +++ b/master/api/blark.transform.HexBitString.html @@ -0,0 +1,360 @@ + + + + + + + blark.transform.HexBitString — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.HexBitString

+
+
+class blark.transform.HexBitString(type_name: Token | None, value: Token, meta: Meta | None = None)[source]
+

Bases: BitString

+

Hex bit string literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

hex_bit_string_literal

+
| [ BIT_STRING_TYPE_NAME "#" ] "16#" HEX_STRING   -> hex_bit_string_literal
+
+
+

Methods

+ + + + + + +

__init__(type_name, value[, meta])

+

Attributes

+ + + + + + + + + + + + + + + +

base

The numeric base of the value (e.g., 10 is decimal)

meta

Lark metadata.

type_name

The optional type name of the string.

value

The string literal.

+
+
+base: ClassVar[int] = 16
+

The numeric base of the value (e.g., 10 is decimal)

+
+ +
+
+meta: Meta | None = None
+

Lark metadata.

+
+ +
+
+__init__(type_name: Token | None, value: Token, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.HexInteger.html b/master/api/blark.transform.HexInteger.html new file mode 100644 index 0000000..9f4bb11 --- /dev/null +++ b/master/api/blark.transform.HexInteger.html @@ -0,0 +1,352 @@ + + + + + + + blark.transform.HexInteger — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.HexInteger

+
+
+class blark.transform.HexInteger(value: 'lark.Token', type_name: 'Optional[lark.Token]' = None, meta: 'Optional[Meta]' = None)[source]
+

Bases: Integer

+

Lark grammar

+

This class is used by the following grammar rules:

+

hex_integer

+
| "16#" HEX_STRING            -> hex_integer
+
+
+

Methods

+ + + + + + +

__init__(value[, type_name, meta])

+

Attributes

+ + + + + + + + + + + + + + + +

base

meta

type_name

value

+
+
+base: ClassVar[int] = 16
+
+ +
+
+__init__(value: Token, type_name: Token | None = None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.IfStatement.html b/master/api/blark.transform.IfStatement.html new file mode 100644 index 0000000..d0d1c42 --- /dev/null +++ b/master/api/blark.transform.IfStatement.html @@ -0,0 +1,384 @@ + + + + + + + blark.transform.IfStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.IfStatement

+
+
+class blark.transform.IfStatement(if_expression: Expression, statements: StatementList | None, else_ifs: List[ElseIfClause], else_clause: ElseClause | None, meta: Meta | None = None)[source]
+

Bases: Statement

+

The IF part of an IF/ELSIF/ELSE/END_IF block.

+

Lark grammar

+

This class is used by the following grammar rules:

+

if_statement

+
if_statement: "IF"i expression "THEN"i [ statement_list ] ( else_if_clause )* [ else_clause ] "END_IF"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(if_expression, statements, ...[, meta])

from_lark(if_expr, then, *args)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

meta

if_expression

statements

else_ifs

else_clause

+
+
+if_expression: Expression
+
+ +
+
+statements: StatementList | None
+
+ +
+
+else_ifs: List[ElseIfClause]
+
+ +
+
+else_clause: ElseClause | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(if_expr: Expression, then: StatementList | None, *args: ElseIfClause | ElseClause | None) IfStatement[source]
+
+ +
+
+__init__(if_expression: Expression, statements: StatementList | None, else_ifs: List[ElseIfClause], else_clause: ElseClause | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Implements.html b/master/api/blark.transform.Implements.html new file mode 100644 index 0000000..d25d963 --- /dev/null +++ b/master/api/blark.transform.Implements.html @@ -0,0 +1,366 @@ + + + + + + + blark.transform.Implements — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Implements

+
+
+class blark.transform.Implements(interfaces: List[Token], meta: Meta | None = None)[source]
+

Bases: object

+

The “IMPLEMENTS” portion of a function block, indicating it implements +one or more interfaces.

+

Examples:

+
IMPLEMENTS I_Interface1
+IMPLEMENTS I_Interface1, I_Interface2
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

implements

+
implements: "IMPLEMENTS"i DOTTED_IDENTIFIER ("," DOTTED_IDENTIFIER)*
+
+
+

Methods

+ + + + + + + + + +

__init__(interfaces[, meta])

from_lark(*interfaces)

+

Attributes

+ + + + + + + + + +

meta

interfaces

+
+
+interfaces: List[Token]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*interfaces: Token) Implements[source]
+
+ +
+
+__init__(interfaces: List[Token], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.IncompleteLocatedVariableDeclaration.html b/master/api/blark.transform.IncompleteLocatedVariableDeclaration.html new file mode 100644 index 0000000..f0b12c5 --- /dev/null +++ b/master/api/blark.transform.IncompleteLocatedVariableDeclaration.html @@ -0,0 +1,376 @@ + + + + + + + blark.transform.IncompleteLocatedVariableDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.IncompleteLocatedVariableDeclaration

+
+
+class blark.transform.IncompleteLocatedVariableDeclaration(name: SimpleVariable, location: IncompleteLocation, init: SimpleSpecification | SubrangeTypeInitialization | EnumeratedTypeInitialization | StringTypeSpecification, meta: Meta | None = None)[source]
+

Bases: object

+

A named, incomplete located variable declaration inside a variable block.

+

Lark grammar

+

This class is used by the following grammar rules:

+

incomplete_located_var_decl

+
incomplete_located_var_decl: variable_name incomplete_location ":" var_spec ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(name, location, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

name

location

init

+
+
+name: SimpleVariable
+
+ +
+
+location: IncompleteLocation
+
+ +
+
+init: SimpleSpecification | SubrangeTypeInitialization | EnumeratedTypeInitialization | StringTypeSpecification
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: SimpleVariable, location: IncompleteLocation, init: SimpleSpecification | SubrangeTypeInitialization | EnumeratedTypeInitialization | StringTypeSpecification, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.IncompleteLocatedVariableDeclarations.html b/master/api/blark.transform.IncompleteLocatedVariableDeclarations.html new file mode 100644 index 0000000..db9629e --- /dev/null +++ b/master/api/blark.transform.IncompleteLocatedVariableDeclarations.html @@ -0,0 +1,382 @@ + + + + + + + blark.transform.IncompleteLocatedVariableDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.IncompleteLocatedVariableDeclarations

+
+
+class blark.transform.IncompleteLocatedVariableDeclarations(attrs: VariableAttributes | None, items: List[IncompleteLocatedVariableDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

Incomplete located variable declarations block (VAR).

+

May be annotated with attributes (see VariableAttributes).

+

All variables in this are expected to have incomplete locations (e.g., just +%I*).

+

Lark grammar

+

This class is used by the following grammar rules:

+

incomplete_located_var_declarations

+
incomplete_located_var_declarations: "VAR"i [ variable_attributes ] incomplete_located_var_decl* "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, *items)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[IncompleteLocatedVariableDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, *items: IncompleteLocatedVariableDeclaration) IncompleteLocatedVariableDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[IncompleteLocatedVariableDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.IncompleteLocation.html b/master/api/blark.transform.IncompleteLocation.html new file mode 100644 index 0000000..033759a --- /dev/null +++ b/master/api/blark.transform.IncompleteLocation.html @@ -0,0 +1,371 @@ + + + + + + + blark.transform.IncompleteLocation — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.IncompleteLocation

+
+
+class blark.transform.IncompleteLocation(value)[source]
+

Bases: Enum

+

Incomplete location information.

+

Lark grammar

+

This class is used by the following grammar rules:

+

incomplete_location

+
incomplete_location: "AT"i /\%(I|Q|M)\*/
+
+
+

Methods

+ + + + + + +

from_lark(token)

+

Attributes

+ + + + + + + + + + + + + + + +

none

input

I/O to PLC task.

output

PLC task to I/O.

memory

Memory.

+
+
+none = 1
+
+ +
+
+input = '%I*'
+

I/O to PLC task.

+
+ +
+
+output = '%Q*'
+

PLC task to I/O.

+
+ +
+
+memory = '%M*'
+

Memory.

+
+ +
+
+static from_lark(token: Token | None) IncompleteLocation[source]
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.IndirectSimpleSpecification.html b/master/api/blark.transform.IndirectSimpleSpecification.html new file mode 100644 index 0000000..b02cbf4 --- /dev/null +++ b/master/api/blark.transform.IndirectSimpleSpecification.html @@ -0,0 +1,398 @@ + + + + + + + blark.transform.IndirectSimpleSpecification — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.IndirectSimpleSpecification

+
+
+class blark.transform.IndirectSimpleSpecification(indirection: IndirectionType | None, type: SimpleSpecification, init_parameters: List[InputParameterAssignment] | None, meta: Meta | None = None)[source]
+

Bases: TypeSpecificationBase

+

A simple specification with the possibility of indirection.

+

Examples:

+
TypeName
+POINTER TO TypeName
+REFERENCE TO TypeName
+REFERENCE TO POINTER TO TypeName
+
+
+

Initialization parameters such as these are parsed but otherwise ignored +by TwinCAT:

+
POINTER TO TypeName(1, 2)
+POINTER TO TypeName(1, 2, C := 4)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

indirect_simple_specification

+
indirect_simple_specification: [ indirection_type ] simple_specification [ input_param_args ]
+
+
+

Methods

+ + + + + + + + + +

__init__(indirection, type, init_parameters)

from_lark(indirection, type_, ...)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

base_type_name

The full type name.

full_type_name

The full type name.

meta

type_info

The base type name.

indirection

type

init_parameters

+
+
+indirection: IndirectionType | None
+
+ +
+
+type: SimpleSpecification
+
+ +
+
+init_parameters: List[InputParameterAssignment] | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(indirection: IndirectionType | None, type_: SimpleSpecification, init_parameters_tree: Tree | None) IndirectSimpleSpecification[source]
+
+ +
+
+__init__(indirection: IndirectionType | None, type: SimpleSpecification, init_parameters: List[InputParameterAssignment] | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.IndirectionType.html b/master/api/blark.transform.IndirectionType.html new file mode 100644 index 0000000..ad2ab3e --- /dev/null +++ b/master/api/blark.transform.IndirectionType.html @@ -0,0 +1,393 @@ + + + + + + + blark.transform.IndirectionType — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.IndirectionType

+
+
+class blark.transform.IndirectionType(pointer_depth: int, reference: bool, meta: Meta | None = None)[source]
+

Bases: object

+

Indirect access through a pointer or reference.

+

Lark grammar

+

This class is used by the following grammar rules:

+

indirection_type

+
indirection_type: REFERENCE_TO
+                | POINTER_TO+
+                | REFERENCE_TO POINTER_TO+
+
+
+

pointer_type

+
pointer_type: POINTER_TO+
+
+
+

Methods

+ + + + + + + + + +

__init__(pointer_depth, reference[, meta])

from_lark(*tokens)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

is_indirect

True if this denotes a pointer (of any depth) or a reference.

meta

value

pointer_depth

A depth of 1 is "POINTER TO", a depth of 2 is "POINTER TO POINTER TO".

reference

If set, "REFERENCE TO POINTER TO..."

+
+
+pointer_depth: int
+

A depth of 1 is “POINTER TO”, a depth of 2 is “POINTER TO POINTER TO”.

+
+ +
+
+reference: bool
+

If set, “REFERENCE TO POINTER TO…”

+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property is_indirect: bool
+

True if this denotes a pointer (of any depth) or a reference.

+
+ +
+
+static from_lark(*tokens: Token) IndirectionType[source]
+
+ +
+
+property value: str
+
+ +
+
+__init__(pointer_depth: int, reference: bool, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.InitDeclaration.html b/master/api/blark.transform.InitDeclaration.html new file mode 100644 index 0000000..886517d --- /dev/null +++ b/master/api/blark.transform.InitDeclaration.html @@ -0,0 +1,346 @@ + + + + + + + blark.transform.InitDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.InitDeclaration

+
+
+class blark.transform.InitDeclaration[source]
+

Bases: object

+

Base class for a declaration of one or more variables with a type initialization.

+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + +

variables

init

meta

+
+
+variables: List[DeclaredVariable]
+
+ +
+
+init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | _GenericInit
+
+ +
+
+meta: Meta | None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.InitializedStructure.html b/master/api/blark.transform.InitializedStructure.html new file mode 100644 index 0000000..ba3285b --- /dev/null +++ b/master/api/blark.transform.InitializedStructure.html @@ -0,0 +1,390 @@ + + + + + + + blark.transform.InitializedStructure — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.InitializedStructure

+
+
+class blark.transform.InitializedStructure(name: Token, init: StructureInitialization, meta: Meta | None = None)[source]
+

Bases: TypeInitializationBase

+

A named initialized structure.

+

Examples:

+
ST_TypeName := (iValue := 0, bValue := TRUE)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

initialized_structure

+
initialized_structure: structure_type_name ":=" structure_initialization
+
+
+

Methods

+ + + + + + + + + +

__init__(name, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full, qualified type name.

meta

type_info

The base type name.

value

The initialization value (call).

name

init

+
+
+name: Token
+
+ +
+
+init: StructureInitialization
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property value: str
+

The initialization value (call).

+
+ +
+
+__init__(name: Token, init: StructureInitialization, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.InputDeclarations.html b/master/api/blark.transform.InputDeclarations.html new file mode 100644 index 0000000..59c1577 --- /dev/null +++ b/master/api/blark.transform.InputDeclarations.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.InputDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.InputDeclarations

+
+
+class blark.transform.InputDeclarations(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

A block of named, input variable declarations (VAR_INPUT).

+

May be annotated with attributes (see VariableAttributes).

+

Lark grammar

+

This class is used by the following grammar rules:

+

input_declarations

+
input_declarations: "VAR_INPUT"i [ variable_attributes ] _var_input_body "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, *items)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR_INPUT'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, *items: ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration) InputDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.InputOutputDeclarations.html b/master/api/blark.transform.InputOutputDeclarations.html new file mode 100644 index 0000000..5d5f966 --- /dev/null +++ b/master/api/blark.transform.InputOutputDeclarations.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.InputOutputDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.InputOutputDeclarations

+
+
+class blark.transform.InputOutputDeclarations(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

A block of named, input/output variable declarations (VAR_IN_OUT).

+

May be annotated with attributes (see VariableAttributes).

+

Lark grammar

+

This class is used by the following grammar rules:

+

input_output_declarations

+
input_output_declarations: "VAR_IN_OUT"i [ variable_attributes ] var_body "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, items)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR_IN_OUT'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, items: Tree) InputOutputDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.InputParameterAssignment.html b/master/api/blark.transform.InputParameterAssignment.html new file mode 100644 index 0000000..3f89967 --- /dev/null +++ b/master/api/blark.transform.InputParameterAssignment.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.InputParameterAssignment — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.InputParameterAssignment

+
+
+class blark.transform.InputParameterAssignment(name: SimpleVariable | None, value: Expression | None, meta: Meta | None = None)[source]
+

Bases: ParameterAssignment

+

An input parameter in a function call.

+

May be a nameless positional parameter or a named one.

+

Examples:

+
name := value
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

param_assignment

+
param_assignment: [ LOGICAL_NOT ] variable_name "=>" [ expression ] -> output_parameter_assignment
+                | variable_name ":=" [ expression ]
+                | expression
+
+
+

input_param_assignment

+
input_param_assignment: variable_name ":=" [ expression ]
+                      | expression
+
+
+

Methods

+ + + + + + + + + +

__init__(name, value[, meta])

from_lark(*args)

+

Attributes

+ + + + + + + + + + + + +

meta

name

value

+
+
+name: SimpleVariable | None
+
+ +
+
+value: Expression | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*args) InputParameterAssignment[source]
+
+ +
+
+__init__(name: SimpleVariable | None, value: Expression | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Integer.html b/master/api/blark.transform.Integer.html new file mode 100644 index 0000000..5edfa3d --- /dev/null +++ b/master/api/blark.transform.Integer.html @@ -0,0 +1,376 @@ + + + + + + + blark.transform.Integer — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Integer

+
+
+class blark.transform.Integer(value: Token, type_name: Token | None = None, meta: Meta | None = None)[source]
+

Bases: Literal

+

Integer literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

integer_literal

+
integer_literal: [ INTEGER_TYPE_NAME "#" ] any_integer
+
+
+

Methods

+ + + + + + + + + +

__init__(value[, type_name, meta])

from_lark(type_name, value, *[, base])

+

Attributes

+ + + + + + + + + + + + + + + +

base

meta

type_name

value

+
+
+value: Token
+
+ +
+
+type_name: Token | None = None
+
+ +
+
+base: ClassVar[int] = 10
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(type_name: Token | None, value: Integer | Token, *, base: int = 10) Integer[source]
+
+ +
+
+__init__(value: Token, type_name: Token | None = None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Interface.html b/master/api/blark.transform.Interface.html new file mode 100644 index 0000000..8d26623 --- /dev/null +++ b/master/api/blark.transform.Interface.html @@ -0,0 +1,385 @@ + + + + + + + blark.transform.Interface — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Interface

+
+
+class blark.transform.Interface(name: Token, extends: Extends | None, declarations: List[VariableDeclarationBlock], meta: Meta | None = None)[source]
+

Bases: object

+

A full interface declaration, with nested variable declaration blocks.

+

An implementation is not allowed for interfaces, but END_INTERFACE is +still required.

+

Examples:

+
..
+
+
+
+

!! processed by numpydoc !!

+
+

Lark grammar

+

This class is used by the following grammar rules:

+

interface_declaration

+
interface_declaration: "INTERFACE"i IDENTIFIER [ extends ] interface_var_declaration* "END_INTERFACE"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(name, extends, declarations[, meta])

from_lark(name, extends, *decls)

+

Attributes

+ + + + + + + + + + + + + + + +

meta

name

extends

declarations

+
+
+name: Token
+
+ +
+
+extends: Extends | None
+
+ +
+
+declarations: List[VariableDeclarationBlock]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(name: Token, extends: Extends | None, *decls: VariableDeclarationBlock) Interface[source]
+
+ +
+
+__init__(name: Token, extends: Extends | None, declarations: List[VariableDeclarationBlock], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.JumpStatement.html b/master/api/blark.transform.JumpStatement.html new file mode 100644 index 0000000..67dc146 --- /dev/null +++ b/master/api/blark.transform.JumpStatement.html @@ -0,0 +1,364 @@ + + + + + + + blark.transform.JumpStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.JumpStatement

+
+
+class blark.transform.JumpStatement(label: Token, meta: Meta | None = None)[source]
+

Bases: Statement

+

This is the “goto”-style JMP, which points at a label.

+

Examples:

+
JMP label;
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

jmp_statement

+
jmp_statement: "JMP"i LABEL ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(label[, meta])

from_lark()

+

Attributes

+ + + + + + + + + +

meta

label

+
+
+label: Token
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(label: Token, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.LabeledStatement.html b/master/api/blark.transform.LabeledStatement.html new file mode 100644 index 0000000..9896b66 --- /dev/null +++ b/master/api/blark.transform.LabeledStatement.html @@ -0,0 +1,382 @@ + + + + + + + blark.transform.LabeledStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.LabeledStatement

+
+
+class blark.transform.LabeledStatement(label: Token, statement: Statement | None = None, meta: Meta | None = None)[source]
+

Bases: Statement

+

A statement marked with a user-defined label.

+

This is to support the “goto”-style JMP.

+

Examples:

+
label1: A := 1;
+
+label2:
+IF iValue = 1 THEN
+    A := 3;
+END_IF
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

labeled_statement

+
labeled_statement.1: LABEL ":" _statement
+
+
+

end_of_statement_list_label

+
end_of_statement_list_label: LABEL ":"
+
+
+

Methods

+ + + + + + + + + +

__init__(label[, statement, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

statement

label

+
+
+label: Token
+
+ +
+
+statement: Statement | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(label: Token, statement: Statement | None = None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Ldate.html b/master/api/blark.transform.Ldate.html new file mode 100644 index 0000000..7ec3915 --- /dev/null +++ b/master/api/blark.transform.Ldate.html @@ -0,0 +1,385 @@ + + + + + + + blark.transform.Ldate — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Ldate

+
+
+class blark.transform.Ldate(year: Token, month: Token, day: Token, meta: Meta | None = None)[source]
+

Bases: Literal

+

Long date literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

ldate

+
ldate: "LDATE"i "#" _date_literal
+
+
+

Methods

+ + + + + + + + + +

__init__(year, month, day[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

meta

value

The long time of day value.

year

month

day

+
+
+year: Token
+
+ +
+
+month: Token
+
+ +
+
+day: Token
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property value: str
+

The long time of day value.

+
+ +
+
+__init__(year: Token, month: Token, day: Token, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.LdateTime.html b/master/api/blark.transform.LdateTime.html new file mode 100644 index 0000000..b7d48b8 --- /dev/null +++ b/master/api/blark.transform.LdateTime.html @@ -0,0 +1,377 @@ + + + + + + + blark.transform.LdateTime — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.LdateTime

+
+
+class blark.transform.LdateTime(ldate: Ldate, ltime: LtimeOfDay, meta: Meta | None = None)[source]
+

Bases: Literal

+

Long date and time literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

ldate_and_time

+
ldate_and_time: ( "LDATE_AND_TIME"i | "LDT"i ) "#" _date_literal "-" _daytime
+
+
+

Methods

+ + + + + + + + + +

__init__(ldate, ltime[, meta])

from_lark(year, month, day, hour, minute, second)

+

Attributes

+ + + + + + + + + + + + + + + +

meta

value

The time of day value.

ldate

ltime

+
+
+ldate: Ldate
+
+ +
+
+ltime: LtimeOfDay
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(year: Token, month: Token, day: Token, hour: Token, minute: Token, second: Token | None) LdateTime[source]
+
+ +
+
+property value: str
+

The time of day value.

+
+ +
+
+__init__(ldate: Ldate, ltime: LtimeOfDay, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Lduration.html b/master/api/blark.transform.Lduration.html new file mode 100644 index 0000000..7ddd3e0 --- /dev/null +++ b/master/api/blark.transform.Lduration.html @@ -0,0 +1,425 @@ + + + + + + + blark.transform.Lduration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Lduration

+
+
+class blark.transform.Lduration(days: Token | None = None, hours: Token | None = None, minutes: Token | None = None, seconds: Token | None = None, milliseconds: Token | None = None, microseconds: Token | None = None, nanoseconds: Token | None = None, negative: bool = False, meta: Meta | None = None)[source]
+

Bases: Literal

+

Long duration literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

lduration

+
lduration: ( "LTIME"i | "LT"i ) "#" [ MINUS ] _linterval
+
+
+

Methods

+ + + + + + + + + +

__init__([days, hours, minutes, seconds, ...])

from_lark(minus, interval)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

days

hours

meta

microseconds

milliseconds

minutes

nanoseconds

negative

seconds

value

The long duration value.

+
+
+days: Token | None = None
+
+ +
+
+hours: Token | None = None
+
+ +
+
+minutes: Token | None = None
+
+ +
+
+seconds: Token | None = None
+
+ +
+
+milliseconds: Token | None = None
+
+ +
+
+microseconds: Token | None = None
+
+ +
+
+nanoseconds: Token | None = None
+
+ +
+
+negative: bool = False
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(minus: Token | None, interval: Tree) Lduration[source]
+
+ +
+
+property value: str
+

The long duration value.

+
+ +
+
+__init__(days: Token | None = None, hours: Token | None = None, minutes: Token | None = None, seconds: Token | None = None, milliseconds: Token | None = None, microseconds: Token | None = None, nanoseconds: Token | None = None, negative: bool = False, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Literal.html b/master/api/blark.transform.Literal.html new file mode 100644 index 0000000..48ce6a6 --- /dev/null +++ b/master/api/blark.transform.Literal.html @@ -0,0 +1,319 @@ + + + + + + + blark.transform.Literal — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Literal

+
+
+class blark.transform.Literal[source]
+

Bases: Expression

+

Base class for all literal values.

+

Marked as a “tagged union” so that serialization will uniquely identify the +Python class.

+

Methods

+ + + +
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.LocatedVariableDeclaration.html b/master/api/blark.transform.LocatedVariableDeclaration.html new file mode 100644 index 0000000..04d2563 --- /dev/null +++ b/master/api/blark.transform.LocatedVariableDeclaration.html @@ -0,0 +1,376 @@ + + + + + + + blark.transform.LocatedVariableDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.LocatedVariableDeclaration

+
+
+class blark.transform.LocatedVariableDeclaration(name: SimpleVariable | None, location: Location, init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization, meta: Meta | None = None)[source]
+

Bases: object

+

Declaration of a variable in a VAR block that is located.

+

Lark grammar

+

This class is used by the following grammar rules:

+

located_var_decl

+
located_var_decl: [ variable_name ] location ":" _located_var_spec_init ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(name, location, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

name

location

init

+
+
+name: SimpleVariable | None
+
+ +
+
+location: Location
+
+ +
+
+init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: SimpleVariable | None, location: Location, init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.LocatedVariableDeclarations.html b/master/api/blark.transform.LocatedVariableDeclarations.html new file mode 100644 index 0000000..7a77fc9 --- /dev/null +++ b/master/api/blark.transform.LocatedVariableDeclarations.html @@ -0,0 +1,381 @@ + + + + + + + blark.transform.LocatedVariableDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.LocatedVariableDeclarations

+
+
+class blark.transform.LocatedVariableDeclarations(attrs: VariableAttributes | None, items: List[LocatedVariableDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

Located variable declarations block (VAR).

+

May be annotated with attributes (see VariableAttributes).

+

All variables in this are expected to be located (e.g., AT %IX1.1).

+

Lark grammar

+

This class is used by the following grammar rules:

+

located_var_declarations

+
located_var_declarations: "VAR"i [ variable_attributes ] located_var_decl* "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, *items)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[LocatedVariableDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, *items: LocatedVariableDeclaration) LocatedVariableDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[LocatedVariableDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Location.html b/master/api/blark.transform.Location.html new file mode 100644 index 0000000..e4e0e01 --- /dev/null +++ b/master/api/blark.transform.Location.html @@ -0,0 +1,351 @@ + + + + + + + blark.transform.Location — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Location

+
+
+class blark.transform.Location(location_prefix: VariableLocationPrefix, location: Token, size_prefix: VariableSizePrefix, bits: List[Token] | None = None, meta: Meta | None = None)[source]
+

Bases: DirectVariable

+

A located direct variable. (e.g., AT %IX1.1)

+

Lark grammar

+

This class is used by the following grammar rules:

+

location

+
location: "AT"i direct_variable
+
+
+

Methods

+ + + + + + +

from_lark(var)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

bits

The number of bits.

meta

Lark metadata.

location_prefix

The location prefix (e.g., I, Q, or M)

location

The location number itself (e.g., 2 of %IX2.1)

size_prefix

Size prefix, used in locations (e.g., %IX1.1 has a bit prefix).

+
+
+static from_lark(var: DirectVariable) Location[source]
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.LtimeOfDay.html b/master/api/blark.transform.LtimeOfDay.html new file mode 100644 index 0000000..811d0a3 --- /dev/null +++ b/master/api/blark.transform.LtimeOfDay.html @@ -0,0 +1,385 @@ + + + + + + + blark.transform.LtimeOfDay — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.LtimeOfDay

+
+
+class blark.transform.LtimeOfDay(hour: Token, minute: Token, second: Token | None = None, meta: Meta | None = None)[source]
+

Bases: Literal

+

Long time of day literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

ltime_of_day

+
ltime_of_day: ("LTIME_OF_DAY"i | "LTOD"i) "#" _daytime
+
+
+

Methods

+ + + + + + + + + +

__init__(hour, minute[, second, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

meta

second

value

The long time of day value.

hour

minute

+
+
+hour: Token
+
+ +
+
+minute: Token
+
+ +
+
+second: Token | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property value: str
+

The long time of day value.

+
+ +
+
+__init__(hour: Token, minute: Token, second: Token | None = None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Meta.html b/master/api/blark.transform.Meta.html new file mode 100644 index 0000000..04e7ff1 --- /dev/null +++ b/master/api/blark.transform.Meta.html @@ -0,0 +1,473 @@ + + + + + + + blark.transform.Meta — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Meta

+
+
+class blark.transform.Meta(empty: bool = True, column: int | None = None, comments: ~typing.List[~lark.lexer.Token] = <factory>, container_column: int | None = None, container_end_column: int | None = None, container_end_line: int | None = None, container_line: int | None = None, end_column: int | None = None, end_line: int | None = None, end_pos: int | None = None, line: int | None = None, start_pos: int | None = None)[source]
+

Bases: object

+

Lark-derived meta information in the form of a dataclass.

+

Methods

+ + + + + + + + + + + + +

__init__([empty, column, comments, ...])

from_lark(lark_meta)

Generate a Meta instance from the lark Metadata.

get_comments_and_pragmas()

Split the contained comments into comments/pragmas.

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

attribute_pragmas

Get {attribute ...} pragmas associated with this code block.

column

Column number.

container_column

Containing start column.

container_end_column

Containing end column.

container_end_line

Containing end line.

container_line

Containing start line.

empty

If the metadata information is not yet filled.

end_column

Final column number.

end_line

Final line number.

end_pos

Final character position.

line

Line number.

start_pos

Starting character position.

comments

Comments relating to the line.

+
+
+empty: bool = True
+

If the metadata information is not yet filled.

+
+ +
+
+column: int | None = None
+

Column number.

+
+ +
+
+comments: List[Token]
+

Comments relating to the line.

+
+ +
+
+container_column: int | None = None
+

Containing start column.

+
+ +
+
+container_end_column: int | None = None
+

Containing end column.

+
+ +
+
+container_end_line: int | None = None
+

Containing end line.

+
+ +
+
+container_line: int | None = None
+

Containing start line.

+
+ +
+
+end_column: int | None = None
+

Final column number.

+
+ +
+
+end_line: int | None = None
+

Final line number.

+
+ +
+
+end_pos: int | None = None
+

Final character position.

+
+ +
+
+line: int | None = None
+

Line number.

+
+ +
+
+start_pos: int | None = None
+

Starting character position.

+
+ +
+
+static from_lark(lark_meta: Meta) Meta[source]
+

Generate a Meta instance from the lark Metadata.

+
+ +
+
+get_comments_and_pragmas() Tuple[List[Token], List[Token]][source]
+

Split the contained comments into comments/pragmas.

+
+
Returns:
+
+
commentsList[lark.Token]
+
pragmasList[lark.Token]
+
+
+
+
+ +
+
+property attribute_pragmas: List[str]
+

Get {attribute …} pragmas associated with this code block.

+
+ +
+
+__init__(empty: bool = True, column: int | None = None, comments: ~typing.List[~lark.lexer.Token] = <factory>, container_column: int | None = None, container_end_column: int | None = None, container_end_line: int | None = None, container_line: int | None = None, end_column: int | None = None, end_line: int | None = None, end_pos: int | None = None, line: int | None = None, start_pos: int | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Method.html b/master/api/blark.transform.Method.html new file mode 100644 index 0000000..67b0563 --- /dev/null +++ b/master/api/blark.transform.Method.html @@ -0,0 +1,403 @@ + + + + + + + blark.transform.Method — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Method

+
+
+class blark.transform.Method(access: AccessSpecifier | None, name: Token, return_type: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | None, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None)[source]
+

Bases: object

+

A full, named method declaration.

+

Methods belong to function blocks. Methods may contain variable blocks +and a return type, and may also contain an implementation.

+

Examples:

+
METHOD PRIVATE MethodName : ARRAY [1..2] OF INT
+END_METHOD
+
+METHOD MethodName : INT
+    MethodName := 1;
+END_METHOD
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

function_block_method_declaration

+
function_block_method_declaration: "METHOD"i [ access_specifier ] DOTTED_IDENTIFIER [ ":" method_return_type ] ";"* method_var_declaration* [ function_block_body ] "END_METHOD"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(access, name, return_type, ...[, meta])

from_lark(access, name, return_type, *args)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

meta

access

name

return_type

declarations

body

+
+
+access: AccessSpecifier | None
+
+ +
+
+name: Token
+
+ +
+
+return_type: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | None
+
+ +
+
+declarations: List[VariableDeclarationBlock]
+
+ +
+
+body: StatementList | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(access: AccessSpecifier | None, name: Token, return_type: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | None, *args) Method[source]
+
+ +
+
+__init__(access: AccessSpecifier | None, name: Token, return_type: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | None, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.MethodInstanceVariableDeclarations.html b/master/api/blark.transform.MethodInstanceVariableDeclarations.html new file mode 100644 index 0000000..30c6bf9 --- /dev/null +++ b/master/api/blark.transform.MethodInstanceVariableDeclarations.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.MethodInstanceVariableDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.MethodInstanceVariableDeclarations

+
+
+class blark.transform.MethodInstanceVariableDeclarations(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

Declarations block for instance variables in methods (VAR_INST).

+

May be annotated with attributes (see VariableAttributes).

+

Lark grammar

+

This class is used by the following grammar rules:

+

var_inst_declaration

+
var_inst_declaration: "VAR_INST"i [ variable_attributes ] var_body "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, items)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR_INST'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, items: Tree) MethodInstanceVariableDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.MultiElementVariable.html b/master/api/blark.transform.MultiElementVariable.html new file mode 100644 index 0000000..9c857fc --- /dev/null +++ b/master/api/blark.transform.MultiElementVariable.html @@ -0,0 +1,387 @@ + + + + + + + blark.transform.MultiElementVariable — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.MultiElementVariable

+
+
+class blark.transform.MultiElementVariable(name: SimpleVariable, dereferenced: bool, elements: List[SubscriptList | FieldSelector], meta: Meta | None = None)[source]
+

Bases: Variable

+

A multi-element variable - with one or more subscripts and fields.

+

Examples:

+
a.b.c
+a^.b[1].c
+a.b[SomeConstant].c^
+
+
+

Where a is the “name”

+

Lark grammar

+

This class is used by the following grammar rules:

+

multi_element_variable

+
multi_element_variable: variable_name ( subscript_list | field_selector )+
+
+
+

Methods

+ + + + + + + + + +

__init__(name, dereferenced, elements[, meta])

from_lark(variable_name, *subscript_or_field)

+

Attributes

+ + + + + + + + + + + + + + + +

meta

name

The first part of the variable name.

dereferenced

This is unused (TODO / perhaps for compat elsewhere?) Dereference status is held on a per-element basis.

elements

The subscripts/fields that make up the multi-element variable.

+
+
+name: SimpleVariable
+

The first part of the variable name.

+
+ +
+
+dereferenced: bool
+

This is unused (TODO / perhaps for compat elsewhere?) +Dereference status is held on a per-element basis.

+
+ +
+
+elements: List[SubscriptList | FieldSelector]
+

The subscripts/fields that make up the multi-element variable.

+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(variable_name: SimpleVariable, *subscript_or_field: SubscriptList | FieldSelector) MultiElementVariable[source]
+
+ +
+
+__init__(name: SimpleVariable, dereferenced: bool, elements: List[SubscriptList | FieldSelector], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.NoOpStatement.html b/master/api/blark.transform.NoOpStatement.html new file mode 100644 index 0000000..95983d5 --- /dev/null +++ b/master/api/blark.transform.NoOpStatement.html @@ -0,0 +1,368 @@ + + + + + + + blark.transform.NoOpStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.NoOpStatement

+
+
+class blark.transform.NoOpStatement(variable: Variable, meta: Meta | None = None)[source]
+

Bases: Statement

+

A no-operation statement referring to a variable and nothing else.

+

Distinguished from an action depending on if the context-sensitive +name matches an action or a variable name.

+

Note that blark does not handle this for you and may arbitrarily choose +one or the other.

+

Examples:

+
variable;
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

no_op_statement

+
no_op_statement: _variable ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(variable[, meta])

from_lark()

+

Attributes

+ + + + + + + + + +

meta

variable

+
+
+variable: Variable
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variable: Variable, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ObjectInitializerArray.html b/master/api/blark.transform.ObjectInitializerArray.html new file mode 100644 index 0000000..4febbd7 --- /dev/null +++ b/master/api/blark.transform.ObjectInitializerArray.html @@ -0,0 +1,372 @@ + + + + + + + blark.transform.ObjectInitializerArray — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ObjectInitializerArray

+
+
+class blark.transform.ObjectInitializerArray(name: Token, initializers: List[StructureInitialization], meta: Meta | None = None)[source]
+

Bases: object

+

Object initialization in array form.

+

Examples:

+
FB_Runner[(name := 'one'), (name := 'two')]
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

object_initializer_array

+
object_initializer_array: function_block_type_name "[" structure_initialization ( "," structure_initialization )* "]"
+
+
+

Methods

+ + + + + + + + + +

__init__(name, initializers[, meta])

from_lark(function_block_type_name, ...)

+

Attributes

+ + + + + + + + + + + + +

meta

name

initializers

+
+
+name: Token
+
+ +
+
+initializers: List[StructureInitialization]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(function_block_type_name: Token, *initializers: StructureInitialization) ObjectInitializerArray[source]
+
+ +
+
+__init__(name: Token, initializers: List[StructureInitialization], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.OctalBitString.html b/master/api/blark.transform.OctalBitString.html new file mode 100644 index 0000000..b5d1e6d --- /dev/null +++ b/master/api/blark.transform.OctalBitString.html @@ -0,0 +1,360 @@ + + + + + + + blark.transform.OctalBitString — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.OctalBitString

+
+
+class blark.transform.OctalBitString(type_name: Token | None, value: Token, meta: Meta | None = None)[source]
+

Bases: BitString

+

Octal bit string literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

octal_bit_string_literal

+
| [ BIT_STRING_TYPE_NAME "#" ] "8#" OCTAL_STRING  -> octal_bit_string_literal
+
+
+

Methods

+ + + + + + +

__init__(type_name, value[, meta])

+

Attributes

+ + + + + + + + + + + + + + + +

base

The numeric base of the value (e.g., 10 is decimal)

meta

Lark metadata.

type_name

The optional type name of the string.

value

The string literal.

+
+
+base: ClassVar[int] = 8
+

The numeric base of the value (e.g., 10 is decimal)

+
+ +
+
+meta: Meta | None = None
+

Lark metadata.

+
+ +
+
+__init__(type_name: Token | None, value: Token, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.OctalInteger.html b/master/api/blark.transform.OctalInteger.html new file mode 100644 index 0000000..7d85bcc --- /dev/null +++ b/master/api/blark.transform.OctalInteger.html @@ -0,0 +1,352 @@ + + + + + + + blark.transform.OctalInteger — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.OctalInteger

+
+
+class blark.transform.OctalInteger(value: 'lark.Token', type_name: 'Optional[lark.Token]' = None, meta: 'Optional[Meta]' = None)[source]
+

Bases: Integer

+

Lark grammar

+

This class is used by the following grammar rules:

+

octal_integer

+
| "8#" OCTAL_STRING           -> octal_integer
+
+
+

Methods

+ + + + + + +

__init__(value[, type_name, meta])

+

Attributes

+ + + + + + + + + + + + + + + +

base

meta

type_name

value

+
+
+base: ClassVar[int] = 8
+
+ +
+
+__init__(value: Token, type_name: Token | None = None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.OutputDeclarations.html b/master/api/blark.transform.OutputDeclarations.html new file mode 100644 index 0000000..8e963d6 --- /dev/null +++ b/master/api/blark.transform.OutputDeclarations.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.OutputDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.OutputDeclarations

+
+
+class blark.transform.OutputDeclarations(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

A block of named, output variable declarations (VAR_OUTPUT).

+

May be annotated with attributes (see VariableAttributes).

+

Lark grammar

+

This class is used by the following grammar rules:

+

output_declarations

+
output_declarations: "VAR_OUTPUT"i [ variable_attributes ] var_body "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, items)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR_OUTPUT'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, items: Tree) OutputDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.OutputParameterAssignment.html b/master/api/blark.transform.OutputParameterAssignment.html new file mode 100644 index 0000000..065943c --- /dev/null +++ b/master/api/blark.transform.OutputParameterAssignment.html @@ -0,0 +1,383 @@ + + + + + + + blark.transform.OutputParameterAssignment — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.OutputParameterAssignment

+
+
+class blark.transform.OutputParameterAssignment(name: SimpleVariable, value: Expression | None, inverted: bool = False, meta: Meta | None = None)[source]
+

Bases: ParameterAssignment

+

A named output parameter, which may be inverted.

+

Examples:

+
name => output
+NOT name => output2
+name =>
+NOT name =>
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

output_parameter_assignment

+
param_assignment: [ LOGICAL_NOT ] variable_name "=>" [ expression ] -> output_parameter_assignment
+
+
+

Methods

+ + + + + + + + + +

__init__(name, value[, inverted, meta])

from_lark(inverted, name, value)

+

Attributes

+ + + + + + + + + + + + + + + +

inverted

meta

name

value

+
+
+name: SimpleVariable
+
+ +
+
+value: Expression | None
+
+ +
+
+inverted: bool = False
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(inverted: Token | None, name: SimpleVariable, value: Expression) OutputParameterAssignment[source]
+
+ +
+
+__init__(name: SimpleVariable, value: Expression | None, inverted: bool = False, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ParameterAssignment.html b/master/api/blark.transform.ParameterAssignment.html new file mode 100644 index 0000000..e37f8ef --- /dev/null +++ b/master/api/blark.transform.ParameterAssignment.html @@ -0,0 +1,320 @@ + + + + + + + blark.transform.ParameterAssignment — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ParameterAssignment

+
+
+class blark.transform.ParameterAssignment[source]
+

Bases: object

+

Base class for assigned parameters in function calls.

+

May be either input parameters (positional or named name :=) or output +parameters (named as in name =>, NOT name =>). Marked as a “tagged +union” so that serialization will uniquely identify the Python class.

+

Methods

+ + + +
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ParenthesizedExpression.html b/master/api/blark.transform.ParenthesizedExpression.html new file mode 100644 index 0000000..0bb715b --- /dev/null +++ b/master/api/blark.transform.ParenthesizedExpression.html @@ -0,0 +1,365 @@ + + + + + + + blark.transform.ParenthesizedExpression — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ParenthesizedExpression

+
+
+class blark.transform.ParenthesizedExpression(expr: Expression, meta: Meta | None = None)[source]
+

Bases: Expression

+

An expression with parentheses around it.

+

Examples:

+
(a * b)
+(1 + b)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

parenthesized_expression

+
parenthesized_expression: "(" expression ")"
+
+
+

Methods

+ + + + + + + + + +

__init__(expr[, meta])

from_lark()

+

Attributes

+ + + + + + + + + +

meta

expr

+
+
+expr: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(expr: Expression, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.PartialSubrange.html b/master/api/blark.transform.PartialSubrange.html new file mode 100644 index 0000000..be55532 --- /dev/null +++ b/master/api/blark.transform.PartialSubrange.html @@ -0,0 +1,374 @@ + + + + + + + blark.transform.PartialSubrange — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.PartialSubrange

+
+
+class blark.transform.PartialSubrange(start: Expression, stop: Expression, meta: Meta | None = None)[source]
+

Bases: Subrange

+

A partial subrange, including a start/stop element index.

+

Examples:

+
1..2
+iStart..iEnd
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

subrange

+
subrange: expression ".." expression
+        | "*"                        -> full_subrange
+
+
+

Methods

+ + + + + + + + + +

__init__(start, stop[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

start

stop

+
+
+start: Expression
+
+ +
+
+stop: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(start: Expression, stop: Expression, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Program.html b/master/api/blark.transform.Program.html new file mode 100644 index 0000000..56659a2 --- /dev/null +++ b/master/api/blark.transform.Program.html @@ -0,0 +1,389 @@ + + + + + + + blark.transform.Program — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Program

+
+
+class blark.transform.Program(name: Token, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None)[source]
+

Bases: object

+

A full program declaration, with nested variable declaration blocks.

+

An implementation is optional, but END_PROGRAM is required.

+

Examples:

+
PROGRAM ProgramName
+    VAR_INPUT
+        iValue : INT;
+    END_VAR
+    VAR_ACCESS
+        AccessName : SymbolicVariable : TypeName READ_WRITE;
+    END_VAR
+    iValue := iValue + 1;
+END_PROGRAM
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

program_declaration

+
program_declaration: "PROGRAM"i program_type_name program_var_declarations [ function_block_body ] "END_PROGRAM"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(name, declarations, body[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

name

declarations

body

+
+
+name: Token
+
+ +
+
+declarations: List[VariableDeclarationBlock]
+
+ +
+
+body: StatementList | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: Token, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Property.html b/master/api/blark.transform.Property.html new file mode 100644 index 0000000..4503af7 --- /dev/null +++ b/master/api/blark.transform.Property.html @@ -0,0 +1,410 @@ + + + + + + + blark.transform.Property — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Property

+
+
+class blark.transform.Property(access: AccessSpecifier | None, name: Token, return_type: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | None, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None)[source]
+

Bases: object

+

A named property declaration, which may pertain to a get or set.

+

Properties belong to function blocks. Properties may contain variable +blocks and a return type, and may also contain an implementation.

+

Examples:

+
PROPERTY PropertyName : RETURNTYPE
+    VAR_INPUT
+        bExecute : BOOL;
+    END_VAR
+    VAR_OUTPUT
+        iResult : INT;
+    END_VAR
+    iResult := 5;
+    PropertyName := iResult + 1;
+END_PROPERTY
+
+PROPERTY PRIVATE PropertyName : ARRAY [1..2] OF INT
+END_PROPERTY
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

function_block_property_declaration

+
function_block_property_declaration: "PROPERTY"i [ access_specifier ] DOTTED_IDENTIFIER [ ":" property_return_type ] ";"* property_var_declaration* [ function_block_body ] "END_PROPERTY"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(access, name, return_type, ...[, meta])

from_lark(access, name, return_type, *args)

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

meta

access

name

return_type

declarations

body

+
+
+access: AccessSpecifier | None
+
+ +
+
+name: Token
+
+ +
+
+return_type: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | None
+
+ +
+
+declarations: List[VariableDeclarationBlock]
+
+ +
+
+body: StatementList | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(access: AccessSpecifier | None, name: Token, return_type: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | None, *args) Property[source]
+
+ +
+
+__init__(access: AccessSpecifier | None, name: Token, return_type: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | ArrayTypeInitialization | InitializedStructure | StringTypeInitialization | None, declarations: List[VariableDeclarationBlock], body: StatementList | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Real.html b/master/api/blark.transform.Real.html new file mode 100644 index 0000000..a229133 --- /dev/null +++ b/master/api/blark.transform.Real.html @@ -0,0 +1,369 @@ + + + + + + + blark.transform.Real — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Real

+
+
+class blark.transform.Real(value: Token, type_name: Token | None = None, meta: Meta | None = None)[source]
+

Bases: Literal

+

Floating point (real) literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

real_literal

+
real_literal: [ REAL_TYPE_NAME "#" ] /((\+|\-)?[0-9](_?[0-9])*)\.([0-9](_?[0-9])*)((e|E)(\+|\-)?([0-9](_?[0-9])*))?/
+            | [ REAL_TYPE_NAME "#" ] /((\+|\-)?[0-9](_?[0-9])*)((e|E)(\+|\-)?([0-9](_?[0-9])*))/
+
+
+

Methods

+ + + + + + + + + +

__init__(value[, type_name, meta])

from_lark(type_name, value)

+

Attributes

+ + + + + + + + + + + + +

meta

type_name

value

+
+
+value: Token
+
+ +
+
+type_name: Token | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(type_name: Token | None, value: Token) Real[source]
+
+ +
+
+__init__(value: Token, type_name: Token | None = None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ReferenceAssignmentStatement.html b/master/api/blark.transform.ReferenceAssignmentStatement.html new file mode 100644 index 0000000..e63d909 --- /dev/null +++ b/master/api/blark.transform.ReferenceAssignmentStatement.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.ReferenceAssignmentStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ReferenceAssignmentStatement

+
+
+class blark.transform.ReferenceAssignmentStatement(variable: SimpleVariable | MultiElementVariable, op: Token, expression: Expression, meta: Meta | None = None)[source]
+

Bases: Statement

+

A reference assignment statement.

+

Examples:

+
refOne REF= refOtherOne;
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

reference_assignment_statement

+
reference_assignment_statement: _variable REF_ASSIGNMENT expression ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(variable, op, expression[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

variable

op

expression

+
+
+variable: SimpleVariable | MultiElementVariable
+
+ +
+
+op: Token
+
+ +
+
+expression: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variable: SimpleVariable | MultiElementVariable, op: Token, expression: Expression, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.RepeatStatement.html b/master/api/blark.transform.RepeatStatement.html new file mode 100644 index 0000000..1209323 --- /dev/null +++ b/master/api/blark.transform.RepeatStatement.html @@ -0,0 +1,368 @@ + + + + + + + blark.transform.RepeatStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.RepeatStatement

+
+
+class blark.transform.RepeatStatement(statements: StatementList, expression: Expression, meta: Meta | None = None)[source]
+

Bases: Statement

+

An ending conditional loop statement, REPEAT.

+

Lark grammar

+

This class is used by the following grammar rules:

+

repeat_statement

+
repeat_statement: "REPEAT"i statement_list "UNTIL"i expression "END_REPEAT"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(statements, expression[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

statements

expression

+
+
+statements: StatementList
+
+ +
+
+expression: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(statements: StatementList, expression: Expression, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ResetStatement.html b/master/api/blark.transform.ResetStatement.html new file mode 100644 index 0000000..3291d20 --- /dev/null +++ b/master/api/blark.transform.ResetStatement.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.ResetStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ResetStatement

+
+
+class blark.transform.ResetStatement(variable: SimpleVariable | MultiElementVariable, op: Token, expression: Expression, meta: Meta | None = None)[source]
+

Bases: Statement

+

A “reset” statement which conditionally clears a variable to FALSE.

+

Examples:

+
bValue R= iValue <= 5;
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

reset_statement

+
reset_statement: _variable RESET_ASSIGNMENT expression ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(variable, op, expression[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

variable

op

expression

+
+
+variable: SimpleVariable | MultiElementVariable
+
+ +
+
+op: Token
+
+ +
+
+expression: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variable: SimpleVariable | MultiElementVariable, op: Token, expression: Expression, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.ReturnStatement.html b/master/api/blark.transform.ReturnStatement.html new file mode 100644 index 0000000..a521db0 --- /dev/null +++ b/master/api/blark.transform.ReturnStatement.html @@ -0,0 +1,353 @@ + + + + + + + blark.transform.ReturnStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.ReturnStatement

+
+
+class blark.transform.ReturnStatement(meta: Meta | None = None)[source]
+

Bases: Statement

+

A statement used to return from a function [block], RETURN.

+

No value is allowed to be returned with this statement.

+

Lark grammar

+

This class is used by the following grammar rules:

+

return_statement

+
return_statement.1: "RETURN"i ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__([meta])

from_lark()

+

Attributes

+ + + + + + +

meta

+
+
+meta: Meta | None = None
+
+ +
+
+__init__(meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.SetStatement.html b/master/api/blark.transform.SetStatement.html new file mode 100644 index 0000000..39a9cee --- /dev/null +++ b/master/api/blark.transform.SetStatement.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.SetStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.SetStatement

+
+
+class blark.transform.SetStatement(variable: SimpleVariable | MultiElementVariable, op: Token, expression: Expression, meta: Meta | None = None)[source]
+

Bases: Statement

+

A “set” statement which conditionally sets a variable to TRUE.

+

Examples:

+
bValue S= iValue > 5;
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

set_statement

+
set_statement: _variable SET_ASSIGNMENT expression ";"+
+
+
+

Methods

+ + + + + + + + + +

__init__(variable, op, expression[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

variable

op

expression

+
+
+variable: SimpleVariable | MultiElementVariable
+
+ +
+
+op: Token
+
+ +
+
+expression: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variable: SimpleVariable | MultiElementVariable, op: Token, expression: Expression, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.SimpleSpecification.html b/master/api/blark.transform.SimpleSpecification.html new file mode 100644 index 0000000..86f7440 --- /dev/null +++ b/master/api/blark.transform.SimpleSpecification.html @@ -0,0 +1,373 @@ + + + + + + + blark.transform.SimpleSpecification — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.SimpleSpecification

+
+
+class blark.transform.SimpleSpecification(type: Token | StringTypeSpecification, meta: Meta | None = None)[source]
+

Bases: TypeSpecificationBase

+

A simple specification with just a type name (or a string type name).

+

An elementary type name, a simple type name, or a general dotted +identifier are valid for this.

+

Lark grammar

+

This class is used by the following grammar rules:

+

simple_specification

+
simple_specification: elementary_type_name
+                    | simple_type_name
+                    | DOTTED_IDENTIFIER
+
+
+

Methods

+ + + + + + + + + +

__init__(type[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

base_type_name

The full type name.

full_type_name

The full type name.

meta

type_info

The base type name.

type

+
+
+type: Token | StringTypeSpecification
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(type: Token | StringTypeSpecification, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.SimpleTypeDeclaration.html b/master/api/blark.transform.SimpleTypeDeclaration.html new file mode 100644 index 0000000..ee91a31 --- /dev/null +++ b/master/api/blark.transform.SimpleTypeDeclaration.html @@ -0,0 +1,387 @@ + + + + + + + blark.transform.SimpleTypeDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.SimpleTypeDeclaration

+
+
+class blark.transform.SimpleTypeDeclaration(name: Token, extends: Extends | None, init: TypeInitialization, meta: Meta | None = None)[source]
+

Bases: object

+

A declaration of a simple type.

+

Examples:

+
TypeName : INT
+TypeName : INT := 5
+TypeName : INT := 5 + 1 * (2)
+TypeName : REFERENCE TO INT
+TypeName : POINTER TO INT
+TypeName : POINTER TO POINTER TO INT
+TypeName : REFERENCE TO POINTER TO INT
+TypeName EXTENDS a.b : POINTER TO INT
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

simple_type_declaration

+
simple_type_declaration: simple_type_name [ extends ] ":" simple_spec_init
+
+
+

Methods

+ + + + + + + + + +

__init__(name, extends, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

name

extends

init

+
+
+name: Token
+
+ +
+
+extends: Extends | None
+
+ +
+
+init: TypeInitialization
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: Token, extends: Extends | None, init: TypeInitialization, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.SimpleVariable.html b/master/api/blark.transform.SimpleVariable.html new file mode 100644 index 0000000..c2f938d --- /dev/null +++ b/master/api/blark.transform.SimpleVariable.html @@ -0,0 +1,374 @@ + + + + + + + blark.transform.SimpleVariable — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.SimpleVariable

+
+
+class blark.transform.SimpleVariable(name: Token, dereferenced: bool, meta: Meta | None = None)[source]
+

Bases: Variable

+

A simple, single-element variable.

+

Specified by name, may potentially be dereferenced pointers. +Examples:

+
var
+var^
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

variable_name

+
variable_name: IDENTIFIER [ DEREFERENCED ]
+
+
+

Methods

+ + + + + + + + + +

__init__(name, dereferenced[, meta])

from_lark(identifier, dereferenced)

+

Attributes

+ + + + + + + + + + + + +

meta

name

dereferenced

+
+
+name: Token
+
+ +
+
+dereferenced: bool
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(identifier: Token, dereferenced: Token | None) SimpleVariable[source]
+
+ +
+
+__init__(name: Token, dereferenced: bool, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.SourceCode.html b/master/api/blark.transform.SourceCode.html new file mode 100644 index 0000000..541137a --- /dev/null +++ b/master/api/blark.transform.SourceCode.html @@ -0,0 +1,403 @@ + + + + + + + blark.transform.SourceCode — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.SourceCode

+
+
+class blark.transform.SourceCode(items: List[DataTypeDeclaration | Function | FunctionBlock | Action | Method | Program | Property | GlobalVariableDeclarations], filename: Path | None = None, raw_source: str | None = None, line_map: Dict[int, int] | None = None, meta: Meta | None = None)[source]
+

Bases: object

+

Top-level source code item.

+

May contain zero or more of the following as items:

+ +

Lark grammar

+

This class is used by the following grammar rules:

+

iec_source

+
iec_source: _library_element_declaration*
+
+
+

Methods

+ + + + + + + + + + + + +

__init__(items[, filename, raw_source, ...])

from_lark(*args)

range_from_file_lines(start, end)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

filename

line_map

meta

raw_source

items

+
+
+items: List[DataTypeDeclaration | Function | FunctionBlock | Action | Method | Program | Property | GlobalVariableDeclarations]
+
+ +
+
+filename: Path | None = None
+
+ +
+
+raw_source: str | None = None
+
+ +
+
+line_map: Dict[int, int] | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*args: DataTypeDeclaration | Function | FunctionBlock | Action | Method | Program | Property | GlobalVariableDeclarations) SourceCode[source]
+
+ +
+
+range_from_file_lines(start: int, end: int) list[str][source]
+
+ +
+
+__init__(items: List[DataTypeDeclaration | Function | FunctionBlock | Action | Method | Program | Property | GlobalVariableDeclarations], filename: Path | None = None, raw_source: str | None = None, line_map: Dict[int, int] | None = None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Statement.html b/master/api/blark.transform.Statement.html new file mode 100644 index 0000000..51112a3 --- /dev/null +++ b/master/api/blark.transform.Statement.html @@ -0,0 +1,319 @@ + + + + + + + blark.transform.Statement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Statement

+
+
+class blark.transform.Statement[source]
+

Bases: object

+

Base class for all statements in a structured text implementation section.

+

Marked as a “tagged union” so that serialization will uniquely identify the +Python class.

+

Methods

+ + + +
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StatementList.html b/master/api/blark.transform.StatementList.html new file mode 100644 index 0000000..9e629cc --- /dev/null +++ b/master/api/blark.transform.StatementList.html @@ -0,0 +1,364 @@ + + + + + + + blark.transform.StatementList — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StatementList

+
+
+class blark.transform.StatementList(statements: List[Statement], meta: Meta | None = None)[source]
+

Bases: object

+

A list of statements, making up a structured text implementation.

+

Lark grammar

+

This class is used by the following grammar rules:

+

statement_list

+
statement_list: _statement+ end_of_statement_list_label?
+
+
+

case_element_statement_list

+
case_element_statement_list: _case_element_statement+
+
+
+

Methods

+ + + + + + + + + +

__init__(statements[, meta])

from_lark(*statements)

+

Attributes

+ + + + + + + + + +

meta

statements

+
+
+statements: List[Statement]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*statements: Statement) StatementList[source]
+
+ +
+
+__init__(statements: List[Statement], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StaticDeclarations.html b/master/api/blark.transform.StaticDeclarations.html new file mode 100644 index 0000000..f0a8926 --- /dev/null +++ b/master/api/blark.transform.StaticDeclarations.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.StaticDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StaticDeclarations

+
+
+class blark.transform.StaticDeclarations(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

Static variable declarations block (VAR_STAT).

+

May be annotated with attributes (see VariableAttributes).

+

Lark grammar

+

This class is used by the following grammar rules:

+

static_var_declarations

+
static_var_declarations: "VAR_STAT"i [ variable_attributes ] var_body "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, tree)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR_STAT'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, tree: Tree) StaticDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.String.html b/master/api/blark.transform.String.html new file mode 100644 index 0000000..974517f --- /dev/null +++ b/master/api/blark.transform.String.html @@ -0,0 +1,361 @@ + + + + + + + blark.transform.String — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.String

+
+
+class blark.transform.String(value: Token, meta: Meta | None = None)[source]
+

Bases: Literal

+

String literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

string_literal

+
string_literal: SINGLE_BYTE_CHARACTER_STRING
+              | DOUBLE_BYTE_CHARACTER_STRING
+
+
+

Methods

+ + + + + + + + + +

__init__(value[, meta])

from_lark()

+

Attributes

+ + + + + + + + + +

meta

value

+
+
+value: Token
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(value: Token, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StringSpecLength.html b/master/api/blark.transform.StringSpecLength.html new file mode 100644 index 0000000..0bac473 --- /dev/null +++ b/master/api/blark.transform.StringSpecLength.html @@ -0,0 +1,361 @@ + + + + + + + blark.transform.StringSpecLength — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StringSpecLength

+
+
+class blark.transform.StringSpecLength(length: ParenthesizedExpression | BracketedExpression)[source]
+

Bases: object

+

The length of a defined string.

+

The grammar makes a distinction between brackets and parentheses, though +they appear to be functionally equivalent.

+

Examples:

+
[1]
+(1)
+[255]
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

string_spec_length

+
string_spec_length: parenthesized_expression
+                  | bracketed_expression
+
+
+

Methods

+ + + + + + + + + +

__init__(length)

from_lark()

+

Attributes

+ + + + + + +

length

+
+
+length: ParenthesizedExpression | BracketedExpression
+
+ +
+
+__init__(length: ParenthesizedExpression | BracketedExpression) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StringTypeDeclaration.html b/master/api/blark.transform.StringTypeDeclaration.html new file mode 100644 index 0000000..281b4d3 --- /dev/null +++ b/master/api/blark.transform.StringTypeDeclaration.html @@ -0,0 +1,392 @@ + + + + + + + blark.transform.StringTypeDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StringTypeDeclaration

+
+
+class blark.transform.StringTypeDeclaration(name: Token, string_type: StringTypeSpecification, value: String | None, meta: Meta | None = None)[source]
+

Bases: object

+

A string type declaration.

+
+
Examples::

TypeName : STRING +TypeName : STRING := ‘literal’ +TypeName : STRING[5] +TypeName : STRING[100] := ‘literal’ +TypeName : WSTRING[100] := “literal”

+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

string_type_declaration

+
string_type_declaration: string_type_name ":" string_type_specification [ ":=" string_literal ]
+
+
+

Methods

+ + + + + + + + + +

__init__(name, string_type, value[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

meta

type_name

name

string_type

value

+
+
+name: Token
+
+ +
+
+string_type: StringTypeSpecification
+
+ +
+
+value: String | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property type_name: Token
+
+ +
+
+__init__(name: Token, string_type: StringTypeSpecification, value: String | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StringTypeInitialization.html b/master/api/blark.transform.StringTypeInitialization.html new file mode 100644 index 0000000..fd69c5b --- /dev/null +++ b/master/api/blark.transform.StringTypeInitialization.html @@ -0,0 +1,388 @@ + + + + + + + blark.transform.StringTypeInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StringTypeInitialization

+
+
+class blark.transform.StringTypeInitialization(spec: StringTypeSpecification, value: Token | None, meta: Meta | None = None)[source]
+

Bases: TypeInitializationBase

+

Single or double-byte string specification.

+

Examples:

+
STRING := 'test'
+STRING(2_500_000) := 'test'
+STRING(Param.iLower) := 'test'
+
+
+

Bracketed versions are also acceptable.

+

Lark grammar

+

This class is used by the following grammar rules:

+

single_byte_string_spec

+
single_byte_string_spec: STRING [ string_spec_length ] [ ":=" SINGLE_BYTE_CHARACTER_STRING ]
+
+
+

double_byte_string_spec

+
double_byte_string_spec: WSTRING [ string_spec_length ] [ ":=" DOUBLE_BYTE_CHARACTER_STRING ]
+
+
+

Methods

+ + + + + + + + + +

__init__(spec, value[, meta])

from_lark(string_type[, length, value])

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full, qualified type name.

meta

type_info

The base type name.

spec

value

+
+
+spec: StringTypeSpecification
+
+ +
+
+value: Token | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(string_type: Token, length: StringSpecLength | None = None, value: Token | None = None) StringTypeInitialization[source]
+
+ +
+
+__init__(spec: StringTypeSpecification, value: Token | None, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StringTypeSpecification.html b/master/api/blark.transform.StringTypeSpecification.html new file mode 100644 index 0000000..5e6a027 --- /dev/null +++ b/master/api/blark.transform.StringTypeSpecification.html @@ -0,0 +1,401 @@ + + + + + + + blark.transform.StringTypeSpecification — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StringTypeSpecification

+
+
+class blark.transform.StringTypeSpecification(type_name: Token, length: StringSpecLength | None = None, meta: Meta | None = None)[source]
+

Bases: TypeSpecificationBase

+

Specification of a string type.

+

Examples:

+
STRING(2_500_000)
+STRING(Param.iLower)
+STRING(Param.iLower * 2 + 10)
+STRING(Param.iLower / 2 + 10)
+
+
+

Bracketed versions are also acceptable:

+
STRING[2_500_000]
+STRING[Param.iLower]
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

string_type_specification

+
string_type_specification: (STRING | WSTRING) [ string_spec_length ]
+
+
+

Methods

+ + + + + + + + + +

__init__(type_name[, length, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full type name.

length

meta

type_info

The base type name.

type_name

+
+
+type_name: Token
+
+ +
+
+length: StringSpecLength | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property base_type_name: Token
+

The base type name.

+
+ +
+
+property full_type_name: str
+

The full type name.

+
+ +
+
+__init__(type_name: Token, length: StringSpecLength | None = None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StringVariableInitDeclaration.html b/master/api/blark.transform.StringVariableInitDeclaration.html new file mode 100644 index 0000000..4bae704 --- /dev/null +++ b/master/api/blark.transform.StringVariableInitDeclaration.html @@ -0,0 +1,395 @@ + + + + + + + blark.transform.StringVariableInitDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StringVariableInitDeclaration

+
+
+class blark.transform.StringVariableInitDeclaration(variables: List[DeclaredVariable], spec: StringTypeSpecification, value: Token | None, init: _GenericInit, meta: Meta | None = None)[source]
+

Bases: InitDeclaration

+

A declaration of one or more variables using single/double byte strings, +with an optinoal initialization value.

+

Examples:

+
sVar1 : STRING(2_500_000) := 'test1'
+sVar2, sVar3 : STRING(Param.iLower) := 'test2'
+sVar4, sVar5 : WSTRING(Param.iLower) := "test3"
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

single_byte_string_var_declaration

+
single_byte_string_var_declaration: var1_list ":" single_byte_string_spec
+
+
+

double_byte_string_var_declaration

+
double_byte_string_var_declaration: var1_list ":" double_byte_string_spec
+
+
+

Methods

+ + + + + + + + + +

__init__(variables, spec, value, init[, meta])

from_lark(variables, string_info)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

meta

variables

spec

value

init

+
+
+variables: List[DeclaredVariable]
+
+ +
+
+spec: StringTypeSpecification
+
+ +
+
+value: Token | None
+
+ +
+
+init: _GenericInit
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(variables: List[DeclaredVariable], string_info: StringTypeInitialization)[source]
+
+ +
+
+__init__(variables: List[DeclaredVariable], spec: StringTypeSpecification, value: Token | None, init: _GenericInit, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StructureElementDeclaration.html b/master/api/blark.transform.StructureElementDeclaration.html new file mode 100644 index 0000000..d61f4b3 --- /dev/null +++ b/master/api/blark.transform.StructureElementDeclaration.html @@ -0,0 +1,424 @@ + + + + + + + blark.transform.StructureElementDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StructureElementDeclaration

+
+
+class blark.transform.StructureElementDeclaration(name: Token, location: IncompleteLocation | None, init: StructureInitialization | ArrayTypeInitialization | StringTypeInitialization | TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | InitializedStructure | FunctionCall, meta: Meta | None = None)[source]
+

Bases: object

+

Declaration of a single element of a structure.

+

Examples:

+
iValue : INT := 3 + 4;
+stTest : ST_Testing := (1, 2);
+eValue : E_Test := E_Test.ABC;
+arrValue : ARRAY [1..2] OF INT := [1, 2];
+arrValue1 : INT (1..2);
+arrValue1 : (Value1 := 1) INT;
+sValue : STRING := 'abc';
+iValue1 AT %I* : INT := 5;
+sValue1 : STRING[10] := 'test';
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

structure_element_declaration

+
structure_element_declaration: structure_element_name [ incomplete_location ] ":" ( initialized_structure | array_spec_init | simple_spec_init | subrange_spec_init | enumerated_spec_init | function_call )
+
+
+

Methods

+ + + + + + + + + +

__init__(name, location, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full type name.

meta

value

The initialization value, if applicable.

variables

API compat: list of variable names.

name

location

init

+
+
+name: Token
+
+ +
+
+location: IncompleteLocation | None
+
+ +
+
+init: StructureInitialization | ArrayTypeInitialization | StringTypeInitialization | TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | InitializedStructure | FunctionCall
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property variables: List[str]
+

API compat: list of variable names.

+
+ +
+
+property value: str
+

The initialization value, if applicable.

+
+ +
+
+property base_type_name: Token | str
+

The base type name.

+
+ +
+
+property full_type_name: Token
+

The full type name.

+
+ +
+
+__init__(name: Token, location: IncompleteLocation | None, init: StructureInitialization | ArrayTypeInitialization | StringTypeInitialization | TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | InitializedStructure | FunctionCall, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StructureElementInitialization.html b/master/api/blark.transform.StructureElementInitialization.html new file mode 100644 index 0000000..65de487 --- /dev/null +++ b/master/api/blark.transform.StructureElementInitialization.html @@ -0,0 +1,379 @@ + + + + + + + blark.transform.StructureElementInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StructureElementInitialization

+
+
+class blark.transform.StructureElementInitialization(name: Token | None, value: Duration | Lduration | TimeOfDay | Date | DateTime | Ldate | LdateTime | Real | Integer | String | BitString | Boolean | Expression | EnumeratedValue | ArrayInitialization | StructureInitialization, meta: Meta | None = None)[source]
+

Bases: object

+

An initialization (default) value for a structure element.

+

This may come in the form of:

+
name := value
+
+
+

or simply:

+
value
+
+
+

value may refer to an expression, an enumerated value, represent +a whole array, or represent a nested structure.

+

Lark grammar

+

This class is used by the following grammar rules:

+

structure_element_initialization

+
structure_element_initialization: constant
+                                | structure_element_name ":=" ( constant | expression | enumerated_value | array_initialization | structure_initialization )
+
+
+

Methods

+ + + + + + + + + +

__init__(name, value[, meta])

from_lark(*args)

+

Attributes

+ + + + + + + + + + + + +

meta

name

value

+
+
+name: Token | None
+
+ +
+
+value: Duration | Lduration | TimeOfDay | Date | DateTime | Ldate | LdateTime | Real | Integer | String | BitString | Boolean | Expression | EnumeratedValue | ArrayInitialization | StructureInitialization
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*args)[source]
+
+ +
+
+__init__(name: Token | None, value: Duration | Lduration | TimeOfDay | Date | DateTime | Ldate | LdateTime | Real | Integer | String | BitString | Boolean | Expression | EnumeratedValue | ArrayInitialization | StructureInitialization, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StructureInitialization.html b/master/api/blark.transform.StructureInitialization.html new file mode 100644 index 0000000..9f954c2 --- /dev/null +++ b/master/api/blark.transform.StructureInitialization.html @@ -0,0 +1,383 @@ + + + + + + + blark.transform.StructureInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StructureInitialization

+
+
+class blark.transform.StructureInitialization(elements: List[StructureElementInitialization], meta: Meta | None = None)[source]
+

Bases: object

+

A structure initialization (i.e., default values) of one or more elements.

+

Elements may be either positional or named. Used in the following:

+
    +
  1. Structure element initialization of default values:

    +
    stStruct : ST_TypeName := (iValue := 0, bValue := TRUE)
    +                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +
    +
  2. +
  3. Function block declarations (fb_name_decl, fb_invocation_decl):

    +
    fbSample : FB_Sample(nInitParam := 1) := (nInput := 2, nMyProperty := 3)
    +                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +fbSample : FB_Sample := (nInput := 2, nMyProperty := 3)
    +                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    +
    +
    +
  4. +
  5. Array object initializers (object_initializer_array):

    +
    runners : ARRAY[1..2] OF FB_Runner[(name := 'one'), (name := 'two')]
    +                                  [^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^]
    +
    +
    +
  6. +
+

Lark grammar

+

This class is used by the following grammar rules:

+

structure_initialization

+
structure_initialization: "(" structure_element_initialization ( "," structure_element_initialization )* ")"
+
+
+

Methods

+ + + + + + + + + +

__init__(elements[, meta])

from_lark(*elements)

+

Attributes

+ + + + + + + + + +

meta

elements

+
+
+elements: List[StructureElementInitialization]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*elements: StructureElementInitialization)[source]
+
+ +
+
+__init__(elements: List[StructureElementInitialization], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StructureTypeDeclaration.html b/master/api/blark.transform.StructureTypeDeclaration.html new file mode 100644 index 0000000..ab1e1aa --- /dev/null +++ b/master/api/blark.transform.StructureTypeDeclaration.html @@ -0,0 +1,409 @@ + + + + + + + blark.transform.StructureTypeDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StructureTypeDeclaration

+
+
+class blark.transform.StructureTypeDeclaration(name: Token, extends: Extends | None, indirection: IndirectionType | None, declarations: List[StructureElementDeclaration], meta: Meta | None = None)[source]
+

Bases: object

+

Full structure type declaration, as part of a TYPE.

+

Examples:

+
TypeName EXTENDS Other.Type :
+STRUCT
+    iValue : INT;
+END_STRUCT
+
+TypeName : POINTER TO
+STRUCT
+    iValue : INT;
+END_STRUCT
+
+TypeName : POINTER TO
+STRUCT
+    iValue : INT := 3 + 4;
+    stTest : ST_Testing := (1, 2);
+    eValue : E_Test := E_Test.ABC;
+    arrValue : ARRAY [1..2] OF INT := [1, 2];
+    arrValue1 : INT (1..2);
+    arrValue1 : (Value1 := 1) INT;
+    sValue : STRING := 'abc';
+    iValue1 AT %I* : INT := 5;
+    sValue1 : STRING[10] := 'test';
+END_STRUCT
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

structure_type_declaration

+
structure_type_declaration: structure_type_name_declaration [ extends ] ":" [ indirection_type ] "STRUCT"i ( structure_element_declaration ";"+ )* "END_STRUCT"i
+
+
+

Methods

+ + + + + + + + + +

__init__(name, extends, indirection, ...[, meta])

from_lark(name, extends, indirection, ...)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

meta

name

extends

indirection

declarations

+
+
+name: Token
+
+ +
+
+extends: Extends | None
+
+ +
+
+indirection: IndirectionType | None
+
+ +
+
+declarations: List[StructureElementDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(name: Token, extends: Extends | None, indirection: IndirectionType | None, *declarations: StructureElementDeclaration)[source]
+
+ +
+
+__init__(name: Token, extends: Extends | None, indirection: IndirectionType | None, declarations: List[StructureElementDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.StructuredVariableInitDeclaration.html b/master/api/blark.transform.StructuredVariableInitDeclaration.html new file mode 100644 index 0000000..5182765 --- /dev/null +++ b/master/api/blark.transform.StructuredVariableInitDeclaration.html @@ -0,0 +1,373 @@ + + + + + + + blark.transform.StructuredVariableInitDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.StructuredVariableInitDeclaration

+
+
+class blark.transform.StructuredVariableInitDeclaration(variables: List[DeclaredVariable], init: InitializedStructure, meta: Meta | None = None)[source]
+

Bases: InitDeclaration

+

A declaration of one or more variables using a named initialized structure.

+

Examples:

+
stVar1 : ST_TypeName := (iValue := 0, bValue := TRUE)
+stVar1, stVar2 : ST_TypeName := (iValue  = 0, bValue := TRUE)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

structured_var_init_decl

+
structured_var_init_decl: var1_list ":" initialized_structure
+
+
+

Methods

+ + + + + + + + + +

__init__(variables, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

variables

init

+
+
+variables: List[DeclaredVariable]
+
+ +
+
+init: InitializedStructure
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variables: List[DeclaredVariable], init: InitializedStructure, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Subrange.html b/master/api/blark.transform.Subrange.html new file mode 100644 index 0000000..d2d68aa --- /dev/null +++ b/master/api/blark.transform.Subrange.html @@ -0,0 +1,327 @@ + + + + + + + blark.transform.Subrange — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Subrange

+
+
+class blark.transform.Subrange[source]
+

Bases: object

+

Subrange base class.

+

May be a full or partial sub-range. Marked as a “tagged union” so that +serialization will uniquely identify the Python class.

+

Methods

+ + + + + + +

__init__()

+
+
+__init__() None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.SubrangeSpecification.html b/master/api/blark.transform.SubrangeSpecification.html new file mode 100644 index 0000000..f558fac --- /dev/null +++ b/master/api/blark.transform.SubrangeSpecification.html @@ -0,0 +1,396 @@ + + + + + + + blark.transform.SubrangeSpecification — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.SubrangeSpecification

+
+
+class blark.transform.SubrangeSpecification(type_name: Token, subrange: Subrange | None = None, meta: Meta | None = None)[source]
+

Bases: TypeSpecificationBase

+

A subrange specification.

+

Examples:

+
INT (*)
+INT (1..2)
+TYPE_NAME         (TODO; overlap)
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

subrange_specification

+
subrange_specification: INTEGER_TYPE_NAME "(" subrange ")"
+                      | subrange_type_name
+
+
+

Methods

+ + + + + + + + + +

__init__(type_name[, subrange, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full type name.

meta

subrange

type_info

The base type name.

type_name

+
+
+type_name: Token
+
+ +
+
+subrange: Subrange | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property base_type_name: Token
+

The base type name.

+
+ +
+
+property full_type_name: str
+

The full type name.

+
+ +
+
+__init__(type_name: Token, subrange: Subrange | None = None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.SubrangeTypeDeclaration.html b/master/api/blark.transform.SubrangeTypeDeclaration.html new file mode 100644 index 0000000..6a782c3 --- /dev/null +++ b/master/api/blark.transform.SubrangeTypeDeclaration.html @@ -0,0 +1,373 @@ + + + + + + + blark.transform.SubrangeTypeDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.SubrangeTypeDeclaration

+
+
+class blark.transform.SubrangeTypeDeclaration(name: Token, init: SubrangeTypeInitialization, meta: Meta | None = None)[source]
+

Bases: object

+

A subrange type declaration.

+

Examples:

+
TypeName : INT (1..2)
+TypeName : INT (*) := 1
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

subrange_type_declaration

+
subrange_type_declaration: subrange_type_name ":" subrange_spec_init
+
+
+

Methods

+ + + + + + + + + +

__init__(name, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

name

init

+
+
+name: Token
+
+ +
+
+init: SubrangeTypeInitialization
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(name: Token, init: SubrangeTypeInitialization, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.SubrangeTypeInitialization.html b/master/api/blark.transform.SubrangeTypeInitialization.html new file mode 100644 index 0000000..5e455a7 --- /dev/null +++ b/master/api/blark.transform.SubrangeTypeInitialization.html @@ -0,0 +1,389 @@ + + + + + + + blark.transform.SubrangeTypeInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.SubrangeTypeInitialization

+
+
+class blark.transform.SubrangeTypeInitialization(indirection: IndirectionType | None, spec: SubrangeSpecification, value: Expression | None = None, meta: Meta | None = None)[source]
+

Bases: TypeInitializationBase

+

A subrange type initialization.

+

Examples:

+
INT (1..2) := 25
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

subrange_spec_init

+
subrange_spec_init: [ indirection_type ] subrange_specification [ ":=" expression ]
+
+
+

Methods

+ + + + + + + + + +

__init__(indirection, spec[, value, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full, qualified type name.

meta

type_info

The base type name.

value

indirection

spec

+
+
+indirection: IndirectionType | None
+
+ +
+
+spec: SubrangeSpecification
+
+ +
+
+value: Expression | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(indirection: IndirectionType | None, spec: SubrangeSpecification, value: Expression | None = None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.SubscriptList.html b/master/api/blark.transform.SubscriptList.html new file mode 100644 index 0000000..0ad009c --- /dev/null +++ b/master/api/blark.transform.SubscriptList.html @@ -0,0 +1,374 @@ + + + + + + + blark.transform.SubscriptList — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.SubscriptList

+
+
+class blark.transform.SubscriptList(subscripts: List[Expression], dereferenced: bool, meta: Meta | None = None)[source]
+

Bases: object

+

A list of subscripts.

+

Examples:

+
[1, 2, 3]
+[Constant, GVL.Value, 1 + 3]
+[1]^
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

subscript_list

+
subscript_list: "[" _subscript ( "," _subscript )* "]" [ DEREFERENCED ]
+
+
+

Methods

+ + + + + + + + + +

__init__(subscripts, dereferenced[, meta])

from_lark(*args)

+

Attributes

+ + + + + + + + + + + + +

meta

subscripts

dereferenced

+
+
+subscripts: List[Expression]
+
+ +
+
+dereferenced: bool
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(*args)[source]
+
+ +
+
+__init__(subscripts: List[Expression], dereferenced: bool, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.TemporaryVariableDeclarations.html b/master/api/blark.transform.TemporaryVariableDeclarations.html new file mode 100644 index 0000000..6a7cd6a --- /dev/null +++ b/master/api/blark.transform.TemporaryVariableDeclarations.html @@ -0,0 +1,372 @@ + + + + + + + blark.transform.TemporaryVariableDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.TemporaryVariableDeclarations

+
+
+class blark.transform.TemporaryVariableDeclarations(items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

Temporary variable declarations block (VAR_TEMP).

+

May be annotated with attributes (see VariableAttributes).

+

Lark grammar

+

This class is used by the following grammar rules:

+

temp_var_decls

+
temp_var_decls: "VAR_TEMP"i var_body "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(items[, meta])

from_lark(items)

+

Attributes

+ + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

items

+
+
+block_header: ClassVar[str] = 'VAR_TEMP'
+
+ +
+
+items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(items: Tree) TemporaryVariableDeclarations[source]
+
+ +
+
+__init__(items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.TimeOfDay.html b/master/api/blark.transform.TimeOfDay.html new file mode 100644 index 0000000..721dc70 --- /dev/null +++ b/master/api/blark.transform.TimeOfDay.html @@ -0,0 +1,385 @@ + + + + + + + blark.transform.TimeOfDay — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.TimeOfDay

+
+
+class blark.transform.TimeOfDay(hour: Token, minute: Token, second: Token | None = None, meta: Meta | None = None)[source]
+

Bases: Literal

+

Time of day literal value.

+

Lark grammar

+

This class is used by the following grammar rules:

+

time_of_day

+
time_of_day: ("TIME_OF_DAY"i | "TOD"i) "#" _daytime
+
+
+

Methods

+ + + + + + + + + +

__init__(hour, minute[, second, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + +

meta

second

value

The time of day value.

hour

minute

+
+
+hour: Token
+
+ +
+
+minute: Token
+
+ +
+
+second: Token | None = None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property value: str
+

The time of day value.

+
+ +
+
+__init__(hour: Token, minute: Token, second: Token | None = None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.TypeInformation.html b/master/api/blark.transform.TypeInformation.html new file mode 100644 index 0000000..56ae491 --- /dev/null +++ b/master/api/blark.transform.TypeInformation.html @@ -0,0 +1,370 @@ + + + + + + + blark.transform.TypeInformation — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.TypeInformation

+
+
+class blark.transform.TypeInformation(base_type_name: str | Token, full_type_name: str | Token, context: Any)[source]
+

Bases: object

+

Type information derived from a specification or initialization.

+

Methods

+ + + + + + + + + + + + +

__init__(base_type_name, full_type_name, context)

from_init(init)

from_spec(spec)

+

Attributes

+ + + + + + + + + + + + +

base_type_name

full_type_name

context

+
+
+base_type_name: str | Token
+
+ +
+
+full_type_name: str | Token
+
+ +
+
+context: Any
+
+ +
+
+classmethod from_init(init: StructureInitialization | ArrayTypeInitialization | StringTypeInitialization | TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization | InitializedStructure | FunctionCall) Self[source]
+
+ +
+
+classmethod from_spec(spec: ArraySpecification | DataType | EnumeratedSpecification | FunctionCall | IndirectSimpleSpecification | ObjectInitializerArray | SimpleSpecification | StringTypeSpecification | SubrangeSpecification) Self[source]
+
+ +
+
+__init__(base_type_name: str | Token, full_type_name: str | Token, context: Any) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.TypeInitialization.html b/master/api/blark.transform.TypeInitialization.html new file mode 100644 index 0000000..142f0c8 --- /dev/null +++ b/master/api/blark.transform.TypeInitialization.html @@ -0,0 +1,382 @@ + + + + + + + blark.transform.TypeInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.TypeInitialization

+
+
+class blark.transform.TypeInitialization(spec: SimpleSpecification | IndirectSimpleSpecification, value: Expression | None, meta: Meta | None = None)[source]
+

Bases: TypeInitializationBase

+

A simple initialization specification of a type name.

+

Example:

+
TypeName := Value1
+STRING[100] := "value"
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

simple_spec_init

+
simple_spec_init: ( simple_specification | indirect_simple_specification ) [ ":=" expression ]
+
+
+

Methods

+ + + + + + + + + +

__init__(spec, value[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full, qualified type name.

meta

type_info

The base type name.

spec

value

+
+
+spec: SimpleSpecification | IndirectSimpleSpecification
+
+ +
+
+value: Expression | None
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(spec: SimpleSpecification | IndirectSimpleSpecification, value: Expression | None, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.TypeInitializationBase.html b/master/api/blark.transform.TypeInitializationBase.html new file mode 100644 index 0000000..84e56ab --- /dev/null +++ b/master/api/blark.transform.TypeInitializationBase.html @@ -0,0 +1,349 @@ + + + + + + + blark.transform.TypeInitializationBase — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.TypeInitializationBase

+
+
+class blark.transform.TypeInitializationBase[source]
+

Bases: object

+

Base class for type initializations.

+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + +

base_type_name

The base type name.

full_type_name

The full, qualified type name.

type_info

The base type name.

+
+
+property type_info: TypeInformation
+

The base type name.

+
+ +
+
+property base_type_name: Token | str
+

The base type name.

+
+ +
+
+property full_type_name: Token | str
+

The full, qualified type name.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.TypeSpecificationBase.html b/master/api/blark.transform.TypeSpecificationBase.html new file mode 100644 index 0000000..12d66f0 --- /dev/null +++ b/master/api/blark.transform.TypeSpecificationBase.html @@ -0,0 +1,378 @@ + + + + + + + blark.transform.TypeSpecificationBase — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.TypeSpecificationBase

+
+
+class blark.transform.TypeSpecificationBase[source]
+

Bases: object

+

Base class for a specification of a type.

+

Can specify a:

+
    +
  1. Enumeration:

    +
    ( 1, 1 ) INT
    +TYPE_NAME     (TODO; ambiguous with 2)
    +
    +
    +
  2. +
  3. A simple or string type specification:

    +
    TYPE_NAME
    +STRING
    +STRING[255]
    +
    +
    +
  4. +
  5. An indirect simple specification:

    +
    POINTER TO TYPE_NAME
    +REFERENCE TO TYPE_NAME
    +REFERENCE TO POINTER TO TYPE_NAME
    +
    +
    +
  6. +
  7. An array specification:

    +
    ARRAY [1..2] OF TypeName
    +ARRAY [1..2] OF TypeName(1, 2)
    +
    +
    +
  8. +
+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + +

base_type_name

The full type name.

full_type_name

The full type name.

type_info

The base type name.

+
+
+property type_info: TypeInformation
+

The base type name.

+
+ +
+
+property base_type_name: Token | str
+

The full type name.

+
+ +
+
+property full_type_name: Token | str
+

The full type name.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.UnaryOperation.html b/master/api/blark.transform.UnaryOperation.html new file mode 100644 index 0000000..3a7d45d --- /dev/null +++ b/master/api/blark.transform.UnaryOperation.html @@ -0,0 +1,368 @@ + + + + + + + blark.transform.UnaryOperation — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.UnaryOperation

+
+
+class blark.transform.UnaryOperation(op: Token, expr: Expression, meta: Meta | None = None)[source]
+

Bases: Expression

+

A unary - single operand - operation: NOT, -, or +.

+

Lark grammar

+

This class is used by the following grammar rules:

+

unary_expression

+
unary_expression: [ UNARY_OPERATOR ] primary_expression
+
+
+

Methods

+ + + + + + + + + +

__init__(op, expr[, meta])

from_lark(operator, expr)

+

Attributes

+ + + + + + + + + + + + +

meta

op

expr

+
+
+op: Token
+
+ +
+
+expr: Expression
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(operator: Token | None, expr: Expression)[source]
+
+ +
+
+__init__(op: Token, expr: Expression, meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.UnionElementDeclaration.html b/master/api/blark.transform.UnionElementDeclaration.html new file mode 100644 index 0000000..93355e3 --- /dev/null +++ b/master/api/blark.transform.UnionElementDeclaration.html @@ -0,0 +1,388 @@ + + + + + + + blark.transform.UnionElementDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.UnionElementDeclaration

+
+
+class blark.transform.UnionElementDeclaration(name: Token, spec: ArraySpecification | SimpleSpecification | SubrangeSpecification | EnumeratedSpecification | IndirectSimpleSpecification, meta: Meta | None = None)[source]
+

Bases: object

+

Declaration of a single element of a union.

+

Similar to a structure element, but not all types are supported and no +initialization/default values are allowed.

+

Examples:

+
iValue : INT;
+arrValue : ARRAY [1..2] OF INT;
+arrValue1 : INT (1..2);
+arrValue1 : (Value1 := 1) INT;
+sValue : STRING;
+psValue1 : POINTER TO STRING[10];
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

union_element_declaration

+
union_element_declaration: structure_element_name ":" ( array_specification | simple_specification | indirect_simple_specification | subrange_specification | enumerated_specification )
+
+
+

Methods

+ + + + + + + + + +

__init__(name, spec[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + + + + +

meta

variables

API compat

name

spec

+
+
+name: Token
+
+ +
+
+spec: ArraySpecification | SimpleSpecification | SubrangeSpecification | EnumeratedSpecification | IndirectSimpleSpecification
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+property variables: List[str]
+

API compat

+
+ +
+
+__init__(name: Token, spec: ArraySpecification | SimpleSpecification | SubrangeSpecification | EnumeratedSpecification | IndirectSimpleSpecification, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.UnionTypeDeclaration.html b/master/api/blark.transform.UnionTypeDeclaration.html new file mode 100644 index 0000000..a7d6e93 --- /dev/null +++ b/master/api/blark.transform.UnionTypeDeclaration.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.UnionTypeDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.UnionTypeDeclaration

+
+
+class blark.transform.UnionTypeDeclaration(name: Token, declarations: List[UnionElementDeclaration], meta: Meta | None = None)[source]
+

Bases: object

+

A full declaration of a UNION type, as part of a TYPE/END_TYPE block.

+

Examples:

+
UNION
+    iVal : INT;
+    aAsBytes : ARRAY [0..2] OF BYTE;
+END_UNION
+
+UNION
+    iValue : INT;
+    eValue : (iValue := 1, iValue2 := 2) INT;
+END_UNION
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

union_type_declaration

+
union_type_declaration: structure_type_name_declaration ":" "UNION"i ( union_element_declaration ";"+ )* "END_UNION"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(name, declarations[, meta])

from_lark(name, *decls)

+

Attributes

+ + + + + + + + + + + + +

meta

name

declarations

+
+
+name: Token
+
+ +
+
+declarations: List[UnionElementDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(name: Token, *decls: UnionElementDeclaration)[source]
+
+ +
+
+__init__(name: Token, declarations: List[UnionElementDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.UnresolvedTypeInformation.html b/master/api/blark.transform.UnresolvedTypeInformation.html new file mode 100644 index 0000000..5c03e35 --- /dev/null +++ b/master/api/blark.transform.UnresolvedTypeInformation.html @@ -0,0 +1,338 @@ + + + + + + + blark.transform.UnresolvedTypeInformation — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.UnresolvedTypeInformation

+
+
+class blark.transform.UnresolvedTypeInformation(base_type_name: 'Union[str, lark.Token]', full_type_name: 'Union[str, lark.Token]', context: 'Any')[source]
+

Bases: TypeInformation

+

Methods

+ + + + + + +

__init__(base_type_name, full_type_name, context)

+

Attributes

+ + + + + + + + + + + + +

base_type_name

full_type_name

context

+
+
+__init__(base_type_name: str | Token, full_type_name: str | Token, context: Any) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.Variable.html b/master/api/blark.transform.Variable.html new file mode 100644 index 0000000..8d5cdb5 --- /dev/null +++ b/master/api/blark.transform.Variable.html @@ -0,0 +1,330 @@ + + + + + + + blark.transform.Variable — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.Variable

+
+
+class blark.transform.Variable[source]
+

Bases: Expression

+

Variable base class.

+

Marked as a “tagged union” so that serialization will uniquely identify the +Python class.

+

Includes:

+
    +
  1. Direct variables with I/O linkage (e.g., var AT %I*); may be +located (e.g., AT %IX1.1) or incomplete (e.g., just %I*).

  2. +
  3. +
    “Simple”, single-element variables (referenced by name, potentially

    dereferenced pointers) (e.g., var or var^).

    +
    +
    +
  4. +
  5. Multi-element variables (e.g., a.b.c or a^.b[1].c).

  6. +
+

Methods

+ + + +
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.VariableAttributes.html b/master/api/blark.transform.VariableAttributes.html new file mode 100644 index 0000000..2cdf1d6 --- /dev/null +++ b/master/api/blark.transform.VariableAttributes.html @@ -0,0 +1,355 @@ + + + + + + + blark.transform.VariableAttributes — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.VariableAttributes

+
+
+class blark.transform.VariableAttributes(value)[source]
+

Bases: _FlagHelper, IntFlag

+

An enumeration.

+

Lark grammar

+

This class is used by the following grammar rules:

+

variable_attributes

+
variable_attributes: VAR_ATTRIB+
+
+
+

Attributes

+ + + + + + + + + + + + + + + +

constant

retain

non_retain

persistent

+
+
+constant = 1
+
+ +
+
+retain = 2
+
+ +
+
+non_retain = 4
+
+ +
+
+persistent = 8
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.VariableDeclarationBlock.html b/master/api/blark.transform.VariableDeclarationBlock.html new file mode 100644 index 0000000..af2323f --- /dev/null +++ b/master/api/blark.transform.VariableDeclarationBlock.html @@ -0,0 +1,357 @@ + + + + + + + blark.transform.VariableDeclarationBlock — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.VariableDeclarationBlock

+
+
+class blark.transform.VariableDeclarationBlock[source]
+

Bases: object

+

Base class for variable declaration blocks.

+

Marked as a “tagged union” so that serialization will uniquely identify the +Python class.

+

Methods

+ + + +
+

Attributes

+ + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

items

meta

+
+
+block_header: ClassVar[str] = 'VAR'
+
+ +
+
+items: List[Any]
+
+ +
+
+meta: Meta | None
+
+ +
+
+property attribute_pragmas: List[str]
+

Attribute pragmas associated with the variable declaration block.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.VariableDeclarations.html b/master/api/blark.transform.VariableDeclarations.html new file mode 100644 index 0000000..44c6575 --- /dev/null +++ b/master/api/blark.transform.VariableDeclarations.html @@ -0,0 +1,380 @@ + + + + + + + blark.transform.VariableDeclarations — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.VariableDeclarations

+
+
+class blark.transform.VariableDeclarations(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None)[source]
+

Bases: VariableDeclarationBlock

+

Variable declarations block (VAR).

+

May be annotated with attributes (see VariableAttributes).

+

Lark grammar

+

This class is used by the following grammar rules:

+

var_declarations

+
var_declarations: "VAR"i [ variable_attributes ] var_body "END_VAR"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(attrs, items[, meta])

from_lark(attrs, tree)

+

Attributes

+ + + + + + + + + + + + + + + + + + +

attribute_pragmas

Attribute pragmas associated with the variable declaration block.

block_header

meta

attrs

items

+
+
+block_header: ClassVar[str] = 'VAR'
+
+ +
+
+attrs: VariableAttributes | None
+
+ +
+
+items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration]
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+static from_lark(attrs: VariableAttributes | None, tree: Tree) VariableDeclarations[source]
+
+ +
+
+__init__(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.VariableLocationPrefix.html b/master/api/blark.transform.VariableLocationPrefix.html new file mode 100644 index 0000000..03e767c --- /dev/null +++ b/master/api/blark.transform.VariableLocationPrefix.html @@ -0,0 +1,343 @@ + + + + + + + blark.transform.VariableLocationPrefix — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.VariableLocationPrefix

+
+
+class blark.transform.VariableLocationPrefix(value)[source]
+

Bases: str, Enum

+

An enumeration.

+

Attributes

+ + + + + + + + + + + + +

input

I/O to PLC task.

output

PLC task to I/O.

memory

+
+
+input = 'I'
+

I/O to PLC task.

+
+ +
+
+output = 'Q'
+

PLC task to I/O.

+
+ +
+
+memory = 'M'
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.VariableOneInitDeclaration.html b/master/api/blark.transform.VariableOneInitDeclaration.html new file mode 100644 index 0000000..b51875d --- /dev/null +++ b/master/api/blark.transform.VariableOneInitDeclaration.html @@ -0,0 +1,378 @@ + + + + + + + blark.transform.VariableOneInitDeclaration — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.VariableOneInitDeclaration

+
+
+class blark.transform.VariableOneInitDeclaration(variables: List[DeclaredVariable], init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization, meta: Meta | None = None)[source]
+

Bases: InitDeclaration

+

A declaration of one or more variables with a type, subrange, or enumerated +type initialization.

+

Examples:

+
stVar1, stVar2 : (Value1, Value2)
+stVar1, stVar2 : (Value1 := 0, Value2 := 1)
+stVar1 : INT (1..2) := 25
+stVar1, stVar2 : TypeName := Value
+stVar1, stVar2 : (Value1 := 1, Value2 := 2)
+stVar1, stVar2 : (Value1 := 1, Value2 := 2) INT := Value1
+
+
+

Lark grammar

+

This class is used by the following grammar rules:

+

var1_init_decl

+
var1_init_decl: var1_list ":" ( simple_spec_init | subrange_spec_init | enumerated_spec_init )
+
+
+

Methods

+ + + + + + + + + +

__init__(variables, init[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

variables

init

+
+
+variables: List[DeclaredVariable]
+
+ +
+
+init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(variables: List[DeclaredVariable], init: TypeInitialization | SubrangeTypeInitialization | EnumeratedTypeInitialization, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.VariableSizePrefix.html b/master/api/blark.transform.VariableSizePrefix.html new file mode 100644 index 0000000..fc65825 --- /dev/null +++ b/master/api/blark.transform.VariableSizePrefix.html @@ -0,0 +1,357 @@ + + + + + + + blark.transform.VariableSizePrefix — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.VariableSizePrefix

+
+
+class blark.transform.VariableSizePrefix(value)[source]
+

Bases: str, Enum

+

Size prefix, used in locations (e.g., %IX1.1 has a bit prefix).

+

Attributes

+ + + + + + + + + + + + + + + + + + +

bit

byte

word_16

dword_32

lword_64

+
+
+bit = 'X'
+
+ +
+
+byte = 'B'
+
+ +
+
+word_16 = 'W'
+
+ +
+
+dword_32 = 'D'
+
+ +
+
+lword_64 = 'L'
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.WhileStatement.html b/master/api/blark.transform.WhileStatement.html new file mode 100644 index 0000000..5b448fa --- /dev/null +++ b/master/api/blark.transform.WhileStatement.html @@ -0,0 +1,368 @@ + + + + + + + blark.transform.WhileStatement — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.WhileStatement

+
+
+class blark.transform.WhileStatement(expression: Expression, statements: StatementList, meta: Meta | None = None)[source]
+

Bases: Statement

+

A beginning conditional loop statement, WHILE.

+

Lark grammar

+

This class is used by the following grammar rules:

+

while_statement

+
while_statement: "WHILE"i expression "DO"i statement_list "END_WHILE"i ";"*
+
+
+

Methods

+ + + + + + + + + +

__init__(expression, statements[, meta])

from_lark()

+

Attributes

+ + + + + + + + + + + + +

meta

expression

statements

+
+
+expression: Expression
+
+ +
+
+statements: StatementList
+
+ +
+
+meta: Meta | None = None
+
+ +
+
+__init__(expression: Expression, statements: StatementList, meta: Meta | None = None) None
+
+ +
+
+from_lark() T
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform._ArrayInitialElementCount.html b/master/api/blark.transform._ArrayInitialElementCount.html new file mode 100644 index 0000000..9f9f8c8 --- /dev/null +++ b/master/api/blark.transform._ArrayInitialElementCount.html @@ -0,0 +1,332 @@ + + + + + + + blark.transform._ArrayInitialElementCount — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform._ArrayInitialElementCount

+
+
+class blark.transform._ArrayInitialElementCount[source]
+

Bases: object

+

An internal handler for array initial elements with repeat count +values.

+

Lark grammar

+

This class is used by the following grammar rules:

+

array_initial_element_count

+
array_initial_element: ( integer | enumerated_value ) "(" [ _array_initial_element ] ")" -> array_initial_element_count
+
+
+

Methods

+ + + + + + +

from_lark(count, element)

+
+
+static from_lark(count: EnumeratedValue | Integer, element: Expression | StructureInitialization | EnumeratedValue | ArrayInitialization) ArrayInitialElement[source]
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform._BareArrayInitialization.html b/master/api/blark.transform._BareArrayInitialization.html new file mode 100644 index 0000000..4bb7e95 --- /dev/null +++ b/master/api/blark.transform._BareArrayInitialization.html @@ -0,0 +1,340 @@ + + + + + + + blark.transform._BareArrayInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform._BareArrayInitialization

+
+
+class blark.transform._BareArrayInitialization[source]
+

Bases: object

+

Internal handler for array initialization, without brackets

+

See also ArrayInitialization

+

Lark grammar

+

This class is used by the following grammar rules:

+

bare_array_initialization

+
| array_initial_element ( "," array_initial_element )*         -> bare_array_initialization
+
+
+

Methods

+ + + + + + + + + +

__init__()

from_lark(*elements)

+
+
+static from_lark(*elements: ArrayInitialElement) ArrayInitialization[source]
+
+ +
+
+__init__() None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform._BracketedArrayInitialization.html b/master/api/blark.transform._BracketedArrayInitialization.html new file mode 100644 index 0000000..fda9013 --- /dev/null +++ b/master/api/blark.transform._BracketedArrayInitialization.html @@ -0,0 +1,340 @@ + + + + + + + blark.transform._BracketedArrayInitialization — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform._BracketedArrayInitialization

+
+
+class blark.transform._BracketedArrayInitialization[source]
+

Bases: object

+

Internal handler for array initialization with brackets.

+

See also ArrayInitialization

+

Lark grammar

+

This class is used by the following grammar rules:

+

bracketed_array_initialization

+
array_initialization: "[" array_initial_element ( "," array_initial_element )* "]" -> bracketed_array_initialization
+
+
+

Methods

+ + + + + + + + + +

__init__()

from_lark(*elements)

+
+
+static from_lark(*elements: ArrayInitialElement) ArrayInitialization[source]
+
+ +
+
+__init__() None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform._FlagHelper.html b/master/api/blark.transform._FlagHelper.html new file mode 100644 index 0000000..4e74e17 --- /dev/null +++ b/master/api/blark.transform._FlagHelper.html @@ -0,0 +1,325 @@ + + + + + + + blark.transform._FlagHelper — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform._FlagHelper

+
+
+class blark.transform._FlagHelper[source]
+

Bases: object

+

A helper base class which translates tokens to enum.Flag instances.

+

Methods

+ + + + + + +

from_lark(token, *tokens)

+
+
+classmethod from_lark(token: Token, *tokens: Token)[source]
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform._GenericInit.html b/master/api/blark.transform._GenericInit.html new file mode 100644 index 0000000..547c50e --- /dev/null +++ b/master/api/blark.transform._GenericInit.html @@ -0,0 +1,362 @@ + + + + + + + blark.transform._GenericInit — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform._GenericInit

+
+
+class blark.transform._GenericInit(base_type_name: str, full_type_name: str, repr: str, value: str | None)[source]
+

Bases: object

+

API compat to give a valid init attribute.

+

Methods

+ + + + + + +

__init__(base_type_name, full_type_name, ...)

+

Attributes

+ + + + + + + + + + + + + + + +

base_type_name

full_type_name

repr

value

+
+
+base_type_name: str
+
+ +
+
+full_type_name: str
+
+ +
+
+repr: str
+
+ +
+
+value: str | None
+
+ +
+
+__init__(base_type_name: str, full_type_name: str, repr: str, value: str | None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.configure_formatting.html b/master/api/blark.transform.configure_formatting.html new file mode 100644 index 0000000..b820cb2 --- /dev/null +++ b/master/api/blark.transform.configure_formatting.html @@ -0,0 +1,311 @@ + + + + + + + blark.transform.configure_formatting — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.configure_formatting

+
+
+blark.transform.configure_formatting(settings: FormatSettings)[source]
+

Override the default code formatting settings.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.get_grammar_for_class.html b/master/api/blark.transform.get_grammar_for_class.html new file mode 100644 index 0000000..c8dacdf --- /dev/null +++ b/master/api/blark.transform.get_grammar_for_class.html @@ -0,0 +1,311 @@ + + + + + + + blark.transform.get_grammar_for_class — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.get_grammar_for_class

+
+
+blark.transform.get_grammar_for_class(cls: type) Dict[str, str][source]
+

Given a class, get blark’s iec.lark associated grammar definition(s).

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.indent.html b/master/api/blark.transform.indent.html new file mode 100644 index 0000000..deb1727 --- /dev/null +++ b/master/api/blark.transform.indent.html @@ -0,0 +1,311 @@ + + + + + + + blark.transform.indent — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.indent

+
+
+blark.transform.indent(value: Any, prefix: str | None = None) str[source]
+

Stringified and indented {value}.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.indent_if.html b/master/api/blark.transform.indent_if.html new file mode 100644 index 0000000..69e03d3 --- /dev/null +++ b/master/api/blark.transform.indent_if.html @@ -0,0 +1,311 @@ + + + + + + + blark.transform.indent_if — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.indent_if

+
+
+blark.transform.indent_if(value: Any | None, prefix: str | None = None) str | None[source]
+

Stringified and indented {value} if not None.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.join_if.html b/master/api/blark.transform.join_if.html new file mode 100644 index 0000000..e94426d --- /dev/null +++ b/master/api/blark.transform.join_if.html @@ -0,0 +1,311 @@ + + + + + + + blark.transform.join_if — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.join_if

+
+
+blark.transform.join_if(value1: Any | None, delimiter: str, value2: Any | None) str[source]
+

‘{value1}{delimiter}{value2} if value1 and value2, otherwise just {value1} or {value2}.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.merge_comments.html b/master/api/blark.transform.merge_comments.html new file mode 100644 index 0000000..f5d1b8b --- /dev/null +++ b/master/api/blark.transform.merge_comments.html @@ -0,0 +1,311 @@ + + + + + + + blark.transform.merge_comments — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.merge_comments

+
+
+blark.transform.merge_comments(source: Any, comments: List[Token])[source]
+

Take the transformed tree and annotate comments back into meta information.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.meta_field.html b/master/api/blark.transform.meta_field.html new file mode 100644 index 0000000..9164e16 --- /dev/null +++ b/master/api/blark.transform.meta_field.html @@ -0,0 +1,311 @@ + + + + + + + blark.transform.meta_field — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.meta_field

+
+
+blark.transform.meta_field()[source]
+

Create the Meta field for the dataclass magic.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.multiline_code_block.html b/master/api/blark.transform.multiline_code_block.html new file mode 100644 index 0000000..88e5ed7 --- /dev/null +++ b/master/api/blark.transform.multiline_code_block.html @@ -0,0 +1,311 @@ + + + + + + + blark.transform.multiline_code_block — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.multiline_code_block

+
+
+blark.transform.multiline_code_block(block: str) str[source]
+

Multiline code block with lax beginning/end newlines.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.transform.transform.html b/master/api/blark.transform.transform.html new file mode 100644 index 0000000..6806183 --- /dev/null +++ b/master/api/blark.transform.transform.html @@ -0,0 +1,332 @@ + + + + + + + blark.transform.transform — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.transform.transform

+
+
+blark.transform.transform(source_code: str, tree: Tree, comments: list[Token] | None = None, line_map: dict[int, int] | None = None, filename: Path | None = None) SourceCode[source]
+

Transform a lark.Tree into dataclasses.

+
+
Parameters:
+
+
source_codestr

The plain source code.

+
+
treelark.Tree

The parse tree from lark.

+
+
commentslist[lark.Token], optional

A list of pre-processed comments.

+
+
line_mapdict[int, int], optional

A map of lines from source_code to file lines.

+
+
filenamepathlib.Path, optional

The file associated with the source code.

+
+
+
+
Returns:
+
+
SourceCode
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.typing.ContainsBlarkCode.html b/master/api/blark.typing.ContainsBlarkCode.html new file mode 100644 index 0000000..50ad77d --- /dev/null +++ b/master/api/blark.typing.ContainsBlarkCode.html @@ -0,0 +1,181 @@ + + + + + + + blark.typing.ContainsBlarkCode — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.typing.ContainsBlarkCode

+
+
+class blark.typing.ContainsBlarkCode(*args, **kwargs)[source]
+

Bases: Protocol

+

Indicates that the given class can emit blark-compatible source items.

+

Methods

+ + + + + + + + + +

__init__(*args, **kwargs)

to_blark(**kwds)

Helper for @overload to raise when called.

+
+
+to_blark() list[BlarkSourceItem]
+
+to_blark() list[BlarkCompositeSourceItem]
+
+to_blark() list[AnyBlarkSourceItem]
+

Helper for @overload to raise when called.

+
+ +
+
+__init__(*args, **kwargs)
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.typing.SupportsRewrite.html b/master/api/blark.typing.SupportsRewrite.html new file mode 100644 index 0000000..e36f4d5 --- /dev/null +++ b/master/api/blark.typing.SupportsRewrite.html @@ -0,0 +1,175 @@ + + + + + + + blark.typing.SupportsRewrite — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.typing.SupportsRewrite

+
+
+class blark.typing.SupportsRewrite(*args, **kwargs)[source]
+

Bases: Protocol

+

Methods

+ + + + + + + + + +

__init__(*args, **kwargs)

rewrite_code(identifier, contents)

+
+
+rewrite_code(identifier: str | None, contents: str)[source]
+
+ +
+
+__init__(*args, **kwargs)
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.typing.SupportsSaveToPath.html b/master/api/blark.typing.SupportsSaveToPath.html new file mode 100644 index 0000000..ebb4e4a --- /dev/null +++ b/master/api/blark.typing.SupportsSaveToPath.html @@ -0,0 +1,175 @@ + + + + + + + blark.typing.SupportsSaveToPath — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.typing.SupportsSaveToPath

+
+
+class blark.typing.SupportsSaveToPath(*args, **kwargs)[source]
+

Bases: Protocol

+

Methods

+ + + + + + + + + +

__init__(*args, **kwargs)

save_to(path, **kwargs)

+
+
+__init__(*args, **kwargs)
+
+ +
+
+save_to(path: str | Path, **kwargs) None[source]
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.typing.SupportsWrite.html b/master/api/blark.typing.SupportsWrite.html new file mode 100644 index 0000000..16b8c84 --- /dev/null +++ b/master/api/blark.typing.SupportsWrite.html @@ -0,0 +1,178 @@ + + + + + + + blark.typing.SupportsWrite — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.typing.SupportsWrite

+
+
+class blark.typing.SupportsWrite(*args, **kwargs)[source]
+

Bases: Protocol

+

Methods

+ + + + + + + + + +

__init__(*args, **kwargs)

to_file_contents(**kwds)

Helper for @overload to raise when called.

+
+
+__init__(*args, **kwargs)
+
+ +
+
+to_file_contents(**kwargs) str
+
+to_file_contents(**kwargs) bytes
+

Helper for @overload to raise when called.

+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.Identifier.html b/master/api/blark.util.Identifier.html new file mode 100644 index 0000000..2228452 --- /dev/null +++ b/master/api/blark.util.Identifier.html @@ -0,0 +1,248 @@ + + + + + + + blark.util.Identifier — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.Identifier

+
+
+class blark.util.Identifier(parts: List[str], decl_impl: Literal['declaration', 'implementation'] | None = None)[source]
+

Bases: object

+

A blark convention for giving portions of code unique names.

+

Examples of valid identifiers include:

+
    +
  • FB_Name/declaration

  • +
  • FB_Name/implementation

  • +
  • FB_Name.Action/declaration

  • +
  • FB_Name.Action/implementation

  • +
  • FB_Name.Property.get/implementation

  • +
  • FB_Name.Property.set/implementation

  • +
+
+
Attributes:
+
+
partslist of str

Parts of the name, split by the “.” character.

+
+
decl_impl“declaration” or “implementation”

The final “/portion”, indicating whether the code section is describing +the declaration portion or the implementation portion.

+
+
+
+
+

Methods

+ + + + + + + + + + + + +

__init__(parts[, decl_impl])

from_string(value)

to_string()

+

Attributes

+ + + + + + + + + + + + +

decl_impl

dotted_name

parts

+
+
+parts: List[str]
+
+ +
+
+decl_impl: Literal['declaration', 'implementation'] | None = None
+
+ +
+
+property dotted_name: str
+
+ +
+
+to_string() str[source]
+
+ +
+
+classmethod from_string(value: str) Self[source]
+
+ +
+
+__init__(parts: List[str], decl_impl: Literal['declaration', 'implementation'] | None = None) None
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.SourceType.html b/master/api/blark.util.SourceType.html new file mode 100644 index 0000000..480274f --- /dev/null +++ b/master/api/blark.util.SourceType.html @@ -0,0 +1,300 @@ + + + + + + + blark.util.SourceType — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.SourceType

+
+
+class blark.util.SourceType(value)[source]
+

Bases: Enum

+

An enumeration.

+

Methods

+ + + + + + + + + +

get_grammar_rule()

get_implicit_block_end()

+

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

general

action

function

function_block

interface

method

program

property

property_get

property_set

dut

statement_list

var_global

+
+
+general = 1
+
+ +
+
+action = 2
+
+ +
+
+function = 3
+
+ +
+
+function_block = 4
+
+ +
+
+interface = 5
+
+ +
+
+method = 6
+
+ +
+
+program = 7
+
+ +
+
+property = 8
+
+ +
+
+property_get = 9
+
+ +
+
+property_set = 10
+
+ +
+
+dut = 11
+
+ +
+
+statement_list = 12
+
+ +
+
+var_global = 13
+
+ +
+
+get_grammar_rule() str[source]
+
+ +
+
+get_implicit_block_end() str[source]
+
+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.find_and_clean_comments.html b/master/api/blark.util.find_and_clean_comments.html new file mode 100644 index 0000000..7c50777 --- /dev/null +++ b/master/api/blark.util.find_and_clean_comments.html @@ -0,0 +1,172 @@ + + + + + + + blark.util.find_and_clean_comments — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.find_and_clean_comments

+
+
+blark.util.find_and_clean_comments(text: str, *, replace_char: str = ' ', line_map: dict[int, int] | None = None) Tuple[List[Token], str][source]
+

Clean nested multiline comments from text.

+

For a nested comment like "(* (* abc *) *)", the inner comment markers +would be replaced with replace_char, resulting in the return value +"(*    abc    *)".

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.find_pou_type_and_identifier.html b/master/api/blark.util.find_pou_type_and_identifier.html new file mode 100644 index 0000000..cf93cd0 --- /dev/null +++ b/master/api/blark.util.find_pou_type_and_identifier.html @@ -0,0 +1,168 @@ + + + + + + + blark.util.find_pou_type_and_identifier — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.util.fix_case_insensitive_path.html b/master/api/blark.util.fix_case_insensitive_path.html new file mode 100644 index 0000000..127092c --- /dev/null +++ b/master/api/blark.util.fix_case_insensitive_path.html @@ -0,0 +1,191 @@ + + + + + + + blark.util.fix_case_insensitive_path — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.fix_case_insensitive_path

+
+
+blark.util.fix_case_insensitive_path(path: str | Path) Path[source]
+

Match a path in a case-insensitive manner.

+

Required on Linux to find files in a case-insensitive way. Not required on +OSX/Windows, but platform checks are not done here.

+
+
Parameters:
+
+
pathpathlib.Path or str

The case-insensitive path

+
+
+
+
Returns:
+
+
pathpathlib.Path

The case-corrected path.

+
+
+
+
Raises:
+
+
FileNotFoundError

When the file can’t be found

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.get_file_sha256.html b/master/api/blark.util.get_file_sha256.html new file mode 100644 index 0000000..111b198 --- /dev/null +++ b/master/api/blark.util.get_file_sha256.html @@ -0,0 +1,169 @@ + + + + + + + blark.util.get_file_sha256 — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.util.get_grammar_for_rule.html b/master/api/blark.util.get_grammar_for_rule.html new file mode 100644 index 0000000..323462a --- /dev/null +++ b/master/api/blark.util.get_grammar_for_rule.html @@ -0,0 +1,177 @@ + + + + + + + blark.util.get_grammar_for_rule — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.get_grammar_for_rule

+
+
+blark.util.get_grammar_for_rule(rule: str) str[source]
+

Get the lark grammar source for the provided rule.

+
+
Parameters:
+
+
rulestr

The grammar identifier - rule or token name.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.get_grammar_source.html b/master/api/blark.util.get_grammar_source.html new file mode 100644 index 0000000..2f848a8 --- /dev/null +++ b/master/api/blark.util.get_grammar_source.html @@ -0,0 +1,168 @@ + + + + + + + blark.util.get_grammar_source — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.util.get_source_code.html b/master/api/blark.util.get_source_code.html new file mode 100644 index 0000000..0449402 --- /dev/null +++ b/master/api/blark.util.get_source_code.html @@ -0,0 +1,195 @@ + + + + + + + blark.util.get_source_code — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.get_source_code

+
+
+blark.util.get_source_code(fn: str | Path, *, encoding: str = 'utf-8') str[source]
+

Get source code from the given file.

+

Supports TwinCAT source files (in XML format) or plain text files.

+
+
Parameters:
+
+
fnstr or pathlib.Path

The path to the source code file.

+
+
encodingstr, optional, keyword-only

The encoding to use when opening the file. Defaults to utf-8.

+
+
+
+
Returns:
+
+
str

The source code.

+
+
+
+
Raises:
+
+
FileNotFoundError

If fn does not point to a valid file.

+
+
ValueError

If a TwinCAT file is specified but no source code is associated with +it.

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.indent_inner.html b/master/api/blark.util.indent_inner.html new file mode 100644 index 0000000..7597028 --- /dev/null +++ b/master/api/blark.util.indent_inner.html @@ -0,0 +1,169 @@ + + + + + + + blark.util.indent_inner — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.util.maybe_add_brackets.html b/master/api/blark.util.maybe_add_brackets.html new file mode 100644 index 0000000..01db4b8 --- /dev/null +++ b/master/api/blark.util.maybe_add_brackets.html @@ -0,0 +1,180 @@ + + + + + + + blark.util.maybe_add_brackets — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.maybe_add_brackets

+
+
+blark.util.maybe_add_brackets(text: str, brackets: str = '[]') str[source]
+

Add brackets to text if there are no enclosing brackets.

+
+
Parameters:
+
+
textstr

The text to process.

+
+
bracketsstr, optional

Add this flavor of brackets - a 2 character string of open and close +brackets. Defaults to "[]".

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.python_debug_session.html b/master/api/blark.util.python_debug_session.html new file mode 100644 index 0000000..d6c225b --- /dev/null +++ b/master/api/blark.util.python_debug_session.html @@ -0,0 +1,169 @@ + + + + + + + blark.util.python_debug_session — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.python_debug_session

+
+
+blark.util.python_debug_session(namespace: Dict[str, Any], message: str)[source]
+

Enter an interactive debug session with pdb or IPython, if available.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.rebuild_lark_tree_with_line_map.html b/master/api/blark.util.rebuild_lark_tree_with_line_map.html new file mode 100644 index 0000000..4ed398b --- /dev/null +++ b/master/api/blark.util.rebuild_lark_tree_with_line_map.html @@ -0,0 +1,169 @@ + + + + + + + blark.util.rebuild_lark_tree_with_line_map — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.rebuild_lark_tree_with_line_map

+
+
+blark.util.rebuild_lark_tree_with_line_map(item: _T_Lark, code_line_to_file_line: dict[int, int]) _T_Lark[source]
+

Rebuild a given lark tree, adjusting line numbers to match up with the source.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.recursively_remove_keys.html b/master/api/blark.util.recursively_remove_keys.html new file mode 100644 index 0000000..28afad5 --- /dev/null +++ b/master/api/blark.util.recursively_remove_keys.html @@ -0,0 +1,169 @@ + + + + + + + blark.util.recursively_remove_keys — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.util.remove_all_comments.html b/master/api/blark.util.remove_all_comments.html new file mode 100644 index 0000000..befbaaa --- /dev/null +++ b/master/api/blark.util.remove_all_comments.html @@ -0,0 +1,169 @@ + + + + + + + blark.util.remove_all_comments — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.remove_all_comments

+
+
+blark.util.remove_all_comments(text: str, *, replace_char: str = ' ') str[source]
+

Remove all comments and replace them with the provided character.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.remove_comment_characters.html b/master/api/blark.util.remove_comment_characters.html new file mode 100644 index 0000000..e8b5fe7 --- /dev/null +++ b/master/api/blark.util.remove_comment_characters.html @@ -0,0 +1,169 @@ + + + + + + + blark.util.remove_comment_characters — blark documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api/blark.util.simplify_brackets.html b/master/api/blark.util.simplify_brackets.html new file mode 100644 index 0000000..9b04d30 --- /dev/null +++ b/master/api/blark.util.simplify_brackets.html @@ -0,0 +1,180 @@ + + + + + + + blark.util.simplify_brackets — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.simplify_brackets

+
+
+blark.util.simplify_brackets(text: str, brackets: str = '[]') str[source]
+

Simplify repeated brackets/parentheses in text.

+
+
Parameters:
+
+
textstr

The text to process.

+
+
bracketsstr, optional

Remove this flavor of brackets - a 2 character string of open and close +brackets. Defaults to "[]".

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.tree_to_xml_source.html b/master/api/blark.util.tree_to_xml_source.html new file mode 100644 index 0000000..6c08130 --- /dev/null +++ b/master/api/blark.util.tree_to_xml_source.html @@ -0,0 +1,169 @@ + + + + + + + blark.util.tree_to_xml_source — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

blark.util.tree_to_xml_source

+
+
+blark.util.tree_to_xml_source(tree: Element, encoding: str = 'utf-8', delimiter: str = '\r\n', xml_header: str = '<?xml version="1.0" encoding="{encoding}"?>', indent: str = '  ', include_utf8_sig: bool = True) bytes[source]
+

Return the contents to write for the given XML tree.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/api/blark.util.try_paths.html b/master/api/blark.util.try_paths.html new file mode 100644 index 0000000..2f30afd --- /dev/null +++ b/master/api/blark.util.try_paths.html @@ -0,0 +1,166 @@ + + + + + + + blark.util.try_paths — blark documentation + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/genindex.html b/master/genindex.html new file mode 100644 index 0000000..95a3f61 --- /dev/null +++ b/master/genindex.html @@ -0,0 +1,3985 @@ + + + + + + Index — blark documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Index

+ +
+ _ + | A + | B + | C + | D + | E + | F + | G + | H + | I + | J + | L + | M + | N + | O + | P + | Q + | R + | S + | T + | U + | V + | W + | X + | Y + +
+

_

+ + + +
+ +

A

+ + + +
+ +

B

+ + + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

E

+ + + +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

H

+ + + +
+ +

I

+ + + +
+ +

J

+ + + +
+ +

L

+ + + +
+ +

M

+ + + +
+ +

N

+ + + +
+ +

O

+ + + +
+ +

P

+ + + +
+ +

Q

+ + + +
+ +

R

+ + + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

U

+ + + +
+ +

V

+ + + +
+ +

W

+ + + +
+ +

X

+ + + +
+ +

Y

+ + +
+ + + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/index.html b/master/index.html new file mode 100644 index 0000000..4a61934 --- /dev/null +++ b/master/index.html @@ -0,0 +1,169 @@ + + + + + + + blark — blark documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/introduction.html b/master/introduction.html new file mode 100644 index 0000000..0a7c0da --- /dev/null +++ b/master/introduction.html @@ -0,0 +1,398 @@ + + + + + + + Introduction — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Introduction

+
+

The Grammar

+

The grammar uses Lark’s Earley parser algorithm.

+

The grammar itself is not perfect. It may not reliably parse your source +code or produce useful Python instances just yet.

+

See issues for further +details.

+

As a fun side project, blark isn’t at the top of my priority list. For +an idea of where the project is going, see the issues list.

+
+
+

Requirements

+
    +
  • lark (for grammar-based +parsing)

  • +
  • lxml (for parsing TwinCAT +projects)

  • +
+
+
+

Capabilities

+
    +
  • TwinCAT source code file parsing (*.TcPOU and others)

  • +
  • TwinCAT project and solution loading

  • +
  • lark.Tree generation of any supported source code

  • +
  • Python dataclasses of supported source code, with introspection and +code refactoring

  • +
+
+

Works-in-progress

+
    +
  • Sphinx API documentation generation (a new Sphinx domain)

  • +
  • Code reformatting

  • +
  • “Dependency store” - recursively parse and inspect project +dependencies

  • +
  • Summary generation - a layer on top of dataclasses to summarize +source code details

  • +
  • Rewriting source code directly in TwinCAT source code files

  • +
+
+
+
+

Installation

+

Installation is quick with Pip.

+
pip install --upgrade blark
+
+
+
+

Quickstart (pip / virtualenv with venv)

+
    +
  1. Set up an environment using venv:

  2. +
+
$ python -m venv blark_venv
+$ source blark_venv/bin/activate
+
+
+
    +
  1. Install the library with pip:

  2. +
+
$ python -m pip install blark
+
+
+
+
+

Quickstart (Conda)

+
    +
  1. Set up an environment using conda:

  2. +
+
$ conda create -n blark-env -c conda-forge python=3.10 pip blark
+$ conda activate blark-env
+
+
+
    +
  1. Install the library from conda:

  2. +
+
$ conda install blark
+
+
+
+
+

Development install

+

If you run into issues or wish to run an unreleased version of blark, +you may install directly from this repository like so:

+
$ python -m pip install git+https://github.com/klauer/blark
+
+
+
+
+
+

Sample runs

+

Run the parser or experimental formatter utility. Current supported file +types include those from TwinCAT3 projects ( .tsproj, .sln, +.TcPOU, .TcGVL) and plain-text .st files.

+
$ blark parse --print-tree blark/tests/POUs/F_SetStateParams.TcPOU
+function_declaration
+  None
+  F_SetStateParams
+  indirect_simple_specification
+    None
+    simple_specification        BOOL
+  input_declarations
+    None
+    var1_init_decl
+      var1_list
+... (clipped) ...
+
+
+

To interact with the Python dataclasses directly, make sure IPython is +installed first and then try:

+
$ blark parse --interactive blark/tests/POUs/F_SetStateParams.TcPOU
+# Assuming IPython is installed, the following prompt will come up:
+
+In [1]: results[0].identifier
+Out[1]: 'F_SetStateParams/declaration'
+
+In [2]: results[1].identifier
+Out[2]: 'F_SetStateParams/implementation'
+
+
+

Dump out a parsed and reformatted set of source code:

+
$ blark format blark/tests/source/array_of_objects.st
+{attribute 'hide'}
+METHOD prv_Detection : BOOL
+    VAR_IN_OUT
+        currentChannel : ARRAY [APhase..CPhase] OF class_baseVector(SIZEOF(vector_t), 0);
+    END_VAR
+END_METHOD
+
+
+

blark supports rewriting TwinCAT source code files directly as well:

+
$ blark format blark/tests/POUs/F_SetStateParams.TcPOU
+
+<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.0">
+  <POU Name="F_SetStateParams" Id="{f9611d23-4bb5-422d-9f11-2cc94e61fc9e}" SpecialFunc="None">
+    <Declaration><![CDATA[FUNCTION F_SetStateParams : BOOL
+    VAR_INPUT
+        nStateRef : UDINT;
+        rPosition : REAL;
+        rTolerance : REAL;
+        stBeamParams : ST_BeamParams;
+
+... (clipped) ...
+
+
+

It is also possible to parse the source code into a tokenized +SourceCode tree which supports code introspection and rewriting:

+
In [1]: import blark
+
+In [2]: parsed = blark.parse_source_code(
+   ...:     """
+   ...: PROGRAM ProgramName
+   ...:     VAR_INPUT
+   ...:         iValue : INT;
+   ...:     END_VAR
+   ...:     VAR_ACCESS
+   ...:         AccessName : SymbolicVariable : TypeName READ_WRITE;
+   ...:     END_VAR
+   ...:     iValue := iValue + 1;
+   ...: END_PROGRAM
+   ...: """
+   ...: )
+
+# Access the lark Tree here:
+In [3]: parsed.tree.data
+Out[3]: Token('RULE', 'iec_source')
+
+# Or the transformed information:
+In [3]: transformed = parsed.transform()
+
+In [4]: program = transformed.items[0]
+
+In [5]: program.declarations[0].items[0].variables[0].name
+Out[5]: Token('IDENTIFIER', 'iValue')
+
+
+

The supported starting grammar rules for the reusable parser include:

+
"iec_source"
+"action"
+"data_type_declaration"
+"function_block_method_declaration"
+"function_block_property_declaration"
+"function_block_type_declaration"
+"function_declaration"
+"global_var_declarations"
+"program_declaration"
+"statement_list"
+
+
+

Other starting rules remain possible for advanced users, however a new +parser must be created in that scenario and transformations are not +supported.

+

Additionally, please note that you should avoid creating parsers +on-the-fly as there is a startup cost to re-parsing the grammar. Utilize +the provided parser from blark.get_parser() whenever possible.

+
In [1]: import blark
+
+In [2]: parser = blark.new_parser(start=["any_integer"])
+
+In [3]: Tree('hex_integer', [Token('HEX_STRING', '1010')])
+
+
+
+
+

Adding Test Cases

+

Presently, test cases are provided in two forms. Within the +blark/tests/ directory there are POUs/ and source/ +directories.

+

TwinCAT source code files belong in blark/tests/POUs. Plain-text +source code files (e.g., .st files) belong in +blark/tests/source.

+

Feel free to contribute your own test cases and we’ll do our best to +ensure that blark parses them (and continues to parse them) without +issue.

+
+
+

Acknowledgements

+

Originally based on Volker Birk’s IEC 61131-3 grammar +iec2xml (GitHub fork +here) and A Syntactic +Specification for the Programming Languages of theIEC 61131-3 +Standard +by Flor Narciso et al. Many aspects of the grammar have been added to, +modified, and in cases entirely rewritten to better support lark +grammars and transformers.

+

Special thanks to the blark contributors:

+
    +
  • @engineerjoe440

  • +
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/master/objects.inv b/master/objects.inv new file mode 100644 index 0000000..204bd42 Binary files /dev/null and b/master/objects.inv differ diff --git a/master/search.html b/master/search.html new file mode 100644 index 0000000..cfcd17a --- /dev/null +++ b/master/search.html @@ -0,0 +1,131 @@ + + + + + + Search — blark documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/master/searchindex.js b/master/searchindex.js new file mode 100644 index 0000000..c4e4c3b --- /dev/null +++ b/master/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["api", "api/blark.apischema_compat.alternative_constructor", "api/blark.apischema_compat.as_tagged_union", "api/blark.apischema_compat.get_all_subclasses", "api/blark.apischema_compat.token_deserializer", "api/blark.apischema_compat.token_serializer", "api/blark.dependency_store.DependencyStore", "api/blark.dependency_store.DependencyStoreConfig", "api/blark.dependency_store.DependencyStoreLibrary", "api/blark.dependency_store.PlcProjectMetadata", "api/blark.dependency_store.get_dependency_store", "api/blark.dependency_store.load_projects", "api/blark.format.build_arg_parser", "api/blark.format.determine_output_filename", "api/blark.format.dump_source_to_console", "api/blark.format.get_reformatted_code_blocks", "api/blark.format.main", "api/blark.format.reformat_code", "api/blark.format.write_source_to_file", "api/blark.html.HighlighterAnnotation", "api/blark.html.HtmlWriter", "api/blark.html.apply_annotations_to_code", "api/blark.html.get_annotations", "api/blark.input.BlarkCompositeSourceItem", "api/blark.input.BlarkSourceItem", "api/blark.input.BlarkSourceLine", "api/blark.input.UnsupportedFileFormatError", "api/blark.input.load_file_by_name", "api/blark.input.register_input_handler", "api/blark.main.main", "api/blark.output.OutputBlock", "api/blark.output.get_handler_by_name", "api/blark.output.register_output_handler", "api/blark.parse.BlarkStartingRule", "api/blark.parse.ParseResult", "api/blark.parse.build_arg_parser", "api/blark.parse.dump_json", "api/blark.parse.get_parser", "api/blark.parse.main", "api/blark.parse.new_parser", "api/blark.parse.parse", "api/blark.parse.parse_item", "api/blark.parse.parse_project", "api/blark.parse.parse_single_file", "api/blark.parse.parse_source_code", "api/blark.parse.summarize", "api/blark.plain.PlainFileLoader", "api/blark.solution.DependencyInformation", "api/blark.solution.DependencyVersion", "api/blark.solution.LocatedString", "api/blark.solution.Project", "api/blark.solution.Solution", "api/blark.solution.SolutionLoaderError", "api/blark.solution.TcAction", "api/blark.solution.TcDUT", "api/blark.solution.TcDeclImpl", "api/blark.solution.TcExtraInfo", "api/blark.solution.TcGVL", "api/blark.solution.TcIO", "api/blark.solution.TcMethod", "api/blark.solution.TcPOU", "api/blark.solution.TcProperty", "api/blark.solution.TcSource", "api/blark.solution.TcSourceChild", "api/blark.solution.TcTTO", "api/blark.solution.TcUnknownXml", "api/blark.solution.TwincatPlcProject", "api/blark.solution.TwincatSourceCodeItem", "api/blark.solution.TwincatTsProject", "api/blark.solution.UnsupportedSourceFileError", "api/blark.solution.filename_from_xml", "api/blark.solution.get_blark_input_from_solution", "api/blark.solution.get_child_located_text", "api/blark.solution.get_child_text", "api/blark.solution.get_code_object_from_xml", "api/blark.solution.get_project_guid", "api/blark.solution.get_project_target_netid", "api/blark.solution.get_tcplc_from_xml", "api/blark.solution.make_solution_from_files", "api/blark.solution.parse_xml_contents", "api/blark.solution.parse_xml_file", "api/blark.solution.project_loader", "api/blark.solution.projects_from_solution_source", "api/blark.solution.solution_loader", "api/blark.solution.split_property_and_base_decl", "api/blark.solution.strip_implicit_lines", "api/blark.solution.strip_xml_namespace", "api/blark.solution.twincat_file_loader", "api/blark.solution.twincat_file_writer", "api/blark.sphinxdomain.BlarkDirective", "api/blark.sphinxdomain.BlarkDirectiveWithDeclarations", "api/blark.sphinxdomain.BlarkDomain", "api/blark.sphinxdomain.BlarkSphinxCache", "api/blark.sphinxdomain.BlarkXRefRole", "api/blark.sphinxdomain.DeclarationDirective", "api/blark.sphinxdomain.FunctionBlockDirective", "api/blark.sphinxdomain.FunctionDirective", "api/blark.sphinxdomain.GvlDirective", "api/blark.sphinxdomain.MissingDeclaration", "api/blark.sphinxdomain.ProgramDirective", "api/blark.sphinxdomain.TypeDirective", "api/blark.sphinxdomain.VariableBlockDirective", "api/blark.sphinxdomain.declaration_to_content", "api/blark.sphinxdomain.declaration_to_signature", "api/blark.sphinxdomain.declarations_to_block", "api/blark.sphinxdomain.setup", "api/blark.summary.ActionSummary", "api/blark.summary.CodeSummary", "api/blark.summary.DataTypeSummary", "api/blark.summary.DeclarationSummary", "api/blark.summary.FunctionBlockSummary", "api/blark.summary.FunctionSummary", "api/blark.summary.GlobalVariableSummary", "api/blark.summary.InterfaceSummary", "api/blark.summary.LinkableItems", "api/blark.summary.MethodSummary", "api/blark.summary.ProgramSummary", "api/blark.summary.PropertyGetSetSummary", "api/blark.summary.PropertySummary", "api/blark.summary.Summary", "api/blark.summary.get_linkable_declarations", "api/blark.summary.path_to_file_and_line", "api/blark.summary.text_outline", "api/blark.transform.AccessDeclaration", "api/blark.transform.AccessDeclarations", "api/blark.transform.AccessSpecifier", "api/blark.transform.Action", "api/blark.transform.ArrayInitialElement", "api/blark.transform.ArrayInitialization", "api/blark.transform.ArraySpecification", "api/blark.transform.ArrayTypeDeclaration", "api/blark.transform.ArrayTypeInitialization", "api/blark.transform.ArrayVariableInitDeclaration", "api/blark.transform.AssignmentStatement", "api/blark.transform.BinaryBitString", "api/blark.transform.BinaryInteger", "api/blark.transform.BinaryOperation", "api/blark.transform.BitString", "api/blark.transform.Boolean", "api/blark.transform.BracketedExpression", "api/blark.transform.CaseElement", "api/blark.transform.CaseStatement", "api/blark.transform.ChainedFunctionCall", "api/blark.transform.ChainedFunctionCallStatement", "api/blark.transform.ContinueStatement", "api/blark.transform.DataType", "api/blark.transform.DataTypeDeclaration", "api/blark.transform.Date", "api/blark.transform.DateTime", "api/blark.transform.DeclaredVariable", "api/blark.transform.DirectVariable", "api/blark.transform.Duration", "api/blark.transform.EdgeDeclaration", "api/blark.transform.ElseClause", "api/blark.transform.ElseIfClause", "api/blark.transform.EnumeratedSpecification", "api/blark.transform.EnumeratedTypeDeclaration", "api/blark.transform.EnumeratedTypeInitialization", "api/blark.transform.EnumeratedValue", "api/blark.transform.ExitStatement", "api/blark.transform.Expression", "api/blark.transform.ExtendedSourceCode", "api/blark.transform.Extends", "api/blark.transform.ExternalVariableDeclaration", "api/blark.transform.ExternalVariableDeclarations", "api/blark.transform.FieldSelector", "api/blark.transform.ForStatement", "api/blark.transform.FormatSettings", "api/blark.transform.FullSubrange", "api/blark.transform.Function", "api/blark.transform.FunctionBlock", "api/blark.transform.FunctionBlockDeclaration", "api/blark.transform.FunctionBlockInvocationDeclaration", "api/blark.transform.FunctionBlockNameDeclaration", "api/blark.transform.FunctionCall", "api/blark.transform.FunctionCallStatement", "api/blark.transform.FunctionVariableDeclarations", "api/blark.transform.GlobalVariableAttributes", "api/blark.transform.GlobalVariableDeclaration", "api/blark.transform.GlobalVariableDeclarations", "api/blark.transform.GlobalVariableSpec", "api/blark.transform.GrammarTransformer", "api/blark.transform.HexBitString", "api/blark.transform.HexInteger", "api/blark.transform.IfStatement", "api/blark.transform.Implements", "api/blark.transform.IncompleteLocatedVariableDeclaration", "api/blark.transform.IncompleteLocatedVariableDeclarations", "api/blark.transform.IncompleteLocation", "api/blark.transform.IndirectSimpleSpecification", "api/blark.transform.IndirectionType", "api/blark.transform.InitDeclaration", "api/blark.transform.InitializedStructure", "api/blark.transform.InputDeclarations", "api/blark.transform.InputOutputDeclarations", "api/blark.transform.InputParameterAssignment", "api/blark.transform.Integer", "api/blark.transform.Interface", "api/blark.transform.JumpStatement", "api/blark.transform.LabeledStatement", "api/blark.transform.Ldate", "api/blark.transform.LdateTime", "api/blark.transform.Lduration", "api/blark.transform.Literal", "api/blark.transform.LocatedVariableDeclaration", "api/blark.transform.LocatedVariableDeclarations", "api/blark.transform.Location", "api/blark.transform.LtimeOfDay", "api/blark.transform.Meta", "api/blark.transform.Method", "api/blark.transform.MethodInstanceVariableDeclarations", "api/blark.transform.MultiElementVariable", "api/blark.transform.NoOpStatement", "api/blark.transform.ObjectInitializerArray", "api/blark.transform.OctalBitString", "api/blark.transform.OctalInteger", "api/blark.transform.OutputDeclarations", "api/blark.transform.OutputParameterAssignment", "api/blark.transform.ParameterAssignment", "api/blark.transform.ParenthesizedExpression", "api/blark.transform.PartialSubrange", "api/blark.transform.Program", "api/blark.transform.Property", "api/blark.transform.Real", "api/blark.transform.ReferenceAssignmentStatement", "api/blark.transform.RepeatStatement", "api/blark.transform.ResetStatement", "api/blark.transform.ReturnStatement", "api/blark.transform.SetStatement", "api/blark.transform.SimpleSpecification", "api/blark.transform.SimpleTypeDeclaration", "api/blark.transform.SimpleVariable", "api/blark.transform.SourceCode", "api/blark.transform.Statement", "api/blark.transform.StatementList", "api/blark.transform.StaticDeclarations", "api/blark.transform.String", "api/blark.transform.StringSpecLength", "api/blark.transform.StringTypeDeclaration", "api/blark.transform.StringTypeInitialization", "api/blark.transform.StringTypeSpecification", "api/blark.transform.StringVariableInitDeclaration", "api/blark.transform.StructureElementDeclaration", "api/blark.transform.StructureElementInitialization", "api/blark.transform.StructureInitialization", "api/blark.transform.StructureTypeDeclaration", "api/blark.transform.StructuredVariableInitDeclaration", "api/blark.transform.Subrange", "api/blark.transform.SubrangeSpecification", "api/blark.transform.SubrangeTypeDeclaration", "api/blark.transform.SubrangeTypeInitialization", "api/blark.transform.SubscriptList", "api/blark.transform.TemporaryVariableDeclarations", "api/blark.transform.TimeOfDay", "api/blark.transform.TypeInformation", "api/blark.transform.TypeInitialization", "api/blark.transform.TypeInitializationBase", "api/blark.transform.TypeSpecificationBase", "api/blark.transform.UnaryOperation", "api/blark.transform.UnionElementDeclaration", "api/blark.transform.UnionTypeDeclaration", "api/blark.transform.UnresolvedTypeInformation", "api/blark.transform.Variable", "api/blark.transform.VariableAttributes", "api/blark.transform.VariableDeclarationBlock", "api/blark.transform.VariableDeclarations", "api/blark.transform.VariableLocationPrefix", "api/blark.transform.VariableOneInitDeclaration", "api/blark.transform.VariableSizePrefix", "api/blark.transform.WhileStatement", "api/blark.transform._ArrayInitialElementCount", "api/blark.transform._BareArrayInitialization", "api/blark.transform._BracketedArrayInitialization", "api/blark.transform._FlagHelper", "api/blark.transform._GenericInit", "api/blark.transform.configure_formatting", "api/blark.transform.get_grammar_for_class", "api/blark.transform.indent", "api/blark.transform.indent_if", "api/blark.transform.join_if", "api/blark.transform.merge_comments", "api/blark.transform.meta_field", "api/blark.transform.multiline_code_block", "api/blark.transform.transform", "api/blark.typing.ContainsBlarkCode", "api/blark.typing.SupportsRewrite", "api/blark.typing.SupportsSaveToPath", "api/blark.typing.SupportsWrite", "api/blark.util.Identifier", "api/blark.util.SourceType", "api/blark.util.find_and_clean_comments", "api/blark.util.find_pou_type_and_identifier", "api/blark.util.fix_case_insensitive_path", "api/blark.util.get_file_sha256", "api/blark.util.get_grammar_for_rule", "api/blark.util.get_grammar_source", "api/blark.util.get_source_code", "api/blark.util.indent_inner", "api/blark.util.maybe_add_brackets", "api/blark.util.python_debug_session", "api/blark.util.rebuild_lark_tree_with_line_map", "api/blark.util.recursively_remove_keys", "api/blark.util.remove_all_comments", "api/blark.util.remove_comment_characters", "api/blark.util.simplify_brackets", "api/blark.util.tree_to_xml_source", "api/blark.util.try_paths", "index", "introduction", "sphinx"], "filenames": ["api.rst", "api/blark.apischema_compat.alternative_constructor.rst", "api/blark.apischema_compat.as_tagged_union.rst", "api/blark.apischema_compat.get_all_subclasses.rst", "api/blark.apischema_compat.token_deserializer.rst", "api/blark.apischema_compat.token_serializer.rst", "api/blark.dependency_store.DependencyStore.rst", "api/blark.dependency_store.DependencyStoreConfig.rst", "api/blark.dependency_store.DependencyStoreLibrary.rst", "api/blark.dependency_store.PlcProjectMetadata.rst", "api/blark.dependency_store.get_dependency_store.rst", "api/blark.dependency_store.load_projects.rst", "api/blark.format.build_arg_parser.rst", "api/blark.format.determine_output_filename.rst", "api/blark.format.dump_source_to_console.rst", "api/blark.format.get_reformatted_code_blocks.rst", "api/blark.format.main.rst", "api/blark.format.reformat_code.rst", "api/blark.format.write_source_to_file.rst", "api/blark.html.HighlighterAnnotation.rst", "api/blark.html.HtmlWriter.rst", "api/blark.html.apply_annotations_to_code.rst", "api/blark.html.get_annotations.rst", "api/blark.input.BlarkCompositeSourceItem.rst", "api/blark.input.BlarkSourceItem.rst", "api/blark.input.BlarkSourceLine.rst", "api/blark.input.UnsupportedFileFormatError.rst", "api/blark.input.load_file_by_name.rst", "api/blark.input.register_input_handler.rst", "api/blark.main.main.rst", "api/blark.output.OutputBlock.rst", "api/blark.output.get_handler_by_name.rst", "api/blark.output.register_output_handler.rst", "api/blark.parse.BlarkStartingRule.rst", "api/blark.parse.ParseResult.rst", "api/blark.parse.build_arg_parser.rst", "api/blark.parse.dump_json.rst", "api/blark.parse.get_parser.rst", "api/blark.parse.main.rst", "api/blark.parse.new_parser.rst", "api/blark.parse.parse.rst", "api/blark.parse.parse_item.rst", "api/blark.parse.parse_project.rst", "api/blark.parse.parse_single_file.rst", "api/blark.parse.parse_source_code.rst", "api/blark.parse.summarize.rst", "api/blark.plain.PlainFileLoader.rst", "api/blark.solution.DependencyInformation.rst", "api/blark.solution.DependencyVersion.rst", "api/blark.solution.LocatedString.rst", "api/blark.solution.Project.rst", "api/blark.solution.Solution.rst", "api/blark.solution.SolutionLoaderError.rst", "api/blark.solution.TcAction.rst", "api/blark.solution.TcDUT.rst", "api/blark.solution.TcDeclImpl.rst", "api/blark.solution.TcExtraInfo.rst", "api/blark.solution.TcGVL.rst", "api/blark.solution.TcIO.rst", "api/blark.solution.TcMethod.rst", "api/blark.solution.TcPOU.rst", "api/blark.solution.TcProperty.rst", "api/blark.solution.TcSource.rst", "api/blark.solution.TcSourceChild.rst", "api/blark.solution.TcTTO.rst", "api/blark.solution.TcUnknownXml.rst", "api/blark.solution.TwincatPlcProject.rst", "api/blark.solution.TwincatSourceCodeItem.rst", "api/blark.solution.TwincatTsProject.rst", "api/blark.solution.UnsupportedSourceFileError.rst", "api/blark.solution.filename_from_xml.rst", "api/blark.solution.get_blark_input_from_solution.rst", "api/blark.solution.get_child_located_text.rst", "api/blark.solution.get_child_text.rst", "api/blark.solution.get_code_object_from_xml.rst", "api/blark.solution.get_project_guid.rst", "api/blark.solution.get_project_target_netid.rst", "api/blark.solution.get_tcplc_from_xml.rst", "api/blark.solution.make_solution_from_files.rst", "api/blark.solution.parse_xml_contents.rst", "api/blark.solution.parse_xml_file.rst", "api/blark.solution.project_loader.rst", "api/blark.solution.projects_from_solution_source.rst", "api/blark.solution.solution_loader.rst", "api/blark.solution.split_property_and_base_decl.rst", "api/blark.solution.strip_implicit_lines.rst", "api/blark.solution.strip_xml_namespace.rst", "api/blark.solution.twincat_file_loader.rst", "api/blark.solution.twincat_file_writer.rst", "api/blark.sphinxdomain.BlarkDirective.rst", "api/blark.sphinxdomain.BlarkDirectiveWithDeclarations.rst", "api/blark.sphinxdomain.BlarkDomain.rst", "api/blark.sphinxdomain.BlarkSphinxCache.rst", "api/blark.sphinxdomain.BlarkXRefRole.rst", "api/blark.sphinxdomain.DeclarationDirective.rst", "api/blark.sphinxdomain.FunctionBlockDirective.rst", "api/blark.sphinxdomain.FunctionDirective.rst", "api/blark.sphinxdomain.GvlDirective.rst", "api/blark.sphinxdomain.MissingDeclaration.rst", "api/blark.sphinxdomain.ProgramDirective.rst", "api/blark.sphinxdomain.TypeDirective.rst", "api/blark.sphinxdomain.VariableBlockDirective.rst", "api/blark.sphinxdomain.declaration_to_content.rst", "api/blark.sphinxdomain.declaration_to_signature.rst", "api/blark.sphinxdomain.declarations_to_block.rst", "api/blark.sphinxdomain.setup.rst", "api/blark.summary.ActionSummary.rst", "api/blark.summary.CodeSummary.rst", "api/blark.summary.DataTypeSummary.rst", "api/blark.summary.DeclarationSummary.rst", "api/blark.summary.FunctionBlockSummary.rst", "api/blark.summary.FunctionSummary.rst", "api/blark.summary.GlobalVariableSummary.rst", "api/blark.summary.InterfaceSummary.rst", "api/blark.summary.LinkableItems.rst", "api/blark.summary.MethodSummary.rst", "api/blark.summary.ProgramSummary.rst", "api/blark.summary.PropertyGetSetSummary.rst", "api/blark.summary.PropertySummary.rst", "api/blark.summary.Summary.rst", "api/blark.summary.get_linkable_declarations.rst", "api/blark.summary.path_to_file_and_line.rst", "api/blark.summary.text_outline.rst", "api/blark.transform.AccessDeclaration.rst", "api/blark.transform.AccessDeclarations.rst", "api/blark.transform.AccessSpecifier.rst", "api/blark.transform.Action.rst", "api/blark.transform.ArrayInitialElement.rst", "api/blark.transform.ArrayInitialization.rst", "api/blark.transform.ArraySpecification.rst", "api/blark.transform.ArrayTypeDeclaration.rst", "api/blark.transform.ArrayTypeInitialization.rst", "api/blark.transform.ArrayVariableInitDeclaration.rst", "api/blark.transform.AssignmentStatement.rst", "api/blark.transform.BinaryBitString.rst", "api/blark.transform.BinaryInteger.rst", "api/blark.transform.BinaryOperation.rst", "api/blark.transform.BitString.rst", "api/blark.transform.Boolean.rst", "api/blark.transform.BracketedExpression.rst", "api/blark.transform.CaseElement.rst", "api/blark.transform.CaseStatement.rst", "api/blark.transform.ChainedFunctionCall.rst", "api/blark.transform.ChainedFunctionCallStatement.rst", "api/blark.transform.ContinueStatement.rst", "api/blark.transform.DataType.rst", "api/blark.transform.DataTypeDeclaration.rst", "api/blark.transform.Date.rst", "api/blark.transform.DateTime.rst", "api/blark.transform.DeclaredVariable.rst", "api/blark.transform.DirectVariable.rst", "api/blark.transform.Duration.rst", "api/blark.transform.EdgeDeclaration.rst", "api/blark.transform.ElseClause.rst", "api/blark.transform.ElseIfClause.rst", "api/blark.transform.EnumeratedSpecification.rst", "api/blark.transform.EnumeratedTypeDeclaration.rst", "api/blark.transform.EnumeratedTypeInitialization.rst", "api/blark.transform.EnumeratedValue.rst", "api/blark.transform.ExitStatement.rst", "api/blark.transform.Expression.rst", "api/blark.transform.ExtendedSourceCode.rst", "api/blark.transform.Extends.rst", "api/blark.transform.ExternalVariableDeclaration.rst", "api/blark.transform.ExternalVariableDeclarations.rst", "api/blark.transform.FieldSelector.rst", "api/blark.transform.ForStatement.rst", "api/blark.transform.FormatSettings.rst", "api/blark.transform.FullSubrange.rst", "api/blark.transform.Function.rst", "api/blark.transform.FunctionBlock.rst", "api/blark.transform.FunctionBlockDeclaration.rst", "api/blark.transform.FunctionBlockInvocationDeclaration.rst", "api/blark.transform.FunctionBlockNameDeclaration.rst", "api/blark.transform.FunctionCall.rst", "api/blark.transform.FunctionCallStatement.rst", "api/blark.transform.FunctionVariableDeclarations.rst", "api/blark.transform.GlobalVariableAttributes.rst", "api/blark.transform.GlobalVariableDeclaration.rst", "api/blark.transform.GlobalVariableDeclarations.rst", "api/blark.transform.GlobalVariableSpec.rst", "api/blark.transform.GrammarTransformer.rst", "api/blark.transform.HexBitString.rst", "api/blark.transform.HexInteger.rst", "api/blark.transform.IfStatement.rst", "api/blark.transform.Implements.rst", "api/blark.transform.IncompleteLocatedVariableDeclaration.rst", "api/blark.transform.IncompleteLocatedVariableDeclarations.rst", "api/blark.transform.IncompleteLocation.rst", "api/blark.transform.IndirectSimpleSpecification.rst", "api/blark.transform.IndirectionType.rst", "api/blark.transform.InitDeclaration.rst", "api/blark.transform.InitializedStructure.rst", "api/blark.transform.InputDeclarations.rst", "api/blark.transform.InputOutputDeclarations.rst", "api/blark.transform.InputParameterAssignment.rst", "api/blark.transform.Integer.rst", "api/blark.transform.Interface.rst", "api/blark.transform.JumpStatement.rst", "api/blark.transform.LabeledStatement.rst", "api/blark.transform.Ldate.rst", "api/blark.transform.LdateTime.rst", "api/blark.transform.Lduration.rst", "api/blark.transform.Literal.rst", "api/blark.transform.LocatedVariableDeclaration.rst", "api/blark.transform.LocatedVariableDeclarations.rst", "api/blark.transform.Location.rst", "api/blark.transform.LtimeOfDay.rst", "api/blark.transform.Meta.rst", "api/blark.transform.Method.rst", "api/blark.transform.MethodInstanceVariableDeclarations.rst", "api/blark.transform.MultiElementVariable.rst", "api/blark.transform.NoOpStatement.rst", "api/blark.transform.ObjectInitializerArray.rst", "api/blark.transform.OctalBitString.rst", "api/blark.transform.OctalInteger.rst", "api/blark.transform.OutputDeclarations.rst", "api/blark.transform.OutputParameterAssignment.rst", "api/blark.transform.ParameterAssignment.rst", "api/blark.transform.ParenthesizedExpression.rst", "api/blark.transform.PartialSubrange.rst", "api/blark.transform.Program.rst", "api/blark.transform.Property.rst", "api/blark.transform.Real.rst", "api/blark.transform.ReferenceAssignmentStatement.rst", "api/blark.transform.RepeatStatement.rst", "api/blark.transform.ResetStatement.rst", "api/blark.transform.ReturnStatement.rst", "api/blark.transform.SetStatement.rst", "api/blark.transform.SimpleSpecification.rst", "api/blark.transform.SimpleTypeDeclaration.rst", "api/blark.transform.SimpleVariable.rst", "api/blark.transform.SourceCode.rst", "api/blark.transform.Statement.rst", "api/blark.transform.StatementList.rst", "api/blark.transform.StaticDeclarations.rst", "api/blark.transform.String.rst", "api/blark.transform.StringSpecLength.rst", "api/blark.transform.StringTypeDeclaration.rst", "api/blark.transform.StringTypeInitialization.rst", "api/blark.transform.StringTypeSpecification.rst", "api/blark.transform.StringVariableInitDeclaration.rst", "api/blark.transform.StructureElementDeclaration.rst", "api/blark.transform.StructureElementInitialization.rst", "api/blark.transform.StructureInitialization.rst", "api/blark.transform.StructureTypeDeclaration.rst", "api/blark.transform.StructuredVariableInitDeclaration.rst", "api/blark.transform.Subrange.rst", "api/blark.transform.SubrangeSpecification.rst", "api/blark.transform.SubrangeTypeDeclaration.rst", "api/blark.transform.SubrangeTypeInitialization.rst", "api/blark.transform.SubscriptList.rst", "api/blark.transform.TemporaryVariableDeclarations.rst", "api/blark.transform.TimeOfDay.rst", "api/blark.transform.TypeInformation.rst", "api/blark.transform.TypeInitialization.rst", "api/blark.transform.TypeInitializationBase.rst", "api/blark.transform.TypeSpecificationBase.rst", "api/blark.transform.UnaryOperation.rst", "api/blark.transform.UnionElementDeclaration.rst", "api/blark.transform.UnionTypeDeclaration.rst", "api/blark.transform.UnresolvedTypeInformation.rst", "api/blark.transform.Variable.rst", "api/blark.transform.VariableAttributes.rst", "api/blark.transform.VariableDeclarationBlock.rst", "api/blark.transform.VariableDeclarations.rst", "api/blark.transform.VariableLocationPrefix.rst", "api/blark.transform.VariableOneInitDeclaration.rst", "api/blark.transform.VariableSizePrefix.rst", "api/blark.transform.WhileStatement.rst", "api/blark.transform._ArrayInitialElementCount.rst", "api/blark.transform._BareArrayInitialization.rst", "api/blark.transform._BracketedArrayInitialization.rst", "api/blark.transform._FlagHelper.rst", "api/blark.transform._GenericInit.rst", "api/blark.transform.configure_formatting.rst", "api/blark.transform.get_grammar_for_class.rst", "api/blark.transform.indent.rst", "api/blark.transform.indent_if.rst", "api/blark.transform.join_if.rst", "api/blark.transform.merge_comments.rst", "api/blark.transform.meta_field.rst", "api/blark.transform.multiline_code_block.rst", "api/blark.transform.transform.rst", "api/blark.typing.ContainsBlarkCode.rst", "api/blark.typing.SupportsRewrite.rst", "api/blark.typing.SupportsSaveToPath.rst", "api/blark.typing.SupportsWrite.rst", "api/blark.util.Identifier.rst", "api/blark.util.SourceType.rst", "api/blark.util.find_and_clean_comments.rst", "api/blark.util.find_pou_type_and_identifier.rst", "api/blark.util.fix_case_insensitive_path.rst", "api/blark.util.get_file_sha256.rst", "api/blark.util.get_grammar_for_rule.rst", "api/blark.util.get_grammar_source.rst", "api/blark.util.get_source_code.rst", "api/blark.util.indent_inner.rst", "api/blark.util.maybe_add_brackets.rst", "api/blark.util.python_debug_session.rst", "api/blark.util.rebuild_lark_tree_with_line_map.rst", "api/blark.util.recursively_remove_keys.rst", "api/blark.util.remove_all_comments.rst", "api/blark.util.remove_comment_characters.rst", "api/blark.util.simplify_brackets.rst", "api/blark.util.tree_to_xml_source.rst", "api/blark.util.try_paths.rst", "index.rst", "introduction.rst", "sphinx.rst"], "titles": ["API", "blark.apischema_compat.alternative_constructor", "blark.apischema_compat.as_tagged_union", "blark.apischema_compat.get_all_subclasses", "blark.apischema_compat.token_deserializer", "blark.apischema_compat.token_serializer", "blark.dependency_store.DependencyStore", "blark.dependency_store.DependencyStoreConfig", "blark.dependency_store.DependencyStoreLibrary", "blark.dependency_store.PlcProjectMetadata", "blark.dependency_store.get_dependency_store", "blark.dependency_store.load_projects", "blark.format.build_arg_parser", "blark.format.determine_output_filename", "blark.format.dump_source_to_console", "blark.format.get_reformatted_code_blocks", "blark.format.main", "blark.format.reformat_code", "blark.format.write_source_to_file", "blark.html.HighlighterAnnotation", "blark.html.HtmlWriter", "blark.html.apply_annotations_to_code", "blark.html.get_annotations", "blark.input.BlarkCompositeSourceItem", "blark.input.BlarkSourceItem", "blark.input.BlarkSourceLine", "blark.input.UnsupportedFileFormatError", "blark.input.load_file_by_name", "blark.input.register_input_handler", "blark.main.main", "blark.output.OutputBlock", "blark.output.get_handler_by_name", "blark.output.register_output_handler", "blark.parse.BlarkStartingRule", "blark.parse.ParseResult", "blark.parse.build_arg_parser", "blark.parse.dump_json", "blark.parse.get_parser", "blark.parse.main", "blark.parse.new_parser", "blark.parse.parse", "blark.parse.parse_item", "blark.parse.parse_project", "blark.parse.parse_single_file", "blark.parse.parse_source_code", "blark.parse.summarize", "blark.plain.PlainFileLoader", "blark.solution.DependencyInformation", "blark.solution.DependencyVersion", "blark.solution.LocatedString", "blark.solution.Project", "blark.solution.Solution", "blark.solution.SolutionLoaderError", "blark.solution.TcAction", "blark.solution.TcDUT", "blark.solution.TcDeclImpl", "blark.solution.TcExtraInfo", "blark.solution.TcGVL", "blark.solution.TcIO", "blark.solution.TcMethod", "blark.solution.TcPOU", "blark.solution.TcProperty", "blark.solution.TcSource", "blark.solution.TcSourceChild", "blark.solution.TcTTO", "blark.solution.TcUnknownXml", "blark.solution.TwincatPlcProject", "blark.solution.TwincatSourceCodeItem", "blark.solution.TwincatTsProject", "blark.solution.UnsupportedSourceFileError", "blark.solution.filename_from_xml", "blark.solution.get_blark_input_from_solution", "blark.solution.get_child_located_text", "blark.solution.get_child_text", "blark.solution.get_code_object_from_xml", "blark.solution.get_project_guid", "blark.solution.get_project_target_netid", "blark.solution.get_tcplc_from_xml", "blark.solution.make_solution_from_files", "blark.solution.parse_xml_contents", "blark.solution.parse_xml_file", "blark.solution.project_loader", "blark.solution.projects_from_solution_source", "blark.solution.solution_loader", "blark.solution.split_property_and_base_decl", "blark.solution.strip_implicit_lines", "blark.solution.strip_xml_namespace", "blark.solution.twincat_file_loader", "blark.solution.twincat_file_writer", "blark.sphinxdomain.BlarkDirective", "blark.sphinxdomain.BlarkDirectiveWithDeclarations", "blark.sphinxdomain.BlarkDomain", "blark.sphinxdomain.BlarkSphinxCache", "blark.sphinxdomain.BlarkXRefRole", "blark.sphinxdomain.DeclarationDirective", "blark.sphinxdomain.FunctionBlockDirective", "blark.sphinxdomain.FunctionDirective", "blark.sphinxdomain.GvlDirective", "blark.sphinxdomain.MissingDeclaration", "blark.sphinxdomain.ProgramDirective", "blark.sphinxdomain.TypeDirective", "blark.sphinxdomain.VariableBlockDirective", "blark.sphinxdomain.declaration_to_content", "blark.sphinxdomain.declaration_to_signature", "blark.sphinxdomain.declarations_to_block", "blark.sphinxdomain.setup", "blark.summary.ActionSummary", "blark.summary.CodeSummary", "blark.summary.DataTypeSummary", "blark.summary.DeclarationSummary", "blark.summary.FunctionBlockSummary", "blark.summary.FunctionSummary", "blark.summary.GlobalVariableSummary", "blark.summary.InterfaceSummary", "blark.summary.LinkableItems", "blark.summary.MethodSummary", "blark.summary.ProgramSummary", "blark.summary.PropertyGetSetSummary", "blark.summary.PropertySummary", "blark.summary.Summary", "blark.summary.get_linkable_declarations", "blark.summary.path_to_file_and_line", "blark.summary.text_outline", "blark.transform.AccessDeclaration", "blark.transform.AccessDeclarations", "blark.transform.AccessSpecifier", "blark.transform.Action", "blark.transform.ArrayInitialElement", "blark.transform.ArrayInitialization", "blark.transform.ArraySpecification", "blark.transform.ArrayTypeDeclaration", "blark.transform.ArrayTypeInitialization", "blark.transform.ArrayVariableInitDeclaration", "blark.transform.AssignmentStatement", "blark.transform.BinaryBitString", "blark.transform.BinaryInteger", "blark.transform.BinaryOperation", "blark.transform.BitString", "blark.transform.Boolean", "blark.transform.BracketedExpression", "blark.transform.CaseElement", "blark.transform.CaseStatement", "blark.transform.ChainedFunctionCall", "blark.transform.ChainedFunctionCallStatement", "blark.transform.ContinueStatement", "blark.transform.DataType", "blark.transform.DataTypeDeclaration", "blark.transform.Date", "blark.transform.DateTime", "blark.transform.DeclaredVariable", "blark.transform.DirectVariable", "blark.transform.Duration", "blark.transform.EdgeDeclaration", "blark.transform.ElseClause", "blark.transform.ElseIfClause", "blark.transform.EnumeratedSpecification", "blark.transform.EnumeratedTypeDeclaration", "blark.transform.EnumeratedTypeInitialization", "blark.transform.EnumeratedValue", "blark.transform.ExitStatement", "blark.transform.Expression", "blark.transform.ExtendedSourceCode", "blark.transform.Extends", "blark.transform.ExternalVariableDeclaration", "blark.transform.ExternalVariableDeclarations", "blark.transform.FieldSelector", "blark.transform.ForStatement", "blark.transform.FormatSettings", "blark.transform.FullSubrange", "blark.transform.Function", "blark.transform.FunctionBlock", "blark.transform.FunctionBlockDeclaration", "blark.transform.FunctionBlockInvocationDeclaration", "blark.transform.FunctionBlockNameDeclaration", "blark.transform.FunctionCall", "blark.transform.FunctionCallStatement", "blark.transform.FunctionVariableDeclarations", "blark.transform.GlobalVariableAttributes", "blark.transform.GlobalVariableDeclaration", "blark.transform.GlobalVariableDeclarations", "blark.transform.GlobalVariableSpec", "blark.transform.GrammarTransformer", "blark.transform.HexBitString", "blark.transform.HexInteger", "blark.transform.IfStatement", "blark.transform.Implements", "blark.transform.IncompleteLocatedVariableDeclaration", "blark.transform.IncompleteLocatedVariableDeclarations", "blark.transform.IncompleteLocation", "blark.transform.IndirectSimpleSpecification", "blark.transform.IndirectionType", "blark.transform.InitDeclaration", "blark.transform.InitializedStructure", "blark.transform.InputDeclarations", "blark.transform.InputOutputDeclarations", "blark.transform.InputParameterAssignment", "blark.transform.Integer", "blark.transform.Interface", "blark.transform.JumpStatement", "blark.transform.LabeledStatement", "blark.transform.Ldate", "blark.transform.LdateTime", "blark.transform.Lduration", "blark.transform.Literal", "blark.transform.LocatedVariableDeclaration", "blark.transform.LocatedVariableDeclarations", "blark.transform.Location", "blark.transform.LtimeOfDay", "blark.transform.Meta", "blark.transform.Method", "blark.transform.MethodInstanceVariableDeclarations", "blark.transform.MultiElementVariable", "blark.transform.NoOpStatement", "blark.transform.ObjectInitializerArray", "blark.transform.OctalBitString", "blark.transform.OctalInteger", "blark.transform.OutputDeclarations", "blark.transform.OutputParameterAssignment", "blark.transform.ParameterAssignment", "blark.transform.ParenthesizedExpression", "blark.transform.PartialSubrange", "blark.transform.Program", "blark.transform.Property", "blark.transform.Real", "blark.transform.ReferenceAssignmentStatement", "blark.transform.RepeatStatement", "blark.transform.ResetStatement", "blark.transform.ReturnStatement", "blark.transform.SetStatement", "blark.transform.SimpleSpecification", "blark.transform.SimpleTypeDeclaration", "blark.transform.SimpleVariable", "blark.transform.SourceCode", "blark.transform.Statement", "blark.transform.StatementList", "blark.transform.StaticDeclarations", "blark.transform.String", "blark.transform.StringSpecLength", "blark.transform.StringTypeDeclaration", "blark.transform.StringTypeInitialization", "blark.transform.StringTypeSpecification", "blark.transform.StringVariableInitDeclaration", "blark.transform.StructureElementDeclaration", "blark.transform.StructureElementInitialization", "blark.transform.StructureInitialization", "blark.transform.StructureTypeDeclaration", "blark.transform.StructuredVariableInitDeclaration", "blark.transform.Subrange", "blark.transform.SubrangeSpecification", "blark.transform.SubrangeTypeDeclaration", "blark.transform.SubrangeTypeInitialization", "blark.transform.SubscriptList", "blark.transform.TemporaryVariableDeclarations", "blark.transform.TimeOfDay", "blark.transform.TypeInformation", "blark.transform.TypeInitialization", "blark.transform.TypeInitializationBase", "blark.transform.TypeSpecificationBase", "blark.transform.UnaryOperation", "blark.transform.UnionElementDeclaration", "blark.transform.UnionTypeDeclaration", "blark.transform.UnresolvedTypeInformation", "blark.transform.Variable", "blark.transform.VariableAttributes", "blark.transform.VariableDeclarationBlock", "blark.transform.VariableDeclarations", "blark.transform.VariableLocationPrefix", "blark.transform.VariableOneInitDeclaration", "blark.transform.VariableSizePrefix", "blark.transform.WhileStatement", "blark.transform._ArrayInitialElementCount", "blark.transform._BareArrayInitialization", "blark.transform._BracketedArrayInitialization", "blark.transform._FlagHelper", "blark.transform._GenericInit", "blark.transform.configure_formatting", "blark.transform.get_grammar_for_class", "blark.transform.indent", "blark.transform.indent_if", "blark.transform.join_if", "blark.transform.merge_comments", "blark.transform.meta_field", "blark.transform.multiline_code_block", "blark.transform.transform", "blark.typing.ContainsBlarkCode", "blark.typing.SupportsRewrite", "blark.typing.SupportsSaveToPath", "blark.typing.SupportsWrite", "blark.util.Identifier", "blark.util.SourceType", "blark.util.find_and_clean_comments", "blark.util.find_pou_type_and_identifier", "blark.util.fix_case_insensitive_path", "blark.util.get_file_sha256", "blark.util.get_grammar_for_rule", "blark.util.get_grammar_source", "blark.util.get_source_code", "blark.util.indent_inner", "blark.util.maybe_add_brackets", "blark.util.python_debug_session", "blark.util.rebuild_lark_tree_with_line_map", "blark.util.recursively_remove_keys", "blark.util.remove_all_comments", "blark.util.remove_comment_characters", "blark.util.simplify_brackets", "blark.util.tree_to_xml_source", "blark.util.try_paths", "blark", "Introduction", "Sphinx API Docs"], "terms": {"func": [1, 111], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 308], "altern": [1, 307], "constructor": 1, "given": [1, 8, 9, 11, 14, 18, 22, 38, 40, 50, 71, 79, 80, 91, 93, 107, 122, 181, 276, 284, 296, 300, 303, 305, 308], "type": [1, 3, 24, 36, 67, 69, 74, 91, 92, 93, 100, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 123, 129, 130, 132, 137, 145, 146, 156, 160, 169, 170, 174, 178, 189, 191, 208, 209, 222, 229, 230, 238, 240, 242, 245, 248, 249, 250, 254, 255, 256, 257, 259, 260, 267, 276, 307, 308], "cl": [2, 3, 276], "tag": [2, 19, 20, 72, 73, 86, 160, 171, 203, 218, 233, 247, 262, 264], "union": [2, 23, 58, 71, 81, 83, 87, 160, 171, 203, 218, 233, 247, 259, 260, 261, 262, 264], "decor": 2, "us": [2, 14, 15, 18, 27, 44, 48, 89, 90, 91, 94, 101, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 162, 163, 164, 165, 166, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 258, 259, 260, 263, 265, 267, 268, 269, 270, 271, 272, 296, 308], "base": [2, 6, 7, 8, 9, 13, 19, 20, 23, 24, 25, 26, 27, 30, 33, 34, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 284, 285, 286, 287, 288, 289, 308], "class": [2, 6, 7, 8, 9, 19, 20, 23, 24, 25, 30, 33, 34, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 276, 284, 285, 286, 287, 288, 289, 308], "support": [2, 6, 56, 69, 199, 259, 296, 308], "gener": [2, 6, 9, 15, 24, 40, 41, 42, 46, 68, 82, 102, 104, 107, 122, 145, 208, 229, 289, 308], "well": [2, 308], "name": [2, 6, 8, 9, 19, 27, 31, 32, 34, 47, 48, 50, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 66, 68, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 101, 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 123, 124, 126, 129, 130, 137, 145, 149, 156, 158, 162, 163, 164, 169, 170, 171, 173, 174, 175, 178, 179, 186, 192, 193, 194, 195, 197, 204, 209, 211, 212, 213, 216, 217, 218, 221, 222, 229, 230, 231, 238, 240, 242, 243, 244, 245, 246, 248, 249, 255, 256, 257, 259, 260, 262, 288, 294, 308], "wai": [2, 50, 107, 292], "_get_generic_name_factori": 2, "iter": [3, 104, 120], "recurs": [3, 308], "implement": [3, 27, 55, 106, 110, 111, 115, 116, 117, 126, 161, 169, 170, 181, 197, 209, 221, 222, 233, 234, 288, 308], "__subclasses__": 3, "part": [4, 15, 20, 23, 46, 58, 60, 66, 68, 88, 153, 154, 165, 170, 174, 180, 184, 211, 245, 260, 288], "list": [4, 5, 6, 9, 11, 15, 20, 21, 22, 23, 24, 25, 27, 28, 31, 32, 34, 38, 39, 44, 45, 46, 47, 49, 51, 53, 54, 55, 57, 58, 59, 60, 61, 64, 65, 66, 68, 71, 81, 83, 87, 88, 89, 90, 91, 96, 101, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 124, 128, 129, 132, 133, 140, 141, 142, 143, 150, 152, 155, 161, 164, 169, 170, 172, 173, 174, 175, 176, 178, 179, 180, 181, 184, 185, 187, 189, 191, 193, 194, 197, 205, 206, 208, 209, 210, 211, 213, 216, 221, 222, 232, 234, 235, 241, 242, 244, 245, 246, 251, 252, 259, 260, 264, 265, 267, 280, 283, 284, 288, 290, 306, 308], "str": [4, 5, 6, 7, 8, 9, 11, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 32, 34, 36, 38, 39, 40, 42, 43, 44, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 72, 73, 75, 76, 78, 79, 80, 82, 84, 85, 86, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 101, 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119, 122, 124, 129, 147, 148, 151, 161, 164, 167, 174, 176, 178, 179, 181, 187, 190, 192, 193, 194, 200, 201, 202, 205, 207, 208, 210, 216, 232, 235, 240, 242, 248, 252, 253, 254, 256, 257, 259, 261, 264, 265, 266, 268, 274, 276, 277, 278, 279, 282, 283, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 301, 302, 303, 304, 305, 306], "token": [4, 5, 34, 123, 126, 129, 130, 134, 135, 136, 137, 138, 145, 147, 148, 149, 150, 151, 152, 155, 156, 158, 162, 163, 165, 169, 170, 172, 173, 174, 178, 180, 181, 182, 183, 185, 188, 190, 192, 196, 197, 198, 199, 200, 201, 202, 206, 207, 208, 209, 213, 214, 215, 217, 221, 222, 223, 224, 226, 228, 229, 230, 231, 236, 238, 239, 240, 241, 242, 243, 245, 248, 249, 253, 254, 256, 257, 258, 259, 260, 261, 273, 280, 283, 290, 294, 308], "root": [6, 8, 51, 66, 68, 82], "path": [6, 7, 8, 9, 11, 13, 15, 16, 18, 20, 23, 24, 25, 27, 28, 31, 32, 34, 38, 40, 42, 43, 44, 46, 49, 50, 51, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 70, 72, 78, 80, 81, 82, 83, 87, 88, 92, 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119, 121, 161, 181, 232, 283, 286, 292, 293, 296, 306], "object": [6, 7, 8, 9, 19, 20, 23, 24, 25, 30, 31, 32, 34, 36, 46, 47, 48, 49, 50, 51, 55, 56, 62, 65, 66, 67, 68, 90, 91, 92, 94, 96, 98, 101, 107, 114, 119, 122, 123, 126, 127, 128, 130, 145, 146, 149, 153, 154, 156, 158, 160, 162, 163, 165, 167, 169, 170, 171, 178, 180, 181, 185, 186, 190, 191, 197, 204, 208, 209, 213, 218, 221, 222, 230, 232, 233, 234, 237, 238, 242, 243, 244, 245, 247, 249, 251, 254, 256, 257, 259, 260, 264, 270, 271, 272, 273, 274, 288, 301], "A": [6, 19, 27, 50, 51, 65, 66, 67, 68, 89, 114, 123, 124, 126, 132, 136, 140, 141, 142, 143, 144, 145, 146, 149, 159, 163, 164, 166, 168, 169, 170, 174, 175, 178, 186, 189, 190, 192, 193, 194, 197, 199, 206, 209, 211, 212, 216, 217, 220, 221, 222, 224, 226, 227, 228, 229, 230, 231, 234, 238, 241, 244, 246, 248, 249, 250, 251, 255, 257, 258, 260, 267, 269, 273, 283, 288, 308], "storag": 6, "contain": [6, 9, 27, 50, 51, 68, 89, 91, 107, 126, 140, 141, 178, 208, 209, 222, 232], "depend": [6, 7, 9, 47, 48, 66, 212, 308], "configur": [6, 7, 92], "load": [6, 11, 27, 46, 50, 66, 67, 68, 69, 81, 83, 87, 88, 308], "environ": [6, 90, 91, 308], "variabl": [6, 107, 123, 124, 126, 132, 133, 140, 149, 150, 152, 163, 164, 165, 166, 169, 171, 172, 173, 178, 179, 180, 186, 187, 191, 193, 194, 197, 204, 205, 206, 209, 210, 211, 212, 216, 221, 222, 224, 226, 228, 231, 235, 241, 242, 246, 252, 259, 264, 265, 267, 308], "blark_twincat_root": 6, "i": [6, 9, 15, 27, 50, 67, 68, 90, 91, 94, 101, 107, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 163, 164, 165, 166, 168, 169, 170, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 258, 259, 260, 262, 263, 265, 266, 267, 269, 270, 271, 272, 288, 296, 308], "requir": [6, 89, 169, 170, 197, 221, 292, 307], "set": [6, 17, 23, 24, 61, 67, 90, 107, 142, 143, 190, 222, 228, 275, 288, 301, 308], "thi": [6, 9, 27, 50, 66, 68, 91, 93, 107, 108, 110, 113, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 162, 163, 164, 165, 166, 169, 170, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 258, 259, 260, 263, 265, 267, 269, 270, 271, 272, 298, 304, 308], "function": [6, 89, 91, 96, 107, 108, 109, 110, 111, 126, 142, 143, 161, 162, 170, 171, 172, 173, 174, 175, 185, 195, 209, 218, 222, 227, 232, 237, 244, 289, 308], "along": [6, 107], "config": [6, 7, 92, 307], "json": [6, 7, 36, 301, 308], "directori": [6, 308], "should": [6, 91, 94, 101, 308], "inform": [6, 36, 47, 56, 66, 67, 68, 90, 107, 122, 188, 208, 254, 280, 308], "librari": [6, 7, 308], "where": [6, 89, 107, 211, 308], "find": [6, 82, 107, 292], "them": [6, 94, 101, 302, 308], "lcl": 6, "version": [6, 8, 47, 48, 239, 240, 305, 308], "fals": [6, 15, 16, 18, 38, 93, 107, 108, 112, 128, 151, 181, 202, 217, 226], "twincat": [6, 27, 37, 39, 50, 51, 66, 67, 68, 78, 81, 83, 87, 189, 296, 308], "project": [6, 8, 9, 11, 38, 40, 42, 51, 56, 65, 66, 67, 68, 69, 75, 76, 81, 82, 307], "lclsgener": 6, "sln": [6, 51, 78, 82, 83, 308], "motion": 6, "true": [6, 9, 11, 15, 23, 24, 36, 38, 45, 89, 107, 173, 181, 190, 192, 208, 228, 244, 246, 305], "The": [6, 13, 14, 15, 18, 20, 27, 30, 36, 44, 47, 50, 66, 67, 68, 81, 82, 83, 88, 89, 91, 94, 101, 107, 122, 127, 129, 134, 137, 142, 147, 148, 149, 150, 151, 153, 154, 162, 174, 178, 182, 184, 185, 192, 200, 201, 202, 207, 211, 214, 237, 240, 242, 248, 253, 256, 257, 283, 288, 292, 294, 296, 298, 304, 307], "abov": [6, 15, 30], "would": [6, 107, 290], "indic": [6, 91, 185, 284, 288], "avail": [6, 299, 308], "rel": 6, "It": [6, 94, 101, 127, 308], "also": [6, 91, 139, 209, 222, 239, 240, 271, 272, 308], "could": 6, "found": [6, 91, 107, 292], "defin": [6, 66, 199, 237], "method": [6, 7, 8, 9, 19, 20, 23, 24, 25, 27, 30, 34, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 123, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 264, 265, 267, 269, 270, 271, 272, 273, 274, 284, 285, 286, 287, 288, 289, 308], "attribut": [6, 7, 8, 9, 19, 20, 23, 24, 25, 30, 33, 34, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, 267, 268, 269, 274, 288, 289, 308], "dependencystoreconfig": 6, "__init__": [6, 7, 8, 9, 19, 20, 23, 24, 25, 30, 34, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 92, 98, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 123, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 172, 173, 174, 176, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 189, 190, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 258, 259, 260, 261, 265, 267, 269, 271, 272, 274, 284, 285, 286, 287, 288], "properti": [6, 20, 23, 27, 34, 51, 60, 66, 68, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 129, 147, 148, 149, 151, 161, 170, 174, 178, 190, 192, 200, 201, 202, 207, 208, 232, 238, 240, 242, 248, 253, 256, 257, 259, 264, 288, 289], "config_filenam": 6, "filenam": [6, 7, 8, 9, 11, 13, 15, 16, 18, 23, 24, 25, 27, 34, 38, 44, 46, 49, 50, 51, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 72, 78, 81, 82, 83, 87, 88, 106, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119, 161, 181, 232, 283, 293], "load_config": 6, "store": [6, 7, 67, 308], "file": [6, 7, 13, 18, 27, 40, 42, 43, 50, 56, 58, 66, 67, 69, 80, 81, 82, 83, 87, 88, 121, 283, 292, 293, 296, 308], "get_depend": 6, "none": [6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 20, 23, 24, 25, 27, 30, 31, 32, 34, 35, 36, 38, 39, 40, 41, 42, 44, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 77, 82, 88, 89, 90, 91, 92, 93, 94, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122, 123, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 172, 173, 174, 175, 176, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 258, 259, 260, 261, 264, 265, 267, 269, 271, 272, 274, 277, 278, 279, 283, 285, 286, 288, 290, 291, 306, 308], "plcprojectmetadata": [6, 11], "get": [6, 7, 8, 9, 10, 13, 22, 37, 39, 45, 56, 61, 71, 75, 76, 78, 107, 120, 121, 122, 208, 222, 276, 288, 294, 296], "number": [6, 27, 89, 121, 150, 208, 300, 308], "plc": [6, 9, 66, 68, 188, 266], "twincatplcproject": [6, 9, 67, 68], "tupl": [6, 23, 24, 74, 84, 89, 90, 93, 94, 101, 121, 208, 290, 291], "dependencyvers": [6, 9, 47], "from": [6, 7, 9, 13, 40, 44, 45, 50, 56, 66, 67, 68, 71, 75, 76, 78, 82, 86, 107, 126, 170, 208, 212, 227, 254, 283, 290, 296, 301, 308], "static": [6, 20, 46, 62, 92, 107, 119, 124, 129, 133, 136, 140, 142, 143, 146, 148, 150, 151, 155, 164, 165, 169, 170, 174, 175, 176, 179, 180, 184, 185, 187, 188, 189, 190, 193, 194, 195, 196, 197, 201, 202, 205, 206, 208, 209, 210, 211, 213, 216, 217, 222, 223, 231, 232, 234, 235, 239, 241, 243, 244, 245, 251, 252, 258, 260, 265, 270, 271, 272, 308], "get_inst": 6, "global": [6, 10, 44, 50, 66, 67, 68, 107, 126, 178, 179, 180], "instanc": [6, 9, 10, 44, 45, 68, 78, 91, 92, 107, 208, 210, 273, 308], "dict": [7, 9, 21, 23, 24, 30, 34, 38, 44, 47, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 68, 72, 73, 89, 91, 92, 98, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, 119, 161, 181, 232, 276, 283, 290, 299, 300], "dependencystorelibrari": 7, "classmethod": [7, 9, 24, 25, 46, 47, 48, 50, 51, 55, 56, 58, 60, 62, 63, 66, 67, 68, 106, 108, 109, 110, 111, 112, 113, 115, 116, 118, 137, 254, 273, 288], "from_dict": 7, "as_json": 7, "save": [7, 20, 46], "bool": [8, 9, 11, 15, 16, 18, 19, 23, 24, 36, 38, 45, 67, 89, 93, 107, 108, 110, 112, 113, 128, 149, 151, 152, 165, 170, 174, 175, 190, 202, 208, 211, 217, 222, 231, 251, 305, 308], "get_latest_version_path": 8, "latest": 8, "return": [8, 13, 15, 20, 27, 36, 50, 66, 68, 71, 75, 76, 78, 81, 83, 87, 88, 91, 93, 94, 101, 107, 122, 142, 174, 181, 208, 209, 222, 227, 283, 290, 292, 296, 305], "pathlib": [8, 13, 15, 18, 20, 23, 25, 27, 34, 44, 46, 49, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 68, 81, 82, 83, 87, 88, 92, 108, 109, 110, 111, 112, 113, 115, 116, 117, 283, 292, 296], "get_project_filenam": 8, "full": [8, 50, 107, 126, 129, 130, 168, 169, 170, 174, 178, 197, 209, 221, 240, 242, 245, 247, 248, 256, 257, 260], "include_depend": [9, 11], "code": [9, 13, 14, 15, 17, 18, 19, 20, 21, 24, 25, 30, 37, 38, 39, 40, 43, 44, 45, 46, 48, 66, 67, 69, 84, 85, 88, 107, 161, 208, 232, 275, 282, 283, 288, 291, 296, 308], "parseresult": [9, 15, 30, 38, 40, 41, 42, 43, 44, 45, 107], "summari": [9, 45, 92, 174, 307, 308], "codesummari": [9, 45, 92], "loaded_fil": 9, "per": [9, 211], "metadata": [9, 30, 50, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 134, 137, 150, 182, 208, 214], "from_plcproject": 9, "creat": [9, 50, 90, 93, 94, 101, 281, 308], "from_project_filenam": 9, "plc_whitelist": [9, 11], "solut": [9, 15, 307, 308], "all": [9, 40, 67, 68, 71, 88, 120, 160, 187, 203, 205, 233, 259, 302], "dependencystor": 10, "argpars": [12, 35], "input_filenam": 13, "write_to": [13, 16], "an": [13, 15, 27, 33, 42, 66, 107, 113, 125, 126, 127, 129, 130, 133, 139, 145, 152, 153, 154, 155, 156, 158, 169, 170, 177, 184, 195, 197, 209, 212, 219, 221, 222, 225, 229, 241, 243, 257, 263, 266, 270, 289, 299, 308], "output": [13, 14, 36, 44, 88, 109, 114, 174, 188, 194, 216, 217, 218, 266, 307], "input": [13, 71, 89, 109, 114, 188, 193, 194, 195, 218, 266, 307], "destin": 13, "paramet": [13, 14, 15, 18, 27, 36, 39, 44, 50, 66, 68, 71, 75, 76, 81, 82, 83, 87, 88, 107, 122, 174, 175, 189, 195, 217, 218, 283, 292, 294, 296, 298, 304], "come": [13, 180, 243, 308], "option": [13, 15, 20, 23, 24, 25, 27, 30, 34, 44, 46, 47, 49, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 88, 89, 90, 94, 95, 96, 97, 99, 100, 101, 107, 117, 131, 132, 135, 137, 149, 166, 169, 170, 176, 178, 183, 215, 221, 283, 296, 298, 304], "write": [13, 15, 18, 30, 88, 305], "byte": [14, 18, 31, 32, 62, 67, 79, 82, 88, 239, 241, 260, 268, 287, 305], "encod": [14, 18, 34, 82, 296, 305], "utf": [14, 18, 34, 82, 296, 305], "8": [14, 18, 33, 34, 82, 125, 137, 177, 214, 215, 263, 289, 296, 305], "consol": 14, "string": [14, 36, 89, 122, 129, 134, 137, 139, 140, 178, 182, 214, 229, 237, 238, 239, 240, 241, 242, 243, 245, 255, 257, 259, 298, 304], "result": [15, 122, 181, 290, 308], "user": [15, 20, 23, 24, 46, 88, 199, 308], "ani": [15, 20, 23, 24, 30, 46, 55, 56, 69, 89, 91, 107, 119, 122, 174, 181, 190, 254, 261, 264, 277, 278, 279, 280, 299, 301, 308], "raise_on_error": 15, "outputblock": [15, 20, 31, 32, 46, 88], "For": [15, 107, 109, 290, 308], "each": [15, 27], "pars": [15, 22, 79, 80, 90, 93, 94, 101, 189, 283, 307, 308], "block": [15, 20, 30, 65, 88, 107, 108, 109, 110, 112, 124, 126, 140, 141, 142, 153, 154, 162, 163, 164, 169, 170, 171, 172, 173, 174, 175, 179, 184, 185, 186, 187, 193, 194, 197, 204, 205, 208, 209, 210, 216, 221, 222, 227, 235, 244, 252, 260, 264, 265, 282], "disk": [15, 68], "loader": [15, 27, 50, 52], "mai": [15, 27, 67, 89, 126, 127, 131, 132, 136, 140, 141, 142, 145, 146, 150, 157, 164, 171, 174, 179, 187, 193, 194, 195, 205, 209, 210, 212, 216, 217, 218, 222, 231, 232, 235, 243, 244, 247, 252, 262, 265, 308], "plain": [15, 27, 283, 296, 307, 308], "plainfileload": 15, "tcpou": [15, 27, 62, 67, 88, 308], "exampl": [15, 27, 107, 109, 123, 126, 128, 129, 130, 131, 132, 133, 136, 139, 142, 143, 149, 150, 152, 155, 156, 157, 158, 162, 165, 166, 168, 169, 170, 172, 173, 174, 175, 178, 180, 185, 189, 192, 195, 197, 198, 199, 209, 211, 212, 213, 217, 219, 220, 221, 222, 224, 226, 228, 230, 231, 237, 238, 239, 240, 241, 242, 245, 246, 248, 249, 250, 251, 255, 259, 260, 267, 288], "associ": [15, 20, 44, 208, 264, 276, 283, 296], "In": [15, 107, 308], "event": [15, 90, 91, 94, 101], "reformat": [15, 17, 308], "error": 15, "rais": [15, 18, 91, 94, 101, 284, 287, 292, 296], "immedi": 15, "If": [15, 91, 94, 101, 107, 109, 190, 208, 296, 308], "origin": [15, 30, 308], "todo": [15, 66, 211, 248, 257], "descript": [15, 66, 90, 91, 94, 101], "verbos": [16, 38, 44], "int": [16, 19, 21, 22, 23, 24, 25, 34, 36, 38, 44, 49, 89, 121, 127, 130, 134, 135, 137, 155, 156, 157, 158, 161, 169, 170, 178, 181, 182, 183, 190, 196, 208, 209, 214, 215, 221, 222, 230, 232, 242, 245, 248, 249, 250, 257, 259, 260, 267, 283, 290, 300, 308], "0": [16, 38, 44, 49, 89, 129, 136, 166, 169, 173, 178, 192, 223, 244, 246, 260, 267, 305, 308], "debug": [16, 38, 299], "interact": [16, 38, 299, 308], "indent": [16, 36, 122, 167, 278, 297, 305], "overwrit": [16, 18], "input_format": [16, 27, 38, 40], "output_format": 16, "sourcecod": [17, 34, 161, 181, 283, 308], "provid": [17, 85, 294, 301, 302, 308], "when": [18, 284, 287, 292, 296], "exist": 18, "otherwis": [18, 94, 101, 189, 279], "valueerror": [18, 94, 101, 296], "termin": 19, "is_open_tag": 19, "other_tag_po": 19, "singl": [19, 43, 66, 87, 94, 101, 106, 107, 108, 109, 110, 111, 115, 116, 118, 123, 140, 149, 231, 239, 241, 242, 258, 259, 262], "annot": [19, 20, 21, 22, 89, 164, 179, 181, 187, 193, 194, 205, 210, 216, 235, 252, 265, 280], "which": [19, 27, 50, 66, 67, 91, 181, 198, 217, 222, 226, 228, 273, 308], "appli": [19, 44, 180], "posit": [19, 174, 195, 208, 218, 244], "rang": [19, 247], "as_str": 19, "span": 19, "source_filenam": [20, 46, 88], "source_cod": [20, 34, 44, 91, 98, 106, 108, 110, 111, 112, 113, 115, 116, 117, 118, 181, 283], "to_html": 20, "convert": 20, "highlighterannot": [21, 22], "tree": [22, 34, 140, 151, 176, 180, 181, 189, 194, 202, 210, 216, 235, 252, 265, 280, 283, 300, 305, 308], "defaultdict": 22, "syntax": 22, "element": [22, 47, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 79, 80, 91, 93, 127, 128, 140, 165, 211, 220, 231, 242, 243, 244, 259, 262, 270, 271, 272, 305], "identifi": [23, 24, 34, 46, 50, 53, 54, 55, 57, 59, 60, 61, 62, 66, 67, 68, 94, 101, 145, 160, 171, 197, 203, 218, 229, 231, 233, 247, 262, 264, 285, 294, 308], "blarksourceitem": [23, 27, 28, 34, 41, 44, 46, 53, 55, 58, 59, 60, 61, 64, 65, 71, 81, 83, 87, 284], "line": [23, 24, 56, 89, 121, 122, 208, 283, 297, 300], "blarksourcelin": [23, 24, 49], "get_code_and_line_map": [23, 24], "include_end": [23, 24], "blark_lineno": [23, 24], "1": [23, 24, 25, 33, 46, 69, 89, 125, 128, 129, 130, 131, 132, 136, 142, 143, 144, 149, 150, 152, 155, 156, 157, 158, 159, 172, 174, 175, 177, 178, 180, 188, 189, 190, 199, 205, 206, 209, 211, 219, 220, 221, 222, 227, 230, 237, 242, 244, 245, 248, 249, 250, 251, 257, 259, 260, 262, 263, 267, 268, 289, 305, 308], "get_filenam": [23, 24], "sourcetyp": [24, 46, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 85, 291], "grammar_rul": 24, "implicit_end": 24, "from_cod": [24, 25], "source_typ": [24, 46, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 85], "first_lineno": [24, 25], "self": [24, 25, 47, 48, 50, 51, 55, 56, 63, 66, 67, 68, 254, 288], "lineno": [25, 49, 89, 90, 94, 95, 96, 97, 99, 100, 101], "except": [26, 34, 52, 69], "blarkcompositesourceitem": [27, 28, 34, 41, 46, 53, 54, 57, 58, 59, 60, 61, 64, 71, 81, 83, 87, 284], "": [27, 107, 178, 228, 276, 293, 308], "handler": [27, 28, 32, 88, 270, 271, 272], "specifi": [27, 146, 231, 257, 296], "auto": 27, "detect": 27, "insuffici": 27, "either": [27, 136, 171, 218, 244], "e": [27, 85, 126, 131, 132, 134, 136, 137, 145, 150, 157, 161, 168, 170, 182, 187, 205, 206, 214, 223, 244, 262, 268, 308], "g": [27, 85, 131, 132, 134, 137, 145, 150, 182, 187, 205, 206, 214, 262, 268, 308], "equival": [27, 237], "extens": [27, 28, 87], "item": [27, 34, 41, 44, 67, 69, 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, 121, 122, 124, 161, 164, 176, 179, 187, 193, 194, 205, 210, 216, 232, 235, 252, 264, 265, 284, 300, 308], "were": 27, "singular": 27, "composit": 27, "beckhoff": 27, "declar": [27, 55, 91, 98, 101, 104, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 120, 123, 124, 126, 130, 132, 146, 149, 152, 156, 163, 164, 169, 170, 171, 172, 173, 178, 179, 186, 187, 191, 193, 194, 197, 204, 205, 209, 210, 216, 221, 222, 230, 235, 238, 241, 242, 244, 245, 246, 249, 252, 259, 260, 264, 265, 267, 288, 308], "action": [27, 33, 91, 106, 110, 116, 142, 161, 170, 174, 175, 181, 212, 232, 288, 289, 308], "own": [27, 308], "grammar": [27, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 162, 163, 164, 165, 166, 169, 170, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 258, 259, 260, 263, 265, 267, 269, 270, 271, 272, 276, 294, 307], "rule": [27, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 162, 163, 164, 165, 166, 169, 170, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 258, 259, 260, 263, 265, 267, 269, 270, 271, 272, 294, 308], "callabl": [28, 31, 32, 44, 89, 91], "factori": [30, 58, 60, 92, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117, 208], "modifi": [30, 308], "add": [30, 107, 298], "valu": [33, 49, 91, 94, 101, 109, 125, 127, 131, 132, 134, 135, 137, 138, 140, 142, 147, 148, 151, 155, 157, 158, 166, 174, 177, 182, 183, 188, 190, 192, 195, 196, 200, 201, 202, 203, 207, 214, 215, 217, 223, 227, 236, 238, 239, 241, 242, 243, 244, 250, 251, 253, 255, 259, 263, 266, 267, 268, 270, 274, 277, 278, 288, 289, 290], "enum": [33, 188, 266, 268, 273, 289], "enumer": [33, 125, 127, 140, 155, 156, 157, 158, 177, 243, 257, 263, 266, 267, 289], "iec_sourc": [33, 181, 232, 308], "2": [33, 36, 69, 125, 126, 128, 129, 130, 131, 132, 134, 135, 137, 142, 143, 150, 156, 166, 172, 174, 175, 177, 178, 189, 190, 209, 220, 222, 230, 240, 242, 244, 245, 248, 249, 250, 251, 257, 259, 260, 263, 267, 289, 298, 304, 308], "data_type_declar": [33, 146, 181, 308], "3": [33, 37, 39, 91, 127, 128, 130, 172, 178, 199, 242, 244, 245, 251, 289, 308], "function_block_method_declar": [33, 181, 209, 308], "4": [33, 125, 130, 177, 189, 242, 245, 263, 289, 308], "function_block_property_declar": [33, 181, 222, 308], "5": [33, 58, 127, 129, 133, 166, 222, 226, 228, 230, 238, 242, 245, 289, 308], "function_block_type_declar": [33, 170, 181, 308], "6": [33, 133, 289], "function_declar": [33, 169, 181, 308], "7": [33, 289], "global_var_declar": [33, 179, 181, 308], "interface_declar": [33, 181, 197], "9": [33, 223, 289], "program_declar": [33, 181, 221, 308], "10": [33, 127, 129, 134, 137, 166, 178, 182, 196, 214, 240, 242, 245, 259, 289, 308], "statement_list": [33, 153, 154, 166, 181, 184, 225, 234, 269, 289, 308], "11": [33, 54, 289], "processed_source_cod": 34, "comment": [34, 106, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119, 181, 208, 280, 283, 290, 302, 303], "lark": [34, 37, 39, 44, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 162, 163, 164, 165, 166, 169, 170, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 258, 259, 260, 261, 263, 265, 267, 269, 270, 271, 272, 276, 283, 294, 300, 308], "line_map": [34, 44, 161, 181, 232, 283, 290], "parent": [34, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 109], "transform": [34, 90, 94, 101, 108, 110, 111, 112, 113, 115, 116, 117, 307, 308], "tf": [34, 109, 117], "dump_sourc": 34, "fp": 34, "_io": 34, "textiowrapp": 34, "stdout": 34, "mode": 34, "w": [34, 268], "type_": [36, 189], "t": [36, 123, 126, 127, 130, 131, 132, 139, 141, 144, 145, 147, 149, 151, 152, 153, 154, 156, 157, 158, 159, 162, 163, 166, 172, 173, 178, 186, 192, 198, 199, 200, 204, 207, 212, 219, 220, 221, 224, 225, 226, 227, 228, 229, 230, 236, 237, 238, 240, 242, 246, 248, 249, 250, 253, 255, 259, 267, 269, 292, 308], "obj": [36, 90, 94, 95, 96, 97, 99, 100, 102, 103, 301], "include_meta": [36, 38], "dump": [36, 308], "apischema": 36, "serial": [36, 160, 171, 203, 218, 233, 247, 262, 264], "includ": [36, 107, 109, 122, 140, 146, 160, 161, 174, 220, 262, 288, 308], "meta": [36, 106, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119, 123, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 163, 164, 165, 166, 168, 169, 170, 172, 173, 174, 175, 176, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 258, 259, 260, 264, 265, 267, 269, 280, 281], "make": [36, 181, 211, 234, 237, 308], "prettier": 36, "cach": [37, 92], "parser": [37, 39, 44, 68, 308], "flavor": [37, 39, 298, 304], "iec61131": [37, 39, 91], "output_summari": 38, "use_json": 38, "print_filenam": 38, "print_sourc": 38, "print_tre": 38, "filter_by_nam": 38, "start": [39, 166, 208, 220, 232, 308], "kwarg": [39, 40, 41, 42, 43, 284, 285, 286, 287], "new": [39, 91, 93, 107, 308], "see": [39, 139, 164, 179, 187, 193, 194, 205, 210, 216, 235, 252, 265, 271, 272, 308], "larkopt": 39, "tsproj_project": 42, "entir": [42, 89, 308], "tsproj": [42, 50, 66, 68, 78, 81, 308], "fn": [43, 44, 80, 181, 296], "unknown": [44, 109], "preprocessor": 44, "sequenc": 44, "starting_rul": 44, "text": [44, 48, 69, 89, 93, 233, 234, 290, 296, 297, 298, 302, 303, 304, 308], "level": [44, 161, 232], "deprec": 44, "default": [44, 47, 73, 131, 132, 141, 172, 243, 244, 259, 275, 296, 298, 304], "share": 44, "one": [44, 45, 107, 108, 109, 110, 113, 132, 140, 141, 152, 178, 180, 185, 191, 195, 211, 212, 213, 241, 244, 246, 267], "get_pars": [44, 308], "squash": [45, 107, 108, 110, 113], "more": [45, 91, 132, 140, 141, 152, 160, 178, 185, 191, 211, 232, 241, 244, 246, 267], "raw_sourc": [46, 161, 232], "formatted_cod": 46, "rewrite_cod": [46, 53, 54, 55, 57, 59, 60, 61, 62, 285], "save_to": [46, 67, 286], "to_file_cont": [46, 62, 67, 287], "resolut": [47, 91], "resolv": [47, 91], "from_xml": [47, 55, 56, 62, 63, 68], "refer": [47, 91, 93, 126, 189, 190, 212, 224, 230, 243, 257], "xmln": 47, "vendor": 48, "namespac": [48, 72, 73, 86, 107, 126, 299, 308], "author": 48, "from_str": [48, 288], "column": [49, 208], "to_lin": 49, "saved_path": [50, 67], "purepath": [50, 67], "local_path": [50, 67], "guid": [50, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 75], "solution_guid": 50, "twincattsproject": 50, "stub": 50, "onli": [50, 94, 101, 180, 296, 303, 308], "about": [50, 68, 90], "allow": [50, 197, 227, 259], "accord": [50, 67], "r": [50, 62, 67, 226, 305], "like": [50, 67, 141, 290, 308], "window": [50, 67, 292], "format": [50, 67, 122, 275, 296, 307, 308], "case": [50, 67, 140, 141, 292, 307], "insensit": [50, 67, 292], "correspond": [50, 66, 67, 140, 141], "local": [50, 67, 126], "uniqu": [50, 66, 67, 68, 91, 160, 171, 203, 218, 233, 247, 262, 264, 288], "from_filenam": [50, 51, 62, 66, 68], "anypath": 50, "visual": 51, "studio": 51, "file_extens": [51, 54, 57, 58, 60, 64, 66, 68], "classvar": [51, 54, 57, 58, 60, 62, 64, 66, 68, 89, 91, 95, 96, 97, 99, 100, 124, 134, 135, 137, 164, 176, 179, 182, 183, 187, 193, 194, 196, 205, 210, 214, 215, 216, 235, 252, 264, 265], "projects_by_nam": 51, "from_project": 51, "from_cont": [51, 62], "solution_sourc": [51, 82], "relat": [52, 208, 307], "decl": [53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 112, 197, 260], "tcdeclimpl": [53, 54, 57, 58, 59, 60, 61, 62, 63, 64], "tcsourc": [53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 74], "xml": [53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 79, 80, 296, 305], "dataclass": [53, 54, 57, 58, 59, 60, 61, 62, 63, 122, 208, 281, 283, 308], "initvar": [53, 54, 57, 58, 59, 60, 61, 62, 63], "lxml": [53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 66, 68, 75, 76, 79, 80, 308], "etre": [53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 66, 68, 75, 76, 79, 80], "tcsourcechild": [53, 59, 61], "content": [53, 54, 55, 57, 59, 60, 61, 62, 66, 67, 79, 82, 88, 89, 90, 91, 94, 95, 96, 97, 99, 100, 101, 285, 293, 303, 305], "to_blark": [53, 54, 55, 57, 58, 59, 60, 61, 64, 65, 284], "twincatsourcecodeitem": [54, 57, 58, 60, 62, 64, 66], "default_source_typ": [54, 55, 57, 58, 62], "locatedstr": [55, 72], "declaration_to_blark": 55, "implementation_to_blark": 55, "default_identifi": 55, "extra": 56, "id": [56, 68, 76, 308], "doe": [56, 69, 107, 212, 296], "dig": 56, "deeper": 56, "13": [57, 289], "tcmethod": [58, 60], "tcproperti": [58, 60], "tcunknownxml": [58, 60], "interfac": [58, 107, 113, 162, 185, 289], "definit": [58, 276], "create_source_child_from_xml": [58, 60], "child": [58, 60], "tcaction": [58, 60], "tcextrainfo": [58, 60], "poupart": 60, "parts_by_nam": 60, "get_child_by_identifi": 60, "delimit": [62, 67, 279, 305], "n": [62, 67, 305, 308], "to_xml": 62, "tcdut": [62, 67, 88], "tctto": [62, 67, 88], "tcio": [62, 67, 88], "tcgvl": [62, 67, 88, 308], "current": [65, 90, 308], "unsupport": [65, 69], "xti_path": 66, "plcproj_path": 66, "dependencyinform": 66, "typic": [66, 68], "plcproj": [66, 68], "xti": 66, "build": [66, 90], "etc": [66, 107, 142, 160, 162, 174, 175], "can": [66, 90, 91, 93, 94, 101, 180, 257, 284, 292, 308], "extract": 66, "from_standalone_xml": 66, "tsproj_or_xti_xml": 66, "plcproj_xml": 66, "standalon": [66, 161], "its": [66, 68, 75, 76, 87, 107], "from_xti_filenam": 66, "xti_filenam": 66, "from_project_xml": 66, "itself": [66, 67, 127, 150, 170, 174, 308], "procedur": 66, "happen": 66, "follow": [66, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 162, 163, 164, 165, 166, 169, 170, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 258, 259, 260, 263, 265, 267, 269, 270, 271, 272, 308], "order": 66, "subtyp": 67, "link_alwai": 67, "raw_cont": 67, "wrapper": 67, "here": [67, 292, 308], "alongsid": 67, "ar": [67, 90, 94, 101, 107, 126, 145, 170, 187, 189, 205, 229, 239, 240, 259, 292, 298, 308], "hold": 67, "raw": 67, "link": 67, "alwai": 67, "specif": [67, 91, 129, 131, 139, 155, 157, 178, 180, 189, 229, 239, 240, 248, 254, 255, 257, 308], "applic": [67, 242], "from_compile_xml": 67, "netid": 68, "instanti": 68, "after": [68, 89, 90, 93, 94, 101], "target": [68, 75, 76, 91, 93], "am": [68, 76], "net": [68, 76], "plcs_by_nam": 68, "dictionari": [68, 89], "msg": 69, "solutionloadererror": 69, "compil": [69, 308], "globaltextlist": 69, "other": [69, 107, 146, 212, 245, 308], "non": [69, 145], "structur": [69, 127, 162, 192, 233, 234, 242, 243, 244, 245, 246, 259, 308], "look": 82, "strip": [85, 86], "off": [85, 86], "end_function_block": [85, 170], "tchandler": 88, "associati": 88, "argument": [89, 90, 94, 95, 96, 97, 99, 100, 101], "content_offset": [89, 90, 94, 95, 96, 97, 99, 100, 101], "block_text": [89, 90, 94, 95, 96, 97, 99, 100, 101], "state": [89, 90, 94, 95, 96, 97, 99, 100, 101, 170, 308], "state_machin": [89, 90, 94, 95, 96, 97, 99, 100, 101], "objectdescript": 89, "role": [89, 91], "actual": 89, "document": [89, 91, 308], "rawtext": 89, "interpret": 89, "begin": [89, 269, 282], "direct": [89, 90, 91, 123, 149, 150, 206, 262], "custom": 89, "domain": [89, 91, 308], "objtyp": [89, 91], "indexnod": 89, "index": [89, 91, 220, 307], "has_cont": 89, "have": [89, 127, 170, 180, 187, 308], "required_argu": 89, "optional_argu": 89, "final_argument_whitespac": 89, "final": [89, 125, 181, 208, 288], "whitespac": 89, "doc_field_typ": [89, 90, 96], "field": [89, 90, 94, 96, 101, 122, 165, 211, 281], "option_spec": 89, "unchang": [89, 94, 101], "canon": 89, "noblock": 89, "flag": [89, 273], "noindex": 89, "noindexentri": 89, "nolink": 89, "nosourc": 89, "map": [89, 283], "valid": [89, 145, 229, 274, 288, 296], "blarkdirect": [90, 91, 94, 101], "functionsummari": [90, 92, 96, 107], "functionblocksummari": [90, 92, 95, 107], "missingdeclar": 90, "sphinx": [90, 91, 92, 96, 105, 307, 308], "util": [90, 96, 307, 308], "docfield": [90, 96], "groupedfield": [90, 96], "handle_signatur": [90, 94, 101], "sig": [90, 94, 101], "signod": [90, 94, 101, 103], "desc_signatur": [90, 94, 101, 103], "signatur": [90, 94, 101], "rst": 90, "node": [90, 91, 93, 94, 101], "before_cont": 90, "call": [90, 93, 94, 101, 129, 130, 131, 132, 142, 143, 174, 175, 192, 195, 218, 284, 287], "befor": [90, 94, 101, 180], "context": [90, 121, 212, 254, 261], "transform_cont": [90, 94, 101], "contentnod": [90, 94, 101], "desc_cont": [90, 94, 101], "through": [90, 94, 101, 190], "nest": [90, 94, 101, 136, 169, 197, 221, 243, 290], "emit": [90, 91, 94, 101, 284], "info": [90, 94, 101], "manipul": [90, 94, 101], "get_signature_prefix": 90, "env": [91, 93, 103, 104, 308], "buildenviron": [91, 103, 104], "languag": [91, 308], "bk": 91, "short": 91, "label": [91, 198, 199], "longer": 91, "messag": [91, 299], "object_typ": 91, "function_block": [91, 95, 107, 110, 170, 289], "gvl": [91, 97, 251], "modul": [91, 307], "program": [91, 99, 107, 116, 123, 124, 161, 232, 289, 308], "variable_block": 91, "usual": 91, "declarationdirect": 91, "functiondirect": 91, "functionblockdirect": 91, "gvldirect": 91, "programdirect": 91, "typedirect": 91, "variableblockdirect": 91, "blarkxrefrol": 91, "fb": [91, 110], "mod": 91, "initial_data": 91, "data": [91, 107, 108, 145, 146, 181, 308], "fresh": 91, "subclass": 91, "find_obj": 91, "rolenam": 91, "targetstr": 91, "resolve_xref": 91, "fromdocnam": 91, "builder": 91, "typ": 91, "addnod": 91, "pending_xref": 91, "contnod": 91, "replac": [91, 290, 302], "xref": 91, "markup": 91, "cross": 91, "miss": [91, 107], "yield": 91, "nouri": 91, "suppress": 91, "being": [91, 181], "clear_doc": 91, "docnam": 91, "remov": [91, 301, 302, 304], "trace": 91, "inventori": 91, "find_by_nam": 92, "datatypesummari": [92, 100, 107], "programsummari": [92, 99, 107], "interfacesummari": [92, 107], "globalvariablesummari": [92, 97, 107], "declarationsummari": [92, 94, 101, 102, 103, 104, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117, 120], "methodsummari": [92, 107, 110, 113, 116], "propertysummari": [92, 107, 110, 113, 116], "actionsummari": [92, 107, 110, 116], "propertygetsetsummari": [92, 107, 118], "app": [92, 105], "fix_paren": 93, "lowercas": 93, "nodeclass": 93, "innernodeclass": 93, "textel": 93, "warn_dangl": 93, "xrefrol": 93, "process_link": 93, "refnod": 93, "has_explicit_titl": 93, "titl": 93, "alter": 93, "must": [93, 308], "same": 93, "block_head": [94, 101, 109, 124, 164, 176, 179, 187, 193, 194, 205, 210, 216, 235, 252, 264, 265], "individu": [94, 101], "append": [94, 101, 107], "abort": [94, 101], "whole": [94, 101, 243], "put": [94, 101, 122], "desc_nam": [94, 101], "pass": [94, 101], "add_target_and_index": [94, 101], "skip": [94, 101], "duplic": [94, 101], "blarkdirectivewithdeclar": [95, 96, 97, 99, 100], "signature_prefix": [95, 96, 97, 99, 100], "declarations_by_block": [98, 108, 110, 111, 112, 113, 115, 116], "parent_nam": 101, "paragraph": 102, "desc": 104, "pragma": [106, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119, 181, 208, 264], "statementlist": [106, 110, 111, 115, 116, 117, 126, 140, 153, 154, 161, 166, 169, 170, 184, 209, 221, 222, 225, 269], "represent": [106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 118, 122], "from_statement_list": 106, "statement": [106, 133, 140, 141, 143, 144, 153, 154, 159, 161, 166, 175, 184, 198, 199, 212, 224, 225, 226, 227, 228, 234, 269], "from_act": 106, "data_typ": [107, 108], "qualifi": [107, 109, 256], "find_path": 107, "allow_parti": 107, "top": [107, 144, 161, 232, 308], "down": 107, "dot": [107, 145, 229], "partial": [107, 220, 247], "wa": 107, "codesummarytyp": 107, "find_code_object_by_dotted_nam": 107, "work": 107, "fb_block": 107, "actionnam": 107, "propertynam": [107, 222], "get_all_items_by_nam": 107, "get_item_by_nam": 107, "handl": [107, 212], "scenario": [107, 308], "shadow": 107, "first": [107, 211, 297, 308], "take": [107, 181, 280, 303], "preced": 107, "place": 107, "anoth": [107, 308], "entri": 107, "over": 107, "old": 107, "ones": 107, "from_parse_result": 107, "all_parsed_item": 107, "deriv": [107, 145, 208, 254], "arraytypedeclar": [108, 146], "structuretypedeclar": [108, 109, 146], "stringtypedeclar": [108, 146], "simpletypedeclar": [108, 146], "subrangetypedeclar": [108, 146], "enumeratedtypedeclar": [108, 146], "uniontypedeclar": [108, 146], "extend": [108, 110, 113, 161, 170, 181, 197, 230, 245], "from_data_typ": 108, "dtype": 108, "squash_base_extend": [108, 110, 113], "globalvariabledeclar": [109, 112, 161, 232], "variableinitdeclar": [109, 176], "structureelementdeclar": [109, 245], "unionelementdeclar": [109, 260], "externalvariabledeclar": 109, "initdeclar": [109, 132, 152, 241, 246, 267], "locat": [109, 114, 120, 149, 150, 178, 180, 181, 186, 187, 188, 204, 205, 242, 262, 268], "base_typ": 109, "qualified_nam": 109, "fbname": 109, "declnam": 109, "location_typ": 109, "liter": [109, 134, 137, 138, 147, 148, 151, 160, 182, 196, 200, 201, 202, 207, 214, 223, 236, 238, 253, 288], "memori": [109, 114, 188, 266], "from_declar": 109, "functionblock": [109, 110, 161, 232], "from_global_vari": 109, "var_glob": [109, 112, 179, 289], "from_block": 109, "variabledeclarationblock": [109, 124, 164, 169, 170, 176, 179, 187, 193, 194, 197, 205, 209, 210, 216, 221, 222, 235, 252, 265], "from_function_block": 110, "return_typ": [111, 115, 169, 209, 222], "from_funct": 111, "qualified_onli": 112, "from_glob": 112, "interfa": 113, "from_interfac": 113, "itf": 113, "linkabl": [114, 120], "from_method": 115, "from_program": 116, "getter": 118, "setter": 118, "from_properti": 118, "get_meta_kwarg": 119, "linkableitem": 120, "multilin": [122, 282, 290], "attempt": 122, "separ": [122, 170], "keep": 122, "sensibl": 122, "outlin": 122, "simplevari": [123, 140, 149, 165, 166, 174, 175, 186, 195, 204, 211, 217, 224, 226, 228], "multielementvari": [123, 140, 166, 174, 175, 224, 226, 228], "datatyp": [123, 129, 254], "access": [123, 124, 146, 169, 170, 190, 209, 222, 308], "accessnam": [123, 221, 308], "symbolicvari": [123, 221, 308], "typenam": [123, 129, 130, 131, 132, 156, 189, 221, 230, 238, 245, 249, 255, 257, 267, 308], "read_writ": [123, 221, 308], "accessname1": 123, "symbolicvariable1": 123, "typename1": 123, "read_onli": 123, "accessname2": 123, "symbolicvariable2": 123, "typename2": 123, "program_access_decl": [123, 124, 181], "access_nam": 123, "symbolic_vari": [123, 174], "non_generic_type_nam": [123, 145, 181], "access_direct": 123, "from_lark": [123, 124, 126, 127, 129, 130, 131, 132, 133, 136, 137, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 162, 163, 164, 165, 166, 169, 170, 172, 173, 174, 175, 176, 178, 179, 180, 184, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 258, 259, 260, 265, 267, 269, 270, 271, 272, 273], "var_access": [124, 221, 308], "end_var": [124, 164, 169, 170, 176, 179, 187, 193, 194, 205, 210, 216, 221, 222, 235, 252, 265, 308], "_flaghelp": [125, 177, 263], "intflag": [125, 177, 263], "access_specifi": [125, 146, 169, 170, 181, 209, 222], "public": 125, "privat": [125, 209, 222], "abstract": [125, 170], "protect": 125, "intern": [125, 177, 270, 271, 272], "16": [125, 137, 177, 182, 183], "32": 125, "bodi": [126, 169, 170, 176, 209, 221, 222], "belong": [126, 209, 222, 308], "assum": [126, 308], "owner": 126, "scope": 126, "actnam": 126, "end_act": 126, "ivalu": [126, 133, 152, 166, 169, 173, 192, 199, 221, 226, 228, 242, 244, 245, 246, 259, 260, 308], "action_nam": 126, "function_block_bodi": [126, 170, 209, 221, 222], "express": [127, 133, 136, 139, 141, 142, 154, 166, 174, 181, 184, 195, 203, 217, 219, 220, 224, 225, 226, 228, 243, 250, 251, 255, 258, 262, 269, 270], "structureiniti": [127, 172, 173, 192, 213, 242, 243, 254, 270], "enumeratedvalu": [127, 140, 155, 157, 243, 270], "arrayiniti": [127, 131, 243, 270, 271, 272], "count": [127, 270], "integ": [127, 135, 137, 140, 150, 158, 160, 165, 181, 183, 215, 243, 270], "initi": [127, 128, 131, 132, 157, 174, 178, 180, 189, 191, 192, 213, 241, 242, 243, 244, 246, 250, 254, 255, 256, 259, 267, 270, 271, 272], "arrai": [127, 128, 129, 130, 131, 132, 168, 178, 209, 213, 222, 242, 243, 244, 245, 257, 259, 260, 270, 271, 272, 308], "potentiali": 127, "repeat": [127, 225, 270, 304], "identifierb": [127, 157, 158], "array_initial_el": [127, 181, 270, 271, 272], "enumerated_valu": [127, 155, 157, 158, 181, 243, 270], "_array_initial_el": [127, 270], "array_initial_element_count": [127, 181, 270], "arrayinitialel": [128, 270, 271, 272], "bracket": [128, 139, 237, 239, 240, 271, 272, 298, 304], "bare": 128, "subrang": [129, 140, 168, 181, 220, 248, 249, 250, 267], "functioncal": [129, 142, 143, 172, 175, 178, 242, 254], "objectinitializerarrai": [129, 254], "stringtypespecif": [129, 145, 186, 229, 238, 239, 241, 254], "typespecificationbas": [129, 155, 189, 229, 240, 248], "OF": [129, 130, 131, 132, 141, 178, 209, 222, 242, 244, 245, 257, 259, 260, 308], "vec": 129, "sizeof": [129, 308], "teststruct": 129, "param": [129, 174, 239, 240, 241], "ilow": [129, 239, 240, 241], "array_specif": [129, 131, 163, 181, 259], "_array_spec_typ": 129, "base_type_nam": [129, 174, 178, 240, 242, 248, 254, 256, 257, 261, 274], "full_type_nam": [129, 174, 178, 240, 242, 248, 254, 256, 257, 261, 274], "arg": [129, 133, 155, 170, 184, 195, 209, 222, 232, 243, 251, 284, 285, 286, 287], "init": [130, 132, 156, 172, 173, 178, 186, 191, 192, 204, 230, 241, 242, 246, 249, 254, 267, 274], "arraytypeiniti": [130, 132, 178, 191, 204, 209, 222, 242, 254], "arraytyp": 130, "pointer": [130, 131, 132, 145, 157, 189, 190, 230, 231, 245, 257, 259, 262], "TO": [130, 131, 132, 145, 157, 166, 189, 190, 230, 245, 257, 259], "tc": 130, "sometyp": 130, "someinput": 130, "array_type_declar": [130, 181], "array_type_nam": 130, "array_spec_init": [130, 131, 132, 181, 242], "indirect": [131, 132, 145, 157, 189, 190, 245, 250, 257], "indirectiontyp": [131, 145, 157, 189, 245, 250], "spec": [131, 157, 163, 173, 178, 239, 241, 250, 254, 255, 259], "arrayspecif": [131, 163, 254, 259], "typeinitializationbas": [131, 157, 192, 239, 250, 255], "indirection_typ": [131, 157, 181, 189, 190, 245, 250], "array_initi": [131, 243, 272], "declaredvari": [132, 152, 191, 241, 246, 267], "aval1": 132, "aval2": 132, "array_var_init_decl": [132, 181], "var1_list": [132, 152, 181, 241, 246, 267, 308], "assign": [133, 136, 218, 224], "ivalue1": [133, 180, 242, 245], "ivalue2": [133, 180, 260], "assignment_stat": [133, 181], "_variabl": [133, 212, 224, 226, 228], "type_nam": [134, 135, 137, 145, 155, 158, 182, 183, 196, 214, 215, 223, 238, 240, 248, 257], "bitstr": [134, 140, 182, 214, 243], "binari": [134, 136], "bit": [134, 137, 140, 150, 182, 206, 214, 268], "binary_bit_string_liter": [134, 137, 181], "bit_string_liter": [134, 137, 181], "bit_string_type_nam": [134, 137, 182, 214], "bit_str": [134, 135, 137], "numer": [134, 137, 182, 214], "decim": [134, 137, 182, 214], "binary_integ": [135, 181], "any_integ": [135, 196, 308], "left": 136, "op": [136, 224, 226, 228, 258], "right": 136, "two": [136, 213, 244, 308], "operand": [136, 258], "oper": [136, 212, 258], "b": [136, 139, 142, 143, 174, 175, 178, 211, 219, 230, 262, 268], "AND": 136, "and_then": 136, "or_els": 136, "xor": 136, "assignment_express": [136, 181], "add_express": [136, 181], "expression_term": [136, 181], "add_oper": 136, "and_express": [136, 181], "comparison_express": [136, 181], "logical_and": 136, "and_then_express": [136, 181], "xor_express": [136, 181], "logical_or": 136, "or_else_express": [136, 181], "logical_and_then": 136, "logical_or_els": 136, "logical_xor": 136, "equality_express": [136, 181], "equals_op": 136, "compare_op": 136, "unary_express": [136, 181, 258], "multiply_oper": 136, "operator_and_expr": 136, "octal_str": [137, 214, 215], "octal_bit_string_liter": [137, 181, 214], "hex_str": [137, 182, 183, 308], "hex_bit_string_liter": [137, 181, 182], "squar": 139, "around": [139, 219], "exclus": 139, "length": [139, 237, 239, 240], "255": [139, 237, 257], "stringspeclength": [139, 239, 240], "bracketed_express": [139, 181, 237], "match": [140, 212, 292, 300], "boolean": [140, 243], "symbol": 140, "casematch": 140, "case_el": [140, 141, 181], "case_list": 140, "case_element_statement_list": [140, 181, 234], "caseel": 141, "else_claus": [141, 153, 181, 184], "elseclaus": [141, 184], "switch": 141, "els": [141, 153, 154, 184, 212], "claus": 141, "case_stat": [141, 181], "end_cas": 141, "invoc": [142, 143, 171, 172, 175], "chain": [142, 143], "dereferenc": [142, 149, 165, 174, 175, 211, 231, 251, 262], "carat": [142, 174], "c": [142, 174, 175, 178, 189, 211, 262, 308], "sname": [142, 174, 175], "test": [142, 174, 175, 239, 242, 245, 307], "ioutput": [142, 174, 175], "d": [142, 147, 268], "chained_function_cal": [142, 143, 181], "function_cal": [142, 172, 174, 175, 178, 181, 242], "fluent": 143, "style": [143, 198, 199], "uut": 143, "dothi": 143, "andthenthi": 143, "andthenthat": 143, "getpointertostruct": 143, "dothat": 143, "done": [143, 292], "chained_function_call_stat": [143, 181], "chainedfunctioncal": 143, "jump": 144, "loop": [144, 159, 166, 225, 269], "continu": [144, 308], "continue_stat": [144, 181], "elementari": [145, 229], "pointer_typ": [145, 181, 190], "elementary_type_nam": [145, 229], "derived_type_nam": 145, "dotted_identifi": [145, 158, 162, 185, 209, 222, 229], "accessspecifi": [146, 169, 170, 209, 222], "wrap": 146, "end_typ": [146, 260], "_type_declar": 146, "year": [147, 148, 200, 201], "month": [147, 148, 200, 201], "dai": [147, 148, 151, 200, 201, 202, 207, 253], "_date_liter": [147, 148, 200, 201], "time": [147, 148, 151, 200, 201, 207, 253], "date": [148, 181, 200, 201, 243], "timeofdai": [148, 243], "date_and_tim": [148, 181], "dt": 148, "_daytim": [148, 201, 207, 253], "hour": [148, 151, 201, 202, 207, 253], "minut": [148, 151, 201, 202, 207, 253], "second": [148, 151, 201, 202, 207, 253, 308], "incompleteloc": [149, 178, 180, 186, 242], "incomplet": [149, 150, 180, 186, 187, 188, 262], "ivar": 149, "AT": [149, 150, 152, 180, 188, 205, 206, 242, 245, 262], "ix1": [149, 150, 152, 180, 205, 206, 262, 268], "var1": [149, 181], "variable_nam": [149, 165, 181, 186, 195, 204, 211, 217, 231], "incomplete_loc": [149, 180, 181, 186, 188, 242], "location_prefix": [150, 206], "variablelocationprefix": [150, 206], "size_prefix": [150, 206], "variablesizeprefix": [150, 206], "o": [150, 188, 262, 266], "linkag": [150, 262], "var": [150, 176, 187, 204, 205, 206, 231, 262, 264, 265], "just": [150, 187, 229, 262, 279, 308], "direct_vari": [150, 181, 206], "prefix": [150, 268, 277, 278, 297], "q": [150, 188, 266], "m": [150, 188, 266, 308], "ix2": 150, "size": [150, 268], "ha": [150, 268, 308], "millisecond": [151, 202], "neg": [151, 202], "minu": [151, 202], "_interv": 151, "interv": [151, 202], "edg": 152, "r_edg": 152, "f_edg": 152, "edge_declar": [152, 181], "IF": [153, 154, 184, 199], "elsif": [153, 154, 184], "end_if": [153, 154, 184, 199], "if_express": [154, 184], "else_if_claus": [154, 181, 184], "THEN": [154, 184, 199], "value1": [155, 156, 157, 242, 245, 255, 259, 267, 279], "value2": [155, 156, 157, 267, 279], "enumerated_specif": [155, 157, 163, 181, 259], "enum_data_type_nam": 155, "enumerated_type_nam": [155, 156, 158], "enumeratedtypeiniti": [156, 178, 186, 191, 204, 209, 222, 242, 254, 267], "va": 156, "enumerated_type_declar": [156, 181], "enumerated_spec_init": [156, 157, 181, 242, 267], "enumeratedspecif": [157, 163, 254, 259], "identifierc": 157, "identifierd": 157, "integer_or_const": 158, "exit": 159, "exit_stat": [159, 181], "complic": 160, "mathemat": 160, "mark": [160, 171, 199, 203, 218, 233, 247, 262, 264], "so": [160, 171, 203, 218, 233, 247, 262, 264, 308], "python": [160, 171, 203, 218, 233, 247, 262, 264, 308], "datatypedeclar": [161, 232], "possibl": [161, 189, 308], "detail": [161, 308], "sourcecodeitem": 161, "portion": [162, 185, 288], "stname": 162, "fb_name": [162, 173, 288], "simplespecif": [163, 169, 186, 189, 254, 255, 259], "subrangespecif": [163, 250, 254, 259], "extern": [163, 164], "insid": [163, 186], "external_declar": [163, 164, 181], "global_var_nam": [163, 180], "simple_specif": [163, 181, 189, 229, 255, 259, 308], "subrange_specif": [163, 181, 248, 250, 259], "structure_type_nam": [163, 192], "function_block_type_nam": [163, 173, 213], "attr": [164, 176, 179, 187, 193, 194, 205, 210, 216, 235, 265], "variableattribut": [164, 176, 187, 193, 194, 205, 210, 216, 235, 252, 265], "var_extern": 164, "external_var_declar": [164, 181], "variable_attribut": [164, 176, 181, 187, 193, 194, 205, 210, 216, 235, 263, 265], "selector": 165, "multi": [165, 211, 262], "field_selector": [165, 181, 211], "control": [166, 308], "from_": 166, "step": 166, "stop": [166, 220], "FOR": 166, "iindex": 166, "do": [166, 170, 269, 308], "end_for": 166, "BY": 166, "arrarrai": 166, "for_stat": [166, 181], "control_vari": 166, "_for_list": 166, "asterisk": 168, "indirectsimplespecif": [169, 254, 255, 259], "end_funct": 169, "funcnam": 169, "var_input": [169, 170, 193, 221, 222, 308], "derived_function_nam": 169, "indirect_simple_specif": [169, 181, 189, 255, 259, 308], "function_var_block": 169, "function_bodi": 169, "remaind": 169, "distinguish": [170, 212], "regular": 170, "potenti": [170, 231, 262], "These": 170, "addit": 170, "thei": [170, 237], "appear": [170, 237], "within": [170, 308], "fb_emptyfunctionblock": 170, "fb_implement": 170, "i_fbnam": 170, "fb_extend": 170, "otherfbnam": 170, "fb_withvari": 170, "bexecut": [170, 222], "var_output": [170, 216, 222], "iresult": [170, 222], "derived_function_block_nam": 170, "fb_var_declar": 170, "fb_token": 170, "derived_nam": 170, "functionblocknamedeclar": 171, "functionblockinvocationdeclar": 171, "functionblockdeclar": [172, 173, 176, 193, 194, 210, 216, 235, 252, 265], "fbsampl": [172, 244], "fb_sampl": [172, 244], "ninitparam": [172, 244], "ninput": [172, 244], "nmyproperti": [172, 244], "fb_invocation_decl": [172, 181, 244], "fb_decl_name_list": [172, 173, 181], "structure_initi": [172, 173, 181, 192, 213, 243, 244], "fbname1": 173, "bvalu": [173, 192, 226, 228, 244, 246], "fb_name_decl": [173, 181, 244], "fb_decl": 173, "parameterassign": [174, 175, 195, 217], "param_assign": [174, 181, 195, 217], "na": 174, "derefer": [174, 211], "mechan": 174, "underli": 174, "subscript": [174, 211, 251], "tool": [174, 308], "function_call_stat": [175, 181], "function_var_declar": [176, 181], "var_bodi": [176, 194, 210, 216, 235, 252, 265], "arrayvariableinitdeclar": [176, 193, 194, 210, 216, 235, 252, 265], "stringvariableinitdeclar": [176, 193, 194, 210, 216, 235, 252, 265], "variableoneinitdeclar": [176, 193, 194, 210, 216, 235, 252, 265], "edgedeclar": [176, 193, 194, 210, 216, 235, 252, 265], "structuredvariableinitdeclar": [176, 193, 194, 210, 216, 235, 252, 265], "global_variable_attribut": [177, 179, 181], "global_var_attrib": 177, "constant": [177, 181, 243, 251, 263], "retain": [177, 263], "non_retain": [177, 263], "persist": [177, 263], "globalvariablespec": 178, "typeiniti": [178, 191, 204, 209, 222, 230, 242, 254, 267], "subrangetypeiniti": [178, 186, 191, 204, 209, 222, 242, 249, 254, 267], "initializedstructur": [178, 191, 204, 209, 222, 242, 246, 254], "stringtypeiniti": [178, 204, 209, 222, 241, 242, 254], "fvalue1": 178, "fvalue2": 178, "fvalue3": 178, "fvalue4": 178, "dint": 178, "fvalue5": 178, "fvalue6": 178, "fvalue7": 178, "fb_test": 178, "fvalue8": 178, "fvalue9": 178, "abc": [178, 242, 245, 290], "global_var_decl": [178, 181], "global_var_spec": [178, 180, 181], "_located_var_spec_init": [178, 204], "globalvariableattribut": 179, "global_var_body_item": 179, "wherea": 180, "simpl": [180, 189, 229, 230, 231, 255, 257, 262], "multipl": 180, "ivalue3": 180, "ivalue4": 180, "global_var_list": 180, "name_or_nam": 180, "transformer_inplacerecurs": 181, "_filenam": 181, "sort": 181, "children": 181, "full_subrang": [181, 220], "signed_integ": 181, "octal_integ": [181, 215], "hex_integ": [181, 183, 308], "program_var_declar": [181, 221], "bare_array_initi": [181, 271], "bracketed_array_initi": [181, 272], "double_byte_string_spec": [181, 239, 241], "double_byte_string_var_declar": [181, 241], "durat": [181, 202, 243], "end_of_statement_list_label": [181, 199, 234], "if_stat": [181, 184], "incomplete_located_var_decl": [181, 186, 187], "incomplete_located_var_declar": [181, 187], "initialized_structur": [181, 192, 242, 246], "input_declar": [181, 193, 308], "input_output_declar": [181, 194], "input_param_assign": [181, 195], "integer_liter": [181, 196], "jmp_statement": [181, 198], "labeled_stat": [181, 199], "ldate": [181, 201, 243], "ldate_and_tim": [181, 201], "ldurat": [181, 243], "located_var_decl": [181, 204, 205], "located_var_declar": [181, 205], "ltime_of_dai": [181, 207], "multi_element_vari": [181, 211], "no_op_stat": [181, 212], "object_initializer_arrai": [181, 213, 244], "output_declar": [181, 216], "output_parameter_assign": [181, 195, 217], "parenthesized_express": [181, 219, 237], "real_liter": [181, 223], "reference_assignment_stat": [181, 224], "repeat_stat": [181, 225], "reset_stat": [181, 226], "return_stat": [181, 227], "set_stat": [181, 228], "simple_spec_init": [181, 230, 242, 255, 267], "simple_type_declar": [181, 230], "single_byte_string_spec": [181, 239, 241], "single_byte_string_var_declar": [181, 241], "static_var_declar": [181, 235], "string_liter": [181, 236, 238], "string_spec_length": [181, 237, 239, 240], "string_type_declar": [181, 238], "string_type_specif": [181, 238, 240], "structure_element_declar": [181, 242, 245], "structure_element_initi": [181, 243, 244], "structure_type_declar": [181, 245], "structured_var_init_decl": [181, 246], "subrange_spec_init": [181, 242, 249, 250, 267], "subrange_type_declar": [181, 249], "subscript_list": [181, 211, 251], "temp_var_decl": [181, 252], "time_of_dai": [181, 253], "union_element_declar": [181, 259, 260], "union_type_declar": [181, 260], "var1_init_decl": [181, 267, 308], "var_declar": [181, 265], "var_inst_declar": [181, 210], "while_stat": [181, 269], "hex": 182, "else_if": 184, "elseifclaus": 184, "if_expr": 184, "i_interface1": 185, "i_interface2": 185, "var_spec": 186, "expect": [187, 205], "task": [188, 266], "init_paramet": 189, "inputparameterassign": 189, "ignor": 189, "input_param_arg": 189, "init_parameters_tre": 189, "pointer_depth": 190, "reference_to": 190, "pointer_to": 190, "depth": 190, "is_indirect": 190, "denot": 190, "_genericinit": [191, 241], "st_typenam": [192, 244, 246], "_var_input_bodi": 193, "var_in_out": [194, 308], "nameless": 195, "logical_not": [195, 217], "integer_type_nam": [196, 248], "end_interfac": 197, "still": 197, "process": [197, 283, 298, 304, 308], "numpydoc": 197, "interface_var_declar": 197, "goto": [198, 199], "jmp": [198, 199], "point": [198, 223, 296], "label1": 199, "label2": 199, "_statement": [199, 234], "long": [200, 201, 202, 207], "ltime": [201, 202], "ltimeofdai": 201, "ldt": 201, "microsecond": 202, "nanosecond": 202, "lt": 202, "_linterv": 202, "directvari": 206, "ltod": 207, "empti": 208, "lexer": 208, "container_column": 208, "container_end_column": 208, "container_end_lin": 208, "container_lin": 208, "end_column": 208, "end_lin": 208, "end_po": 208, "start_po": 208, "form": [208, 213, 243, 308], "yet": [208, 308], "fill": 208, "end": [208, 225, 232, 282], "charact": [208, 288, 298, 302, 304], "lark_meta": 208, "get_comments_and_pragma": 208, "split": [208, 288], "attribute_pragma": [208, 264], "methodnam": 209, "end_method": [209, 308], "method_return_typ": 209, "method_var_declar": 209, "var_inst": 210, "subscriptlist": 211, "fieldselector": 211, "someconst": 211, "unus": 211, "perhap": 211, "compat": [211, 242, 259, 274, 284], "elsewher": 211, "statu": 211, "held": 211, "basi": 211, "up": [211, 234, 300, 308], "subscript_or_field": 211, "noth": 212, "sensit": 212, "note": [212, 308], "you": [212, 308], "arbitrarili": 212, "choos": 212, "fb_runner": [213, 244], "octal": 214, "invert": 217, "NOT": [217, 218, 258], "output2": 217, "expr": [219, 258], "parenthes": [219, 237, 304], "istart": 220, "iend": 220, "end_program": [221, 308], "programnam": [221, 308], "program_type_nam": 221, "pertain": 222, "returntyp": 222, "end_properti": 222, "property_return_typ": 222, "property_var_declar": 222, "float": 223, "real_type_nam": 223, "_": 223, "refon": 224, "ref": 224, "refotheron": 224, "ref_assign": 224, "condit": [225, 269], "until": 225, "end_repeat": 225, "reset": 226, "condition": [226, 228], "clear": 226, "reset_assign": 226, "No": 227, "set_assign": 228, "simple_type_nam": [229, 230], "zero": 232, "_library_element_declar": 232, "range_from_file_lin": 232, "section": [233, 288], "_case_element_stat": 234, "var_stat": 235, "single_byte_character_str": [236, 239], "double_byte_character_str": [236, 239], "parenthesizedexpress": 237, "bracketedexpress": 237, "distinct": 237, "between": 237, "though": 237, "string_typ": [238, 239], "100": [238, 255], "wstring": [238, 239, 240, 241], "string_type_nam": 238, "doubl": [239, 241], "2_500_000": [239, 240, 241], "accept": [239, 240], "optino": 241, "svar1": 241, "test1": 241, "svar2": 241, "svar3": 241, "test2": 241, "svar4": 241, "svar5": 241, "test3": 241, "string_info": 241, "sttest": [242, 245], "st_test": [242, 245], "evalu": [242, 245, 260], "e_test": [242, 245], "arrvalu": [242, 245, 259], "arrvalue1": [242, 245, 259], "svalu": [242, 245, 259], "svalue1": [242, 245], "structure_element_nam": [242, 243, 259], "api": [242, 259, 274, 307, 308], "datetim": 243, "ldatetim": 243, "real": [243, 308], "simpli": 243, "repres": 243, "structureelementiniti": 244, "ststruct": 244, "runner": 244, "struct": 245, "end_struct": 245, "structure_type_name_declar": [245, 260], "stvar1": [246, 267], "stvar2": [246, 267], "sub": 247, "overlap": 248, "subrange_type_nam": [248, 249], "25": [250, 267], "_subscript": 251, "temporari": 252, "var_temp": 252, "tod": 253, "from_init": 254, "from_spec": 254, "type_info": [256, 257], "typeinform": [256, 257, 261], "ambigu": 257, "unari": 258, "unary_oper": 258, "primary_express": 258, "similar": [259, 307], "psvalue1": 259, "ival": 260, "aasbyt": 260, "end_union": 260, "referenc": 262, "var_attrib": 263, "x": 268, "word_16": 268, "dword_32": 268, "lword_64": 268, "l": 268, "while": 269, "end_whil": 269, "without": [271, 308], "helper": [273, 284, 287], "translat": 273, "repr": 274, "give": [274, 288], "formatset": 275, "overrid": 275, "iec": [276, 308], "stringifi": [277, 278], "back": 280, "magic": 281, "lax": 282, "newlin": 282, "pre": 283, "protocol": [284, 285, 286, 287], "anyblarksourceitem": 284, "overload": [284, 287], "decl_impl": 288, "convent": 288, "whether": 288, "describ": [288, 308], "dotted_nam": 288, "to_str": 288, "property_get": 289, "property_set": 289, "dut": 289, "12": 289, "get_grammar_rul": 289, "get_implicit_block_end": 289, "replace_char": [290, 302], "clean": 290, "inner": [290, 297, 303], "marker": 290, "manner": 292, "linux": 292, "Not": 292, "osx": 292, "platform": 292, "check": 292, "correct": 292, "filenotfounderror": [292, 296], "hash": 293, "sha": 293, "256": 293, "algorithm": [293, 308], "keyword": 296, "open": [296, 298, 304, 308], "last": 297, "enclos": 298, "close": [298, 304], "enter": 299, "session": 299, "pdb": 299, "ipython": [299, 308], "_t_lark": 300, "code_line_to_file_lin": 300, "rebuild": 300, "adjust": 300, "kei": 301, "simplifi": 304, "xml_header": 305, "include_utf8_sig": 305, "introduct": 307, "capabl": 307, "instal": 307, "sampl": 307, "run": 307, "ad": 307, "acknowledg": 307, "doc": 307, "apischema_compat": 307, "dependency_stor": 307, "html": 307, "main": 307, "sphinxdomain": 307, "search": 307, "page": 307, "earlei": 308, "perfect": 308, "reliabl": 308, "your": 308, "produc": 308, "issu": 308, "further": 308, "As": 308, "fun": 308, "side": 308, "blark": 308, "isn": 308, "my": 308, "prioriti": 308, "idea": 308, "go": 308, "introspect": 308, "refactor": 308, "inspect": 308, "layer": 308, "summar": 308, "rewrit": 308, "directli": 308, "quick": 308, "upgrad": 308, "blark_venv": 308, "bin": 308, "activ": 308, "forg": 308, "wish": 308, "unreleas": 308, "repositori": 308, "git": 308, "http": 308, "github": 308, "com": 308, "klauer": 308, "experiment": 308, "formatt": 308, "those": 308, "twincat3": 308, "st": 308, "print": 308, "pou": 308, "f_setstateparam": 308, "clip": 308, "To": 308, "sure": 308, "try": 308, "prompt": 308, "out": 308, "array_of_object": 308, "hide": 308, "prv_detect": 308, "currentchannel": 308, "aphas": 308, "cphase": 308, "class_basevector": 308, "vector_t": 308, "tcplcobject": 308, "productvers": 308, "4024": 308, "f9611d23": 308, "4bb5": 308, "422d": 308, "9f11": 308, "2cc94e61fc9": 308, "specialfunc": 308, "cdata": 308, "nstateref": 308, "udint": 308, "rposit": 308, "rtoler": 308, "stbeamparam": 308, "st_beamparam": 308, "import": 308, "parse_source_cod": 308, "Or": 308, "reusabl": 308, "remain": 308, "advanc": 308, "howev": 308, "addition": 308, "pleas": 308, "avoid": 308, "fly": 308, "startup": 308, "cost": 308, "re": 308, "whenev": 308, "new_pars": 308, "1010": 308, "present": 308, "feel": 308, "free": 308, "contribut": 308, "we": 308, "ll": 308, "our": 308, "best": 308, "ensur": 308, "volker": 308, "birk": 308, "61131": 308, "iec2xml": 308, "fork": 308, "syntact": 308, "theiec": 308, "standard": 308, "flor": 308, "narciso": 308, "et": 308, "al": 308, "mani": 308, "aspect": 308, "been": 308, "rewritten": 308, "better": 308, "special": 308, "thank": 308, "contributor": 308, "engineerjoe440": 308, "There": 308, "matiec": 308, "edit": 308, "fanci": 308, "featur": 308, "updat": 308, "openplc": 308, "runtim": 308, "programm": 308, "logic": 308, "easi": 308, "softwar": 308, "focu": 308, "low": 308, "industri": 308, "autom": 308, "research": 308, "paper": 308, "framework": 308, "cyber": 308, "secur": 308, "rusti": 308, "written": 308, "rust": 308, "llvm": 308, "eventu": 308, "nativ": 308, "checker": 308, "analysi": 308, "maintain": 308, "abil": 308, "ast": 308, "cfg": 308, "choic": 308, "tcblack": 308, "black": 308}, "objects": {"blark.apischema_compat": [[1, 0, 1, "", "alternative_constructor"], [2, 0, 1, "", "as_tagged_union"], [3, 0, 1, "", "get_all_subclasses"], [4, 0, 1, "", "token_deserializer"], [5, 0, 1, "", "token_serializer"]], "blark.dependency_store": [[6, 1, 1, "", "DependencyStore"], [7, 1, 1, "", "DependencyStoreConfig"], [8, 1, 1, "", "DependencyStoreLibrary"], [9, 1, 1, "", "PlcProjectMetadata"], [10, 0, 1, "", "get_dependency_store"], [11, 0, 1, "", "load_projects"]], "blark.dependency_store.DependencyStore": [[6, 2, 1, "", "__init__"], [6, 3, 1, "", "config"], [6, 4, 1, "", "config_filename"], [6, 2, 1, "", "get_dependencies"], [6, 2, 1, "", "get_dependency"], [6, 2, 1, "", "get_instance"], [6, 2, 1, "", "load_config"], [6, 3, 1, "", "root"]], "blark.dependency_store.DependencyStoreConfig": [[7, 2, 1, "", "__init__"], [7, 2, 1, "", "as_json"], [7, 3, 1, "", "filename"], [7, 2, 1, "", "from_dict"], [7, 3, 1, "", "libraries"], [7, 2, 1, "", "save"]], "blark.dependency_store.DependencyStoreLibrary": [[8, 2, 1, "", "__init__"], [8, 2, 1, "", "get_latest_version_path"], [8, 2, 1, "", "get_project_filename"], [8, 3, 1, "", "name"], [8, 3, 1, "", "path"], [8, 3, 1, "", "project"], [8, 3, 1, "", "versioned"]], "blark.dependency_store.PlcProjectMetadata": [[9, 2, 1, "", "__init__"], [9, 3, 1, "", "code"], [9, 3, 1, "", "dependencies"], [9, 3, 1, "", "filename"], [9, 2, 1, "", "from_plcproject"], [9, 2, 1, "", "from_project_filename"], [9, 3, 1, "", "include_dependencies"], [9, 3, 1, "", "loaded_files"], [9, 3, 1, "", "name"], [9, 3, 1, "", "plc"], [9, 3, 1, "", "summary"]], "blark.format": [[12, 0, 1, "", "build_arg_parser"], [13, 0, 1, "", "determine_output_filename"], [14, 0, 1, "", "dump_source_to_console"], [15, 0, 1, "", "get_reformatted_code_blocks"], [16, 0, 1, "", "main"], [17, 0, 1, "", "reformat_code"], [18, 0, 1, "", "write_source_to_file"]], "blark.html": [[19, 1, 1, "", "HighlighterAnnotation"], [20, 1, 1, "", "HtmlWriter"], [21, 0, 1, "", "apply_annotations_to_code"], [22, 0, 1, "", "get_annotations"]], "blark.html.HighlighterAnnotation": [[19, 2, 1, "", "__init__"], [19, 2, 1, "", "as_string"], [19, 3, 1, "", "is_open_tag"], [19, 3, 1, "", "name"], [19, 3, 1, "", "other_tag_pos"], [19, 3, 1, "", "terminal"]], "blark.html.HtmlWriter": [[20, 2, 1, "", "__init__"], [20, 3, 1, "", "block"], [20, 2, 1, "", "save"], [20, 4, 1, "", "source_code"], [20, 3, 1, "", "source_filename"], [20, 2, 1, "", "to_html"], [20, 3, 1, "", "user"]], "blark.input": [[23, 1, 1, "", "BlarkCompositeSourceItem"], [24, 1, 1, "", "BlarkSourceItem"], [25, 1, 1, "", "BlarkSourceLine"], [26, 5, 1, "", "UnsupportedFileFormatError"], [27, 0, 1, "", "load_file_by_name"], [28, 0, 1, "", "register_input_handler"]], "blark.input.BlarkCompositeSourceItem": [[23, 2, 1, "", "__init__"], [23, 3, 1, "", "filename"], [23, 2, 1, "", "get_code_and_line_map"], [23, 2, 1, "", "get_filenames"], [23, 3, 1, "", "identifier"], [23, 4, 1, "", "lines"], [23, 3, 1, "", "parts"], [23, 3, 1, "", "user"]], "blark.input.BlarkSourceItem": [[24, 2, 1, "", "__init__"], [24, 2, 1, "", "from_code"], [24, 2, 1, "", "get_code_and_line_map"], [24, 2, 1, "", "get_filenames"], [24, 3, 1, "", "grammar_rule"], [24, 3, 1, "", "identifier"], [24, 3, 1, "", "implicit_end"], [24, 3, 1, "", "lines"], [24, 3, 1, "", "type"], [24, 3, 1, "", "user"]], "blark.input.BlarkSourceLine": [[25, 2, 1, "", "__init__"], [25, 3, 1, "", "code"], [25, 3, 1, "", "filename"], [25, 2, 1, "", "from_code"], [25, 3, 1, "", "lineno"]], "blark.main": [[29, 0, 1, "", "main"]], "blark.output": [[30, 1, 1, "", "OutputBlock"], [31, 0, 1, "", "get_handler_by_name"], [32, 0, 1, "", "register_output_handler"]], "blark.output.OutputBlock": [[30, 2, 1, "", "__init__"], [30, 3, 1, "", "code"], [30, 3, 1, "", "metadata"], [30, 3, 1, "", "origin"]], "blark.parse": [[33, 1, 1, "", "BlarkStartingRule"], [34, 1, 1, "", "ParseResult"], [35, 0, 1, "", "build_arg_parser"], [36, 0, 1, "", "dump_json"], [37, 0, 1, "", "get_parser"], [38, 0, 1, "", "main"], [39, 0, 1, "", "new_parser"], [40, 0, 1, "", "parse"], [41, 0, 1, "", "parse_item"], [42, 0, 1, "", "parse_project"], [43, 0, 1, "", "parse_single_file"], [44, 0, 1, "", "parse_source_code"], [45, 0, 1, "", "summarize"]], "blark.parse.BlarkStartingRule": [[33, 3, 1, "", "action"], [33, 3, 1, "", "data_type_declaration"], [33, 3, 1, "", "function_block_method_declaration"], [33, 3, 1, "", "function_block_property_declaration"], [33, 3, 1, "", "function_block_type_declaration"], [33, 3, 1, "", "function_declaration"], [33, 3, 1, "", "global_var_declarations"], [33, 3, 1, "", "iec_source"], [33, 3, 1, "", "interface_declaration"], [33, 3, 1, "", "program_declaration"], [33, 3, 1, "", "statement_list"]], "blark.parse.ParseResult": [[34, 2, 1, "", "__init__"], [34, 3, 1, "", "comments"], [34, 2, 1, "", "dump_source"], [34, 3, 1, "", "exception"], [34, 3, 1, "", "filename"], [34, 4, 1, "", "identifier"], [34, 3, 1, "", "item"], [34, 3, 1, "", "line_map"], [34, 3, 1, "", "parent"], [34, 3, 1, "", "processed_source_code"], [34, 3, 1, "", "source_code"], [34, 2, 1, "", "transform"], [34, 3, 1, "", "transformed"], [34, 3, 1, "", "tree"]], "blark.plain": [[46, 1, 1, "", "PlainFileLoader"]], "blark.plain.PlainFileLoader": [[46, 2, 1, "", "__init__"], [46, 3, 1, "", "filename"], [46, 3, 1, "", "formatted_code"], [46, 3, 1, "", "identifier"], [46, 2, 1, "", "load"], [46, 3, 1, "", "raw_source"], [46, 2, 1, "", "rewrite_code"], [46, 2, 1, "", "save"], [46, 2, 1, "", "save_to"], [46, 3, 1, "", "source_type"], [46, 2, 1, "", "to_file_contents"]], "blark.solution": [[47, 1, 1, "", "DependencyInformation"], [48, 1, 1, "", "DependencyVersion"], [49, 1, 1, "", "LocatedString"], [50, 1, 1, "", "Project"], [51, 1, 1, "", "Solution"], [52, 5, 1, "", "SolutionLoaderError"], [53, 1, 1, "", "TcAction"], [54, 1, 1, "", "TcDUT"], [55, 1, 1, "", "TcDeclImpl"], [56, 1, 1, "", "TcExtraInfo"], [57, 1, 1, "", "TcGVL"], [58, 1, 1, "", "TcIO"], [59, 1, 1, "", "TcMethod"], [60, 1, 1, "", "TcPOU"], [61, 1, 1, "", "TcProperty"], [62, 1, 1, "", "TcSource"], [63, 1, 1, "", "TcSourceChild"], [64, 1, 1, "", "TcTTO"], [65, 1, 1, "", "TcUnknownXml"], [66, 1, 1, "", "TwincatPlcProject"], [67, 1, 1, "", "TwincatSourceCodeItem"], [68, 1, 1, "", "TwincatTsProject"], [69, 5, 1, "", "UnsupportedSourceFileError"], [70, 0, 1, "", "filename_from_xml"], [71, 0, 1, "", "get_blark_input_from_solution"], [72, 0, 1, "", "get_child_located_text"], [73, 0, 1, "", "get_child_text"], [74, 0, 1, "", "get_code_object_from_xml"], [75, 0, 1, "", "get_project_guid"], [76, 0, 1, "", "get_project_target_netid"], [77, 0, 1, "", "get_tcplc_from_xml"], [78, 0, 1, "", "make_solution_from_files"], [79, 0, 1, "", "parse_xml_contents"], [80, 0, 1, "", "parse_xml_file"], [81, 0, 1, "", "project_loader"], [82, 0, 1, "", "projects_from_solution_source"], [83, 0, 1, "", "solution_loader"], [84, 0, 1, "", "split_property_and_base_decl"], [85, 0, 1, "", "strip_implicit_lines"], [86, 0, 1, "", "strip_xml_namespace"], [87, 0, 1, "", "twincat_file_loader"], [88, 0, 1, "", "twincat_file_writer"]], "blark.solution.DependencyInformation": [[47, 2, 1, "", "__init__"], [47, 3, 1, "", "default"], [47, 2, 1, "", "from_xml"], [47, 3, 1, "", "name"], [47, 3, 1, "", "resolution"]], "blark.solution.DependencyVersion": [[48, 2, 1, "", "__init__"], [48, 2, 1, "", "from_string"], [48, 3, 1, "", "name"], [48, 3, 1, "", "namespace"], [48, 3, 1, "", "vendor"], [48, 3, 1, "", "version"]], "blark.solution.LocatedString": [[49, 2, 1, "", "__init__"], [49, 3, 1, "", "column"], [49, 3, 1, "", "filename"], [49, 3, 1, "", "lineno"], [49, 2, 1, "", "to_lines"], [49, 3, 1, "", "value"]], "blark.solution.Project": [[50, 2, 1, "", "__init__"], [50, 2, 1, "", "from_filename"], [50, 3, 1, "", "guid"], [50, 2, 1, "", "load"], [50, 3, 1, "", "loaded"], [50, 3, 1, "", "local_path"], [50, 3, 1, "", "name"], [50, 3, 1, "", "saved_path"], [50, 3, 1, "", "solution_guid"]], "blark.solution.Solution": [[51, 2, 1, "", "__init__"], [51, 3, 1, "", "file_extension"], [51, 3, 1, "", "filename"], [51, 2, 1, "", "from_contents"], [51, 2, 1, "", "from_filename"], [51, 2, 1, "", "from_projects"], [51, 3, 1, "", "projects"], [51, 4, 1, "", "projects_by_name"], [51, 3, 1, "", "root"]], "blark.solution.TcAction": [[53, 2, 1, "", "__init__"], [53, 2, 1, "", "rewrite_code"], [53, 2, 1, "", "to_blark"]], "blark.solution.TcDUT": [[54, 2, 1, "", "__init__"], [54, 3, 1, "", "default_source_type"], [54, 3, 1, "", "file_extension"], [54, 2, 1, "", "rewrite_code"], [54, 2, 1, "", "to_blark"]], "blark.solution.TcDeclImpl": [[55, 2, 1, "", "__init__"], [55, 3, 1, "", "declaration"], [55, 2, 1, "", "declaration_to_blark"], [55, 3, 1, "", "filename"], [55, 2, 1, "", "from_xml"], [55, 3, 1, "", "identifier"], [55, 3, 1, "", "implementation"], [55, 2, 1, "", "implementation_to_blark"], [55, 3, 1, "", "metadata"], [55, 3, 1, "", "parent"], [55, 2, 1, "", "rewrite_code"], [55, 3, 1, "", "source_type"], [55, 2, 1, "", "to_blark"]], "blark.solution.TcExtraInfo": [[56, 2, 1, "", "__init__"], [56, 2, 1, "", "from_xml"], [56, 3, 1, "", "metadata"], [56, 3, 1, "", "parent"], [56, 3, 1, "", "xml"]], "blark.solution.TcGVL": [[57, 2, 1, "", "__init__"], [57, 3, 1, "", "default_source_type"], [57, 3, 1, "", "file_extension"], [57, 2, 1, "", "rewrite_code"], [57, 2, 1, "", "to_blark"]], "blark.solution.TcIO": [[58, 2, 1, "", "__init__"], [58, 2, 1, "", "create_source_child_from_xml"], [58, 3, 1, "", "default_source_type"], [58, 3, 1, "", "file_extension"], [58, 3, 1, "", "parts"], [58, 2, 1, "", "to_blark"]], "blark.solution.TcMethod": [[59, 2, 1, "", "__init__"], [59, 2, 1, "", "rewrite_code"], [59, 2, 1, "", "to_blark"]], "blark.solution.TcPOU": [[60, 2, 1, "", "__init__"], [60, 2, 1, "", "create_source_child_from_xml"], [60, 3, 1, "", "file_extension"], [60, 2, 1, "", "get_child_by_identifier"], [60, 3, 1, "", "parts"], [60, 4, 1, "", "parts_by_name"], [60, 2, 1, "", "rewrite_code"], [60, 2, 1, "", "to_blark"]], "blark.solution.TcProperty": [[61, 2, 1, "", "__init__"], [61, 3, 1, "", "get"], [61, 2, 1, "", "rewrite_code"], [61, 3, 1, "", "set"], [61, 2, 1, "", "to_blark"]], "blark.solution.TcSource": [[62, 2, 1, "", "__init__"], [62, 3, 1, "", "decl"], [62, 3, 1, "", "default_source_type"], [62, 3, 1, "", "filename"], [62, 2, 1, "", "from_contents"], [62, 2, 1, "", "from_filename"], [62, 2, 1, "", "from_xml"], [62, 3, 1, "", "guid"], [62, 3, 1, "", "metadata"], [62, 3, 1, "", "name"], [62, 3, 1, "", "parent"], [62, 2, 1, "", "rewrite_code"], [62, 3, 1, "", "source_type"], [62, 2, 1, "", "to_file_contents"], [62, 2, 1, "", "to_xml"], [62, 3, 1, "", "xml"]], "blark.solution.TcSourceChild": [[63, 2, 1, "", "__init__"], [63, 2, 1, "", "from_xml"], [63, 3, 1, "", "parent"]], "blark.solution.TcTTO": [[64, 2, 1, "", "__init__"], [64, 3, 1, "", "file_extension"], [64, 2, 1, "", "to_blark"], [64, 3, 1, "", "xml"]], "blark.solution.TcUnknownXml": [[65, 2, 1, "", "__init__"], [65, 3, 1, "", "parent"], [65, 2, 1, "", "to_blark"], [65, 3, 1, "", "xml"]], "blark.solution.TwincatPlcProject": [[66, 2, 1, "", "__init__"], [66, 3, 1, "", "dependencies"], [66, 3, 1, "", "file_extension"], [66, 2, 1, "", "from_filename"], [66, 2, 1, "", "from_project_xml"], [66, 2, 1, "", "from_standalone_xml"], [66, 2, 1, "", "from_xti_filename"], [66, 3, 1, "", "guid"], [66, 4, 1, "", "name"], [66, 3, 1, "", "plcproj_path"], [66, 3, 1, "", "properties"], [66, 3, 1, "", "sources"], [66, 3, 1, "", "xti_path"]], "blark.solution.TwincatSourceCodeItem": [[67, 2, 1, "", "__init__"], [67, 3, 1, "", "contents"], [67, 2, 1, "", "from_compile_xml"], [67, 3, 1, "", "guid"], [67, 3, 1, "", "link_always"], [67, 3, 1, "", "local_path"], [67, 3, 1, "", "parent"], [67, 3, 1, "", "raw_contents"], [67, 2, 1, "", "save_to"], [67, 3, 1, "", "saved_path"], [67, 3, 1, "", "subtype"], [67, 2, 1, "", "to_file_contents"]], "blark.solution.TwincatTsProject": [[68, 2, 1, "", "__init__"], [68, 3, 1, "", "file_extension"], [68, 2, 1, "", "from_filename"], [68, 2, 1, "", "from_xml"], [68, 3, 1, "", "guid"], [68, 3, 1, "", "netid"], [68, 3, 1, "", "path"], [68, 3, 1, "", "plcs"], [68, 4, 1, "", "plcs_by_name"]], "blark.solution.UnsupportedSourceFileError": [[69, 2, 1, "", "__init__"], [69, 3, 1, "", "type"]], "blark.sphinxdomain": [[89, 1, 1, "", "BlarkDirective"], [90, 1, 1, "", "BlarkDirectiveWithDeclarations"], [91, 1, 1, "", "BlarkDomain"], [92, 1, 1, "", "BlarkSphinxCache"], [93, 1, 1, "", "BlarkXRefRole"], [94, 1, 1, "", "DeclarationDirective"], [95, 1, 1, "", "FunctionBlockDirective"], [96, 1, 1, "", "FunctionDirective"], [97, 1, 1, "", "GvlDirective"], [98, 1, 1, "", "MissingDeclaration"], [99, 1, 1, "", "ProgramDirective"], [100, 1, 1, "", "TypeDirective"], [101, 1, 1, "", "VariableBlockDirective"], [102, 0, 1, "", "declaration_to_content"], [103, 0, 1, "", "declaration_to_signature"], [104, 0, 1, "", "declarations_to_block"], [105, 0, 1, "", "setup"]], "blark.sphinxdomain.BlarkDirective": [[89, 3, 1, "", "content"], [89, 3, 1, "", "doc_field_types"], [89, 3, 1, "", "domain"], [89, 3, 1, "", "final_argument_whitespace"], [89, 3, 1, "", "has_content"], [89, 3, 1, "", "indexnode"], [89, 3, 1, "", "lineno"], [89, 3, 1, "", "name"], [89, 3, 1, "", "objtype"], [89, 3, 1, "", "option_spec"], [89, 3, 1, "", "optional_arguments"], [89, 3, 1, "", "options"], [89, 3, 1, "", "rawtext"], [89, 3, 1, "", "required_arguments"], [89, 3, 1, "", "text"]], "blark.sphinxdomain.BlarkDirectiveWithDeclarations": [[90, 2, 1, "", "before_content"], [90, 3, 1, "", "doc_field_types"], [90, 2, 1, "", "get_signature_prefix"], [90, 2, 1, "", "handle_signature"], [90, 3, 1, "", "obj"], [90, 2, 1, "", "transform_content"]], "blark.sphinxdomain.BlarkDomain": [[91, 2, 1, "", "clear_doc"], [91, 3, 1, "", "directives"], [91, 2, 1, "", "find_obj"], [91, 3, 1, "", "indices"], [91, 3, 1, "", "initial_data"], [91, 3, 1, "", "label"], [91, 3, 1, "", "name"], [91, 3, 1, "", "object_types"], [91, 2, 1, "", "resolve_xref"], [91, 3, 1, "", "roles"]], "blark.sphinxdomain.BlarkSphinxCache": [[92, 2, 1, "", "__init__"], [92, 3, 1, "", "cache"], [92, 2, 1, "", "configure"], [92, 2, 1, "", "find_by_name"], [92, 2, 1, "", "instance"]], "blark.sphinxdomain.BlarkXRefRole": [[93, 2, 1, "", "process_link"]], "blark.sphinxdomain.DeclarationDirective": [[94, 3, 1, "", "block_header"], [94, 2, 1, "", "handle_signature"], [94, 3, 1, "", "obj"], [94, 2, 1, "", "transform_content"]], "blark.sphinxdomain.FunctionBlockDirective": [[95, 3, 1, "", "obj"], [95, 3, 1, "", "signature_prefix"]], "blark.sphinxdomain.FunctionDirective": [[96, 3, 1, "", "doc_field_types"], [96, 3, 1, "", "obj"], [96, 3, 1, "", "signature_prefix"]], "blark.sphinxdomain.GvlDirective": [[97, 3, 1, "", "obj"], [97, 3, 1, "", "signature_prefix"]], "blark.sphinxdomain.MissingDeclaration": [[98, 2, 1, "", "__init__"], [98, 3, 1, "", "declarations"], [98, 3, 1, "", "declarations_by_block"], [98, 3, 1, "", "name"], [98, 3, 1, "", "source_code"]], "blark.sphinxdomain.ProgramDirective": [[99, 3, 1, "", "obj"], [99, 3, 1, "", "signature_prefix"]], "blark.sphinxdomain.TypeDirective": [[100, 3, 1, "", "obj"], [100, 3, 1, "", "signature_prefix"]], "blark.sphinxdomain.VariableBlockDirective": [[101, 3, 1, "", "block_header"], [101, 3, 1, "", "declarations"], [101, 2, 1, "", "handle_signature"], [101, 3, 1, "", "parent_name"], [101, 2, 1, "", "transform_content"]], "blark.summary": [[106, 1, 1, "", "ActionSummary"], [107, 1, 1, "", "CodeSummary"], [108, 1, 1, "", "DataTypeSummary"], [109, 1, 1, "", "DeclarationSummary"], [110, 1, 1, "", "FunctionBlockSummary"], [111, 1, 1, "", "FunctionSummary"], [112, 1, 1, "", "GlobalVariableSummary"], [113, 1, 1, "", "InterfaceSummary"], [114, 1, 1, "", "LinkableItems"], [115, 1, 1, "", "MethodSummary"], [116, 1, 1, "", "ProgramSummary"], [117, 1, 1, "", "PropertyGetSetSummary"], [118, 1, 1, "", "PropertySummary"], [119, 1, 1, "", "Summary"], [120, 0, 1, "", "get_linkable_declarations"], [121, 0, 1, "", "path_to_file_and_line"], [122, 0, 1, "", "text_outline"]], "blark.summary.ActionSummary": [[106, 2, 1, "", "__init__"], [106, 2, 1, "", "from_action"], [106, 2, 1, "", "from_statement_list"], [106, 3, 1, "", "implementation"], [106, 3, 1, "", "item"], [106, 3, 1, "", "name"], [106, 3, 1, "", "source_code"]], "blark.summary.CodeSummary": [[107, 2, 1, "", "__init__"], [107, 2, 1, "", "append"], [107, 3, 1, "", "data_types"], [107, 2, 1, "", "find"], [107, 2, 1, "", "find_code_object_by_dotted_name"], [107, 2, 1, "", "find_path"], [107, 2, 1, "", "from_parse_results"], [107, 3, 1, "", "function_blocks"], [107, 3, 1, "", "functions"], [107, 2, 1, "", "get_all_items_by_name"], [107, 2, 1, "", "get_item_by_name"], [107, 3, 1, "", "globals"], [107, 3, 1, "", "interfaces"], [107, 3, 1, "", "programs"], [107, 2, 1, "", "squash"]], "blark.summary.DataTypeSummary": [[108, 2, 1, "", "__init__"], [108, 3, 1, "", "declarations"], [108, 4, 1, "", "declarations_by_block"], [108, 3, 1, "", "extends"], [108, 2, 1, "", "from_data_type"], [108, 3, 1, "", "item"], [108, 3, 1, "", "name"], [108, 3, 1, "", "source_code"], [108, 2, 1, "", "squash_base_extends"], [108, 3, 1, "", "squashed"], [108, 3, 1, "", "type"]], "blark.summary.DeclarationSummary": [[109, 2, 1, "", "__init__"], [109, 3, 1, "", "base_type"], [109, 3, 1, "", "block"], [109, 2, 1, "", "from_block"], [109, 2, 1, "", "from_declaration"], [109, 2, 1, "", "from_global_variable"], [109, 3, 1, "", "item"], [109, 3, 1, "", "location"], [109, 4, 1, "", "location_type"], [109, 3, 1, "", "name"], [109, 3, 1, "", "parent"], [109, 4, 1, "", "qualified_name"], [109, 3, 1, "", "type"], [109, 3, 1, "", "value"]], "blark.summary.FunctionBlockSummary": [[110, 2, 1, "", "__init__"], [110, 3, 1, "", "actions"], [110, 3, 1, "", "declarations"], [110, 4, 1, "", "declarations_by_block"], [110, 3, 1, "", "extends"], [110, 2, 1, "", "from_function_block"], [110, 3, 1, "", "implementation"], [110, 3, 1, "", "item"], [110, 3, 1, "", "methods"], [110, 3, 1, "", "name"], [110, 3, 1, "", "properties"], [110, 3, 1, "", "source_code"], [110, 2, 1, "", "squash_base_extends"], [110, 3, 1, "", "squashed"]], "blark.summary.FunctionSummary": [[111, 2, 1, "", "__init__"], [111, 3, 1, "", "declarations"], [111, 4, 1, "", "declarations_by_block"], [111, 2, 1, "", "from_function"], [111, 3, 1, "", "implementation"], [111, 3, 1, "", "item"], [111, 3, 1, "", "name"], [111, 3, 1, "", "return_type"], [111, 3, 1, "", "source_code"]], "blark.summary.GlobalVariableSummary": [[112, 2, 1, "", "__init__"], [112, 3, 1, "", "declarations"], [112, 4, 1, "", "declarations_by_block"], [112, 2, 1, "", "from_globals"], [112, 3, 1, "", "item"], [112, 3, 1, "", "name"], [112, 3, 1, "", "qualified_only"], [112, 3, 1, "", "source_code"], [112, 3, 1, "", "type"]], "blark.summary.InterfaceSummary": [[113, 2, 1, "", "__init__"], [113, 3, 1, "", "declarations"], [113, 4, 1, "", "declarations_by_block"], [113, 3, 1, "", "extends"], [113, 2, 1, "", "from_interface"], [113, 3, 1, "", "item"], [113, 3, 1, "", "methods"], [113, 3, 1, "", "name"], [113, 3, 1, "", "properties"], [113, 3, 1, "", "source_code"], [113, 2, 1, "", "squash_base_extends"], [113, 3, 1, "", "squashed"]], "blark.summary.LinkableItems": [[114, 2, 1, "", "__init__"], [114, 3, 1, "", "input"], [114, 3, 1, "", "memory"], [114, 3, 1, "", "output"]], "blark.summary.MethodSummary": [[115, 2, 1, "", "__init__"], [115, 3, 1, "", "declarations"], [115, 4, 1, "", "declarations_by_block"], [115, 2, 1, "", "from_method"], [115, 3, 1, "", "implementation"], [115, 3, 1, "", "item"], [115, 3, 1, "", "name"], [115, 3, 1, "", "return_type"], [115, 3, 1, "", "source_code"]], "blark.summary.ProgramSummary": [[116, 2, 1, "", "__init__"], [116, 3, 1, "", "actions"], [116, 3, 1, "", "declarations"], [116, 4, 1, "", "declarations_by_block"], [116, 2, 1, "", "from_program"], [116, 3, 1, "", "implementation"], [116, 3, 1, "", "item"], [116, 3, 1, "", "methods"], [116, 3, 1, "", "name"], [116, 3, 1, "", "properties"], [116, 3, 1, "", "source_code"]], "blark.summary.PropertyGetSetSummary": [[117, 2, 1, "", "__init__"], [117, 3, 1, "", "declarations"], [117, 3, 1, "", "implementation"], [117, 3, 1, "", "item"], [117, 3, 1, "", "name"], [117, 3, 1, "", "source_code"]], "blark.summary.PropertySummary": [[118, 2, 1, "", "__init__"], [118, 2, 1, "", "from_property"], [118, 3, 1, "", "getter"], [118, 3, 1, "", "name"], [118, 3, 1, "", "setter"], [118, 3, 1, "", "source_code"]], "blark.summary.Summary": [[119, 2, 1, "", "__init__"], [119, 3, 1, "", "comments"], [119, 3, 1, "", "filename"], [119, 2, 1, "", "get_meta_kwargs"], [119, 3, 1, "", "meta"], [119, 3, 1, "", "pragmas"]], "blark.transform": [[123, 1, 1, "", "AccessDeclaration"], [124, 1, 1, "", "AccessDeclarations"], [125, 1, 1, "", "AccessSpecifier"], [126, 1, 1, "", "Action"], [127, 1, 1, "", "ArrayInitialElement"], [128, 1, 1, "", "ArrayInitialization"], [129, 1, 1, "", "ArraySpecification"], [130, 1, 1, "", "ArrayTypeDeclaration"], [131, 1, 1, "", "ArrayTypeInitialization"], [132, 1, 1, "", "ArrayVariableInitDeclaration"], [133, 1, 1, "", "AssignmentStatement"], [134, 1, 1, "", "BinaryBitString"], [135, 1, 1, "", "BinaryInteger"], [136, 1, 1, "", "BinaryOperation"], [137, 1, 1, "", "BitString"], [138, 1, 1, "", "Boolean"], [139, 1, 1, "", "BracketedExpression"], [140, 1, 1, "", "CaseElement"], [141, 1, 1, "", "CaseStatement"], [142, 1, 1, "", "ChainedFunctionCall"], [143, 1, 1, "", "ChainedFunctionCallStatement"], [144, 1, 1, "", "ContinueStatement"], [145, 1, 1, "", "DataType"], [146, 1, 1, "", "DataTypeDeclaration"], [147, 1, 1, "", "Date"], [148, 1, 1, "", "DateTime"], [149, 1, 1, "", "DeclaredVariable"], [150, 1, 1, "", "DirectVariable"], [151, 1, 1, "", "Duration"], [152, 1, 1, "", "EdgeDeclaration"], [153, 1, 1, "", "ElseClause"], [154, 1, 1, "", "ElseIfClause"], [155, 1, 1, "", "EnumeratedSpecification"], [156, 1, 1, "", "EnumeratedTypeDeclaration"], [157, 1, 1, "", "EnumeratedTypeInitialization"], [158, 1, 1, "", "EnumeratedValue"], [159, 1, 1, "", "ExitStatement"], [160, 1, 1, "", "Expression"], [161, 1, 1, "", "ExtendedSourceCode"], [162, 1, 1, "", "Extends"], [163, 1, 1, "", "ExternalVariableDeclaration"], [164, 1, 1, "", "ExternalVariableDeclarations"], [165, 1, 1, "", "FieldSelector"], [166, 1, 1, "", "ForStatement"], [167, 1, 1, "", "FormatSettings"], [168, 1, 1, "", "FullSubrange"], [169, 1, 1, "", "Function"], [170, 1, 1, "", "FunctionBlock"], [171, 1, 1, "", "FunctionBlockDeclaration"], [172, 1, 1, "", "FunctionBlockInvocationDeclaration"], [173, 1, 1, "", "FunctionBlockNameDeclaration"], [174, 1, 1, "", "FunctionCall"], [175, 1, 1, "", "FunctionCallStatement"], [176, 1, 1, "", "FunctionVariableDeclarations"], [177, 1, 1, "", "GlobalVariableAttributes"], [178, 1, 1, "", "GlobalVariableDeclaration"], [179, 1, 1, "", "GlobalVariableDeclarations"], [180, 1, 1, "", "GlobalVariableSpec"], [181, 1, 1, "", "GrammarTransformer"], [182, 1, 1, "", "HexBitString"], [183, 1, 1, "", "HexInteger"], [184, 1, 1, "", "IfStatement"], [185, 1, 1, "", "Implements"], [186, 1, 1, "", "IncompleteLocatedVariableDeclaration"], [187, 1, 1, "", "IncompleteLocatedVariableDeclarations"], [188, 1, 1, "", "IncompleteLocation"], [189, 1, 1, "", "IndirectSimpleSpecification"], [190, 1, 1, "", "IndirectionType"], [191, 1, 1, "", "InitDeclaration"], [192, 1, 1, "", "InitializedStructure"], [193, 1, 1, "", "InputDeclarations"], [194, 1, 1, "", "InputOutputDeclarations"], [195, 1, 1, "", "InputParameterAssignment"], [196, 1, 1, "", "Integer"], [197, 1, 1, "", "Interface"], [198, 1, 1, "", "JumpStatement"], [199, 1, 1, "", "LabeledStatement"], [200, 1, 1, "", "Ldate"], [201, 1, 1, "", "LdateTime"], [202, 1, 1, "", "Lduration"], [203, 1, 1, "", "Literal"], [204, 1, 1, "", "LocatedVariableDeclaration"], [205, 1, 1, "", "LocatedVariableDeclarations"], [206, 1, 1, "", "Location"], [207, 1, 1, "", "LtimeOfDay"], [208, 1, 1, "", "Meta"], [209, 1, 1, "", "Method"], [210, 1, 1, "", "MethodInstanceVariableDeclarations"], [211, 1, 1, "", "MultiElementVariable"], [212, 1, 1, "", "NoOpStatement"], [213, 1, 1, "", "ObjectInitializerArray"], [214, 1, 1, "", "OctalBitString"], [215, 1, 1, "", "OctalInteger"], [216, 1, 1, "", "OutputDeclarations"], [217, 1, 1, "", "OutputParameterAssignment"], [218, 1, 1, "", "ParameterAssignment"], [219, 1, 1, "", "ParenthesizedExpression"], [220, 1, 1, "", "PartialSubrange"], [221, 1, 1, "", "Program"], [222, 1, 1, "", "Property"], [223, 1, 1, "", "Real"], [224, 1, 1, "", "ReferenceAssignmentStatement"], [225, 1, 1, "", "RepeatStatement"], [226, 1, 1, "", "ResetStatement"], [227, 1, 1, "", "ReturnStatement"], [228, 1, 1, "", "SetStatement"], [229, 1, 1, "", "SimpleSpecification"], [230, 1, 1, "", "SimpleTypeDeclaration"], [231, 1, 1, "", "SimpleVariable"], [232, 1, 1, "", "SourceCode"], [233, 1, 1, "", "Statement"], [234, 1, 1, "", "StatementList"], [235, 1, 1, "", "StaticDeclarations"], [236, 1, 1, "", "String"], [237, 1, 1, "", "StringSpecLength"], [238, 1, 1, "", "StringTypeDeclaration"], [239, 1, 1, "", "StringTypeInitialization"], [240, 1, 1, "", "StringTypeSpecification"], [241, 1, 1, "", "StringVariableInitDeclaration"], [242, 1, 1, "", "StructureElementDeclaration"], [243, 1, 1, "", "StructureElementInitialization"], [244, 1, 1, "", "StructureInitialization"], [245, 1, 1, "", "StructureTypeDeclaration"], [246, 1, 1, "", "StructuredVariableInitDeclaration"], [247, 1, 1, "", "Subrange"], [248, 1, 1, "", "SubrangeSpecification"], [249, 1, 1, "", "SubrangeTypeDeclaration"], [250, 1, 1, "", "SubrangeTypeInitialization"], [251, 1, 1, "", "SubscriptList"], [252, 1, 1, "", "TemporaryVariableDeclarations"], [253, 1, 1, "", "TimeOfDay"], [254, 1, 1, "", "TypeInformation"], [255, 1, 1, "", "TypeInitialization"], [256, 1, 1, "", "TypeInitializationBase"], [257, 1, 1, "", "TypeSpecificationBase"], [258, 1, 1, "", "UnaryOperation"], [259, 1, 1, "", "UnionElementDeclaration"], [260, 1, 1, "", "UnionTypeDeclaration"], [261, 1, 1, "", "UnresolvedTypeInformation"], [262, 1, 1, "", "Variable"], [263, 1, 1, "", "VariableAttributes"], [264, 1, 1, "", "VariableDeclarationBlock"], [265, 1, 1, "", "VariableDeclarations"], [266, 1, 1, "", "VariableLocationPrefix"], [267, 1, 1, "", "VariableOneInitDeclaration"], [268, 1, 1, "", "VariableSizePrefix"], [269, 1, 1, "", "WhileStatement"], [270, 1, 1, "", "_ArrayInitialElementCount"], [271, 1, 1, "", "_BareArrayInitialization"], [272, 1, 1, "", "_BracketedArrayInitialization"], [273, 1, 1, "", "_FlagHelper"], [274, 1, 1, "", "_GenericInit"], [275, 0, 1, "", "configure_formatting"], [276, 0, 1, "", "get_grammar_for_class"], [277, 0, 1, "", "indent"], [278, 0, 1, "", "indent_if"], [279, 0, 1, "", "join_if"], [280, 0, 1, "", "merge_comments"], [281, 0, 1, "", "meta_field"], [282, 0, 1, "", "multiline_code_block"], [283, 0, 1, "", "transform"]], "blark.transform.AccessDeclaration": [[123, 2, 1, "", "__init__"], [123, 3, 1, "", "direction"], [123, 2, 1, "", "from_lark"], [123, 3, 1, "", "meta"], [123, 3, 1, "", "name"], [123, 3, 1, "", "type"], [123, 3, 1, "", "variable"]], "blark.transform.AccessDeclarations": [[124, 2, 1, "", "__init__"], [124, 3, 1, "", "block_header"], [124, 2, 1, "", "from_lark"], [124, 3, 1, "", "items"], [124, 3, 1, "", "meta"]], "blark.transform.AccessSpecifier": [[125, 3, 1, "", "abstract"], [125, 3, 1, "", "final"], [125, 3, 1, "", "internal"], [125, 3, 1, "", "private"], [125, 3, 1, "", "protected"], [125, 3, 1, "", "public"]], "blark.transform.Action": [[126, 2, 1, "", "__init__"], [126, 3, 1, "", "body"], [126, 2, 1, "", "from_lark"], [126, 3, 1, "", "meta"], [126, 3, 1, "", "name"]], "blark.transform.ArrayInitialElement": [[127, 2, 1, "", "__init__"], [127, 3, 1, "", "count"], [127, 3, 1, "", "element"], [127, 2, 1, "", "from_lark"], [127, 3, 1, "", "meta"]], "blark.transform.ArrayInitialization": [[128, 2, 1, "", "__init__"], [128, 3, 1, "", "brackets"], [128, 3, 1, "", "elements"], [128, 3, 1, "", "meta"]], "blark.transform.ArraySpecification": [[129, 2, 1, "", "__init__"], [129, 4, 1, "", "base_type_name"], [129, 2, 1, "", "from_lark"], [129, 4, 1, "", "full_type_name"], [129, 3, 1, "", "meta"], [129, 3, 1, "", "subranges"], [129, 3, 1, "", "type"]], "blark.transform.ArrayTypeDeclaration": [[130, 2, 1, "", "__init__"], [130, 2, 1, "", "from_lark"], [130, 3, 1, "", "init"], [130, 3, 1, "", "meta"], [130, 3, 1, "", "name"]], "blark.transform.ArrayTypeInitialization": [[131, 2, 1, "", "__init__"], [131, 2, 1, "", "from_lark"], [131, 3, 1, "", "indirection"], [131, 3, 1, "", "meta"], [131, 3, 1, "", "spec"], [131, 3, 1, "", "value"]], "blark.transform.ArrayVariableInitDeclaration": [[132, 2, 1, "", "__init__"], [132, 2, 1, "", "from_lark"], [132, 3, 1, "", "init"], [132, 3, 1, "", "meta"], [132, 3, 1, "", "variables"]], "blark.transform.AssignmentStatement": [[133, 2, 1, "", "__init__"], [133, 3, 1, "", "expression"], [133, 2, 1, "", "from_lark"], [133, 3, 1, "", "meta"], [133, 3, 1, "", "variables"]], "blark.transform.BinaryBitString": [[134, 2, 1, "", "__init__"], [134, 3, 1, "", "base"], [134, 3, 1, "", "meta"]], "blark.transform.BinaryInteger": [[135, 2, 1, "", "__init__"], [135, 3, 1, "", "base"]], "blark.transform.BinaryOperation": [[136, 2, 1, "", "__init__"], [136, 2, 1, "", "from_lark"], [136, 3, 1, "", "left"], [136, 3, 1, "", "meta"], [136, 3, 1, "", "op"], [136, 3, 1, "", "right"]], "blark.transform.BitString": [[137, 2, 1, "", "__init__"], [137, 3, 1, "", "base"], [137, 2, 1, "", "from_lark"], [137, 3, 1, "", "meta"], [137, 3, 1, "", "type_name"], [137, 3, 1, "", "value"]], "blark.transform.Boolean": [[138, 2, 1, "", "__init__"], [138, 3, 1, "", "meta"], [138, 3, 1, "", "value"]], "blark.transform.BracketedExpression": [[139, 2, 1, "", "__init__"], [139, 3, 1, "", "expression"], [139, 2, 1, "", "from_lark"], [139, 3, 1, "", "meta"]], "blark.transform.CaseElement": [[140, 2, 1, "", "__init__"], [140, 2, 1, "", "from_lark"], [140, 3, 1, "", "matches"], [140, 3, 1, "", "meta"], [140, 3, 1, "", "statements"]], "blark.transform.CaseStatement": [[141, 2, 1, "", "__init__"], [141, 3, 1, "", "cases"], [141, 3, 1, "", "else_clause"], [141, 3, 1, "", "expression"], [141, 2, 1, "", "from_lark"], [141, 3, 1, "", "meta"]], "blark.transform.ChainedFunctionCall": [[142, 2, 1, "", "__init__"], [142, 2, 1, "", "from_lark"], [142, 3, 1, "", "invocations"], [142, 3, 1, "", "meta"]], "blark.transform.ChainedFunctionCallStatement": [[143, 2, 1, "", "__init__"], [143, 2, 1, "", "from_lark"], [143, 3, 1, "", "invocations"], [143, 3, 1, "", "meta"]], "blark.transform.ContinueStatement": [[144, 2, 1, "", "__init__"], [144, 2, 1, "", "from_lark"], [144, 3, 1, "", "meta"]], "blark.transform.DataType": [[145, 2, 1, "", "__init__"], [145, 2, 1, "", "from_lark"], [145, 3, 1, "", "indirection"], [145, 3, 1, "", "meta"], [145, 3, 1, "", "type_name"]], "blark.transform.DataTypeDeclaration": [[146, 2, 1, "", "__init__"], [146, 3, 1, "", "access"], [146, 3, 1, "", "declaration"], [146, 2, 1, "", "from_lark"], [146, 3, 1, "", "meta"]], "blark.transform.Date": [[147, 2, 1, "", "__init__"], [147, 3, 1, "", "day"], [147, 2, 1, "", "from_lark"], [147, 3, 1, "", "meta"], [147, 3, 1, "", "month"], [147, 4, 1, "", "value"], [147, 3, 1, "", "year"]], "blark.transform.DateTime": [[148, 2, 1, "", "__init__"], [148, 3, 1, "", "date"], [148, 2, 1, "", "from_lark"], [148, 3, 1, "", "meta"], [148, 3, 1, "", "time"], [148, 4, 1, "", "value"]], "blark.transform.DeclaredVariable": [[149, 2, 1, "", "__init__"], [149, 4, 1, "", "dereferenced"], [149, 2, 1, "", "from_lark"], [149, 3, 1, "", "location"], [149, 3, 1, "", "meta"], [149, 4, 1, "", "name"], [149, 3, 1, "", "variable"]], "blark.transform.DirectVariable": [[150, 2, 1, "", "__init__"], [150, 3, 1, "", "bits"], [150, 2, 1, "", "from_lark"], [150, 3, 1, "", "location"], [150, 3, 1, "", "location_prefix"], [150, 3, 1, "", "meta"], [150, 3, 1, "", "size_prefix"]], "blark.transform.Duration": [[151, 2, 1, "", "__init__"], [151, 3, 1, "", "days"], [151, 2, 1, "", "from_lark"], [151, 3, 1, "", "hours"], [151, 3, 1, "", "meta"], [151, 3, 1, "", "milliseconds"], [151, 3, 1, "", "minutes"], [151, 3, 1, "", "negative"], [151, 3, 1, "", "seconds"], [151, 4, 1, "", "value"]], "blark.transform.EdgeDeclaration": [[152, 2, 1, "", "__init__"], [152, 3, 1, "", "edge"], [152, 2, 1, "", "from_lark"], [152, 3, 1, "", "meta"], [152, 3, 1, "", "variables"]], "blark.transform.ElseClause": [[153, 2, 1, "", "__init__"], [153, 2, 1, "", "from_lark"], [153, 3, 1, "", "meta"], [153, 3, 1, "", "statements"]], "blark.transform.ElseIfClause": [[154, 2, 1, "", "__init__"], [154, 2, 1, "", "from_lark"], [154, 3, 1, "", "if_expression"], [154, 3, 1, "", "meta"], [154, 3, 1, "", "statements"]], "blark.transform.EnumeratedSpecification": [[155, 2, 1, "", "__init__"], [155, 2, 1, "", "from_lark"], [155, 3, 1, "", "meta"], [155, 3, 1, "", "type_name"], [155, 3, 1, "", "values"]], "blark.transform.EnumeratedTypeDeclaration": [[156, 2, 1, "", "__init__"], [156, 2, 1, "", "from_lark"], [156, 3, 1, "", "init"], [156, 3, 1, "", "meta"], [156, 3, 1, "", "name"]], "blark.transform.EnumeratedTypeInitialization": [[157, 2, 1, "", "__init__"], [157, 2, 1, "", "from_lark"], [157, 3, 1, "", "indirection"], [157, 3, 1, "", "meta"], [157, 3, 1, "", "spec"], [157, 3, 1, "", "value"]], "blark.transform.EnumeratedValue": [[158, 2, 1, "", "__init__"], [158, 2, 1, "", "from_lark"], [158, 3, 1, "", "meta"], [158, 3, 1, "", "name"], [158, 3, 1, "", "type_name"], [158, 3, 1, "", "value"]], "blark.transform.ExitStatement": [[159, 2, 1, "", "__init__"], [159, 2, 1, "", "from_lark"], [159, 3, 1, "", "meta"]], "blark.transform.Expression": [[160, 2, 1, "", "__init__"]], "blark.transform.ExtendedSourceCode": [[161, 2, 1, "", "__init__"], [161, 3, 1, "", "items"]], "blark.transform.Extends": [[162, 2, 1, "", "__init__"], [162, 2, 1, "", "from_lark"], [162, 3, 1, "", "meta"], [162, 3, 1, "", "name"]], "blark.transform.ExternalVariableDeclaration": [[163, 2, 1, "", "__init__"], [163, 2, 1, "", "from_lark"], [163, 3, 1, "", "meta"], [163, 3, 1, "", "name"], [163, 3, 1, "", "spec"]], "blark.transform.ExternalVariableDeclarations": [[164, 2, 1, "", "__init__"], [164, 3, 1, "", "attrs"], [164, 3, 1, "", "block_header"], [164, 2, 1, "", "from_lark"], [164, 3, 1, "", "items"], [164, 3, 1, "", "meta"]], "blark.transform.FieldSelector": [[165, 2, 1, "", "__init__"], [165, 3, 1, "", "dereferenced"], [165, 3, 1, "", "field"], [165, 2, 1, "", "from_lark"], [165, 3, 1, "", "meta"]], "blark.transform.ForStatement": [[166, 2, 1, "", "__init__"], [166, 3, 1, "", "control"], [166, 3, 1, "", "from_"], [166, 2, 1, "", "from_lark"], [166, 3, 1, "", "meta"], [166, 3, 1, "", "statements"], [166, 3, 1, "", "step"], [166, 3, 1, "", "to"]], "blark.transform.FormatSettings": [[167, 2, 1, "", "__init__"], [167, 3, 1, "", "indent"]], "blark.transform.FullSubrange": [[168, 2, 1, "", "__init__"], [168, 3, 1, "", "meta"]], "blark.transform.Function": [[169, 2, 1, "", "__init__"], [169, 3, 1, "", "access"], [169, 3, 1, "", "body"], [169, 3, 1, "", "declarations"], [169, 2, 1, "", "from_lark"], [169, 3, 1, "", "meta"], [169, 3, 1, "", "name"], [169, 3, 1, "", "return_type"]], "blark.transform.FunctionBlock": [[170, 2, 1, "", "__init__"], [170, 3, 1, "", "access"], [170, 3, 1, "", "body"], [170, 3, 1, "", "declarations"], [170, 3, 1, "", "extends"], [170, 2, 1, "", "from_lark"], [170, 3, 1, "", "implements"], [170, 3, 1, "", "meta"], [170, 3, 1, "", "name"]], "blark.transform.FunctionBlockInvocationDeclaration": [[172, 2, 1, "", "__init__"], [172, 3, 1, "", "defaults"], [172, 2, 1, "", "from_lark"], [172, 3, 1, "", "init"], [172, 3, 1, "", "meta"], [172, 3, 1, "", "variables"]], "blark.transform.FunctionBlockNameDeclaration": [[173, 2, 1, "", "__init__"], [173, 2, 1, "", "from_lark"], [173, 3, 1, "", "init"], [173, 3, 1, "", "meta"], [173, 3, 1, "", "spec"], [173, 3, 1, "", "variables"]], "blark.transform.FunctionCall": [[174, 2, 1, "", "__init__"], [174, 4, 1, "", "base_type_name"], [174, 3, 1, "", "dereferenced"], [174, 2, 1, "", "from_lark"], [174, 4, 1, "", "full_type_name"], [174, 3, 1, "", "meta"], [174, 3, 1, "", "name"], [174, 3, 1, "", "parameters"], [174, 4, 1, "", "value"]], "blark.transform.FunctionCallStatement": [[175, 2, 1, "", "from_lark"]], "blark.transform.FunctionVariableDeclarations": [[176, 2, 1, "", "__init__"], [176, 3, 1, "", "attrs"], [176, 3, 1, "", "block_header"], [176, 2, 1, "", "from_lark"], [176, 3, 1, "", "items"], [176, 3, 1, "", "meta"]], "blark.transform.GlobalVariableAttributes": [[177, 3, 1, "", "constant"], [177, 3, 1, "", "internal"], [177, 3, 1, "", "non_retain"], [177, 3, 1, "", "persistent"], [177, 3, 1, "", "retain"]], "blark.transform.GlobalVariableDeclaration": [[178, 2, 1, "", "__init__"], [178, 4, 1, "", "base_type_name"], [178, 2, 1, "", "from_lark"], [178, 4, 1, "", "full_type_name"], [178, 3, 1, "", "init"], [178, 4, 1, "", "location"], [178, 3, 1, "", "meta"], [178, 3, 1, "", "spec"], [178, 4, 1, "", "variables"]], "blark.transform.GlobalVariableDeclarations": [[179, 2, 1, "", "__init__"], [179, 3, 1, "", "attrs"], [179, 3, 1, "", "block_header"], [179, 2, 1, "", "from_lark"], [179, 3, 1, "", "items"], [179, 3, 1, "", "meta"], [179, 3, 1, "", "name"]], "blark.transform.GlobalVariableSpec": [[180, 2, 1, "", "__init__"], [180, 2, 1, "", "from_lark"], [180, 3, 1, "", "location"], [180, 3, 1, "", "meta"], [180, 3, 1, "", "variables"]], "blark.transform.GrammarTransformer": [[181, 2, 1, "", "__init__"], [181, 2, 1, "", "access_specifier"], [181, 2, 1, "", "action"], [181, 2, 1, "", "add_expression"], [181, 2, 1, "", "and_expression"], [181, 2, 1, "", "and_then_expression"], [181, 2, 1, "", "array_initial_element"], [181, 2, 1, "", "array_initial_element_count"], [181, 2, 1, "", "array_spec_init"], [181, 2, 1, "", "array_specification"], [181, 2, 1, "", "array_type_declaration"], [181, 2, 1, "", "array_var_init_decl"], [181, 2, 1, "", "assignment_expression"], [181, 2, 1, "", "assignment_statement"], [181, 2, 1, "", "bare_array_initialization"], [181, 2, 1, "", "binary_bit_string_literal"], [181, 2, 1, "", "binary_integer"], [181, 2, 1, "", "bit_string_literal"], [181, 2, 1, "", "bracketed_array_initialization"], [181, 2, 1, "", "bracketed_expression"], [181, 2, 1, "", "case_element"], [181, 2, 1, "", "case_element_statement_list"], [181, 2, 1, "", "case_elements"], [181, 2, 1, "", "case_statement"], [181, 2, 1, "", "chained_function_call"], [181, 2, 1, "", "chained_function_call_statement"], [181, 3, 1, "", "comments"], [181, 2, 1, "", "comparison_expression"], [181, 2, 1, "", "constant"], [181, 2, 1, "", "continue_statement"], [181, 2, 1, "", "data_type_declaration"], [181, 2, 1, "", "date"], [181, 2, 1, "", "date_and_time"], [181, 2, 1, "", "direct_variable"], [181, 2, 1, "", "double_byte_string_spec"], [181, 2, 1, "", "double_byte_string_var_declaration"], [181, 2, 1, "", "duration"], [181, 2, 1, "", "edge_declaration"], [181, 2, 1, "", "else_clause"], [181, 2, 1, "", "else_if_clause"], [181, 2, 1, "", "end_of_statement_list_label"], [181, 2, 1, "", "enumerated_spec_init"], [181, 2, 1, "", "enumerated_specification"], [181, 2, 1, "", "enumerated_type_declaration"], [181, 2, 1, "", "enumerated_value"], [181, 2, 1, "", "equality_expression"], [181, 2, 1, "", "exit_statement"], [181, 2, 1, "", "expression"], [181, 2, 1, "", "expression_term"], [181, 2, 1, "", "extends"], [181, 2, 1, "", "external_declaration"], [181, 2, 1, "", "external_var_declarations"], [181, 2, 1, "", "false"], [181, 2, 1, "", "fb_decl_name_list"], [181, 2, 1, "", "fb_invocation_decl"], [181, 2, 1, "", "fb_name_decl"], [181, 2, 1, "", "field_selector"], [181, 2, 1, "", "for_statement"], [181, 2, 1, "", "full_subrange"], [181, 2, 1, "", "function_block_method_declaration"], [181, 2, 1, "", "function_block_property_declaration"], [181, 2, 1, "", "function_block_type_declaration"], [181, 2, 1, "", "function_call"], [181, 2, 1, "", "function_call_statement"], [181, 2, 1, "", "function_declaration"], [181, 2, 1, "", "function_var_declarations"], [181, 2, 1, "", "global_var_decl"], [181, 2, 1, "", "global_var_declarations"], [181, 2, 1, "", "global_var_spec"], [181, 2, 1, "", "global_variable_attributes"], [181, 2, 1, "", "hex_bit_string_literal"], [181, 2, 1, "", "hex_integer"], [181, 2, 1, "", "iec_source"], [181, 2, 1, "", "if_statement"], [181, 2, 1, "", "implements"], [181, 2, 1, "", "incomplete_located_var_decl"], [181, 2, 1, "", "incomplete_located_var_declarations"], [181, 2, 1, "", "incomplete_location"], [181, 2, 1, "", "indirect_simple_specification"], [181, 2, 1, "", "indirection_type"], [181, 2, 1, "", "initialized_structure"], [181, 2, 1, "", "input_declarations"], [181, 2, 1, "", "input_output_declarations"], [181, 2, 1, "", "input_param_assignment"], [181, 2, 1, "", "integer"], [181, 2, 1, "", "integer_literal"], [181, 2, 1, "", "interface_declaration"], [181, 2, 1, "", "jmp_statement"], [181, 2, 1, "", "labeled_statement"], [181, 2, 1, "", "ldate"], [181, 2, 1, "", "ldate_and_time"], [181, 2, 1, "", "lduration"], [181, 2, 1, "", "located_var_decl"], [181, 2, 1, "", "located_var_declarations"], [181, 2, 1, "", "location"], [181, 2, 1, "", "ltime_of_day"], [181, 2, 1, "", "multi_element_variable"], [181, 2, 1, "", "no_op_statement"], [181, 2, 1, "", "non_generic_type_name"], [181, 2, 1, "", "object_initializer_array"], [181, 2, 1, "", "octal_bit_string_literal"], [181, 2, 1, "", "octal_integer"], [181, 2, 1, "", "or_else_expression"], [181, 2, 1, "", "output_declarations"], [181, 2, 1, "", "output_parameter_assignment"], [181, 2, 1, "", "param_assignment"], [181, 2, 1, "", "parenthesized_expression"], [181, 2, 1, "", "pointer_type"], [181, 2, 1, "", "program_access_decl"], [181, 2, 1, "", "program_access_decls"], [181, 2, 1, "", "program_declaration"], [181, 2, 1, "", "program_var_declarations"], [181, 2, 1, "", "real_literal"], [181, 2, 1, "", "reference_assignment_statement"], [181, 2, 1, "", "repeat_statement"], [181, 2, 1, "", "reset_statement"], [181, 2, 1, "", "return_statement"], [181, 2, 1, "", "set_statement"], [181, 2, 1, "", "signed_integer"], [181, 2, 1, "", "simple_spec_init"], [181, 2, 1, "", "simple_specification"], [181, 2, 1, "", "simple_type_declaration"], [181, 2, 1, "", "single_byte_string_spec"], [181, 2, 1, "", "single_byte_string_var_declaration"], [181, 2, 1, "", "statement_list"], [181, 2, 1, "", "static_var_declarations"], [181, 2, 1, "", "string_literal"], [181, 2, 1, "", "string_spec_length"], [181, 2, 1, "", "string_type_declaration"], [181, 2, 1, "", "string_type_specification"], [181, 2, 1, "", "structure_element_declaration"], [181, 2, 1, "", "structure_element_initialization"], [181, 2, 1, "", "structure_initialization"], [181, 2, 1, "", "structure_type_declaration"], [181, 2, 1, "", "structured_var_init_decl"], [181, 2, 1, "", "subrange"], [181, 2, 1, "", "subrange_spec_init"], [181, 2, 1, "", "subrange_specification"], [181, 2, 1, "", "subrange_type_declaration"], [181, 2, 1, "", "subscript_list"], [181, 2, 1, "", "temp_var_decls"], [181, 2, 1, "", "time_of_day"], [181, 2, 1, "", "transform"], [181, 2, 1, "", "true"], [181, 2, 1, "", "unary_expression"], [181, 2, 1, "", "union_element_declaration"], [181, 2, 1, "", "union_type_declaration"], [181, 2, 1, "", "var1"], [181, 2, 1, "", "var1_init_decl"], [181, 2, 1, "", "var1_list"], [181, 2, 1, "", "var_declarations"], [181, 2, 1, "", "var_inst_declaration"], [181, 2, 1, "", "variable_attributes"], [181, 2, 1, "", "variable_name"], [181, 2, 1, "", "while_statement"], [181, 2, 1, "", "xor_expression"]], "blark.transform.HexBitString": [[182, 2, 1, "", "__init__"], [182, 3, 1, "", "base"], [182, 3, 1, "", "meta"]], "blark.transform.HexInteger": [[183, 2, 1, "", "__init__"], [183, 3, 1, "", "base"]], "blark.transform.IfStatement": [[184, 2, 1, "", "__init__"], [184, 3, 1, "", "else_clause"], [184, 3, 1, "", "else_ifs"], [184, 2, 1, "", "from_lark"], [184, 3, 1, "", "if_expression"], [184, 3, 1, "", "meta"], [184, 3, 1, "", "statements"]], "blark.transform.Implements": [[185, 2, 1, "", "__init__"], [185, 2, 1, "", "from_lark"], [185, 3, 1, "", "interfaces"], [185, 3, 1, "", "meta"]], "blark.transform.IncompleteLocatedVariableDeclaration": [[186, 2, 1, "", "__init__"], [186, 2, 1, "", "from_lark"], [186, 3, 1, "", "init"], [186, 3, 1, "", "location"], [186, 3, 1, "", "meta"], [186, 3, 1, "", "name"]], "blark.transform.IncompleteLocatedVariableDeclarations": [[187, 2, 1, "", "__init__"], [187, 3, 1, "", "attrs"], [187, 3, 1, "", "block_header"], [187, 2, 1, "", "from_lark"], [187, 3, 1, "", "items"], [187, 3, 1, "", "meta"]], "blark.transform.IncompleteLocation": [[188, 2, 1, "", "from_lark"], [188, 3, 1, "", "input"], [188, 3, 1, "", "memory"], [188, 3, 1, "", "none"], [188, 3, 1, "", "output"]], "blark.transform.IndirectSimpleSpecification": [[189, 2, 1, "", "__init__"], [189, 2, 1, "", "from_lark"], [189, 3, 1, "", "indirection"], [189, 3, 1, "", "init_parameters"], [189, 3, 1, "", "meta"], [189, 3, 1, "", "type"]], "blark.transform.IndirectionType": [[190, 2, 1, "", "__init__"], [190, 2, 1, "", "from_lark"], [190, 4, 1, "", "is_indirect"], [190, 3, 1, "", "meta"], [190, 3, 1, "", "pointer_depth"], [190, 3, 1, "", "reference"], [190, 4, 1, "", "value"]], "blark.transform.InitDeclaration": [[191, 3, 1, "", "init"], [191, 3, 1, "", "meta"], [191, 3, 1, "", "variables"]], "blark.transform.InitializedStructure": [[192, 2, 1, "", "__init__"], [192, 2, 1, "", "from_lark"], [192, 3, 1, "", "init"], [192, 3, 1, "", "meta"], [192, 3, 1, "", "name"], [192, 4, 1, "", "value"]], "blark.transform.InputDeclarations": [[193, 2, 1, "", "__init__"], [193, 3, 1, "", "attrs"], [193, 3, 1, "", "block_header"], [193, 2, 1, "", "from_lark"], [193, 3, 1, "", "items"], [193, 3, 1, "", "meta"]], "blark.transform.InputOutputDeclarations": [[194, 2, 1, "", "__init__"], [194, 3, 1, "", "attrs"], [194, 3, 1, "", "block_header"], [194, 2, 1, "", "from_lark"], [194, 3, 1, "", "items"], [194, 3, 1, "", "meta"]], "blark.transform.InputParameterAssignment": [[195, 2, 1, "", "__init__"], [195, 2, 1, "", "from_lark"], [195, 3, 1, "", "meta"], [195, 3, 1, "", "name"], [195, 3, 1, "", "value"]], "blark.transform.Integer": [[196, 2, 1, "", "__init__"], [196, 3, 1, "", "base"], [196, 2, 1, "", "from_lark"], [196, 3, 1, "", "meta"], [196, 3, 1, "", "type_name"], [196, 3, 1, "", "value"]], "blark.transform.Interface": [[197, 2, 1, "", "__init__"], [197, 3, 1, "", "declarations"], [197, 3, 1, "", "extends"], [197, 2, 1, "", "from_lark"], [197, 3, 1, "", "meta"], [197, 3, 1, "", "name"]], "blark.transform.JumpStatement": [[198, 2, 1, "", "__init__"], [198, 2, 1, "", "from_lark"], [198, 3, 1, "", "label"], [198, 3, 1, "", "meta"]], "blark.transform.LabeledStatement": [[199, 2, 1, "", "__init__"], [199, 2, 1, "", "from_lark"], [199, 3, 1, "", "label"], [199, 3, 1, "", "meta"], [199, 3, 1, "", "statement"]], "blark.transform.Ldate": [[200, 2, 1, "", "__init__"], [200, 3, 1, "", "day"], [200, 2, 1, "", "from_lark"], [200, 3, 1, "", "meta"], [200, 3, 1, "", "month"], [200, 4, 1, "", "value"], [200, 3, 1, "", "year"]], "blark.transform.LdateTime": [[201, 2, 1, "", "__init__"], [201, 2, 1, "", "from_lark"], [201, 3, 1, "", "ldate"], [201, 3, 1, "", "ltime"], [201, 3, 1, "", "meta"], [201, 4, 1, "", "value"]], "blark.transform.Lduration": [[202, 2, 1, "", "__init__"], [202, 3, 1, "", "days"], [202, 2, 1, "", "from_lark"], [202, 3, 1, "", "hours"], [202, 3, 1, "", "meta"], [202, 3, 1, "", "microseconds"], [202, 3, 1, "", "milliseconds"], [202, 3, 1, "", "minutes"], [202, 3, 1, "", "nanoseconds"], [202, 3, 1, "", "negative"], [202, 3, 1, "", "seconds"], [202, 4, 1, "", "value"]], "blark.transform.LocatedVariableDeclaration": [[204, 2, 1, "", "__init__"], [204, 2, 1, "", "from_lark"], [204, 3, 1, "", "init"], [204, 3, 1, "", "location"], [204, 3, 1, "", "meta"], [204, 3, 1, "", "name"]], "blark.transform.LocatedVariableDeclarations": [[205, 2, 1, "", "__init__"], [205, 3, 1, "", "attrs"], [205, 3, 1, "", "block_header"], [205, 2, 1, "", "from_lark"], [205, 3, 1, "", "items"], [205, 3, 1, "", "meta"]], "blark.transform.Location": [[206, 2, 1, "", "from_lark"]], "blark.transform.LtimeOfDay": [[207, 2, 1, "", "__init__"], [207, 2, 1, "", "from_lark"], [207, 3, 1, "", "hour"], [207, 3, 1, "", "meta"], [207, 3, 1, "", "minute"], [207, 3, 1, "", "second"], [207, 4, 1, "", "value"]], "blark.transform.Meta": [[208, 2, 1, "", "__init__"], [208, 4, 1, "", "attribute_pragmas"], [208, 3, 1, "", "column"], [208, 3, 1, "", "comments"], [208, 3, 1, "", "container_column"], [208, 3, 1, "", "container_end_column"], [208, 3, 1, "", "container_end_line"], [208, 3, 1, "", "container_line"], [208, 3, 1, "", "empty"], [208, 3, 1, "", "end_column"], [208, 3, 1, "", "end_line"], [208, 3, 1, "", "end_pos"], [208, 2, 1, "", "from_lark"], [208, 2, 1, "", "get_comments_and_pragmas"], [208, 3, 1, "", "line"], [208, 3, 1, "", "start_pos"]], "blark.transform.Method": [[209, 2, 1, "", "__init__"], [209, 3, 1, "", "access"], [209, 3, 1, "", "body"], [209, 3, 1, "", "declarations"], [209, 2, 1, "", "from_lark"], [209, 3, 1, "", "meta"], [209, 3, 1, "", "name"], [209, 3, 1, "", "return_type"]], "blark.transform.MethodInstanceVariableDeclarations": [[210, 2, 1, "", "__init__"], [210, 3, 1, "", "attrs"], [210, 3, 1, "", "block_header"], [210, 2, 1, "", "from_lark"], [210, 3, 1, "", "items"], [210, 3, 1, "", "meta"]], "blark.transform.MultiElementVariable": [[211, 2, 1, "", "__init__"], [211, 3, 1, "", "dereferenced"], [211, 3, 1, "", "elements"], [211, 2, 1, "", "from_lark"], [211, 3, 1, "", "meta"], [211, 3, 1, "", "name"]], "blark.transform.NoOpStatement": [[212, 2, 1, "", "__init__"], [212, 2, 1, "", "from_lark"], [212, 3, 1, "", "meta"], [212, 3, 1, "", "variable"]], "blark.transform.ObjectInitializerArray": [[213, 2, 1, "", "__init__"], [213, 2, 1, "", "from_lark"], [213, 3, 1, "", "initializers"], [213, 3, 1, "", "meta"], [213, 3, 1, "", "name"]], "blark.transform.OctalBitString": [[214, 2, 1, "", "__init__"], [214, 3, 1, "", "base"], [214, 3, 1, "", "meta"]], "blark.transform.OctalInteger": [[215, 2, 1, "", "__init__"], [215, 3, 1, "", "base"]], "blark.transform.OutputDeclarations": [[216, 2, 1, "", "__init__"], [216, 3, 1, "", "attrs"], [216, 3, 1, "", "block_header"], [216, 2, 1, "", "from_lark"], [216, 3, 1, "", "items"], [216, 3, 1, "", "meta"]], "blark.transform.OutputParameterAssignment": [[217, 2, 1, "", "__init__"], [217, 2, 1, "", "from_lark"], [217, 3, 1, "", "inverted"], [217, 3, 1, "", "meta"], [217, 3, 1, "", "name"], [217, 3, 1, "", "value"]], "blark.transform.ParenthesizedExpression": [[219, 2, 1, "", "__init__"], [219, 3, 1, "", "expr"], [219, 2, 1, "", "from_lark"], [219, 3, 1, "", "meta"]], "blark.transform.PartialSubrange": [[220, 2, 1, "", "__init__"], [220, 2, 1, "", "from_lark"], [220, 3, 1, "", "meta"], [220, 3, 1, "", "start"], [220, 3, 1, "", "stop"]], "blark.transform.Program": [[221, 2, 1, "", "__init__"], [221, 3, 1, "", "body"], [221, 3, 1, "", "declarations"], [221, 2, 1, "", "from_lark"], [221, 3, 1, "", "meta"], [221, 3, 1, "", "name"]], "blark.transform.Property": [[222, 2, 1, "", "__init__"], [222, 3, 1, "", "access"], [222, 3, 1, "", "body"], [222, 3, 1, "", "declarations"], [222, 2, 1, "", "from_lark"], [222, 3, 1, "", "meta"], [222, 3, 1, "", "name"], [222, 3, 1, "", "return_type"]], "blark.transform.Real": [[223, 2, 1, "", "__init__"], [223, 2, 1, "", "from_lark"], [223, 3, 1, "", "meta"], [223, 3, 1, "", "type_name"], [223, 3, 1, "", "value"]], "blark.transform.ReferenceAssignmentStatement": [[224, 2, 1, "", "__init__"], [224, 3, 1, "", "expression"], [224, 2, 1, "", "from_lark"], [224, 3, 1, "", "meta"], [224, 3, 1, "", "op"], [224, 3, 1, "", "variable"]], "blark.transform.RepeatStatement": [[225, 2, 1, "", "__init__"], [225, 3, 1, "", "expression"], [225, 2, 1, "", "from_lark"], [225, 3, 1, "", "meta"], [225, 3, 1, "", "statements"]], "blark.transform.ResetStatement": [[226, 2, 1, "", "__init__"], [226, 3, 1, "", "expression"], [226, 2, 1, "", "from_lark"], [226, 3, 1, "", "meta"], [226, 3, 1, "", "op"], [226, 3, 1, "", "variable"]], "blark.transform.ReturnStatement": [[227, 2, 1, "", "__init__"], [227, 2, 1, "", "from_lark"], [227, 3, 1, "", "meta"]], "blark.transform.SetStatement": [[228, 2, 1, "", "__init__"], [228, 3, 1, "", "expression"], [228, 2, 1, "", "from_lark"], [228, 3, 1, "", "meta"], [228, 3, 1, "", "op"], [228, 3, 1, "", "variable"]], "blark.transform.SimpleSpecification": [[229, 2, 1, "", "__init__"], [229, 2, 1, "", "from_lark"], [229, 3, 1, "", "meta"], [229, 3, 1, "", "type"]], "blark.transform.SimpleTypeDeclaration": [[230, 2, 1, "", "__init__"], [230, 3, 1, "", "extends"], [230, 2, 1, "", "from_lark"], [230, 3, 1, "", "init"], [230, 3, 1, "", "meta"], [230, 3, 1, "", "name"]], "blark.transform.SimpleVariable": [[231, 2, 1, "", "__init__"], [231, 3, 1, "", "dereferenced"], [231, 2, 1, "", "from_lark"], [231, 3, 1, "", "meta"], [231, 3, 1, "", "name"]], "blark.transform.SourceCode": [[232, 2, 1, "", "__init__"], [232, 3, 1, "", "filename"], [232, 2, 1, "", "from_lark"], [232, 3, 1, "", "items"], [232, 3, 1, "", "line_map"], [232, 3, 1, "", "meta"], [232, 2, 1, "", "range_from_file_lines"], [232, 3, 1, "", "raw_source"]], "blark.transform.StatementList": [[234, 2, 1, "", "__init__"], [234, 2, 1, "", "from_lark"], [234, 3, 1, "", "meta"], [234, 3, 1, "", "statements"]], "blark.transform.StaticDeclarations": [[235, 2, 1, "", "__init__"], [235, 3, 1, "", "attrs"], [235, 3, 1, "", "block_header"], [235, 2, 1, "", "from_lark"], [235, 3, 1, "", "items"], [235, 3, 1, "", "meta"]], "blark.transform.String": [[236, 2, 1, "", "__init__"], [236, 2, 1, "", "from_lark"], [236, 3, 1, "", "meta"], [236, 3, 1, "", "value"]], "blark.transform.StringSpecLength": [[237, 2, 1, "", "__init__"], [237, 2, 1, "", "from_lark"], [237, 3, 1, "", "length"]], "blark.transform.StringTypeDeclaration": [[238, 2, 1, "", "__init__"], [238, 2, 1, "", "from_lark"], [238, 3, 1, "", "meta"], [238, 3, 1, "", "name"], [238, 3, 1, "", "string_type"], [238, 4, 1, "", "type_name"], [238, 3, 1, "", "value"]], "blark.transform.StringTypeInitialization": [[239, 2, 1, "", "__init__"], [239, 2, 1, "", "from_lark"], [239, 3, 1, "", "meta"], [239, 3, 1, "", "spec"], [239, 3, 1, "", "value"]], "blark.transform.StringTypeSpecification": [[240, 2, 1, "", "__init__"], [240, 4, 1, "", "base_type_name"], [240, 2, 1, "", "from_lark"], [240, 4, 1, "", "full_type_name"], [240, 3, 1, "", "length"], [240, 3, 1, "", "meta"], [240, 3, 1, "", "type_name"]], "blark.transform.StringVariableInitDeclaration": [[241, 2, 1, "", "__init__"], [241, 2, 1, "", "from_lark"], [241, 3, 1, "", "init"], [241, 3, 1, "", "meta"], [241, 3, 1, "", "spec"], [241, 3, 1, "", "value"], [241, 3, 1, "", "variables"]], "blark.transform.StructureElementDeclaration": [[242, 2, 1, "", "__init__"], [242, 4, 1, "", "base_type_name"], [242, 2, 1, "", "from_lark"], [242, 4, 1, "", "full_type_name"], [242, 3, 1, "", "init"], [242, 3, 1, "", "location"], [242, 3, 1, "", "meta"], [242, 3, 1, "", "name"], [242, 4, 1, "", "value"], [242, 4, 1, "", "variables"]], "blark.transform.StructureElementInitialization": [[243, 2, 1, "", "__init__"], [243, 2, 1, "", "from_lark"], [243, 3, 1, "", "meta"], [243, 3, 1, "", "name"], [243, 3, 1, "", "value"]], "blark.transform.StructureInitialization": [[244, 2, 1, "", "__init__"], [244, 3, 1, "", "elements"], [244, 2, 1, "", "from_lark"], [244, 3, 1, "", "meta"]], "blark.transform.StructureTypeDeclaration": [[245, 2, 1, "", "__init__"], [245, 3, 1, "", "declarations"], [245, 3, 1, "", "extends"], [245, 2, 1, "", "from_lark"], [245, 3, 1, "", "indirection"], [245, 3, 1, "", "meta"], [245, 3, 1, "", "name"]], "blark.transform.StructuredVariableInitDeclaration": [[246, 2, 1, "", "__init__"], [246, 2, 1, "", "from_lark"], [246, 3, 1, "", "init"], [246, 3, 1, "", "meta"], [246, 3, 1, "", "variables"]], "blark.transform.Subrange": [[247, 2, 1, "", "__init__"]], "blark.transform.SubrangeSpecification": [[248, 2, 1, "", "__init__"], [248, 4, 1, "", "base_type_name"], [248, 2, 1, "", "from_lark"], [248, 4, 1, "", "full_type_name"], [248, 3, 1, "", "meta"], [248, 3, 1, "", "subrange"], [248, 3, 1, "", "type_name"]], "blark.transform.SubrangeTypeDeclaration": [[249, 2, 1, "", "__init__"], [249, 2, 1, "", "from_lark"], [249, 3, 1, "", "init"], [249, 3, 1, "", "meta"], [249, 3, 1, "", "name"]], "blark.transform.SubrangeTypeInitialization": [[250, 2, 1, "", "__init__"], [250, 2, 1, "", "from_lark"], [250, 3, 1, "", "indirection"], [250, 3, 1, "", "meta"], [250, 3, 1, "", "spec"], [250, 3, 1, "", "value"]], "blark.transform.SubscriptList": [[251, 2, 1, "", "__init__"], [251, 3, 1, "", "dereferenced"], [251, 2, 1, "", "from_lark"], [251, 3, 1, "", "meta"], [251, 3, 1, "", "subscripts"]], "blark.transform.TemporaryVariableDeclarations": [[252, 2, 1, "", "__init__"], [252, 3, 1, "", "block_header"], [252, 2, 1, "", "from_lark"], [252, 3, 1, "", "items"], [252, 3, 1, "", "meta"]], "blark.transform.TimeOfDay": [[253, 2, 1, "", "__init__"], [253, 2, 1, "", "from_lark"], [253, 3, 1, "", "hour"], [253, 3, 1, "", "meta"], [253, 3, 1, "", "minute"], [253, 3, 1, "", "second"], [253, 4, 1, "", "value"]], "blark.transform.TypeInformation": [[254, 2, 1, "", "__init__"], [254, 3, 1, "", "base_type_name"], [254, 3, 1, "", "context"], [254, 2, 1, "", "from_init"], [254, 2, 1, "", "from_spec"], [254, 3, 1, "", "full_type_name"]], "blark.transform.TypeInitialization": [[255, 2, 1, "", "__init__"], [255, 2, 1, "", "from_lark"], [255, 3, 1, "", "meta"], [255, 3, 1, "", "spec"], [255, 3, 1, "", "value"]], "blark.transform.TypeInitializationBase": [[256, 4, 1, "", "base_type_name"], [256, 4, 1, "", "full_type_name"], [256, 4, 1, "", "type_info"]], "blark.transform.TypeSpecificationBase": [[257, 4, 1, "", "base_type_name"], [257, 4, 1, "", "full_type_name"], [257, 4, 1, "", "type_info"]], "blark.transform.UnaryOperation": [[258, 2, 1, "", "__init__"], [258, 3, 1, "", "expr"], [258, 2, 1, "", "from_lark"], [258, 3, 1, "", "meta"], [258, 3, 1, "", "op"]], "blark.transform.UnionElementDeclaration": [[259, 2, 1, "", "__init__"], [259, 2, 1, "", "from_lark"], [259, 3, 1, "", "meta"], [259, 3, 1, "", "name"], [259, 3, 1, "", "spec"], [259, 4, 1, "", "variables"]], "blark.transform.UnionTypeDeclaration": [[260, 2, 1, "", "__init__"], [260, 3, 1, "", "declarations"], [260, 2, 1, "", "from_lark"], [260, 3, 1, "", "meta"], [260, 3, 1, "", "name"]], "blark.transform.UnresolvedTypeInformation": [[261, 2, 1, "", "__init__"]], "blark.transform.VariableAttributes": [[263, 3, 1, "", "constant"], [263, 3, 1, "", "non_retain"], [263, 3, 1, "", "persistent"], [263, 3, 1, "", "retain"]], "blark.transform.VariableDeclarationBlock": [[264, 4, 1, "", "attribute_pragmas"], [264, 3, 1, "", "block_header"], [264, 3, 1, "", "items"], [264, 3, 1, "", "meta"]], "blark.transform.VariableDeclarations": [[265, 2, 1, "", "__init__"], [265, 3, 1, "", "attrs"], [265, 3, 1, "", "block_header"], [265, 2, 1, "", "from_lark"], [265, 3, 1, "", "items"], [265, 3, 1, "", "meta"]], "blark.transform.VariableLocationPrefix": [[266, 3, 1, "", "input"], [266, 3, 1, "", "memory"], [266, 3, 1, "", "output"]], "blark.transform.VariableOneInitDeclaration": [[267, 2, 1, "", "__init__"], [267, 2, 1, "", "from_lark"], [267, 3, 1, "", "init"], [267, 3, 1, "", "meta"], [267, 3, 1, "", "variables"]], "blark.transform.VariableSizePrefix": [[268, 3, 1, "", "bit"], [268, 3, 1, "", "byte"], [268, 3, 1, "", "dword_32"], [268, 3, 1, "", "lword_64"], [268, 3, 1, "", "word_16"]], "blark.transform.WhileStatement": [[269, 2, 1, "", "__init__"], [269, 3, 1, "", "expression"], [269, 2, 1, "", "from_lark"], [269, 3, 1, "", "meta"], [269, 3, 1, "", "statements"]], "blark.transform._ArrayInitialElementCount": [[270, 2, 1, "", "from_lark"]], "blark.transform._BareArrayInitialization": [[271, 2, 1, "", "__init__"], [271, 2, 1, "", "from_lark"]], "blark.transform._BracketedArrayInitialization": [[272, 2, 1, "", "__init__"], [272, 2, 1, "", "from_lark"]], "blark.transform._FlagHelper": [[273, 2, 1, "", "from_lark"]], "blark.transform._GenericInit": [[274, 2, 1, "", "__init__"], [274, 3, 1, "", "base_type_name"], [274, 3, 1, "", "full_type_name"], [274, 3, 1, "", "repr"], [274, 3, 1, "", "value"]], "blark.typing": [[284, 1, 1, "", "ContainsBlarkCode"], [285, 1, 1, "", "SupportsRewrite"], [286, 1, 1, "", "SupportsSaveToPath"], [287, 1, 1, "", "SupportsWrite"]], "blark.typing.ContainsBlarkCode": [[284, 2, 1, "", "__init__"], [284, 2, 1, "", "to_blark"]], "blark.typing.SupportsRewrite": [[285, 2, 1, "", "__init__"], [285, 2, 1, "", "rewrite_code"]], "blark.typing.SupportsSaveToPath": [[286, 2, 1, "", "__init__"], [286, 2, 1, "", "save_to"]], "blark.typing.SupportsWrite": [[287, 2, 1, "", "__init__"], [287, 2, 1, "", "to_file_contents"]], "blark.util": [[288, 1, 1, "", "Identifier"], [289, 1, 1, "", "SourceType"], [290, 0, 1, "", "find_and_clean_comments"], [291, 0, 1, "", "find_pou_type_and_identifier"], [292, 0, 1, "", "fix_case_insensitive_path"], [293, 0, 1, "", "get_file_sha256"], [294, 0, 1, "", "get_grammar_for_rule"], [295, 0, 1, "", "get_grammar_source"], [296, 0, 1, "", "get_source_code"], [297, 0, 1, "", "indent_inner"], [298, 0, 1, "", "maybe_add_brackets"], [299, 0, 1, "", "python_debug_session"], [300, 0, 1, "", "rebuild_lark_tree_with_line_map"], [301, 0, 1, "", "recursively_remove_keys"], [302, 0, 1, "", "remove_all_comments"], [303, 0, 1, "", "remove_comment_characters"], [304, 0, 1, "", "simplify_brackets"], [305, 0, 1, "", "tree_to_xml_source"], [306, 0, 1, "", "try_paths"]], "blark.util.Identifier": [[288, 2, 1, "", "__init__"], [288, 3, 1, "", "decl_impl"], [288, 4, 1, "", "dotted_name"], [288, 2, 1, "", "from_string"], [288, 3, 1, "", "parts"], [288, 2, 1, "", "to_string"]], "blark.util.SourceType": [[289, 3, 1, "", "action"], [289, 3, 1, "", "dut"], [289, 3, 1, "", "function"], [289, 3, 1, "", "function_block"], [289, 3, 1, "", "general"], [289, 2, 1, "", "get_grammar_rule"], [289, 2, 1, "", "get_implicit_block_end"], [289, 3, 1, "", "interface"], [289, 3, 1, "", "method"], [289, 3, 1, "", "program"], [289, 3, 1, "", "property"], [289, 3, 1, "", "property_get"], [289, 3, 1, "", "property_set"], [289, 3, 1, "", "statement_list"], [289, 3, 1, "", "var_global"]]}, "objtypes": {"0": "py:function", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:property", "5": "py:exception"}, "objnames": {"0": ["py", "function", "Python function"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "property", "Python property"], "5": ["py", "exception", "Python exception"]}, "titleterms": {"api": [0, 309], "blark": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307], "apischema_compat": [0, 1, 2, 3, 4, 5], "config": 0, "dependency_stor": [0, 6, 7, 8, 9, 10, 11], "format": [0, 12, 13, 14, 15, 16, 17, 18], "html": [0, 19, 20, 21, 22], "input": [0, 23, 24, 25, 26, 27, 28], "main": [0, 16, 29, 38], "output": [0, 30, 31, 32], "pars": [0, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "plain": [0, 46], "solut": [0, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88], "sphinxdomain": [0, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105], "summari": [0, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122], "transform": [0, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283], "type": [0, 284, 285, 286, 287], "util": [0, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306], "alternative_constructor": 1, "as_tagged_union": 2, "get_all_subclass": 3, "token_deseri": 4, "token_seri": 5, "dependencystor": 6, "dependencystoreconfig": 7, "dependencystorelibrari": 8, "plcprojectmetadata": 9, "get_dependency_stor": 10, "load_project": 11, "build_arg_pars": [12, 35], "determine_output_filenam": 13, "dump_source_to_consol": 14, "get_reformatted_code_block": 15, "reformat_cod": 17, "write_source_to_fil": 18, "highlighterannot": 19, "htmlwriter": 20, "apply_annotations_to_cod": 21, "get_annot": 22, "blarkcompositesourceitem": 23, "blarksourceitem": 24, "blarksourcelin": 25, "unsupportedfileformaterror": 26, "load_file_by_nam": 27, "register_input_handl": 28, "outputblock": 30, "get_handler_by_nam": 31, "register_output_handl": 32, "blarkstartingrul": 33, "parseresult": 34, "dump_json": 36, "get_pars": 37, "new_pars": 39, "parse_item": 41, "parse_project": 42, "parse_single_fil": 43, "parse_source_cod": 44, "summar": 45, "plainfileload": 46, "dependencyinform": 47, "dependencyvers": 48, "locatedstr": 49, "project": [50, 308], "solutionloadererror": 52, "tcaction": 53, "tcdut": 54, "tcdeclimpl": 55, "tcextrainfo": 56, "tcgvl": 57, "tcio": 58, "tcmethod": 59, "tcpou": 60, "tcproperti": 61, "tcsourc": 62, "tcsourcechild": 63, "tctto": 64, "tcunknownxml": 65, "twincatplcproject": 66, "twincatsourcecodeitem": 67, "twincattsproject": 68, "unsupportedsourcefileerror": 69, "filename_from_xml": 70, "get_blark_input_from_solut": 71, "get_child_located_text": 72, "get_child_text": 73, "get_code_object_from_xml": 74, "get_project_guid": 75, "get_project_target_netid": 76, "get_tcplc_from_xml": 77, "make_solution_from_fil": 78, "parse_xml_cont": 79, "parse_xml_fil": 80, "project_load": 81, "projects_from_solution_sourc": 82, "solution_load": 83, "split_property_and_base_decl": 84, "strip_implicit_lin": 85, "strip_xml_namespac": 86, "twincat_file_load": 87, "twincat_file_writ": 88, "blarkdirect": 89, "blarkdirectivewithdeclar": 90, "blarkdomain": 91, "blarksphinxcach": 92, "blarkxrefrol": 93, "declarationdirect": 94, "functionblockdirect": 95, "functiondirect": 96, "gvldirect": 97, "missingdeclar": 98, "programdirect": 99, "typedirect": 100, "variableblockdirect": 101, "declaration_to_cont": 102, "declaration_to_signatur": 103, "declarations_to_block": 104, "setup": 105, "actionsummari": 106, "codesummari": 107, "datatypesummari": 108, "declarationsummari": 109, "functionblocksummari": 110, "functionsummari": 111, "globalvariablesummari": 112, "interfacesummari": 113, "linkableitem": 114, "methodsummari": 115, "programsummari": 116, "propertygetsetsummari": 117, "propertysummari": 118, "get_linkable_declar": 120, "path_to_file_and_lin": 121, "text_outlin": 122, "accessdeclar": [123, 124], "accessspecifi": 125, "action": 126, "arrayinitialel": 127, "arrayiniti": 128, "arrayspecif": 129, "arraytypedeclar": 130, "arraytypeiniti": 131, "arrayvariableinitdeclar": 132, "assignmentstat": 133, "binarybitstr": 134, "binaryinteg": 135, "binaryoper": 136, "bitstr": 137, "boolean": 138, "bracketedexpress": 139, "caseel": 140, "casestat": 141, "chainedfunctioncal": 142, "chainedfunctioncallstat": 143, "continuestat": 144, "datatyp": 145, "datatypedeclar": 146, "date": 147, "datetim": 148, "declaredvari": 149, "directvari": 150, "durat": 151, "edgedeclar": 152, "elseclaus": 153, "elseifclaus": 154, "enumeratedspecif": 155, "enumeratedtypedeclar": 156, "enumeratedtypeiniti": 157, "enumeratedvalu": 158, "exitstat": 159, "express": 160, "extendedsourcecod": 161, "extend": 162, "externalvariabledeclar": [163, 164], "fieldselector": 165, "forstat": 166, "formatset": 167, "fullsubrang": 168, "function": 169, "functionblock": 170, "functionblockdeclar": 171, "functionblockinvocationdeclar": 172, "functionblocknamedeclar": 173, "functioncal": 174, "functioncallstat": 175, "functionvariabledeclar": 176, "globalvariableattribut": 177, "globalvariabledeclar": [178, 179], "globalvariablespec": 180, "grammartransform": 181, "hexbitstr": 182, "hexinteg": 183, "ifstat": 184, "implement": 185, "incompletelocatedvariabledeclar": [186, 187], "incompleteloc": 188, "indirectsimplespecif": 189, "indirectiontyp": 190, "initdeclar": 191, "initializedstructur": 192, "inputdeclar": 193, "inputoutputdeclar": 194, "inputparameterassign": 195, "integ": 196, "interfac": 197, "jumpstat": 198, "labeledstat": 199, "ldate": 200, "ldatetim": 201, "ldurat": 202, "liter": 203, "locatedvariabledeclar": [204, 205], "locat": 206, "ltimeofdai": 207, "meta": 208, "method": 209, "methodinstancevariabledeclar": 210, "multielementvari": 211, "noopstat": 212, "objectinitializerarrai": 213, "octalbitstr": 214, "octalinteg": 215, "outputdeclar": 216, "outputparameterassign": 217, "parameterassign": 218, "parenthesizedexpress": 219, "partialsubrang": 220, "program": 221, "properti": 222, "real": 223, "referenceassignmentstat": 224, "repeatstat": 225, "resetstat": 226, "returnstat": 227, "setstat": 228, "simplespecif": 229, "simpletypedeclar": 230, "simplevari": 231, "sourcecod": 232, "statement": 233, "statementlist": 234, "staticdeclar": 235, "string": 236, "stringspeclength": 237, "stringtypedeclar": 238, "stringtypeiniti": 239, "stringtypespecif": 240, "stringvariableinitdeclar": 241, "structureelementdeclar": 242, "structureelementiniti": 243, "structureiniti": 244, "structuretypedeclar": 245, "structuredvariableinitdeclar": 246, "subrang": 247, "subrangespecif": 248, "subrangetypedeclar": 249, "subrangetypeiniti": 250, "subscriptlist": 251, "temporaryvariabledeclar": 252, "timeofdai": 253, "typeinform": 254, "typeiniti": 255, "typeinitializationbas": 256, "typespecificationbas": 257, "unaryoper": 258, "unionelementdeclar": 259, "uniontypedeclar": 260, "unresolvedtypeinform": 261, "variabl": 262, "variableattribut": 263, "variabledeclarationblock": 264, "variabledeclar": 265, "variablelocationprefix": 266, "variableoneinitdeclar": 267, "variablesizeprefix": 268, "whilestat": 269, "_arrayinitialelementcount": 270, "_barearrayiniti": 271, "_bracketedarrayiniti": 272, "_flaghelp": 273, "_genericinit": 274, "configure_format": 275, "get_grammar_for_class": 276, "indent": 277, "indent_if": 278, "join_if": 279, "merge_com": 280, "meta_field": 281, "multiline_code_block": 282, "containsblarkcod": 284, "supportsrewrit": 285, "supportssavetopath": 286, "supportswrit": 287, "identifi": 288, "sourcetyp": 289, "find_and_clean_com": 290, "find_pou_type_and_identifi": 291, "fix_case_insensitive_path": 292, "get_file_sha256": 293, "get_grammar_for_rul": 294, "get_grammar_sourc": 295, "get_source_cod": 296, "indent_inn": 297, "maybe_add_bracket": 298, "python_debug_sess": 299, "rebuild_lark_tree_with_line_map": 300, "recursively_remove_kei": 301, "remove_all_com": 302, "remove_comment_charact": 303, "simplify_bracket": 304, "tree_to_xml_sourc": 305, "try_path": 306, "user": 307, "document": 307, "develop": [307, 308], "indic": 307, "tabl": 307, "introduct": 308, "The": 308, "grammar": 308, "requir": 308, "capabl": 308, "work": 308, "progress": 308, "instal": 308, "quickstart": 308, "pip": 308, "virtualenv": 308, "venv": 308, "conda": 308, "sampl": 308, "run": 308, "ad": 308, "test": 308, "case": 308, "acknowledg": 308, "relat": 308, "similar": 308, "altern": 308, "sphinx": 309, "doc": 309}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"API": [[0, "api"]], "blark.apischema_compat": [[0, "blark-apischema-compat"]], "blark.config": [[0, "blark-config"]], "blark.dependency_store": [[0, "blark-dependency-store"]], "blark.format": [[0, "blark-format"]], "blark.html": [[0, "blark-html"]], "blark.input": [[0, "blark-input"]], "blark.main": [[0, "blark-main"]], "blark.output": [[0, "blark-output"]], "blark.parse": [[0, "blark-parse"]], "blark.plain": [[0, "blark-plain"]], "blark.solution": [[0, "blark-solution"]], "blark.sphinxdomain": [[0, "blark-sphinxdomain"]], "blark.summary": [[0, "blark-summary"]], "blark.transform": [[0, "blark-transform"]], "blark.typing": [[0, "blark-typing"]], "blark.util": [[0, "blark-util"]], "blark.apischema_compat.alternative_constructor": [[1, "blark-apischema-compat-alternative-constructor"]], "blark.apischema_compat.as_tagged_union": [[2, "blark-apischema-compat-as-tagged-union"]], "blark.apischema_compat.get_all_subclasses": [[3, "blark-apischema-compat-get-all-subclasses"]], "blark.apischema_compat.token_deserializer": [[4, "blark-apischema-compat-token-deserializer"]], "blark.apischema_compat.token_serializer": [[5, "blark-apischema-compat-token-serializer"]], "blark.dependency_store.DependencyStore": [[6, "blark-dependency-store-dependencystore"]], "blark.dependency_store.DependencyStoreConfig": [[7, "blark-dependency-store-dependencystoreconfig"]], "blark.dependency_store.DependencyStoreLibrary": [[8, "blark-dependency-store-dependencystorelibrary"]], "blark.dependency_store.PlcProjectMetadata": [[9, "blark-dependency-store-plcprojectmetadata"]], "blark.dependency_store.get_dependency_store": [[10, "blark-dependency-store-get-dependency-store"]], "blark.dependency_store.load_projects": [[11, "blark-dependency-store-load-projects"]], "blark.format.build_arg_parser": [[12, "blark-format-build-arg-parser"]], "blark.format.determine_output_filename": [[13, "blark-format-determine-output-filename"]], "blark.format.dump_source_to_console": [[14, "blark-format-dump-source-to-console"]], "blark.format.get_reformatted_code_blocks": [[15, "blark-format-get-reformatted-code-blocks"]], "blark.format.main": [[16, "blark-format-main"]], "blark.format.reformat_code": [[17, "blark-format-reformat-code"]], "blark.format.write_source_to_file": [[18, "blark-format-write-source-to-file"]], "blark.html.HighlighterAnnotation": [[19, "blark-html-highlighterannotation"]], "blark.html.HtmlWriter": [[20, "blark-html-htmlwriter"]], "blark.html.apply_annotations_to_code": [[21, "blark-html-apply-annotations-to-code"]], "blark.html.get_annotations": [[22, "blark-html-get-annotations"]], "blark.input.BlarkCompositeSourceItem": [[23, "blark-input-blarkcompositesourceitem"]], "blark.input.BlarkSourceItem": [[24, "blark-input-blarksourceitem"]], "blark.input.BlarkSourceLine": [[25, "blark-input-blarksourceline"]], "blark.input.UnsupportedFileFormatError": [[26, "blark-input-unsupportedfileformaterror"]], "blark.input.load_file_by_name": [[27, "blark-input-load-file-by-name"]], "blark.input.register_input_handler": [[28, "blark-input-register-input-handler"]], "blark.main.main": [[29, "blark-main-main"]], "blark.output.OutputBlock": [[30, "blark-output-outputblock"]], "blark.output.get_handler_by_name": [[31, "blark-output-get-handler-by-name"]], "blark.output.register_output_handler": [[32, "blark-output-register-output-handler"]], "blark.parse.BlarkStartingRule": [[33, "blark-parse-blarkstartingrule"]], "blark.parse.ParseResult": [[34, "blark-parse-parseresult"]], "blark.parse.build_arg_parser": [[35, "blark-parse-build-arg-parser"]], "blark.parse.dump_json": [[36, "blark-parse-dump-json"]], "blark.parse.get_parser": [[37, "blark-parse-get-parser"]], "blark.parse.main": [[38, "blark-parse-main"]], "blark.parse.new_parser": [[39, "blark-parse-new-parser"]], "blark.parse.parse": [[40, "blark-parse-parse"]], "blark.parse.parse_item": [[41, "blark-parse-parse-item"]], "blark.parse.parse_project": [[42, "blark-parse-parse-project"]], "blark.parse.parse_single_file": [[43, "blark-parse-parse-single-file"]], "blark.parse.parse_source_code": [[44, "blark-parse-parse-source-code"]], "blark.parse.summarize": [[45, "blark-parse-summarize"]], "blark.plain.PlainFileLoader": [[46, "blark-plain-plainfileloader"]], "blark.solution.DependencyInformation": [[47, "blark-solution-dependencyinformation"]], "blark.solution.DependencyVersion": [[48, "blark-solution-dependencyversion"]], "blark.solution.LocatedString": [[49, "blark-solution-locatedstring"]], "blark.solution.Project": [[50, "blark-solution-project"]], "blark.solution.Solution": [[51, "blark-solution-solution"]], "blark.solution.SolutionLoaderError": [[52, "blark-solution-solutionloadererror"]], "blark.solution.TcAction": [[53, "blark-solution-tcaction"]], "blark.solution.TcDUT": [[54, "blark-solution-tcdut"]], "blark.solution.TcDeclImpl": [[55, "blark-solution-tcdeclimpl"]], "blark.solution.TcExtraInfo": [[56, "blark-solution-tcextrainfo"]], "blark.solution.TcGVL": [[57, "blark-solution-tcgvl"]], "blark.solution.TcIO": [[58, "blark-solution-tcio"]], "blark.solution.TcMethod": [[59, "blark-solution-tcmethod"]], "blark.solution.TcPOU": [[60, "blark-solution-tcpou"]], "blark.solution.TcProperty": [[61, "blark-solution-tcproperty"]], "blark.solution.TcSource": [[62, "blark-solution-tcsource"]], "blark.solution.TcSourceChild": [[63, "blark-solution-tcsourcechild"]], "blark.solution.TcTTO": [[64, "blark-solution-tctto"]], "blark.solution.TcUnknownXml": [[65, "blark-solution-tcunknownxml"]], "blark.solution.TwincatPlcProject": [[66, "blark-solution-twincatplcproject"]], "blark.solution.TwincatSourceCodeItem": [[67, "blark-solution-twincatsourcecodeitem"]], "blark.solution.TwincatTsProject": [[68, "blark-solution-twincattsproject"]], "blark.solution.UnsupportedSourceFileError": [[69, "blark-solution-unsupportedsourcefileerror"]], "blark.solution.filename_from_xml": [[70, "blark-solution-filename-from-xml"]], "blark.solution.get_blark_input_from_solution": [[71, "blark-solution-get-blark-input-from-solution"]], "blark.solution.get_child_located_text": [[72, "blark-solution-get-child-located-text"]], "blark.solution.get_child_text": [[73, "blark-solution-get-child-text"]], "blark.solution.get_code_object_from_xml": [[74, "blark-solution-get-code-object-from-xml"]], "blark.solution.get_project_guid": [[75, "blark-solution-get-project-guid"]], "blark.solution.get_project_target_netid": [[76, "blark-solution-get-project-target-netid"]], "blark.solution.get_tcplc_from_xml": [[77, "blark-solution-get-tcplc-from-xml"]], "blark.solution.make_solution_from_files": [[78, "blark-solution-make-solution-from-files"]], "blark.solution.parse_xml_contents": [[79, "blark-solution-parse-xml-contents"]], "blark.solution.parse_xml_file": [[80, "blark-solution-parse-xml-file"]], "blark.solution.project_loader": [[81, "blark-solution-project-loader"]], "blark.solution.projects_from_solution_source": [[82, "blark-solution-projects-from-solution-source"]], "blark.solution.solution_loader": [[83, "blark-solution-solution-loader"]], "blark.solution.split_property_and_base_decl": [[84, "blark-solution-split-property-and-base-decl"]], "blark.solution.strip_implicit_lines": [[85, "blark-solution-strip-implicit-lines"]], "blark.solution.strip_xml_namespace": [[86, "blark-solution-strip-xml-namespace"]], "blark.solution.twincat_file_loader": [[87, "blark-solution-twincat-file-loader"]], "blark.solution.twincat_file_writer": [[88, "blark-solution-twincat-file-writer"]], "blark.sphinxdomain.BlarkDirective": [[89, "blark-sphinxdomain-blarkdirective"]], "blark.sphinxdomain.BlarkDirectiveWithDeclarations": [[90, "blark-sphinxdomain-blarkdirectivewithdeclarations"]], "blark.sphinxdomain.BlarkDomain": [[91, "blark-sphinxdomain-blarkdomain"]], "blark.sphinxdomain.BlarkSphinxCache": [[92, "blark-sphinxdomain-blarksphinxcache"]], "blark.sphinxdomain.BlarkXRefRole": [[93, "blark-sphinxdomain-blarkxrefrole"]], "blark.sphinxdomain.DeclarationDirective": [[94, "blark-sphinxdomain-declarationdirective"]], "blark.sphinxdomain.FunctionBlockDirective": [[95, "blark-sphinxdomain-functionblockdirective"]], "blark.sphinxdomain.FunctionDirective": [[96, "blark-sphinxdomain-functiondirective"]], "blark.sphinxdomain.GvlDirective": [[97, "blark-sphinxdomain-gvldirective"]], "blark.sphinxdomain.MissingDeclaration": [[98, "blark-sphinxdomain-missingdeclaration"]], "blark.sphinxdomain.ProgramDirective": [[99, "blark-sphinxdomain-programdirective"]], "blark.sphinxdomain.TypeDirective": [[100, "blark-sphinxdomain-typedirective"]], "blark.sphinxdomain.VariableBlockDirective": [[101, "blark-sphinxdomain-variableblockdirective"]], "blark.sphinxdomain.declaration_to_content": [[102, "blark-sphinxdomain-declaration-to-content"]], "blark.sphinxdomain.declaration_to_signature": [[103, "blark-sphinxdomain-declaration-to-signature"]], "blark.sphinxdomain.declarations_to_block": [[104, "blark-sphinxdomain-declarations-to-block"]], "blark.sphinxdomain.setup": [[105, "blark-sphinxdomain-setup"]], "blark.summary.ActionSummary": [[106, "blark-summary-actionsummary"]], "blark.summary.CodeSummary": [[107, "blark-summary-codesummary"]], "blark.summary.DataTypeSummary": [[108, "blark-summary-datatypesummary"]], "blark.summary.DeclarationSummary": [[109, "blark-summary-declarationsummary"]], "blark.summary.FunctionBlockSummary": [[110, "blark-summary-functionblocksummary"]], "blark.summary.FunctionSummary": [[111, "blark-summary-functionsummary"]], "blark.summary.GlobalVariableSummary": [[112, "blark-summary-globalvariablesummary"]], "blark.summary.InterfaceSummary": [[113, "blark-summary-interfacesummary"]], "blark.summary.LinkableItems": [[114, "blark-summary-linkableitems"]], "blark.summary.MethodSummary": [[115, "blark-summary-methodsummary"]], "blark.summary.ProgramSummary": [[116, "blark-summary-programsummary"]], "blark.summary.PropertyGetSetSummary": [[117, "blark-summary-propertygetsetsummary"]], "blark.summary.PropertySummary": [[118, "blark-summary-propertysummary"]], "blark.summary.Summary": [[119, "blark-summary-summary"]], "blark.summary.get_linkable_declarations": [[120, "blark-summary-get-linkable-declarations"]], "blark.summary.path_to_file_and_line": [[121, "blark-summary-path-to-file-and-line"]], "blark.summary.text_outline": [[122, "blark-summary-text-outline"]], "blark.transform.AccessDeclaration": [[123, "blark-transform-accessdeclaration"]], "blark.transform.AccessDeclarations": [[124, "blark-transform-accessdeclarations"]], "blark.transform.AccessSpecifier": [[125, "blark-transform-accessspecifier"]], "blark.transform.Action": [[126, "blark-transform-action"]], "blark.transform.ArrayInitialElement": [[127, "blark-transform-arrayinitialelement"]], "blark.transform.ArrayInitialization": [[128, "blark-transform-arrayinitialization"]], "blark.transform.ArraySpecification": [[129, "blark-transform-arrayspecification"]], "blark.transform.ArrayTypeDeclaration": [[130, "blark-transform-arraytypedeclaration"]], "blark.transform.ArrayTypeInitialization": [[131, "blark-transform-arraytypeinitialization"]], "blark.transform.ArrayVariableInitDeclaration": [[132, "blark-transform-arrayvariableinitdeclaration"]], "blark.transform.AssignmentStatement": [[133, "blark-transform-assignmentstatement"]], "blark.transform.BinaryBitString": [[134, "blark-transform-binarybitstring"]], "blark.transform.BinaryInteger": [[135, "blark-transform-binaryinteger"]], "blark.transform.BinaryOperation": [[136, "blark-transform-binaryoperation"]], "blark.transform.BitString": [[137, "blark-transform-bitstring"]], "blark.transform.Boolean": [[138, "blark-transform-boolean"]], "blark.transform.BracketedExpression": [[139, "blark-transform-bracketedexpression"]], "blark.transform.CaseElement": [[140, "blark-transform-caseelement"]], "blark.transform.CaseStatement": [[141, "blark-transform-casestatement"]], "blark.transform.ChainedFunctionCall": [[142, "blark-transform-chainedfunctioncall"]], "blark.transform.ChainedFunctionCallStatement": [[143, "blark-transform-chainedfunctioncallstatement"]], "blark.transform.ContinueStatement": [[144, "blark-transform-continuestatement"]], "blark.transform.DataType": [[145, "blark-transform-datatype"]], "blark.transform.DataTypeDeclaration": [[146, "blark-transform-datatypedeclaration"]], "blark.transform.Date": [[147, "blark-transform-date"]], "blark.transform.DateTime": [[148, "blark-transform-datetime"]], "blark.transform.DeclaredVariable": [[149, "blark-transform-declaredvariable"]], "blark.transform.DirectVariable": [[150, "blark-transform-directvariable"]], "blark.transform.Duration": [[151, "blark-transform-duration"]], "blark.transform.EdgeDeclaration": [[152, "blark-transform-edgedeclaration"]], "blark.transform.ElseClause": [[153, "blark-transform-elseclause"]], "blark.transform.ElseIfClause": [[154, "blark-transform-elseifclause"]], "blark.transform.EnumeratedSpecification": [[155, "blark-transform-enumeratedspecification"]], "blark.transform.EnumeratedTypeDeclaration": [[156, "blark-transform-enumeratedtypedeclaration"]], "blark.transform.EnumeratedTypeInitialization": [[157, "blark-transform-enumeratedtypeinitialization"]], "blark.transform.EnumeratedValue": [[158, "blark-transform-enumeratedvalue"]], "blark.transform.ExitStatement": [[159, "blark-transform-exitstatement"]], "blark.transform.Expression": [[160, "blark-transform-expression"]], "blark.transform.ExtendedSourceCode": [[161, "blark-transform-extendedsourcecode"]], "blark.transform.Extends": [[162, "blark-transform-extends"]], "blark.transform.ExternalVariableDeclaration": [[163, "blark-transform-externalvariabledeclaration"]], "blark.transform.ExternalVariableDeclarations": [[164, "blark-transform-externalvariabledeclarations"]], "blark.transform.FieldSelector": [[165, "blark-transform-fieldselector"]], "blark.transform.ForStatement": [[166, "blark-transform-forstatement"]], "blark.transform.FormatSettings": [[167, "blark-transform-formatsettings"]], "blark.transform.FullSubrange": [[168, "blark-transform-fullsubrange"]], "blark.transform.Function": [[169, "blark-transform-function"]], "blark.transform.FunctionBlock": [[170, "blark-transform-functionblock"]], "blark.transform.FunctionBlockDeclaration": [[171, "blark-transform-functionblockdeclaration"]], "blark.transform.FunctionBlockInvocationDeclaration": [[172, "blark-transform-functionblockinvocationdeclaration"]], "blark.transform.FunctionBlockNameDeclaration": [[173, "blark-transform-functionblocknamedeclaration"]], "blark.transform.FunctionCall": [[174, "blark-transform-functioncall"]], "blark.transform.FunctionCallStatement": [[175, "blark-transform-functioncallstatement"]], "blark.transform.FunctionVariableDeclarations": [[176, "blark-transform-functionvariabledeclarations"]], "blark.transform.GlobalVariableAttributes": [[177, "blark-transform-globalvariableattributes"]], "blark.transform.GlobalVariableDeclaration": [[178, "blark-transform-globalvariabledeclaration"]], "blark.transform.GlobalVariableDeclarations": [[179, "blark-transform-globalvariabledeclarations"]], "blark.transform.GlobalVariableSpec": [[180, "blark-transform-globalvariablespec"]], "blark.transform.GrammarTransformer": [[181, "blark-transform-grammartransformer"]], "blark.transform.HexBitString": [[182, "blark-transform-hexbitstring"]], "blark.transform.HexInteger": [[183, "blark-transform-hexinteger"]], "blark.transform.IfStatement": [[184, "blark-transform-ifstatement"]], "blark.transform.Implements": [[185, "blark-transform-implements"]], "blark.transform.IncompleteLocatedVariableDeclaration": [[186, "blark-transform-incompletelocatedvariabledeclaration"]], "blark.transform.IncompleteLocatedVariableDeclarations": [[187, "blark-transform-incompletelocatedvariabledeclarations"]], "blark.transform.IncompleteLocation": [[188, "blark-transform-incompletelocation"]], "blark.transform.IndirectSimpleSpecification": [[189, "blark-transform-indirectsimplespecification"]], "blark.transform.IndirectionType": [[190, "blark-transform-indirectiontype"]], "blark.transform.InitDeclaration": [[191, "blark-transform-initdeclaration"]], "blark.transform.InitializedStructure": [[192, "blark-transform-initializedstructure"]], "blark.transform.InputDeclarations": [[193, "blark-transform-inputdeclarations"]], "blark.transform.InputOutputDeclarations": [[194, "blark-transform-inputoutputdeclarations"]], "blark.transform.InputParameterAssignment": [[195, "blark-transform-inputparameterassignment"]], "blark.transform.Integer": [[196, "blark-transform-integer"]], "blark.transform.Interface": [[197, "blark-transform-interface"]], "blark.transform.JumpStatement": [[198, "blark-transform-jumpstatement"]], "blark.transform.LabeledStatement": [[199, "blark-transform-labeledstatement"]], "blark.transform.Ldate": [[200, "blark-transform-ldate"]], "blark.transform.LdateTime": [[201, "blark-transform-ldatetime"]], "blark.transform.Lduration": [[202, "blark-transform-lduration"]], "blark.transform.Literal": [[203, "blark-transform-literal"]], "blark.transform.LocatedVariableDeclaration": [[204, "blark-transform-locatedvariabledeclaration"]], "blark.transform.LocatedVariableDeclarations": [[205, "blark-transform-locatedvariabledeclarations"]], "blark.transform.Location": [[206, "blark-transform-location"]], "blark.transform.LtimeOfDay": [[207, "blark-transform-ltimeofday"]], "blark.transform.Meta": [[208, "blark-transform-meta"]], "blark.transform.Method": [[209, "blark-transform-method"]], "blark.transform.MethodInstanceVariableDeclarations": [[210, "blark-transform-methodinstancevariabledeclarations"]], "blark.transform.MultiElementVariable": [[211, "blark-transform-multielementvariable"]], "blark.transform.NoOpStatement": [[212, "blark-transform-noopstatement"]], "blark.transform.ObjectInitializerArray": [[213, "blark-transform-objectinitializerarray"]], "blark.transform.OctalBitString": [[214, "blark-transform-octalbitstring"]], "blark.transform.OctalInteger": [[215, "blark-transform-octalinteger"]], "blark.transform.OutputDeclarations": [[216, "blark-transform-outputdeclarations"]], "blark.transform.OutputParameterAssignment": [[217, "blark-transform-outputparameterassignment"]], "blark.transform.ParameterAssignment": [[218, "blark-transform-parameterassignment"]], "blark.transform.ParenthesizedExpression": [[219, "blark-transform-parenthesizedexpression"]], "blark.transform.PartialSubrange": [[220, "blark-transform-partialsubrange"]], "blark.transform.Program": [[221, "blark-transform-program"]], "blark.transform.Property": [[222, "blark-transform-property"]], "blark.transform.Real": [[223, "blark-transform-real"]], "blark.transform.ReferenceAssignmentStatement": [[224, "blark-transform-referenceassignmentstatement"]], "blark.transform.RepeatStatement": [[225, "blark-transform-repeatstatement"]], "blark.transform.ResetStatement": [[226, "blark-transform-resetstatement"]], "blark.transform.ReturnStatement": [[227, "blark-transform-returnstatement"]], "blark.transform.SetStatement": [[228, "blark-transform-setstatement"]], "blark.transform.SimpleSpecification": [[229, "blark-transform-simplespecification"]], "blark.transform.SimpleTypeDeclaration": [[230, "blark-transform-simpletypedeclaration"]], "blark.transform.SimpleVariable": [[231, "blark-transform-simplevariable"]], "blark.transform.SourceCode": [[232, "blark-transform-sourcecode"]], "blark.transform.Statement": [[233, "blark-transform-statement"]], "blark.transform.StatementList": [[234, "blark-transform-statementlist"]], "blark.transform.StaticDeclarations": [[235, "blark-transform-staticdeclarations"]], "blark.transform.String": [[236, "blark-transform-string"]], "blark.transform.StringSpecLength": [[237, "blark-transform-stringspeclength"]], "blark.transform.StringTypeDeclaration": [[238, "blark-transform-stringtypedeclaration"]], "blark.transform.StringTypeInitialization": [[239, "blark-transform-stringtypeinitialization"]], "blark.transform.StringTypeSpecification": [[240, "blark-transform-stringtypespecification"]], "blark.transform.StringVariableInitDeclaration": [[241, "blark-transform-stringvariableinitdeclaration"]], "blark.transform.StructureElementDeclaration": [[242, "blark-transform-structureelementdeclaration"]], "blark.transform.StructureElementInitialization": [[243, "blark-transform-structureelementinitialization"]], "blark.transform.StructureInitialization": [[244, "blark-transform-structureinitialization"]], "blark.transform.StructureTypeDeclaration": [[245, "blark-transform-structuretypedeclaration"]], "blark.transform.StructuredVariableInitDeclaration": [[246, "blark-transform-structuredvariableinitdeclaration"]], "blark.transform.Subrange": [[247, "blark-transform-subrange"]], "blark.transform.SubrangeSpecification": [[248, "blark-transform-subrangespecification"]], "blark.transform.SubrangeTypeDeclaration": [[249, "blark-transform-subrangetypedeclaration"]], "blark.transform.SubrangeTypeInitialization": [[250, "blark-transform-subrangetypeinitialization"]], "blark.transform.SubscriptList": [[251, "blark-transform-subscriptlist"]], "blark.transform.TemporaryVariableDeclarations": [[252, "blark-transform-temporaryvariabledeclarations"]], "blark.transform.TimeOfDay": [[253, "blark-transform-timeofday"]], "blark.transform.TypeInformation": [[254, "blark-transform-typeinformation"]], "blark.transform.TypeInitialization": [[255, "blark-transform-typeinitialization"]], "blark.transform.TypeInitializationBase": [[256, "blark-transform-typeinitializationbase"]], "blark.transform.TypeSpecificationBase": [[257, "blark-transform-typespecificationbase"]], "blark.transform.UnaryOperation": [[258, "blark-transform-unaryoperation"]], "blark.transform.UnionElementDeclaration": [[259, "blark-transform-unionelementdeclaration"]], "blark.transform.UnionTypeDeclaration": [[260, "blark-transform-uniontypedeclaration"]], "blark.transform.UnresolvedTypeInformation": [[261, "blark-transform-unresolvedtypeinformation"]], "blark.transform.Variable": [[262, "blark-transform-variable"]], "blark.transform.VariableAttributes": [[263, "blark-transform-variableattributes"]], "blark.transform.VariableDeclarationBlock": [[264, "blark-transform-variabledeclarationblock"]], "blark.transform.VariableDeclarations": [[265, "blark-transform-variabledeclarations"]], "blark.transform.VariableLocationPrefix": [[266, "blark-transform-variablelocationprefix"]], "blark.transform.VariableOneInitDeclaration": [[267, "blark-transform-variableoneinitdeclaration"]], "blark.transform.VariableSizePrefix": [[268, "blark-transform-variablesizeprefix"]], "blark.transform.WhileStatement": [[269, "blark-transform-whilestatement"]], "blark.transform._ArrayInitialElementCount": [[270, "blark-transform-arrayinitialelementcount"]], "blark.transform._BareArrayInitialization": [[271, "blark-transform-barearrayinitialization"]], "blark.transform._BracketedArrayInitialization": [[272, "blark-transform-bracketedarrayinitialization"]], "blark.transform._FlagHelper": [[273, "blark-transform-flaghelper"]], "blark.transform._GenericInit": [[274, "blark-transform-genericinit"]], "blark.transform.configure_formatting": [[275, "blark-transform-configure-formatting"]], "blark.transform.get_grammar_for_class": [[276, "blark-transform-get-grammar-for-class"]], "blark.transform.indent": [[277, "blark-transform-indent"]], "blark.transform.indent_if": [[278, "blark-transform-indent-if"]], "blark.transform.join_if": [[279, "blark-transform-join-if"]], "blark.transform.merge_comments": [[280, "blark-transform-merge-comments"]], "blark.transform.meta_field": [[281, "blark-transform-meta-field"]], "blark.transform.multiline_code_block": [[282, "blark-transform-multiline-code-block"]], "blark.transform.transform": [[283, "blark-transform-transform"]], "blark.typing.ContainsBlarkCode": [[284, "blark-typing-containsblarkcode"]], "blark.typing.SupportsRewrite": [[285, "blark-typing-supportsrewrite"]], "blark.typing.SupportsSaveToPath": [[286, "blark-typing-supportssavetopath"]], "blark.typing.SupportsWrite": [[287, "blark-typing-supportswrite"]], "blark.util.Identifier": [[288, "blark-util-identifier"]], "blark.util.SourceType": [[289, "blark-util-sourcetype"]], "blark.util.find_and_clean_comments": [[290, "blark-util-find-and-clean-comments"]], "blark.util.find_pou_type_and_identifier": [[291, "blark-util-find-pou-type-and-identifier"]], "blark.util.fix_case_insensitive_path": [[292, "blark-util-fix-case-insensitive-path"]], "blark.util.get_file_sha256": [[293, "blark-util-get-file-sha256"]], "blark.util.get_grammar_for_rule": [[294, "blark-util-get-grammar-for-rule"]], "blark.util.get_grammar_source": [[295, "blark-util-get-grammar-source"]], "blark.util.get_source_code": [[296, "blark-util-get-source-code"]], "blark.util.indent_inner": [[297, "blark-util-indent-inner"]], "blark.util.maybe_add_brackets": [[298, "blark-util-maybe-add-brackets"]], "blark.util.python_debug_session": [[299, "blark-util-python-debug-session"]], "blark.util.rebuild_lark_tree_with_line_map": [[300, "blark-util-rebuild-lark-tree-with-line-map"]], "blark.util.recursively_remove_keys": [[301, "blark-util-recursively-remove-keys"]], "blark.util.remove_all_comments": [[302, "blark-util-remove-all-comments"]], "blark.util.remove_comment_characters": [[303, "blark-util-remove-comment-characters"]], "blark.util.simplify_brackets": [[304, "blark-util-simplify-brackets"]], "blark.util.tree_to_xml_source": [[305, "blark-util-tree-to-xml-source"]], "blark.util.try_paths": [[306, "blark-util-try-paths"]], "blark": [[307, "blark"]], "User documentation": [[307, null]], "Developer documentation": [[307, null]], "Indices and tables": [[307, "indices-and-tables"]], "Introduction": [[308, "introduction"]], "The Grammar": [[308, "the-grammar"]], "Requirements": [[308, "requirements"]], "Capabilities": [[308, "capabilities"]], "Works-in-progress": [[308, "works-in-progress"]], "Installation": [[308, "installation"]], "Quickstart (pip / virtualenv with venv)": [[308, "quickstart-pip-virtualenv-with-venv"]], "Quickstart (Conda)": [[308, "quickstart-conda"]], "Development install": [[308, "development-install"]], "Sample runs": [[308, "sample-runs"]], "Adding Test Cases": [[308, "adding-test-cases"]], "Acknowledgements": [[308, "acknowledgements"]], "Related, Similar, or Alternative Projects": [[308, "related-similar-or-alternative-projects"]], "Sphinx API Docs": [[309, "sphinx-api-docs"]]}, "indexentries": {"alternative_constructor() (in module blark.apischema_compat)": [[1, "blark.apischema_compat.alternative_constructor"]], "as_tagged_union() (in module blark.apischema_compat)": [[2, "blark.apischema_compat.as_tagged_union"]], "get_all_subclasses() (in module blark.apischema_compat)": [[3, "blark.apischema_compat.get_all_subclasses"]], "token_deserializer() (in module blark.apischema_compat)": [[4, "blark.apischema_compat.token_deserializer"]], "token_serializer() (in module blark.apischema_compat)": [[5, "blark.apischema_compat.token_serializer"]], "dependencystore (class in blark.dependency_store)": [[6, "blark.dependency_store.DependencyStore"]], "__init__() (blark.dependency_store.dependencystore method)": [[6, "blark.dependency_store.DependencyStore.__init__"]], "config (blark.dependency_store.dependencystore attribute)": [[6, "blark.dependency_store.DependencyStore.config"]], "config_filename (blark.dependency_store.dependencystore property)": [[6, "blark.dependency_store.DependencyStore.config_filename"]], "get_dependencies() (blark.dependency_store.dependencystore method)": [[6, "blark.dependency_store.DependencyStore.get_dependencies"]], "get_dependency() (blark.dependency_store.dependencystore method)": [[6, "blark.dependency_store.DependencyStore.get_dependency"]], "get_instance() (blark.dependency_store.dependencystore static method)": [[6, "blark.dependency_store.DependencyStore.get_instance"]], "load_config() (blark.dependency_store.dependencystore method)": [[6, "blark.dependency_store.DependencyStore.load_config"]], "root (blark.dependency_store.dependencystore attribute)": [[6, "blark.dependency_store.DependencyStore.root"]], "dependencystoreconfig (class in blark.dependency_store)": [[7, "blark.dependency_store.DependencyStoreConfig"]], "__init__() (blark.dependency_store.dependencystoreconfig method)": [[7, "blark.dependency_store.DependencyStoreConfig.__init__"]], "as_json() (blark.dependency_store.dependencystoreconfig method)": [[7, "blark.dependency_store.DependencyStoreConfig.as_json"]], "filename (blark.dependency_store.dependencystoreconfig attribute)": [[7, "blark.dependency_store.DependencyStoreConfig.filename"]], "from_dict() (blark.dependency_store.dependencystoreconfig class method)": [[7, "blark.dependency_store.DependencyStoreConfig.from_dict"]], "libraries (blark.dependency_store.dependencystoreconfig attribute)": [[7, "blark.dependency_store.DependencyStoreConfig.libraries"]], "save() (blark.dependency_store.dependencystoreconfig method)": [[7, "blark.dependency_store.DependencyStoreConfig.save"]], "dependencystorelibrary (class in blark.dependency_store)": [[8, "blark.dependency_store.DependencyStoreLibrary"]], "__init__() (blark.dependency_store.dependencystorelibrary method)": [[8, "blark.dependency_store.DependencyStoreLibrary.__init__"]], "get_latest_version_path() (blark.dependency_store.dependencystorelibrary method)": [[8, "blark.dependency_store.DependencyStoreLibrary.get_latest_version_path"]], "get_project_filename() (blark.dependency_store.dependencystorelibrary method)": [[8, "blark.dependency_store.DependencyStoreLibrary.get_project_filename"]], "name (blark.dependency_store.dependencystorelibrary attribute)": [[8, "blark.dependency_store.DependencyStoreLibrary.name"]], "path (blark.dependency_store.dependencystorelibrary attribute)": [[8, "blark.dependency_store.DependencyStoreLibrary.path"]], "project (blark.dependency_store.dependencystorelibrary attribute)": [[8, "blark.dependency_store.DependencyStoreLibrary.project"]], "versioned (blark.dependency_store.dependencystorelibrary attribute)": [[8, "blark.dependency_store.DependencyStoreLibrary.versioned"]], "plcprojectmetadata (class in blark.dependency_store)": [[9, "blark.dependency_store.PlcProjectMetadata"]], "__init__() (blark.dependency_store.plcprojectmetadata method)": [[9, "blark.dependency_store.PlcProjectMetadata.__init__"]], "code (blark.dependency_store.plcprojectmetadata attribute)": [[9, "blark.dependency_store.PlcProjectMetadata.code"]], "dependencies (blark.dependency_store.plcprojectmetadata attribute)": [[9, "blark.dependency_store.PlcProjectMetadata.dependencies"]], "filename (blark.dependency_store.plcprojectmetadata attribute)": [[9, "blark.dependency_store.PlcProjectMetadata.filename"]], "from_plcproject() (blark.dependency_store.plcprojectmetadata class method)": [[9, "blark.dependency_store.PlcProjectMetadata.from_plcproject"]], "from_project_filename() (blark.dependency_store.plcprojectmetadata class method)": [[9, "blark.dependency_store.PlcProjectMetadata.from_project_filename"]], "include_dependencies (blark.dependency_store.plcprojectmetadata attribute)": [[9, "blark.dependency_store.PlcProjectMetadata.include_dependencies"]], "loaded_files (blark.dependency_store.plcprojectmetadata attribute)": [[9, "blark.dependency_store.PlcProjectMetadata.loaded_files"]], "name (blark.dependency_store.plcprojectmetadata attribute)": [[9, "blark.dependency_store.PlcProjectMetadata.name"]], "plc (blark.dependency_store.plcprojectmetadata attribute)": [[9, "blark.dependency_store.PlcProjectMetadata.plc"]], "summary (blark.dependency_store.plcprojectmetadata attribute)": [[9, "blark.dependency_store.PlcProjectMetadata.summary"]], "get_dependency_store() (in module blark.dependency_store)": [[10, "blark.dependency_store.get_dependency_store"]], "load_projects() (in module blark.dependency_store)": [[11, "blark.dependency_store.load_projects"]], "build_arg_parser() (in module blark.format)": [[12, "blark.format.build_arg_parser"]], "determine_output_filename() (in module blark.format)": [[13, "blark.format.determine_output_filename"]], "dump_source_to_console() (in module blark.format)": [[14, "blark.format.dump_source_to_console"]], "get_reformatted_code_blocks() (in module blark.format)": [[15, "blark.format.get_reformatted_code_blocks"]], "main() (in module blark.format)": [[16, "blark.format.main"]], "reformat_code() (in module blark.format)": [[17, "blark.format.reformat_code"]], "write_source_to_file() (in module blark.format)": [[18, "blark.format.write_source_to_file"]], "highlighterannotation (class in blark.html)": [[19, "blark.html.HighlighterAnnotation"]], "__init__() (blark.html.highlighterannotation method)": [[19, "blark.html.HighlighterAnnotation.__init__"]], "as_string() (blark.html.highlighterannotation method)": [[19, "blark.html.HighlighterAnnotation.as_string"]], "is_open_tag (blark.html.highlighterannotation attribute)": [[19, "blark.html.HighlighterAnnotation.is_open_tag"]], "name (blark.html.highlighterannotation attribute)": [[19, "blark.html.HighlighterAnnotation.name"]], "other_tag_pos (blark.html.highlighterannotation attribute)": [[19, "blark.html.HighlighterAnnotation.other_tag_pos"]], "terminal (blark.html.highlighterannotation attribute)": [[19, "blark.html.HighlighterAnnotation.terminal"]], "htmlwriter (class in blark.html)": [[20, "blark.html.HtmlWriter"]], "__init__() (blark.html.htmlwriter method)": [[20, "blark.html.HtmlWriter.__init__"]], "block (blark.html.htmlwriter attribute)": [[20, "blark.html.HtmlWriter.block"]], "save() (blark.html.htmlwriter static method)": [[20, "blark.html.HtmlWriter.save"]], "source_code (blark.html.htmlwriter property)": [[20, "blark.html.HtmlWriter.source_code"]], "source_filename (blark.html.htmlwriter attribute)": [[20, "blark.html.HtmlWriter.source_filename"]], "to_html() (blark.html.htmlwriter method)": [[20, "blark.html.HtmlWriter.to_html"]], "user (blark.html.htmlwriter attribute)": [[20, "blark.html.HtmlWriter.user"]], "apply_annotations_to_code() (in module blark.html)": [[21, "blark.html.apply_annotations_to_code"]], "get_annotations() (in module blark.html)": [[22, "blark.html.get_annotations"]], "blarkcompositesourceitem (class in blark.input)": [[23, "blark.input.BlarkCompositeSourceItem"]], "__init__() (blark.input.blarkcompositesourceitem method)": [[23, "blark.input.BlarkCompositeSourceItem.__init__"]], "filename (blark.input.blarkcompositesourceitem attribute)": [[23, "blark.input.BlarkCompositeSourceItem.filename"]], "get_code_and_line_map() (blark.input.blarkcompositesourceitem method)": [[23, "blark.input.BlarkCompositeSourceItem.get_code_and_line_map"]], "get_filenames() (blark.input.blarkcompositesourceitem method)": [[23, "blark.input.BlarkCompositeSourceItem.get_filenames"]], "identifier (blark.input.blarkcompositesourceitem attribute)": [[23, "blark.input.BlarkCompositeSourceItem.identifier"]], "lines (blark.input.blarkcompositesourceitem property)": [[23, "blark.input.BlarkCompositeSourceItem.lines"]], "parts (blark.input.blarkcompositesourceitem attribute)": [[23, "blark.input.BlarkCompositeSourceItem.parts"]], "user (blark.input.blarkcompositesourceitem attribute)": [[23, "blark.input.BlarkCompositeSourceItem.user"]], "blarksourceitem (class in blark.input)": [[24, "blark.input.BlarkSourceItem"]], "__init__() (blark.input.blarksourceitem method)": [[24, "blark.input.BlarkSourceItem.__init__"]], "from_code() (blark.input.blarksourceitem class method)": [[24, "blark.input.BlarkSourceItem.from_code"]], "get_code_and_line_map() (blark.input.blarksourceitem method)": [[24, "blark.input.BlarkSourceItem.get_code_and_line_map"]], "get_filenames() (blark.input.blarksourceitem method)": [[24, "blark.input.BlarkSourceItem.get_filenames"]], "grammar_rule (blark.input.blarksourceitem attribute)": [[24, "blark.input.BlarkSourceItem.grammar_rule"]], "identifier (blark.input.blarksourceitem attribute)": [[24, "blark.input.BlarkSourceItem.identifier"]], "implicit_end (blark.input.blarksourceitem attribute)": [[24, "blark.input.BlarkSourceItem.implicit_end"]], "lines (blark.input.blarksourceitem attribute)": [[24, "blark.input.BlarkSourceItem.lines"]], "type (blark.input.blarksourceitem attribute)": [[24, "blark.input.BlarkSourceItem.type"]], "user (blark.input.blarksourceitem attribute)": [[24, "blark.input.BlarkSourceItem.user"]], "blarksourceline (class in blark.input)": [[25, "blark.input.BlarkSourceLine"]], "__init__() (blark.input.blarksourceline method)": [[25, "blark.input.BlarkSourceLine.__init__"]], "code (blark.input.blarksourceline attribute)": [[25, "blark.input.BlarkSourceLine.code"]], "filename (blark.input.blarksourceline attribute)": [[25, "blark.input.BlarkSourceLine.filename"]], "from_code() (blark.input.blarksourceline class method)": [[25, "blark.input.BlarkSourceLine.from_code"]], "lineno (blark.input.blarksourceline attribute)": [[25, "blark.input.BlarkSourceLine.lineno"]], "unsupportedfileformaterror": [[26, "blark.input.UnsupportedFileFormatError"]], "load_file_by_name() (in module blark.input)": [[27, "blark.input.load_file_by_name"]], "register_input_handler() (in module blark.input)": [[28, "blark.input.register_input_handler"]], "main() (in module blark.main)": [[29, "blark.main.main"]], "outputblock (class in blark.output)": [[30, "blark.output.OutputBlock"]], "__init__() (blark.output.outputblock method)": [[30, "blark.output.OutputBlock.__init__"]], "code (blark.output.outputblock attribute)": [[30, "blark.output.OutputBlock.code"]], "metadata (blark.output.outputblock attribute)": [[30, "blark.output.OutputBlock.metadata"]], "origin (blark.output.outputblock attribute)": [[30, "blark.output.OutputBlock.origin"]], "get_handler_by_name() (in module blark.output)": [[31, "blark.output.get_handler_by_name"]], "register_output_handler() (in module blark.output)": [[32, "blark.output.register_output_handler"]], "blarkstartingrule (class in blark.parse)": [[33, "blark.parse.BlarkStartingRule"]], "action (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.action"]], "data_type_declaration (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.data_type_declaration"]], "function_block_method_declaration (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.function_block_method_declaration"]], "function_block_property_declaration (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.function_block_property_declaration"]], "function_block_type_declaration (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.function_block_type_declaration"]], "function_declaration (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.function_declaration"]], "global_var_declarations (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.global_var_declarations"]], "iec_source (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.iec_source"]], "interface_declaration (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.interface_declaration"]], "program_declaration (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.program_declaration"]], "statement_list (blark.parse.blarkstartingrule attribute)": [[33, "blark.parse.BlarkStartingRule.statement_list"]], "parseresult (class in blark.parse)": [[34, "blark.parse.ParseResult"]], "__init__() (blark.parse.parseresult method)": [[34, "blark.parse.ParseResult.__init__"]], "comments (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.comments"]], "dump_source() (blark.parse.parseresult method)": [[34, "blark.parse.ParseResult.dump_source"]], "exception (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.exception"]], "filename (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.filename"]], "identifier (blark.parse.parseresult property)": [[34, "blark.parse.ParseResult.identifier"]], "item (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.item"]], "line_map (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.line_map"]], "parent (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.parent"]], "processed_source_code (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.processed_source_code"]], "source_code (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.source_code"]], "transform() (blark.parse.parseresult method)": [[34, "blark.parse.ParseResult.transform"]], "transformed (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.transformed"]], "tree (blark.parse.parseresult attribute)": [[34, "blark.parse.ParseResult.tree"]], "build_arg_parser() (in module blark.parse)": [[35, "blark.parse.build_arg_parser"]], "dump_json() (in module blark.parse)": [[36, "blark.parse.dump_json"]], "get_parser() (in module blark.parse)": [[37, "blark.parse.get_parser"]], "main() (in module blark.parse)": [[38, "blark.parse.main"]], "new_parser() (in module blark.parse)": [[39, "blark.parse.new_parser"]], "parse() (in module blark.parse)": [[40, "blark.parse.parse"]], "parse_item() (in module blark.parse)": [[41, "blark.parse.parse_item"]], "parse_project() (in module blark.parse)": [[42, "blark.parse.parse_project"]], "parse_single_file() (in module blark.parse)": [[43, "blark.parse.parse_single_file"]], "parse_source_code() (in module blark.parse)": [[44, "blark.parse.parse_source_code"]], "summarize() (in module blark.parse)": [[45, "blark.parse.summarize"]], "plainfileloader (class in blark.plain)": [[46, "blark.plain.PlainFileLoader"]], "__init__() (blark.plain.plainfileloader method)": [[46, "blark.plain.PlainFileLoader.__init__"]], "filename (blark.plain.plainfileloader attribute)": [[46, "blark.plain.PlainFileLoader.filename"]], "formatted_code (blark.plain.plainfileloader attribute)": [[46, "blark.plain.PlainFileLoader.formatted_code"]], "identifier (blark.plain.plainfileloader attribute)": [[46, "blark.plain.PlainFileLoader.identifier"]], "load() (blark.plain.plainfileloader class method)": [[46, "blark.plain.PlainFileLoader.load"]], "raw_source (blark.plain.plainfileloader attribute)": [[46, "blark.plain.PlainFileLoader.raw_source"]], "rewrite_code() (blark.plain.plainfileloader method)": [[46, "blark.plain.PlainFileLoader.rewrite_code"]], "save() (blark.plain.plainfileloader static method)": [[46, "blark.plain.PlainFileLoader.save"]], "save_to() (blark.plain.plainfileloader method)": [[46, "blark.plain.PlainFileLoader.save_to"]], "source_type (blark.plain.plainfileloader attribute)": [[46, "blark.plain.PlainFileLoader.source_type"]], "to_file_contents() (blark.plain.plainfileloader method)": [[46, "blark.plain.PlainFileLoader.to_file_contents"]], "dependencyinformation (class in blark.solution)": [[47, "blark.solution.DependencyInformation"]], "__init__() (blark.solution.dependencyinformation method)": [[47, "blark.solution.DependencyInformation.__init__"]], "default (blark.solution.dependencyinformation attribute)": [[47, "blark.solution.DependencyInformation.default"]], "from_xml() (blark.solution.dependencyinformation class method)": [[47, "blark.solution.DependencyInformation.from_xml"]], "name (blark.solution.dependencyinformation attribute)": [[47, "blark.solution.DependencyInformation.name"]], "resolution (blark.solution.dependencyinformation attribute)": [[47, "blark.solution.DependencyInformation.resolution"]], "dependencyversion (class in blark.solution)": [[48, "blark.solution.DependencyVersion"]], "__init__() (blark.solution.dependencyversion method)": [[48, "blark.solution.DependencyVersion.__init__"]], "from_string() (blark.solution.dependencyversion class method)": [[48, "blark.solution.DependencyVersion.from_string"]], "name (blark.solution.dependencyversion attribute)": [[48, "blark.solution.DependencyVersion.name"]], "namespace (blark.solution.dependencyversion attribute)": [[48, "blark.solution.DependencyVersion.namespace"]], "vendor (blark.solution.dependencyversion attribute)": [[48, "blark.solution.DependencyVersion.vendor"]], "version (blark.solution.dependencyversion attribute)": [[48, "blark.solution.DependencyVersion.version"]], "locatedstring (class in blark.solution)": [[49, "blark.solution.LocatedString"]], "__init__() (blark.solution.locatedstring method)": [[49, "blark.solution.LocatedString.__init__"]], "column (blark.solution.locatedstring attribute)": [[49, "blark.solution.LocatedString.column"]], "filename (blark.solution.locatedstring attribute)": [[49, "blark.solution.LocatedString.filename"]], "lineno (blark.solution.locatedstring attribute)": [[49, "blark.solution.LocatedString.lineno"]], "to_lines() (blark.solution.locatedstring method)": [[49, "blark.solution.LocatedString.to_lines"]], "value (blark.solution.locatedstring attribute)": [[49, "blark.solution.LocatedString.value"]], "project (class in blark.solution)": [[50, "blark.solution.Project"]], "__init__() (blark.solution.project method)": [[50, "blark.solution.Project.__init__"]], "from_filename() (blark.solution.project class method)": [[50, "blark.solution.Project.from_filename"]], "guid (blark.solution.project attribute)": [[50, "blark.solution.Project.guid"]], "load() (blark.solution.project method)": [[50, "blark.solution.Project.load"]], "loaded (blark.solution.project attribute)": [[50, "blark.solution.Project.loaded"]], "local_path (blark.solution.project attribute)": [[50, "blark.solution.Project.local_path"]], "name (blark.solution.project attribute)": [[50, "blark.solution.Project.name"]], "saved_path (blark.solution.project attribute)": [[50, "blark.solution.Project.saved_path"]], "solution_guid (blark.solution.project attribute)": [[50, "blark.solution.Project.solution_guid"]], "solution (class in blark.solution)": [[51, "blark.solution.Solution"]], "__init__() (blark.solution.solution method)": [[51, "blark.solution.Solution.__init__"]], "file_extension (blark.solution.solution attribute)": [[51, "blark.solution.Solution.file_extension"]], "filename (blark.solution.solution attribute)": [[51, "blark.solution.Solution.filename"]], "from_contents() (blark.solution.solution class method)": [[51, "blark.solution.Solution.from_contents"]], "from_filename() (blark.solution.solution class method)": [[51, "blark.solution.Solution.from_filename"]], "from_projects() (blark.solution.solution class method)": [[51, "blark.solution.Solution.from_projects"]], "projects (blark.solution.solution attribute)": [[51, "blark.solution.Solution.projects"]], "projects_by_name (blark.solution.solution property)": [[51, "blark.solution.Solution.projects_by_name"]], "root (blark.solution.solution attribute)": [[51, "blark.solution.Solution.root"]], "solutionloadererror": [[52, "blark.solution.SolutionLoaderError"]], "tcaction (class in blark.solution)": [[53, "blark.solution.TcAction"]], "__init__() (blark.solution.tcaction method)": [[53, "blark.solution.TcAction.__init__"]], "rewrite_code() (blark.solution.tcaction method)": [[53, "blark.solution.TcAction.rewrite_code"]], "to_blark() (blark.solution.tcaction method)": [[53, "blark.solution.TcAction.to_blark"]], "tcdut (class in blark.solution)": [[54, "blark.solution.TcDUT"]], "__init__() (blark.solution.tcdut method)": [[54, "blark.solution.TcDUT.__init__"]], "default_source_type (blark.solution.tcdut attribute)": [[54, "blark.solution.TcDUT.default_source_type"]], "file_extension (blark.solution.tcdut attribute)": [[54, "blark.solution.TcDUT.file_extension"]], "rewrite_code() (blark.solution.tcdut method)": [[54, "blark.solution.TcDUT.rewrite_code"]], "to_blark() (blark.solution.tcdut method)": [[54, "blark.solution.TcDUT.to_blark"]], "tcdeclimpl (class in blark.solution)": [[55, "blark.solution.TcDeclImpl"]], "__init__() (blark.solution.tcdeclimpl method)": [[55, "blark.solution.TcDeclImpl.__init__"]], "declaration (blark.solution.tcdeclimpl attribute)": [[55, "blark.solution.TcDeclImpl.declaration"]], "declaration_to_blark() (blark.solution.tcdeclimpl method)": [[55, "blark.solution.TcDeclImpl.declaration_to_blark"]], "filename (blark.solution.tcdeclimpl attribute)": [[55, "blark.solution.TcDeclImpl.filename"]], "from_xml() (blark.solution.tcdeclimpl class method)": [[55, "blark.solution.TcDeclImpl.from_xml"]], "identifier (blark.solution.tcdeclimpl attribute)": [[55, "blark.solution.TcDeclImpl.identifier"]], "implementation (blark.solution.tcdeclimpl attribute)": [[55, "blark.solution.TcDeclImpl.implementation"]], "implementation_to_blark() (blark.solution.tcdeclimpl method)": [[55, "blark.solution.TcDeclImpl.implementation_to_blark"]], "metadata (blark.solution.tcdeclimpl attribute)": [[55, "blark.solution.TcDeclImpl.metadata"]], "parent (blark.solution.tcdeclimpl attribute)": [[55, "blark.solution.TcDeclImpl.parent"]], "rewrite_code() (blark.solution.tcdeclimpl method)": [[55, "blark.solution.TcDeclImpl.rewrite_code"]], "source_type (blark.solution.tcdeclimpl attribute)": [[55, "blark.solution.TcDeclImpl.source_type"]], "to_blark() (blark.solution.tcdeclimpl method)": [[55, "blark.solution.TcDeclImpl.to_blark"]], "tcextrainfo (class in blark.solution)": [[56, "blark.solution.TcExtraInfo"]], "__init__() (blark.solution.tcextrainfo method)": [[56, "blark.solution.TcExtraInfo.__init__"]], "from_xml() (blark.solution.tcextrainfo class method)": [[56, "blark.solution.TcExtraInfo.from_xml"]], "metadata (blark.solution.tcextrainfo attribute)": [[56, "blark.solution.TcExtraInfo.metadata"]], "parent (blark.solution.tcextrainfo attribute)": [[56, "blark.solution.TcExtraInfo.parent"]], "xml (blark.solution.tcextrainfo attribute)": [[56, "blark.solution.TcExtraInfo.xml"]], "tcgvl (class in blark.solution)": [[57, "blark.solution.TcGVL"]], "__init__() (blark.solution.tcgvl method)": [[57, "blark.solution.TcGVL.__init__"]], "default_source_type (blark.solution.tcgvl attribute)": [[57, "blark.solution.TcGVL.default_source_type"]], "file_extension (blark.solution.tcgvl attribute)": [[57, "blark.solution.TcGVL.file_extension"]], "rewrite_code() (blark.solution.tcgvl method)": [[57, "blark.solution.TcGVL.rewrite_code"]], "to_blark() (blark.solution.tcgvl method)": [[57, "blark.solution.TcGVL.to_blark"]], "tcio (class in blark.solution)": [[58, "blark.solution.TcIO"]], "__init__() (blark.solution.tcio method)": [[58, "blark.solution.TcIO.__init__"]], "create_source_child_from_xml() (blark.solution.tcio class method)": [[58, "blark.solution.TcIO.create_source_child_from_xml"]], "default_source_type (blark.solution.tcio attribute)": [[58, "blark.solution.TcIO.default_source_type"]], "file_extension (blark.solution.tcio attribute)": [[58, "blark.solution.TcIO.file_extension"]], "parts (blark.solution.tcio attribute)": [[58, "blark.solution.TcIO.parts"]], "to_blark() (blark.solution.tcio method)": [[58, "blark.solution.TcIO.to_blark"]], "tcmethod (class in blark.solution)": [[59, "blark.solution.TcMethod"]], "__init__() (blark.solution.tcmethod method)": [[59, "blark.solution.TcMethod.__init__"]], "rewrite_code() (blark.solution.tcmethod method)": [[59, "blark.solution.TcMethod.rewrite_code"]], "to_blark() (blark.solution.tcmethod method)": [[59, "blark.solution.TcMethod.to_blark"]], "tcpou (class in blark.solution)": [[60, "blark.solution.TcPOU"]], "__init__() (blark.solution.tcpou method)": [[60, "blark.solution.TcPOU.__init__"]], "create_source_child_from_xml() (blark.solution.tcpou class method)": [[60, "blark.solution.TcPOU.create_source_child_from_xml"]], "file_extension (blark.solution.tcpou attribute)": [[60, "blark.solution.TcPOU.file_extension"]], "get_child_by_identifier() (blark.solution.tcpou method)": [[60, "blark.solution.TcPOU.get_child_by_identifier"]], "parts (blark.solution.tcpou attribute)": [[60, "blark.solution.TcPOU.parts"]], "parts_by_name (blark.solution.tcpou property)": [[60, "blark.solution.TcPOU.parts_by_name"]], "rewrite_code() (blark.solution.tcpou method)": [[60, "blark.solution.TcPOU.rewrite_code"]], "to_blark() (blark.solution.tcpou method)": [[60, "blark.solution.TcPOU.to_blark"]], "tcproperty (class in blark.solution)": [[61, "blark.solution.TcProperty"]], "__init__() (blark.solution.tcproperty method)": [[61, "blark.solution.TcProperty.__init__"]], "get (blark.solution.tcproperty attribute)": [[61, "blark.solution.TcProperty.get"]], "rewrite_code() (blark.solution.tcproperty method)": [[61, "blark.solution.TcProperty.rewrite_code"]], "set (blark.solution.tcproperty attribute)": [[61, "blark.solution.TcProperty.set"]], "to_blark() (blark.solution.tcproperty method)": [[61, "blark.solution.TcProperty.to_blark"]], "tcsource (class in blark.solution)": [[62, "blark.solution.TcSource"]], "__init__() (blark.solution.tcsource method)": [[62, "blark.solution.TcSource.__init__"]], "decl (blark.solution.tcsource attribute)": [[62, "blark.solution.TcSource.decl"]], "default_source_type (blark.solution.tcsource attribute)": [[62, "blark.solution.TcSource.default_source_type"]], "filename (blark.solution.tcsource attribute)": [[62, "blark.solution.TcSource.filename"]], "from_contents() (blark.solution.tcsource class method)": [[62, "blark.solution.TcSource.from_contents"]], "from_filename() (blark.solution.tcsource class method)": [[62, "blark.solution.TcSource.from_filename"]], "from_xml() (blark.solution.tcsource static method)": [[62, "blark.solution.TcSource.from_xml"]], "guid (blark.solution.tcsource attribute)": [[62, "blark.solution.TcSource.guid"]], "metadata (blark.solution.tcsource attribute)": [[62, "blark.solution.TcSource.metadata"]], "name (blark.solution.tcsource attribute)": [[62, "blark.solution.TcSource.name"]], "parent (blark.solution.tcsource attribute)": [[62, "blark.solution.TcSource.parent"]], "rewrite_code() (blark.solution.tcsource method)": [[62, "blark.solution.TcSource.rewrite_code"]], "source_type (blark.solution.tcsource attribute)": [[62, "blark.solution.TcSource.source_type"]], "to_file_contents() (blark.solution.tcsource method)": [[62, "blark.solution.TcSource.to_file_contents"]], "to_xml() (blark.solution.tcsource method)": [[62, "blark.solution.TcSource.to_xml"]], "xml (blark.solution.tcsource attribute)": [[62, "blark.solution.TcSource.xml"]], "tcsourcechild (class in blark.solution)": [[63, "blark.solution.TcSourceChild"]], "__init__() (blark.solution.tcsourcechild method)": [[63, "blark.solution.TcSourceChild.__init__"]], "from_xml() (blark.solution.tcsourcechild class method)": [[63, "blark.solution.TcSourceChild.from_xml"]], "parent (blark.solution.tcsourcechild attribute)": [[63, "blark.solution.TcSourceChild.parent"]], "tctto (class in blark.solution)": [[64, "blark.solution.TcTTO"]], "__init__() (blark.solution.tctto method)": [[64, "blark.solution.TcTTO.__init__"]], "file_extension (blark.solution.tctto attribute)": [[64, "blark.solution.TcTTO.file_extension"]], "to_blark() (blark.solution.tctto method)": [[64, "blark.solution.TcTTO.to_blark"]], "xml (blark.solution.tctto attribute)": [[64, "blark.solution.TcTTO.xml"]], "tcunknownxml (class in blark.solution)": [[65, "blark.solution.TcUnknownXml"]], "__init__() (blark.solution.tcunknownxml method)": [[65, "blark.solution.TcUnknownXml.__init__"]], "parent (blark.solution.tcunknownxml attribute)": [[65, "blark.solution.TcUnknownXml.parent"]], "to_blark() (blark.solution.tcunknownxml method)": [[65, "blark.solution.TcUnknownXml.to_blark"]], "xml (blark.solution.tcunknownxml attribute)": [[65, "blark.solution.TcUnknownXml.xml"]], "twincatplcproject (class in blark.solution)": [[66, "blark.solution.TwincatPlcProject"]], "__init__() (blark.solution.twincatplcproject method)": [[66, "blark.solution.TwincatPlcProject.__init__"]], "dependencies (blark.solution.twincatplcproject attribute)": [[66, "blark.solution.TwincatPlcProject.dependencies"]], "file_extension (blark.solution.twincatplcproject attribute)": [[66, "blark.solution.TwincatPlcProject.file_extension"]], "from_filename() (blark.solution.twincatplcproject class method)": [[66, "blark.solution.TwincatPlcProject.from_filename"]], "from_project_xml() (blark.solution.twincatplcproject class method)": [[66, "blark.solution.TwincatPlcProject.from_project_xml"]], "from_standalone_xml() (blark.solution.twincatplcproject class method)": [[66, "blark.solution.TwincatPlcProject.from_standalone_xml"]], "from_xti_filename() (blark.solution.twincatplcproject class method)": [[66, "blark.solution.TwincatPlcProject.from_xti_filename"]], "guid (blark.solution.twincatplcproject attribute)": [[66, "blark.solution.TwincatPlcProject.guid"]], "name (blark.solution.twincatplcproject property)": [[66, "blark.solution.TwincatPlcProject.name"]], "plcproj_path (blark.solution.twincatplcproject attribute)": [[66, "blark.solution.TwincatPlcProject.plcproj_path"]], "properties (blark.solution.twincatplcproject attribute)": [[66, "blark.solution.TwincatPlcProject.properties"]], "sources (blark.solution.twincatplcproject attribute)": [[66, "blark.solution.TwincatPlcProject.sources"]], "xti_path (blark.solution.twincatplcproject attribute)": [[66, "blark.solution.TwincatPlcProject.xti_path"]], "twincatsourcecodeitem (class in blark.solution)": [[67, "blark.solution.TwincatSourceCodeItem"]], "__init__() (blark.solution.twincatsourcecodeitem method)": [[67, "blark.solution.TwincatSourceCodeItem.__init__"]], "contents (blark.solution.twincatsourcecodeitem attribute)": [[67, "blark.solution.TwincatSourceCodeItem.contents"]], "from_compile_xml() (blark.solution.twincatsourcecodeitem class method)": [[67, "blark.solution.TwincatSourceCodeItem.from_compile_xml"]], "guid (blark.solution.twincatsourcecodeitem attribute)": [[67, "blark.solution.TwincatSourceCodeItem.guid"]], "link_always (blark.solution.twincatsourcecodeitem attribute)": [[67, "blark.solution.TwincatSourceCodeItem.link_always"]], "local_path (blark.solution.twincatsourcecodeitem attribute)": [[67, "blark.solution.TwincatSourceCodeItem.local_path"]], "parent (blark.solution.twincatsourcecodeitem attribute)": [[67, "blark.solution.TwincatSourceCodeItem.parent"]], "raw_contents (blark.solution.twincatsourcecodeitem attribute)": [[67, "blark.solution.TwincatSourceCodeItem.raw_contents"]], "save_to() (blark.solution.twincatsourcecodeitem method)": [[67, "blark.solution.TwincatSourceCodeItem.save_to"]], "saved_path (blark.solution.twincatsourcecodeitem attribute)": [[67, "blark.solution.TwincatSourceCodeItem.saved_path"]], "subtype (blark.solution.twincatsourcecodeitem attribute)": [[67, "blark.solution.TwincatSourceCodeItem.subtype"]], "to_file_contents() (blark.solution.twincatsourcecodeitem method)": [[67, "blark.solution.TwincatSourceCodeItem.to_file_contents"]], "twincattsproject (class in blark.solution)": [[68, "blark.solution.TwincatTsProject"]], "__init__() (blark.solution.twincattsproject method)": [[68, "blark.solution.TwincatTsProject.__init__"]], "file_extension (blark.solution.twincattsproject attribute)": [[68, "blark.solution.TwincatTsProject.file_extension"]], "from_filename() (blark.solution.twincattsproject class method)": [[68, "blark.solution.TwincatTsProject.from_filename"]], "from_xml() (blark.solution.twincattsproject class method)": [[68, "blark.solution.TwincatTsProject.from_xml"]], "guid (blark.solution.twincattsproject attribute)": [[68, "blark.solution.TwincatTsProject.guid"]], "netid (blark.solution.twincattsproject attribute)": [[68, "blark.solution.TwincatTsProject.netid"]], "path (blark.solution.twincattsproject attribute)": [[68, "blark.solution.TwincatTsProject.path"]], "plcs (blark.solution.twincattsproject attribute)": [[68, "blark.solution.TwincatTsProject.plcs"]], "plcs_by_name (blark.solution.twincattsproject property)": [[68, "blark.solution.TwincatTsProject.plcs_by_name"]], "unsupportedsourcefileerror": [[69, "blark.solution.UnsupportedSourceFileError"]], "__init__() (blark.solution.unsupportedsourcefileerror method)": [[69, "blark.solution.UnsupportedSourceFileError.__init__"]], "type (blark.solution.unsupportedsourcefileerror attribute)": [[69, "blark.solution.UnsupportedSourceFileError.type"]], "filename_from_xml() (in module blark.solution)": [[70, "blark.solution.filename_from_xml"]], "get_blark_input_from_solution() (in module blark.solution)": [[71, "blark.solution.get_blark_input_from_solution"]], "get_child_located_text() (in module blark.solution)": [[72, "blark.solution.get_child_located_text"]], "get_child_text() (in module blark.solution)": [[73, "blark.solution.get_child_text"]], "get_code_object_from_xml() (in module blark.solution)": [[74, "blark.solution.get_code_object_from_xml"]], "get_project_guid() (in module blark.solution)": [[75, "blark.solution.get_project_guid"]], "get_project_target_netid() (in module blark.solution)": [[76, "blark.solution.get_project_target_netid"]], "get_tcplc_from_xml() (in module blark.solution)": [[77, "blark.solution.get_tcplc_from_xml"]], "make_solution_from_files() (in module blark.solution)": [[78, "blark.solution.make_solution_from_files"]], "parse_xml_contents() (in module blark.solution)": [[79, "blark.solution.parse_xml_contents"]], "parse_xml_file() (in module blark.solution)": [[80, "blark.solution.parse_xml_file"]], "project_loader() (in module blark.solution)": [[81, "blark.solution.project_loader"]], "projects_from_solution_source() (in module blark.solution)": [[82, "blark.solution.projects_from_solution_source"]], "solution_loader() (in module blark.solution)": [[83, "blark.solution.solution_loader"]], "split_property_and_base_decl() (in module blark.solution)": [[84, "blark.solution.split_property_and_base_decl"]], "strip_implicit_lines() (in module blark.solution)": [[85, "blark.solution.strip_implicit_lines"]], "strip_xml_namespace() (in module blark.solution)": [[86, "blark.solution.strip_xml_namespace"]], "twincat_file_loader() (in module blark.solution)": [[87, "blark.solution.twincat_file_loader"]], "twincat_file_writer() (in module blark.solution)": [[88, "blark.solution.twincat_file_writer"]], "blarkdirective (class in blark.sphinxdomain)": [[89, "blark.sphinxdomain.BlarkDirective"]], "content (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.content"]], "doc_field_types (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.doc_field_types"]], "domain (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.domain"]], "final_argument_whitespace (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.final_argument_whitespace"]], "has_content (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.has_content"]], "indexnode (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.indexnode"]], "lineno (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.lineno"]], "name (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.name"]], "objtype (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.objtype"]], "option_spec (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.option_spec"]], "optional_arguments (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.optional_arguments"]], "options (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.options"]], "rawtext (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.rawtext"]], "required_arguments (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.required_arguments"]], "text (blark.sphinxdomain.blarkdirective attribute)": [[89, "blark.sphinxdomain.BlarkDirective.text"]], "blarkdirectivewithdeclarations (class in blark.sphinxdomain)": [[90, "blark.sphinxdomain.BlarkDirectiveWithDeclarations"]], "before_content() (blark.sphinxdomain.blarkdirectivewithdeclarations method)": [[90, "blark.sphinxdomain.BlarkDirectiveWithDeclarations.before_content"]], "doc_field_types (blark.sphinxdomain.blarkdirectivewithdeclarations attribute)": [[90, "blark.sphinxdomain.BlarkDirectiveWithDeclarations.doc_field_types"]], "get_signature_prefix() (blark.sphinxdomain.blarkdirectivewithdeclarations method)": [[90, "blark.sphinxdomain.BlarkDirectiveWithDeclarations.get_signature_prefix"]], "handle_signature() (blark.sphinxdomain.blarkdirectivewithdeclarations method)": [[90, "blark.sphinxdomain.BlarkDirectiveWithDeclarations.handle_signature"]], "obj (blark.sphinxdomain.blarkdirectivewithdeclarations attribute)": [[90, "blark.sphinxdomain.BlarkDirectiveWithDeclarations.obj"]], "transform_content() (blark.sphinxdomain.blarkdirectivewithdeclarations method)": [[90, "blark.sphinxdomain.BlarkDirectiveWithDeclarations.transform_content"]], "blarkdomain (class in blark.sphinxdomain)": [[91, "blark.sphinxdomain.BlarkDomain"]], "clear_doc() (blark.sphinxdomain.blarkdomain method)": [[91, "blark.sphinxdomain.BlarkDomain.clear_doc"]], "directives (blark.sphinxdomain.blarkdomain attribute)": [[91, "blark.sphinxdomain.BlarkDomain.directives"]], "find_obj() (blark.sphinxdomain.blarkdomain method)": [[91, "blark.sphinxdomain.BlarkDomain.find_obj"]], "indices (blark.sphinxdomain.blarkdomain attribute)": [[91, "blark.sphinxdomain.BlarkDomain.indices"]], "initial_data (blark.sphinxdomain.blarkdomain attribute)": [[91, "blark.sphinxdomain.BlarkDomain.initial_data"]], "label (blark.sphinxdomain.blarkdomain attribute)": [[91, "blark.sphinxdomain.BlarkDomain.label"]], "name (blark.sphinxdomain.blarkdomain attribute)": [[91, "blark.sphinxdomain.BlarkDomain.name"]], "object_types (blark.sphinxdomain.blarkdomain attribute)": [[91, "blark.sphinxdomain.BlarkDomain.object_types"]], "resolve_xref() (blark.sphinxdomain.blarkdomain method)": [[91, "blark.sphinxdomain.BlarkDomain.resolve_xref"]], "roles (blark.sphinxdomain.blarkdomain attribute)": [[91, "blark.sphinxdomain.BlarkDomain.roles"]], "blarksphinxcache (class in blark.sphinxdomain)": [[92, "blark.sphinxdomain.BlarkSphinxCache"]], "__init__() (blark.sphinxdomain.blarksphinxcache method)": [[92, "blark.sphinxdomain.BlarkSphinxCache.__init__"]], "cache (blark.sphinxdomain.blarksphinxcache attribute)": [[92, "blark.sphinxdomain.BlarkSphinxCache.cache"]], "configure() (blark.sphinxdomain.blarksphinxcache method)": [[92, "blark.sphinxdomain.BlarkSphinxCache.configure"]], "find_by_name() (blark.sphinxdomain.blarksphinxcache method)": [[92, "blark.sphinxdomain.BlarkSphinxCache.find_by_name"]], "instance() (blark.sphinxdomain.blarksphinxcache static method)": [[92, "blark.sphinxdomain.BlarkSphinxCache.instance"]], "blarkxrefrole (class in blark.sphinxdomain)": [[93, "blark.sphinxdomain.BlarkXRefRole"]], "process_link() (blark.sphinxdomain.blarkxrefrole method)": [[93, "blark.sphinxdomain.BlarkXRefRole.process_link"]], "declarationdirective (class in blark.sphinxdomain)": [[94, "blark.sphinxdomain.DeclarationDirective"]], "block_header (blark.sphinxdomain.declarationdirective attribute)": [[94, "blark.sphinxdomain.DeclarationDirective.block_header"]], "handle_signature() (blark.sphinxdomain.declarationdirective method)": [[94, "blark.sphinxdomain.DeclarationDirective.handle_signature"]], "obj (blark.sphinxdomain.declarationdirective attribute)": [[94, "blark.sphinxdomain.DeclarationDirective.obj"]], "transform_content() (blark.sphinxdomain.declarationdirective method)": [[94, "blark.sphinxdomain.DeclarationDirective.transform_content"]], "functionblockdirective (class in blark.sphinxdomain)": [[95, "blark.sphinxdomain.FunctionBlockDirective"]], "obj (blark.sphinxdomain.functionblockdirective attribute)": [[95, "blark.sphinxdomain.FunctionBlockDirective.obj"]], "signature_prefix (blark.sphinxdomain.functionblockdirective attribute)": [[95, "blark.sphinxdomain.FunctionBlockDirective.signature_prefix"]], "functiondirective (class in blark.sphinxdomain)": [[96, "blark.sphinxdomain.FunctionDirective"]], "doc_field_types (blark.sphinxdomain.functiondirective attribute)": [[96, "blark.sphinxdomain.FunctionDirective.doc_field_types"]], "obj (blark.sphinxdomain.functiondirective attribute)": [[96, "blark.sphinxdomain.FunctionDirective.obj"]], "signature_prefix (blark.sphinxdomain.functiondirective attribute)": [[96, "blark.sphinxdomain.FunctionDirective.signature_prefix"]], "gvldirective (class in blark.sphinxdomain)": [[97, "blark.sphinxdomain.GvlDirective"]], "obj (blark.sphinxdomain.gvldirective attribute)": [[97, "blark.sphinxdomain.GvlDirective.obj"]], "signature_prefix (blark.sphinxdomain.gvldirective attribute)": [[97, "blark.sphinxdomain.GvlDirective.signature_prefix"]], "missingdeclaration (class in blark.sphinxdomain)": [[98, "blark.sphinxdomain.MissingDeclaration"]], "__init__() (blark.sphinxdomain.missingdeclaration method)": [[98, "blark.sphinxdomain.MissingDeclaration.__init__"]], "declarations (blark.sphinxdomain.missingdeclaration attribute)": [[98, "blark.sphinxdomain.MissingDeclaration.declarations"]], "declarations_by_block (blark.sphinxdomain.missingdeclaration attribute)": [[98, "blark.sphinxdomain.MissingDeclaration.declarations_by_block"]], "name (blark.sphinxdomain.missingdeclaration attribute)": [[98, "blark.sphinxdomain.MissingDeclaration.name"]], "source_code (blark.sphinxdomain.missingdeclaration attribute)": [[98, "blark.sphinxdomain.MissingDeclaration.source_code"]], "programdirective (class in blark.sphinxdomain)": [[99, "blark.sphinxdomain.ProgramDirective"]], "obj (blark.sphinxdomain.programdirective attribute)": [[99, "blark.sphinxdomain.ProgramDirective.obj"]], "signature_prefix (blark.sphinxdomain.programdirective attribute)": [[99, "blark.sphinxdomain.ProgramDirective.signature_prefix"]], "typedirective (class in blark.sphinxdomain)": [[100, "blark.sphinxdomain.TypeDirective"]], "obj (blark.sphinxdomain.typedirective attribute)": [[100, "blark.sphinxdomain.TypeDirective.obj"]], "signature_prefix (blark.sphinxdomain.typedirective attribute)": [[100, "blark.sphinxdomain.TypeDirective.signature_prefix"]], "variableblockdirective (class in blark.sphinxdomain)": [[101, "blark.sphinxdomain.VariableBlockDirective"]], "block_header (blark.sphinxdomain.variableblockdirective attribute)": [[101, "blark.sphinxdomain.VariableBlockDirective.block_header"]], "declarations (blark.sphinxdomain.variableblockdirective attribute)": [[101, "blark.sphinxdomain.VariableBlockDirective.declarations"]], "handle_signature() (blark.sphinxdomain.variableblockdirective method)": [[101, "blark.sphinxdomain.VariableBlockDirective.handle_signature"]], "parent_name (blark.sphinxdomain.variableblockdirective attribute)": [[101, "blark.sphinxdomain.VariableBlockDirective.parent_name"]], "transform_content() (blark.sphinxdomain.variableblockdirective method)": [[101, "blark.sphinxdomain.VariableBlockDirective.transform_content"]], "declaration_to_content() (in module blark.sphinxdomain)": [[102, "blark.sphinxdomain.declaration_to_content"]], "declaration_to_signature() (in module blark.sphinxdomain)": [[103, "blark.sphinxdomain.declaration_to_signature"]], "declarations_to_block() (in module blark.sphinxdomain)": [[104, "blark.sphinxdomain.declarations_to_block"]], "setup() (in module blark.sphinxdomain)": [[105, "blark.sphinxdomain.setup"]], "actionsummary (class in blark.summary)": [[106, "blark.summary.ActionSummary"]], "__init__() (blark.summary.actionsummary method)": [[106, "blark.summary.ActionSummary.__init__"]], "from_action() (blark.summary.actionsummary class method)": [[106, "blark.summary.ActionSummary.from_action"]], "from_statement_list() (blark.summary.actionsummary class method)": [[106, "blark.summary.ActionSummary.from_statement_list"]], "implementation (blark.summary.actionsummary attribute)": [[106, "blark.summary.ActionSummary.implementation"]], "item (blark.summary.actionsummary attribute)": [[106, "blark.summary.ActionSummary.item"]], "name (blark.summary.actionsummary attribute)": [[106, "blark.summary.ActionSummary.name"]], "source_code (blark.summary.actionsummary attribute)": [[106, "blark.summary.ActionSummary.source_code"]], "codesummary (class in blark.summary)": [[107, "blark.summary.CodeSummary"]], "__init__() (blark.summary.codesummary method)": [[107, "blark.summary.CodeSummary.__init__"]], "append() (blark.summary.codesummary method)": [[107, "blark.summary.CodeSummary.append"]], "data_types (blark.summary.codesummary attribute)": [[107, "blark.summary.CodeSummary.data_types"]], "find() (blark.summary.codesummary method)": [[107, "blark.summary.CodeSummary.find"]], "find_code_object_by_dotted_name() (blark.summary.codesummary method)": [[107, "blark.summary.CodeSummary.find_code_object_by_dotted_name"]], "find_path() (blark.summary.codesummary method)": [[107, "blark.summary.CodeSummary.find_path"]], "from_parse_results() (blark.summary.codesummary static method)": [[107, "blark.summary.CodeSummary.from_parse_results"]], "function_blocks (blark.summary.codesummary attribute)": [[107, "blark.summary.CodeSummary.function_blocks"]], "functions (blark.summary.codesummary attribute)": [[107, "blark.summary.CodeSummary.functions"]], "get_all_items_by_name() (blark.summary.codesummary method)": [[107, "blark.summary.CodeSummary.get_all_items_by_name"]], "get_item_by_name() (blark.summary.codesummary method)": [[107, "blark.summary.CodeSummary.get_item_by_name"]], "globals (blark.summary.codesummary attribute)": [[107, "blark.summary.CodeSummary.globals"]], "interfaces (blark.summary.codesummary attribute)": [[107, "blark.summary.CodeSummary.interfaces"]], "programs (blark.summary.codesummary attribute)": [[107, "blark.summary.CodeSummary.programs"]], "squash() (blark.summary.codesummary method)": [[107, "blark.summary.CodeSummary.squash"]], "datatypesummary (class in blark.summary)": [[108, "blark.summary.DataTypeSummary"]], "__init__() (blark.summary.datatypesummary method)": [[108, "blark.summary.DataTypeSummary.__init__"]], "declarations (blark.summary.datatypesummary attribute)": [[108, "blark.summary.DataTypeSummary.declarations"]], "declarations_by_block (blark.summary.datatypesummary property)": [[108, "blark.summary.DataTypeSummary.declarations_by_block"]], "extends (blark.summary.datatypesummary attribute)": [[108, "blark.summary.DataTypeSummary.extends"]], "from_data_type() (blark.summary.datatypesummary class method)": [[108, "blark.summary.DataTypeSummary.from_data_type"]], "item (blark.summary.datatypesummary attribute)": [[108, "blark.summary.DataTypeSummary.item"]], "name (blark.summary.datatypesummary attribute)": [[108, "blark.summary.DataTypeSummary.name"]], "source_code (blark.summary.datatypesummary attribute)": [[108, "blark.summary.DataTypeSummary.source_code"]], "squash_base_extends() (blark.summary.datatypesummary method)": [[108, "blark.summary.DataTypeSummary.squash_base_extends"]], "squashed (blark.summary.datatypesummary attribute)": [[108, "blark.summary.DataTypeSummary.squashed"]], "type (blark.summary.datatypesummary attribute)": [[108, "blark.summary.DataTypeSummary.type"]], "declarationsummary (class in blark.summary)": [[109, "blark.summary.DeclarationSummary"]], "__init__() (blark.summary.declarationsummary method)": [[109, "blark.summary.DeclarationSummary.__init__"]], "base_type (blark.summary.declarationsummary attribute)": [[109, "blark.summary.DeclarationSummary.base_type"]], "block (blark.summary.declarationsummary attribute)": [[109, "blark.summary.DeclarationSummary.block"]], "from_block() (blark.summary.declarationsummary class method)": [[109, "blark.summary.DeclarationSummary.from_block"]], "from_declaration() (blark.summary.declarationsummary class method)": [[109, "blark.summary.DeclarationSummary.from_declaration"]], "from_global_variable() (blark.summary.declarationsummary class method)": [[109, "blark.summary.DeclarationSummary.from_global_variable"]], "item (blark.summary.declarationsummary attribute)": [[109, "blark.summary.DeclarationSummary.item"]], "location (blark.summary.declarationsummary attribute)": [[109, "blark.summary.DeclarationSummary.location"]], "location_type (blark.summary.declarationsummary property)": [[109, "blark.summary.DeclarationSummary.location_type"]], "name (blark.summary.declarationsummary attribute)": [[109, "blark.summary.DeclarationSummary.name"]], "parent (blark.summary.declarationsummary attribute)": [[109, "blark.summary.DeclarationSummary.parent"]], "qualified_name (blark.summary.declarationsummary property)": [[109, "blark.summary.DeclarationSummary.qualified_name"]], "type (blark.summary.declarationsummary attribute)": [[109, "blark.summary.DeclarationSummary.type"]], "value (blark.summary.declarationsummary attribute)": [[109, "blark.summary.DeclarationSummary.value"]], "functionblocksummary (class in blark.summary)": [[110, "blark.summary.FunctionBlockSummary"]], "__init__() (blark.summary.functionblocksummary method)": [[110, "blark.summary.FunctionBlockSummary.__init__"]], "actions (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.actions"]], "declarations (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.declarations"]], "declarations_by_block (blark.summary.functionblocksummary property)": [[110, "blark.summary.FunctionBlockSummary.declarations_by_block"]], "extends (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.extends"]], "from_function_block() (blark.summary.functionblocksummary class method)": [[110, "blark.summary.FunctionBlockSummary.from_function_block"]], "implementation (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.implementation"]], "item (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.item"]], "methods (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.methods"]], "name (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.name"]], "properties (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.properties"]], "source_code (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.source_code"]], "squash_base_extends() (blark.summary.functionblocksummary method)": [[110, "blark.summary.FunctionBlockSummary.squash_base_extends"]], "squashed (blark.summary.functionblocksummary attribute)": [[110, "blark.summary.FunctionBlockSummary.squashed"]], "functionsummary (class in blark.summary)": [[111, "blark.summary.FunctionSummary"]], "__init__() (blark.summary.functionsummary method)": [[111, "blark.summary.FunctionSummary.__init__"]], "declarations (blark.summary.functionsummary attribute)": [[111, "blark.summary.FunctionSummary.declarations"]], "declarations_by_block (blark.summary.functionsummary property)": [[111, "blark.summary.FunctionSummary.declarations_by_block"]], "from_function() (blark.summary.functionsummary class method)": [[111, "blark.summary.FunctionSummary.from_function"]], "implementation (blark.summary.functionsummary attribute)": [[111, "blark.summary.FunctionSummary.implementation"]], "item (blark.summary.functionsummary attribute)": [[111, "blark.summary.FunctionSummary.item"]], "name (blark.summary.functionsummary attribute)": [[111, "blark.summary.FunctionSummary.name"]], "return_type (blark.summary.functionsummary attribute)": [[111, "blark.summary.FunctionSummary.return_type"]], "source_code (blark.summary.functionsummary attribute)": [[111, "blark.summary.FunctionSummary.source_code"]], "globalvariablesummary (class in blark.summary)": [[112, "blark.summary.GlobalVariableSummary"]], "__init__() (blark.summary.globalvariablesummary method)": [[112, "blark.summary.GlobalVariableSummary.__init__"]], "declarations (blark.summary.globalvariablesummary attribute)": [[112, "blark.summary.GlobalVariableSummary.declarations"]], "declarations_by_block (blark.summary.globalvariablesummary property)": [[112, "blark.summary.GlobalVariableSummary.declarations_by_block"]], "from_globals() (blark.summary.globalvariablesummary class method)": [[112, "blark.summary.GlobalVariableSummary.from_globals"]], "item (blark.summary.globalvariablesummary attribute)": [[112, "blark.summary.GlobalVariableSummary.item"]], "name (blark.summary.globalvariablesummary attribute)": [[112, "blark.summary.GlobalVariableSummary.name"]], "qualified_only (blark.summary.globalvariablesummary attribute)": [[112, "blark.summary.GlobalVariableSummary.qualified_only"]], "source_code (blark.summary.globalvariablesummary attribute)": [[112, "blark.summary.GlobalVariableSummary.source_code"]], "type (blark.summary.globalvariablesummary attribute)": [[112, "blark.summary.GlobalVariableSummary.type"]], "interfacesummary (class in blark.summary)": [[113, "blark.summary.InterfaceSummary"]], "__init__() (blark.summary.interfacesummary method)": [[113, "blark.summary.InterfaceSummary.__init__"]], "declarations (blark.summary.interfacesummary attribute)": [[113, "blark.summary.InterfaceSummary.declarations"]], "declarations_by_block (blark.summary.interfacesummary property)": [[113, "blark.summary.InterfaceSummary.declarations_by_block"]], "extends (blark.summary.interfacesummary attribute)": [[113, "blark.summary.InterfaceSummary.extends"]], "from_interface() (blark.summary.interfacesummary class method)": [[113, "blark.summary.InterfaceSummary.from_interface"]], "item (blark.summary.interfacesummary attribute)": [[113, "blark.summary.InterfaceSummary.item"]], "methods (blark.summary.interfacesummary attribute)": [[113, "blark.summary.InterfaceSummary.methods"]], "name (blark.summary.interfacesummary attribute)": [[113, "blark.summary.InterfaceSummary.name"]], "properties (blark.summary.interfacesummary attribute)": [[113, "blark.summary.InterfaceSummary.properties"]], "source_code (blark.summary.interfacesummary attribute)": [[113, "blark.summary.InterfaceSummary.source_code"]], "squash_base_extends() (blark.summary.interfacesummary method)": [[113, "blark.summary.InterfaceSummary.squash_base_extends"]], "squashed (blark.summary.interfacesummary attribute)": [[113, "blark.summary.InterfaceSummary.squashed"]], "linkableitems (class in blark.summary)": [[114, "blark.summary.LinkableItems"]], "__init__() (blark.summary.linkableitems method)": [[114, "blark.summary.LinkableItems.__init__"]], "input (blark.summary.linkableitems attribute)": [[114, "blark.summary.LinkableItems.input"]], "memory (blark.summary.linkableitems attribute)": [[114, "blark.summary.LinkableItems.memory"]], "output (blark.summary.linkableitems attribute)": [[114, "blark.summary.LinkableItems.output"]], "methodsummary (class in blark.summary)": [[115, "blark.summary.MethodSummary"]], "__init__() (blark.summary.methodsummary method)": [[115, "blark.summary.MethodSummary.__init__"]], "declarations (blark.summary.methodsummary attribute)": [[115, "blark.summary.MethodSummary.declarations"]], "declarations_by_block (blark.summary.methodsummary property)": [[115, "blark.summary.MethodSummary.declarations_by_block"]], "from_method() (blark.summary.methodsummary class method)": [[115, "blark.summary.MethodSummary.from_method"]], "implementation (blark.summary.methodsummary attribute)": [[115, "blark.summary.MethodSummary.implementation"]], "item (blark.summary.methodsummary attribute)": [[115, "blark.summary.MethodSummary.item"]], "name (blark.summary.methodsummary attribute)": [[115, "blark.summary.MethodSummary.name"]], "return_type (blark.summary.methodsummary attribute)": [[115, "blark.summary.MethodSummary.return_type"]], "source_code (blark.summary.methodsummary attribute)": [[115, "blark.summary.MethodSummary.source_code"]], "programsummary (class in blark.summary)": [[116, "blark.summary.ProgramSummary"]], "__init__() (blark.summary.programsummary method)": [[116, "blark.summary.ProgramSummary.__init__"]], "actions (blark.summary.programsummary attribute)": [[116, "blark.summary.ProgramSummary.actions"]], "declarations (blark.summary.programsummary attribute)": [[116, "blark.summary.ProgramSummary.declarations"]], "declarations_by_block (blark.summary.programsummary property)": [[116, "blark.summary.ProgramSummary.declarations_by_block"]], "from_program() (blark.summary.programsummary class method)": [[116, "blark.summary.ProgramSummary.from_program"]], "implementation (blark.summary.programsummary attribute)": [[116, "blark.summary.ProgramSummary.implementation"]], "item (blark.summary.programsummary attribute)": [[116, "blark.summary.ProgramSummary.item"]], "methods (blark.summary.programsummary attribute)": [[116, "blark.summary.ProgramSummary.methods"]], "name (blark.summary.programsummary attribute)": [[116, "blark.summary.ProgramSummary.name"]], "properties (blark.summary.programsummary attribute)": [[116, "blark.summary.ProgramSummary.properties"]], "source_code (blark.summary.programsummary attribute)": [[116, "blark.summary.ProgramSummary.source_code"]], "propertygetsetsummary (class in blark.summary)": [[117, "blark.summary.PropertyGetSetSummary"]], "__init__() (blark.summary.propertygetsetsummary method)": [[117, "blark.summary.PropertyGetSetSummary.__init__"]], "declarations (blark.summary.propertygetsetsummary attribute)": [[117, "blark.summary.PropertyGetSetSummary.declarations"]], "implementation (blark.summary.propertygetsetsummary attribute)": [[117, "blark.summary.PropertyGetSetSummary.implementation"]], "item (blark.summary.propertygetsetsummary attribute)": [[117, "blark.summary.PropertyGetSetSummary.item"]], "name (blark.summary.propertygetsetsummary attribute)": [[117, "blark.summary.PropertyGetSetSummary.name"]], "source_code (blark.summary.propertygetsetsummary attribute)": [[117, "blark.summary.PropertyGetSetSummary.source_code"]], "propertysummary (class in blark.summary)": [[118, "blark.summary.PropertySummary"]], "__init__() (blark.summary.propertysummary method)": [[118, "blark.summary.PropertySummary.__init__"]], "from_property() (blark.summary.propertysummary class method)": [[118, "blark.summary.PropertySummary.from_property"]], "getter (blark.summary.propertysummary attribute)": [[118, "blark.summary.PropertySummary.getter"]], "name (blark.summary.propertysummary attribute)": [[118, "blark.summary.PropertySummary.name"]], "setter (blark.summary.propertysummary attribute)": [[118, "blark.summary.PropertySummary.setter"]], "source_code (blark.summary.propertysummary attribute)": [[118, "blark.summary.PropertySummary.source_code"]], "summary (class in blark.summary)": [[119, "blark.summary.Summary"]], "__init__() (blark.summary.summary method)": [[119, "blark.summary.Summary.__init__"]], "comments (blark.summary.summary attribute)": [[119, "blark.summary.Summary.comments"]], "filename (blark.summary.summary attribute)": [[119, "blark.summary.Summary.filename"]], "get_meta_kwargs() (blark.summary.summary static method)": [[119, "blark.summary.Summary.get_meta_kwargs"]], "meta (blark.summary.summary attribute)": [[119, "blark.summary.Summary.meta"]], "pragmas (blark.summary.summary attribute)": [[119, "blark.summary.Summary.pragmas"]], "get_linkable_declarations() (in module blark.summary)": [[120, "blark.summary.get_linkable_declarations"]], "path_to_file_and_line() (in module blark.summary)": [[121, "blark.summary.path_to_file_and_line"]], "text_outline() (in module blark.summary)": [[122, "blark.summary.text_outline"]], "accessdeclaration (class in blark.transform)": [[123, "blark.transform.AccessDeclaration"]], "__init__() (blark.transform.accessdeclaration method)": [[123, "blark.transform.AccessDeclaration.__init__"]], "direction (blark.transform.accessdeclaration attribute)": [[123, "blark.transform.AccessDeclaration.direction"]], "from_lark() (blark.transform.accessdeclaration method)": [[123, "blark.transform.AccessDeclaration.from_lark"]], "meta (blark.transform.accessdeclaration attribute)": [[123, "blark.transform.AccessDeclaration.meta"]], "name (blark.transform.accessdeclaration attribute)": [[123, "blark.transform.AccessDeclaration.name"]], "type (blark.transform.accessdeclaration attribute)": [[123, "blark.transform.AccessDeclaration.type"]], "variable (blark.transform.accessdeclaration attribute)": [[123, "blark.transform.AccessDeclaration.variable"]], "accessdeclarations (class in blark.transform)": [[124, "blark.transform.AccessDeclarations"]], "__init__() (blark.transform.accessdeclarations method)": [[124, "blark.transform.AccessDeclarations.__init__"]], "block_header (blark.transform.accessdeclarations attribute)": [[124, "blark.transform.AccessDeclarations.block_header"]], "from_lark() (blark.transform.accessdeclarations static method)": [[124, "blark.transform.AccessDeclarations.from_lark"]], "items (blark.transform.accessdeclarations attribute)": [[124, "blark.transform.AccessDeclarations.items"]], "meta (blark.transform.accessdeclarations attribute)": [[124, "blark.transform.AccessDeclarations.meta"]], "accessspecifier (class in blark.transform)": [[125, "blark.transform.AccessSpecifier"]], "abstract (blark.transform.accessspecifier attribute)": [[125, "blark.transform.AccessSpecifier.abstract"]], "final (blark.transform.accessspecifier attribute)": [[125, "blark.transform.AccessSpecifier.final"]], "internal (blark.transform.accessspecifier attribute)": [[125, "blark.transform.AccessSpecifier.internal"]], "private (blark.transform.accessspecifier attribute)": [[125, "blark.transform.AccessSpecifier.private"]], "protected (blark.transform.accessspecifier attribute)": [[125, "blark.transform.AccessSpecifier.protected"]], "public (blark.transform.accessspecifier attribute)": [[125, "blark.transform.AccessSpecifier.public"]], "action (class in blark.transform)": [[126, "blark.transform.Action"]], "__init__() (blark.transform.action method)": [[126, "blark.transform.Action.__init__"]], "body (blark.transform.action attribute)": [[126, "blark.transform.Action.body"]], "from_lark() (blark.transform.action method)": [[126, "blark.transform.Action.from_lark"]], "meta (blark.transform.action attribute)": [[126, "blark.transform.Action.meta"]], "name (blark.transform.action attribute)": [[126, "blark.transform.Action.name"]], "arrayinitialelement (class in blark.transform)": [[127, "blark.transform.ArrayInitialElement"]], "__init__() (blark.transform.arrayinitialelement method)": [[127, "blark.transform.ArrayInitialElement.__init__"]], "count (blark.transform.arrayinitialelement attribute)": [[127, "blark.transform.ArrayInitialElement.count"]], "element (blark.transform.arrayinitialelement attribute)": [[127, "blark.transform.ArrayInitialElement.element"]], "from_lark() (blark.transform.arrayinitialelement method)": [[127, "blark.transform.ArrayInitialElement.from_lark"]], "meta (blark.transform.arrayinitialelement attribute)": [[127, "blark.transform.ArrayInitialElement.meta"]], "arrayinitialization (class in blark.transform)": [[128, "blark.transform.ArrayInitialization"]], "__init__() (blark.transform.arrayinitialization method)": [[128, "blark.transform.ArrayInitialization.__init__"]], "brackets (blark.transform.arrayinitialization attribute)": [[128, "blark.transform.ArrayInitialization.brackets"]], "elements (blark.transform.arrayinitialization attribute)": [[128, "blark.transform.ArrayInitialization.elements"]], "meta (blark.transform.arrayinitialization attribute)": [[128, "blark.transform.ArrayInitialization.meta"]], "arrayspecification (class in blark.transform)": [[129, "blark.transform.ArraySpecification"]], "__init__() (blark.transform.arrayspecification method)": [[129, "blark.transform.ArraySpecification.__init__"]], "base_type_name (blark.transform.arrayspecification property)": [[129, "blark.transform.ArraySpecification.base_type_name"]], "from_lark() (blark.transform.arrayspecification static method)": [[129, "blark.transform.ArraySpecification.from_lark"]], "full_type_name (blark.transform.arrayspecification property)": [[129, "blark.transform.ArraySpecification.full_type_name"]], "meta (blark.transform.arrayspecification attribute)": [[129, "blark.transform.ArraySpecification.meta"]], "subranges (blark.transform.arrayspecification attribute)": [[129, "blark.transform.ArraySpecification.subranges"]], "type (blark.transform.arrayspecification attribute)": [[129, "blark.transform.ArraySpecification.type"]], "arraytypedeclaration (class in blark.transform)": [[130, "blark.transform.ArrayTypeDeclaration"]], "__init__() (blark.transform.arraytypedeclaration method)": [[130, "blark.transform.ArrayTypeDeclaration.__init__"]], "from_lark() (blark.transform.arraytypedeclaration method)": [[130, "blark.transform.ArrayTypeDeclaration.from_lark"]], "init (blark.transform.arraytypedeclaration attribute)": [[130, "blark.transform.ArrayTypeDeclaration.init"]], "meta (blark.transform.arraytypedeclaration attribute)": [[130, "blark.transform.ArrayTypeDeclaration.meta"]], "name (blark.transform.arraytypedeclaration attribute)": [[130, "blark.transform.ArrayTypeDeclaration.name"]], "arraytypeinitialization (class in blark.transform)": [[131, "blark.transform.ArrayTypeInitialization"]], "__init__() (blark.transform.arraytypeinitialization method)": [[131, "blark.transform.ArrayTypeInitialization.__init__"]], "from_lark() (blark.transform.arraytypeinitialization method)": [[131, "blark.transform.ArrayTypeInitialization.from_lark"]], "indirection (blark.transform.arraytypeinitialization attribute)": [[131, "blark.transform.ArrayTypeInitialization.indirection"]], "meta (blark.transform.arraytypeinitialization attribute)": [[131, "blark.transform.ArrayTypeInitialization.meta"]], "spec (blark.transform.arraytypeinitialization attribute)": [[131, "blark.transform.ArrayTypeInitialization.spec"]], "value (blark.transform.arraytypeinitialization attribute)": [[131, "blark.transform.ArrayTypeInitialization.value"]], "arrayvariableinitdeclaration (class in blark.transform)": [[132, "blark.transform.ArrayVariableInitDeclaration"]], "__init__() (blark.transform.arrayvariableinitdeclaration method)": [[132, "blark.transform.ArrayVariableInitDeclaration.__init__"]], "from_lark() (blark.transform.arrayvariableinitdeclaration method)": [[132, "blark.transform.ArrayVariableInitDeclaration.from_lark"]], "init (blark.transform.arrayvariableinitdeclaration attribute)": [[132, "blark.transform.ArrayVariableInitDeclaration.init"]], "meta (blark.transform.arrayvariableinitdeclaration attribute)": [[132, "blark.transform.ArrayVariableInitDeclaration.meta"]], "variables (blark.transform.arrayvariableinitdeclaration attribute)": [[132, "blark.transform.ArrayVariableInitDeclaration.variables"]], "assignmentstatement (class in blark.transform)": [[133, "blark.transform.AssignmentStatement"]], "__init__() (blark.transform.assignmentstatement method)": [[133, "blark.transform.AssignmentStatement.__init__"]], "expression (blark.transform.assignmentstatement attribute)": [[133, "blark.transform.AssignmentStatement.expression"]], "from_lark() (blark.transform.assignmentstatement static method)": [[133, "blark.transform.AssignmentStatement.from_lark"]], "meta (blark.transform.assignmentstatement attribute)": [[133, "blark.transform.AssignmentStatement.meta"]], "variables (blark.transform.assignmentstatement attribute)": [[133, "blark.transform.AssignmentStatement.variables"]], "binarybitstring (class in blark.transform)": [[134, "blark.transform.BinaryBitString"]], "__init__() (blark.transform.binarybitstring method)": [[134, "blark.transform.BinaryBitString.__init__"]], "base (blark.transform.binarybitstring attribute)": [[134, "blark.transform.BinaryBitString.base"]], "meta (blark.transform.binarybitstring attribute)": [[134, "blark.transform.BinaryBitString.meta"]], "binaryinteger (class in blark.transform)": [[135, "blark.transform.BinaryInteger"]], "__init__() (blark.transform.binaryinteger method)": [[135, "blark.transform.BinaryInteger.__init__"]], "base (blark.transform.binaryinteger attribute)": [[135, "blark.transform.BinaryInteger.base"]], "binaryoperation (class in blark.transform)": [[136, "blark.transform.BinaryOperation"]], "__init__() (blark.transform.binaryoperation method)": [[136, "blark.transform.BinaryOperation.__init__"]], "from_lark() (blark.transform.binaryoperation static method)": [[136, "blark.transform.BinaryOperation.from_lark"]], "left (blark.transform.binaryoperation attribute)": [[136, "blark.transform.BinaryOperation.left"]], "meta (blark.transform.binaryoperation attribute)": [[136, "blark.transform.BinaryOperation.meta"]], "op (blark.transform.binaryoperation attribute)": [[136, "blark.transform.BinaryOperation.op"]], "right (blark.transform.binaryoperation attribute)": [[136, "blark.transform.BinaryOperation.right"]], "bitstring (class in blark.transform)": [[137, "blark.transform.BitString"]], "__init__() (blark.transform.bitstring method)": [[137, "blark.transform.BitString.__init__"]], "base (blark.transform.bitstring attribute)": [[137, "blark.transform.BitString.base"]], "from_lark() (blark.transform.bitstring class method)": [[137, "blark.transform.BitString.from_lark"]], "meta (blark.transform.bitstring attribute)": [[137, "blark.transform.BitString.meta"]], "type_name (blark.transform.bitstring attribute)": [[137, "blark.transform.BitString.type_name"]], "value (blark.transform.bitstring attribute)": [[137, "blark.transform.BitString.value"]], "boolean (class in blark.transform)": [[138, "blark.transform.Boolean"]], "__init__() (blark.transform.boolean method)": [[138, "blark.transform.Boolean.__init__"]], "meta (blark.transform.boolean attribute)": [[138, "blark.transform.Boolean.meta"]], "value (blark.transform.boolean attribute)": [[138, "blark.transform.Boolean.value"]], "bracketedexpression (class in blark.transform)": [[139, "blark.transform.BracketedExpression"]], "__init__() (blark.transform.bracketedexpression method)": [[139, "blark.transform.BracketedExpression.__init__"]], "expression (blark.transform.bracketedexpression attribute)": [[139, "blark.transform.BracketedExpression.expression"]], "from_lark() (blark.transform.bracketedexpression method)": [[139, "blark.transform.BracketedExpression.from_lark"]], "meta (blark.transform.bracketedexpression attribute)": [[139, "blark.transform.BracketedExpression.meta"]], "caseelement (class in blark.transform)": [[140, "blark.transform.CaseElement"]], "__init__() (blark.transform.caseelement method)": [[140, "blark.transform.CaseElement.__init__"]], "from_lark() (blark.transform.caseelement static method)": [[140, "blark.transform.CaseElement.from_lark"]], "matches (blark.transform.caseelement attribute)": [[140, "blark.transform.CaseElement.matches"]], "meta (blark.transform.caseelement attribute)": [[140, "blark.transform.CaseElement.meta"]], "statements (blark.transform.caseelement attribute)": [[140, "blark.transform.CaseElement.statements"]], "casestatement (class in blark.transform)": [[141, "blark.transform.CaseStatement"]], "__init__() (blark.transform.casestatement method)": [[141, "blark.transform.CaseStatement.__init__"]], "cases (blark.transform.casestatement attribute)": [[141, "blark.transform.CaseStatement.cases"]], "else_clause (blark.transform.casestatement attribute)": [[141, "blark.transform.CaseStatement.else_clause"]], "expression (blark.transform.casestatement attribute)": [[141, "blark.transform.CaseStatement.expression"]], "from_lark() (blark.transform.casestatement method)": [[141, "blark.transform.CaseStatement.from_lark"]], "meta (blark.transform.casestatement attribute)": [[141, "blark.transform.CaseStatement.meta"]], "chainedfunctioncall (class in blark.transform)": [[142, "blark.transform.ChainedFunctionCall"]], "__init__() (blark.transform.chainedfunctioncall method)": [[142, "blark.transform.ChainedFunctionCall.__init__"]], "from_lark() (blark.transform.chainedfunctioncall static method)": [[142, "blark.transform.ChainedFunctionCall.from_lark"]], "invocations (blark.transform.chainedfunctioncall attribute)": [[142, "blark.transform.ChainedFunctionCall.invocations"]], "meta (blark.transform.chainedfunctioncall attribute)": [[142, "blark.transform.ChainedFunctionCall.meta"]], "chainedfunctioncallstatement (class in blark.transform)": [[143, "blark.transform.ChainedFunctionCallStatement"]], "__init__() (blark.transform.chainedfunctioncallstatement method)": [[143, "blark.transform.ChainedFunctionCallStatement.__init__"]], "from_lark() (blark.transform.chainedfunctioncallstatement static method)": [[143, "blark.transform.ChainedFunctionCallStatement.from_lark"]], "invocations (blark.transform.chainedfunctioncallstatement attribute)": [[143, "blark.transform.ChainedFunctionCallStatement.invocations"]], "meta (blark.transform.chainedfunctioncallstatement attribute)": [[143, "blark.transform.ChainedFunctionCallStatement.meta"]], "continuestatement (class in blark.transform)": [[144, "blark.transform.ContinueStatement"]], "__init__() (blark.transform.continuestatement method)": [[144, "blark.transform.ContinueStatement.__init__"]], "from_lark() (blark.transform.continuestatement method)": [[144, "blark.transform.ContinueStatement.from_lark"]], "meta (blark.transform.continuestatement attribute)": [[144, "blark.transform.ContinueStatement.meta"]], "datatype (class in blark.transform)": [[145, "blark.transform.DataType"]], "__init__() (blark.transform.datatype method)": [[145, "blark.transform.DataType.__init__"]], "from_lark() (blark.transform.datatype method)": [[145, "blark.transform.DataType.from_lark"]], "indirection (blark.transform.datatype attribute)": [[145, "blark.transform.DataType.indirection"]], "meta (blark.transform.datatype attribute)": [[145, "blark.transform.DataType.meta"]], "type_name (blark.transform.datatype attribute)": [[145, "blark.transform.DataType.type_name"]], "datatypedeclaration (class in blark.transform)": [[146, "blark.transform.DataTypeDeclaration"]], "__init__() (blark.transform.datatypedeclaration method)": [[146, "blark.transform.DataTypeDeclaration.__init__"]], "access (blark.transform.datatypedeclaration attribute)": [[146, "blark.transform.DataTypeDeclaration.access"]], "declaration (blark.transform.datatypedeclaration attribute)": [[146, "blark.transform.DataTypeDeclaration.declaration"]], "from_lark() (blark.transform.datatypedeclaration static method)": [[146, "blark.transform.DataTypeDeclaration.from_lark"]], "meta (blark.transform.datatypedeclaration attribute)": [[146, "blark.transform.DataTypeDeclaration.meta"]], "date (class in blark.transform)": [[147, "blark.transform.Date"]], "__init__() (blark.transform.date method)": [[147, "blark.transform.Date.__init__"]], "day (blark.transform.date attribute)": [[147, "blark.transform.Date.day"]], "from_lark() (blark.transform.date method)": [[147, "blark.transform.Date.from_lark"]], "meta (blark.transform.date attribute)": [[147, "blark.transform.Date.meta"]], "month (blark.transform.date attribute)": [[147, "blark.transform.Date.month"]], "value (blark.transform.date property)": [[147, "blark.transform.Date.value"]], "year (blark.transform.date attribute)": [[147, "blark.transform.Date.year"]], "datetime (class in blark.transform)": [[148, "blark.transform.DateTime"]], "__init__() (blark.transform.datetime method)": [[148, "blark.transform.DateTime.__init__"]], "date (blark.transform.datetime attribute)": [[148, "blark.transform.DateTime.date"]], "from_lark() (blark.transform.datetime static method)": [[148, "blark.transform.DateTime.from_lark"]], "meta (blark.transform.datetime attribute)": [[148, "blark.transform.DateTime.meta"]], "time (blark.transform.datetime attribute)": [[148, "blark.transform.DateTime.time"]], "value (blark.transform.datetime property)": [[148, "blark.transform.DateTime.value"]], "declaredvariable (class in blark.transform)": [[149, "blark.transform.DeclaredVariable"]], "__init__() (blark.transform.declaredvariable method)": [[149, "blark.transform.DeclaredVariable.__init__"]], "dereferenced (blark.transform.declaredvariable property)": [[149, "blark.transform.DeclaredVariable.dereferenced"]], "from_lark() (blark.transform.declaredvariable method)": [[149, "blark.transform.DeclaredVariable.from_lark"]], "location (blark.transform.declaredvariable attribute)": [[149, "blark.transform.DeclaredVariable.location"]], "meta (blark.transform.declaredvariable attribute)": [[149, "blark.transform.DeclaredVariable.meta"]], "name (blark.transform.declaredvariable property)": [[149, "blark.transform.DeclaredVariable.name"]], "variable (blark.transform.declaredvariable attribute)": [[149, "blark.transform.DeclaredVariable.variable"]], "directvariable (class in blark.transform)": [[150, "blark.transform.DirectVariable"]], "__init__() (blark.transform.directvariable method)": [[150, "blark.transform.DirectVariable.__init__"]], "bits (blark.transform.directvariable attribute)": [[150, "blark.transform.DirectVariable.bits"]], "from_lark() (blark.transform.directvariable static method)": [[150, "blark.transform.DirectVariable.from_lark"]], "location (blark.transform.directvariable attribute)": [[150, "blark.transform.DirectVariable.location"]], "location_prefix (blark.transform.directvariable attribute)": [[150, "blark.transform.DirectVariable.location_prefix"]], "meta (blark.transform.directvariable attribute)": [[150, "blark.transform.DirectVariable.meta"]], "size_prefix (blark.transform.directvariable attribute)": [[150, "blark.transform.DirectVariable.size_prefix"]], "duration (class in blark.transform)": [[151, "blark.transform.Duration"]], "__init__() (blark.transform.duration method)": [[151, "blark.transform.Duration.__init__"]], "days (blark.transform.duration attribute)": [[151, "blark.transform.Duration.days"]], "from_lark() (blark.transform.duration static method)": [[151, "blark.transform.Duration.from_lark"]], "hours (blark.transform.duration attribute)": [[151, "blark.transform.Duration.hours"]], "meta (blark.transform.duration attribute)": [[151, "blark.transform.Duration.meta"]], "milliseconds (blark.transform.duration attribute)": [[151, "blark.transform.Duration.milliseconds"]], "minutes (blark.transform.duration attribute)": [[151, "blark.transform.Duration.minutes"]], "negative (blark.transform.duration attribute)": [[151, "blark.transform.Duration.negative"]], "seconds (blark.transform.duration attribute)": [[151, "blark.transform.Duration.seconds"]], "value (blark.transform.duration property)": [[151, "blark.transform.Duration.value"]], "edgedeclaration (class in blark.transform)": [[152, "blark.transform.EdgeDeclaration"]], "__init__() (blark.transform.edgedeclaration method)": [[152, "blark.transform.EdgeDeclaration.__init__"]], "edge (blark.transform.edgedeclaration attribute)": [[152, "blark.transform.EdgeDeclaration.edge"]], "from_lark() (blark.transform.edgedeclaration method)": [[152, "blark.transform.EdgeDeclaration.from_lark"]], "meta (blark.transform.edgedeclaration attribute)": [[152, "blark.transform.EdgeDeclaration.meta"]], "variables (blark.transform.edgedeclaration attribute)": [[152, "blark.transform.EdgeDeclaration.variables"]], "elseclause (class in blark.transform)": [[153, "blark.transform.ElseClause"]], "__init__() (blark.transform.elseclause method)": [[153, "blark.transform.ElseClause.__init__"]], "from_lark() (blark.transform.elseclause method)": [[153, "blark.transform.ElseClause.from_lark"]], "meta (blark.transform.elseclause attribute)": [[153, "blark.transform.ElseClause.meta"]], "statements (blark.transform.elseclause attribute)": [[153, "blark.transform.ElseClause.statements"]], "elseifclause (class in blark.transform)": [[154, "blark.transform.ElseIfClause"]], "__init__() (blark.transform.elseifclause method)": [[154, "blark.transform.ElseIfClause.__init__"]], "from_lark() (blark.transform.elseifclause method)": [[154, "blark.transform.ElseIfClause.from_lark"]], "if_expression (blark.transform.elseifclause attribute)": [[154, "blark.transform.ElseIfClause.if_expression"]], "meta (blark.transform.elseifclause attribute)": [[154, "blark.transform.ElseIfClause.meta"]], "statements (blark.transform.elseifclause attribute)": [[154, "blark.transform.ElseIfClause.statements"]], "enumeratedspecification (class in blark.transform)": [[155, "blark.transform.EnumeratedSpecification"]], "__init__() (blark.transform.enumeratedspecification method)": [[155, "blark.transform.EnumeratedSpecification.__init__"]], "from_lark() (blark.transform.enumeratedspecification static method)": [[155, "blark.transform.EnumeratedSpecification.from_lark"]], "meta (blark.transform.enumeratedspecification attribute)": [[155, "blark.transform.EnumeratedSpecification.meta"]], "type_name (blark.transform.enumeratedspecification attribute)": [[155, "blark.transform.EnumeratedSpecification.type_name"]], "values (blark.transform.enumeratedspecification attribute)": [[155, "blark.transform.EnumeratedSpecification.values"]], "enumeratedtypedeclaration (class in blark.transform)": [[156, "blark.transform.EnumeratedTypeDeclaration"]], "__init__() (blark.transform.enumeratedtypedeclaration method)": [[156, "blark.transform.EnumeratedTypeDeclaration.__init__"]], "from_lark() (blark.transform.enumeratedtypedeclaration method)": [[156, "blark.transform.EnumeratedTypeDeclaration.from_lark"]], "init (blark.transform.enumeratedtypedeclaration attribute)": [[156, "blark.transform.EnumeratedTypeDeclaration.init"]], "meta (blark.transform.enumeratedtypedeclaration attribute)": [[156, "blark.transform.EnumeratedTypeDeclaration.meta"]], "name (blark.transform.enumeratedtypedeclaration attribute)": [[156, "blark.transform.EnumeratedTypeDeclaration.name"]], "enumeratedtypeinitialization (class in blark.transform)": [[157, "blark.transform.EnumeratedTypeInitialization"]], "__init__() (blark.transform.enumeratedtypeinitialization method)": [[157, "blark.transform.EnumeratedTypeInitialization.__init__"]], "from_lark() (blark.transform.enumeratedtypeinitialization method)": [[157, "blark.transform.EnumeratedTypeInitialization.from_lark"]], "indirection (blark.transform.enumeratedtypeinitialization attribute)": [[157, "blark.transform.EnumeratedTypeInitialization.indirection"]], "meta (blark.transform.enumeratedtypeinitialization attribute)": [[157, "blark.transform.EnumeratedTypeInitialization.meta"]], "spec (blark.transform.enumeratedtypeinitialization attribute)": [[157, "blark.transform.EnumeratedTypeInitialization.spec"]], "value (blark.transform.enumeratedtypeinitialization attribute)": [[157, "blark.transform.EnumeratedTypeInitialization.value"]], "enumeratedvalue (class in blark.transform)": [[158, "blark.transform.EnumeratedValue"]], "__init__() (blark.transform.enumeratedvalue method)": [[158, "blark.transform.EnumeratedValue.__init__"]], "from_lark() (blark.transform.enumeratedvalue method)": [[158, "blark.transform.EnumeratedValue.from_lark"]], "meta (blark.transform.enumeratedvalue attribute)": [[158, "blark.transform.EnumeratedValue.meta"]], "name (blark.transform.enumeratedvalue attribute)": [[158, "blark.transform.EnumeratedValue.name"]], "type_name (blark.transform.enumeratedvalue attribute)": [[158, "blark.transform.EnumeratedValue.type_name"]], "value (blark.transform.enumeratedvalue attribute)": [[158, "blark.transform.EnumeratedValue.value"]], "exitstatement (class in blark.transform)": [[159, "blark.transform.ExitStatement"]], "__init__() (blark.transform.exitstatement method)": [[159, "blark.transform.ExitStatement.__init__"]], "from_lark() (blark.transform.exitstatement method)": [[159, "blark.transform.ExitStatement.from_lark"]], "meta (blark.transform.exitstatement attribute)": [[159, "blark.transform.ExitStatement.meta"]], "expression (class in blark.transform)": [[160, "blark.transform.Expression"]], "__init__() (blark.transform.expression method)": [[160, "blark.transform.Expression.__init__"]], "extendedsourcecode (class in blark.transform)": [[161, "blark.transform.ExtendedSourceCode"]], "__init__() (blark.transform.extendedsourcecode method)": [[161, "blark.transform.ExtendedSourceCode.__init__"]], "items (blark.transform.extendedsourcecode attribute)": [[161, "blark.transform.ExtendedSourceCode.items"]], "extends (class in blark.transform)": [[162, "blark.transform.Extends"]], "__init__() (blark.transform.extends method)": [[162, "blark.transform.Extends.__init__"]], "from_lark() (blark.transform.extends method)": [[162, "blark.transform.Extends.from_lark"]], "meta (blark.transform.extends attribute)": [[162, "blark.transform.Extends.meta"]], "name (blark.transform.extends attribute)": [[162, "blark.transform.Extends.name"]], "externalvariabledeclaration (class in blark.transform)": [[163, "blark.transform.ExternalVariableDeclaration"]], "__init__() (blark.transform.externalvariabledeclaration method)": [[163, "blark.transform.ExternalVariableDeclaration.__init__"]], "from_lark() (blark.transform.externalvariabledeclaration method)": [[163, "blark.transform.ExternalVariableDeclaration.from_lark"]], "meta (blark.transform.externalvariabledeclaration attribute)": [[163, "blark.transform.ExternalVariableDeclaration.meta"]], "name (blark.transform.externalvariabledeclaration attribute)": [[163, "blark.transform.ExternalVariableDeclaration.name"]], "spec (blark.transform.externalvariabledeclaration attribute)": [[163, "blark.transform.ExternalVariableDeclaration.spec"]], "externalvariabledeclarations (class in blark.transform)": [[164, "blark.transform.ExternalVariableDeclarations"]], "__init__() (blark.transform.externalvariabledeclarations method)": [[164, "blark.transform.ExternalVariableDeclarations.__init__"]], "attrs (blark.transform.externalvariabledeclarations attribute)": [[164, "blark.transform.ExternalVariableDeclarations.attrs"]], "block_header (blark.transform.externalvariabledeclarations attribute)": [[164, "blark.transform.ExternalVariableDeclarations.block_header"]], "from_lark() (blark.transform.externalvariabledeclarations static method)": [[164, "blark.transform.ExternalVariableDeclarations.from_lark"]], "items (blark.transform.externalvariabledeclarations attribute)": [[164, "blark.transform.ExternalVariableDeclarations.items"]], "meta (blark.transform.externalvariabledeclarations attribute)": [[164, "blark.transform.ExternalVariableDeclarations.meta"]], "fieldselector (class in blark.transform)": [[165, "blark.transform.FieldSelector"]], "__init__() (blark.transform.fieldselector method)": [[165, "blark.transform.FieldSelector.__init__"]], "dereferenced (blark.transform.fieldselector attribute)": [[165, "blark.transform.FieldSelector.dereferenced"]], "field (blark.transform.fieldselector attribute)": [[165, "blark.transform.FieldSelector.field"]], "from_lark() (blark.transform.fieldselector static method)": [[165, "blark.transform.FieldSelector.from_lark"]], "meta (blark.transform.fieldselector attribute)": [[165, "blark.transform.FieldSelector.meta"]], "forstatement (class in blark.transform)": [[166, "blark.transform.ForStatement"]], "__init__() (blark.transform.forstatement method)": [[166, "blark.transform.ForStatement.__init__"]], "control (blark.transform.forstatement attribute)": [[166, "blark.transform.ForStatement.control"]], "from_ (blark.transform.forstatement attribute)": [[166, "blark.transform.ForStatement.from_"]], "from_lark() (blark.transform.forstatement method)": [[166, "blark.transform.ForStatement.from_lark"]], "meta (blark.transform.forstatement attribute)": [[166, "blark.transform.ForStatement.meta"]], "statements (blark.transform.forstatement attribute)": [[166, "blark.transform.ForStatement.statements"]], "step (blark.transform.forstatement attribute)": [[166, "blark.transform.ForStatement.step"]], "to (blark.transform.forstatement attribute)": [[166, "blark.transform.ForStatement.to"]], "formatsettings (class in blark.transform)": [[167, "blark.transform.FormatSettings"]], "__init__() (blark.transform.formatsettings method)": [[167, "blark.transform.FormatSettings.__init__"]], "indent (blark.transform.formatsettings attribute)": [[167, "blark.transform.FormatSettings.indent"]], "fullsubrange (class in blark.transform)": [[168, "blark.transform.FullSubrange"]], "__init__() (blark.transform.fullsubrange method)": [[168, "blark.transform.FullSubrange.__init__"]], "meta (blark.transform.fullsubrange attribute)": [[168, "blark.transform.FullSubrange.meta"]], "function (class in blark.transform)": [[169, "blark.transform.Function"]], "__init__() (blark.transform.function method)": [[169, "blark.transform.Function.__init__"]], "access (blark.transform.function attribute)": [[169, "blark.transform.Function.access"]], "body (blark.transform.function attribute)": [[169, "blark.transform.Function.body"]], "declarations (blark.transform.function attribute)": [[169, "blark.transform.Function.declarations"]], "from_lark() (blark.transform.function static method)": [[169, "blark.transform.Function.from_lark"]], "meta (blark.transform.function attribute)": [[169, "blark.transform.Function.meta"]], "name (blark.transform.function attribute)": [[169, "blark.transform.Function.name"]], "return_type (blark.transform.function attribute)": [[169, "blark.transform.Function.return_type"]], "functionblock (class in blark.transform)": [[170, "blark.transform.FunctionBlock"]], "__init__() (blark.transform.functionblock method)": [[170, "blark.transform.FunctionBlock.__init__"]], "access (blark.transform.functionblock attribute)": [[170, "blark.transform.FunctionBlock.access"]], "body (blark.transform.functionblock attribute)": [[170, "blark.transform.FunctionBlock.body"]], "declarations (blark.transform.functionblock attribute)": [[170, "blark.transform.FunctionBlock.declarations"]], "extends (blark.transform.functionblock attribute)": [[170, "blark.transform.FunctionBlock.extends"]], "from_lark() (blark.transform.functionblock static method)": [[170, "blark.transform.FunctionBlock.from_lark"]], "implements (blark.transform.functionblock attribute)": [[170, "blark.transform.FunctionBlock.implements"]], "meta (blark.transform.functionblock attribute)": [[170, "blark.transform.FunctionBlock.meta"]], "name (blark.transform.functionblock attribute)": [[170, "blark.transform.FunctionBlock.name"]], "functionblockdeclaration (class in blark.transform)": [[171, "blark.transform.FunctionBlockDeclaration"]], "functionblockinvocationdeclaration (class in blark.transform)": [[172, "blark.transform.FunctionBlockInvocationDeclaration"]], "__init__() (blark.transform.functionblockinvocationdeclaration method)": [[172, "blark.transform.FunctionBlockInvocationDeclaration.__init__"]], "defaults (blark.transform.functionblockinvocationdeclaration attribute)": [[172, "blark.transform.FunctionBlockInvocationDeclaration.defaults"]], "from_lark() (blark.transform.functionblockinvocationdeclaration method)": [[172, "blark.transform.FunctionBlockInvocationDeclaration.from_lark"]], "init (blark.transform.functionblockinvocationdeclaration attribute)": [[172, "blark.transform.FunctionBlockInvocationDeclaration.init"]], "meta (blark.transform.functionblockinvocationdeclaration attribute)": [[172, "blark.transform.FunctionBlockInvocationDeclaration.meta"]], "variables (blark.transform.functionblockinvocationdeclaration attribute)": [[172, "blark.transform.FunctionBlockInvocationDeclaration.variables"]], "functionblocknamedeclaration (class in blark.transform)": [[173, "blark.transform.FunctionBlockNameDeclaration"]], "__init__() (blark.transform.functionblocknamedeclaration method)": [[173, "blark.transform.FunctionBlockNameDeclaration.__init__"]], "from_lark() (blark.transform.functionblocknamedeclaration method)": [[173, "blark.transform.FunctionBlockNameDeclaration.from_lark"]], "init (blark.transform.functionblocknamedeclaration attribute)": [[173, "blark.transform.FunctionBlockNameDeclaration.init"]], "meta (blark.transform.functionblocknamedeclaration attribute)": [[173, "blark.transform.FunctionBlockNameDeclaration.meta"]], "spec (blark.transform.functionblocknamedeclaration attribute)": [[173, "blark.transform.FunctionBlockNameDeclaration.spec"]], "variables (blark.transform.functionblocknamedeclaration attribute)": [[173, "blark.transform.FunctionBlockNameDeclaration.variables"]], "functioncall (class in blark.transform)": [[174, "blark.transform.FunctionCall"]], "__init__() (blark.transform.functioncall method)": [[174, "blark.transform.FunctionCall.__init__"]], "base_type_name (blark.transform.functioncall property)": [[174, "blark.transform.FunctionCall.base_type_name"]], "dereferenced (blark.transform.functioncall attribute)": [[174, "blark.transform.FunctionCall.dereferenced"]], "from_lark() (blark.transform.functioncall static method)": [[174, "blark.transform.FunctionCall.from_lark"]], "full_type_name (blark.transform.functioncall property)": [[174, "blark.transform.FunctionCall.full_type_name"]], "meta (blark.transform.functioncall attribute)": [[174, "blark.transform.FunctionCall.meta"]], "name (blark.transform.functioncall attribute)": [[174, "blark.transform.FunctionCall.name"]], "parameters (blark.transform.functioncall attribute)": [[174, "blark.transform.FunctionCall.parameters"]], "value (blark.transform.functioncall property)": [[174, "blark.transform.FunctionCall.value"]], "functioncallstatement (class in blark.transform)": [[175, "blark.transform.FunctionCallStatement"]], "from_lark() (blark.transform.functioncallstatement static method)": [[175, "blark.transform.FunctionCallStatement.from_lark"]], "functionvariabledeclarations (class in blark.transform)": [[176, "blark.transform.FunctionVariableDeclarations"]], "__init__() (blark.transform.functionvariabledeclarations method)": [[176, "blark.transform.FunctionVariableDeclarations.__init__"]], "attrs (blark.transform.functionvariabledeclarations attribute)": [[176, "blark.transform.FunctionVariableDeclarations.attrs"]], "block_header (blark.transform.functionvariabledeclarations attribute)": [[176, "blark.transform.FunctionVariableDeclarations.block_header"]], "from_lark() (blark.transform.functionvariabledeclarations static method)": [[176, "blark.transform.FunctionVariableDeclarations.from_lark"]], "items (blark.transform.functionvariabledeclarations attribute)": [[176, "blark.transform.FunctionVariableDeclarations.items"]], "meta (blark.transform.functionvariabledeclarations attribute)": [[176, "blark.transform.FunctionVariableDeclarations.meta"]], "globalvariableattributes (class in blark.transform)": [[177, "blark.transform.GlobalVariableAttributes"]], "constant (blark.transform.globalvariableattributes attribute)": [[177, "blark.transform.GlobalVariableAttributes.constant"]], "internal (blark.transform.globalvariableattributes attribute)": [[177, "blark.transform.GlobalVariableAttributes.internal"]], "non_retain (blark.transform.globalvariableattributes attribute)": [[177, "blark.transform.GlobalVariableAttributes.non_retain"]], "persistent (blark.transform.globalvariableattributes attribute)": [[177, "blark.transform.GlobalVariableAttributes.persistent"]], "retain (blark.transform.globalvariableattributes attribute)": [[177, "blark.transform.GlobalVariableAttributes.retain"]], "globalvariabledeclaration (class in blark.transform)": [[178, "blark.transform.GlobalVariableDeclaration"]], "__init__() (blark.transform.globalvariabledeclaration method)": [[178, "blark.transform.GlobalVariableDeclaration.__init__"]], "base_type_name (blark.transform.globalvariabledeclaration property)": [[178, "blark.transform.GlobalVariableDeclaration.base_type_name"]], "from_lark() (blark.transform.globalvariabledeclaration method)": [[178, "blark.transform.GlobalVariableDeclaration.from_lark"]], "full_type_name (blark.transform.globalvariabledeclaration property)": [[178, "blark.transform.GlobalVariableDeclaration.full_type_name"]], "init (blark.transform.globalvariabledeclaration attribute)": [[178, "blark.transform.GlobalVariableDeclaration.init"]], "location (blark.transform.globalvariabledeclaration property)": [[178, "blark.transform.GlobalVariableDeclaration.location"]], "meta (blark.transform.globalvariabledeclaration attribute)": [[178, "blark.transform.GlobalVariableDeclaration.meta"]], "spec (blark.transform.globalvariabledeclaration attribute)": [[178, "blark.transform.GlobalVariableDeclaration.spec"]], "variables (blark.transform.globalvariabledeclaration property)": [[178, "blark.transform.GlobalVariableDeclaration.variables"]], "globalvariabledeclarations (class in blark.transform)": [[179, "blark.transform.GlobalVariableDeclarations"]], "__init__() (blark.transform.globalvariabledeclarations method)": [[179, "blark.transform.GlobalVariableDeclarations.__init__"]], "attrs (blark.transform.globalvariabledeclarations attribute)": [[179, "blark.transform.GlobalVariableDeclarations.attrs"]], "block_header (blark.transform.globalvariabledeclarations attribute)": [[179, "blark.transform.GlobalVariableDeclarations.block_header"]], "from_lark() (blark.transform.globalvariabledeclarations static method)": [[179, "blark.transform.GlobalVariableDeclarations.from_lark"]], "items (blark.transform.globalvariabledeclarations attribute)": [[179, "blark.transform.GlobalVariableDeclarations.items"]], "meta (blark.transform.globalvariabledeclarations attribute)": [[179, "blark.transform.GlobalVariableDeclarations.meta"]], "name (blark.transform.globalvariabledeclarations attribute)": [[179, "blark.transform.GlobalVariableDeclarations.name"]], "globalvariablespec (class in blark.transform)": [[180, "blark.transform.GlobalVariableSpec"]], "__init__() (blark.transform.globalvariablespec method)": [[180, "blark.transform.GlobalVariableSpec.__init__"]], "from_lark() (blark.transform.globalvariablespec static method)": [[180, "blark.transform.GlobalVariableSpec.from_lark"]], "location (blark.transform.globalvariablespec attribute)": [[180, "blark.transform.GlobalVariableSpec.location"]], "meta (blark.transform.globalvariablespec attribute)": [[180, "blark.transform.GlobalVariableSpec.meta"]], "variables (blark.transform.globalvariablespec attribute)": [[180, "blark.transform.GlobalVariableSpec.variables"]], "grammartransformer (class in blark.transform)": [[181, "blark.transform.GrammarTransformer"]], "__init__() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.__init__"]], "access_specifier() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.access_specifier"]], "action() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.action"]], "add_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.add_expression"]], "and_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.and_expression"]], "and_then_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.and_then_expression"]], "array_initial_element() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.array_initial_element"]], "array_initial_element_count() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.array_initial_element_count"]], "array_spec_init() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.array_spec_init"]], "array_specification() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.array_specification"]], "array_type_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.array_type_declaration"]], "array_var_init_decl() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.array_var_init_decl"]], "assignment_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.assignment_expression"]], "assignment_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.assignment_statement"]], "bare_array_initialization() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.bare_array_initialization"]], "binary_bit_string_literal() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.binary_bit_string_literal"]], "binary_integer() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.binary_integer"]], "bit_string_literal() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.bit_string_literal"]], "bracketed_array_initialization() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.bracketed_array_initialization"]], "bracketed_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.bracketed_expression"]], "case_element() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.case_element"]], "case_element_statement_list() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.case_element_statement_list"]], "case_elements() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.case_elements"]], "case_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.case_statement"]], "chained_function_call() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.chained_function_call"]], "chained_function_call_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.chained_function_call_statement"]], "comments (blark.transform.grammartransformer attribute)": [[181, "blark.transform.GrammarTransformer.comments"]], "comparison_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.comparison_expression"]], "constant() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.constant"]], "continue_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.continue_statement"]], "data_type_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.data_type_declaration"]], "date() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.date"]], "date_and_time() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.date_and_time"]], "direct_variable() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.direct_variable"]], "double_byte_string_spec() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.double_byte_string_spec"]], "double_byte_string_var_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.double_byte_string_var_declaration"]], "duration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.duration"]], "edge_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.edge_declaration"]], "else_clause() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.else_clause"]], "else_if_clause() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.else_if_clause"]], "end_of_statement_list_label() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.end_of_statement_list_label"]], "enumerated_spec_init() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.enumerated_spec_init"]], "enumerated_specification() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.enumerated_specification"]], "enumerated_type_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.enumerated_type_declaration"]], "enumerated_value() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.enumerated_value"]], "equality_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.equality_expression"]], "exit_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.exit_statement"]], "expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.expression"]], "expression_term() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.expression_term"]], "extends() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.extends"]], "external_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.external_declaration"]], "external_var_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.external_var_declarations"]], "false() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.false"]], "fb_decl_name_list() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.fb_decl_name_list"]], "fb_invocation_decl() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.fb_invocation_decl"]], "fb_name_decl() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.fb_name_decl"]], "field_selector() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.field_selector"]], "for_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.for_statement"]], "full_subrange() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.full_subrange"]], "function_block_method_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.function_block_method_declaration"]], "function_block_property_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.function_block_property_declaration"]], "function_block_type_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.function_block_type_declaration"]], "function_call() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.function_call"]], "function_call_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.function_call_statement"]], "function_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.function_declaration"]], "function_var_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.function_var_declarations"]], "global_var_decl() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.global_var_decl"]], "global_var_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.global_var_declarations"]], "global_var_spec() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.global_var_spec"]], "global_variable_attributes() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.global_variable_attributes"]], "hex_bit_string_literal() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.hex_bit_string_literal"]], "hex_integer() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.hex_integer"]], "iec_source() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.iec_source"]], "if_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.if_statement"]], "implements() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.implements"]], "incomplete_located_var_decl() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.incomplete_located_var_decl"]], "incomplete_located_var_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.incomplete_located_var_declarations"]], "incomplete_location() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.incomplete_location"]], "indirect_simple_specification() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.indirect_simple_specification"]], "indirection_type() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.indirection_type"]], "initialized_structure() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.initialized_structure"]], "input_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.input_declarations"]], "input_output_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.input_output_declarations"]], "input_param_assignment() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.input_param_assignment"]], "integer() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.integer"]], "integer_literal() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.integer_literal"]], "interface_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.interface_declaration"]], "jmp_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.jmp_statement"]], "labeled_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.labeled_statement"]], "ldate() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.ldate"]], "ldate_and_time() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.ldate_and_time"]], "lduration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.lduration"]], "located_var_decl() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.located_var_decl"]], "located_var_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.located_var_declarations"]], "location() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.location"]], "ltime_of_day() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.ltime_of_day"]], "multi_element_variable() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.multi_element_variable"]], "no_op_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.no_op_statement"]], "non_generic_type_name() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.non_generic_type_name"]], "object_initializer_array() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.object_initializer_array"]], "octal_bit_string_literal() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.octal_bit_string_literal"]], "octal_integer() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.octal_integer"]], "or_else_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.or_else_expression"]], "output_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.output_declarations"]], "output_parameter_assignment() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.output_parameter_assignment"]], "param_assignment() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.param_assignment"]], "parenthesized_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.parenthesized_expression"]], "pointer_type() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.pointer_type"]], "program_access_decl() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.program_access_decl"]], "program_access_decls() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.program_access_decls"]], "program_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.program_declaration"]], "program_var_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.program_var_declarations"]], "real_literal() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.real_literal"]], "reference_assignment_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.reference_assignment_statement"]], "repeat_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.repeat_statement"]], "reset_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.reset_statement"]], "return_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.return_statement"]], "set_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.set_statement"]], "signed_integer() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.signed_integer"]], "simple_spec_init() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.simple_spec_init"]], "simple_specification() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.simple_specification"]], "simple_type_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.simple_type_declaration"]], "single_byte_string_spec() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.single_byte_string_spec"]], "single_byte_string_var_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.single_byte_string_var_declaration"]], "statement_list() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.statement_list"]], "static_var_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.static_var_declarations"]], "string_literal() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.string_literal"]], "string_spec_length() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.string_spec_length"]], "string_type_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.string_type_declaration"]], "string_type_specification() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.string_type_specification"]], "structure_element_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.structure_element_declaration"]], "structure_element_initialization() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.structure_element_initialization"]], "structure_initialization() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.structure_initialization"]], "structure_type_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.structure_type_declaration"]], "structured_var_init_decl() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.structured_var_init_decl"]], "subrange() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.subrange"]], "subrange_spec_init() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.subrange_spec_init"]], "subrange_specification() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.subrange_specification"]], "subrange_type_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.subrange_type_declaration"]], "subscript_list() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.subscript_list"]], "temp_var_decls() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.temp_var_decls"]], "time_of_day() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.time_of_day"]], "transform() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.transform"]], "true() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.true"]], "unary_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.unary_expression"]], "union_element_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.union_element_declaration"]], "union_type_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.union_type_declaration"]], "var1() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.var1"]], "var1_init_decl() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.var1_init_decl"]], "var1_list() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.var1_list"]], "var_declarations() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.var_declarations"]], "var_inst_declaration() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.var_inst_declaration"]], "variable_attributes() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.variable_attributes"]], "variable_name() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.variable_name"]], "while_statement() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.while_statement"]], "xor_expression() (blark.transform.grammartransformer method)": [[181, "blark.transform.GrammarTransformer.xor_expression"]], "hexbitstring (class in blark.transform)": [[182, "blark.transform.HexBitString"]], "__init__() (blark.transform.hexbitstring method)": [[182, "blark.transform.HexBitString.__init__"]], "base (blark.transform.hexbitstring attribute)": [[182, "blark.transform.HexBitString.base"]], "meta (blark.transform.hexbitstring attribute)": [[182, "blark.transform.HexBitString.meta"]], "hexinteger (class in blark.transform)": [[183, "blark.transform.HexInteger"]], "__init__() (blark.transform.hexinteger method)": [[183, "blark.transform.HexInteger.__init__"]], "base (blark.transform.hexinteger attribute)": [[183, "blark.transform.HexInteger.base"]], "ifstatement (class in blark.transform)": [[184, "blark.transform.IfStatement"]], "__init__() (blark.transform.ifstatement method)": [[184, "blark.transform.IfStatement.__init__"]], "else_clause (blark.transform.ifstatement attribute)": [[184, "blark.transform.IfStatement.else_clause"]], "else_ifs (blark.transform.ifstatement attribute)": [[184, "blark.transform.IfStatement.else_ifs"]], "from_lark() (blark.transform.ifstatement static method)": [[184, "blark.transform.IfStatement.from_lark"]], "if_expression (blark.transform.ifstatement attribute)": [[184, "blark.transform.IfStatement.if_expression"]], "meta (blark.transform.ifstatement attribute)": [[184, "blark.transform.IfStatement.meta"]], "statements (blark.transform.ifstatement attribute)": [[184, "blark.transform.IfStatement.statements"]], "implements (class in blark.transform)": [[185, "blark.transform.Implements"]], "__init__() (blark.transform.implements method)": [[185, "blark.transform.Implements.__init__"]], "from_lark() (blark.transform.implements static method)": [[185, "blark.transform.Implements.from_lark"]], "interfaces (blark.transform.implements attribute)": [[185, "blark.transform.Implements.interfaces"]], "meta (blark.transform.implements attribute)": [[185, "blark.transform.Implements.meta"]], "incompletelocatedvariabledeclaration (class in blark.transform)": [[186, "blark.transform.IncompleteLocatedVariableDeclaration"]], "__init__() (blark.transform.incompletelocatedvariabledeclaration method)": [[186, "blark.transform.IncompleteLocatedVariableDeclaration.__init__"]], "from_lark() (blark.transform.incompletelocatedvariabledeclaration method)": [[186, "blark.transform.IncompleteLocatedVariableDeclaration.from_lark"]], "init (blark.transform.incompletelocatedvariabledeclaration attribute)": [[186, "blark.transform.IncompleteLocatedVariableDeclaration.init"]], "location (blark.transform.incompletelocatedvariabledeclaration attribute)": [[186, "blark.transform.IncompleteLocatedVariableDeclaration.location"]], "meta (blark.transform.incompletelocatedvariabledeclaration attribute)": [[186, "blark.transform.IncompleteLocatedVariableDeclaration.meta"]], "name (blark.transform.incompletelocatedvariabledeclaration attribute)": [[186, "blark.transform.IncompleteLocatedVariableDeclaration.name"]], "incompletelocatedvariabledeclarations (class in blark.transform)": [[187, "blark.transform.IncompleteLocatedVariableDeclarations"]], "__init__() (blark.transform.incompletelocatedvariabledeclarations method)": [[187, "blark.transform.IncompleteLocatedVariableDeclarations.__init__"]], "attrs (blark.transform.incompletelocatedvariabledeclarations attribute)": [[187, "blark.transform.IncompleteLocatedVariableDeclarations.attrs"]], "block_header (blark.transform.incompletelocatedvariabledeclarations attribute)": [[187, "blark.transform.IncompleteLocatedVariableDeclarations.block_header"]], "from_lark() (blark.transform.incompletelocatedvariabledeclarations static method)": [[187, "blark.transform.IncompleteLocatedVariableDeclarations.from_lark"]], "items (blark.transform.incompletelocatedvariabledeclarations attribute)": [[187, "blark.transform.IncompleteLocatedVariableDeclarations.items"]], "meta (blark.transform.incompletelocatedvariabledeclarations attribute)": [[187, "blark.transform.IncompleteLocatedVariableDeclarations.meta"]], "incompletelocation (class in blark.transform)": [[188, "blark.transform.IncompleteLocation"]], "from_lark() (blark.transform.incompletelocation static method)": [[188, "blark.transform.IncompleteLocation.from_lark"]], "input (blark.transform.incompletelocation attribute)": [[188, "blark.transform.IncompleteLocation.input"]], "memory (blark.transform.incompletelocation attribute)": [[188, "blark.transform.IncompleteLocation.memory"]], "none (blark.transform.incompletelocation attribute)": [[188, "blark.transform.IncompleteLocation.none"]], "output (blark.transform.incompletelocation attribute)": [[188, "blark.transform.IncompleteLocation.output"]], "indirectsimplespecification (class in blark.transform)": [[189, "blark.transform.IndirectSimpleSpecification"]], "__init__() (blark.transform.indirectsimplespecification method)": [[189, "blark.transform.IndirectSimpleSpecification.__init__"]], "from_lark() (blark.transform.indirectsimplespecification static method)": [[189, "blark.transform.IndirectSimpleSpecification.from_lark"]], "indirection (blark.transform.indirectsimplespecification attribute)": [[189, "blark.transform.IndirectSimpleSpecification.indirection"]], "init_parameters (blark.transform.indirectsimplespecification attribute)": [[189, "blark.transform.IndirectSimpleSpecification.init_parameters"]], "meta (blark.transform.indirectsimplespecification attribute)": [[189, "blark.transform.IndirectSimpleSpecification.meta"]], "type (blark.transform.indirectsimplespecification attribute)": [[189, "blark.transform.IndirectSimpleSpecification.type"]], "indirectiontype (class in blark.transform)": [[190, "blark.transform.IndirectionType"]], "__init__() (blark.transform.indirectiontype method)": [[190, "blark.transform.IndirectionType.__init__"]], "from_lark() (blark.transform.indirectiontype static method)": [[190, "blark.transform.IndirectionType.from_lark"]], "is_indirect (blark.transform.indirectiontype property)": [[190, "blark.transform.IndirectionType.is_indirect"]], "meta (blark.transform.indirectiontype attribute)": [[190, "blark.transform.IndirectionType.meta"]], "pointer_depth (blark.transform.indirectiontype attribute)": [[190, "blark.transform.IndirectionType.pointer_depth"]], "reference (blark.transform.indirectiontype attribute)": [[190, "blark.transform.IndirectionType.reference"]], "value (blark.transform.indirectiontype property)": [[190, "blark.transform.IndirectionType.value"]], "initdeclaration (class in blark.transform)": [[191, "blark.transform.InitDeclaration"]], "init (blark.transform.initdeclaration attribute)": [[191, "blark.transform.InitDeclaration.init"]], "meta (blark.transform.initdeclaration attribute)": [[191, "blark.transform.InitDeclaration.meta"]], "variables (blark.transform.initdeclaration attribute)": [[191, "blark.transform.InitDeclaration.variables"]], "initializedstructure (class in blark.transform)": [[192, "blark.transform.InitializedStructure"]], "__init__() (blark.transform.initializedstructure method)": [[192, "blark.transform.InitializedStructure.__init__"]], "from_lark() (blark.transform.initializedstructure method)": [[192, "blark.transform.InitializedStructure.from_lark"]], "init (blark.transform.initializedstructure attribute)": [[192, "blark.transform.InitializedStructure.init"]], "meta (blark.transform.initializedstructure attribute)": [[192, "blark.transform.InitializedStructure.meta"]], "name (blark.transform.initializedstructure attribute)": [[192, "blark.transform.InitializedStructure.name"]], "value (blark.transform.initializedstructure property)": [[192, "blark.transform.InitializedStructure.value"]], "inputdeclarations (class in blark.transform)": [[193, "blark.transform.InputDeclarations"]], "__init__() (blark.transform.inputdeclarations method)": [[193, "blark.transform.InputDeclarations.__init__"]], "attrs (blark.transform.inputdeclarations attribute)": [[193, "blark.transform.InputDeclarations.attrs"]], "block_header (blark.transform.inputdeclarations attribute)": [[193, "blark.transform.InputDeclarations.block_header"]], "from_lark() (blark.transform.inputdeclarations static method)": [[193, "blark.transform.InputDeclarations.from_lark"]], "items (blark.transform.inputdeclarations attribute)": [[193, "blark.transform.InputDeclarations.items"]], "meta (blark.transform.inputdeclarations attribute)": [[193, "blark.transform.InputDeclarations.meta"]], "inputoutputdeclarations (class in blark.transform)": [[194, "blark.transform.InputOutputDeclarations"]], "__init__() (blark.transform.inputoutputdeclarations method)": [[194, "blark.transform.InputOutputDeclarations.__init__"]], "attrs (blark.transform.inputoutputdeclarations attribute)": [[194, "blark.transform.InputOutputDeclarations.attrs"]], "block_header (blark.transform.inputoutputdeclarations attribute)": [[194, "blark.transform.InputOutputDeclarations.block_header"]], "from_lark() (blark.transform.inputoutputdeclarations static method)": [[194, "blark.transform.InputOutputDeclarations.from_lark"]], "items (blark.transform.inputoutputdeclarations attribute)": [[194, "blark.transform.InputOutputDeclarations.items"]], "meta (blark.transform.inputoutputdeclarations attribute)": [[194, "blark.transform.InputOutputDeclarations.meta"]], "inputparameterassignment (class in blark.transform)": [[195, "blark.transform.InputParameterAssignment"]], "__init__() (blark.transform.inputparameterassignment method)": [[195, "blark.transform.InputParameterAssignment.__init__"]], "from_lark() (blark.transform.inputparameterassignment static method)": [[195, "blark.transform.InputParameterAssignment.from_lark"]], "meta (blark.transform.inputparameterassignment attribute)": [[195, "blark.transform.InputParameterAssignment.meta"]], "name (blark.transform.inputparameterassignment attribute)": [[195, "blark.transform.InputParameterAssignment.name"]], "value (blark.transform.inputparameterassignment attribute)": [[195, "blark.transform.InputParameterAssignment.value"]], "integer (class in blark.transform)": [[196, "blark.transform.Integer"]], "__init__() (blark.transform.integer method)": [[196, "blark.transform.Integer.__init__"]], "base (blark.transform.integer attribute)": [[196, "blark.transform.Integer.base"]], "from_lark() (blark.transform.integer static method)": [[196, "blark.transform.Integer.from_lark"]], "meta (blark.transform.integer attribute)": [[196, "blark.transform.Integer.meta"]], "type_name (blark.transform.integer attribute)": [[196, "blark.transform.Integer.type_name"]], "value (blark.transform.integer attribute)": [[196, "blark.transform.Integer.value"]], "interface (class in blark.transform)": [[197, "blark.transform.Interface"]], "__init__() (blark.transform.interface method)": [[197, "blark.transform.Interface.__init__"]], "declarations (blark.transform.interface attribute)": [[197, "blark.transform.Interface.declarations"]], "extends (blark.transform.interface attribute)": [[197, "blark.transform.Interface.extends"]], "from_lark() (blark.transform.interface static method)": [[197, "blark.transform.Interface.from_lark"]], "meta (blark.transform.interface attribute)": [[197, "blark.transform.Interface.meta"]], "name (blark.transform.interface attribute)": [[197, "blark.transform.Interface.name"]], "jumpstatement (class in blark.transform)": [[198, "blark.transform.JumpStatement"]], "__init__() (blark.transform.jumpstatement method)": [[198, "blark.transform.JumpStatement.__init__"]], "from_lark() (blark.transform.jumpstatement method)": [[198, "blark.transform.JumpStatement.from_lark"]], "label (blark.transform.jumpstatement attribute)": [[198, "blark.transform.JumpStatement.label"]], "meta (blark.transform.jumpstatement attribute)": [[198, "blark.transform.JumpStatement.meta"]], "labeledstatement (class in blark.transform)": [[199, "blark.transform.LabeledStatement"]], "__init__() (blark.transform.labeledstatement method)": [[199, "blark.transform.LabeledStatement.__init__"]], "from_lark() (blark.transform.labeledstatement method)": [[199, "blark.transform.LabeledStatement.from_lark"]], "label (blark.transform.labeledstatement attribute)": [[199, "blark.transform.LabeledStatement.label"]], "meta (blark.transform.labeledstatement attribute)": [[199, "blark.transform.LabeledStatement.meta"]], "statement (blark.transform.labeledstatement attribute)": [[199, "blark.transform.LabeledStatement.statement"]], "ldate (class in blark.transform)": [[200, "blark.transform.Ldate"]], "__init__() (blark.transform.ldate method)": [[200, "blark.transform.Ldate.__init__"]], "day (blark.transform.ldate attribute)": [[200, "blark.transform.Ldate.day"]], "from_lark() (blark.transform.ldate method)": [[200, "blark.transform.Ldate.from_lark"]], "meta (blark.transform.ldate attribute)": [[200, "blark.transform.Ldate.meta"]], "month (blark.transform.ldate attribute)": [[200, "blark.transform.Ldate.month"]], "value (blark.transform.ldate property)": [[200, "blark.transform.Ldate.value"]], "year (blark.transform.ldate attribute)": [[200, "blark.transform.Ldate.year"]], "ldatetime (class in blark.transform)": [[201, "blark.transform.LdateTime"]], "__init__() (blark.transform.ldatetime method)": [[201, "blark.transform.LdateTime.__init__"]], "from_lark() (blark.transform.ldatetime static method)": [[201, "blark.transform.LdateTime.from_lark"]], "ldate (blark.transform.ldatetime attribute)": [[201, "blark.transform.LdateTime.ldate"]], "ltime (blark.transform.ldatetime attribute)": [[201, "blark.transform.LdateTime.ltime"]], "meta (blark.transform.ldatetime attribute)": [[201, "blark.transform.LdateTime.meta"]], "value (blark.transform.ldatetime property)": [[201, "blark.transform.LdateTime.value"]], "lduration (class in blark.transform)": [[202, "blark.transform.Lduration"]], "__init__() (blark.transform.lduration method)": [[202, "blark.transform.Lduration.__init__"]], "days (blark.transform.lduration attribute)": [[202, "blark.transform.Lduration.days"]], "from_lark() (blark.transform.lduration static method)": [[202, "blark.transform.Lduration.from_lark"]], "hours (blark.transform.lduration attribute)": [[202, "blark.transform.Lduration.hours"]], "meta (blark.transform.lduration attribute)": [[202, "blark.transform.Lduration.meta"]], "microseconds (blark.transform.lduration attribute)": [[202, "blark.transform.Lduration.microseconds"]], "milliseconds (blark.transform.lduration attribute)": [[202, "blark.transform.Lduration.milliseconds"]], "minutes (blark.transform.lduration attribute)": [[202, "blark.transform.Lduration.minutes"]], "nanoseconds (blark.transform.lduration attribute)": [[202, "blark.transform.Lduration.nanoseconds"]], "negative (blark.transform.lduration attribute)": [[202, "blark.transform.Lduration.negative"]], "seconds (blark.transform.lduration attribute)": [[202, "blark.transform.Lduration.seconds"]], "value (blark.transform.lduration property)": [[202, "blark.transform.Lduration.value"]], "literal (class in blark.transform)": [[203, "blark.transform.Literal"]], "locatedvariabledeclaration (class in blark.transform)": [[204, "blark.transform.LocatedVariableDeclaration"]], "__init__() (blark.transform.locatedvariabledeclaration method)": [[204, "blark.transform.LocatedVariableDeclaration.__init__"]], "from_lark() (blark.transform.locatedvariabledeclaration method)": [[204, "blark.transform.LocatedVariableDeclaration.from_lark"]], "init (blark.transform.locatedvariabledeclaration attribute)": [[204, "blark.transform.LocatedVariableDeclaration.init"]], "location (blark.transform.locatedvariabledeclaration attribute)": [[204, "blark.transform.LocatedVariableDeclaration.location"]], "meta (blark.transform.locatedvariabledeclaration attribute)": [[204, "blark.transform.LocatedVariableDeclaration.meta"]], "name (blark.transform.locatedvariabledeclaration attribute)": [[204, "blark.transform.LocatedVariableDeclaration.name"]], "locatedvariabledeclarations (class in blark.transform)": [[205, "blark.transform.LocatedVariableDeclarations"]], "__init__() (blark.transform.locatedvariabledeclarations method)": [[205, "blark.transform.LocatedVariableDeclarations.__init__"]], "attrs (blark.transform.locatedvariabledeclarations attribute)": [[205, "blark.transform.LocatedVariableDeclarations.attrs"]], "block_header (blark.transform.locatedvariabledeclarations attribute)": [[205, "blark.transform.LocatedVariableDeclarations.block_header"]], "from_lark() (blark.transform.locatedvariabledeclarations static method)": [[205, "blark.transform.LocatedVariableDeclarations.from_lark"]], "items (blark.transform.locatedvariabledeclarations attribute)": [[205, "blark.transform.LocatedVariableDeclarations.items"]], "meta (blark.transform.locatedvariabledeclarations attribute)": [[205, "blark.transform.LocatedVariableDeclarations.meta"]], "location (class in blark.transform)": [[206, "blark.transform.Location"]], "from_lark() (blark.transform.location static method)": [[206, "blark.transform.Location.from_lark"]], "ltimeofday (class in blark.transform)": [[207, "blark.transform.LtimeOfDay"]], "__init__() (blark.transform.ltimeofday method)": [[207, "blark.transform.LtimeOfDay.__init__"]], "from_lark() (blark.transform.ltimeofday method)": [[207, "blark.transform.LtimeOfDay.from_lark"]], "hour (blark.transform.ltimeofday attribute)": [[207, "blark.transform.LtimeOfDay.hour"]], "meta (blark.transform.ltimeofday attribute)": [[207, "blark.transform.LtimeOfDay.meta"]], "minute (blark.transform.ltimeofday attribute)": [[207, "blark.transform.LtimeOfDay.minute"]], "second (blark.transform.ltimeofday attribute)": [[207, "blark.transform.LtimeOfDay.second"]], "value (blark.transform.ltimeofday property)": [[207, "blark.transform.LtimeOfDay.value"]], "meta (class in blark.transform)": [[208, "blark.transform.Meta"]], "__init__() (blark.transform.meta method)": [[208, "blark.transform.Meta.__init__"]], "attribute_pragmas (blark.transform.meta property)": [[208, "blark.transform.Meta.attribute_pragmas"]], "column (blark.transform.meta attribute)": [[208, "blark.transform.Meta.column"]], "comments (blark.transform.meta attribute)": [[208, "blark.transform.Meta.comments"]], "container_column (blark.transform.meta attribute)": [[208, "blark.transform.Meta.container_column"]], "container_end_column (blark.transform.meta attribute)": [[208, "blark.transform.Meta.container_end_column"]], "container_end_line (blark.transform.meta attribute)": [[208, "blark.transform.Meta.container_end_line"]], "container_line (blark.transform.meta attribute)": [[208, "blark.transform.Meta.container_line"]], "empty (blark.transform.meta attribute)": [[208, "blark.transform.Meta.empty"]], "end_column (blark.transform.meta attribute)": [[208, "blark.transform.Meta.end_column"]], "end_line (blark.transform.meta attribute)": [[208, "blark.transform.Meta.end_line"]], "end_pos (blark.transform.meta attribute)": [[208, "blark.transform.Meta.end_pos"]], "from_lark() (blark.transform.meta static method)": [[208, "blark.transform.Meta.from_lark"]], "get_comments_and_pragmas() (blark.transform.meta method)": [[208, "blark.transform.Meta.get_comments_and_pragmas"]], "line (blark.transform.meta attribute)": [[208, "blark.transform.Meta.line"]], "start_pos (blark.transform.meta attribute)": [[208, "blark.transform.Meta.start_pos"]], "method (class in blark.transform)": [[209, "blark.transform.Method"]], "__init__() (blark.transform.method method)": [[209, "blark.transform.Method.__init__"]], "access (blark.transform.method attribute)": [[209, "blark.transform.Method.access"]], "body (blark.transform.method attribute)": [[209, "blark.transform.Method.body"]], "declarations (blark.transform.method attribute)": [[209, "blark.transform.Method.declarations"]], "from_lark() (blark.transform.method static method)": [[209, "blark.transform.Method.from_lark"]], "meta (blark.transform.method attribute)": [[209, "blark.transform.Method.meta"]], "name (blark.transform.method attribute)": [[209, "blark.transform.Method.name"]], "return_type (blark.transform.method attribute)": [[209, "blark.transform.Method.return_type"]], "methodinstancevariabledeclarations (class in blark.transform)": [[210, "blark.transform.MethodInstanceVariableDeclarations"]], "__init__() (blark.transform.methodinstancevariabledeclarations method)": [[210, "blark.transform.MethodInstanceVariableDeclarations.__init__"]], "attrs (blark.transform.methodinstancevariabledeclarations attribute)": [[210, "blark.transform.MethodInstanceVariableDeclarations.attrs"]], "block_header (blark.transform.methodinstancevariabledeclarations attribute)": [[210, "blark.transform.MethodInstanceVariableDeclarations.block_header"]], "from_lark() (blark.transform.methodinstancevariabledeclarations static method)": [[210, "blark.transform.MethodInstanceVariableDeclarations.from_lark"]], "items (blark.transform.methodinstancevariabledeclarations attribute)": [[210, "blark.transform.MethodInstanceVariableDeclarations.items"]], "meta (blark.transform.methodinstancevariabledeclarations attribute)": [[210, "blark.transform.MethodInstanceVariableDeclarations.meta"]], "multielementvariable (class in blark.transform)": [[211, "blark.transform.MultiElementVariable"]], "__init__() (blark.transform.multielementvariable method)": [[211, "blark.transform.MultiElementVariable.__init__"]], "dereferenced (blark.transform.multielementvariable attribute)": [[211, "blark.transform.MultiElementVariable.dereferenced"]], "elements (blark.transform.multielementvariable attribute)": [[211, "blark.transform.MultiElementVariable.elements"]], "from_lark() (blark.transform.multielementvariable static method)": [[211, "blark.transform.MultiElementVariable.from_lark"]], "meta (blark.transform.multielementvariable attribute)": [[211, "blark.transform.MultiElementVariable.meta"]], "name (blark.transform.multielementvariable attribute)": [[211, "blark.transform.MultiElementVariable.name"]], "noopstatement (class in blark.transform)": [[212, "blark.transform.NoOpStatement"]], "__init__() (blark.transform.noopstatement method)": [[212, "blark.transform.NoOpStatement.__init__"]], "from_lark() (blark.transform.noopstatement method)": [[212, "blark.transform.NoOpStatement.from_lark"]], "meta (blark.transform.noopstatement attribute)": [[212, "blark.transform.NoOpStatement.meta"]], "variable (blark.transform.noopstatement attribute)": [[212, "blark.transform.NoOpStatement.variable"]], "objectinitializerarray (class in blark.transform)": [[213, "blark.transform.ObjectInitializerArray"]], "__init__() (blark.transform.objectinitializerarray method)": [[213, "blark.transform.ObjectInitializerArray.__init__"]], "from_lark() (blark.transform.objectinitializerarray static method)": [[213, "blark.transform.ObjectInitializerArray.from_lark"]], "initializers (blark.transform.objectinitializerarray attribute)": [[213, "blark.transform.ObjectInitializerArray.initializers"]], "meta (blark.transform.objectinitializerarray attribute)": [[213, "blark.transform.ObjectInitializerArray.meta"]], "name (blark.transform.objectinitializerarray attribute)": [[213, "blark.transform.ObjectInitializerArray.name"]], "octalbitstring (class in blark.transform)": [[214, "blark.transform.OctalBitString"]], "__init__() (blark.transform.octalbitstring method)": [[214, "blark.transform.OctalBitString.__init__"]], "base (blark.transform.octalbitstring attribute)": [[214, "blark.transform.OctalBitString.base"]], "meta (blark.transform.octalbitstring attribute)": [[214, "blark.transform.OctalBitString.meta"]], "octalinteger (class in blark.transform)": [[215, "blark.transform.OctalInteger"]], "__init__() (blark.transform.octalinteger method)": [[215, "blark.transform.OctalInteger.__init__"]], "base (blark.transform.octalinteger attribute)": [[215, "blark.transform.OctalInteger.base"]], "outputdeclarations (class in blark.transform)": [[216, "blark.transform.OutputDeclarations"]], "__init__() (blark.transform.outputdeclarations method)": [[216, "blark.transform.OutputDeclarations.__init__"]], "attrs (blark.transform.outputdeclarations attribute)": [[216, "blark.transform.OutputDeclarations.attrs"]], "block_header (blark.transform.outputdeclarations attribute)": [[216, "blark.transform.OutputDeclarations.block_header"]], "from_lark() (blark.transform.outputdeclarations static method)": [[216, "blark.transform.OutputDeclarations.from_lark"]], "items (blark.transform.outputdeclarations attribute)": [[216, "blark.transform.OutputDeclarations.items"]], "meta (blark.transform.outputdeclarations attribute)": [[216, "blark.transform.OutputDeclarations.meta"]], "outputparameterassignment (class in blark.transform)": [[217, "blark.transform.OutputParameterAssignment"]], "__init__() (blark.transform.outputparameterassignment method)": [[217, "blark.transform.OutputParameterAssignment.__init__"]], "from_lark() (blark.transform.outputparameterassignment static method)": [[217, "blark.transform.OutputParameterAssignment.from_lark"]], "inverted (blark.transform.outputparameterassignment attribute)": [[217, "blark.transform.OutputParameterAssignment.inverted"]], "meta (blark.transform.outputparameterassignment attribute)": [[217, "blark.transform.OutputParameterAssignment.meta"]], "name (blark.transform.outputparameterassignment attribute)": [[217, "blark.transform.OutputParameterAssignment.name"]], "value (blark.transform.outputparameterassignment attribute)": [[217, "blark.transform.OutputParameterAssignment.value"]], "parameterassignment (class in blark.transform)": [[218, "blark.transform.ParameterAssignment"]], "parenthesizedexpression (class in blark.transform)": [[219, "blark.transform.ParenthesizedExpression"]], "__init__() (blark.transform.parenthesizedexpression method)": [[219, "blark.transform.ParenthesizedExpression.__init__"]], "expr (blark.transform.parenthesizedexpression attribute)": [[219, "blark.transform.ParenthesizedExpression.expr"]], "from_lark() (blark.transform.parenthesizedexpression method)": [[219, "blark.transform.ParenthesizedExpression.from_lark"]], "meta (blark.transform.parenthesizedexpression attribute)": [[219, "blark.transform.ParenthesizedExpression.meta"]], "partialsubrange (class in blark.transform)": [[220, "blark.transform.PartialSubrange"]], "__init__() (blark.transform.partialsubrange method)": [[220, "blark.transform.PartialSubrange.__init__"]], "from_lark() (blark.transform.partialsubrange method)": [[220, "blark.transform.PartialSubrange.from_lark"]], "meta (blark.transform.partialsubrange attribute)": [[220, "blark.transform.PartialSubrange.meta"]], "start (blark.transform.partialsubrange attribute)": [[220, "blark.transform.PartialSubrange.start"]], "stop (blark.transform.partialsubrange attribute)": [[220, "blark.transform.PartialSubrange.stop"]], "program (class in blark.transform)": [[221, "blark.transform.Program"]], "__init__() (blark.transform.program method)": [[221, "blark.transform.Program.__init__"]], "body (blark.transform.program attribute)": [[221, "blark.transform.Program.body"]], "declarations (blark.transform.program attribute)": [[221, "blark.transform.Program.declarations"]], "from_lark() (blark.transform.program method)": [[221, "blark.transform.Program.from_lark"]], "meta (blark.transform.program attribute)": [[221, "blark.transform.Program.meta"]], "name (blark.transform.program attribute)": [[221, "blark.transform.Program.name"]], "property (class in blark.transform)": [[222, "blark.transform.Property"]], "__init__() (blark.transform.property method)": [[222, "blark.transform.Property.__init__"]], "access (blark.transform.property attribute)": [[222, "blark.transform.Property.access"]], "body (blark.transform.property attribute)": [[222, "blark.transform.Property.body"]], "declarations (blark.transform.property attribute)": [[222, "blark.transform.Property.declarations"]], "from_lark() (blark.transform.property static method)": [[222, "blark.transform.Property.from_lark"]], "meta (blark.transform.property attribute)": [[222, "blark.transform.Property.meta"]], "name (blark.transform.property attribute)": [[222, "blark.transform.Property.name"]], "return_type (blark.transform.property attribute)": [[222, "blark.transform.Property.return_type"]], "real (class in blark.transform)": [[223, "blark.transform.Real"]], "__init__() (blark.transform.real method)": [[223, "blark.transform.Real.__init__"]], "from_lark() (blark.transform.real static method)": [[223, "blark.transform.Real.from_lark"]], "meta (blark.transform.real attribute)": [[223, "blark.transform.Real.meta"]], "type_name (blark.transform.real attribute)": [[223, "blark.transform.Real.type_name"]], "value (blark.transform.real attribute)": [[223, "blark.transform.Real.value"]], "referenceassignmentstatement (class in blark.transform)": [[224, "blark.transform.ReferenceAssignmentStatement"]], "__init__() (blark.transform.referenceassignmentstatement method)": [[224, "blark.transform.ReferenceAssignmentStatement.__init__"]], "expression (blark.transform.referenceassignmentstatement attribute)": [[224, "blark.transform.ReferenceAssignmentStatement.expression"]], "from_lark() (blark.transform.referenceassignmentstatement method)": [[224, "blark.transform.ReferenceAssignmentStatement.from_lark"]], "meta (blark.transform.referenceassignmentstatement attribute)": [[224, "blark.transform.ReferenceAssignmentStatement.meta"]], "op (blark.transform.referenceassignmentstatement attribute)": [[224, "blark.transform.ReferenceAssignmentStatement.op"]], "variable (blark.transform.referenceassignmentstatement attribute)": [[224, "blark.transform.ReferenceAssignmentStatement.variable"]], "repeatstatement (class in blark.transform)": [[225, "blark.transform.RepeatStatement"]], "__init__() (blark.transform.repeatstatement method)": [[225, "blark.transform.RepeatStatement.__init__"]], "expression (blark.transform.repeatstatement attribute)": [[225, "blark.transform.RepeatStatement.expression"]], "from_lark() (blark.transform.repeatstatement method)": [[225, "blark.transform.RepeatStatement.from_lark"]], "meta (blark.transform.repeatstatement attribute)": [[225, "blark.transform.RepeatStatement.meta"]], "statements (blark.transform.repeatstatement attribute)": [[225, "blark.transform.RepeatStatement.statements"]], "resetstatement (class in blark.transform)": [[226, "blark.transform.ResetStatement"]], "__init__() (blark.transform.resetstatement method)": [[226, "blark.transform.ResetStatement.__init__"]], "expression (blark.transform.resetstatement attribute)": [[226, "blark.transform.ResetStatement.expression"]], "from_lark() (blark.transform.resetstatement method)": [[226, "blark.transform.ResetStatement.from_lark"]], "meta (blark.transform.resetstatement attribute)": [[226, "blark.transform.ResetStatement.meta"]], "op (blark.transform.resetstatement attribute)": [[226, "blark.transform.ResetStatement.op"]], "variable (blark.transform.resetstatement attribute)": [[226, "blark.transform.ResetStatement.variable"]], "returnstatement (class in blark.transform)": [[227, "blark.transform.ReturnStatement"]], "__init__() (blark.transform.returnstatement method)": [[227, "blark.transform.ReturnStatement.__init__"]], "from_lark() (blark.transform.returnstatement method)": [[227, "blark.transform.ReturnStatement.from_lark"]], "meta (blark.transform.returnstatement attribute)": [[227, "blark.transform.ReturnStatement.meta"]], "setstatement (class in blark.transform)": [[228, "blark.transform.SetStatement"]], "__init__() (blark.transform.setstatement method)": [[228, "blark.transform.SetStatement.__init__"]], "expression (blark.transform.setstatement attribute)": [[228, "blark.transform.SetStatement.expression"]], "from_lark() (blark.transform.setstatement method)": [[228, "blark.transform.SetStatement.from_lark"]], "meta (blark.transform.setstatement attribute)": [[228, "blark.transform.SetStatement.meta"]], "op (blark.transform.setstatement attribute)": [[228, "blark.transform.SetStatement.op"]], "variable (blark.transform.setstatement attribute)": [[228, "blark.transform.SetStatement.variable"]], "simplespecification (class in blark.transform)": [[229, "blark.transform.SimpleSpecification"]], "__init__() (blark.transform.simplespecification method)": [[229, "blark.transform.SimpleSpecification.__init__"]], "from_lark() (blark.transform.simplespecification method)": [[229, "blark.transform.SimpleSpecification.from_lark"]], "meta (blark.transform.simplespecification attribute)": [[229, "blark.transform.SimpleSpecification.meta"]], "type (blark.transform.simplespecification attribute)": [[229, "blark.transform.SimpleSpecification.type"]], "simpletypedeclaration (class in blark.transform)": [[230, "blark.transform.SimpleTypeDeclaration"]], "__init__() (blark.transform.simpletypedeclaration method)": [[230, "blark.transform.SimpleTypeDeclaration.__init__"]], "extends (blark.transform.simpletypedeclaration attribute)": [[230, "blark.transform.SimpleTypeDeclaration.extends"]], "from_lark() (blark.transform.simpletypedeclaration method)": [[230, "blark.transform.SimpleTypeDeclaration.from_lark"]], "init (blark.transform.simpletypedeclaration attribute)": [[230, "blark.transform.SimpleTypeDeclaration.init"]], "meta (blark.transform.simpletypedeclaration attribute)": [[230, "blark.transform.SimpleTypeDeclaration.meta"]], "name (blark.transform.simpletypedeclaration attribute)": [[230, "blark.transform.SimpleTypeDeclaration.name"]], "simplevariable (class in blark.transform)": [[231, "blark.transform.SimpleVariable"]], "__init__() (blark.transform.simplevariable method)": [[231, "blark.transform.SimpleVariable.__init__"]], "dereferenced (blark.transform.simplevariable attribute)": [[231, "blark.transform.SimpleVariable.dereferenced"]], "from_lark() (blark.transform.simplevariable static method)": [[231, "blark.transform.SimpleVariable.from_lark"]], "meta (blark.transform.simplevariable attribute)": [[231, "blark.transform.SimpleVariable.meta"]], "name (blark.transform.simplevariable attribute)": [[231, "blark.transform.SimpleVariable.name"]], "sourcecode (class in blark.transform)": [[232, "blark.transform.SourceCode"]], "__init__() (blark.transform.sourcecode method)": [[232, "blark.transform.SourceCode.__init__"]], "filename (blark.transform.sourcecode attribute)": [[232, "blark.transform.SourceCode.filename"]], "from_lark() (blark.transform.sourcecode static method)": [[232, "blark.transform.SourceCode.from_lark"]], "items (blark.transform.sourcecode attribute)": [[232, "blark.transform.SourceCode.items"]], "line_map (blark.transform.sourcecode attribute)": [[232, "blark.transform.SourceCode.line_map"]], "meta (blark.transform.sourcecode attribute)": [[232, "blark.transform.SourceCode.meta"]], "range_from_file_lines() (blark.transform.sourcecode method)": [[232, "blark.transform.SourceCode.range_from_file_lines"]], "raw_source (blark.transform.sourcecode attribute)": [[232, "blark.transform.SourceCode.raw_source"]], "statement (class in blark.transform)": [[233, "blark.transform.Statement"]], "statementlist (class in blark.transform)": [[234, "blark.transform.StatementList"]], "__init__() (blark.transform.statementlist method)": [[234, "blark.transform.StatementList.__init__"]], "from_lark() (blark.transform.statementlist static method)": [[234, "blark.transform.StatementList.from_lark"]], "meta (blark.transform.statementlist attribute)": [[234, "blark.transform.StatementList.meta"]], "statements (blark.transform.statementlist attribute)": [[234, "blark.transform.StatementList.statements"]], "staticdeclarations (class in blark.transform)": [[235, "blark.transform.StaticDeclarations"]], "__init__() (blark.transform.staticdeclarations method)": [[235, "blark.transform.StaticDeclarations.__init__"]], "attrs (blark.transform.staticdeclarations attribute)": [[235, "blark.transform.StaticDeclarations.attrs"]], "block_header (blark.transform.staticdeclarations attribute)": [[235, "blark.transform.StaticDeclarations.block_header"]], "from_lark() (blark.transform.staticdeclarations static method)": [[235, "blark.transform.StaticDeclarations.from_lark"]], "items (blark.transform.staticdeclarations attribute)": [[235, "blark.transform.StaticDeclarations.items"]], "meta (blark.transform.staticdeclarations attribute)": [[235, "blark.transform.StaticDeclarations.meta"]], "string (class in blark.transform)": [[236, "blark.transform.String"]], "__init__() (blark.transform.string method)": [[236, "blark.transform.String.__init__"]], "from_lark() (blark.transform.string method)": [[236, "blark.transform.String.from_lark"]], "meta (blark.transform.string attribute)": [[236, "blark.transform.String.meta"]], "value (blark.transform.string attribute)": [[236, "blark.transform.String.value"]], "stringspeclength (class in blark.transform)": [[237, "blark.transform.StringSpecLength"]], "__init__() (blark.transform.stringspeclength method)": [[237, "blark.transform.StringSpecLength.__init__"]], "from_lark() (blark.transform.stringspeclength method)": [[237, "blark.transform.StringSpecLength.from_lark"]], "length (blark.transform.stringspeclength attribute)": [[237, "blark.transform.StringSpecLength.length"]], "stringtypedeclaration (class in blark.transform)": [[238, "blark.transform.StringTypeDeclaration"]], "__init__() (blark.transform.stringtypedeclaration method)": [[238, "blark.transform.StringTypeDeclaration.__init__"]], "from_lark() (blark.transform.stringtypedeclaration method)": [[238, "blark.transform.StringTypeDeclaration.from_lark"]], "meta (blark.transform.stringtypedeclaration attribute)": [[238, "blark.transform.StringTypeDeclaration.meta"]], "name (blark.transform.stringtypedeclaration attribute)": [[238, "blark.transform.StringTypeDeclaration.name"]], "string_type (blark.transform.stringtypedeclaration attribute)": [[238, "blark.transform.StringTypeDeclaration.string_type"]], "type_name (blark.transform.stringtypedeclaration property)": [[238, "blark.transform.StringTypeDeclaration.type_name"]], "value (blark.transform.stringtypedeclaration attribute)": [[238, "blark.transform.StringTypeDeclaration.value"]], "stringtypeinitialization (class in blark.transform)": [[239, "blark.transform.StringTypeInitialization"]], "__init__() (blark.transform.stringtypeinitialization method)": [[239, "blark.transform.StringTypeInitialization.__init__"]], "from_lark() (blark.transform.stringtypeinitialization static method)": [[239, "blark.transform.StringTypeInitialization.from_lark"]], "meta (blark.transform.stringtypeinitialization attribute)": [[239, "blark.transform.StringTypeInitialization.meta"]], "spec (blark.transform.stringtypeinitialization attribute)": [[239, "blark.transform.StringTypeInitialization.spec"]], "value (blark.transform.stringtypeinitialization attribute)": [[239, "blark.transform.StringTypeInitialization.value"]], "stringtypespecification (class in blark.transform)": [[240, "blark.transform.StringTypeSpecification"]], "__init__() (blark.transform.stringtypespecification method)": [[240, "blark.transform.StringTypeSpecification.__init__"]], "base_type_name (blark.transform.stringtypespecification property)": [[240, "blark.transform.StringTypeSpecification.base_type_name"]], "from_lark() (blark.transform.stringtypespecification method)": [[240, "blark.transform.StringTypeSpecification.from_lark"]], "full_type_name (blark.transform.stringtypespecification property)": [[240, "blark.transform.StringTypeSpecification.full_type_name"]], "length (blark.transform.stringtypespecification attribute)": [[240, "blark.transform.StringTypeSpecification.length"]], "meta (blark.transform.stringtypespecification attribute)": [[240, "blark.transform.StringTypeSpecification.meta"]], "type_name (blark.transform.stringtypespecification attribute)": [[240, "blark.transform.StringTypeSpecification.type_name"]], "stringvariableinitdeclaration (class in blark.transform)": [[241, "blark.transform.StringVariableInitDeclaration"]], "__init__() (blark.transform.stringvariableinitdeclaration method)": [[241, "blark.transform.StringVariableInitDeclaration.__init__"]], "from_lark() (blark.transform.stringvariableinitdeclaration static method)": [[241, "blark.transform.StringVariableInitDeclaration.from_lark"]], "init (blark.transform.stringvariableinitdeclaration attribute)": [[241, "blark.transform.StringVariableInitDeclaration.init"]], "meta (blark.transform.stringvariableinitdeclaration attribute)": [[241, "blark.transform.StringVariableInitDeclaration.meta"]], "spec (blark.transform.stringvariableinitdeclaration attribute)": [[241, "blark.transform.StringVariableInitDeclaration.spec"]], "value (blark.transform.stringvariableinitdeclaration attribute)": [[241, "blark.transform.StringVariableInitDeclaration.value"]], "variables (blark.transform.stringvariableinitdeclaration attribute)": [[241, "blark.transform.StringVariableInitDeclaration.variables"]], "structureelementdeclaration (class in blark.transform)": [[242, "blark.transform.StructureElementDeclaration"]], "__init__() (blark.transform.structureelementdeclaration method)": [[242, "blark.transform.StructureElementDeclaration.__init__"]], "base_type_name (blark.transform.structureelementdeclaration property)": [[242, "blark.transform.StructureElementDeclaration.base_type_name"]], "from_lark() (blark.transform.structureelementdeclaration method)": [[242, "blark.transform.StructureElementDeclaration.from_lark"]], "full_type_name (blark.transform.structureelementdeclaration property)": [[242, "blark.transform.StructureElementDeclaration.full_type_name"]], "init (blark.transform.structureelementdeclaration attribute)": [[242, "blark.transform.StructureElementDeclaration.init"]], "location (blark.transform.structureelementdeclaration attribute)": [[242, "blark.transform.StructureElementDeclaration.location"]], "meta (blark.transform.structureelementdeclaration attribute)": [[242, "blark.transform.StructureElementDeclaration.meta"]], "name (blark.transform.structureelementdeclaration attribute)": [[242, "blark.transform.StructureElementDeclaration.name"]], "value (blark.transform.structureelementdeclaration property)": [[242, "blark.transform.StructureElementDeclaration.value"]], "variables (blark.transform.structureelementdeclaration property)": [[242, "blark.transform.StructureElementDeclaration.variables"]], "structureelementinitialization (class in blark.transform)": [[243, "blark.transform.StructureElementInitialization"]], "__init__() (blark.transform.structureelementinitialization method)": [[243, "blark.transform.StructureElementInitialization.__init__"]], "from_lark() (blark.transform.structureelementinitialization static method)": [[243, "blark.transform.StructureElementInitialization.from_lark"]], "meta (blark.transform.structureelementinitialization attribute)": [[243, "blark.transform.StructureElementInitialization.meta"]], "name (blark.transform.structureelementinitialization attribute)": [[243, "blark.transform.StructureElementInitialization.name"]], "value (blark.transform.structureelementinitialization attribute)": [[243, "blark.transform.StructureElementInitialization.value"]], "structureinitialization (class in blark.transform)": [[244, "blark.transform.StructureInitialization"]], "__init__() (blark.transform.structureinitialization method)": [[244, "blark.transform.StructureInitialization.__init__"]], "elements (blark.transform.structureinitialization attribute)": [[244, "blark.transform.StructureInitialization.elements"]], "from_lark() (blark.transform.structureinitialization static method)": [[244, "blark.transform.StructureInitialization.from_lark"]], "meta (blark.transform.structureinitialization attribute)": [[244, "blark.transform.StructureInitialization.meta"]], "structuretypedeclaration (class in blark.transform)": [[245, "blark.transform.StructureTypeDeclaration"]], "__init__() (blark.transform.structuretypedeclaration method)": [[245, "blark.transform.StructureTypeDeclaration.__init__"]], "declarations (blark.transform.structuretypedeclaration attribute)": [[245, "blark.transform.StructureTypeDeclaration.declarations"]], "extends (blark.transform.structuretypedeclaration attribute)": [[245, "blark.transform.StructureTypeDeclaration.extends"]], "from_lark() (blark.transform.structuretypedeclaration static method)": [[245, "blark.transform.StructureTypeDeclaration.from_lark"]], "indirection (blark.transform.structuretypedeclaration attribute)": [[245, "blark.transform.StructureTypeDeclaration.indirection"]], "meta (blark.transform.structuretypedeclaration attribute)": [[245, "blark.transform.StructureTypeDeclaration.meta"]], "name (blark.transform.structuretypedeclaration attribute)": [[245, "blark.transform.StructureTypeDeclaration.name"]], "structuredvariableinitdeclaration (class in blark.transform)": [[246, "blark.transform.StructuredVariableInitDeclaration"]], "__init__() (blark.transform.structuredvariableinitdeclaration method)": [[246, "blark.transform.StructuredVariableInitDeclaration.__init__"]], "from_lark() (blark.transform.structuredvariableinitdeclaration method)": [[246, "blark.transform.StructuredVariableInitDeclaration.from_lark"]], "init (blark.transform.structuredvariableinitdeclaration attribute)": [[246, "blark.transform.StructuredVariableInitDeclaration.init"]], "meta (blark.transform.structuredvariableinitdeclaration attribute)": [[246, "blark.transform.StructuredVariableInitDeclaration.meta"]], "variables (blark.transform.structuredvariableinitdeclaration attribute)": [[246, "blark.transform.StructuredVariableInitDeclaration.variables"]], "subrange (class in blark.transform)": [[247, "blark.transform.Subrange"]], "__init__() (blark.transform.subrange method)": [[247, "blark.transform.Subrange.__init__"]], "subrangespecification (class in blark.transform)": [[248, "blark.transform.SubrangeSpecification"]], "__init__() (blark.transform.subrangespecification method)": [[248, "blark.transform.SubrangeSpecification.__init__"]], "base_type_name (blark.transform.subrangespecification property)": [[248, "blark.transform.SubrangeSpecification.base_type_name"]], "from_lark() (blark.transform.subrangespecification method)": [[248, "blark.transform.SubrangeSpecification.from_lark"]], "full_type_name (blark.transform.subrangespecification property)": [[248, "blark.transform.SubrangeSpecification.full_type_name"]], "meta (blark.transform.subrangespecification attribute)": [[248, "blark.transform.SubrangeSpecification.meta"]], "subrange (blark.transform.subrangespecification attribute)": [[248, "blark.transform.SubrangeSpecification.subrange"]], "type_name (blark.transform.subrangespecification attribute)": [[248, "blark.transform.SubrangeSpecification.type_name"]], "subrangetypedeclaration (class in blark.transform)": [[249, "blark.transform.SubrangeTypeDeclaration"]], "__init__() (blark.transform.subrangetypedeclaration method)": [[249, "blark.transform.SubrangeTypeDeclaration.__init__"]], "from_lark() (blark.transform.subrangetypedeclaration method)": [[249, "blark.transform.SubrangeTypeDeclaration.from_lark"]], "init (blark.transform.subrangetypedeclaration attribute)": [[249, "blark.transform.SubrangeTypeDeclaration.init"]], "meta (blark.transform.subrangetypedeclaration attribute)": [[249, "blark.transform.SubrangeTypeDeclaration.meta"]], "name (blark.transform.subrangetypedeclaration attribute)": [[249, "blark.transform.SubrangeTypeDeclaration.name"]], "subrangetypeinitialization (class in blark.transform)": [[250, "blark.transform.SubrangeTypeInitialization"]], "__init__() (blark.transform.subrangetypeinitialization method)": [[250, "blark.transform.SubrangeTypeInitialization.__init__"]], "from_lark() (blark.transform.subrangetypeinitialization method)": [[250, "blark.transform.SubrangeTypeInitialization.from_lark"]], "indirection (blark.transform.subrangetypeinitialization attribute)": [[250, "blark.transform.SubrangeTypeInitialization.indirection"]], "meta (blark.transform.subrangetypeinitialization attribute)": [[250, "blark.transform.SubrangeTypeInitialization.meta"]], "spec (blark.transform.subrangetypeinitialization attribute)": [[250, "blark.transform.SubrangeTypeInitialization.spec"]], "value (blark.transform.subrangetypeinitialization attribute)": [[250, "blark.transform.SubrangeTypeInitialization.value"]], "subscriptlist (class in blark.transform)": [[251, "blark.transform.SubscriptList"]], "__init__() (blark.transform.subscriptlist method)": [[251, "blark.transform.SubscriptList.__init__"]], "dereferenced (blark.transform.subscriptlist attribute)": [[251, "blark.transform.SubscriptList.dereferenced"]], "from_lark() (blark.transform.subscriptlist static method)": [[251, "blark.transform.SubscriptList.from_lark"]], "meta (blark.transform.subscriptlist attribute)": [[251, "blark.transform.SubscriptList.meta"]], "subscripts (blark.transform.subscriptlist attribute)": [[251, "blark.transform.SubscriptList.subscripts"]], "temporaryvariabledeclarations (class in blark.transform)": [[252, "blark.transform.TemporaryVariableDeclarations"]], "__init__() (blark.transform.temporaryvariabledeclarations method)": [[252, "blark.transform.TemporaryVariableDeclarations.__init__"]], "block_header (blark.transform.temporaryvariabledeclarations attribute)": [[252, "blark.transform.TemporaryVariableDeclarations.block_header"]], "from_lark() (blark.transform.temporaryvariabledeclarations static method)": [[252, "blark.transform.TemporaryVariableDeclarations.from_lark"]], "items (blark.transform.temporaryvariabledeclarations attribute)": [[252, "blark.transform.TemporaryVariableDeclarations.items"]], "meta (blark.transform.temporaryvariabledeclarations attribute)": [[252, "blark.transform.TemporaryVariableDeclarations.meta"]], "timeofday (class in blark.transform)": [[253, "blark.transform.TimeOfDay"]], "__init__() (blark.transform.timeofday method)": [[253, "blark.transform.TimeOfDay.__init__"]], "from_lark() (blark.transform.timeofday method)": [[253, "blark.transform.TimeOfDay.from_lark"]], "hour (blark.transform.timeofday attribute)": [[253, "blark.transform.TimeOfDay.hour"]], "meta (blark.transform.timeofday attribute)": [[253, "blark.transform.TimeOfDay.meta"]], "minute (blark.transform.timeofday attribute)": [[253, "blark.transform.TimeOfDay.minute"]], "second (blark.transform.timeofday attribute)": [[253, "blark.transform.TimeOfDay.second"]], "value (blark.transform.timeofday property)": [[253, "blark.transform.TimeOfDay.value"]], "typeinformation (class in blark.transform)": [[254, "blark.transform.TypeInformation"]], "__init__() (blark.transform.typeinformation method)": [[254, "blark.transform.TypeInformation.__init__"]], "base_type_name (blark.transform.typeinformation attribute)": [[254, "blark.transform.TypeInformation.base_type_name"]], "context (blark.transform.typeinformation attribute)": [[254, "blark.transform.TypeInformation.context"]], "from_init() (blark.transform.typeinformation class method)": [[254, "blark.transform.TypeInformation.from_init"]], "from_spec() (blark.transform.typeinformation class method)": [[254, "blark.transform.TypeInformation.from_spec"]], "full_type_name (blark.transform.typeinformation attribute)": [[254, "blark.transform.TypeInformation.full_type_name"]], "typeinitialization (class in blark.transform)": [[255, "blark.transform.TypeInitialization"]], "__init__() (blark.transform.typeinitialization method)": [[255, "blark.transform.TypeInitialization.__init__"]], "from_lark() (blark.transform.typeinitialization method)": [[255, "blark.transform.TypeInitialization.from_lark"]], "meta (blark.transform.typeinitialization attribute)": [[255, "blark.transform.TypeInitialization.meta"]], "spec (blark.transform.typeinitialization attribute)": [[255, "blark.transform.TypeInitialization.spec"]], "value (blark.transform.typeinitialization attribute)": [[255, "blark.transform.TypeInitialization.value"]], "typeinitializationbase (class in blark.transform)": [[256, "blark.transform.TypeInitializationBase"]], "base_type_name (blark.transform.typeinitializationbase property)": [[256, "blark.transform.TypeInitializationBase.base_type_name"]], "full_type_name (blark.transform.typeinitializationbase property)": [[256, "blark.transform.TypeInitializationBase.full_type_name"]], "type_info (blark.transform.typeinitializationbase property)": [[256, "blark.transform.TypeInitializationBase.type_info"]], "typespecificationbase (class in blark.transform)": [[257, "blark.transform.TypeSpecificationBase"]], "base_type_name (blark.transform.typespecificationbase property)": [[257, "blark.transform.TypeSpecificationBase.base_type_name"]], "full_type_name (blark.transform.typespecificationbase property)": [[257, "blark.transform.TypeSpecificationBase.full_type_name"]], "type_info (blark.transform.typespecificationbase property)": [[257, "blark.transform.TypeSpecificationBase.type_info"]], "unaryoperation (class in blark.transform)": [[258, "blark.transform.UnaryOperation"]], "__init__() (blark.transform.unaryoperation method)": [[258, "blark.transform.UnaryOperation.__init__"]], "expr (blark.transform.unaryoperation attribute)": [[258, "blark.transform.UnaryOperation.expr"]], "from_lark() (blark.transform.unaryoperation static method)": [[258, "blark.transform.UnaryOperation.from_lark"]], "meta (blark.transform.unaryoperation attribute)": [[258, "blark.transform.UnaryOperation.meta"]], "op (blark.transform.unaryoperation attribute)": [[258, "blark.transform.UnaryOperation.op"]], "unionelementdeclaration (class in blark.transform)": [[259, "blark.transform.UnionElementDeclaration"]], "__init__() (blark.transform.unionelementdeclaration method)": [[259, "blark.transform.UnionElementDeclaration.__init__"]], "from_lark() (blark.transform.unionelementdeclaration method)": [[259, "blark.transform.UnionElementDeclaration.from_lark"]], "meta (blark.transform.unionelementdeclaration attribute)": [[259, "blark.transform.UnionElementDeclaration.meta"]], "name (blark.transform.unionelementdeclaration attribute)": [[259, "blark.transform.UnionElementDeclaration.name"]], "spec (blark.transform.unionelementdeclaration attribute)": [[259, "blark.transform.UnionElementDeclaration.spec"]], "variables (blark.transform.unionelementdeclaration property)": [[259, "blark.transform.UnionElementDeclaration.variables"]], "uniontypedeclaration (class in blark.transform)": [[260, "blark.transform.UnionTypeDeclaration"]], "__init__() (blark.transform.uniontypedeclaration method)": [[260, "blark.transform.UnionTypeDeclaration.__init__"]], "declarations (blark.transform.uniontypedeclaration attribute)": [[260, "blark.transform.UnionTypeDeclaration.declarations"]], "from_lark() (blark.transform.uniontypedeclaration static method)": [[260, "blark.transform.UnionTypeDeclaration.from_lark"]], "meta (blark.transform.uniontypedeclaration attribute)": [[260, "blark.transform.UnionTypeDeclaration.meta"]], "name (blark.transform.uniontypedeclaration attribute)": [[260, "blark.transform.UnionTypeDeclaration.name"]], "unresolvedtypeinformation (class in blark.transform)": [[261, "blark.transform.UnresolvedTypeInformation"]], "__init__() (blark.transform.unresolvedtypeinformation method)": [[261, "blark.transform.UnresolvedTypeInformation.__init__"]], "variable (class in blark.transform)": [[262, "blark.transform.Variable"]], "variableattributes (class in blark.transform)": [[263, "blark.transform.VariableAttributes"]], "constant (blark.transform.variableattributes attribute)": [[263, "blark.transform.VariableAttributes.constant"]], "non_retain (blark.transform.variableattributes attribute)": [[263, "blark.transform.VariableAttributes.non_retain"]], "persistent (blark.transform.variableattributes attribute)": [[263, "blark.transform.VariableAttributes.persistent"]], "retain (blark.transform.variableattributes attribute)": [[263, "blark.transform.VariableAttributes.retain"]], "variabledeclarationblock (class in blark.transform)": [[264, "blark.transform.VariableDeclarationBlock"]], "attribute_pragmas (blark.transform.variabledeclarationblock property)": [[264, "blark.transform.VariableDeclarationBlock.attribute_pragmas"]], "block_header (blark.transform.variabledeclarationblock attribute)": [[264, "blark.transform.VariableDeclarationBlock.block_header"]], "items (blark.transform.variabledeclarationblock attribute)": [[264, "blark.transform.VariableDeclarationBlock.items"]], "meta (blark.transform.variabledeclarationblock attribute)": [[264, "blark.transform.VariableDeclarationBlock.meta"]], "variabledeclarations (class in blark.transform)": [[265, "blark.transform.VariableDeclarations"]], "__init__() (blark.transform.variabledeclarations method)": [[265, "blark.transform.VariableDeclarations.__init__"]], "attrs (blark.transform.variabledeclarations attribute)": [[265, "blark.transform.VariableDeclarations.attrs"]], "block_header (blark.transform.variabledeclarations attribute)": [[265, "blark.transform.VariableDeclarations.block_header"]], "from_lark() (blark.transform.variabledeclarations static method)": [[265, "blark.transform.VariableDeclarations.from_lark"]], "items (blark.transform.variabledeclarations attribute)": [[265, "blark.transform.VariableDeclarations.items"]], "meta (blark.transform.variabledeclarations attribute)": [[265, "blark.transform.VariableDeclarations.meta"]], "variablelocationprefix (class in blark.transform)": [[266, "blark.transform.VariableLocationPrefix"]], "input (blark.transform.variablelocationprefix attribute)": [[266, "blark.transform.VariableLocationPrefix.input"]], "memory (blark.transform.variablelocationprefix attribute)": [[266, "blark.transform.VariableLocationPrefix.memory"]], "output (blark.transform.variablelocationprefix attribute)": [[266, "blark.transform.VariableLocationPrefix.output"]], "variableoneinitdeclaration (class in blark.transform)": [[267, "blark.transform.VariableOneInitDeclaration"]], "__init__() (blark.transform.variableoneinitdeclaration method)": [[267, "blark.transform.VariableOneInitDeclaration.__init__"]], "from_lark() (blark.transform.variableoneinitdeclaration method)": [[267, "blark.transform.VariableOneInitDeclaration.from_lark"]], "init (blark.transform.variableoneinitdeclaration attribute)": [[267, "blark.transform.VariableOneInitDeclaration.init"]], "meta (blark.transform.variableoneinitdeclaration attribute)": [[267, "blark.transform.VariableOneInitDeclaration.meta"]], "variables (blark.transform.variableoneinitdeclaration attribute)": [[267, "blark.transform.VariableOneInitDeclaration.variables"]], "variablesizeprefix (class in blark.transform)": [[268, "blark.transform.VariableSizePrefix"]], "bit (blark.transform.variablesizeprefix attribute)": [[268, "blark.transform.VariableSizePrefix.bit"]], "byte (blark.transform.variablesizeprefix attribute)": [[268, "blark.transform.VariableSizePrefix.byte"]], "dword_32 (blark.transform.variablesizeprefix attribute)": [[268, "blark.transform.VariableSizePrefix.dword_32"]], "lword_64 (blark.transform.variablesizeprefix attribute)": [[268, "blark.transform.VariableSizePrefix.lword_64"]], "word_16 (blark.transform.variablesizeprefix attribute)": [[268, "blark.transform.VariableSizePrefix.word_16"]], "whilestatement (class in blark.transform)": [[269, "blark.transform.WhileStatement"]], "__init__() (blark.transform.whilestatement method)": [[269, "blark.transform.WhileStatement.__init__"]], "expression (blark.transform.whilestatement attribute)": [[269, "blark.transform.WhileStatement.expression"]], "from_lark() (blark.transform.whilestatement method)": [[269, "blark.transform.WhileStatement.from_lark"]], "meta (blark.transform.whilestatement attribute)": [[269, "blark.transform.WhileStatement.meta"]], "statements (blark.transform.whilestatement attribute)": [[269, "blark.transform.WhileStatement.statements"]], "_arrayinitialelementcount (class in blark.transform)": [[270, "blark.transform._ArrayInitialElementCount"]], "from_lark() (blark.transform._arrayinitialelementcount static method)": [[270, "blark.transform._ArrayInitialElementCount.from_lark"]], "_barearrayinitialization (class in blark.transform)": [[271, "blark.transform._BareArrayInitialization"]], "__init__() (blark.transform._barearrayinitialization method)": [[271, "blark.transform._BareArrayInitialization.__init__"]], "from_lark() (blark.transform._barearrayinitialization static method)": [[271, "blark.transform._BareArrayInitialization.from_lark"]], "_bracketedarrayinitialization (class in blark.transform)": [[272, "blark.transform._BracketedArrayInitialization"]], "__init__() (blark.transform._bracketedarrayinitialization method)": [[272, "blark.transform._BracketedArrayInitialization.__init__"]], "from_lark() (blark.transform._bracketedarrayinitialization static method)": [[272, "blark.transform._BracketedArrayInitialization.from_lark"]], "_flaghelper (class in blark.transform)": [[273, "blark.transform._FlagHelper"]], "from_lark() (blark.transform._flaghelper class method)": [[273, "blark.transform._FlagHelper.from_lark"]], "_genericinit (class in blark.transform)": [[274, "blark.transform._GenericInit"]], "__init__() (blark.transform._genericinit method)": [[274, "blark.transform._GenericInit.__init__"]], "base_type_name (blark.transform._genericinit attribute)": [[274, "blark.transform._GenericInit.base_type_name"]], "full_type_name (blark.transform._genericinit attribute)": [[274, "blark.transform._GenericInit.full_type_name"]], "repr (blark.transform._genericinit attribute)": [[274, "blark.transform._GenericInit.repr"]], "value (blark.transform._genericinit attribute)": [[274, "blark.transform._GenericInit.value"]], "configure_formatting() (in module blark.transform)": [[275, "blark.transform.configure_formatting"]], "get_grammar_for_class() (in module blark.transform)": [[276, "blark.transform.get_grammar_for_class"]], "indent() (in module blark.transform)": [[277, "blark.transform.indent"]], "indent_if() (in module blark.transform)": [[278, "blark.transform.indent_if"]], "join_if() (in module blark.transform)": [[279, "blark.transform.join_if"]], "merge_comments() (in module blark.transform)": [[280, "blark.transform.merge_comments"]], "meta_field() (in module blark.transform)": [[281, "blark.transform.meta_field"]], "multiline_code_block() (in module blark.transform)": [[282, "blark.transform.multiline_code_block"]], "transform() (in module blark.transform)": [[283, "blark.transform.transform"]], "containsblarkcode (class in blark.typing)": [[284, "blark.typing.ContainsBlarkCode"]], "__init__() (blark.typing.containsblarkcode method)": [[284, "blark.typing.ContainsBlarkCode.__init__"]], "to_blark() (blark.typing.containsblarkcode method)": [[284, "blark.typing.ContainsBlarkCode.to_blark"]], "supportsrewrite (class in blark.typing)": [[285, "blark.typing.SupportsRewrite"]], "__init__() (blark.typing.supportsrewrite method)": [[285, "blark.typing.SupportsRewrite.__init__"]], "rewrite_code() (blark.typing.supportsrewrite method)": [[285, "blark.typing.SupportsRewrite.rewrite_code"]], "supportssavetopath (class in blark.typing)": [[286, "blark.typing.SupportsSaveToPath"]], "__init__() (blark.typing.supportssavetopath method)": [[286, "blark.typing.SupportsSaveToPath.__init__"]], "save_to() (blark.typing.supportssavetopath method)": [[286, "blark.typing.SupportsSaveToPath.save_to"]], "supportswrite (class in blark.typing)": [[287, "blark.typing.SupportsWrite"]], "__init__() (blark.typing.supportswrite method)": [[287, "blark.typing.SupportsWrite.__init__"]], "to_file_contents() (blark.typing.supportswrite method)": [[287, "blark.typing.SupportsWrite.to_file_contents"]], "identifier (class in blark.util)": [[288, "blark.util.Identifier"]], "__init__() (blark.util.identifier method)": [[288, "blark.util.Identifier.__init__"]], "decl_impl (blark.util.identifier attribute)": [[288, "blark.util.Identifier.decl_impl"]], "dotted_name (blark.util.identifier property)": [[288, "blark.util.Identifier.dotted_name"]], "from_string() (blark.util.identifier class method)": [[288, "blark.util.Identifier.from_string"]], "parts (blark.util.identifier attribute)": [[288, "blark.util.Identifier.parts"]], "to_string() (blark.util.identifier method)": [[288, "blark.util.Identifier.to_string"]], "sourcetype (class in blark.util)": [[289, "blark.util.SourceType"]], "action (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.action"]], "dut (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.dut"]], "function (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.function"]], "function_block (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.function_block"]], "general (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.general"]], "get_grammar_rule() (blark.util.sourcetype method)": [[289, "blark.util.SourceType.get_grammar_rule"]], "get_implicit_block_end() (blark.util.sourcetype method)": [[289, "blark.util.SourceType.get_implicit_block_end"]], "interface (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.interface"]], "method (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.method"]], "program (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.program"]], "property (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.property"]], "property_get (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.property_get"]], "property_set (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.property_set"]], "statement_list (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.statement_list"]], "var_global (blark.util.sourcetype attribute)": [[289, "blark.util.SourceType.var_global"]], "find_and_clean_comments() (in module blark.util)": [[290, "blark.util.find_and_clean_comments"]], "find_pou_type_and_identifier() (in module blark.util)": [[291, "blark.util.find_pou_type_and_identifier"]], "fix_case_insensitive_path() (in module blark.util)": [[292, "blark.util.fix_case_insensitive_path"]], "get_file_sha256() (in module blark.util)": [[293, "blark.util.get_file_sha256"]], "get_grammar_for_rule() (in module blark.util)": [[294, "blark.util.get_grammar_for_rule"]], "get_grammar_source() (in module blark.util)": [[295, "blark.util.get_grammar_source"]], "get_source_code() (in module blark.util)": [[296, "blark.util.get_source_code"]], "indent_inner() (in module blark.util)": [[297, "blark.util.indent_inner"]], "maybe_add_brackets() (in module blark.util)": [[298, "blark.util.maybe_add_brackets"]], "python_debug_session() (in module blark.util)": [[299, "blark.util.python_debug_session"]], "rebuild_lark_tree_with_line_map() (in module blark.util)": [[300, "blark.util.rebuild_lark_tree_with_line_map"]], "recursively_remove_keys() (in module blark.util)": [[301, "blark.util.recursively_remove_keys"]], "remove_all_comments() (in module blark.util)": [[302, "blark.util.remove_all_comments"]], "remove_comment_characters() (in module blark.util)": [[303, "blark.util.remove_comment_characters"]], "simplify_brackets() (in module blark.util)": [[304, "blark.util.simplify_brackets"]], "tree_to_xml_source() (in module blark.util)": [[305, "blark.util.tree_to_xml_source"]], "try_paths() (in module blark.util)": [[306, "blark.util.try_paths"]]}}) \ No newline at end of file diff --git a/master/sphinx.html b/master/sphinx.html new file mode 100644 index 0000000..cc21bdf --- /dev/null +++ b/master/sphinx.html @@ -0,0 +1,120 @@ + + + + + + + Sphinx API Docs — blark documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Sphinx API Docs

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/versions.json b/versions.json new file mode 100644 index 0000000..01e7afb --- /dev/null +++ b/versions.json @@ -0,0 +1 @@ +{"folders": ["master"], "default-branch": "master", "labels": {"master": "master"}, "versions": ["master"], "warnings": {"master": ["unreleased"]}, "latest": null, "downloads": {"master": []}} \ No newline at end of file diff --git a/versions.py b/versions.py new file mode 100644 index 0000000..cf372b3 --- /dev/null +++ b/versions.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +"""Recreate the versions.json file. + +Create a temporary virtual environment in .venv, install docs-versions-menu +and run it. The .venv folder is removed unless --keep-venv is given. + +Usage: + + python3 versions.py [OPTIONS] [DVMVERSION] + +OPTIONS: + + --keep-venv Keep the .venv folder after completing the script + --help Display this help + +DVMVERSION: + + By default, the latest stable release of the docs-versions-menu package is + used to generate versions.json. You may give a pip-compatible version + specification, e.g. `docs-versions-menu~=1.0` or + 'git+https://github.com/goerz/docs_versions_menu.git@master#egg=docs_versions_menu' + as the last command line argument to specify another version. The latter + example for using the master version can also be achieved by specifying + `docs-versions-menu==master`. +""" +# This script is intended to be placed in the root of a project's gh-pages +# branch +import os +import shutil +import subprocess +import sys +import venv +from pathlib import Path + + +DOCS_VERSIONS_ENV_VARS = {} # set by docs-versions-menu + +DVM_REPO = 'git+https://github.com/goerz/docs_versions_menu.git' + + +def main(argv=None): + """Recreate the versions.json file.""" + if argv is None: + argv = sys.argv + if '--help' in argv: + print(__doc__) + return 0 + dvm_version = 'docs-versions-menu' + if not argv[-1].endswith('versions.py') and not argv[-1].startswith('--'): + dvm_version = argv.pop() + if dvm_version.endswith('=master'): + dvm_version = DVM_REPO + '@master#egg=docs_versions_menu' + venvdir = Path(__file__).parent / '.venv' + builder = venv.EnvBuilder(with_pip=True) + builder.create(venvdir) + env = DOCS_VERSIONS_ENV_VARS.copy() + env.update(os.environ) # overrides DOCS_VERSIONS_ENV_VARS + try: + subprocess.run( + [Path('.venv') / 'bin' / 'pip', 'install', dvm_version], + cwd=venvdir.parent, + check=True, + ) + subprocess.run( + [Path('.venv') / 'bin' / 'docs-versions-menu', '--debug'], + cwd=venvdir.parent, + check=True, + env=env, + ) + return 0 + except subprocess.CalledProcessError: + return 1 + finally: + if '--keep-venv' not in argv: + if venvdir.is_dir(): + shutil.rmtree(venvdir) + + +if __name__ == "__main__": + sys.exit(main())