The following sharing constraints will exist:(* always present *) signature TOKEN signature LR_TABLE signature STREAM signature LR_PARSER signature PARSER_DATA structure LrParser : LR_PARSER (* signatures generated by ML-Yacc *) signature {n}_TOKENS signature {n}_LRVALS (* structures created by you *) structure {n}LrVals : {n}_LRVALS structure Lex : LEXER structure {n}Parser : PARSER
If you used a lexer which takes an argument, then you will have:sharing {n}Parser.Token = LrParser.Token = {n}LrVals.ParserData.Token sharing {n}Parser.Stream = LrParser.Stream sharing type {n}Parser.arg = {n}LrVals.ParserData.arg sharing type {n}Parser.result = {n}LrVals.ParserData.result sharing type {n}Parser.pos = {n}LrVals.ParserData.pos = Lex.UserDeclarations.pos sharing type {n}Parser.svalue = {n}LrVals.ParserData.svalue = {n}LrVals.Tokens.svalue = Lex.UserDeclarations.svalue sharing type {n}Parser.Token.token = {n}LrVals.ParserData.Token.token = LrParser.Token.token = Lex.UserDeclarations.token sharing {n}LrVals.LrTable = LrParser.LrTable
structure ARG_LEXER structure {n}Parser : PARSER (* additional sharing constraint *) sharing type {n}Parser.lexarg = Lex.UserDeclarations.arg