Parser-table

Functional parsers

The HTML table above was LLM-generated using the file "Parsers-documentation.md. That file was generated from the source code file "FunctionalParsers.rakumod".

Here is the Raku code used:

use LLM::Funcitons;
use LLM::Prompts;
use Data::Importers;

my $conf4o = llm-configuration('ChatGPT', model => 'gpt-4o', max-tokens => 8192, temperature => 0.4);
my $fileName = '../lib/FunctionalParsers.rakumod';
my $code = data-import($fileName);

text-stats($code)
# (chars => 9092 words => 1154 lines => 324)
my $res = llm-synthesize([
    "You are an expert of the Raku programming language.",
    "You are also an expert of programming and using functional parsers AKA parser combinators.",
    "Generate the documentation of the subs and callable constants in this Raku module code:\n",
    "CODE BEGIN:",
    $code,
    "CODE END",
    llm-prompt('NothingElse')('Markdown')
], e => $conf4o);

text-stats($res)
# (chars => 9923 words => 1403 lines => 379)
my $tbl = llm-synthesize([
    "Turn the following Markdown document into an HTML table with the following columns:",
    "\tType, Symbol, Description, Parameters, Returns",
    "The section names should be in the column 'Type'.",
    "Separate the table into sections corresponding to the 'Type' values.",
    "Within each table section say the 'Type' value only once.",
    "Put the callable or sub names into bold. The names only, not the keywords `sub` and `constant`, or signature arguments.",
    "Please, make sure the columns are properly aligned.",
    $res,
    llm-prompt('NothingElse')('HTML')
],
e => $conf4o);

text-stats($tbl)
# (chars => 11706 words => 1090 lines => 384)

FunctionalParsers v0.1.10

A system of functional parsers (combinators, transformers, generators.)

Authors

  • Anton Antonov

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • FunctionalParsers
  • FunctionalParsers::EBNF
  • FunctionalParsers::EBNF::Actions::Common
  • FunctionalParsers::EBNF::Actions::EBNF::Standard
  • FunctionalParsers::EBNF::Actions::Java::FuncJ
  • FunctionalParsers::EBNF::Actions::MermaidJS::ASTTracer
  • FunctionalParsers::EBNF::Actions::MermaidJS::Common
  • FunctionalParsers::EBNF::Actions::MermaidJS::Graph
  • FunctionalParsers::EBNF::Actions::Raku::AST
  • FunctionalParsers::EBNF::Actions::Raku::Class
  • FunctionalParsers::EBNF::Actions::Raku::ClassAttr
  • FunctionalParsers::EBNF::Actions::Raku::Code
  • FunctionalParsers::EBNF::Actions::Raku::Grammar
  • FunctionalParsers::EBNF::Actions::Raku::Random
  • FunctionalParsers::EBNF::Actions::WL::Code
  • FunctionalParsers::EBNF::Actions::WL::Grammar
  • FunctionalParsers::EBNF::Actions::WL::Graph
  • FunctionalParsers::EBNF::Parser::FromTokens
  • FunctionalParsers::EBNF::Parser::Standard
  • FunctionalParsers::EBNF::Parser::Styled

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.