Permalink
Browse files

backup

got multiple lite port views in a single html page.
hovering over a rule in the parse tree should hilite the reduced text.
It is broken, well, never worked.

removed p6 presentation draft that I dumped in a hurry for eiro
  • Loading branch information...
cognominal committed Jul 5, 2012
1 parent 414d69e commit 309905982b83d230208c0b17539d98aceb9ae953
Showing with 251 additions and 852 deletions.
  1. +39 −12 css/zbrew.css
  2. +22 −4 i.html
  3. +87 −91 js/LiteViewport.js
  4. +0 −284 p6.text
  5. +0 −284 p6.txt
  6. +102 −83 src/LiteViewport.coffee
  7. +0 −39 src/hi.coffee
  8. +0 −54 src/hilite.js
  9. +1 −1 t
View
@@ -1,4 +1,19 @@
-.parse-path {
+.liteViewport {
+ border-width: 2px;
+ border-color : #A0A0A0;
+ border-style: solid;
+}
+
+div.text {
+ margin-top: 4em;
+ margin-bottom: 4em;
+ font-size:11px;
+ font-family: arial, helvetica, geneva, 'sans-serif';
+ line-height:15px;
+
+}
+
+.parsePathPane {
border-width : 4px;
min-height : 15ex;
overflow: scroll;
@@ -14,24 +29,36 @@
box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}
-.opr { color: #ff0000 }
-.opd :not(.opr) { color: #0000ff }
-.current-item { background-color : #FF8; }
+.currentRulePane {
+ height: 2em;
+ background-color: #E0E0E0;
+ border-width: 2px;
+ border-color : #A0A0A0;
+ border-style: solid;
-#offset-content {
- height: 100px;
}
-.parse-crumb {
- padding: 4px;
+.codePane {
+ background-color: #E0E0E0;
+/* border-width: 2px;
+ border-color : #A0A0A0;
+ border-style: solid;
+*/
}
-.parsePathSubcomponent:hover {
+.opr { color: #ff0000 }
+.opd :not(.opr) { color: #0000ff }
+.hilitedRuleNm { background-color : #FF8; }
+.DHReducedCode { background-color : #FF8; }
+
+.parsePathItem { padding: 4px; }
+
+.parsePathSubItem:hover {
/* padding: 4px;*/
background-color : #BBB
}
-.parsePathSubcomponent {
+.parsePathSubItem {
display: block;
}
@@ -60,8 +87,8 @@
/*--------------------- Layout and Typography ----------------------------*/
body { /* probably need to select further */
font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
- font-size: 15px;
- line-height: 22px;
+ font-size: 11px;
+ line-height: 15px;
color: #252519;
margin: 0; padding: 0;
}
View
26 i.html
@@ -1,13 +1,31 @@
+<!doctype html>
<html>
<head>
-<title>Code Hiliter</title>
+<title>Code Hiliter Early </title>
<link rel="stylesheet" type="text/css" href="css/zbrew.css"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.1.0.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
-<script type="text/javascript" src="js/hilite.js"></script>
+<script type="text/javascript" src="js/liteViewport.js"></script>
</head>
<body>
- <div id="viewport">
+<div class="text">
+ <p>A lite portview has three panes when it is expanded. The lower pane contains code and the two
+ top panes contain information about how that code is parsed. When you hover over the code the information displayed over the two top panes changes, as well as the dynamic highlighting in the code pane. We say that the code hovered over is current. The information and hightlighting gives a lot information on how the current code is parsed.</p>
+
+ <p>Dynamic higlighting in the code pane : the current operator is displayed with a reddish background. If it has operands it is in a blueish background. Whatever the term operator and operands denote here depends very much on the language and the context. You will figure it out.</p>
+
+ <p>The middle pane displays the rule used to recognize the current code.</p>
+ <p>the top pane is called the parse path paned. Going from left to right, it shows the path in the parse tree to reach the said rule. When a sequence of rules reduces to the same string it is show top to bottom instead of left to
+ right.</p>
+
+ <p>Currently the code pane is readonly.</p>
+</div>
+
+<div class="text">The current page contains two lite portviews. The shows the parsing of a simple arithmetic expression</div>
+
+<div id="viewport-dh"></div>
+<div class="text">The second portview shows how json is parsed used a Perl 6 grammar. We note a problem when hovering over 666. I don't know how to select a rule after its longname. So using the short name, there is ambiguity and we
+peek the wrong rule</div>
+<div id="viewport-parsed"></div>
</body>
-</html>
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 3099059

Please sign in to comment.