From 47665385dd2eea012f9d8b6fb2f463094cf3687a Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewa Date: Fri, 7 Jun 2019 14:16:59 +0200 Subject: [PATCH] fix project structure --- build.sbt | 17 +++++++---------- .../scala/org/enso/syntax/text/Lexer.scala | 0 .../java/org/enso/syntax/text/xx/Parser.java | 0 {enso-lexer => syntax}/src/main/jflex/test.flex | 0 .../src/main/scala/org/enso/syntax}/Main.scala | 10 +++++----- .../org/enso/syntax/text/lexer/Lexer.scala | 0 .../org/enso/syntax/text/lexer/Token.scala | 0 .../scala/org/enso/syntax/text/parser/AST.scala | 0 .../org/enso/syntax/text/parser/Parser.scala | 0 .../scala/org/enso/syntax/text/parser/rules.y | 0 .../test/scala/org/enso/syntax/text/Lexer.scala | 0 11 files changed, 12 insertions(+), 15 deletions(-) rename {enso-lexer => syntax}/src/bench/scala/org/enso/syntax/text/Lexer.scala (100%) rename {enso-lexer => syntax}/src/main/java/org/enso/syntax/text/xx/Parser.java (100%) rename {enso-lexer => syntax}/src/main/jflex/test.flex (100%) rename {enso-lexer/src/main/scala => syntax/src/main/scala/org/enso/syntax}/Main.scala (92%) rename {enso-lexer => syntax}/src/main/scala/org/enso/syntax/text/lexer/Lexer.scala (100%) rename {enso-lexer => syntax}/src/main/scala/org/enso/syntax/text/lexer/Token.scala (100%) rename {enso-lexer => syntax}/src/main/scala/org/enso/syntax/text/parser/AST.scala (100%) rename {enso-lexer => syntax}/src/main/scala/org/enso/syntax/text/parser/Parser.scala (100%) rename {enso-lexer => syntax}/src/main/scala/org/enso/syntax/text/parser/rules.y (100%) rename {enso-lexer => syntax}/src/test/scala/org/enso/syntax/text/Lexer.scala (100%) diff --git a/build.sbt b/build.sbt index f3240c8908..51a2351682 100644 --- a/build.sbt +++ b/build.sbt @@ -6,23 +6,21 @@ lazy val Benchmark = config("bench") extend Test lazy val enso = (project in file(".")).aggregate(syntax) -lazy val syntax = (project in file("enso-lexer")) - .withId("enso-lexer") +lazy val syntax = (project in file("syntax")) .configs(Benchmark) .settings( inConfig(Benchmark)(Defaults.testSettings), - name := "enso-lexer", + name := "syntax", organization := "org.enso", scalaVersion := "2.12.8", scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-Xlint"), publishArtifact := false, libraryDependencies ++= Seq( - "com.storm-enroute" %% "scalameter" % "0.17" % "bench" + "com.storm-enroute" %% "scalameter" % "0.17" % "bench", + "org.typelevel" %% "cats-core" % "1.6.0", + "org.scalatest" %% "scalatest" % "3.0.5" % Test, + "com.lihaoyi" %% "pprint" % "0.5.3" ), - libraryDependencies += "org.typelevel" %% "cats-core" % "1.6.0", - libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % Test, - libraryDependencies += "com.lihaoyi" %% "pprint" % "0.5.3", - resolvers ++= Seq( "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots", "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases" @@ -32,5 +30,4 @@ lazy val syntax = (project in file("enso-lexer")) logBuffered := false ) .settings(SbtJFlexPlugin.jflexSettings) - .settings(mainClass in (Compile,run) := Some("org.enso.main.Main")) - + .settings(mainClass in (Compile,run) := Some("org.enso.syntax.Main")) \ No newline at end of file diff --git a/enso-lexer/src/bench/scala/org/enso/syntax/text/Lexer.scala b/syntax/src/bench/scala/org/enso/syntax/text/Lexer.scala similarity index 100% rename from enso-lexer/src/bench/scala/org/enso/syntax/text/Lexer.scala rename to syntax/src/bench/scala/org/enso/syntax/text/Lexer.scala diff --git a/enso-lexer/src/main/java/org/enso/syntax/text/xx/Parser.java b/syntax/src/main/java/org/enso/syntax/text/xx/Parser.java similarity index 100% rename from enso-lexer/src/main/java/org/enso/syntax/text/xx/Parser.java rename to syntax/src/main/java/org/enso/syntax/text/xx/Parser.java diff --git a/enso-lexer/src/main/jflex/test.flex b/syntax/src/main/jflex/test.flex similarity index 100% rename from enso-lexer/src/main/jflex/test.flex rename to syntax/src/main/jflex/test.flex diff --git a/enso-lexer/src/main/scala/Main.scala b/syntax/src/main/scala/org/enso/syntax/Main.scala similarity index 92% rename from enso-lexer/src/main/scala/Main.scala rename to syntax/src/main/scala/org/enso/syntax/Main.scala index e318c9df4e..9bc8527de3 100644 --- a/enso-lexer/src/main/scala/Main.scala +++ b/syntax/src/main/scala/org/enso/syntax/Main.scala @@ -1,12 +1,12 @@ -package org.enso.main +package org.enso.syntax // import org.enso.syntax.text.parser.{Parser} -import java.io.{Reader,StringReader, StringWriter} -import org.enso.syntax.text.xx.{Parser} -import org.enso.syntax.text.xx.Parser.{Lexer => Tok} +import java.io.{Reader, StringReader} + +import org.enso.syntax.text.lexer.{Scanner, EOF, Token} +import org.enso.syntax.text.xx.Parser import org.enso.syntax.text.xx.Parser.Lexer._ -import org.enso.syntax.text.lexer.{Scanner,Token,Wildcard,EOF,EOL} // import org.enso.syntax.text.{parser => AST} import org.enso.syntax.text.parser.AST diff --git a/enso-lexer/src/main/scala/org/enso/syntax/text/lexer/Lexer.scala b/syntax/src/main/scala/org/enso/syntax/text/lexer/Lexer.scala similarity index 100% rename from enso-lexer/src/main/scala/org/enso/syntax/text/lexer/Lexer.scala rename to syntax/src/main/scala/org/enso/syntax/text/lexer/Lexer.scala diff --git a/enso-lexer/src/main/scala/org/enso/syntax/text/lexer/Token.scala b/syntax/src/main/scala/org/enso/syntax/text/lexer/Token.scala similarity index 100% rename from enso-lexer/src/main/scala/org/enso/syntax/text/lexer/Token.scala rename to syntax/src/main/scala/org/enso/syntax/text/lexer/Token.scala diff --git a/enso-lexer/src/main/scala/org/enso/syntax/text/parser/AST.scala b/syntax/src/main/scala/org/enso/syntax/text/parser/AST.scala similarity index 100% rename from enso-lexer/src/main/scala/org/enso/syntax/text/parser/AST.scala rename to syntax/src/main/scala/org/enso/syntax/text/parser/AST.scala diff --git a/enso-lexer/src/main/scala/org/enso/syntax/text/parser/Parser.scala b/syntax/src/main/scala/org/enso/syntax/text/parser/Parser.scala similarity index 100% rename from enso-lexer/src/main/scala/org/enso/syntax/text/parser/Parser.scala rename to syntax/src/main/scala/org/enso/syntax/text/parser/Parser.scala diff --git a/enso-lexer/src/main/scala/org/enso/syntax/text/parser/rules.y b/syntax/src/main/scala/org/enso/syntax/text/parser/rules.y similarity index 100% rename from enso-lexer/src/main/scala/org/enso/syntax/text/parser/rules.y rename to syntax/src/main/scala/org/enso/syntax/text/parser/rules.y diff --git a/enso-lexer/src/test/scala/org/enso/syntax/text/Lexer.scala b/syntax/src/test/scala/org/enso/syntax/text/Lexer.scala similarity index 100% rename from enso-lexer/src/test/scala/org/enso/syntax/text/Lexer.scala rename to syntax/src/test/scala/org/enso/syntax/text/Lexer.scala