We are currently working on trying to generate a new code using antlr. We have a grammar file that pretty much can recognize everything. Now, our problem is that we want to be able to create code again using the tokens that we generate to create this new file.
We have a .txt file with our tokens that looks like this:
[@0,0:6=' ',<75>,channel=1,1:0]
[@1,7:20='IDENTIFICATION',<6>,1:7]
[@2,21:21=' ',<75>,channel=1,1:21]
[@3,22:29='DIVISION',<4>,1:22]
[@4,30:30='.',<3>,1:30]
[@5,31:40='\n \t ',<75>,channel=1,1:31]
[@6,41:50='PROGRAM-ID',<16>,2:9]
[@7,51:51='.',<3>,2:19]
[@8,52:52=' ',<75>,channel=1,2:20]
[@9,53:59='testpro',<76>,2:21]
[@10,60:60='.',<3>,2:28]
[@11,61:70='\n \t ',<75>,channel=1,2:29]
[@12,71:76='AUTHOR',<31>,3:9]
[@13,77:77='.',<3>,3:15]
Or is there another way to create the old code using tokens?
Thanks in advance, Viktor