Skip to content

Instantly share code, notes, and snippets.

Aufgabe 6.a

Studieren Sie die Java-Sprachbeschreibung und geben Sie Java-Fragmente an, die den Produktionsregeln aus Abschnitt 18.1. für

  • CatchClause
  • NormalInterfaceDeclaration und
  • ForControl unter Verwendung der zweiten Alternative von ForVarControlRest

entsprechen. Erklären Sie jeweils die Bedeutung (Semantik) dieses Konstrukts in der Sprache Java. Reichen Sie diesen Teil Ihrer Lösung als Text- oder PDF-Datei ein.

@jaheba
jaheba / Ampel
Created January 26, 2012 16:55 — forked from cm2kay/Ampel
*-----------------------------------------------------------
* Program :
* Written by :
* Date :
* Description:
*-----------------------------------------------------------
START ORG $1000
LEDADR EQU $E00010
*-----------------------------------------------------------
* Program :
* Written by :
* Date :
* Description:
*-----------------------------------------------------------
START ORG $1000
LEDADR EQU $E00010
from itertools import ifilter
def read(dateiname='passwd.txt', encoding='latin-1'):
with open(dateiname) as fobj:
text = fobj.read().decode(encoding)
return map(lambda s: Account(*s.split(':')), text.splitlines())
class Account(object):
"""docstring for Account"""
@jaheba
jaheba / uebung1.py
Created October 24, 2011 14:17
PT_I-Übung 1
#encoding: utf-8
from string import digits, ascii_uppercase
def base(b, n, symbols=digits+ascii_uppercase):
'return the nubmer `n` with base `b`'
if b > len(symbols):
raise IndexError('Not enough symbols to represent base')
digits = []
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#TODO: english docstrings
"""
Die Klasse ``FirstStart`` ist dazu da, um zu prüfen ob ein Programm bereits
gestartet wurde.
Dabei wird zwischen einem Pro-User-Modus und einem globalen Modus
unterschieden. Im Pro-User-Modus wird nur für den aktuellen Benutzer
geprüft, ob das Programm bereits gestartet wurde, im globalen Modus