A plugin for sbt 0.13.x/1.0.x, generates Scala code based on a jflex specification.
This is inspired by sbt-jflex.
-
stable (recommended)
addSbtPlugin("com.github.3tty0n" % "sbt-jflex-scala" % "0.4.0")
-
development
addSbtPlugin("com.github.3tty0n" % "sbt-jflex-scala" % "0.4.1-SNAPSHOT")
Put your *.flex
file.
> jflexGenerate
then Yylex.scala
is generated in src/main/scala
.
If you execute compile
, Yylex.scala
will be generated in src/main/scala
automatically.
If the structure of your application is nonstandard:
.
├── build.sbt
├── flex
│ └── simple.flex
├── project
│ └── plugins.sbt
├── src
│ ├── Base.scala
│ └── Tokens.scala
└── test
jflexSourceDirectory := baseDirectory.value / "flex"
jflexOutputDirectory := baseDirectory.value / "src"
MIT