Re:How to parse EVE Online chat logs (in Common Lisp)
by duped on Sunday November 28, 2021 @01:58AM
(#29366803)
I've found for down and dirty parsing, you can almost always parse simple log/structured output using operations like `split`, `substring`, `prefix`, and `suffix` where :
- `split` splits a string at an index or into substrings separated by a pattern
- `substring` takes a substring of a string for a range of indices
- `prefix` returns true if the start of the string matches a pattern, false otherwise
- `suffix` returns true if the end of the string matches a pattern, false otherwise
Python and C++ both have good standard library functions for these tasks. What's less important than a language for your parser is a language to plug the output into to make something useful.
- `split` splits a string at an index or into substrings separated by a pattern - `substring` takes a substring of a string for a range of indices - `prefix` returns true if the start of the string matches a pattern, false otherwise - `suffix` returns true if the end of the string matches a pattern, false otherwise
Python and C++ both have good standard library functions for these tasks. What's less important than a language for your parser is a language to plug the output into to make something useful.