-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d9dbddc
Showing
254 changed files
with
118,788 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
/** | ||
* Convert between Uint8Array and Base64 strings | ||
* Allows for any encoded JS string to be converted (as opposed to atob()/btoa() which only supports latin1) | ||
* | ||
* Original implementation by madmurphy on MDN | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_1_–_JavaScript%27s_UTF-16_%3E_base64 | ||
*/ | ||
|
||
function b64ToUint6(nChr) { | ||
return nChr > 64 && nChr < 91 | ||
? nChr - 65 | ||
: nChr > 96 && nChr < 123 | ||
? nChr - 71 | ||
: nChr > 47 && nChr < 58 | ||
? nChr + 4 | ||
: nChr === 43 | ||
? 62 | ||
: nChr === 47 | ||
? 63 | ||
: 0 | ||
} | ||
|
||
export function decodeToArray(base64string, blockSize) { | ||
var sB64Enc = base64string.replace(/[^A-Za-z0-9\+\/]/g, ''), | ||
nInLen = sB64Enc.length, | ||
nOutLen = blockSize | ||
? Math.ceil(((nInLen * 3 + 1) >>> 2) / blockSize) * blockSize | ||
: (nInLen * 3 + 1) >>> 2, | ||
aBytes = new Uint8Array(nOutLen) | ||
|
||
for ( | ||
var nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; | ||
nInIdx < nInLen; | ||
nInIdx++ | ||
) { | ||
nMod4 = nInIdx & 3 | ||
nUint24 |= b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << (18 - 6 * nMod4) | ||
if (nMod4 === 3 || nInLen - nInIdx === 1) { | ||
for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) { | ||
aBytes[nOutIdx] = (nUint24 >>> ((16 >>> nMod3) & 24)) & 255 | ||
} | ||
nUint24 = 0 | ||
} | ||
} | ||
|
||
return aBytes | ||
} | ||
|
||
function uint6ToB64(nUint6) { | ||
return nUint6 < 26 | ||
? nUint6 + 65 | ||
: nUint6 < 52 | ||
? nUint6 + 71 | ||
: nUint6 < 62 | ||
? nUint6 - 4 | ||
: nUint6 === 62 | ||
? 43 | ||
: nUint6 === 63 | ||
? 47 | ||
: 65 | ||
} | ||
|
||
export function encodeFromArray(bytes) { | ||
var eqLen = (3 - (bytes.length % 3)) % 3, | ||
sB64Enc = '' | ||
|
||
for ( | ||
var nMod3, nLen = bytes.length, nUint24 = 0, nIdx = 0; | ||
nIdx < nLen; | ||
nIdx++ | ||
) { | ||
nMod3 = nIdx % 3 | ||
/* Uncomment the following line in order to split the output in lines 76-character long: */ | ||
/* | ||
if (nIdx > 0 && (nIdx * 4 / 3) % 76 === 0) { sB64Enc += "\r\n"; } | ||
*/ | ||
nUint24 |= bytes[nIdx] << ((16 >>> nMod3) & 24) | ||
if (nMod3 === 2 || bytes.length - nIdx === 1) { | ||
sB64Enc += String.fromCharCode( | ||
uint6ToB64((nUint24 >>> 18) & 63), | ||
uint6ToB64((nUint24 >>> 12) & 63), | ||
uint6ToB64((nUint24 >>> 6) & 63), | ||
uint6ToB64(nUint24 & 63) | ||
) | ||
nUint24 = 0 | ||
} | ||
} | ||
|
||
return eqLen === 0 | ||
? sB64Enc | ||
: sB64Enc.substring(0, sB64Enc.length - eqLen) + (eqLen === 1 ? '=' : '==') | ||
} | ||
|
||
/** | ||
* URL-safe variants of Base64 conversion functions (aka base64url) | ||
* @see https://tools.ietf.org/html/rfc4648#section-5 | ||
*/ | ||
|
||
export function encodeFromArrayUrlSafe(bytes) { | ||
return encodeURIComponent( | ||
encodeFromArray(bytes) | ||
.replace(/\+/g, '-') | ||
.replace(/\//g, '_') | ||
) | ||
} | ||
|
||
export function decodeToArrayUrlSafe(base64string) { | ||
return decodeToArray( | ||
decodeURIComponent(base64string) | ||
.replace(/-/g, '+') | ||
.replace(/_/g, '/') | ||
) | ||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
window.ALL_CRATES = ["egglog"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-fa3bb1812debf86c.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="egglog" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0 (79e9716c9 2023-11-13)" data-channel="1.74.0" data-search-js="search-8be46b629f5f14a8.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="../static.files/main-c5bd66d33317d69f.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../egglog/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a></nav><nav class="sidebar"><a class="logo-container" href="../egglog/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Crate egglog</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li><li><a href="#types">Type Aliases</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.EGraph.html">EGraph</a></li><li><a href="struct.Function.html">Function</a></li><li><a href="struct.NotFoundError.html">NotFoundError</a></li><li><a href="struct.Primitive.html">Primitive</a></li><li><a href="struct.RunReport.html">RunReport</a></li><li><a href="struct.SerializeConfig.html">SerializeConfig</a></li><li><a href="struct.SimplePrimitive.html">SimplePrimitive</a></li><li><a href="struct.TermDag.html">TermDag</a></li><li><a href="struct.TypeInfo.html">TypeInfo</a></li><li><a href="struct.Value.html">Value</a></li><li><a href="ast/struct.CorrespondingVar.html">ast::CorrespondingVar</a></li><li><a href="ast/struct.DUMMY_FILE.html">ast::DUMMY_FILE</a></li><li><a href="ast/struct.DUMMY_SPAN.html">ast::DUMMY_SPAN</a></li><li><a href="ast/struct.Facts.html">ast::Facts</a></li><li><a href="ast/struct.GenericActions.html">ast::GenericActions</a></li><li><a href="ast/struct.GenericFunctionDecl.html">ast::GenericFunctionDecl</a></li><li><a href="ast/struct.GenericRewrite.html">ast::GenericRewrite</a></li><li><a href="ast/struct.GenericRule.html">ast::GenericRule</a></li><li><a href="ast/struct.GenericRunConfig.html">ast::GenericRunConfig</a></li><li><a href="ast/struct.Id.html">ast::Id</a></li><li><a href="ast/struct.IdentSort.html">ast::IdentSort</a></li><li><a href="ast/struct.Location.html">ast::Location</a></li><li><a href="ast/struct.ResolvedVar.html">ast::ResolvedVar</a></li><li><a href="ast/struct.Schema.html">ast::Schema</a></li><li><a href="ast/struct.Span.html">ast::Span</a></li><li><a href="ast/struct.SrcFile.html">ast::SrcFile</a></li><li><a href="ast/struct.Symbol.html">ast::Symbol</a></li><li><a href="ast/struct.Variant.html">ast::Variant</a></li><li><a href="ast/desugar/struct.Desugar.html">ast::desugar::Desugar</a></li><li><a href="ast/parse/struct.ActionParser.html">ast::parse::ActionParser</a></li><li><a href="ast/parse/struct.ExprParser.html">ast::parse::ExprParser</a></li><li><a href="ast/parse/struct.FactParser.html">ast::parse::FactParser</a></li><li><a href="ast/parse/struct.ProgramParser.html">ast::parse::ProgramParser</a></li><li><a href="constraint/struct.AllEqualTypeConstraint.html">constraint::AllEqualTypeConstraint</a></li><li><a href="constraint/struct.Problem.html">constraint::Problem</a></li><li><a href="constraint/struct.SimpleTypeConstraint.html">constraint::SimpleTypeConstraint</a></li><li><a href="sort/struct.BoolSort.html">sort::BoolSort</a></li><li><a href="sort/struct.EqSort.html">sort::EqSort</a></li><li><a href="sort/struct.F64Sort.html">sort::F64Sort</a></li><li><a href="sort/struct.FunctionSort.html">sort::FunctionSort</a></li><li><a href="sort/struct.I64Sort.html">sort::I64Sort</a></li><li><a href="sort/struct.MapSort.html">sort::MapSort</a></li><li><a href="sort/struct.NotEqualPrimitive.html">sort::NotEqualPrimitive</a></li><li><a href="sort/struct.RationalSort.html">sort::RationalSort</a></li><li><a href="sort/struct.SetSort.html">sort::SetSort</a></li><li><a href="sort/struct.StringSort.html">sort::StringSort</a></li><li><a href="sort/struct.UnitSort.html">sort::UnitSort</a></li><li><a href="sort/struct.VecSort.html">sort::VecSort</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="enum.Error.html">Error</a></li><li><a href="enum.ExtractReport.html">ExtractReport</a></li><li><a href="enum.RunMode.html">RunMode</a></li><li><a href="enum.SerializedNode.html">SerializedNode</a></li><li><a href="enum.Term.html">Term</a></li><li><a href="ast/enum.Change.html">ast::Change</a></li><li><a href="ast/enum.GenericAction.html">ast::GenericAction</a></li><li><a href="ast/enum.GenericCommand.html">ast::GenericCommand</a></li><li><a href="ast/enum.GenericExpr.html">ast::GenericExpr</a></li><li><a href="ast/enum.GenericFact.html">ast::GenericFact</a></li><li><a href="ast/enum.GenericNCommand.html">ast::GenericNCommand</a></li><li><a href="ast/enum.GenericSchedule.html">ast::GenericSchedule</a></li><li><a href="ast/enum.Literal.html">ast::Literal</a></li><li><a href="ast/enum.Quote.html">ast::Quote</a></li><li><a href="constraint/enum.Constraint.html">constraint::Constraint</a></li><li><a href="constraint/enum.ConstraintError.html">constraint::ConstraintError</a></li><li><a href="constraint/enum.ImpossibleConstraint.html">constraint::ImpossibleConstraint</a></li></ul><h3 id="traits">Traits</h3><ul class="all-items"><li><a href="trait.PrimitiveLike.html">PrimitiveLike</a></li><li><a href="ast/trait.ToSexp.html">ast::ToSexp</a></li><li><a href="ast/parse/trait.__ToTriple.html">ast::parse::__ToTriple</a></li><li><a href="constraint/trait.TypeConstraint.html">constraint::TypeConstraint</a></li><li><a href="sort/trait.FromSort.html">sort::FromSort</a></li><li><a href="sort/trait.IntoSort.html">sort::IntoSort</a></li><li><a href="sort/trait.Sort.html">sort::Sort</a></li></ul><h3 id="macros">Macros</h3><ul class="all-items"><li><a href="macro.add_primitives.html">add_primitives</a></li><li><a href="macro.match_term_app.html">match_term_app</a></li><li><a href="macro.to_tt.html">to_tt</a></li><li><a href="macro.unpack.html">unpack</a></li></ul><h3 id="types">Type Aliases</h3><ul class="all-items"><li><a href="type.ArcSort.html">ArcSort</a></li><li><a href="type.Subst.html">Subst</a></li><li><a href="type.TermId.html">TermId</a></li><li><a href="ast/type.Action.html">ast::Action</a></li><li><a href="ast/type.Actions.html">ast::Actions</a></li><li><a href="ast/type.Command.html">ast::Command</a></li><li><a href="ast/type.Expr.html">ast::Expr</a></li><li><a href="ast/type.Fact.html">ast::Fact</a></li><li><a href="ast/type.FunctionDecl.html">ast::FunctionDecl</a></li><li><a href="ast/type.NCommand.html">ast::NCommand</a></li><li><a href="ast/type.Rule.html">ast::Rule</a></li><li><a href="ast/type.RunConfig.html">ast::RunConfig</a></li><li><a href="ast/type.Schedule.html">ast::Schedule</a></li><li><a href="ast/type.Subsume.html">ast::Subsume</a></li><li><a href="sort/type.PreSort.html">sort::PreSort</a></li><li><a href="util/type.IndexMap.html">util::IndexMap</a></li><li><a href="util/type.IndexSet.html">util::IndexSet</a></li></ul><h3 id="constants">Constants</h3><ul class="all-items"><li><a href="constant.HIGH_COST.html">HIGH_COST</a></li><li><a href="constant.UNIT_SYM.html">UNIT_SYM</a></li><li><a href="ast/constant.DEFAULT_FILENAME.html">ast::DEFAULT_FILENAME</a></li><li><a href="ast/constant.DUMMY_FILENAME.html">ast::DUMMY_FILENAME</a></li></ul></section></div></main></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `DEFAULT_FILENAME` constant in crate `egglog`."><title>DEFAULT_FILENAME in egglog::ast - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-fa3bb1812debf86c.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="egglog" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0 (79e9716c9 2023-11-13)" data-channel="1.74.0" data-search-js="search-8be46b629f5f14a8.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-c5bd66d33317d69f.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../egglog/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a></nav><nav class="sidebar"><a class="logo-container" href="../../egglog/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In egglog::ast</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">egglog</a>::<wbr><a href="index.html">ast</a>::<wbr><a class="constant" href="#">DEFAULT_FILENAME</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/egglog/ast/mod.rs.html#60">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const DEFAULT_FILENAME: &<a class="primitive" href="https://doc.rust-lang.org/1.74.0/std/primitive.str.html">str</a> = "<unnamed.egg>";</code></pre></section></div></main></body></html> |
Oops, something went wrong.