As someone who has 'been there, done that' here is a random collection of tips and advice: - Don't worry about re-inventing wheels---there are never enough wheels and not all of them are round!
- Restrict your input language. In this case I'd suggest PGN (Portable Game Notation) developed by Steven J. Edwards. It is a standard in the chess world and will make you life a lot more fun.
- Resist the notion that you don't need to 'play' the game you are parsing.
- Do the easy stuff first.
- Find someone to ask stupid questions of. PM is good for overall stuff. Idiots like me for chess parsing. Experts like Gmax for the rest.
- Regress. Then do it again! I know of no better task than parsing to implement the pragmatic approach to testing. In a as yet unpublished English to algebraic translator, the testbase includes 3000 games with known results to test against. Every time I think I'm safe---things go south and I'm back to testing. You are never safe---test always!
- Remember, Free Advice---and to paraphrase Curtis Mathis, darn well worth it!
--hsm
"Never try to teach a pig to sing...it wastes your time and it annoys the pig."
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|