Log in

View Full Version : Parser fr


Melinora
03-08-2005, 05:48 PM
<DIV>Bonjour,</DIV> <DIV> </DIV> <DIV>Je cherche un Parser (logiciel pour comptabiliser/calculer ses dégats) fonctionnant sur les serveurs européens (Francais plus exactement).</DIV> <DIV>Quelqu'un aurait-il ça sous la manche svp? ^^</DIV> <DIV> </DIV> <DIV>Merci <img src="/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" border="0" alt="SMILEY" /></DIV>

Singm
03-08-2005, 11:36 PM
Gniiii, un sujet identique existe deja depuis 2 jours dans un autre thread.PM moi si tu veux voir mon beta-parser <img src="/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" border="0" alt="SMILEY" />

gunutz
03-10-2005, 04:25 PM
<DIV>j avais penser faire une macro pour traduire les log en us pour utiliser les parsers us mais les traductions sont hazardeuse par moment donc j ai abandonné </DIV> <DIV> </DIV>

Singm
03-10-2005, 06:54 PM
Je bosse sur un systeme identique actuellement (traduction log FR -> US) car obtenir les sources du parser devient compliqué. Cependant, c'est un systeme tres tres moyen, un pis-aller.L'URL du meilleur parser US : http://www.combatstats.com/

Atalar
03-10-2005, 08:45 PM
<DIV>vous utilisez Flex et Bison pour créer le parseur? ça pourrait être une bonne solution, non?</DIV> <DIV> </DIV> <DIV>La grammaire n'est pas si compliquée, tout de même...</DIV>

Singm
03-10-2005, 09:36 PM
C'est pas une question d'outils ou de grammaire, c'est une question de stabilité et de traduction.Les messages sont tres fluctuants, la traduction n'est pas stable du tout. Il faut refaire les regles a chaque patch quasiment, et a chaque fois cela introduit des "exceptions" aux regles, etc...Pour l'instant, c'est le principal probleme. Mon parser fait en Janvier ne marche plus du tout en Mars. Le temps d'analyser les changements, d'adapter le programme et les regles, un nouveau patch a eu lieu...J'essaie de parler avec le gars de CombatStats pour créer un parser "international", qui prend en entrée non plus un fichier log brut, mais un fichier pre-maché ou les phrases sont remplacées par des tokens, ce qui permettrait d'avoir un ensemble pre-processor + parser, avec un pre-processor pour chaque language (US, FR, D, JP).

Melinora
03-11-2005, 05:45 AM
<DIV>Ca serait une très bonne idée <img src="/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" border="0" alt="SMILEY" /></DIV>

Atalar
03-11-2005, 04:21 PM
<DIV>Justement, avec du Flex et du Bison, on ferait du preprocessing, je veux dire, la partie Bison serait stable, et on ne toucherait qu'à la partie flex selon les versions... Flex autogénère des scanners, Bisons des parseurs, et on peut interconnecter les deux... Bref, flex envoie une suite de tokens à bison, qui réagit selon....</DIV> <DIV> </DIV> <DIV>après, on peut peut être trouver un grammaire stable au fil des versions, ou relativement stable, non?</DIV> <DIV> </DIV> <DIV>du genre, en tokens : </DIV> <DIV> </DIV> <DIV><token_VOUS> <token_default_text> <token_number> <token_damage> => store_melee_damage(%2);</DIV> <DIV> </DIV> <DIV>Bon, c'est pas du tout la syntaxe correcte, mais je pense que c'est clair, non? enfin...</DIV>

