|
List Info
Thread: POC parser
|
|
| POC parser |

|
2006-12-10 02:00:47 |
Hey Guys,
I decided to do a little work on the C++ parser that sits in
the
alfs-POC section of the repo, mostly for the fun of it.
Presently, it
will fully parse the book and place all commands in
scriptlets, similar
to the jhalfs style. If anyone's interested in taking a
peek:
svn co svn://linuxfromscratch.org/ALFS/alfs-POC
svn co svn://linuxfromscratch.org/LFS/trunk/BOOK lfs-trunk
cd alfs-POC/src
make parser
./parser ../../lfs-trunk/index.xml
Then check out the contents of the 'commands' directory.
Performance on Belgarath:
real 0m1.826s
user 0m0.630s
sys 0m0.200s
On my laptop:
real 0m0.226s
user 0m0.148s
sys 0m0.064s
--
JH
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
| POC parser |

|
2006-12-10 06:58:58 |
Hi Jeremy,
Just in case you didn't noticed it,there is a problem with
the
<replaceable> tags,it parses them as a new line,see
glibc/groff
in chapter06.
Other than that,it is ridiculously faster...less than a
second
comparable with the 13 seconds of xsltproc.
Impressive.
Have a good Sunday,
Ag.
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
| POC parser |

|
2006-12-10 11:06:07 |
El Domingo, 10 de Diciembre de 2006 03:00, Jeremy Huntwork
escribió:
> Hey Guys,
>
> I decided to do a little work on the C++ parser that
sits in the
> alfs-POC section of the repo, mostly for the fun of it.
Presently, it
> will fully parse the book and place all commands in
scriptlets, similar
> to the jhalfs style. If anyone's interested in taking a
peek:
As a POC looks very good, the parsing speed is awesome
Of course there is yet a lot of issues the need be fixed
like the extra new
line in replaceble tags, handling "nodump"
commands, separate the scripts by
build phases, and the like, but is a nice starting point.
Good work.
--
Manuel Canales Esparcia
Usuario de LFS nº2886: http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES: http://es.tldp.org
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
| POC parser |

|
2006-12-10 12:52:17 |
On Sun, Dec 10, 2006 at 08:58:58AM +0200, Ag. Hatzimanikas
wrote:
> Just in case you didn't noticed it,there is a problem
with the
> <replaceable> tags,it parses them as a new
line,see glibc/groff
> in chapter06.
Yeah, I saw that. The reason it does that is becuase it
chops up the
lines whenever it reaches an XML tag, so it can parse the
tag. So
something like this:
<tag1>some text here<tag2>more
text</tag2>even more text</tag1>
It will first 'find' the <tag1> and decide if it needs
to do anything
about it. Then it chops off that section and sends the line
through the
parser again:
some text here<tag2>more text</tag2>even more
text</tag1>
It does that until it gets through the line, then advances
to the next
line. For most commands, this isn't an issue, because we're
not often
putting other XML tags inside the
<screen><userinput> tag pairs. So
after you remove those tags, you have line by line the
command you want
and it's just spit out 'as is'.
> Other than that,it is ridiculously faster...less than a
second
> comparable with the 13 seconds of xsltproc.
> Impressive.
Yeah that's my favorite part
> Have a good Sunday,
You too.
--
JH
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
| POC parser |

|
2006-12-10 12:56:47 |
On Sun, Dec 10, 2006 at 12:06:07PM +0100, M.Canales.es
wrote:
> As a POC looks very good, the parsing speed is awesome
Thanks.
> Of course there is yet a lot of issues the need be
fixed like the extra new
> line in replaceble tags, handling "nodump"
commands, separate the scripts by
> build phases, and the like, but is a nice starting
point.
You're right, there is a lot to do with it. I know that
George M. was
still doing a lot of work on his full-featured parser and
build-tool. So
this little bit of code may eventually be eclipsed, but it's
fun to play
with. I'll try to clean the code up a bit more and work on
some other
features as I have time. And of course, as always, anyone's
welcome to
improve on it.
--
JH
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|
|
[1-5]
|
|