We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using string or character literals in context-free syntax causes the build to fail on signature generation. Such as the following example:
module start context-free start-symbols Start context-free sorts Start Word context-free syntax Start.Empty = <> Start.Program = Word* Word.Hello = "Hello" // Does not work Word.World = <World> // Templates do work syntax Word-CF.DoubleQuotedWord = "\"" Word-CF "\"" // Does not work Word-CF.QuotedWord = QUOTE-CF Word-CF QUOTE-CF // Does work lexical sorts QUOTE lexical syntax QUOTE = "'" LAYOUT = [\ \n\v\f\r] context-free restrictions LAYOUT? -/- [\ \n\v\f\r]
This example produces the following error (Note the occurences of nabl2.Var("./src/start.sdf3", "y_1-..."){OfSort(SORT("TYPE"))} in the AST):
nabl2.Var("./src/start.sdf3", "y_1-..."){OfSort(SORT("TYPE"))}
ERROR: Could not check Stratego because it could not be configured Exception of message: mb.spoofax.lwb.compiler.stratego.StrategoConfigureExceptions$Sdf3SignatureGenerateFail: SDF3 to signature generator failed Caused by: mb.stratego.common.StrategoExceptions$StrategyFail: Invoking Stratego strategy 'pp-stratego-string' failed Stratego stack trace: abox2text_list_1_2 abox2text_1_2 abox2text_0_1 box2text_string_0_1 pp_stratego_string_0_0 pp_stratego_string_0_0 Stratego input term: Module( "signatures/start-sig" , [ Imports([Import("libstratego-lib")]) , Signature( [ Sorts([SortNoArgs("Start"{TermIndex("./src/start.sdf3", 12)}), SortNoArgs("Word"{TermIndex("./src/start.sdf3", 14)})]{TermIndex("./src/start.sdf3", 19)}) , Sorts([SortNoArgs("QUOTE"{TermIndex("./src/start.sdf3", 154)})]{TermIndex("./src/start.sdf3", 158)}) , Constructors( [ OpDecl("Empty"{TermIndex("./src/start.sdf3", 24)}, ConstType(SortNoArgs("Start"{TermIndex("./src/start.sdf3", 22)}))) , OpDecl( "Program"{TermIndex("./src/start.sdf3", 41)} , FunType( [ConstType(Sort("List", [ConstType(SortNoArgs("Word"{TermIndex("./src/start.sdf3", 72)}))]))] , ConstType(SortNoArgs("Start"{TermIndex("./src/start.sdf3", 39)})) ) ) , OpDecl( "Hello"{TermIndex("./src/start.sdf3", 58)} , FunType([nabl2.Var("./src/start.sdf3", "y_1-225"){OfSort(SORT("TYPE"))}], ConstType(SortNoArgs("Word"{TermIndex("./src/start.sdf3", 56)}))) ) , OpDecl("World"{TermIndex("./src/start.sdf3", 74)}, ConstType(SortNoArgs("Word"{TermIndex("./src/start.sdf3", 72)}))) , OpDecl("Start-Plhdr", ConstType(SortNoArgs("Start"))) , OpDecl("Word-Plhdr", ConstType(SortNoArgs("Word"))) , OpDecl( "Start-Plhdr" , FunType([ConstType(SortNoArgs("COMPLETION-INSERTION"))], ConstType(SortNoArgs("Start"))) ) , OpDecl( "Word-Plhdr" , FunType([ConstType(SortNoArgs("COMPLETION-INSERTION"))], ConstType(SortNoArgs("Word"))) ) , OpDecl("Start-Opt-Plhdr", ConstType(SortNoArgs("Start"))) , OpDecl("Word-Opt-Plhdr", ConstType(SortNoArgs("Word"))) , OpDecl( "DoubleQuotedWord"{TermIndex("./src/start.sdf3", 103)} , FunType( [nabl2.Var("./src/start.sdf3", "y_1-139"){OfSort(SORT("TYPE"))}, ConstType(SortNoArgs("Word"{TermIndex("./src/start.sdf3", 72)})), nabl2.Var("./src/start.sdf3", "y_1-147"){OfSort(SORT("TYPE"))}] , ConstType(SortNoArgs("Word"{TermIndex("./src/start.sdf3", 100)})) ) ) , OpDecl( "QuotedWord"{TermIndex("./src/start.sdf3", 126)} , FunType( [ConstType(SortNoArgs("QUOTE"{TermIndex("./src/start.sdf3", 161)})), ConstType(SortNoArgs("Word"{TermIndex("./src/start.sdf3", 72)})), ConstType(SortNoArgs("QUOTE"{TermIndex("./src/start.sdf3", 161)}))] , ConstType(SortNoArgs("Word"{TermIndex("./src/start.sdf3", 123)})) ) ) , OpDecl("Word-Plhdr", ConstType(SortNoArgs("Word"))) , OpDecl("QUOTE-Plhdr", ConstType(SortNoArgs("QUOTE"))) , OpDecl( "Word-Plhdr" , FunType([ConstType(SortNoArgs("COMPLETION-INSERTION"))], ConstType(SortNoArgs("Word"))) ) , OpDecl( "QUOTE-Plhdr" , FunType([ConstType(SortNoArgs("COMPLETION-INSERTION"))], ConstType(SortNoArgs("QUOTE"))) ) , OpDeclInj(FunType([SortVar("string")], ConstType(SortNoArgs("QUOTE"{TermIndex("./src/start.sdf3", 161)})))) ] ) ] ) ] )
The text was updated successfully, but these errors were encountered:
Fixed in metaborg/sdf@eafe4ac
Sorry, something went wrong.
Gohla
No branches or pull requests
Using string or character literals in context-free syntax causes the build to fail on signature generation. Such as the following example:
This example produces the following error (Note the occurences of
nabl2.Var("./src/start.sdf3", "y_1-..."){OfSort(SORT("TYPE"))}
in the AST):The text was updated successfully, but these errors were encountered: