Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Abstract syntax
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
{{More citations needed|date=November 2023}} In [[computer science]], the '''abstract syntax''' of data is its structure described as a [[data type]] (possibly, but not necessarily, an [[abstract data type]]), independent of any particular representation or encoding.<ref>{{Cite book |chapter-url=https://ieeexplore.ieee.org/document/782615 |access-date=2023-11-02 |date=1999 |doi=10.1109/LICS.1999.782615 |s2cid=7384052 |language=en-US |last1=Fiore |first1=M. |author2link = Gordon Plotkin|last2=Plotkin |first2=G. |last3=Turi |first3=D. |title=Proceedings. 14th [[Symposium on Logic in Computer Science]] (Cat. No. PR00158) |chapter=Abstract syntax and variable binding |pages=193β202 |isbn=0-7695-0158-3 }}</ref> This is particularly used in the representation of text in [[computer language]]s,<ref>{{cite book | chapter-url=https://dl.acm.org/doi/abs/10.5555/1267950.1267968 | chapter=ASTLOG: A language for examining abstract syntax trees |title=DSL'97: Proceedings of the Conference on Domain-Specific Languages on Conference on Domain-Specific Languages (DSL), 1997 |publisher= USENIX Association | date=15 October 1997 | page=18 }}</ref> which are generally stored in a tree structure as an [[abstract syntax tree]]. Abstract syntax, which only consists of the structure of data, is contrasted with [[concrete syntax]], which also includes information about the representation. For example, concrete syntax includes features like parentheses (for grouping) or commas (for lists), which are not included in the abstract syntax, as they are implicit in the structure. Abstract syntaxes are classified as '''first-order abstract syntax''' (FOAS), if the structure is abstract but names (identifiers) are still concrete (and thus requires [[Name resolution (programming languages)|name resolution]]), and ''[[higher-order abstract syntax]],'' if the names themselves are abstract.<ref>{{Cite journal |last1=Pfenning |first1=F. |author1link = Frank Pfenning|last2=Elliott |first2=C. |date=1988-06-01 |title=Higher-order abstract syntax |journal=[[ACM SIGPLAN Notices]] |volume=23 |issue=7 |pages=199β208 |doi=10.1145/960116.54010 |issn=0362-1340|doi-access=free }}</ref> ==Uses== To be implemented either for computation or communications, a mapping from the abstract syntax to specific machine representations and encodings must be defined; these may be called the "[[concrete syntax]]" (in language implementation)<ref>{{Cite book |last=Wile |first=David S. |title=Proceedings of the 19th international conference on Software engineering - ICSE '97 |chapter=Abstract syntax from concrete syntax |date=1997 |chapter-url=http://portal.acm.org/citation.cfm?doid=253228.253388 |language=en |publisher=ACM Press |pages=472β480 |doi=10.1145/253228.253388 |isbn=978-0-89791-914-2|s2cid=14351497 }}</ref> or the "transfer syntax" (in communications). A [[compiler]]'s internal representation of a program will typically be specified by an abstract syntax in terms of categories such as "statement", "expression" and "identifier". This is independent of the source syntax ('''concrete syntax''') of the language being compiled (though it will often be very similar). A [[parse tree]] is similar to an [[abstract syntax tree]] but it will typically also contain features such as parentheses, which are syntactically significant but which are implicit in the structure of the abstract syntax tree. [[Algebraic data type]]s are particularly well-suited to the implementation of abstract syntax.<ref>{{Cite journal |last1=Corradini |first1=Andrea |last2=Gadducci |first2=Fabio |title=A functorial semantics for multi-algebras and partial algebras, with applications to syntax |journal=Theoretical Computer Science |date=2002-09-17 |volume=286 |issue=2 |pages=293β322 |doi=10.1016/S0304-3975(01)00319-X |issn=0304-3975|doi-access=free }}</ref> ==See also== * [[Higher-order abstract syntax]] * [[Abstract Syntax Notation One]] ==References== {{Reflist}} [[Category:Programming language design]] [[Category:Programming language theory]] [[Category:Compiler construction]] [[Category:Syntax]] [[Category:Parsing]] {{prog-lang-stub}}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:More citations needed
(
edit
)
Template:Prog-lang-stub
(
edit
)
Template:Reflist
(
edit
)
Search
Search
Editing
Abstract syntax
Add topic