|
SWT LPEX v3.0.5 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.lpex.core.LpexCommonParser
com.ibm.lpex.fortran.FortranParser
Base document parser for Fortran.
It uses the free-source-form lexer FortranFFLexer
.
Extend to use a different Fortran lexer.
Editor actions and assigned keys added by this document parser:
Keys already defined (for example, by the active base editor profile and by the user profile) to an action different from nullAction are not redefined in here.
Editor action modified by this document parser:
Field Summary |
---|
Constructor Summary | |
---|---|
FortranParser(LpexView lpexView)
Constructor. |
Method Summary | |
---|---|
String |
getCommentStyleCharacters()
Returns the style characters used for styling comments and remarks ("cr"). |
protected IFortranLexer |
getFortranLexer(LpexCharStream charStream,
FortranLexerStyles lexerStyles,
FortranLexerClasses lexerClasses)
Returns the Fortran lexer to be used by this parser. |
String |
getLanguage()
Returns "Fortran" , the language supported by this parser. |
protected String |
getPopupItems(int popupLocation)
Returns this parser's contribution to the popup. |
ResourceBundle |
getProfile()
Returns the parser's properties profile resource bundle. |
boolean |
isTokenDelimiter(char ch)
Returns true if the specified character is a token delimiter. |
void |
parseAll()
Total parse of the entire document. |
void |
parseElement(int element)
Incremental parse. |
void |
setStyleAttributes()
Defines this parser's style attributes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FortranParser(LpexView lpexView)
lpexView
- the LPEX document view associated with this parserMethod Detail |
protected IFortranLexer getFortranLexer(LpexCharStream charStream, FortranLexerStyles lexerStyles, FortranLexerClasses lexerClasses)
public void parseAll()
parseAll
in class LpexCommonParser
public void parseElement(int element)
parseElement
in class LpexCommonParser
element
- an element affected by a committed change in this viewLpexView.parsePending(int)
,
LpexView.elementParsed(int)
,
Total and incremental parsepublic ResourceBundle getProfile()
getProfile
in class LpexCommonParser
LpexCommonParser.getProperty(java.lang.String)
,
Parser propertiespublic String getLanguage()
"Fortran"
, the language supported by this parser.
getLanguage
in class LpexCommonParser
LpexCommonParser.LANGUAGE_FORTRAN
protected String getPopupItems(int popupLocation)
getPopupItems
in class LpexCommonParser
popupLocation
- the location on the pop-up menu of the items
requested, one of: LpexCommonParser.POPUP_TOP
, LpexCommonParser.POPUP_FILTERVIEW
,
LpexCommonParser.POPUP_SOURCE
, LpexCommonParser.POPUP_END
null
if noneLpexCommonParser.defineFilterAction(java.lang.String, java.lang.String)
public void setStyleAttributes()
'_'
(layout blanks),
'p'
(punctuation/operator),
'c'
(comment),
'r'
(remark),
'a'
(name),
'e'
(error),
'k'
(executable statement keyword),
'o'
(nonexecutable statement keyword),
's'
(special program keyword),
'v'
(special program-end keyword),
'n'
(numeric),
'q'
(character literal),
'd'
(compiler directive),
'f'
(continuation indicator),
'l'
(label),
'i'
(ignored).
public String getCommentStyleCharacters()
getCommentStyleCharacters
in class LpexCommonParser
public boolean isTokenDelimiter(char ch)
true
if the specified character is a token delimiter.
isTokenDelimiter
in class LpexCommonParser
ch
- character queried, for example, ')'LpexCommonParser.getToken(com.ibm.lpex.core.LpexDocumentLocation)
|
SWT LPEX v3.0.5 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |