[fpc-pascal] Free Pascal Language Diagram

Anthony Walter sysrpl at gmail.com
Tue Sep 11 20:49:25 CEST 2018


I posted this link once before, but I thought I'd remind you guys it exists
and ask if anyone would like to take the work from the page, and integrate
it into either the official documentation or maintain it somewhere on the
free  pascal website.

https://www.getlazarus.org/learn/language/lexical/

The diagrams are pretty easy to create and edit. For example proecudre
header is defined through a script tag on the page as follows:

  <script>
    Schematic(
      Link('Identifier', '#identifier'),
      Optional(Link('Generic Block', '#generic_block')),
      Optional(Link('Parameters', '#parameters')),
      Keyword(':'),
      Link('Identifier Dot', '#identifier_dot'),
      Keyword(';'),
      Optional(Link('Function Directives', '#function_directives'))
    ).render();
  </script>


And renders like so:

https://www.getlazarus.org/learn/language/lexical/#function_header

To use just copy this css and script file on the any page you want to
display diagrams:

<link rel="stylesheet" type="test/stylesheet" href="//
cache.getlazarus.org/styles/schematic.css">
<script src="//cache.getlazarus.org/scripts/schematic.js"></script>

You can look at the source of the page to see exactly what Schematic()
commands are given to generate each diagram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180911/63e07777/attachment.html>


More information about the fpc-pascal mailing list