Skip to content

Instantly share code, notes, and snippets.

@prdoyle
prdoyle / day15.py
Created Dec 15, 2020
Advent of code 2020
View day15.py
#! /usr/bin/python
seed = [0,12,6,13,20,1,17]
end = 30000000
position = 1
most_recent = {}
def process( num ):
global position, most_recent
View boaty.csv
124109 Boaty McBoatface
39886 Poppy-mai
15774 Henry Worsley
11023 David Attenborough
10679 Its bloody cold here
8710 USAIN BOAT
8365 BOATIMUS PRIME
7687 Katharine Giles
7055 CATALINA DE ARAGON
6452 I Like Big Boats&I Cannot Lie
@prdoyle
prdoyle / lalr-not-nqlalr.txt
Last active Aug 29, 2015
A small grammar that is neither SLR nor NQLALR but is LALR
View lalr-not-nqlalr.txt
Bermudez and Logothetis show a small grammar that is neither SLR nor NQLALR but is LALR.
S -> agd
S -> aAc
S -> bAd
S -> bgc
A -> B
B -> g
"Simple Computation of LALR(1) Lookahead Sets", p.237 Fig. 5
You can’t perform that action at this time.