Skip to content

Commit

Permalink
build based on c3f27e9
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Dec 2, 2024
1 parent 1f51258 commit e8d3ef1
Show file tree
Hide file tree
Showing 13 changed files with 188 additions and 170 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.11.0","generation_timestamp":"2024-10-18T15:37:52","documenter_version":"1.7.0"}}
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-12-02T19:52:41","documenter_version":"1.8.0"}}
302 changes: 160 additions & 142 deletions dev/assets/documenter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dev/custom/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
)</code></pre><p>Create a <code>CodeGenContext</code> (ctx), a struct that stores options for Automa code generation. Ctxs are used for Automa&#39;s various code generator functions. They currently take the following options (more may be added in future versions)</p><ul><li><code>vars::Variables</code>: variable names used in generated code. See the <code>Variables</code> struct.</li><li><code>generator::Symbol</code>: code generator mechanism (<code>:table</code> or <code>:goto</code>). The table generator creates smaller, simpler code that uses a vector of integers to determine state transitions. The goto-generator uses a maze of <code>@goto</code>-statements, and create larger, more complex code, that is faster.</li><li><code>getbyte::Function</code> (table generator only): function <code>f(data, p)</code> to access byte from data. Default: <code>Base.getindex</code>.</li><li><code>clean</code>: Whether to remove some <code>QuoteNode</code>s (line information) from the generated code</li></ul><p><strong>Example</strong></p><pre><code class="language-julia hljs">julia&gt; ctx = CodeGenContext(generator=:goto, vars=Variables(buffer=:tbuffer));

julia&gt; generate_code(ctx, compile(re&quot;a+&quot;)) isa Expr
true</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/Automa.jl/blob/b08d53b7940af2b81c780f50a98205a0a4e60cf6/src/codegen.jl#L65-L93">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Automa.Variables" href="#Automa.Variables"><code>Automa.Variables</code></a><span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><p>Struct used to store variable names used in generated code. Contained in a <code>CodeGenContext</code>. Create a custom <code>Variables</code> for your <code>CodeGenContext</code> if you want to customize the variables used in Automa codegen, typically if you have conflicting variables with the same name.</p><p>Automa generates code with the following variables, shown below with their default names:</p><ul><li><code>p::Int</code>: current position of data</li><li><code>p_end::Int</code>: end position of data</li><li><code>is_eof::Bool</code>: Whether <code>p_end</code> marks end file stream</li><li><code>cs::Int</code>: current state</li><li><code>data::Any</code>: input data</li><li><code>mem::SizedMemory</code>: Memory wrapping <code>data</code></li><li><code>byte::UInt8</code>: current byte being read from <code>data</code></li><li><code>buffer::TranscodingStreams.Buffer</code>: (<code>generate_reader</code> only)</li></ul><p><strong>Example</strong></p><pre><code class="language-julia hljs">julia&gt; ctx = CodeGenContext(vars=Variables(byte=:u8));
true</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/Automa.jl/blob/c3f27e9903804784c0f91e96403be37e98c2183f/src/codegen.jl#L65-L93">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Automa.Variables" href="#Automa.Variables"><code>Automa.Variables</code></a><span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><p>Struct used to store variable names used in generated code. Contained in a <code>CodeGenContext</code>. Create a custom <code>Variables</code> for your <code>CodeGenContext</code> if you want to customize the variables used in Automa codegen, typically if you have conflicting variables with the same name.</p><p>Automa generates code with the following variables, shown below with their default names:</p><ul><li><code>p::Int</code>: current position of data</li><li><code>p_end::Int</code>: end position of data</li><li><code>is_eof::Bool</code>: Whether <code>p_end</code> marks end file stream</li><li><code>cs::Int</code>: current state</li><li><code>data::Any</code>: input data</li><li><code>mem::SizedMemory</code>: Memory wrapping <code>data</code></li><li><code>byte::UInt8</code>: current byte being read from <code>data</code></li><li><code>buffer::TranscodingStreams.Buffer</code>: (<code>generate_reader</code> only)</li></ul><p><strong>Example</strong></p><pre><code class="language-julia hljs">julia&gt; ctx = CodeGenContext(vars=Variables(byte=:u8));

julia&gt; ctx.vars.byte
:u8</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/Automa.jl/blob/b08d53b7940af2b81c780f50a98205a0a4e60cf6/src/codegen.jl#L4-L29">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../parser/">« Parsing buffers</a><a class="docs-footer-nextpage" href="../io/">Parsing IOs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Friday 18 October 2024 15:37">Friday 18 October 2024</span>. Using Julia version 1.11.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
:u8</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/Automa.jl/blob/c3f27e9903804784c0f91e96403be37e98c2183f/src/codegen.jl#L4-L29">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../parser/">« Parsing buffers</a><a class="docs-footer-nextpage" href="../io/">Parsing IOs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.0 on <span class="colophon-date" title="Monday 2 December 2024 19:52">Monday 2 December 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit e8d3ef1

Please sign in to comment.