Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: tools/spec_parser/Makefile

Issue 2688903004: Creating an ANTLR grammar for Dart, potentially the syntax spec.
Patch Set: Enabled parsing many files from one JVM process Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/spec_parser/.gitignore ('k') | tools/spec_parser/SpecParser.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/spec_parser/Makefile
diff --git a/tools/spec_parser/Makefile b/tools/spec_parser/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..f91e7d3e366676f9d12c8272596f904df23232c9
--- /dev/null
+++ b/tools/spec_parser/Makefile
@@ -0,0 +1,34 @@
+# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+GRAMMAR=../../docs/language/Dart.g
+JAVA_PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin
+JAVA=$(JAVA_PATH)/java
+JAVAC=javac
+ANTLR_JAR=/usr/share/java/antlr3-runtime.jar
+ANTLR_FILES=DartLexer.java DartParser.java Dart.tokens
+ANTLR_CMD=PATH=$(JAVA_PATH):$(PATH) antlr3 -dfa -fo . $<
+JAVA_FILES=DartLexer.java DartParser.java
+CLASS_FILES=SpecParser.class SpecParserRunner.class DartLexer.class DartParser.class
+
+.PHONY: default parser clean touch parse_hello
+
+default: $(JAVA_FILES)
+
+parser: SpecParser.class
+
+SpecParser.class: $(ANTLR_FILES) SpecParser.java
+ $(JAVAC) -cp .:$(ANTLR_JAR) SpecParser.java
+
+%Lexer.java: ../../docs/language/%.g Makefile ; $(ANTLR_CMD)
+
+%Parser.java: ../../docs/language/%.g Makefile ; $(ANTLR_CMD)
+
+%.tokens: ../../docs/language/%.g Makefile ; $(ANTLR_CMD)
+
+clean:
+ rm -f $(CLASS_FILES) $(ANTLR_FILES)
+
+touch:
+ touch $(GRAMMAR)
« no previous file with comments | « tools/spec_parser/.gitignore ('k') | tools/spec_parser/SpecParser.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698