Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revive web/jison to see if there is anything useful #157

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions web/content/assets/styles/try.css
Expand Up @@ -5,13 +5,6 @@ a img { border: 0px; }
width: 100%;
}

#intro {
font-size: 2em;
-moz-border-radius: 8px;
background-color: #eee;
}
#intro p { margin: 1em 1em; padding: 1em 0em; }

#table table, #productions li, #nonterminals dl {
font-family: monospace;
}
Expand Down
7 changes: 0 additions & 7 deletions web/content/assets/styles/usf.css
Expand Up @@ -5,13 +5,6 @@ a img { border: 0px; }
width: 100%;
}

#intro {
font-size: 2em;
-moz-border-radius: 8px;
background-color: #eee;
}
#intro p { margin: 1em 1em; padding: 1em 0em; }

#table table, #productions li, #nonterminals dl {
font-family: monospace;
}
Expand Down
8 changes: 4 additions & 4 deletions web/content/try/usf.html
Expand Up @@ -23,7 +23,7 @@ <h2>Input</h2>
<p>
Load an example:
<select id="examples">
<option value="basic.jison" selected="true">Basic</option>
<option value="basic.jison" selected="selected">Basic</option>
<option value="basic2.jison">Basic #2</option>
<option value="dism.jison">DISM</option>
<option value="dism_lr0.jison">DISM in LR(0)</option>
Expand Down Expand Up @@ -72,13 +72,13 @@ <h2>Parse a program</h2>
<textarea id="source" rows="8" cols="80"></textarea><br/>
<button id="parse_btn">Parse source</button>
<h3>Result</h3>
<textarea id="out" readonly="true" rows="5" cols="80"/></textarea>
<textarea id="out" readonly="readonly" rows="5" cols="80"></textarea>
</div>

<div id="loading"></div>

<p>
<small><i>Zach Carter (zcarter@mail.usf.edu) 2009</i><small>
<small><i>Zach Carter (zcarter@mail.usf.edu) 2009</i></small>
</p>

</div>
Expand All @@ -89,4 +89,4 @@ <h3>Result</h3>
<script src="/jison/assets/js/jison.js"></script>
<script src="/jison/assets/js/usf.js"></script>
</body>
</head>
</html>
95 changes: 6 additions & 89 deletions web/jison/index.html
@@ -1,100 +1,17 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Jison, parse table visualation page</title>
<title>Jison, parse table visualation pages</title>

<script src="../js/jquery-1.4.2.min.js"></script>
<script src="../js/json2.js"></script>
<script src="../js/es5.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/lexer.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/util/typal.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/util/set.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/util/bnf-parser.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/bnf.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison.js"></script>
<script src="main.js"></script>

<link href="../style/main.css" type="text/css" rel="stylesheet" media="screen" />

</head>

<body>
<div id="container">
<div id="intro">
<p><a href="http://github.com/zaach/jison/">Jison</a> is a parser generator written in JavaScript. This page uses Jison to display an interactive parsing table based on the grammar and parsing algorithm chosen, which can be very helpful for debugging.</p>
<div id="container">
<a href="usf.html">[usf]</a> | <a href="states.html">[states]</a>
</div>
<p> Special thanks to <a href="http://www.cse.usf.edu/~ligatti/">Dr. Ligatti</a> for suggesting and giving feedback on the initial interface.<br /></p>

<h2>Input</h2>

<p>Input a <a href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">BNF</a> grammar along with a token list and optional start symbol, in <a href="http://json.org/">JSON</a> format.
</p>

<p>
Load an example:
<select id="examples">
<option value="basic.jison" selected="true">Basic</option>
<option value="basic2.jison">Basic #2</option>
<option value="dism.jison">DISM</option>
<option value="dism_lr0.jison">DISM in LR(0)</option>
<option value="precedence.jison">Precedence operators</option>
<option value="reduce_conflict.jison">Reduce-Reduce conflict</option>
<option value="ansic.jison">ANSI C</option>
</select>
</p>

<textarea id="grammar" rows="20" cols="80">
%%

E
: E PLUS T
| T
;

T
: ZERO
;
</textarea>

<p>
Parser type: <select id="type">
<option value="lr0">LR(0)</option>
<option value="slr">SLR(1)</option>
<option value="lalr">LALR(1)</option>
<option value="lr">LR(1)</option>
<option value="ll">LL(1)</option>
</select>
<small>* WARNING: LR(1) may take considerable time to execute for large/ambigous grammars.</small>
</p>
<p><button id="process_btn">Process Grammar</button>
</p>


<h2>Output</h2>
<div id="nonterminals"><p>Process your grammar to see the result here.</p></div>
<div id="productions"></div>
<div id="table"></div>


<div id="parsing">
<h2>Parse a program</h2>
<p>Grammars with lexing information allow for parsing. Use the form below to parse a program using your grammar:</p>
<textarea id="source" rows="8" cols="80"></textarea><br/>
<button id="parse_btn">Parse source</button>
<h3>Result</h3>
<textarea id="out" readonly="true" rows="5" cols="80"/></textarea>
</div>

