|
| |
| | Formal grammar - Wikipedia, the free encyclopedia |
 | | An analytic grammar, in contrast, is a set of rules that assume an arbitrary string to be given as input, and which successively reduce or analyze that input string yielding a final boolean, "yes/no" result indicating whether or not the input string is a member of the language described by the grammar. |  | | For example, for context-free grammars there are well-known algorithms to generate efficient LL parsers and LR parsers. |  | | Affix grammars and attribute grammars allow rewrite rules to be augmented with semantic attributes and operations, useful both for increasing grammar expressiveness and for constructing practical language translation tools. |
|
http://en.wikipedia.org/wiki/Formal_grammar
(1540 words)
|
|
| |
| | Attribute grammar - Wikipedia, the free encyclopedia |
 | | In a practical way, an attribute grammar defines the information that will need to be in the abstract syntax tree in order to successfully perform semantic analysis. |  | | When constructing a language translation tool, such as a compiler, an attribute grammar is the formal expression of the syntax-derived semantic checks associated with a grammar. |  | | The strength of attribute grammars is that they can transport information from anywhere in the abstract syntax tree to anywhere else, in a controlled way. |
|
http://en.wikipedia.org/wiki/Attribute_grammar
(314 words)
|
|
| |
| | Bibliography on Attribute Grammars |
 | | Attribute grammars for the heuristic translation of query languages. |  | | Attribute grammars are a useful formalism for the specification of computations on structured terms. |  | | The transformation engine of SIMON is an amalgamation of syntax-directed computation and content-oriented computation: the former is through higher-order (and related) extensions of attribute grammars, whereas the latter is done by externally defined programs and it is for computation not naturally amenable to the syntax-directed paradigm. |
|
http://www-rocq.inria.fr/oscar/www/fnc2/AGabstract.html
(9103 words)
|
|
| |
| | Program Transformation Wiki / Attribute Grammar |
 | | Attribute grammars were introduced by DonaldKnuth in 1968 for the definition of the semantics of (programming) languages. |  | | An attribute grammar is a specification that defines attributions of values to (abstract syntax) tree nodes. |  | | Attribute grammars are mainly useful for program analysis |
|
http://www.program-transformation.org/view/Transform/AttributeGrammar?rev=1.2
(82 words)
|
|
| |
| | [No title] |
 | | This attribute is computed from the attributes of sub-expressions. |  | | Evaluating Attributes - S attributed definitions are a very special case of attribute grammars - The most general method is to construct an ordering from the parse tree itself: Define a graph as follows. |  | | For each attribute E.a to be computed add a node in the graph. |
|
http://www.cs.berkeley.edu/~aiken/cs264/lectures/attribute-grammars
(2025 words)
|
|
| |
| | Speech Recognition Grammar Specification Version 1.0 |
 | | Grammar authors should consider the possibility that a grammar will be used to interpret input in a non-speech recognition device. |  | | A user agent is a grammar processor that accepts user input and matches that input against a grammar to produce a recognition result that represents the detected input. |  | | The grammars are intended for use by speech recognizers and other grammar processors so that developers can specify the words and patterns of words to be listened for by a speech recognizer. |
|
http://www.w3.org/TR/speech-grammar
(11104 words)
|
|
| |
| | Attribute grammar notes |
 | | Attribute grammars allow computation of attributes in the local sense. |  | | Attribute grammars allow implicitly defined attributes to be associated with any rule (or non-leaf node in a parse tree). |  | | Attribute grammars are slow w/o on-demand lazy eval / caching. |
|
http://www.antlr.org/blog/attribute.grammar.notes.tml
(2186 words)
|
|
| |
| | Domain Specific Meta Langauges |
 | | Attribute coupled grammars of Ganzinger and Geirech [8] increase the modularity of attribute grammars by recognizing that the translation process is often broken into distinct phases mapping the source program through a series of intermediate representations until its final target language representation is generated. |  | | Meta languages we give its solution in the form of an attribute grammar which uses three meta languages for defining attributes: a general purpose language similar to those in most attribute grammar systems, a macro language for defining the textual target code, and a simple language designed to specify an environment. |  | | Attribute grammars [2,14] provide a convenient specification mechanism for defining language processing tools. |
|
http://www-users.cs.umn.edu/~evw/Papers/como.html
(3763 words)
|
|
| |
| | [No title] |
 | | X.a is how attributes are written, a is an attribute (value) of the grammar symbol X. Table 6.1 gives an attribute grammar for simple numbers, where the attribute being represented is the value of the number. |  | | The difference is that 6.6 is referring to the parse tree or a derivation sequence associated with the grammar whereas 6.7 is referring to the grammar rules. |  | | Note that + in the grammar is playing a dual role, one of grammar symbol and one of addition of values. |
|
http://www.unf.edu/public/cop4620/ree/Notes/ch6.txt
(881 words)
|
|
| |
| | A brief introduction to definite clause grammars and definite clause translation grammars |
 | | Informally, attribute grammars are sometimes described as context-free grammars with parameters on the non-terminals. |  | | An attribute grammar is a context-free grammar in which the nodes of the parse tree carry attributes (annotations in the form of name-value pairs). |  | | DCTGs closely resemble attribute grammars as described by [Knuth 1968] and later writers and it is a bit easier to handle complex or voluminous attribute value functions in DCTGs than in DCGs. |
|
http://www.w3.org/People/cmsmcq/2004/lgintro.html
(4983 words)
|
|
| |
| | RAGS - Survey of Grammar Models |
 | | The only significance of the initial Christiansen grammar is that it becomes the language attribute of the root node of the parse tree. |  | | Observe that each language attribute value, and therefore each grammar adaptation, in a Christiansen grammar is localized to a particular branch of the parse tree. |  | | There is a remarkably close analogy between Chomsky grammars and Turing machines, if the latter are considered, not as a computational model per se, but as a grammar model. |
|
http://web.cs.wpi.edu/~jshutt/thesis/survey.html
(1720 words)
|
|
| |
| | WhyAttributeGrammarsMatter - TmrWiki |
 | | Attribute grammars specify a language's semantics by 'decorating' a context free grammar with those attributes you are interested in. |  | | Synthesized attributes are tupled and returned as the result of the computation. |  | | The attribute grammar determines a computation over some data structure; the semantic functions correspond to the actual Haskell functions that perform the computation. |
|
http://www.haskell.org/tmrwiki/WhyAttributeGrammarsMatter
(2817 words)
|
|
| |
| | Green Hat Journal: Attribute Grammar |
 | | The last problem is computing attributes that depend on both inherited and synthesized attributes. |  | | The attributes are not stored in the tree, they are recomputed every time you need them. |  | | But by adding "hash consing" and memoization, an inefficient pure functional attribute grammar becomes an efficient, incremental implementation. |
|
http://rover.cs.northwestern.edu/~surana/blog/past/000224.html
(309 words)
|
|
| |
| | Attribute Grammars |
 | | An attribute grammar uses the context free grammar of a program as the framework on which to build the grammar. |  | | An attribute grammar is a formal structure for recognizing the context sensitive part of a programming language. |  | | A value in an attribute cannot be referenced before it is computed. |
|
http://www.mcs.drexel.edu/~rweaver/COURSES/MCS360/TOPICS/ag.html
(210 words)
|
|
| |
| | [No title] |
 | | Prepare a context-free grammar suitable for input to "slr". |  | | In this directory are various programs that make up a Modular Attribute Grammar generator and evaluator as described in "Modular Attribute Grammars", by Gery Dueck and Gordon Cormack, to appear in Computer Journal (hopefully April 90). |  | | slr - a program to read a grammar and produce parse tables, as described in "slr.doc". |
|
http://plg.uwaterloo.ca/~ftp/mag/README
(302 words)
|
|
| |
| | Network Generating Attribute Grammar Encoding |
 | | Extending this approach, we have devised an encoding system that uses an attribute grammar in which the evaluation of both synthesized and inherited attributes within a generated parse tree provides the details of the connectivity of the network. |  | | The development and theoretical analysis of neural network architectures may be improved with the availability of techniques which allow the systematic representation and generation of classes of architectures. |  | | Recent work on the genetic optimization of neural networks has led to new ideas on how to encode neural network architectures abstractly as grammars. |
|
http://www.qucis.queensu.ca/home/browse/Publications/webstuff/1998_ijcnn1.htm
(123 words)
|
|
| |
| | Attribute Grammar Assignment |
 | | That is, for each example, you should provide a small grammar, similar to the one at the top of the page, give its parse tree, and show how the values of the attributes are computed by walking the tree. |  | | The remainder of the assignment asks you to attribute your grammar in order to check for certain properties of the syntaxes it is used to parse. |  | | Be sure to describe the notation that you are using to specify the grammar (e.g. |
|
http://www.cc.gatech.edu/classes/AY2006/cs6390_fall/hw/attgrm.html
(492 words)
|
|
| |
| | [No title] |
 | | The action rules for L-attributed grammars, in which the attribute flow is depth-first left-to-right, can be evaluated in the order of the parse tree prediction for LL grammars. |  | | | | |