Jasmin Examples

Feb. 3, 2013, 12:34 p.m.

This archive contains five samples of operations with doubles, input and output in jasmin.

C- in ANTLR

Feb. 3, 2013, 12:26 p.m.

This is a sample of a small language with global variables, assignments, arithmetic expressions, input, output, if and while, which compiles into java assembler (can't say that i excell in jasmin, but this one works in most cases).

(source code)

Calc in ANTLR

Feb. 3, 2013, 12:21 p.m.

This is a sequence of calculators which can be used to dive into ANTLR.

calc

Write down the grammar. (source code)

(Read more)

Students' Theses

Feb. 3, 2013, 11:57 a.m.

Development of General Purpose Object Oriented Language Compiler (Egor Kolmogortsev)

This course work is devoted to development of an OO language compiler on the basis of flex, bison and llvm tools.

Thesis Presentation Sources

Graph_Viz (Maxim Pomazuev)

This is an introductory work into the field of vizualization of big graphs.

Archive (Ru)

ASMPY (Aleksandr Krasnorutskiy)

ASMPY is an assembler of python compiled files compatible with unpyc disassembly output.

The structure of python compiled files is considered. The purpose of the work is to create a low-level language for *. pyc files and to develop an assembler for this language. The paper contains specification on the assembly language for CPython, lexical and syntactic analyzers.

Thesis (Ru)

(Read more)

Select

Feb. 2, 2013, 7:53 p.m.
my $paddr = inet_aton($addr);
croak "Cannot resolve '$addr'" if (!defined $paddr);
socket SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp')
    or croak 'Cannot create socket';
connect SOCK, sockaddr_in($port, $paddr)
    or croak "Cannot connect to server '$server'";
send SOCK, "$query\r\n", 0;
vec($rin, fileno(SOCK), 1) = 1;
do {
    ($nfound) = select($rout = $rin, '', '', $timeout);
    croak 'Select() error' if ($nfound == -1);
    croak 'Timeout' if ($nfound == 0);
    croak 'Recv() error' if (!defined(recv SOCK, $buf, 512, 0));
    $answer .= $buf;
} while $buf ne '';
shutdown SOCK, 2;