GitXplorerGitXplorer
a

DOMQL

public
48 stars
3 forks
0 issues

Commits

List of commits on branch master.
Unverified
01def51693fce3975b8c1b62fbafbe688e9cac07

Talk examples

aamasad committed 9 years ago
Unverified
b071f7c7897e5dbfbbf6a34647e963affd5e5302

new build

aamasad committed 9 years ago
Unverified
5dcd5c289ac6565c80766c1648cd1dba7d20ce81

Add tasks to for parsing and lexing alone

aamasad committed 9 years ago
Unverified
d92c9ad04fcfa7cf28c2f2bec092b2bb5186a9fb

Add type field for printing the AST

aamasad committed 9 years ago
Unverified
5dffecef8f57bbe4292ad5a2becc902c8828b757

Sizzle should only be required in the browser

aamasad committed 9 years ago
Unverified
c6e0597ac529f95e829d79636d5fa1b2e6e22233

Merge branch 'master' of github.com:amasad/DOMQL

aamasad committed 13 years ago

README

The README file for this repository.

#About An SQL-like language for querying the DOM. More info here.

#Development DOMQL is an interpereted language powered by the Sizzle selector engine.
Most SELECT queries can be directly compiled to a Sizzle query (see src/test.coffee).

DOMQL is written using the Jison parser generator.

##Source Files Overview

  • dql.coffee is the main file. Responsible for initiating the parser and contains some utils (domReady, templates etc).
  • grammer.coffee is the language grammer file written in CoffeeScript's Jison DSL.
  • lexer.coffee is the language lexer.
  • nodes.coffee contains all the nodes for the syntax tree also responsible for compiling to sizzle / evaluating the code.
  • test.coffee the test suite ran by index.html.

##Getting the Code

git clone git@github.com:amasad/DOMQL.git  

##Dependencies

  • NodeJS for the development environment.
  • Browserify for Node requires to work in the browser.
  • express for development server.
  • uglify-js for minifying build file.
  • Jison for creating the parser.

You only need to install NodeJS. All the modules are checked in.
Note that browserify has been altered to work around a bug.

##Running

Using CoffeeScript's Cakefile you could do the following:

  • cake buildParser : Builds the parser.
  • cake dev : Starts the development server at localhost:8080 and watches the grammer file for changes to rebuild the parser.
  • cake build : Builds and minifies to domql.min.js.

##Tests Run cake dev and navigate your browser to http://localhost:8080 then open your JavaScript console to see the test results.

#License The MIT License Copyright 2012 Amjad Masad amjad.masad@gmail.com