When a production in a synth-fun grammar block isn't found, the parser prints an error, but then also throws an exception and dumps a nasty stack trace.
Message:
error: .\max-exp-i.sem:32:14: Not a valid constructor for production: (Start E ... A)
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.InvalidOperationException: Not a valid constructor for production: (Start E ... A)
at Semgus.Parser.Commands.SynthFunCommand.CreateGrammarFromForm(GrammarForm grammarForm) in D:\dev\semgus\temp\Semgus-Parser\ParserLibrary\Commands\SynthFunCommand.cs:line 138
at Semgus.Parser.Commands.SynthFunCommand.SynthFun(SmtIdentifier name, IList`1 args, SmtSort ret, GrammarForm grammarForm) in D:\dev\semgus\temp\Semgus-Parser\ParserLibrary\Commands\SynthFunCommand.cs:line 55
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Semgus.Parser.Reader.DestructuringHelper.TryDestructureAndInvoke(MethodInfo method, IConsOrNil form, Object instance) in D:\dev\semgus\temp\Semgus-Parser\ParserLibrary\Reader\DestructuringHelper.cs:line 36
at Semgus.Parser.SemgusParser.TryParse(ISemgusProblemHandler handler, Int32& errCount, TextWriter errorStream) in D:\dev\semgus\temp\Semgus-Parser\ParserLibrary\SemgusParser.cs:line 181
at Semgus.Parser.Program.Execute(ProcessingMode mode, OutputFormat format, Boolean test, String output, IEnumerable`1 inputs) in D:\dev\semgus\temp\Semgus-Parser\SemgusParser\Program.cs:line 114
at Semgus.Parser.Program.<>c.<Main>b__2_4(ProcessingMode mode, OutputFormat format, Boolean test, String output, String[] inputs, InvocationContext ctx) in D:\dev\semgus\temp\Semgus-Parser\SemgusParser\Program.cs:line 87
at System.CommandLine.Handler.<>c__DisplayClass6_0`6.<SetHandler>b__0(InvocationContext context)
at System.CommandLine.Invocation.AnonymousCommandHandler.<>c__DisplayClass2_0.<.ctor>g__Handle|0(InvocationContext context)
at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass18_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass13_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass20_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__19_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__6_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass9_0.<<UseExceptionHandler>b__0>d.MoveNext()
When a production in a
synth-fun
grammar block isn't found, the parser prints an error, but then also throws an exception and dumps a nasty stack trace.Message: