Skip to content

Instantly share code, notes, and snippets.

@nathanathan
Created August 31, 2012 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanathan/3549496 to your computer and use it in GitHub Desktop.
Save nathanathan/3549496 to your computer and use it in GitHub Desktop.
{
"category": "help",
"components": [
"want", "delimiters",
"create synonyms", "delimiters",
{"terminal": "a language node"},
{"regex": ".*"}
]
}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Widget</title>
<style>
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
$('.example').hide();
$('.showExample').click(function(evt){
$(this).hide();
$('.example').show();
});
});
</script>
</head>
<body>
<p>You can add language nodes by submiting gists that describe them.</p>
<p>Language nodes require the following components.</p>
<ol>
<li>A category name. (You can think of a category as a non-terminal node in a CFG.)</li>
<li>An ordered list of component categories and/or terminals to parse queries with.</li>
<li>A document or function for creating the node's UI element.</li>
</ol>
<center>
<form action="submitGist.html">
<label>Enter a gist url:</label>
<input style="width:40em"></input>
<button>submit</button>
</form>
<button class="showExample">Show example gist</button>
</center>
<div class="example">
<script src="https://gist.github.com/3549496.js"></script>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment