Merge branch 'master' into master

This commit is contained in:
Terence Parr 2018-07-13 17:44:53 -07:00 committed by GitHub
commit 171ef99e04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 18 deletions

View File

@ -181,5 +181,6 @@ YYYY/MM/DD, github id, Full name, email
2017/12/20, kbsletten, Kyle Sletten, kbsletten@gmail.com
2017/12/27, jkmar, Jakub Marciniszyn, marciniszyn.jk@gmail.com
2018/02/11, io7m, Mark Raynsford, code@io7m.com
2018/15/05, johnvanderholt, jan dillingh johnvanderholte@gmail.com
2018/23/05, srvance, Stephen Vance, steve@vance.com
2018/05/15, johnvanderholt, jan dillingh johnvanderholte@gmail.com
2018/05/23, srvance, Stephen Vance, steve@vance.com
2018/06/16, EternalPhane, Zongyuan Zuo, eternalphane@gmail.com

View File

@ -172,6 +172,7 @@ alias java='/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/bin/
alias javac='/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/bin/javac'
alias javadoc='/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/bin/javadoc'
alias jar='/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/bin/jar'
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
```
You should see 0x33 in generated .class files after 0xCAFEBABE; see [Java SE 7 = 51 (0x33 hex)](https://en.wikipedia.org/wiki/Java_class_file):

View File

@ -11,6 +11,3 @@ Any::~Any()
{
delete _ptr;
}
Any::Base::~Base() {
}

View File

@ -100,7 +100,7 @@ struct ANTLR4CPP_PUBLIC Any
private:
struct Base {
virtual ~Base();
virtual ~Base() {};
virtual Base* clone() const = 0;
};
@ -112,10 +112,21 @@ private:
T value;
Base* clone() const {
return clone<>();
}
private:
template<int N = 0, typename std::enable_if<N == N && std::is_nothrow_copy_constructible<T>::value, int>::type = 0>
Base* clone() const {
return new Derived<T>(value);
}
template<int N = 0, typename std::enable_if<N == N && !std::is_nothrow_copy_constructible<T>::value, int>::type = 0>
Base* clone() const {
return nullptr;
}
};
Base* clone() const

View File

@ -236,9 +236,12 @@ public class <parser.name> extends <superClass; null="Parser"> {
<endif>
public static final int
<parser.rules:{r | RULE_<r.name> = <r.index>}; separator=", ", wrap, anchor>;
public static final String[] ruleNames = {
<parser.ruleNames:{r | "<r>"}; separator=", ", wrap, anchor>
};
private static String[] makeRuleNames() {
return new String[] {
<parser.ruleNames:{r | "<r>"}; separator=", ", wrap, anchor>
};
}
public static final String[] ruleNames = makeRuleNames();
<vocabulary(parser.literalNames, parser.symbolicNames)>
@ -275,12 +278,18 @@ case <f.ruleIndex>:
>>
vocabulary(literalNames, symbolicNames) ::= <<
private static final String[] _LITERAL_NAMES = {
<literalNames:{t | <t>}; null="null", separator=", ", wrap, anchor>
};
private static final String[] _SYMBOLIC_NAMES = {
<symbolicNames:{t | <t>}; null="null", separator=", ", wrap, anchor>
};
private static String[] makeLiteralNames() {
return new String[] {
<literalNames:{t | <t>}; null="null", separator=", ", wrap, anchor>
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
<symbolicNames:{t | <t>}; null="null", separator=", ", wrap, anchor>
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
@ -914,9 +923,12 @@ public class <lexer.name> extends <superClass; null="Lexer"> {
<lexer.modes:{m| "<m>"}; separator=", ", wrap, anchor>
};
public static final String[] ruleNames = {
<lexer.ruleNames:{r | "<r>"}; separator=", ", wrap, anchor>
};
private static String[] makeRuleNames() {
return new String[] {
<lexer.ruleNames:{r | "<r>"}; separator=", ", wrap, anchor>
};
}
public static final String[] ruleNames = makeRuleNames();
<vocabulary(lexer.literalNames, lexer.symbolicNames)>