comparison website/src/goodjava.html.luan @ 1703:3a61451f8130

add bbcode video
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 01 Jul 2022 00:12:05 -0600
parents 8066b8882732
children 96dbbdf1e368
comparison
equal deleted inserted replaced
1702:8ad468cc88d4 1703:3a61451f8130
34 } 34 }
35 parser = { 35 parser = {
36 title = "goodjava.parser" 36 title = "goodjava.parser"
37 content = function() 37 content = function()
38 %> 38 %>
39 <p>In computer science, parsing is a big deal. They make it complicated, of course. But it shouldn't be. I developed a new approach to parsing which is implemented <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/parser/">here</a>. It is based on a simple stack of integers that are positions in what is effectively recursive descent parsing. I use this idea to compile Luan but also to parse <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/json/JsonParser.java">JSON</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/lucene/queryparser/GoodQueryParser.java">Lucene queries</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/webserver/RequestParser.java">HTTP requests</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/luan/modules/parsers/BBCode.java">BBCode</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/luan/modules/parsers/Css.java">CSS</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/luan/modules/parsers/Csv.java">CSV</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/luan/modules/parsers/Html.java">HTML</a>, and other things.</p> 39 <p>In computer science, parsing is a big deal. They make it complicated, of course. But it shouldn't be. I developed a new approach to parsing which is implemented <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/parser/">here</a>. It is based on a simple stack of integers that are positions in what is effectively recursive descent parsing. I use this idea to compile Luan but also to parse <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/json/JsonParser.java">JSON</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/lucene/queryparser/GoodQueryParser.java">Lucene queries</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/webserver/RequestParser.java">HTTP requests</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/bbcode/BBCode.java">BBCode</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/luan/modules/parsers/Css.java">CSS</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/luan/modules/parsers/Csv.java">CSV</a>, <a href="https://hg.reactionary.software/repo/luan/file/default/src/luan/modules/parsers/Html.java">HTML</a>, and other things.</p>
40 40
41 <p>When I wrote the <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/json/JsonParser.java">JSON parser</a>, it worked on the first run. It is so much simpler than any other JSON parser. I dare you to look for any JSON parser as simple as this one. All my other parsers are similar. My approach to parsing reflects my anti-modern values. I hate theoretical nonsense and I hate needless complexity. Think deeply about a problem (like parsing) until you see the essence of it. Then write clean simple code to solve the problem.</p> 41 <p>When I wrote the <a href="https://hg.reactionary.software/repo/luan/file/default/src/goodjava/json/JsonParser.java">JSON parser</a>, it worked on the first run. It is so much simpler than any other JSON parser. I dare you to look for any JSON parser as simple as this one. All my other parsers are similar. My approach to parsing reflects my anti-modern values. I hate theoretical nonsense and I hate needless complexity. Think deeply about a problem (like parsing) until you see the essence of it. Then write clean simple code to solve the problem.</p>
42 <% 42 <%
43 end 43 end
44 } 44 }