Skip to content

Commit

Permalink
build based on c91a193
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Jul 19, 2023
1 parent a3d730c commit b6292f8
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions previews/PR119/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">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/7069156b7b70a9675c2983cf08ad411660f32a22/src/codegen.jl#L65-L93">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Automa.Variables" href="#Automa.Variables"><code>Automa.Variables</code></a><span class="docstring-category">Type</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">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/c91a1933def891cefdd98a6ae1dbcb6a8d9255f8/src/codegen.jl#L65-L93">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Automa.Variables" href="#Automa.Variables"><code>Automa.Variables</code></a><span class="docstring-category">Type</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">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/7069156b7b70a9675c2983cf08ad411660f32a22/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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 19 July 2023 06:14">Wednesday 19 July 2023</span>. Using Julia version 1.9.2.</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/c91a1933def891cefdd98a6ae1dbcb6a8d9255f8/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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 19 July 2023 07:07">Wednesday 19 July 2023</span>. Using Julia version 1.9.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion previews/PR119/debugging/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@
println(io, machine2dot(machine))
end
# Requires graphviz to be installed
run(pipeline(`dot -Tsvg /tmp/machine.dot`), stdout=&quot;/tmp/machine.svg&quot;)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/Automa.jl/blob/7069156b7b70a9675c2983cf08ad411660f32a22/src/dot.jl#L42-L57">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../reader/">« Creating readers</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 19 July 2023 06:14">Wednesday 19 July 2023</span>. Using Julia version 1.9.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
run(pipeline(`dot -Tsvg /tmp/machine.dot`), stdout=&quot;/tmp/machine.svg&quot;)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/BioJulia/Automa.jl/blob/c91a1933def891cefdd98a6ae1dbcb6a8d9255f8/src/dot.jl#L42-L57">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../reader/">« Creating readers</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 19 July 2023 07:07">Wednesday 19 July 2023</span>. Using Julia version 1.9.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion previews/PR119/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
(headers, reshape(fields, length(headers), :))
end

header, data = parse_tsv(&quot;a\tabc\n12\t13\r\nxyc\tz\n\n&quot;)</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="theory/">Theory »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 19 July 2023 06:14">Wednesday 19 July 2023</span>. Using Julia version 1.9.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
header, data = parse_tsv(&quot;a\tabc\n12\t13\r\nxyc\tz\n\n&quot;)</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="theory/">Theory »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 19 July 2023 07:07">Wednesday 19 July 2023</span>. Using Julia version 1.9.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit b6292f8

Please sign in to comment.