From 5be0e39d0ce97849d7722bd1ac98563c7014faf3 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Sun, 8 Nov 2026 11:19:44 +0300 Subject: publish --- README.org | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 README.org (limited to 'README.org') diff --git a/README.org b/README.org new file mode 100644 index 0000000..347a060 --- /dev/null +++ b/README.org @@ -0,0 +1,130 @@ +#+title: Grammar with semantics +#+subtitle: Random-art generation +#+date: 2025H1 + +* Overview +:PROPERTIES: +:CUSTOM_ID: overview +:END: +- Augmented a standard context-free BNF grammar with production rule + weights (probabilities) to control expression generation density and + visual aesthetics. +- Optimized and left-factorized the extended grammar to ensure + compatibility with deterministic parsing methods. +- Implemented a custom C-based lexer and recursive descent parser to + process rules, terminals, nonterminals, and probabilities. +- Engineered a stochastic expansion algorithm with depth thresholding + to synthesize complex GLSL fragment shaders driven by screen + coordinates, mouse input, and time. +- Configured distinct semantic weight profiles to generate varying + aesthetic styles (smooth vs. noise-heavy procedural patterns). +- Developed a custom GNU Emacs major mode (=bnf-mode.el=) for editing + BNF grammars. + +* Documentation +:PROPERTIES: +:CUSTOM_ID: documentation +:END: +The exported report can be found at [[https://git.michalec.dev/files/uni/term-06/math-logic/lab-05/report.pdf][this link]]. + +* Showcase +:PROPERTIES: +:CUSTOM_ID: showcase +:END: +** Example 1 +:PROPERTIES: +:CUSTOM_ID: example-1 +:UNNUMBERED: toc +:END: +*Input:* +#+begin_src bnf + ::= | 0 "-" | 10 | | 0 "abs(" ")" | "sqrt(abs(" "))" + ::= | 2 |