<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dragan</title>
    <description>The latest articles on DEV Community by Dragan (@draganclappcreator).</description>
    <link>https://dev.to/draganclappcreator</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F987761%2Fbf155e21-113a-4967-9e05-9b26f1754ed8.png</url>
      <title>DEV Community: Dragan</title>
      <link>https://dev.to/draganclappcreator</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/draganclappcreator"/>
    <language>en</language>
    <item>
      <title>Visual AKDL Editor</title>
      <dc:creator>Dragan</dc:creator>
      <pubDate>Fri, 16 Dec 2022 12:59:18 +0000</pubDate>
      <link>https://dev.to/draganclappcreator/visual-akdl-editor-5h72</link>
      <guid>https://dev.to/draganclappcreator/visual-akdl-editor-5h72</guid>
      <description>&lt;p&gt;It all begun with my intention to create a new programming langage called &lt;em&gt;CLApp&lt;/em&gt; (I’ve described in my first post). At the beginning (I’m from the old school), I started with the writing of my own lexer, my own parser and code generator (in C and, later in java), as a colleague of mine suggested to me to use &lt;em&gt;ANTLR&lt;/em&gt;. This should have prevented me from writing that much. Another advantage: if I have to modify something in my language definition, I wouldn’t need to search in the different parts of my code where to adapt it to the new features; ANTLR would re-generate all the stuff for me.&lt;br&gt;
