Class KaAPI.KUICSyntaxChecker
All Packages Class Hierarchy This Package Previous Next Index
Class KaAPI.KUICSyntaxChecker
java.lang.Object
|
+----KaAPI.KUICSyntaxChecker
- public class KUICSyntaxChecker
- extends Object
Verifies the syntax for the KaAPI format file.
Format file Extension and Comments
The format file should have .format as an extension.
All comments should start with '#' at the first column.
Empty lines are ignored.
Format file Keywords
All keywords are enclosed in <> and the following are the keywords
currently supported.
<INFO>
<PACKAGE> </PACKAGE> <CLASS> </CLASS>
<NAME>
<ARGS_AWT> <ARGS_KAAPI> <ARGS_KUIC>
<UIC_LINKS>
The keyword strings are case-insensitive
Structure of the Format file
<INFO> information_strings
<PACKAGE> package_name
<CLASS> class_name
<NAME> name_of_the_object
<ARGS_AWT> arg0,arg1,arg2 ....
<ARGS_KAAPI> location,visibility[,name_of_user_container]
<ARGS_KUIC> arg0,arg1,arg2 ....
<UIC_LINKS> name_of_the_object1,name_of_the_object_2, .....
#
# <ARGS_AWT>,<ARGS_KAAPI>,<ARGS_KUIC> and
# <UIC_LINKS> could be defined on multiple lines
#
</CLASS>
#
# More <CLASS> definitions could go here
#
</PACKAGE>
#
# More <PACKAGE> definitions could go here
#
Description of the fields in Format file
<INFO> specify any information regarding the format file.
<PACKAGE> specify the name of the package.
<CLASS> specify the name of the class in the package.
<NAME> specify a name to identify this instance of the class.
<ARGS_AWT> specify the arguments needed for any java.awt
component. for example, dimension of the java.awt.Textarea.
<ARGS_KAAPI> specify location, visibility and container option.
The possible values for these arguments are :-
location - South,North,Center,East,West,None.
visibility - show,hide
container - no value for default container,name of the KUIC container.
(Note:- If this field is omitted then the default values
for location ,visibility and container are :-
location = None,visibility = hide,container = default)
<ARGS_KUIC> specify the arguments needed for the KUIComponent.
<UIC_LINKS> specify the list of KUIC objects this instance needs
to interface.
Optional Fields in Format file
The following fields are optional.
<INFO>
<NAME>
<ARGS_AWT> <ARGS_KAAPI> <ARGS_KUIC>
<UIC_LINKS>
Grammer for Format file
format_file ::= [information_list] package_stmt_list
information_list ::= information_elem [information_list]
information_elem ::= <INFO> LineOfText
package_stmt_list ::= package_stmt [package_stmt_list]
package_stmt ::= <PACKAGE> PackageName package_component_list </PACKAGE>
package_component_list ::= package_component [package_component_list]
package_component ::= <CLASS> ClassName class_component </CLASS>
class_component ::= [name_elem][args_elem_list]
name_elem ::= <NAME> VariableName
args_elem_list :: args_elem [args_elem_list]
args_elem ::= [kaapi_args_elem][awt_args_elem][kuic_args_elem][uiclinks_elem]
kaapi_args_elem ::= <ARGS_KAAPI> list_of_arguments
awt_args_elem ::= <ARGS_AWT> list_of_arguments
kuic_args_elem ::= <ARGS_KUIC> list_of_arguments
uiclinks_elem ::= <UIC_LINKS> list_of_arguments
list_of_arguments ::= Argument [,list_of_arguments]
A Sample Format file
#
# Aakash.format
# 31 Aug 1996
# v 1.1
<info> This format file is used for a Generic IDE application.
<info> Objects v_editor and v_compiler are NON-UI components.
<package> Aakash.KUIC
<class> ToolsList
<name> v_tools_list
<args_kaapi> West,show
<args_awt> 17
<args_kuic> lightGray,Editor,Compiler,Run,Debugger
<uic_links> v_compiler,v_editor
</class>
</package>
<package> Aakash.Compiler
<class> AaCompiler
<name> v_compiler
<args_kuic> C:\JDk1.02\BIN\JAVAC
<args_kuic> C:\MSVC20\BIN\cl -c
<uic_links> v_console
</class>
</package>
<package> Aakash.Editor
<class> AaEditor
<name> v_editor
</class>
</package>
<package> KaAPI.widgets
<class> KUICTextArea
<name> v_console
<args_kaapi> East,show
<args_awt> 17,100
<args_kuic> gray,black
</class>
</package>
- Version:
- 1.1 01 Oct 1996
- Author:
- shiva
-
KUICSyntaxChecker(String, boolean)
-
-
getFormatDescription()
- Gets the format file description.Strings specified with <INFO>
keyword is returned.
-
processFile()
- This parses the format file.
KUICSyntaxChecker
public KUICSyntaxChecker(String formatFile,
boolean pMsg) throws IOException
- Parameters:
- formatFile - format filename to check for valid syntax
- pMsg - if true the error messages are printed to the console
and supressed if false
- Throws: IOException
- if the file not found
processFile
public boolean processFile()
- This parses the format file.
- Returns:
- true on success false on failure
getFormatDescription
public String[] getFormatDescription()
- Gets the format file description.Strings specified with <INFO>
keyword is returned.
- Returns:
- the format file description
All Packages Class Hierarchy This Package Previous Next Index