Ddrak
03-15-2005, 10:56 AM
Hey guys,<BR><BR>Caught the link and only barely speak enough French to get the general gist of what you are saying here. I've been working over the weekend on a parser which you can find <A href="http://parsemania.chase.net.au/" target=_blank>here</A> (English site, sorry). However, the talk of flex/bison regular expressions caught my eye as the "core" of my parser is essentially just a bunch of perl-style regular expressions:<BR><BR> <BLOCKQUOTE><FONT face="Courier New" color=#00cc00 size=2><FONT size=2> <P>m_parselist.Add(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><B><FONT color=#008080 size=2>ParseInfo</B></FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2>, "Manastone Conversion", </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>));</P> <P>m_parselist.Add(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><B><FONT color=#008080 size=2>ParseInfo</B></FONT><FONT size=2>(ProcessHeal, "^(?<Source>.+?) heals? (?<Target>.+?)(?:RSELF)? for (?<Damage>\d+) hit points", </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>));</P> <P>m_parselist.Add(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><B><FONT color=#008080 size=2>ParseInfo</B></FONT><FONT size=2>(ProcessWard, "^Your ward absorbed (?<Damage>\d+) points of damage", </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>));</P> <P>m_parselist.Add(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><B><FONT color=#008080 size=2>ParseInfo</B></FONT><FONT size=2>(Proces[expletive ninja'd by Faarbot], "^(?<Source>YOU)(?<img src="/smilies/9d71f0541cff0a302a0309c5079e8dee.gif" border="0" alt="SMILEY" />?:R) (?<Ability>.+?))? hits? (?<Target>.+?) for (?<Damage>\d+) points of (?<Type>.+) damage", </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>));</P> <P>m_parselist.Add(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><B><FONT color=#008080 size=2>ParseInfo</B></FONT><FONT size=2>(Proces[expletive ninja'd by Faarbot], "^(?<Source>.+?) is hit by (?<Ability>.+?) for (?<Damage>\d+) points of (?<Type>.+) damage", </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>));</P> <P>m_parselist.Add(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><B><FONT color=#008080 size=2>ParseInfo</B></FONT><FONT size=2>(Proces[expletive ninja'd by Faarbot], "^(?<Source>\w+ \<.+\&gt<img src="/smilies/8a80c6485cd926be453217d59a84a888.gif" border="0" alt="SMILEY" />(?:'s (?<Ability>.+?))? hits? (?<Target>.+?) for (?<Damage>\d+) points of (?<Type>.+) damage", </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>));</P> <P>m_parselist.Add(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><B><FONT color=#008080 size=2>ParseInfo</B></FONT><FONT size=2>(Proces[expletive ninja'd by Faarbot], "^(?<Source>.+?)(?<img src="/smilies/9d71f0541cff0a302a0309c5079e8dee.gif" border="0" alt="SMILEY" />?:'s|(?<=s)') (?<Ability>.+?))? hits? (?<Target>.+?) for (?<Damage>\d+) points of (?<Type>.+) damage", </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>));</P> <P>m_parselist.Add(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><B><FONT color=#008080 size=2>ParseInfo</B></FONT><FONT size=2>(ProcessMiss, "^(?<Source>YOU) try to (?<Type>\w+) (?<Target>.+?)(?: with (?<Ability>.+?))?\, but", </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>));</P> <P>m_parselist.Add(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><B><FONT color=#008080 size=2>ParseInfo</B></FONT><FONT size=2>(ProcessMiss, "^(?<Source>.+?) tries to (?<Type>\w+) (?<Target>.+?)(?: with (?<Ability>.+?))?\, but", </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>));</P></FONT></FONT></BLOCKQUOTE> <P>I always intended to open-source my program, but if you guys are interested I can speed that up a lot and let you have at it with your own log files?</P> <P>Cheers,</P> <P>Dd</P>

Singm
03-15-2005, 03:37 PM
Thanks Ddrak, I will try your code and see what I can do to parse french logs with it.I have a similar program in PhP, but the format of french logs is often modified by patches, that add a difficulty. Choosing Perl regex expressions is a good choice, we were just talking about the theory of using Flex / Bison. I have a EQ1 Perl program that work great, and I know that Perl regexp are great for this job <img src="/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" border="0" alt="SMILEY" />-----Je regarde ses sources et je vous tiens au courant si je peux en faire qq chose. Le gars a écrit un parser pas mal, en open source donc modifiable.

Atalar
03-15-2005, 04:35 PM
<DIV>comme je déteste perl, c'est hallucinant ^^</DIV> <DIV> </DIV> <DIV>Bon courage Singman, je passe , moi</DIV>

aimli
06-01-2006, 02:09 PM
<DIV>Bonjour !</DIV> <DIV> </DIV> <DIV>Des nouvelles sur un parser pour notre serveur franglais ?</DIV> <DIV> </DIV> <DIV> </DIV> <DIV>Ukyo, qui aimerait connaitre son DPS.</DIV>

Cirth_Beer
06-01-2006, 03:19 PM
<DIV>apparement ce projet a été completement abandonné, par contre va voir là : <A href="http://eqiiforums.station.sony.com/eq2/board/message?board.id=302&message.id=4393" target=_blank>http://eqiiforums.station.sony.com/eq2/board/message?board.id=302&message.id=4393</A></DIV> <DIV>il reste une solution pour parser <img src="/smilies/8a80c6485cd926be453217d59a84a888.gif" border="0" alt="SMILEY" /></DIV>

aimli
06-02-2006, 10:57 AM
<P>Merci Cirth !</P> <P> </P> <P>Ukyo </P> <P>Eclat d'Ombre</P>

Champolin
06-08-2006, 07:44 PM
Combat Tracker marche très bien mais nécessite de repasser le client en anglais.