In this tutorial we're going to build a set of parser combinators.
We'll answer the above question in 2 steps.
- What is a parser?
- and, what is a parser combinator?
So first question: What is parser?
/** | |
* This marquee stuff is deliberately low-tech. Use at your own risk. Licensed under whatever license you need. | |
* Also available as a part of https://github.com/erikvorhes/Useless-JS | |
* | |
* Usage: `marquee();` | |
*/ | |
function marquee(behavior, direction) { | |
var behaviors = ['scroll', 'slide', 'alternate']; | |
var directions = ['left', 'right', 'up', 'down']; |
These rules are adopted from the AngularJS commit conventions.
//***************************************** | |
// NEC (Japanese) Infrared code sending library for the Arduino | |
// Send a standard NEC 4 byte protocol direct to an IR LED on the define pin | |
// Assumes an IR LED connected on I/O pin to ground, or equivalent driver. | |
// Tested on a Freetronics Eleven Uno compatible | |
// Written by David L. Jones www.eevblog.com | |
// Youtube video explaining this code: http://www.youtube.com/watch?v=BUvFGTxZBG8 | |
// License: Creative Commons CC BY | |
//***************************************** |