This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.5 | |
import handy | |
import sys, os | |
import mailbox | |
import sqlite3 | |
from email.utils import parseaddr, parsedate_tz, mktime_tz, formatdate | |
import cmd | |
import pdb | |
from cursor import Cursor, ListView | |
from storage import PySQLiteStorage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODULE RISC; (* NW 22.9.07 / 28.3.11 *) | |
IMPORT SYSTEM, Texts, Oberon; | |
CONST | |
MemSize = 1024; (* in words *) | |
MOV = 0; AND = 1; IOR = 2; XOR = 3; LSL = 4; ASR = 5; | |
ADD = 8; SUB = 9; MUL = 10; Div = 11; CMP = 12; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// == declarations ========================================== | |
var level:Number = 0; | |
var score:Number = 0; | |
var cleared:Number = 0; // number of lines cleared | |
var justDropped:Boolean = false; // did they just force a drop? (Enter key) | |
var board:MovieClip; | |
var EMPTY:Number = -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
=comment | |
Universal forth-style tokenizer (breaks on whitespace) | |
=cut | |
grammar Grammar { | |
token TOP { [ <whitespace> | <blackspace> ]+ } | |
token whitespace { \s+ } | |
token blackspace { $<token>=[\S+] } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar CorePascal; | |
parse : module ; | |
//--- parser ------------------------------------- | |
module | |
: modHeader | |
block '.' | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
IGridMember = interface | |
end; | |
IInteractive = interface | |
procedure click( mx, my : int ); | |
procedure press( mx, my : int ); | |
procedure drag( mx, my : int ); | |
end; | |
IPlayable = interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ this is pascal code to scan the metagrammar. | |
unfinished and untested... probably won't even compile } | |
unit grinlex; | |
interface | |
type | |
TGrinKind = ( tkTokenSigil, tkRuleSigil, tkComment, tkNeck, tkEnd | |
tkChar, tkEnd, tkTo, tkOr, TkString, tkIden, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIVEN | |
data N = Z | S N; -- call this N:0 (peano representation of natural numbers) | |
add Z y = y -- call this add:1 | |
add x Z = x -- call this add:2 | |
add x (S y) = add (S x) y -- call this add:3 | |
PROVE | |
add x (S y) = S add (x y) -- for all x, y : N | |
BEGIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> p | |
. . . . . . . . . . | |
. . . . . . . . . . | |
. . . . . . . . . . | |
. . . . . . . . . . | |
. . . . . . . . . . | |
. . . . . . . . . . | |
. . . . . . . . . . | |
. . . . . . . . . . | |
. . . . . . . . . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table a (x integer); | |
create table b (y integer); | |
insert into a values (1); | |
insert into a values (2); | |
insert into b values (1); | |
insert into b values (2); | |
insert into b values (3); | |
select * from a,b; |