摘要:
grammar CSV;@member{}@header{import java.util.*;}filelocals [int i=0]: hdr ( rows+=row[$hdr.text.split(",")] {$i++;} )+{System.out.println($i+" rows");for (RowContext r : $rows) {System.out.println("row token interval: "+r.getSourceInterval());}};hdr : row[null] {System 阅读全文