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
8fc08533
Commit
8fc08533
authored
May 19, 2013
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Paragraph inbetween @warning like section and autolist no longer ended section
parent
79099187
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
5 deletions
+24
-5
docparser.cpp
src/docparser.cpp
+2
-0
doctokenizer.h
src/doctokenizer.h
+3
-1
doctokenizer.l
src/doctokenizer.l
+19
-4
No files found.
src/docparser.cpp
View file @
8fc08533
...
@@ -4447,6 +4447,7 @@ int DocAutoList::parse()
...
@@ -4447,6 +4447,7 @@ int DocAutoList::parse()
int
retval
=
RetVal_OK
;
int
retval
=
RetVal_OK
;
int
num
=
1
;
int
num
=
1
;
g_nodeStack
.
push
(
this
);
g_nodeStack
.
push
(
this
);
doctokenizerYYstartAutoList
();
// first item or sub list => create new list
// first item or sub list => create new list
do
do
{
{
...
@@ -4469,6 +4470,7 @@ int DocAutoList::parse()
...
@@ -4469,6 +4470,7 @@ int DocAutoList::parse()
(
g_token
->
id
==-
1
||
g_token
->
id
>=
num
)
// increasing number (or no number)
(
g_token
->
id
==-
1
||
g_token
->
id
>=
num
)
// increasing number (or no number)
);
);
doctokenizerYYendAutoList
();
DocNode
*
n
=
g_nodeStack
.
pop
();
DocNode
*
n
=
g_nodeStack
.
pop
();
ASSERT
(
n
==
this
);
ASSERT
(
n
==
this
);
return
retval
;
return
retval
;
...
...
src/doctokenizer.h
View file @
8fc08533
/******************************************************************************
/******************************************************************************
*
*
*
*
$Id: $
*
*
*
*
* Copyright (C) 1997-2013 by Dimitri van Heesch.
* Copyright (C) 1997-2013 by Dimitri van Heesch.
...
@@ -156,5 +156,7 @@ void doctokenizerYYsetStateAnchor();
...
@@ -156,5 +156,7 @@ void doctokenizerYYsetStateAnchor();
void
doctokenizerYYsetInsidePre
(
bool
b
);
void
doctokenizerYYsetInsidePre
(
bool
b
);
void
doctokenizerYYpushBackHtmlTag
(
const
char
*
tag
);
void
doctokenizerYYpushBackHtmlTag
(
const
char
*
tag
);
void
doctokenizerYYsetStateSnippet
();
void
doctokenizerYYsetStateSnippet
();
void
doctokenizerYYstartAutoList
();
void
doctokenizerYYendAutoList
();
#endif
#endif
src/doctokenizer.l
View file @
8fc08533
/******************************************************************************
/******************************************************************************
*
*
*
*
$Id: $
*
*
*
*
* Copyright (C) 1997-2013 by Dimitri van Heesch.
* Copyright (C) 1997-2013 by Dimitri van Heesch.
...
@@ -57,11 +57,13 @@ static QCString g_secLabel;
...
@@ -57,11 +57,13 @@ static QCString g_secLabel;
static QCString g_secTitle;
static QCString g_secTitle;
static SectionInfo::SectionType g_secType;
static SectionInfo::SectionType g_secType;
static QCString g_endMarker;
static QCString g_endMarker;
static int g_autoListLevel;
struct DocLexerContext
struct DocLexerContext
{
{
TokenInfo *token;
TokenInfo *token;
int rule;
int rule;
int autoListLevel;
int inputPos;
int inputPos;
const char *inputString;
const char *inputString;
YY_BUFFER_STATE state;
YY_BUFFER_STATE state;
...
@@ -75,6 +77,7 @@ void doctokenizerYYpushContext()
...
@@ -75,6 +77,7 @@ void doctokenizerYYpushContext()
{
{
DocLexerContext *ctx = new DocLexerContext;
DocLexerContext *ctx = new DocLexerContext;
ctx->rule = YY_START;
ctx->rule = YY_START;
ctx->autoListLevel = g_autoListLevel;
ctx->token = g_token;
ctx->token = g_token;
ctx->inputPos = g_inputPos;
ctx->inputPos = g_inputPos;
ctx->inputString = g_inputString;
ctx->inputString = g_inputString;
...
@@ -87,6 +90,7 @@ bool doctokenizerYYpopContext()
...
@@ -87,6 +90,7 @@ bool doctokenizerYYpopContext()
{
{
if (g_lexerStack.isEmpty()) return FALSE;
if (g_lexerStack.isEmpty()) return FALSE;
DocLexerContext *ctx = g_lexerStack.pop();
DocLexerContext *ctx = g_lexerStack.pop();
g_autoListLevel = ctx->autoListLevel;
g_inputPos = ctx->inputPos;
g_inputPos = ctx->inputPos;
g_inputString = ctx->inputString;
g_inputString = ctx->inputString;
yy_delete_buffer(YY_CURRENT_BUFFER);
yy_delete_buffer(YY_CURRENT_BUFFER);
...
@@ -691,19 +695,19 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
...
@@ -691,19 +695,19 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
return TK_COMMAND;
return TK_COMMAND;
}
}
<St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} { /* skip trailing paragraph followed by new list item */
<St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} { /* skip trailing paragraph followed by new list item */
if (g_insidePre)
if (g_insidePre
|| g_autoListLevel==0
)
{
{
REJECT;
REJECT;
}
}
}
}
<St_Para>({BLANK}*\n)+{BLANK}*\n/{MLISTITEM} { /* skip trailing paragraph followed by new list item */
<St_Para>({BLANK}*\n)+{BLANK}*\n/{MLISTITEM} { /* skip trailing paragraph followed by new list item */
if (!Doxygen::markdownSupport || g_insidePre)
if (!Doxygen::markdownSupport || g_insidePre
|| g_autoListLevel==0
)
{
{
REJECT;
REJECT;
}
}
}
}
<St_Para>({BLANK}*\n)+{BLANK}*\n/{OLISTITEM} { /* skip trailing paragraph followed by new list item */
<St_Para>({BLANK}*\n)+{BLANK}*\n/{OLISTITEM} { /* skip trailing paragraph followed by new list item */
if (!Doxygen::markdownSupport || g_insidePre)
if (!Doxygen::markdownSupport || g_insidePre
|| g_autoListLevel==0
)
{
{
REJECT;
REJECT;
}
}
...
@@ -1182,6 +1186,7 @@ void doctokenizerYYFindSections(const char *input,Definition *d,
...
@@ -1182,6 +1186,7 @@ void doctokenizerYYFindSections(const char *input,Definition *d,
void doctokenizerYYinit(const char *input,const char *fileName)
void doctokenizerYYinit(const char *input,const char *fileName)
{
{
g_autoListLevel = 0;
g_inputString = input;
g_inputString = input;
g_inputPos = 0;
g_inputPos = 0;
g_fileName = fileName;
g_fileName = fileName;
...
@@ -1354,6 +1359,16 @@ void doctokenizerYYpushBackHtmlTag(const char *tag)
...
@@ -1354,6 +1359,16 @@ void doctokenizerYYpushBackHtmlTag(const char *tag)
unput('<');
unput('<');
}
}
void doctokenizerYYstartAutoList()
{
g_autoListLevel++;
}
void doctokenizerYYendAutoList()
{
g_autoListLevel--;
}
#if !defined(YY_FLEX_SUBMINOR_VERSION)
#if !defined(YY_FLEX_SUBMINOR_VERSION)
extern "C" { // some bogus code to keep the compiler happy
extern "C" { // some bogus code to keep the compiler happy
void doctokenizerYYdummy() { yy_flex_realloc(0,0); }
void doctokenizerYYdummy() { yy_flex_realloc(0,0); }
...
...
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