<div id="loading"></div>

<p>
<small><i>Zach Carter (zcarter@mail.usf.edu) 2009</i><small>
</p>

</div>
</body>
</head>
</html>
28 changes: 15 additions & 13 deletions web/jison/states.html
Expand Up @@ -7,18 +7,20 @@

<title>Jison, parse table visualation page</title>

<script src="../js/excanvas.compiled.js"></script>
<script src="../js/jquery-1.4.2.min.js"></script>
<script src="../js/jquery-ui-1.7.2.min.js"></script>
<script src="../js/jsPlumb-0.0.3-min.js"></script>
<script src="http://github.com/zaach/jison/raw/master/json2.js"></script>
<script src="http://github.com/zaach/jison/raw/master/es5.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/lexer.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/util/typal.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/util/set.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/util/bnf-parser.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/bnf.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison.js"></script>
<script src="http://explorercanvas.googlecode.com/svn-history/r48/tags/m3/excanvas.compiled.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/jquery.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<script src="https://raw.github.com/sporritt/jsPlumb/master/archive/jsPlumb-0.0.3-min.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/json2.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/es5.js"></script>

<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/lexer.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/util/typal.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/util/set.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/util/bnf-parser.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/bnf.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison.js"></script>

<script>
function run () {
var parser = buildGrammar($("#grammar").val());
Expand Down Expand Up @@ -110,4 +112,4 @@

</div>
</body>
</head>
</html>
35 changes: 18 additions & 17 deletions web/jison/usf.html
Expand Up @@ -7,15 +7,16 @@

<title>Jison, parse table visualation page</title>

<script src="../js/jquery-1.4.2.min.js"></script>
<script src="../js/json2.js"></script>
<script src="../js/es5.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/lexer.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/util/typal.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/util/set.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/util/bnf-parser.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison/bnf.js"></script>
<script src="http://github.com/zaach/jison/raw/master/lib/jison.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/jquery.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/json2.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/es5.js"></script>

<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/lexer.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/util/typal.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/util/set.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/util/bnf-parser.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison/bnf.js"></script>
<script src="http://github.com/zaach/jison/raw/master/web/content/assets/js/lib/jison.js"></script>
<script src="main.js"></script>

<link href="../style/main.css" type="text/css" rel="stylesheet" media="screen" />
Expand All @@ -24,19 +25,19 @@

<body>
<div id="container">
<h2>Jison</h2>
<p><a href="http://github.com/zaach/jison/">Jison</a> is a parser generator written in JavaScript. This page uses Jison to display an interactive parsing table based on the grammar and parsing algorithm chosen, which can be very helpful for debugging.</p>
<p> Special thanks to <a href="http://www.cse.usf.edu/~ligatti/">Dr. Ligatti</a> for suggesting and giving feedback on the interface.<br /> <a href="http://www.cse.usf.edu" id="usf_logo"><img src="../style/usf.jpg" alt="USF" /></a> </p>
<p><a href="http://github.com/zaach/jison/">Jison</a> is a parser generator written in JavaScript. This page uses Jison to display an interactive parsing table based on the grammar and parsing algorithm chosen, which can be very helpful for debugging.</p>
<p> Special thanks to <a href="http://www.cse.usf.edu/~ligatti/">Dr. Ligatti</a> for suggesting and giving feedback on the initial interface.<br /></p>
<p> <a href="http://www.cse.usf.edu" id="usf_logo"><img src="../content/assets/styles/usflogo.jpg" alt="USF" /></a> </p>

<h2>Input</h2>

<p>Input a <a href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">BNF</a> grammar along with a token list and optional start symbol, in <a href="httphttp://github.com/zaach/jison/raw/masteron.org/">JSON</a> format.
<p>Input a <a href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">BNF</a> grammar along with a token list and optional start symbol, in <a href="http://json.org/">JSON</a> format.
</p>

<p>
Load an example:
<select id="examples">
<option value="basic.jison" selected="true">Basic</option>
<option value="basic.jison" selected="selected">Basic</option>
<option value="basic2.jison">Basic #2</option>
<option value="dism.jison">DISM</option>
<option value="dism_lr0.jison">DISM in LR(0)</option>
Expand Down Expand Up @@ -85,15 +86,15 @@ <h2>Parse a program</h2>
<textarea id="source" rows="8" cols="80"></textarea><br/>
<button id="parse_btn">Parse source</button>
<h3>Result</h3>
<textarea id="out" readonly="true" rows="5" cols="80"/></textarea>
<textarea id="out" readonly="readonly" rows="5" cols="80"></textarea>
</div>

<div id="loading"></div>

<p>
<small><i>Zach Carter (zcarter@mail.usf.edu) 2009</i><small>
<small><i>Zach Carter (zcarter@mail.usf.edu) 2009</i></small>
</p>

</div>
</body>
</head>
</html>