preprocessing works, but is somewhat heavy and limited.
this new option has 3 ways of working:
- on raw file (eg with regular expressions)
- on lexed records
- on tree of nodes (eg sort csv file)
All three work via syntax in grammar:
syntax = {
'preprocess_nodes': sort_function,
}
def sort_function(thisnode):
thisnode.root.children.sort(key=lambda s: s.record.get('ORDERNUMMER'))
- on raw file: preprocess_raw
- on lexed records: preprocess_lex
- on tree of nodes: preprocess_nodes
Original issue reported on code.google.com by hjebb...@gmail.com on 19 May 2015 at 8:27
Original issue reported on code.google.com by
hjebb...@gmail.com
on 19 May 2015 at 8:27