Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
S-attributed grammar
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Unreferenced stub|auto=yes|date=December 2009}} '''S-attributed grammars''' are a class of [[attribute grammar]]s characterized by having no [[Attribute_grammar#Inherited_attributes| inherited attribute]]s, but only [[Attribute_grammar#Synthesized_attributes| synthesized attribute]]s. Inherited attributes, which must be passed down from parent nodes to children nodes of the [[abstract syntax tree]] during the [[Semantic analysis (computer science)|semantic analysis]] of the [[parsing]] process, are a problem for [[bottom-up parsing]] because in bottom-up parsing, the parent nodes of the abstract syntax tree are created ''after'' creation of all of their children. Attribute evaluation in S-attributed grammars can be incorporated conveniently in both [[top-down parsing]] and [[bottom-up parsing]]. Specifications for parser generators in the [[Yacc]] family can be broadly considered S-attributed grammars. However, these parser generators usually include the capacity to reference global variables and/or fields from within any given grammar rule, meaning that this is not a ''pure'' S-attributed approach. Any S-attributed grammar is also an [[L-attributed grammar]]. ==See also== * [[Attribute grammar]] {{DEFAULTSORT:S-Attributed Grammar}} [[Category:Formal languages]] [[Category:Compiler construction]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Unreferenced stub
(
edit
)