yes_parser 1.0.1 copy "yes_parser: ^1.0.1" to clipboard
yes_parser: ^1.0.1 copied to clipboard

Dart implementation of the YES scriplet standard. YES is a meta scriptlet standard whose elements and meaning are customized by the programmer. This library parses files using the YES spec and deliver [...]

YES Script #

YES - Your Extensible Script .

YES is a meta scriptlet standard whose elements and meaning are determined by YOU the programmer. They can be extended further with attributes which allow YOUR end-users to make their additions to YOUR elements.

Getting Started #

The dart API provides two constructors: parsing by file or parsing by string. These constructors require the callback function to be set via .onComplete(...).

Loading by file is asynchronous and must be waited on for completion

void main() async {
  final p = YesParser.fromFile(File.fromUri(Uri.file("example.mesh")), onComplete: onComplete);

  // Wait for parser to finish before ending program
  await p.join();
}

void onComplete(List<ElementInfo> elements, List<ErrorInfo> errors) { ... }

Loading by string is synchronous and can be used immediately.

void main() {
  final p = YesParser.fromFile("...", onComplete: onComplete);
}

void onComplete(List<ElementInfo> elements, List<ErrorInfo> errors) { ... }

See the example to learn how to access element types and their data from a mesh file format which uses the YES scriplet spec.

License #

This project is licensed under the Common Development and Distribution License (CDDL).

2
likes
0
points
76
downloads

Publisher

unverified uploader

Weekly Downloads

Dart implementation of the YES scriplet standard. YES is a meta scriptlet standard whose elements and meaning are customized by the programmer. This library parses files using the YES spec and delivers the result as elements. Use the KeyVal args passed into each element to provide external functionality to their own software easily and quickly at no cost to readability or flexibility. It is a format for everyone.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on yes_parser