Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2a7de4d
Showing
13 changed files
with
651 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
*.swo | ||
*.swp | ||
lib_managed | ||
project/boot | ||
full/project/boot | ||
src_managed | ||
target | ||
.DS_Store | ||
out | ||
tags | ||
*~ | ||
build.log | ||
.history |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
Oops, something went wrong.