mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
0c90e06932
This CL changes $SDK/tools/spec_parser/Dart.g to include grammar rules associated with the upcoming feature 'patterns'. Change-Id: I3c8a5404471b0957d8e2a2b833156e02bbd3607b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266628 Commit-Queue: William Hesse <whesse@google.com> Auto-Submit: Erik Ernst <eernst@google.com> Reviewed-by: William Hesse <whesse@google.com>
33 lines
915 B
Makefile
33 lines
915 B
Makefile
# 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=Dart.g
|
|
JAVA_PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin
|
|
JAVA=$(JAVA_PATH)/java
|
|
JAVAC=javac
|
|
ANTLR_JAR=/usr/share/java/antlr4-runtime.jar
|
|
ANTLR_FILES=DartLexer.java DartParser.java DartLexer.tokens
|
|
ANTLR_CMD=PATH=$(JAVA_PATH):$(PATH) antlr4 $<
|
|
GENERATED_JAVA_FILES=DartLexer.java DartParser.java
|
|
|
|
.PHONY: default parser clean touch parse_hello
|
|
|
|
default: $(GENERATED_JAVA_FILES) compile
|
|
|
|
compile: SpecParser.class
|
|
|
|
SpecParser.class: $(ANTLR_FILES) SpecParser.java
|
|
$(JAVAC) -cp .:$(ANTLR_JAR) SpecParser.java
|
|
|
|
%Lexer.java: %.g Makefile ; $(ANTLR_CMD)
|
|
|
|
%Parser.java: %.g Makefile ; $(ANTLR_CMD)
|
|
|
|
%.tokens: %.g Makefile ; $(ANTLR_CMD)
|
|
|
|
clean:
|
|
rm -f *.class $(ANTLR_FILES)
|
|
|
|
touch:
|
|
touch $(GRAMMAR)
|