---+Grammar Engineering Frequently Asked Questions ---++What is a type addendum statement, and when should I use one? Type addendum statements are a recent extenion to tdl syntax (as of 5/2005, LKB only, not yet interpreted by PET). Type addendum statements allow you add information to a previously defined type. Prior to the development of the Matrix, there wasn't really a need for this kind of functionality: if you wanted to add to a type, you could just edit its defintion. However, we strongly discourage editing the matrix files (particularly =matrix.tdl=) when building a grammar from the Matrix. You may find that you would like to add a feature to an existing type (notably the values of =HEAD=), or add a constraint to an existing type. To some extent, this can be done by adding subtypes, but this can become awkward. A type addendum statement looks like this: <pre> existing-type :+ new-supertype & "documentation string" [ EXISTING-FEATURE more-specific-value, NEW-FEATURE some-value ]. </pre> Unlike type definitions, type addendum statements use <tt>:+</tt> instead of <tt>:=</tt>. Type addendum statements are only valid with existing types. There must be at least one piece of information after the <tt>:+</tt>: a new supertype, a documentation string (in quotes), or a constraint (in square brackets), or any combination of those. Note that it's not valid to specify a supertype in a type addendum which is already a supertype of the type in question. In general, if you would like to add information to a type already declared in the Matrix, a type addendum statement is the way to go. For types that are defined in language-specific files, it's probably best to avoid type addenda. ---+++Related topics * [[TdlSyntax][What do the punctuation marks mean in the tdl files? (A very basic guide to tdl syntax.)]] * [[NewFeature][I'm trying to add a new feature, but the LKB doesn't like it. What should I do?]] --- [[GrammarEngineeringFAQ][Back to FAQs page]] [[http://courses.washington.edu/ling567/][Back to main course page]] -- Main.EmilyBender - 18 May 2005
This topic: Main
>
WebHome
>
GrammarEngineeringFAQ
>
TypeAddendum
Topic revision: r1 - 2005-05-19 - EmilyBender
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback