Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look at my bounty! #6

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
14 changes: 12 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,18 @@ This step is optional, but highly recommended for users working with a version o
These versions of Visual Studio do not support the NuGet Package Manager extension, but the C# target for ANTLR 4 does support .NET 2.0 and higher so you should be able to use the [command line NuGet utility](http://docs.nuget.org/docs/start-here/installing-nuget) instead of working directly within Visual Studio.

### Step 4: Install ANTLR 4 support in a C# project

#### For nearly all Visual Studio 2010 and newer installations
#### For Visual Studio 2017
1. Create or open a C# project which will use ANTLR
2. Right click the top-level solution node in the Solution Explorer window and select **Manage NuGet Packages for Solution...**
3. In the upper left, choose **Browse** and then choose **nuget.org** as the **Package source**
4. Next to the **Search** box, check **Include prerelease**
5. In the **Search** box, type **Antlr4** to search for the package
6. In the search results, locate and select the package called **Antlr4**. Verify that the name is listed as exactly **Antlr4**.
7. In the right pane, select the C# projects you want to use ANTLR4 by clicking their checkboxes
8. Click **Install** under the list of projects
9. Approve changes and accept license agreements, if prompted.

#### For nearly all Visual Studio 2010 - 2015 installations

1. Create or open a C# project which will use ANTLR
2. Right click the top-level solution node in the Solution Explorer window and select **Manage NuGet Packages for Solution...**
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ build_script:
test_script:
- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory=runtime-suite" "C:\projects\antlr4cs\runtime\CSharp\Antlr4.Runtime.Test\bin\%CONFIGURATION%\net45\Antlr4.Runtime.Test.dll"
- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory=runtime-suite" "C:\projects\antlr4cs\runtime\CSharp\Antlr4.Runtime.Test\bin\%CONFIGURATION%\net452\Antlr4.Runtime.Test.dll"
- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory=runtime-suite" "C:\projects\antlr4cs\runtime\CSharp\Antlr4.Runtime.Test\bin\%CONFIGURATION%\net472\Antlr4.Runtime.Test.dll"
- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory=runtime-suite" "C:\projects\antlr4cs\runtime\CSharp\Antlr4.Runtime.Test\bin\%CONFIGURATION%\portable40-net40+sl5+win8+wp8+wpa81\Antlr4.Runtime.Test.dll"
- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory=runtime-suite" "C:\projects\antlr4cs\runtime\CSharp\Antlr4.Runtime.Test\bin\%CONFIGURATION%\net40\Antlr4.Runtime.Test.dll"
- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory=runtime-suite" "C:\projects\antlr4cs\runtime\CSharp\Antlr4.Runtime.Test\bin\%CONFIGURATION%\net35\Antlr4.Runtime.Test.dll"
Expand Down
19 changes: 13 additions & 6 deletions build/Antlr4.CodeGenerator.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\net45\Antlr3.Runtime.dll" target="tools\net45" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\net45\Tool\**\*.stg" target="tools\net45\Tool" />

<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Antlr4.dll" target="tools\netstandard" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Antlr4.Runtime.dll" target="tools\netstandard" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Antlr4.StringTemplate.dll" target="tools\netstandard" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Antlr3.Runtime.dll" target="tools\netstandard" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Tool\**\*.stg" target="tools\netstandard\Tool" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Antlr4.dll" target="tools\netstandard1.5" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Antlr4.Runtime.dll" target="tools\netstandard1.5" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Antlr4.StringTemplate.dll" target="tools\netstandard1.5" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Antlr3.Runtime.dll" target="tools\netstandard1.5" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard1.5\Tool\**\*.stg" target="tools\netstandard1.5\Tool" />

