forked from jasder/antlr
Simplify the handling of SerializableAttribute in portable libraries
This commit is contained in:
parent
5924d1a9d2
commit
cbd5d1ae85
|
@ -188,6 +188,7 @@
|
|||
<Compile Include="Sharpen\AtomicReference`1.cs" />
|
||||
<Compile Include="Sharpen\BitSet.cs" />
|
||||
<Compile Include="Sharpen\Collections.cs" />
|
||||
<Compile Include="Sharpen\Compat\SerializableAttribute.cs" />
|
||||
<Compile Include="Sharpen\DictionaryExtensions.cs" />
|
||||
<Compile Include="Sharpen\ListExtensions.cs" />
|
||||
<Compile Include="Sharpen\Runtime.cs" />
|
||||
|
|
|
@ -193,6 +193,7 @@
|
|||
<Compile Include="Sharpen\Collections.cs" />
|
||||
<Compile Include="Sharpen\Compat\CollectionDebuggerView`2.cs" />
|
||||
<Compile Include="Sharpen\Compat\ConcurrentDictionary`2.cs" />
|
||||
<Compile Include="Sharpen\Compat\SerializableAttribute.cs" />
|
||||
<Compile Include="Sharpen\Compat\SplitOrderedList`2.cs" />
|
||||
<Compile Include="Sharpen\DictionaryExtensions.cs" />
|
||||
<Compile Include="Sharpen\ListExtensions.cs" />
|
||||
|
|
|
@ -193,6 +193,7 @@
|
|||
<Compile Include="Sharpen\Collections.cs" />
|
||||
<Compile Include="Sharpen\Compat\CollectionDebuggerView`2.cs" />
|
||||
<Compile Include="Sharpen\Compat\ConcurrentDictionary`2.cs" />
|
||||
<Compile Include="Sharpen\Compat\SerializableAttribute.cs" />
|
||||
<Compile Include="Sharpen\Compat\SplitOrderedList`2.cs" />
|
||||
<Compile Include="Sharpen\DictionaryExtensions.cs" />
|
||||
<Compile Include="Sharpen\ListExtensions.cs" />
|
||||
|
|
|
@ -44,9 +44,7 @@ namespace Antlr4.Runtime.Atn
|
|||
/// utility methods for analyzing configuration sets for conflicts and/or
|
||||
/// ambiguities.
|
||||
/// </remarks>
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public sealed class PredictionMode
|
||||
{
|
||||
/// <summary>The SLL(*) prediction mode.</summary>
|
||||
|
|
|
@ -34,9 +34,7 @@ using Antlr4.Runtime.Sharpen;
|
|||
|
||||
namespace Antlr4.Runtime
|
||||
{
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class CommonToken : IWritableToken
|
||||
{
|
||||
private const long serialVersionUID = -6708843461296520577L;
|
||||
|
|
|
@ -42,9 +42,7 @@ namespace Antlr4.Runtime
|
|||
/// Disambiguating predicate evaluation occurs when we test a predicate during
|
||||
/// prediction.
|
||||
/// </remarks>
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class FailedPredicateException : RecognitionException
|
||||
{
|
||||
private const long serialVersionUID = 5379330841495778709L;
|
||||
|
|
|
@ -40,9 +40,7 @@ namespace Antlr4.Runtime
|
|||
/// This signifies any kind of mismatched input exceptions such as
|
||||
/// when the current input does not match the expected token.
|
||||
/// </remarks>
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class InputMismatchException : RecognitionException
|
||||
{
|
||||
private const long serialVersionUID = 1532568338707443067L;
|
||||
|
|
|
@ -35,9 +35,7 @@ using Antlr4.Runtime.Sharpen;
|
|||
|
||||
namespace Antlr4.Runtime
|
||||
{
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class LexerNoViableAltException : RecognitionException
|
||||
{
|
||||
private const long serialVersionUID = -730999203913001726L;
|
||||
|
|
|
@ -34,9 +34,7 @@ using Antlr4.Runtime.Sharpen;
|
|||
|
||||
namespace Antlr4.Runtime.Misc
|
||||
{
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class MultiMap<K, V> : Dictionary<K, IList<V>>
|
||||
{
|
||||
private const long serialVersionUID = -4956746660057462312L;
|
||||
|
|
|
@ -48,9 +48,7 @@ namespace Antlr4.Runtime.Misc
|
|||
/// response to a parse error.
|
||||
/// </remarks>
|
||||
/// <author>Sam Harwell</author>
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class ParseCanceledException : OperationCanceledException
|
||||
{
|
||||
public ParseCanceledException()
|
||||
|
|
|
@ -44,9 +44,7 @@ namespace Antlr4.Runtime
|
|||
/// of the offending input and also knows where the parser was
|
||||
/// in the various paths when the error. Reported by reportNoViableAlternative()
|
||||
/// </remarks>
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class NoViableAltException : RecognitionException
|
||||
{
|
||||
private const long serialVersionUID = 5096000008992867052L;
|
||||
|
|
|
@ -43,9 +43,7 @@ namespace Antlr4.Runtime
|
|||
/// in the input, where it is in the ATN, the rule invocation stack,
|
||||
/// and what kind of problem occurred.
|
||||
/// </remarks>
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class RecognitionException : Exception
|
||||
{
|
||||
private const long serialVersionUID = -3861826954750022374L;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#if PORTABLE
|
||||
|
||||
namespace System
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)]
|
||||
internal sealed class SerializableAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -155,9 +155,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
|||
/// </summary>
|
||||
public class ParseTreePatternMatcher
|
||||
{
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class CannotInvokeStartRule : Exception
|
||||
{
|
||||
public CannotInvokeStartRule(Exception e)
|
||||
|
@ -166,9 +164,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
|||
}
|
||||
}
|
||||
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class StartRuleDoesNotConsumeFullPattern : Exception
|
||||
{
|
||||
// Fixes https://github.com/antlr/antlr4/issues/413
|
||||
|
|
|
@ -43,9 +43,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
|||
/// chunks where the
|
||||
/// tag corresponds to a lexer rule or token type.
|
||||
/// </summary>
|
||||
#if !PORTABLE
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public class TokenTagToken : CommonToken
|
||||
{
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue