Skip to content

Instantly share code, notes, and snippets.

View ceci21's full-sized avatar
🤠

Ceci ceci21

🤠
View GitHub Profile
@DanH42
DanH42 / adding-in-javascript.jquery.js
Last active July 7, 2018 05:27 — forked from ceci21/adding-in-javascript.js
let's do math but with jQuery
(function($) {
$.fn.add = function(sep = " = ") {
(function($this) {
const re = /([0-9]+)/g;
const n1 = re.exec($this.text());
const n2 = re.exec($this.text());
if ((n1 && n2) === null) return function(){};
const a = parseInt(n1[0]);
const b = parseInt(n2[0]);
@DmitrySoshnikov
DmitrySoshnikov / Recursive-descent-backtracking.js
Last active January 3, 2024 17:15
Recursive descent parser with simple backtracking
/**
* = Recursive descent parser =
*
* MIT Style License
* By Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
*
* In this short lecture we'll cover the basic (non-predictive, backtracking)
* recursive descent parsing algorithm.
*
* Recursive descent is an LL parser: scan from left to right, doing