Skip to content

Commit

Permalink
Bundle cup runtime, do not download other parser jars.
Browse files Browse the repository at this point in the history
  • Loading branch information
zafer-esen committed Nov 20, 2023
1 parent 84a193b commit e33d1ff
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion acsl-parser/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PARSER_BASEDIR=$(shell pwd)
PARSER_LIBDIR=$(PARSER_BASEDIR)/../lib
PARSER_LIBDIR=$(PARSER_BASEDIR)/../cc-parser/lib
PARSER_BINDIR=$(PARSER_BASEDIR)/bin

CUP = java_cup.Main
Expand Down
11 changes: 0 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,18 @@ lazy val commonSettings = Seq(
useCoursier := false
)

// Jar files for the parsers

lazy val parserSettings = Seq(
publishArtifact in packageDoc := false,
publishArtifact in packageSrc := false,
exportJars := true,
crossPaths := true
)

// Parser generation
val downloadJarsTask = taskKey[Unit]("Downloads the necessary JAR files using make.")

lazy val ccParser = (project in file("cc-parser")).
settings(commonSettings: _*).
settings(parserSettings: _*).
settings(
name := "TriCera-CC-parser",
downloadJarsTask := {
val s: TaskStreams = streams.value
s.log.info("Downloading parser dependencies...")
Process("make download-jars", baseDirectory.value).!
},
(compile in Compile) := ((compile in Compile) dependsOn downloadJarsTask).value,
packageBin in Compile := baseDirectory.value / "cc-parser.jar",
unmanagedJars in Compile += baseDirectory.value / "cc-parser.jar"
).disablePlugins(AssemblyPlugin)
Expand Down
2 changes: 1 addition & 1 deletion cc-parser/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PARSER_BASEDIR=$(shell pwd)
PARSER_LIBDIR=$(PARSER_BASEDIR)/../lib
PARSER_LIBDIR=$(PARSER_BASEDIR)/lib
PARSER_BINDIR=$(PARSER_BASEDIR)/bin

CUP = java_cup.Main
Expand Down
9 changes: 9 additions & 0 deletions lib/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CUP Parser Generator Copyright Notice, License, and Disclaimer
Copyright 1996-2015 by Scott Hudson, Frank Flannery, C. Scott Ananian, Michael Petter

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the names of the authors or their employers not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

The authors and their employers disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the authors or their employers be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software.
This is an open source license. It is also GPL-Compatible (see entry for "Standard ML of New Jersey"). The portions of CUP output which are hard-coded into the CUP source code are (naturally) covered by this same license, as is the CUP runtime code linked with the generated parser.

Java is a trademark of Sun Microsystems, Inc. References to the Java programming language in relation to JLex are not meant to imply that Sun endorses this product.
Binary file added lib/java-cup-11b-runtime.jar
Binary file not shown.

0 comments on commit e33d1ff

Please sign in to comment.