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
a07d3d48
Commit
a07d3d48
authored
Jul 15, 2013
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved handling of \internal and \endinternal
parent
84f83537
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
24 deletions
+37
-24
cmdmapper.cpp
src/cmdmapper.cpp
+1
-0
cmdmapper.h
src/cmdmapper.h
+2
-1
commentscan.l
src/commentscan.l
+2
-0
docparser.cpp
src/docparser.cpp
+30
-22
doctokenizer.h
src/doctokenizer.h
+2
-1
No files found.
src/cmdmapper.cpp
View file @
a07d3d48
...
@@ -131,6 +131,7 @@ CommandMap cmdMap[] =
...
@@ -131,6 +131,7 @@ CommandMap cmdMap[] =
{
"vhdlflow"
,
CMD_VHDLFLOW
},
{
"vhdlflow"
,
CMD_VHDLFLOW
},
{
"docbookonly"
,
CMD_DBONLY
},
{
"docbookonly"
,
CMD_DBONLY
},
{
"enddocbookonly"
,
CMD_ENDDBONLY
},
{
"enddocbookonly"
,
CMD_ENDDBONLY
},
{
"endinternal"
,
CMD_ENDINTERNAL
},
{
0
,
0
},
{
0
,
0
},
};
};
...
...
src/cmdmapper.h
View file @
a07d3d48
...
@@ -120,7 +120,8 @@ enum CommandType
...
@@ -120,7 +120,8 @@ enum CommandType
CMD_PIPE
=
90
,
CMD_PIPE
=
90
,
CMD_VHDLFLOW
=
91
,
CMD_VHDLFLOW
=
91
,
CMD_DBONLY
=
92
,
CMD_DBONLY
=
92
,
CMD_ENDDBONLY
=
93
CMD_ENDDBONLY
=
93
,
CMD_ENDINTERNAL
=
94
};
};
enum
HtmlTagType
enum
HtmlTagType
...
...
src/commentscan.l
View file @
a07d3d48
...
@@ -1023,6 +1023,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
...
@@ -1023,6 +1023,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
BEGIN(HtmlComment);
BEGIN(HtmlComment);
}
}
<Comment>{B}*{CMD}"endinternal"{B}* {
<Comment>{B}*{CMD}"endinternal"{B}* {
addOutput("\\endinternal ");
if (!inInternalDocs)
if (!inInternalDocs)
warn(yyFileName,yyLineNr,
warn(yyFileName,yyLineNr,
"found \\endinternal without matching \\internal"
"found \\endinternal without matching \\internal"
...
@@ -1925,6 +1926,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
...
@@ -1925,6 +1926,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
}
}
}
<SkipInternal>[@\\]"endinternal"[ \t]* {
<SkipInternal>[@\\]"endinternal"[ \t]* {
addOutput("\\endinternal ");
BEGIN(Comment);
BEGIN(Comment);
}
}
<SkipInternal>[^ \\@\n]+ { // skip non-special characters
<SkipInternal>[^ \\@\n]+ { // skip non-special characters
...
...
src/docparser.cpp
View file @
a07d3d48
...
@@ -3207,7 +3207,8 @@ int DocInternal::parse(int level)
...
@@ -3207,7 +3207,8 @@ int DocInternal::parse(int level)
retval
!=
RetVal_Section
&&
retval
!=
RetVal_Section
&&
retval
!=
RetVal_Subsection
&&
retval
!=
RetVal_Subsection
&&
retval
!=
RetVal_Subsubsection
&&
retval
!=
RetVal_Subsubsection
&&
retval
!=
RetVal_Paragraph
retval
!=
RetVal_Paragraph
&&
retval
!=
RetVal_EndInternal
);
);
if
(
lastPar
)
lastPar
->
markLast
();
if
(
lastPar
)
lastPar
->
markLast
();
...
@@ -3229,7 +3230,7 @@ int DocInternal::parse(int level)
...
@@ -3229,7 +3230,7 @@ int DocInternal::parse(int level)
warn_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"
\\
internal command found inside internal section"
);
warn_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"
\\
internal command found inside internal section"
);
}
}
DBG
((
"DocInternal::parse() end
\n
"
));
DBG
((
"DocInternal::parse() end
: retval=%x
\n
"
,
retval
));
DocNode
*
n
=
g_nodeStack
.
pop
();
DocNode
*
n
=
g_nodeStack
.
pop
();
ASSERT
(
n
==
this
);
ASSERT
(
n
==
this
);
return
retval
;
return
retval
;
...
@@ -5563,6 +5564,9 @@ int DocPara::handleCommand(const QCString &cmdName)
...
@@ -5563,6 +5564,9 @@ int DocPara::handleCommand(const QCString &cmdName)
case
CMD_INTERNAL
:
case
CMD_INTERNAL
:
retval
=
RetVal_Internal
;
retval
=
RetVal_Internal
;
break
;
break
;
case
CMD_ENDINTERNAL
:
retval
=
RetVal_EndInternal
;
break
;
case
CMD_COPYDOC
:
// fall through
case
CMD_COPYDOC
:
// fall through
case
CMD_COPYBRIEF
:
// fall through
case
CMD_COPYBRIEF
:
// fall through
case
CMD_COPYDETAILS
:
case
CMD_COPYDETAILS
:
...
@@ -5669,7 +5673,8 @@ int DocPara::handleCommand(const QCString &cmdName)
...
@@ -5669,7 +5673,8 @@ int DocPara::handleCommand(const QCString &cmdName)
INTERNAL_ASSERT
(
retval
==
0
||
retval
==
RetVal_OK
||
retval
==
RetVal_SimpleSec
||
INTERNAL_ASSERT
(
retval
==
0
||
retval
==
RetVal_OK
||
retval
==
RetVal_SimpleSec
||
retval
==
TK_LISTITEM
||
retval
==
TK_ENDLIST
||
retval
==
TK_NEWPARA
||
retval
==
TK_LISTITEM
||
retval
==
TK_ENDLIST
||
retval
==
TK_NEWPARA
||
retval
==
RetVal_Section
||
retval
==
RetVal_EndList
||
retval
==
RetVal_Section
||
retval
==
RetVal_EndList
||
retval
==
RetVal_Internal
||
retval
==
RetVal_SwitchLang
retval
==
RetVal_Internal
||
retval
==
RetVal_SwitchLang
||
retval
==
RetVal_EndInternal
);
);
DBG
((
"handleCommand(%s) end retval=%x
\n
"
,
qPrint
(
cmdName
),
retval
));
DBG
((
"handleCommand(%s) end retval=%x
\n
"
,
qPrint
(
cmdName
),
retval
));
return
retval
;
return
retval
;
...
@@ -6618,12 +6623,22 @@ int DocSection::parse()
...
@@ -6618,12 +6623,22 @@ int DocSection::parse()
{
{
warn_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Invalid list item found"
);
warn_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Invalid list item found"
);
}
}
if
(
retval
==
RetVal_Internal
)
{
DocInternal
*
in
=
new
DocInternal
(
this
);
m_children
.
append
(
in
);
retval
=
in
->
parse
(
m_level
+
1
);
if
(
retval
==
RetVal_EndInternal
)
{
retval
=
RetVal_OK
;
}
}
}
while
(
retval
!=
0
&&
}
while
(
retval
!=
0
&&
retval
!=
RetVal_Internal
&&
retval
!=
RetVal_Section
&&
retval
!=
RetVal_Section
&&
retval
!=
RetVal_Subsection
&&
retval
!=
RetVal_Subsection
&&
retval
!=
RetVal_Subsubsection
&&
retval
!=
RetVal_Subsubsection
&&
retval
!=
RetVal_Paragraph
retval
!=
RetVal_Paragraph
&&
retval
!=
RetVal_EndInternal
);
);
if
(
lastPar
)
lastPar
->
markLast
();
if
(
lastPar
)
lastPar
->
markLast
();
...
@@ -6680,12 +6695,6 @@ int DocSection::parse()
...
@@ -6680,12 +6695,6 @@ int DocSection::parse()
retval
=
0
;
// stop parsing
retval
=
0
;
// stop parsing
}
}
else
if
(
retval
==
RetVal_Internal
)
{
DocInternal
*
in
=
new
DocInternal
(
this
);
m_children
.
append
(
in
);
retval
=
in
->
parse
(
m_level
+
1
);
}
else
else
{
{
}
}
...
@@ -6695,10 +6704,11 @@ int DocSection::parse()
...
@@ -6695,10 +6704,11 @@ int DocSection::parse()
retval
==
RetVal_Subsection
||
retval
==
RetVal_Subsection
||
retval
==
RetVal_Subsubsection
||
retval
==
RetVal_Subsubsection
||
retval
==
RetVal_Paragraph
||
retval
==
RetVal_Paragraph
||
retval
==
RetVal_Internal
retval
==
RetVal_Internal
||
retval
==
RetVal_EndInternal
);
);
DBG
((
"DocSection::parse() end
\n
"
));
DBG
((
"DocSection::parse() end
: retval=%x
\n
"
,
retval
));
DocNode
*
n
=
g_nodeStack
.
pop
();
DocNode
*
n
=
g_nodeStack
.
pop
();
ASSERT
(
n
==
this
);
ASSERT
(
n
==
this
);
return
retval
;
return
retval
;
...
@@ -6834,7 +6844,13 @@ void DocRoot::parse()
...
@@ -6834,7 +6844,13 @@ void DocRoot::parse()
{
{
warn_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"found paragraph command outside of subsubsection context!"
);
warn_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"found paragraph command outside of subsubsection context!"
);
}
}
}
while
(
retval
!=
0
&&
retval
!=
RetVal_Section
&&
retval
!=
RetVal_Internal
);
if
(
retval
==
RetVal_Internal
)
{
DocInternal
*
in
=
new
DocInternal
(
this
);
m_children
.
append
(
in
);
retval
=
in
->
parse
(
1
);
}
}
while
(
retval
!=
0
&&
retval
!=
RetVal_Section
);
if
(
lastPar
)
lastPar
->
markLast
();
if
(
lastPar
)
lastPar
->
markLast
();
//printf("DocRoot::parse() retval=%d %d\n",retval,RetVal_Section);
//printf("DocRoot::parse() retval=%d %d\n",retval,RetVal_Section);
...
@@ -6856,14 +6872,6 @@ void DocRoot::parse()
...
@@ -6856,14 +6872,6 @@ void DocRoot::parse()
}
}
}
}
if
(
retval
==
RetVal_Internal
)
{
DocInternal
*
in
=
new
DocInternal
(
this
);
m_children
.
append
(
in
);
retval
=
in
->
parse
(
1
);
}
handleUnclosedStyleCommands
();
handleUnclosedStyleCommands
();
DocNode
*
n
=
g_nodeStack
.
pop
();
DocNode
*
n
=
g_nodeStack
.
pop
();
...
...
src/doctokenizer.h
View file @
a07d3d48
...
@@ -62,7 +62,8 @@ enum Tokens
...
@@ -62,7 +62,8 @@ enum Tokens
RetVal_SwitchLang
=
0x10012
,
RetVal_SwitchLang
=
0x10012
,
RetVal_CloseXml
=
0x10013
,
RetVal_CloseXml
=
0x10013
,
RetVal_EndBlockQuote
=
0x10014
,
RetVal_EndBlockQuote
=
0x10014
,
RetVal_CopyDoc
=
0x10015
RetVal_CopyDoc
=
0x10015
,
RetVal_EndInternal
=
0x10016
};
};
/** @brief Data associated with a token used by the comment block parser. */
/** @brief Data associated with a token used by the comment block parser. */
...
...
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