Skip to content

Commit

Permalink
repo initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
ekmett committed Dec 20, 2010
0 parents commit 2a7de4d
Show file tree
Hide file tree
Showing 13 changed files with 651 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitignore
@@ -0,0 +1,13 @@
*.swo
*.swp
lib_managed
project/boot
full/project/boot
src_managed
target
.DS_Store
out
tags
*~
build.log
.history
51 changes: 51 additions & 0 deletions README
@@ -0,0 +1,51 @@
Kata is a toy compiler written in the Scala Programming Language.

Kata is released under a BSD open source licence

The source code for Kata is hosted on GitHub: http://github.com/ekmett/kata

Documentation and downloads are on Google Code: http://github.com/ekmett/kata

Snapshots and Releases published to the repository on scala-tools.org.

Build Instructions
------------------

The root directory of the project contains the SBT launcher, shell script, and Windows command script.

This is the directory structure of the build.

|- project +
| |-build +
| | |- kata.scala Project Definition, containing module structure, compiler
| | | options, cross module dependencies, etc.
| | |- build.properties Version of SBT, Scala, and Kata
| | A different version of Scala is used to run SBT and compile
| | the Project Definition than is used to compile Kata
| |-target Compiled Project Definition
| |
| +-boot Versions of Scala Compiler and Library.
|
|-src +
| |-main +
| | |-scala Source files
| |
| |-test +
| |-scala Test source files
|
|-lib_managed Managed Dependencies for this module, e.g. Scalacheck.
|
|-target +
|- <scala version M> All built artifacts (classes, jars, scaladoc) for module N
built for version M of Scala.

1. ./sbt update (this step is required after a fresh checkout, after changing the version of
SBT, Scala, or other dependencies)
2. ./sbt [compile | package | test-compile | test | publish-local | publish]

For continuous compilation:

$ ./sbt
> ~ compile

For other options, read: http://code.google.com/p/simple-build-tool/wiki/DocumentationHome
8 changes: 8 additions & 0 deletions project/build.properties
@@ -0,0 +1,8 @@
#Project properties
#Wed Dec 15 23:56:58 EST 2010
project.organization=comonad.com
project.name=kata
sbt.version=0.7.4
project.version=0.1
build.scala.versions=2.8.1
project.initialize=false
6 changes: 6 additions & 0 deletions project/build/kata.scala
@@ -0,0 +1,6 @@
import sbt._

class kata(info: ProjectInfo) extends DefaultProject(info) {
val kiama = "com.googlecode" %% "kiama" % "1.0.1" from "http://scala-tools.org/repo-releases/com/googlecode/kiama_2.8.1/1.0.1/kiama_2.8.1-1.0.1.jar"
}

3 changes: 3 additions & 0 deletions sbt
@@ -0,0 +1,3 @@
#!/bin/bash

java $SBT_OPTS -Dfile.encoding=UTF-8 -Xss4M -Xmx1024M -XX:MaxPermSize=256M -XX:NewSize=128M -XX:NewRatio=3 -jar `dirname $0`/sbt-launch-0.7.4.jar @sbt.boot.properties "$@"
Binary file added sbt-launch-0.7.4.jar
Binary file not shown.
38 changes: 38 additions & 0 deletions sbt.boot.properties
@@ -0,0 +1,38 @@
[scala]
version: 2.7.7
classifiers: sources

[app]
org: org.scala-tools.sbt
name: sbt
version: read(sbt.version)
class: sbt.xMain
components: xsbti
cross-versioned: true

[repositories]
local
maven-local
sbt-db: http://databinder.net/repo/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-central
scala-tools-releases
scala-tools-snapshots

[boot]
directory: project/boot
properties: project/build.properties
prompt-create: Project does not exist, create new project?
prompt-fill: true
quick-option: true

[log]
level: info

[app-properties]
project.name: quick=set(test), new=prompt(Name), fill=prompt(Name)
project.organization: new=prompt(Organization)
project.version: quick=set(1.0), new=prompt(Version)[1.0], fill=prompt(Version)[1.0]
build.scala.versions: quick=set(2.7.7), new=prompt(Scala version)[2.7.7], fill=prompt(Scala version)[2.7.7]
sbt.version: quick=set(0.7.3), new=prompt(sbt version)[0.7.3], fill=prompt(sbt version)[0.7.3]
project.scratch: quick=set(true)
project.initialize: quick=set(true), new=set(true)
2 changes: 2 additions & 0 deletions sbt.cmd
@@ -0,0 +1,2 @@
set SCRIPT_DIR=%~dp0
java %SBT_OPTS% -Dfile.encoding=UTF-8 -Xss4M -Xmx1024M -XX:MaxPermSize=256M -XX:NewSize=128M -XX:NewRatio=3 -jar "%SCRIPT_DIR%sbt-launch-0.7.4.jar" @sbt.boot.properties %*
13 changes: 13 additions & 0 deletions src/main/scala/kata/Fixity.scala
@@ -0,0 +1,13 @@
package kata

class Fixity(val fixity: Int, val fixityDirection: Fixity.Direction)
object Fixity {
type Direction = Direction.Value
object Direction extends Enumeration {
val InfixL, InfixR, InfixN = Value
}
def apply(fixity: Int, fixityDirection: Direction): Fixity = new Fixity(fixity, fixityDirection)
def unapply(f: Fixity): Option[(Int, Direction)] = Some((f.fixity, f.fixityDirection))
def default: Fixity = Fixity(9, Fixity.Direction.InfixL)
def maxPrecedence: Int = 9
}

0 comments on commit 2a7de4d

Please sign in to comment.