Hi,
I've been trying the Abnf.g4 use case described, inside a linux container.
docker run -it mcr.microsoft.com/dotnet/sdk:10.0
for t in trcaret trclonereplace trcombine trconvert trcover trfoldlit trgen trgenvsc trglob triconv tritext trjson trparse trperf trquery trrename trsort trsplit trsponge trtext trtokens trtree trunfold trwdog trxml trxml2 trprint; do
dotnet tool install -g $t
done
export PATH="$PATH:/root/.dotnet/tools"
cat < ~/Abnf.g4
...
EOF
~# trparse Abnf.g4 | trconvert -t lark
CSharp 0 Abnf.g4 success 0.028039
Unhandled conversion to.
[]
~# trparse Abnf.g4 | trconvert -t lark | trprint > Abnf.lark
CSharp 0 Abnf.g4 success 0.0245748
System.Text.Json.JsonException: 'U' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: 'U' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.Deserialize(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo1 jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo`1 jsonTypeInfo)
at Trash.Command.Execute(Config config) in C:\Users\Kenne\Documents\GitHub\Domemtech.Trash\src\trprint\Command.cs:line 44
at Trash.Program.MainInternal(String[] args) in C:\Users\Kenne\Documents\GitHub\Domemtech.Trash\src\trprint\Program.cs:line 72
at Trash.Program.Main(String[] args) in C:\Users\Kenne\Documents\GitHub\Domemtech.Trash\src\trprint\Program.cs:line 16
inside my container: dotnet --version
10.0.203
Hi,
I've been trying the Abnf.g4 use case described, inside a linux container.
docker run -it mcr.microsoft.com/dotnet/sdk:10.0
for t in trcaret trclonereplace trcombine trconvert trcover trfoldlit trgen trgenvsc trglob triconv tritext trjson trparse trperf trquery trrename trsort trsplit trsponge trtext trtokens trtree trunfold trwdog trxml trxml2 trprint; do
dotnet tool install -g $t
done
export PATH="$PATH:/root/.dotnet/tools"
cat < ~/Abnf.g4
...
EOF
~# trparse Abnf.g4 | trconvert -t lark
CSharp 0 Abnf.g4 success 0.028039
Unhandled conversion to.
[]
~# trparse Abnf.g4 | trconvert -t lark | trprint > Abnf.lark
CSharp 0 Abnf.g4 success 0.0245748
System.Text.Json.JsonException: 'U' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: 'U' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan
1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.Deserialize(Utf8JsonReader& reader, ReadStack& state)at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan
1 utf8Json, JsonTypeInfo1 jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo`1 jsonTypeInfo)at Trash.Command.Execute(Config config) in C:\Users\Kenne\Documents\GitHub\Domemtech.Trash\src\trprint\Command.cs:line 44
at Trash.Program.MainInternal(String[] args) in C:\Users\Kenne\Documents\GitHub\Domemtech.Trash\src\trprint\Program.cs:line 72
at Trash.Program.Main(String[] args) in C:\Users\Kenne\Documents\GitHub\Domemtech.Trash\src\trprint\Program.cs:line 16
inside my container: dotnet --version
10.0.203