So I tried that, but… my syntax didn’t fit to all ANTLR expectations; I was obliged to adapt my definitions to the tool. And at some time, it was too much and thus I decided to create my own tool that should do the same job as ANTLR but in a way I desire. And &lt;strong&gt;AKDL&lt;/strong&gt; was born.&lt;br&gt;
AKDL means &lt;em&gt;Another Keyword Definition Language&lt;/em&gt;. Its’ main features are listed below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It generates java code&lt;/li&gt;
&lt;li&gt;The generated code, parser and runtime, appears in classes representing the defined keywords; it is stored within packages specified by the syntax designer. In other words, you can structure the whole code that AKDL generates for you.&lt;/li&gt;
&lt;li&gt;Having 1 parsing class per keyword allows you to have as many entry points as keywords. That means you are able to parse snippets and are not obliged to have a complete source of your language to get its corresponding runtime. You can thus use those snippets to deploy them and let them run within an already existing application (as example of use).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Traditionally, to define a keyword, the &lt;strong&gt;EBNF&lt;/strong&gt; (&lt;em&gt;Extended Bachus-Naur Form&lt;/em&gt;) notation is used. In this notation, as you probably know, you have :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Brackets « &lt;strong&gt;[]&lt;/strong&gt; » for the option ; for example, &lt;strong&gt;[a b c]&lt;/strong&gt; means &lt;em&gt;group &lt;strong&gt;(a b c)&lt;/strong&gt; is optional&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Braces « &lt;strong&gt;{}&lt;/strong&gt; » for the quantification ; for example, &lt;strong&gt;{a b c}&lt;/strong&gt; means &lt;em&gt;group &lt;strong&gt;(a b c)&lt;/strong&gt; appears an undefined number n of times (n can be 0)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;The vertical bar symbol « &lt;strong&gt;|&lt;/strong&gt; » is used for the alternative ; for example, &lt;strong&gt;a | b | c&lt;/strong&gt; means &lt;em&gt;only one element out of the group &lt;strong&gt;(a b c)&lt;/strong&gt; will be selected&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It appeared relatively soon that this good old notation won’t fullfill my expectations. The 1st stuff I’ve seen at glance was that point 3 was absolutely not consistent with the 2 others. Another thing I could not accept was that brackets as well as braces had 2 rules at the same time: they were used to group elements AND to apply an operation on them. Moreover, if a group is made of 1 element, you have something like &lt;strong&gt;[a]&lt;/strong&gt; or &lt;strong&gt;{a}&lt;/strong&gt;, which is not a big deal but also not really pretty.&lt;br&gt;
In my case the problem was I needed to add some more operators beside the 3 mentioned above and this notation didn’t really allow me to do it. That’s why I decided to, first, simplify and, then, enhance the EBNF.&lt;br&gt;
The simplification leads to this result:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;[a b c]&lt;/em&gt; is changed to &lt;strong&gt;&lt;em&gt;^(a b c)&lt;/em&gt;&lt;/strong&gt; as well as, &lt;em&gt;[a]&lt;/em&gt; is changed to &lt;strong&gt;&lt;em&gt;^a&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;{a b c}&lt;/em&gt; is changed to &lt;strong&gt;&lt;em&gt;*(a b c)&lt;/em&gt;&lt;/strong&gt; as well as, &lt;em&gt;{a}&lt;/em&gt; is changed to &lt;strong&gt;&lt;em&gt;*a&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;a | b | c&lt;/em&gt; is changed to &lt;strong&gt;&lt;em&gt;+(a b c)&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After having done that, I was able to simply add some new operators. The one I like very much is “&lt;em&gt;in any order you like&lt;/em&gt;” and the used symbol for that is « &lt;strong&gt;&amp;amp;&lt;/strong&gt; ».&lt;br&gt;
Thus, &lt;strong&gt;&lt;em&gt;&amp;amp;(a b c)&lt;/em&gt;&lt;/strong&gt; means: &lt;em&gt;(a b c) | (a c b) | (b a c) | (b c a) | (c a b) | (c b a)&lt;/em&gt;&lt;br&gt;
You can also combine all that. For example:&lt;br&gt;
&lt;strong&gt;&amp;amp;(^a *b c)&lt;/strong&gt; to say &lt;em&gt;a is optional, b appears a certain number of times, c exactly once and the whole in any order you like&lt;/em&gt;. (We have concrete cases in java with modifiers like synchronized, public, static …)&lt;br&gt;
I called this new notation &lt;strong&gt;seeBNF&lt;/strong&gt; (&lt;em&gt;simplified and enhanced EBNF&lt;/em&gt;). It allows you to simply define a language in a tree form starting from a root which is the initial symbol. That’s exactly the way you can create your syntax using the &lt;strong&gt;&lt;em&gt;Visual AKDL Editor&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
Now you know enough about &lt;strong&gt;AKDL&lt;/strong&gt;, I propose you discover how it concretely works through the following tutorials:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=2xLPWlhoGYM"&gt;1st tutorial&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=7KC9MtO9z7U"&gt;2nd tutorial&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=baMcJUqGqIw"&gt;3rd tutorial&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also download the whole stuff and test by yourself (it’s a free open source):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/dragan-clapp-creator/akdl"&gt;&lt;strong&gt;AKDL&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/dragan-clapp-creator/Visual-AKDL-Editor"&gt;&lt;strong&gt;Visual AKDL Editor&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to give me your feedback. Thanks.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Visual CLApp Editor</title>
      <dc:creator>Dragan</dc:creator>
      <pubDate>Sat, 10 Dec 2022 11:21:49 +0000</pubDate>
      <link>https://dev.to/draganclappcreator/visual-clapp-editor-4bob</link>
      <guid>https://dev.to/draganclappcreator/visual-clapp-editor-4bob</guid>
      <description>&lt;p&gt;If you are a Java-developer, &lt;strong&gt;CLApp&lt;/strong&gt; could be interesting to you. The CLApp language is aimed to help you focus on the structure logic of your program. That’s why CLApp is pretty well at ease on simulating flowcharts of different types. The &lt;strong&gt;&lt;em&gt;Visual CLApp Editor&lt;/em&gt;&lt;/strong&gt; I’d like to present here proposes an easy-to-use flowchart designing tool allowing you to combine &lt;em&gt;Activity Diagrams&lt;/em&gt;, &lt;em&gt;Grafcets&lt;/em&gt; and &lt;em&gt;Petri Nets&lt;/em&gt; to let you design more or less complex logic, simulate its flow and export it to let it run from outside of the editor.&lt;/p&gt;

&lt;p&gt;Let’s see some examples to get a concrete idea of it:&lt;/p&gt;

&lt;p&gt;In the following video you can see a tutorial showing a logic all around a 2nd degree equation solving:&lt;br&gt;
 &lt;a href="https://www.youtube.com/watch?v=8LrWEgsRHLc&amp;amp;t=14s"&gt;https://www.youtube.com/watch?v=8LrWEgsRHLc&amp;amp;t=14s&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And in this one, another feature is shown where 2 processes communicate in a client-server mode (the classical ATM-Bank communication example is presented):&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=r74zPH82n14&amp;amp;t=20s"&gt;https://www.youtube.com/watch?v=r74zPH82n14&amp;amp;t=20s&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If those examples made you curious to see more about CLApp (which, by the way, means &lt;em&gt;Cellular Language Approach&lt;/em&gt;) here you have some variations on the classical &lt;em&gt;Hello World&lt;/em&gt; examples:&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=ZnLQs6a5uy0&amp;amp;t=25s"&gt;https://www.youtube.com/watch?v=ZnLQs6a5uy0&amp;amp;t=25s&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you want to test by yourself, please follow the installation instructions shown here:&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=8qM-bO8wubg&amp;amp;t=84s"&gt;https://www.youtube.com/watch?v=8qM-bO8wubg&amp;amp;t=84s&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
