bqan

Creator: coderz1093

Last updated:

0 purchases

bqan Image
bqan Images

Languages

Categories

Add to Cart

Description:

bqan

bqan #
Basic Query-Answer Notation (pronounced 'Beacon') is an open source data format, for representing a Map (also known as Hashmap or Dictionary), mapping string keys, representing queries, to an list of string values, representing possible answers.
Getting started #
The syntax is really quite simple. You start with your query, surrounded with single quotes. Then, an arrow (->), followed by your answers, seperated with a comma, and ending with a semicolon. Neither line breaks nor spaces matter, so format your document however works best for you. Line and block comments are allowed, using slash style commenting, and embeddeding block comments is allowed (for example '/* /* */ wedgfhjngbfdste4r */' won't throw an error).
Usage #
First import BQAN into your project. Once done, you can now access the 'compile' function and 'CompilerResponse' class.
import 'package:bqan/bqan.dart';

void main(List<String> args) {
const String raw =
"'What is 1/5 of £50?' -> '10', '£10'; 'What is 6 - 2?' -> '4';";
final Map<String, List<String>> compiled = compile(raw);

// outputs { What is 1/5 of £50?: [10, £10], What is 6 - 2?: [4] }
print(compiled.toString());
}
copied to clipboard
License #
bqan is licensed under the MIT license. See LICENSE for more.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.