Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
d5d946a6
Commit
d5d946a6
authored
May 06, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #166 from hansec/fortran_import
Add import keyword to FORTRAN code highlighting
parents
e9b40bf0
d8221cb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
fortrancode.l
src/fortrancode.l
+16
-4
No files found.
src/fortrancode.l
View file @
d5d946a6
...
...
@@ -716,6 +716,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
%x DocBlock
%x Use
%x UseOnly
%x Import
%x TypeDecl
%x Declaration
%x DeclContLine
...
...
@@ -791,19 +792,30 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
yy_push_state(YY_START);
BEGIN(UseOnly);
}
<UseOnly
>{BS},{BS}
{ codifyLines(yytext); }
<UseOnly
>{BS}&{BS}"\n"
{ codifyLines(yytext); YY_FTN_RESET}
<UseOnly
,Import>{BS},{BS}
{ codifyLines(yytext); }
<UseOnly
,Import>{BS}&{BS}"\n"
{ codifyLines(yytext); YY_FTN_RESET}
<UseOnly>{ID} {
g_insideBody=TRUE;
generateLink(*g_code, yytext);
g_insideBody=FALSE;
useEntry->onlyNames.append(yytext);
}
<Use,UseOnly
>"\n"
{
<Use,UseOnly
,Import>"\n"
{
unput(*yytext);
yy_pop_state();YY_FTN_RESET
}
<Start>"import"{BS_} {
startFontClass("keywordtype");
codifyLines(yytext);
endFontClass();
yy_push_state(YY_START);
BEGIN(Import);
}
<Import>{ID} {
g_insideBody=TRUE;
generateLink(*g_code, yytext);
g_insideBody=FALSE;
}
/*-------- fortran module -----------------------------------------*/
<Start>("block"{BS}"data"|"program"|"module"|"type"|"interface")/{BS_}|({COMMA}{ACCESS_SPEC})|\n { //
startScope();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment