Java Doc for Flags.java in  » Parser » JTopas » de » susebox » jtopas » 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 » JTopas » de.susebox.jtopas 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


de.susebox.jtopas.Flags

Flags
public interface Flags (Code)
The interface defines flags that are used by various classes during tokenizing. A flag can be set in three ways:
See Also:   TokenizerProperties
author:
   Heiko Blau


Field Summary
final public static  shortF_ALLOW_NESTED_COMMENTS
     Nested block comments are normally not allowed.
final public static  shortF_CASE
     General compare operations are case-sensitive, that means 'A' equals 'A' but not 'a'.
final public static  shortF_COUNT_LINES
     Tells a Tokenizer to count lines and columns.
final public static  shortF_FREE_PATTERN
     Treat pattern the same way as whitespaces, separators or special sequences. Pattern of this type are recognized anywhere outside comments and strings. They terminate normal token.
final public static  shortF_KEEP_DATA
     Set this flag to let a Tokenizer buffer all data.
final public static  shortF_NO_CASE
     When this flag is set globally for a TokenizerProperties instance (see Flags.setParseFlags , input data is generally treated case-insensitive. Specific properties may still be treated case-sensitive.
final public static  shortF_RETURN_BLOCK_COMMENTS
     Return block comments.
final public static  shortF_RETURN_IMAGE_PARTS
     By setting this flag for a TokenizerProperties instance, a Tokenizer or for a single property, a tokenizer returns not only the token images but also image parts (see Token.getImageParts ).
final public static  shortF_RETURN_LINE_COMMENTS
     Return line comments.
final public static  shortF_RETURN_SIMPLE_WHITESPACES
     Return simple whitespaces.
final public static  shortF_RETURN_WHITESPACES
     In many cases, parsers are not interested in whitespaces.
final public static  shortF_SINGLE_LINE_STRING
     Per default, strings are all characters between and including a pair of string start and end sequences, regardless if there are line separators in between.
final public static  shortF_TOKEN_POS_ONLY
     For performance and memory reasons, this flag is used to avoid copy operations for every token.



Field Detail
F_ALLOW_NESTED_COMMENTS
final public static short F_ALLOW_NESTED_COMMENTS(Code)
Nested block comments are normally not allowed. This flag changes the default behaviour.
Implementation note: The flag should be applicable for both TokenizerProperties and TokenizerProperty instances. It should not to be used dynamically (as in versions of JTopas prior to 0.8).



F_CASE
final public static short F_CASE(Code)
General compare operations are case-sensitive, that means 'A' equals 'A' but not 'a'. It is not nessecary to set this flag, since case-sensitive comparison is the default.
The flag was mainly used in conjunction with Flags.F_NO_CASE . If F_NO_CASE is set via TokenizerProperties.setParseFlags , F_CASE can be used for single properties where case-sensitivity is nessecary inspite of the global case-insensitivity.
If neither F_CASE nor F_NO_CASE is set, F_CASE is assumed. If both flags are set, F_CASE takes preceedence.
Implementation note: The flag should be applicable for both TokenizerProperties and TokenizerProperty instances. It should not to be used dynamically ( Tokenizer.changeParseFlags ). TokenizerProperties TokenizerProperty(int, java.lang.String[], java.lang.Object, int, int)



F_COUNT_LINES
final public static short F_COUNT_LINES(Code)
Tells a Tokenizer to count lines and columns. The tokenizer may use java.lang.System.getProperty ("line.separator") to obtain the end-of-line sequence or accept different line separator sequences for a better portability: single carriage return (Mac OS), single line feed (Unix), combination of carriage return and line feed (Windows OS).
Usually, the end-of-line characters '\r' and '\n' are whitespaces. If they are also part of one or more special sequences or pattern, it is NOT guaranteed that the line counting mechanism of a Tokenizer implementation finds these occurences. This is in order to maintain a good performance, since otherwise there would be a potential huge amount of unsuccessfull newline scans in these tokens. Consider defining special sequences for '\r', '\n' and '\r\n' alone and remove them from the whitespace set, if You cannot live with the described limitation.
Implementation note: The flag should be applicable for TokenizerProperties and Tokenizer objects, but not for single TokenizerProperty instances. It could also be a dynamic flag that can be switched on and off during runtime of a tokenizer, although it is generally set before parsing starts.



F_FREE_PATTERN
final public static short F_FREE_PATTERN(Code)
Treat pattern the same way as whitespaces, separators or special sequences. Pattern of this type are recognized anywhere outside comments and strings. They terminate normal token. In fact, strings and comments could be described as free pattern.
Without this flag, pattern are treated in the same way as normal token. They are preceeded and followed by whitespaces, separators or special sequences.
Implementation note: The flag should be applicable for both TokenizerProperties and TokenizerProperty instances. It should not to be used dynamically.



F_KEEP_DATA
final public static short F_KEEP_DATA(Code)
Set this flag to let a Tokenizer buffer all data. Usually, a tokenizer will apply a strategie to allocate only a reasonable amount of memory.
Implementation note: The flag should be applicable for TokenizerProperties and Tokenizer objects, but not for single TokenizerProperty instances. It could also be a dynamic flag that can be switched on and off during runtime of a tokenizer ( Tokenizer.changeParseFlags ), although it is generally set before parsing starts.



F_NO_CASE
final public static short F_NO_CASE(Code)
When this flag is set globally for a TokenizerProperties instance (see Flags.setParseFlags , input data is generally treated case-insensitive. Specific properties may still be treated case-sensitive. Set this flag set in the flag mask and cleared in the corresponding flags).
Implementation note: The flag should be applicable for both TokenizerProperties and TokenizerProperty instances. It should not to be used dynamically ( Tokenizer.changeParseFlags ).



F_RETURN_BLOCK_COMMENTS
final public static short F_RETURN_BLOCK_COMMENTS(Code)
Return block comments. The flag is part of the composite mask Flags.F_RETURN_WHITESPACES .
Implementation note: The flag should be applicable for TokenizerProperties, Tokenizer and for single TokenizerProperty instances. It is also a dynamic flag that can be switched on and off during runtime of a tokenizer (Note:: Flags for a single TokenizerProperty take precedence over other settings).



F_RETURN_IMAGE_PARTS
final public static short F_RETURN_IMAGE_PARTS(Code)
By setting this flag for a TokenizerProperties instance, a Tokenizer or for a single property, a tokenizer returns not only the token images but also image parts (see Token.getImageParts ).
Implementation note: The flag should be applicable for TokenizerProperties , Tokenizer and for single TokenizerProperty instances.



F_RETURN_LINE_COMMENTS
final public static short F_RETURN_LINE_COMMENTS(Code)
Return line comments. The flag is part of the composite mask Flags.F_RETURN_WHITESPACES .
Implementation note: The flag should be applicable for TokenizerProperties, Tokenizer and for single TokenizerProperty instances. It is also a dynamic flag that can be switched on and off during runtime of a tokenizer (Note:: Flags for a single TokenizerProperty take precedence over other settings).



F_RETURN_SIMPLE_WHITESPACES
final public static short F_RETURN_SIMPLE_WHITESPACES(Code)
Return simple whitespaces. These whitespaces are the ones set by Flags.setWhitespaces . The flag is part of the composite mask Flags.F_RETURN_WHITESPACES .
Implementation note: The flag should be applicable for TokenizerProperties and Tokenizer , but not for single TokenizerProperty instances. It is also a dynamic flag that can be switched on and off during runtime of a tokenizer (Note:: Flags for a single TokenizerProperty take precedence over other settings).



F_RETURN_WHITESPACES
final public static short F_RETURN_WHITESPACES(Code)
In many cases, parsers are not interested in whitespaces. If You are, use this value to force the tokenizer to return whitespace sequences and comments as a token. Per default, the flag is not set.
You can control the whitespace policy with finer granularity by using the flags Flags.F_RETURN_SIMPLE_WHITESPACES , Flags.F_RETURN_BLOCK_COMMENTS and Flags.F_RETURN_LINE_COMMENTS either by setting it generally for a TokenizerProperties or a single Tokenizer object or even more specific for a single TokenizerProperties .



F_SINGLE_LINE_STRING
final public static short F_SINGLE_LINE_STRING(Code)
Per default, strings are all characters between and including a pair of string start and end sequences, regardless if there are line separators in between. This flag changes that behaviour for the TokenizerProperties instance in general or for a single string property.
Implementation note: The flag should be applicable for both TokenizerProperties and TokenizerProperty instances. It should not to be used dynamically.



F_TOKEN_POS_ONLY
final public static short F_TOKEN_POS_ONLY(Code)
For performance and memory reasons, this flag is used to avoid copy operations for every token. The token image itself is not returned in a Token instance, only its position and length in the input stream.
Implementation note: The flag should be applicable for TokenizerProperties , and TokenizerProperty instances. It should also be a dynamic flag that can be switched on and off during runtime using Tokenizer.changeParseFlags .





www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.