Source Code Cross Referenced for Properties.java in  » Parser » Rats-Parser-Generators » xtc » parser » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Parser » Rats Parser Generators » xtc.parser 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * xtc - The eXTensible Compiler
003:         * Copyright (C) 2006-2007 Robert Grimm
004:         *
005:         * This program is free software; you can redistribute it and/or
006:         * modify it under the terms of the GNU General Public License
007:         * version 2 as published by the Free Software Foundation.
008:         *
009:         * This program is distributed in the hope that it will be useful,
010:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
011:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012:         * GNU General Public License for more details.
013:         *
014:         * You should have received a copy of the GNU General Public License
015:         * along with this program; if not, write to the Free Software
016:         * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
017:         * USA.
018:         */
019:        package xtc.parser;
020:
021:        import java.util.List;
022:
023:        /**
024:         * Definition of node property names.
025:         *
026:         * @author Robert Grimm
027:         * @version $Revision: 1.16 $
028:         */
029:        public class Properties {
030:
031:            // Hide the constructor.
032:            private Properties() { /* Nothing to do. */
033:            }
034:
035:            /**
036:             * The cost property.  It is associated with productions, has an
037:             * integer value, and indicates a production's estimated cost for
038:             * inlining.
039:             */
040:            public static final String COST = "cost";
041:
042:            /**
043:             * The duplicates property.  It is associated with productions, has
044:             * a list of strings value, and indicates the names of the original
045:             * productions folded into the annotated one.
046:             */
047:            public static final String DUPLICATES = "duplicates";
048:
049:            /**
050:             * The empty property.  It is associated with productions, has a
051:             * boolean value, and indicates whether a production may match the
052:             * empty input.
053:             */
054:            public static final String EMPTY = "empty";
055:
056:            /**
057:             * The generic property.  When associated with a production, it has
058:             * a {@link #GENERIC_NODE} value indicating that the production's
059:             * semantic value is a generic node with the component values as its
060:             * children or a {@link #GENERIC_RECURSION} value indicating that
061:             * the production's value is the result of a left-recursive
062:             * production.  When associated with a grammar, it has boolean value
063:             * indicating whether the grammar contains generic nodes.
064:             */
065:            public static final String GENERIC = "generic";
066:
067:            /** The generic node value. */
068:            public static final String GENERIC_NODE = "node";
069:
070:            /** The generic recursion value. */
071:            public static final String GENERIC_RECURSION = "recursion";
072:
073:            /**
074:             * The input property.  It is associated with productions, has a
075:             * boolean value, and indicates whether a production may consume the
076:             * input.
077:             */
078:            public static final String INPUT = "input";
079:
080:            /**
081:             * The formatting property.  It is associated with sequences, has a
082:             * list of bindings as its value, and indicates that a recursive
083:             * alternative in a directly left-recursive generic production has
084:             * formatting annotations for the node generated by the promise.
085:             */
086:            public static final String FORMATTING = "formatting";
087:
088:            /**
089:             * The lexical property.  It is associated with productions, has a
090:             * boolean value, and indicates whether a production recognizes
091:             * lexical syntax.
092:             */
093:            public static final String LEXICAL = "lexical";
094:
095:            /**
096:             * The locatable property.  It is associated with a grammar, has a
097:             * boolean value, and indicates whether the corresponding parser
098:             * uses the locatable interface.
099:             */
100:            public static final String LOCATABLE = "locatable";
101:
102:            /**
103:             * The meta-data property.  It is associated with productions and
104:             * has a {@link MetaData} value containing a production's meta-data.
105:             */
106:            public static final String META_DATA = "metaData";
107:
108:            /**
109:             * The option property.  It is associated with productions, has a
110:             * boolean value, and indicates whether a production represents a
111:             * desugared option.
112:             */
113:            public static final String OPTION = "option";
114:
115:            /**
116:             * The recursive property.  It is associated with grammars, has a
117:             * boolean value, and indicates that a grammar contains directly
118:             * left-recursive generic productions.  It is also associated with
119:             * productions and indicates that a production is left-recursive.
120:             */
121:            public static final String RECURSIVE = "recursive";
122:
123:            /**
124:             * The redacted property.  It is associated with productions, has a
125:             * boolean value, and indicates that a production's body has been
126:             * removed even though the production really has a body.
127:             */
128:            public static final String REDACTED = "redacted";
129:
130:            /**
131:             * The repeated property.  It is associated with productions, has a
132:             * nonterminal value, and indicates that a production represents a
133:             * desguared repetition whose element value is the value of the
134:             * nonterminal.
135:             */
136:            public static final String REPEATED = "repeated";
137:
138:            /**
139:             * The root property.  It is associated with grammars, has a
140:             * nonterminal value, and indicates a grammar's real root (i.e., the
141:             * single public production that directly or indirectly references
142:             * all other public productions).
143:             */
144:            public static final String ROOT = "root";
145:
146:            /**
147:             * The split property.  It is associated with productions, has a
148:             * boolean value, and indicates that the production's alternatives
149:             * need to be split.  It is also associated with sequences, has a
150:             * {@link Annotator.IndexPair} value, and indicates how to split the
151:             * sequence.
152:             */
153:            public static final String SPLIT = "split";
154:
155:            /**
156:             * The text-only property.  It is associated with productions, has a
157:             * boolean value, and indicates whether a production is text-only.
158:             */
159:            public static final String TEXT_ONLY = "textOnly";
160:
161:            /**
162:             * The token property.  It is associated with productions, has a
163:             * boolean value, and indicates whether a production represents a
164:             * lexical token.
165:             */
166:            public static final String TOKEN = "token";
167:
168:            /**
169:             * The transformable property.  It is associated with productions,
170:             * has a boolean value, and indicates whether a production is a
171:             * directly left-recursive production that can be transformed into
172:             * an equivalent right-recursive or -iterative production.
173:             */
174:            public static final String TRANSFORMABLE = "transformable";
175:
176:            /**
177:             * The voided property.  It is associated with productions, has a
178:             * boolean value, and indicates whether the production's value has
179:             * been eliminated.
180:             */
181:            public static final String VOIDED = "voided";
182:
183:            /**
184:             * Get the value of the duplicates property.
185:             *
186:             * @param p The production.
187:             * @return The list of folded productions.
188:             */
189:            @SuppressWarnings("unchecked")
190:            public static List<String> getDuplicates(Production p) {
191:                return (List<String>) p.getProperty(DUPLICATES);
192:            }
193:
194:            /**
195:             * Get the value of the formatting property.
196:             *
197:             * @param s The sequence.
198:             * @return The list of bindings.
199:             */
200:            @SuppressWarnings("unchecked")
201:            public static List<Binding> getFormatting(Sequence s) {
202:                return (List<Binding>) s.getProperty(FORMATTING);
203:            }
204:
205:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.