<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard2.0\Antlr4.dll" target="tools\netstandard2.0" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard2.0\Antlr4.Runtime.dll" target="tools\netstandard2.0" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard2.0\Antlr4.StringTemplate.dll" target="tools\netstandard2.0" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard2.0\Antlr3.Runtime.dll" target="tools\netstandard2.0" />
<file src="..\runtime\CSharp\Antlr4.Tool\bin\$Configuration$\netstandard2.0\Tool\**\*.stg" target="tools\netstandard2.0\Tool" />

<!-- Build Configuration -->

Expand All @@ -48,6 +54,7 @@
<!-- Build Tasks -->

<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\$Configuration$\net40\Antlr4BuildTasks.dll" target="tools\net40"/>
<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\$Configuration$\netstandard1.5\Antlr4BuildTasks.dll" target="tools\netstandard"/>
<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\$Configuration$\netstandard1.5\Antlr4BuildTasks.dll" target="tools\netstandard1.5"/>
<file src="..\runtime\CSharp\Antlr4BuildTasks\bin\$Configuration$\netstandard2.0\Antlr4BuildTasks.dll" target="tools\netstandard2.0"/>
</files>
</package>
5 changes: 5 additions & 0 deletions build/Antlr4.Runtime.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<group targetFramework="netstandard1.1">
<dependency id="NETStandard.Library" version="1.6.0"/>
</group>
<group targetFramework="netstandard2.0" />
</dependencies>
</metadata>
<files>
Expand Down Expand Up @@ -64,6 +65,10 @@
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\$Configuration$\netstandard1.1\Antlr4.Runtime.pdb" target="lib\netstandard1.1"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\$Configuration$\netstandard1.1\Antlr4.Runtime.xml" target="lib\netstandard1.1"/>

<file src="..\runtime\CSharp\Antlr4.Runtime\bin\$Configuration$\netstandard2.0\Antlr4.Runtime.dll" target="lib\netstandard2.0"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\$Configuration$\netstandard2.0\Antlr4.Runtime.pdb" target="lib\netstandard2.0"/>
<file src="..\runtime\CSharp\Antlr4.Runtime\bin\$Configuration$\netstandard2.0\Antlr4.Runtime.xml" target="lib\netstandard2.0"/>

<!-- Source Code -->

<file exclude="..\runtime\CSharp\Antlr4.Runtime\obj\**\*.cs" src="..\runtime\CSharp\Antlr4.Runtime\**\*.cs" target="src"/>
Expand Down
2 changes: 1 addition & 1 deletion build/DotnetValidation/DotnetValidation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net20;net30;net35;net35-cf;net40;net45;netcoreapp1.1;portable40-net40+sl5+win8+wp8+wpa81</TargetFrameworks>
<TargetFrameworks>net20;net30;net35;net35-cf;net40;net45;netcoreapp1.1;netcoreapp2.1;portable40-net40+sl5+win8+wp8+wpa81</TargetFrameworks>
<EnableDefaultNoneItems>False</EnableDefaultNoneItems>
<Antlr4UseCSharpGenerator>True</Antlr4UseCSharpGenerator>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion build/DotnetValidationJavaCodegen/DotnetValidation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net20;net30;net35;net35-cf;net40;net45;netcoreapp1.1;portable40-net40+sl5+win8+wp8+wpa81</TargetFrameworks>
<TargetFrameworks>net20;net30;net35;net35-cf;net40;net45;netcoreapp1.1;netcoreapp2.1;portable40-net40+sl5+win8+wp8+wpa81</TargetFrameworks>
<EnableDefaultNoneItems>False</EnableDefaultNoneItems>
<Antlr4UseCSharpGenerator>False</Antlr4UseCSharpGenerator>
</PropertyGroup>
Expand Down
21 changes: 20 additions & 1 deletion build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ If (-not (Test-Path $nuget)) {
mkdir '..\runtime\CSharp\.nuget'
}

$nugetSource = 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe'
$nugetSource = 'https://dist.nuget.org/win-x86-commandline/v5.7.0/nuget.exe'
Invoke-WebRequest $nugetSource -OutFile $nuget
If (-not $?) {
$host.ui.WriteErrorLine('Unable to download NuGet executable, aborting!')
Expand All @@ -131,6 +131,11 @@ If ($Logger) {
}

&$nuget 'restore' $SolutionPath -Project2ProjectTimeOut 1200
if (-not $?) {
$host.ui.WriteErrorLine('Restore failed, aborting!')
Exit $LASTEXITCODE
}

&$msbuild '/nologo' '/m' '/nr:false' "/t:$Target" $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" "/p:VisualStudioVersion=$VisualStudioVersion" "/p:KeyConfiguration=$KeyConfiguration" $SolutionPath
if (-not $?) {
$host.ui.WriteErrorLine('Build failed, aborting!')
Expand Down Expand Up @@ -187,6 +192,13 @@ If (-not $NoValidate) {
Exit $LASTEXITCODE
}

git 'clean' '-dxf' 'DotnetValidationJavaCodegen'
dotnet 'run' '--project' '.\DotnetValidationJavaCodegen\DotnetValidation.csproj' '--framework' 'netcoreapp2.1'
if (-not $?) {
$host.ui.WriteErrorLine('Build failed, aborting!')
Exit $LASTEXITCODE
}

git 'clean' '-dxf' 'DotnetValidationJavaCodegen'
&$nuget 'restore' 'DotnetValidationJavaCodegen'
&$msbuild '/nologo' '/m' '/nr:false' '/t:Rebuild' $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" '.\DotnetValidationJavaCodegen\DotnetValidation.sln'
Expand Down Expand Up @@ -241,6 +253,13 @@ If (-not $NoValidate) {
Exit $LASTEXITCODE
}

git 'clean' '-dxf' 'DotnetValidation'
dotnet 'run' '--project' '.\DotnetValidation\DotnetValidation.csproj' '--framework' 'netcoreapp2.1'
if (-not $?) {
$host.ui.WriteErrorLine('Build failed, aborting!')
Exit $LASTEXITCODE
}

git 'clean' '-dxf' 'DotnetValidation'
&$nuget 'restore' 'DotnetValidation'
&$msbuild '/nologo' '/m' '/nr:false' '/t:Rebuild' $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" '.\DotnetValidation\DotnetValidation.sln'
Expand Down
13 changes: 12 additions & 1 deletion runtime/CSharp/Antlr4.Runtime.Test/Antlr4.Runtime.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

<PropertyGroup>
<!-- Note: net452 is used for testing the netstandard1.1 target. -->
<TargetFrameworks>net20;net30;net35;portable40-net40+sl5+win8+wp8+wpa81;net40;net45;net452</TargetFrameworks>
<!-- Note: net472 is used for testing the netstandard2.0 target. -->
<TargetFrameworks>net20;net30;net35;portable40-net40+sl5+win8+wp8+wpa81;net40;net45;net452;net472</TargetFrameworks>
<EnableDefaultNoneItems>False</EnableDefaultNoneItems>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>

Expand Down Expand Up @@ -109,6 +110,16 @@
</ProjectReference>
</ItemGroup>
</When>
<When Condition="'$(TargetFramework)' == 'net472'">
<PropertyGroup>
<DefineConstants>$(DefineConstants);NET45;NET45PLUS;NET40PLUS;NET35PLUS;NET30PLUS;NET20PLUS</DefineConstants>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Antlr4.Runtime\Antlr4.Runtime.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
</ItemGroup>
</When>
</Choose>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.1;net20;net30;net35-cf;net35-client;portable40-net40+sl5+win8+wp8+wpa81;net40-client;net45</TargetFrameworks>
<TargetFrameworks>netstandard1.1;netstandard2.0;net20;net30;net35-cf;net35-client;portable40-net40+sl5+win8+wp8+wpa81;net40-client;net45</TargetFrameworks>
<EnableDefaultNoneItems>False</EnableDefaultNoneItems>

<AssemblyVersion>4.6.0.0</AssemblyVersion>
Expand Down
2 changes: 1 addition & 1 deletion runtime/CSharp/Antlr4.Runtime/AntlrFileStream.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved.
// Licensed under the BSD License. See LICENSE.txt in the project root for license information.

#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0

using Antlr4.Runtime.Misc;
using Antlr4.Runtime.Sharpen;
Expand Down
2 changes: 1 addition & 1 deletion runtime/CSharp/Antlr4.Runtime/Atn/ATNState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public virtual void AddTransition(int index, Antlr4.Runtime.Atn.Transition e)
{
if (epsilonOnlyTransitions != e.IsEpsilon)
{
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
System.Console.Error.WriteLine("ATN state {0} has both epsilon and non-epsilon transitions.", stateNumber);
#endif
epsilonOnlyTransitions = false;
Expand Down
4 changes: 2 additions & 2 deletions runtime/CSharp/Antlr4.Runtime/Atn/LexerATNSimulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Antlr4.Runtime.Atn
/// <summary>"dup" of ParserInterpreter</summary>
public class LexerATNSimulator : ATNSimulator
{
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
public const bool debug = false;

public const bool dfa_debug = false;
Expand Down Expand Up @@ -247,7 +247,7 @@ protected internal virtual int ExecATN([NotNull] ICharStream input, [NotNull] DF
protected internal virtual DFAState GetExistingTargetState([NotNull] DFAState s, int t)
{
DFAState target = s.GetTarget(t);
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
if (debug && target != null)
{
System.Console.Out.WriteLine("reuse state " + s.stateNumber + " edge to " + target.stateNumber);
Expand Down
18 changes: 9 additions & 9 deletions runtime/CSharp/Antlr4.Runtime/Atn/ParserATNSimulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ namespace Antlr4.Runtime.Atn
public class ParserATNSimulator : ATNSimulator
{
#pragma warning disable 0162 // Unreachable code detected
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
public const bool debug = false;

public const bool dfa_debug = false;
Expand Down Expand Up @@ -566,7 +566,7 @@ protected internal virtual int ExecDFA([NotNull] DFA dfa, [NotNull] ITokenStream
DFAState target = GetExistingTargetState(s, t);
if (target == null)
{
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
if (dfa_debug && t >= 0)
{
System.Console.Out.WriteLine("no edge for " + parser.Vocabulary.GetDisplayName(t));
Expand Down Expand Up @@ -1793,15 +1793,15 @@ protected internal virtual BitSet EvalSemanticContext([NotNull] DFAState.PredPre
continue;
}
bool evaluatedResult = EvalSemanticContext(pair.pred, outerContext, pair.alt);
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
if (debug || dfa_debug)
{
System.Console.Out.WriteLine("eval pred " + pair + "=" + evaluatedResult);
}
#endif
if (evaluatedResult)
{
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
if (debug || dfa_debug)
{
System.Console.Out.WriteLine("PREDICT " + pair.alt);
Expand Down Expand Up @@ -2385,7 +2385,7 @@ public virtual string GetLookaheadName(ITokenStream input)
return GetTokenName(input.La(1));
}

#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
public virtual void DumpDeadEndConfigs([NotNull] NoViableAltException nvae)
{
System.Console.Error.WriteLine("dead end configs: ");
Expand Down Expand Up @@ -2570,7 +2570,7 @@ protected internal virtual DFAState AddDFAState([NotNull] DFA dfa, [NotNull] ATN
return newState;
}
DFAState added = dfa.AddState(newState);
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
if (debug && added == newState)
{
System.Console.Out.WriteLine("adding new DFA state: " + newState);
Expand All @@ -2587,7 +2587,7 @@ protected internal virtual DFAState CreateDFAState([NotNull] DFA dfa, [NotNull]

protected internal virtual void ReportAttemptingFullContext([NotNull] DFA dfa, [Nullable] BitSet conflictingAlts, [NotNull] SimulatorState conflictState, int startIndex, int stopIndex)
{
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
if (debug || retry_debug)
{
Interval interval = Interval.Of(startIndex, stopIndex);
Expand All @@ -2602,7 +2602,7 @@ protected internal virtual void ReportAttemptingFullContext([NotNull] DFA dfa, [

protected internal virtual void ReportContextSensitivity([NotNull] DFA dfa, int prediction, [NotNull] SimulatorState acceptState, int startIndex, int stopIndex)
{
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
if (debug || retry_debug)
{
Interval interval = Interval.Of(startIndex, stopIndex);
Expand All @@ -2620,7 +2620,7 @@ protected internal virtual void ReportAmbiguity([NotNull] DFA dfa, DFAState D, i
{
// the DFA state from execATN() that had SLL conflicts
// configs that LL not SLL considered conflicting
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
if (debug || retry_debug)
{
Interval interval = Interval.Of(startIndex, stopIndex);
Expand Down
2 changes: 1 addition & 1 deletion runtime/CSharp/Antlr4.Runtime/ConsoleErrorListener.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved.
// Licensed under the BSD License. See LICENSE.txt in the project root for license information.

#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0

using Antlr4.Runtime.Sharpen;

Expand Down
2 changes: 1 addition & 1 deletion runtime/CSharp/Antlr4.Runtime/DefaultErrorStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public virtual void ReportError(Parser recognizer, RecognitionException e)
}
else
{
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
System.Console.Error.WriteLine("unknown recognition error type: " + e.GetType().FullName);
#endif
NotifyErrorListeners(recognizer, e.Message, e);
Expand Down
4 changes: 2 additions & 2 deletions runtime/CSharp/Antlr4.Runtime/Misc/RuleDependencyChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ private RuleDependencyChecker()
{
}

#if PORTABLE
#if PORTABLE && !NETSTANDARD2_0
public interface ICustomAttributeProvider
{
object[] GetCustomAttributes(Type attributeType, bool inherit);
Expand Down Expand Up @@ -1012,7 +1012,7 @@ private RuleDependencyChecker()
{
}

#if PORTABLE
#if PORTABLE && !NETSTANDARD2_0
public interface ICustomAttributeProvider
{
object[] GetCustomAttributes(Type attributeType, bool inherit);
Expand Down
10 changes: 5 additions & 5 deletions runtime/CSharp/Antlr4.Runtime/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Antlr4.Runtime
/// <summary>This is all the parsing support code essentially; most of it is error recovery stuff.</summary>
public abstract class Parser : Recognizer<IToken, ParserATNSimulator>
{
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
public class TraceListener : IParseTreeListener
{
public virtual void EnterEveryRule(ParserRuleContext ctx)
Expand Down Expand Up @@ -122,7 +122,7 @@ public virtual void ExitEveryRule(ParserRuleContext ctx)
/// <seealso cref="BuildParseTree"/>
protected internal bool _buildParseTrees = true;

#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
/// <summary>
/// When
/// <see cref="Trace"/>
Expand Down Expand Up @@ -183,7 +183,7 @@ public virtual void Reset()
_ctx = null;
_syntaxErrors = 0;
matchedEOF = false;
#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
Trace = false;
#endif
_precedenceStack.Clear();
Expand Down Expand Up @@ -1131,7 +1131,7 @@ public virtual IList<string> GetDFAStrings()
return s;
}

#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
/// <summary>For debugging and other purposes.</summary>
public virtual void DumpDFA()
{
Expand Down Expand Up @@ -1199,7 +1199,7 @@ public virtual bool Profile
}
}

#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
/// <summary>
/// During a parse is sometimes useful to listen in on the rule entry and exit
/// events as well as token matches.
Expand Down
2 changes: 1 addition & 1 deletion runtime/CSharp/Antlr4.Runtime/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

#if !PORTABLE
#if !PORTABLE || NETSTANDARD2_0
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("bc228eb9-e79c-4e5a-a1b9-0434ea566bab")]
#endif
Expand Down
Loading