
Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: §wip/metasyntax/sdf-sdf/extracted
Source used for this grammar: Jurgen Vinju, Rob Economopoulos, Bert Lisser, Paul Klint, sdf2/syntax/*.sdf, February 2006 – July 2010
Grammar, Alias, Aliases, Symbol, CharRange, CharRanges, OptCharRanges, CharClass, Character, ATermAttribute, Attribute, Attributes, Production, Productions, Label, FunctionName, Definition, Module, Section, Sections, ModuleName, ImpSection, Imports, Import, Associativity, ArgumentIndicator, Group, Priority, Priorities, Renamings, Renaming, Lookahead, Lookaheads, Restriction, Restrictions, SDF, Symbols), 0 root (—), 1 top (SDF), 9 bottom (Sort 2, NumChar, ShortChar, StrCon 4, IdCon 2, ModuleId 2, SingleQuotedStrCon, NatCon 2, ATerm).[arrow], [alias], [list] 14, [start], [end], [left] 9, [right] 9, [aterm], [result] 2, [left-quote], [right-quote], [string], [ci-string], [fun], [arguments] 4, [params], [head] 3, [tail] 2, [sep] 2, [rest], [results], [from], [to], [from-prod], [to-prod], [parameters].Grammar ::=
"aliases" AliasesAlias ::=
Symbol [arrow]::"->" [alias]::SymbolAliases ::=
[list]::AliasGrammar ::= "lexical" "syntax" Productions
Grammar ::= "context-free" "syntax" Productions
Grammar ::=
"variables" ProductionsGrammar ::= "lexical" "variables" Productions
Symbol ::= "<" Symbol "-CF" ">"
Symbol ::= "<" Symbol "-LEX" ">"
Symbol ::= "<" Symbol "-VAR" ">"
Symbol ::=
"LAYOUT"Symbol ::= CharClass
CharRange ::= Character
CharRange ::=
[start]::Character "-" [end]::CharacterCharRanges ::= CharRange
CharRanges ::= [left]::CharRanges [right]::CharRanges
CharRanges ::= "(" CharRanges ")"
OptCharRanges ::= ε
OptCharRanges ::= CharRanges
CharClass ::= "[" OptCharRanges "]"
CharClass ::=
"~" CharClassCharClass ::=
[left]::CharClass "/" [right]::CharClassCharClass ::=
[left]::CharClass "/\" [right]::CharClassCharClass ::=
[left]::CharClass "/" [right]::CharClassCharClass ::= "(" CharClass ")"
Character ::= NumChar
Character ::= ShortChar
Character ::=
"TOP"Character ::=
"EOF"Character ::=
"BOT"Character ::=
"LABEL_START"Grammar ::=
"(/)"Grammar ::= [left]::Grammar [right]::Grammar
Grammar ::= "(" Grammar ")"
ATermAttribute ::= [aterm]::ATerm
Attribute ::= ATermAttribute
Attributes ::= "{" [list]::Attribute "," Attribute "}"
Attributes ::= ε
Production ::=
Symbols "->" [result]::Symbol AttributesProductions ::=
[list]::ProductionGrammar ::=
"syntax" ProductionsLabel ::= StrCon
Label ::= IdCon
Symbol ::=
Label ":" SymbolSymbol ::= [left-quote]::"`" Symbol [right-quote]::"`"
FunctionName ::= IdCon
FunctionName ::= StrCon
Symbol ::= [string]::StrCon
Symbol ::= [ci-string]::SingleQuotedStrCon
Production ::= [fun]::FunctionName "(" [arguments]::Symbol "," Symbol ")" "->" [result]::Symbol Attributes
Definition ::=
[list]::ModuleModule ::= "module" ModuleName [list]::ImpSection Sections
Section ::=
"exports" GrammarSection ::=
"hiddens" GrammarSections ::=
[list]::SectionModuleName ::= ModuleId
ModuleName ::= ModuleId "[" [params]::Symbols "]"
Attribute ::= "id" "(" ModuleName ")"
ImpSection ::=
"imports" [list]::ImportsGrammar ::= ImpSection
Imports ::=
[list]::ImportImport ::= ModuleName
Import ::= ModuleName Renamings
Import ::= "(" Import ")"
Associativity ::=
"left"Associativity ::=
"right"Associativity ::=
"non-assoc"Associativity ::=
"assoc"Attribute ::=
"bracket"Attribute ::= Associativity
ArgumentIndicator ::= "<" [arguments]::NatCon "," NatCon ">"
Group ::= Group ArgumentIndicator
Group ::=
Group "."Group ::= Production
Group ::= "{" Productions "}"
Group ::= "{" Associativity ":" Productions "}"
Priority ::= [list]::Group ">" Group
Priority ::= [left]::Group Associativity [right]::Group
Priorities ::= [list]::Priority "," Priority
Grammar ::=
"priorities" PrioritiesSymbol ::= "(" ")"
Symbol ::= "(" [head]::Symbol [tail]::Symbol ")"
Symbol ::=
Symbol "?"Symbol ::=
Symbol "+"Symbol ::=
Symbol "*"Symbol ::= "{" Symbol [sep]::Symbol "}" "+"
Symbol ::= "{" Symbol [sep]::Symbol "}" "*"
Symbol ::= "<" [head]::Symbol "," [rest]::Symbol "," Symbol ">"
Symbol ::= "(" [arguments]::Symbols "=>" [results]::Symbol ")"
Symbol ::=
[left]::Symbol "|" [right]::SymbolSymbol ::= "(" [left]::Symbol "->" [right]::Symbol ")"
Symbol ::=
Symbol "?"Symbol ::=
Symbol "*"Symbol ::=
Symbol "+"Renamings ::= "[" [list]::Renaming "]"
Renaming ::=
[from]::Symbol "=>" [to]::SymbolRenaming ::=
[from-prod]::Production "=>" [to-prod]::ProductionLookahead ::= CharClass
Lookahead ::=
[head]::CharClass "." [tail]::LookaheadsLookaheads ::= Lookahead
Lookaheads ::=
[left]::Lookaheads "|" [right]::LookaheadsLookaheads ::= "(" Lookaheads ")"
Lookaheads ::= "[[" [list]::Lookahead "," Lookahead "]]"
Restriction ::=
Symbols "-/-" LookaheadsRestrictions ::=
[list]::RestrictionGrammar ::=
"restrictions" RestrictionsAttribute ::=
"reject"Attribute ::=
"prefer"Attribute ::=
"avoid"Symbol ::=
"<START>"Symbol ::=
"<Start>"Grammar ::= "lexical" "priorities" Priorities
Grammar ::= "context-free" "priorities" Priorities
Grammar ::= "lexical" "restrictions" Restrictions
Grammar ::= "context-free" "restrictions" Restrictions
SDF ::=
"definition" DefinitionModuleName ::=
"aliases"ModuleName ::=
"lexical"ModuleName ::=
"priorities"ModuleName ::=
"context-free"ModuleName ::=
"definition"ModuleName ::=
"syntax"ModuleName ::=
"variables"ModuleName ::=
"module"ModuleName ::=
"imports"ModuleName ::=
"exports"ModuleName ::=
"hiddens"ModuleName ::=
"left"ModuleName ::=
"right"ModuleName ::=
"assoc"ModuleName ::=
"non-assoc"ModuleName ::=
"bracket"ModuleName ::=
"sorts"ModuleName ::=
"bracket"ModuleName ::=
"sorts"ModuleName ::=
"restrictions"Symbols ::= StrCon "(" [arguments]::Symbol "," Symbol ")"
Label ::= Associativity
ATermAttribute ::= Associativity
ATermAttribute ::=
"reject"ATermAttribute ::=
"prefer"ATermAttribute ::=
"avoid"ATermAttribute ::=
"bracket"ATermAttribute ::= "id" "(" ModuleName ")"
Symbol ::=
"<START>"Symbol ::=
"<Start>"Grammar ::= "lexical" "priorities" Priorities
Grammar ::= "context-free" "priorities" Priorities
Grammar ::= "lexical" "restrictions" Restrictions
Grammar ::= "context-free" "restrictions" Restrictions
SDF ::=
"definition" DefinitionSymbol ::= Sort
Symbol ::= Sort "[[" [parameters]::Symbol "," Symbol "]]"
Grammar ::=
"sorts" SymbolsGrammar ::=
"start-symbols" SymbolsGrammar ::= "lexical" "start-symbols" Symbols
Grammar ::= "context-free" "start-symbols" Symbols
Symbol ::= "(" Symbol ")"
Symbols ::=
[list]::Symbol