Commit Graph

364 Commits

Author SHA1 Message Date
Jeff Avallone
445cec7c7f Replacing "container" class with "application" 2014-12-21 15:22:59 -05:00
Jeff Avallone
55ee380817 Adding ability to easily render demo images 2014-12-21 15:22:01 -05:00
Jeff Avallone
e466e7e548 Moving the SVG styles out of the svg element
They are now processed with compass
2014-12-21 14:48:43 -05:00
Jeff Avallone
fbb8c4187d Tweaking styling in preparation for writing documentation 2014-12-21 14:26:09 -05:00
Jeff Avallone
fe645a7c4b Tweaking changelog 2014-12-21 12:17:41 -05:00
Jeff Avallone
9bf5328da7 Adding specs for Subexp nodes 2014-12-21 12:05:55 -05:00
Jeff Avallone
82ca4f40f7 Adding initial tests for Repeat nodes 2014-12-20 13:03:57 -05:00
Jeff Avallone
79cda13dc5 Adding a few more points to the changelog 2014-12-20 12:31:00 -05:00
Jeff Avallone
9a79b95337 Finally writing the changelog (at least for now) 2014-12-20 11:18:15 -05:00
Jeff Avallone
55657a792b Adding check for out of order numbers 2014-12-20 10:53:01 -05:00
Jeff Avallone
ccdb29224a Rejecting promise when parsing fails 2014-12-20 10:47:41 -05:00
Jeff Avallone
6c5b36f334 Changing util.js to export an object
This allows the methods to be spied on in tests
2014-12-20 10:25:32 -05:00
Jeff Avallone
8a9a129856 Adding tests for CharsetRange nodes 2014-12-20 10:18:00 -05:00
Jeff Avallone
d27831a265 Adding tests for CharsetEscape nodes 2014-12-19 21:56:56 -05:00
Jeff Avallone
24e21834f6 Adding tests for Escape nodes 2014-12-19 21:49:11 -05:00
Jeff Avallone
32a28ede90 Adding tests for Literal nodes 2014-12-19 21:35:03 -05:00
Jeff Avallone
69ae3f0fe1 Moving parser setup code into a separate file 2014-12-19 20:41:02 -05:00
Jeff Avallone
43eaf493e6 Removing some cruft in the grammar 2014-12-19 20:35:20 -05:00
Jeff Avallone
70789258ab Removing CharsetLiteral
It was no different from just Literal (and most likely won't be any
different)
2014-12-19 20:23:32 -05:00
Jeff Avallone
2d4694f447 Simplifying some modules 2014-12-19 20:18:19 -05:00
Jeff Avallone
a50ba68a21 Moving spaceHorizontally and spaceVertically to util.js 2014-12-19 12:11:44 -05:00
Jeff Avallone
870b2e6ed4 Moving normalizeBBox to util.js 2014-12-19 12:06:21 -05:00
Jeff Avallone
be145e3fac Adding rest of tests for Node class 2014-12-19 11:48:09 -05:00
Jeff Avallone
91581afe2c Adding more Node tests 2014-12-19 11:00:47 -05:00
Jeff Avallone
78917d44e6 Extracting custom event creation into a util module 2014-12-19 10:24:45 -05:00
Jeff Avallone
e43033d789 Updating Regexper class specs 2014-12-18 18:29:40 -05:00
Jeff Avallone
80ec29cd6b Refactoring parser code to remove global state
This allows canceling an in-progress render and moves some of the
rendering code to a more appropriate location.
2014-12-18 11:13:15 -05:00
Jeff Avallone
7de0a6490a Adding code to track visualization lifecycle events 2014-12-17 19:54:58 -05:00
Jeff Avallone
c64e48946e Adding support for canceling a parse/render 2014-12-17 19:24:33 -05:00
Jeff Avallone
bc351bc9fc Removing unnecessary render step 2014-12-17 17:18:46 -05:00
Jeff Avallone
17a95392a8 Refactoring property definition code 2014-12-17 16:04:55 -05:00
Jeff Avallone
a0f145ab3d Removing unnecessary atype attributes 2014-12-17 15:48:06 -05:00
Jeff Avallone
020feae951 Fixing flag display 2014-12-17 15:28:04 -05:00
Jeff Avallone
f93388dec0 Converting getAnchor into a property 2014-12-17 15:24:27 -05:00
Jeff Avallone
155ad51d58 Turning container into a property 2014-12-17 15:14:33 -05:00
Jeff Avallone
c5c98ad62f Simplifying node proxy code 2014-12-17 15:12:04 -05:00
Jeff Avallone
dd6eac2b4e Simplifying literal merging code 2014-12-17 14:56:02 -05:00
Jeff Avallone
e362a54551 Converting methods into properties where possible/reasonable 2014-12-17 14:44:48 -05:00
Jeff Avallone
4af524112e Moving properties out of the way 2014-12-17 12:07:25 -05:00
Jeff Avallone
57ccd4b0c5 Refactoring to enhance the SyntaxNode extending 2014-12-17 11:53:04 -05:00
Jeff Avallone
6322b48f31 Removing debugging code 2014-12-17 10:06:03 -05:00
Jeff Avallone
484abdbb0c Explicitly specifying image dimensions 2014-12-16 23:22:33 -05:00
Jeff Avallone
c9754de8c4 Fixing broken download link 2014-12-16 23:13:55 -05:00
Jeff Avallone
b934423d11 Finishing tests for Regexper module 2014-12-16 19:00:27 -05:00
Jeff Avallone
5537928a80 Starting work on spec files 2014-12-16 16:08:36 -05:00
Jeff Avallone
f69d24e302 Tweaking styles 2014-12-16 15:46:56 -05:00
Jeff Avallone
91404ccf26 Replacing the setState method with a property 2014-12-16 13:34:02 -05:00
Jeff Avallone
dbae70ce52 Updating main JS to not run if not on the index page
This is to get the karma tests in a position where they can be written
2014-12-16 13:33:20 -05:00
Jeff Avallone
8651fd0d9b Adding some nav items 2014-12-16 11:05:13 -05:00
Jeff Avallone
22ade8846d Hiding results element when told to display an empty expression 2014-12-16 10:22:49 -05:00
Jeff Avallone
8cc2f29aec Adding regexp flag indications 2014-12-16 10:14:37 -05:00
Jeff Avallone
ca0e6fdfa9 Allowing newlines in regexps 2014-12-16 10:01:17 -05:00
Jeff Avallone
4195a101a2 Fixing some small styling issues 2014-12-16 10:00:57 -05:00
Jeff Avallone
3d42894ac2 Replacing some calls to _.each with new for loops 2014-12-15 22:11:12 -05:00
Jeff Avallone
26bf0fcd52 Converting some string generation to templates 2014-12-15 22:01:55 -05:00
Jeff Avallone
84d3fe797d Removing unnecessary binds 2014-12-15 22:00:24 -05:00
Jeff Avallone
d22ab35b68 Converting uses of Snap.format to use template literals 2014-12-15 21:51:17 -05:00
Jeff Avallone
db62743d54 Fixing various IE-related issues 2014-12-15 18:06:16 -05:00
Jeff Avallone
5a96955419 Tweaking text spacing 2014-12-15 15:29:13 -05:00
Jeff Avallone
dea4011530 Adding progress indicator 2014-12-15 15:19:37 -05:00
Jeff Avallone
f4ea4d6da6 Adding greedy indication 2014-12-15 12:43:13 -05:00
Jeff Avallone
c0eed07d9b Adding repetition labels 2014-12-15 12:29:47 -05:00
Jeff Avallone
b4b999d7a6 Removing support for "{,n}" syntax
Don't know I missed that this isn't supported in JS
2014-12-15 11:11:17 -05:00
Jeff Avallone
67a71289bc Getting rid of GitHub ribbon in exchange for a simple link 2014-12-15 11:05:37 -05:00
Jeff Avallone
deb95ef123 Removing duplicate elements from charset 2014-12-15 10:19:18 -05:00
Jeff Avallone
b103982273 Changing the cursor used on the "Display" button 2014-12-15 10:12:30 -05:00
Jeff Avallone
dab0dab9b1 Encoding regexp when updating URL 2014-12-15 10:09:54 -05:00
Jeff Avallone
3374e760db Fixing some styling issues 2014-12-15 08:37:43 -05:00
Jeff Avallone
f8ce2d8f40 Putting all labels in a tspan.
This will get all of them aligning the same way
2014-12-15 07:54:55 -05:00
Jeff Avallone
66d9b97a6f Making quotes around literals lighter 2014-12-14 22:17:59 -05:00
Jeff Avallone
10d5e7f534 Reverting change to repeat node that adjusted the vertical position 2014-12-14 21:53:54 -05:00
Jeff Avallone
95af49e385 Adding horizontal connecting lines 2014-12-14 21:37:56 -05:00
Jeff Avallone
a30c16a940 Fixing root node positioning 2014-12-14 19:29:45 -05:00
Jeff Avallone
40ac83ab91 Revert "Simplifying positioning code for root nodes"
This reverts commit 46ab0662f5.
2014-12-14 19:28:50 -05:00
Jeff Avallone
c2d8473425 Adding node-type-specific anchor code 2014-12-14 19:13:08 -05:00
Jeff Avallone
9ba2b8579e Updating major positioning code to use anchor position 2014-12-14 19:13:03 -05:00
Jeff Avallone
56927dd7fa Adding anchors 2014-12-14 19:13:00 -05:00
Jeff Avallone
46ab0662f5 Simplifying positioning code for root nodes 2014-12-14 17:48:48 -05:00
Jeff Avallone
97b816ffc9 Extracting a method to ease readability 2014-12-14 17:03:40 -05:00
Jeff Avallone
d216c0fe5f Simplifying more code 2014-12-13 13:42:55 -05:00
Jeff Avallone
407167a4ae Folding labeled box positioning into rendering 2014-12-13 13:26:43 -05:00
Jeff Avallone
b9f1cfae55 Cleaning up some messy code 2014-12-13 13:00:46 -05:00
Jeff Avallone
cb9785de91 Folding _position methods into render method promises 2014-12-13 12:55:03 -05:00
Jeff Avallone
29316bb2aa Updating renderLabel to be promise based 2014-12-13 12:28:16 -05:00
Jeff Avallone
773fd5c1a6 Refactoring how _position is called to be promise-based
The render method now returns a promise. Once this promise is resolved,
the _position method for that node will be called (if applicable). This
promise must be resolved only after all subordinate nodes have completed
their render phase (the promise returned by subordinate node's render
method has resolved). Node that do not have subordinates can return the
result of calling terminalRender, and proxied renders only need to
return the result of calling proxy.

With this change, it is no longer necessary to explicitly position
subordinate nodes. They will already be positioned once their render
promise is resolved.
2014-12-13 09:09:58 -05:00
Jeff Avallone
bc84f68250 Adding a delay before positioning the regex
This gives the page time to render the loading indicator before doing
all the positioning work; providing a better experience for users when
rendering complicated regexs like that Perl email regex.
2014-12-13 08:19:27 -05:00
Jeff Avallone
f81ba6535f Adding transform method to Base node 2014-12-10 20:28:02 -05:00
Jeff Avallone
340d6b4859 Simplifying literal normalization code 2014-12-10 20:11:51 -05:00
Jeff Avallone
2e60561be6 Cleaning up code for match node 2014-12-10 19:58:36 -05:00
Jeff Avallone
dbcdd583ed Removing need for separate setContainer calls 2014-12-10 19:31:07 -05:00
Jeff Avallone
9ac25b9a50 No need to save most label objects 2014-12-10 19:23:14 -05:00
Jeff Avallone
15655900f1 Updating to automatically size labels when positioning 2014-12-10 19:16:21 -05:00
Jeff Avallone
d953dcaab4 renderLabel method doesn't really need a container argument 2014-12-10 19:12:17 -05:00
Jeff Avallone
521ab74723 Cleanup of path code 2014-12-10 19:09:31 -05:00
Jeff Avallone
f0c25dfc41 Simplifying code related to passing rendering through to nested node 2014-12-10 19:01:57 -05:00
Jeff Avallone
ff7525a6e4 De-duplicating code to render subexp and charset containers 2014-12-10 18:27:07 -05:00
Jeff Avallone
fc7032241f Short-circuiting the render of nodes.
This will reduce the depth of nesting of elements (and hopefully make
final positioning easier)
2014-12-10 17:16:21 -05:00
Jeff Avallone
6dcc5f48c4 Adjusting positioning of loop and skip lines 2014-12-10 17:14:14 -05:00
Jeff Avallone
b13ee3add2 Removing some connecting lines
This is in preparation for properly aligning nodes and simplifying the
connecting lines to reduce the number of path elements required.
2014-12-10 17:13:23 -05:00
Jeff Avallone
6ab5b2993b Removing references to "self" 2014-12-10 17:01:21 -05:00
Jeff Avallone
035984a61c Adding class to labels 2014-12-10 17:00:04 -05:00
Jeff Avallone
0b85f552c3 Setting class names of nodes automatically 2014-12-10 16:57:42 -05:00
Jeff Avallone
60d7cab504 Adding code to indicate subexpression numbers 2014-12-10 06:18:55 -05:00
Jeff Avallone
4a8103f404 Still working on the connecting lines 2014-12-09 21:32:13 -05:00
Jeff Avallone
629faf7086 Adjusting connecting line positioning 2014-12-09 21:10:42 -05:00
Jeff Avallone
772da725a3 Removing more dead code 2014-12-09 21:05:07 -05:00
Jeff Avallone
e6e8a1ed54 Tweaking connector lines 2014-12-09 21:04:14 -05:00
Jeff Avallone
975780609d Fixing label positioning in charset nodes 2014-12-09 21:00:36 -05:00
Jeff Avallone
e26d91bae5 Fixing label positioning in subexp nodes 2014-12-09 20:22:44 -05:00
Jeff Avallone
27a23162b4 Removing some dead code 2014-12-09 20:09:27 -05:00
Jeff Avallone
7082a670d6 Extracting code to layout elements vertically 2014-12-09 20:08:34 -05:00
Jeff Avallone
0f97afd880 Fixing font size of charset label 2014-12-09 19:03:50 -05:00
Jeff Avallone
cd11b7e6e5 Centralizing some of the layout code 2014-12-09 19:02:31 -05:00
Jeff Avallone
7ed865ecdb Normalizing function names 2014-12-09 18:08:40 -05:00
Jeff Avallone
7ab386e7a4 Cleanup of match fragment rendering 2014-12-09 17:56:22 -05:00
Jeff Avallone
5a4c62c2c0 Cleanup of charset range rendering 2014-12-09 17:51:04 -05:00
Jeff Avallone
0cb090bc10 Cleanup of charset rendering code 2014-12-09 17:48:44 -05:00
Jeff Avallone
3bbd55c36a Refactoring code for escape display 2014-12-09 17:43:05 -05:00
Jeff Avallone
cd279d3a80 Further refactoring of Regexper class
Still not entirely sure this is setup how I'd like it to be.
2014-12-07 21:40:05 -05:00
Jeff Avallone
ae064b2b8e Adding rendering for Subexp 2014-12-07 21:16:23 -05:00
Jeff Avallone
52a0863449 Refactoring rendering code to allow the loader to show
The loader is mostly an easter egg for people who like to try rendering
that enormous email-matching regexp from the Mail::RFC822::Address perl
module
2014-12-07 18:19:00 -05:00
Jeff Avallone
e99c284216 Rendering CharsetRange 2014-12-07 17:51:13 -05:00
Jeff Avallone
fadfaee440 Adding code to render charsets 2014-12-07 17:38:24 -05:00
Jeff Avallone
9cc23183be Adding rendering code for escape, literal, and "." 2014-12-07 15:26:45 -05:00
Jeff Avallone
f5d1e734f1 Removing Terminal type and replacing with Literal, Escape, and AnyChar
This is to eventually simplify the combining of Literals together (and
to actually make it work correctly, since terminals should not have been
merged)
2014-12-06 16:03:58 -05:00
Jeff Avallone
41c11ad5d4 Fixing bug with concatenation of literals 2014-12-06 15:46:46 -05:00
Jeff Avallone
d2b96c7833 Adding code to render loop and skip paths for repetitions
This currently breaks the rendering and will need more work. Also need
to add labels for {a,b} syntax
2014-12-06 12:34:00 -05:00
Jeff Avallone
5fcb0758a3 Fixing re-display of regex 2014-12-06 10:36:23 -05:00
Jeff Avallone
4af501b37b Fixing positioning of rendered expression 2014-12-05 23:06:02 -05:00
Jeff Avallone
354f9bc928 Getting textarea sizing and padding correct this time 2014-12-05 22:59:39 -05:00
Jeff Avallone
ca2494da16 Fixing styling bug 2014-12-04 21:25:44 -05:00
Jeff Avallone
d9abd5f139 Removing an extraneous connecting line 2014-12-04 21:23:18 -05:00
Jeff Avallone
257fb19369 Adding initial UI JS
This still needs lots of tests to be written, and checks for missing
browser functionality (specifically around Blob URLs)
2014-12-04 18:37:35 -05:00
Jeff Avallone
e1c299453c Reducing the number of path elements that are generated 2014-12-03 20:35:26 -05:00
Jeff Avallone
5a000ec302 Adding spacing between MatchFragments 2014-12-03 20:26:09 -05:00
Jeff Avallone
502e4494d9 Some cleanup 2014-12-03 20:20:08 -05:00
Jeff Avallone
e7e97b0008 Adding lines before and after main Regexp body 2014-12-03 20:14:56 -05:00
Jeff Avallone
d1a058768e Adding some styling to start and end anchors 2014-12-03 20:02:56 -05:00
Jeff Avallone
a88c4821b7 Refactoring to remove the container argument to render methods
A reference was being kept generally, so it was more useful to keep it
connected to the node
2014-12-03 18:59:59 -05:00
Jeff Avallone
6a9d498bf6 Refactoring to not render connectors for a Regexp with one Match 2014-12-03 18:46:48 -05:00
Jeff Avallone
fe6727b79a Removing some debugging code 2014-12-03 18:46:40 -05:00
Jeff Avallone
b364198030 Adding a MatchFragment rule
Also reducing the amount of object cloning that is being done
2014-12-02 21:09:20 -05:00
Jeff Avallone
7d84669536 First cut of rendering match elements
This is currently broken, but a starting point for further work.
2014-12-02 21:02:48 -05:00
Jeff Avallone
b9dd80a142 Adding type values to node extensions
These will be useful later
2014-12-02 20:10:56 -05:00
Jeff Avallone
1ffcd785f8 Changing names of grammar elements.
Starting with an "_" will prevent collisions with extensions
2014-12-02 19:59:10 -05:00
Jeff Avallone
9609b1d5b7 Refactoring bounding box rendering method 2014-12-02 19:15:19 -05:00
Jeff Avallone
5afb4fa717 First pass for getting flow lines in place
This could use some refactoring
2014-11-30 21:20:03 -05:00
Jeff Avallone
f8cded8eac Adding first cut of code to render alternations
Still need to implement lines to the individual parts
2014-11-30 17:54:12 -05:00
Jeff Avallone
ed2c26c39e Adding basic code to render stand and end indicators 2014-11-30 15:36:53 -05:00
Jeff Avallone
30d88810d0 Creating Base module and extracting placeholder rendering 2014-11-30 14:10:27 -05:00
Jeff Avallone
4decff56e7 Cleanup of initial SVG rendering 2014-11-30 13:14:31 -05:00
Jeff Avallone
b1a615daf0 Adding line that somehow got deleted 2014-11-30 10:51:22 -05:00
Jeff Avallone
301dce5873 Integrated snap.svg and starting to render content 2014-11-30 10:48:33 -05:00
Jeff Avallone
facb99e8bc Beginning to add some functionality to the parser 2014-11-26 18:24:40 -05:00
Jeff Avallone
c6f2271867 Adding a stubbed out test
Removing old demo file and spec
2014-11-25 20:05:29 -05:00
Jeff Avallone
abd8a52f6b Adding initial cut of JS regexp parser 2014-11-25 19:37:54 -05:00
Jeff Avallone
ba9b779ba7 Integrating canopy (with a demo parser from the canopy docs) 2014-11-24 22:31:20 -05:00
Jeff Avallone
9d7730cc3c Adding jasmine test integration 2014-11-23 18:55:32 -05:00
Jeff Avallone
a0ace648fb Adding more static files from regexper.com 2014-11-23 18:08:24 -05:00
Jeff Avallone
f61c849501 Adding Regexper markup and styles 2014-11-23 17:13:05 -05:00
Jeff Avallone
cc16603f6f Adding browserify and es6ify support 2014-11-23 17:00:01 -05:00
Jeff Avallone
55f03879a7 Adding task to copy unprocessed files to build directory 2014-11-23 16:29:40 -05:00
Jeff Avallone
fcdc3f8ecd Adding initial compass integration 2014-11-23 16:16:10 -05:00
Jeff Avallone
342cf8d5bb Adding task to build pages wrapped in a template 2014-11-23 12:12:10 -05:00