Merge branch 'sharpen'

This commit is contained in:
Sam Harwell 2013-02-16 20:14:15 -06:00
commit 41fb2cea3c
7 changed files with 23 additions and 13 deletions

View File

@ -328,7 +328,7 @@ namespace Antlr4.Runtime.Atn
!= null && !atn.decisionToState[decision].sll);
if (outerContext == null)
{
outerContext = ParserRuleContext.EmptyContext();
outerContext = ParserRuleContext.EmptyContext;
}
SimulatorState state = null;
if (!dfa.IsEmpty())
@ -397,7 +397,7 @@ namespace Antlr4.Runtime.Atn
{
if (outerContext == null)
{
outerContext = ParserRuleContext.EmptyContext();
outerContext = ParserRuleContext.EmptyContext;
}
int alt = 0;
int m = input.Mark();

View File

@ -27,6 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using Antlr4.Runtime;
using Antlr4.Runtime.Atn;

View File

@ -47,8 +47,7 @@ namespace Antlr4.Runtime.Atn
public SimulatorState(ParserRuleContext outerContext, DFAState s0, bool useContext
, ParserRuleContext remainingOuterContext)
{
this.outerContext = outerContext != null ? outerContext : ParserRuleContext.EmptyContext
();
this.outerContext = outerContext != null ? outerContext : ParserRuleContext.EmptyContext;
this.s0 = s0;
this.useContext = useContext;
this.remainingOuterContext = remainingOuterContext;

View File

@ -137,11 +137,14 @@ namespace Antlr4.Runtime
{
}
// public List<Integer> states;
public static Antlr4.Runtime.ParserRuleContext EmptyContext()
public static Antlr4.Runtime.ParserRuleContext EmptyContext
{
get
{
// public List<Integer> states;
return Empty;
}
}
/// <summary>COPY a ctx (I'm deliberately not using copy constructor)</summary>
public virtual void CopyFrom(Antlr4.Runtime.ParserRuleContext ctx)
@ -368,15 +371,21 @@ namespace Antlr4.Runtime
}
}
public virtual IToken GetStart()
public virtual IToken Start
{
get
{
return start;
}
}
public virtual IToken GetStop()
public virtual IToken Stop
{
get
{
return stop;
}
}
/// <summary>Used for rule context info debugging during parse-time, not so much for ATN debugging
/// </summary>

View File

@ -268,7 +268,7 @@ namespace Antlr4.Runtime
public string ToString<_T0>(Recognizer<_T0> recog)
{
return ToString(recog, ParserRuleContext.EmptyContext());
return ToString(recog, ParserRuleContext.EmptyContext);
}
public string ToString(IList<string> ruleNames)

@ -1 +1 @@
Subproject commit 6743730f698969a938bec3ec2c42c4728a97256c
Subproject commit 7cb2b4c6841ec131fadca8e294668113943b91a4

View File

@ -99,6 +99,7 @@
-methodMapping java.io.IOException.IOException(java.lang.Throwable) Sharpen.Extensions.CreateIOException
-fieldMapping java.util.Locale.US InvariantCulture
-typeMapping java.lang.Comparable System.IComparable
-typeMapping java.lang.Comparable<> System.IComparable
-typeMapping java.util.Comparator<> System.Collections.Generic.IComparer
-typeMapping java.util.HashSet<> System.Collections.Generic.HashSet
-typeMapping java.util.Set<> System.Collections.Generic.ISet