Hi,
I am parsing a log file using ANTLR grammar which contains key-value pairs those are separated by a delimiter (COLON ':').
So, in the rule I have specified COLON as delimiter/separator.
But, the problem I am facing is, if the value in key-value pair contains the COLON then it is considering the same as separator which I don't want.
I want the COLON available in value should be considered.
Below is the sample format of file pattern that is to be parsed.
===================================================
Sequential Read : 404.309 MB/s
Sequential Write : 183.446 MB/s
Random Read 512KB : 169.463 MB/s
Random Write 512KB : 180.138 MB/s
Random Read 4KB (QD=1) : 20.800 MB/s [ 5078.1 IOPS]
Random Write 4KB (QD=1) : 48.432 MB/s [ 11824.2 IOPS]
Random Read 4KB (QD=32) : 26.155 MB/s [ 6385.4 IOPS]
Random Write 4KB (QD=32) : 111.335 MB/s [ 27181.5 IOPS]
Test : 4000 MB [C: 40.8% (48.5/118.9 GB)] (x5)
Date : 2015/02/11 6:23:47
OS : Windows 8 Professional [6.2 Build 9200] (x64)
====================================================
Above the highlighted value in the key-value pair contains COLON which is considered as a separator.
Please find the grammar file and java file that I have created is attached with this post. Please correct me if I have done any mistakes.
I am new to ANTLR and need some valuable suggestions for mentioned issue.
Thanks
Amrit