5 class BookkeepingLexer extends XMLLexer;
9 k=10; // needed for newline junk
10 charVocabulary='\u0000'..'\u007F'; // allow ascii
11 exportVocab=BookkeepingLexer;
15 //TOKEN_LITERAL: ("debit" | "credit")+;
16 LEFT_PAREN: '(' { System.out.println("LEFT PARENTHESESE '('"); };
17 RIGHT_PAREN: ')' { System.out.println("RIGHT PARENTHESESE ')'"); };
18 DELIMITER: ',' { System.out.println("DELIMITER ','"); };
22 OPT_ENTRY: "-entry" WHITESPACE( 'A'..'Z' | 'a'..'z' | '0'..'9' )* { System.out.println("-entry"); };
23 OPT_ACCOUNT: "-account" WHITESPACE( 'A'..'Z' | 'a'..'z' | '0'..'9' )*;
24 OPT_JOURNAL: "-journal" WHITESPACE( 'A'..'Z' | 'a'..'z' | '0'..'9' )*;
25 OPT_NAME: "-name" WHITESPACE( 'A'..'Z' | 'a'..'z' | '0'..'9' )*;
26 OPT_TYPE: "-type" WHITESPACE( 'A'..'Z' | 'a'..'z' | '0'..'9' )*;
27 OPT_CWEIGHT: "-counterWeight" WHITESPACE("debit"|"credit");
28 OPT_AMOUNT: "-amount" WHITESPACE(('0'..'9')+'.'('0'..'9')('0'..'9'))*;
29 OPT_ID: "-id" WHITESPACE( 'A'..'Z' | 'a'..'z' | '0'..'9' )*;
30 OPT_ENTRYNUM: "-entrynum" WHITESPACE('0'..'9')*;
31 OPT_DATE: "-date" WHITESPACE(('0'..'9')('0'..'9')'/'('0'..'9')('0'..'9')'/'('0'..'9')('0'..'9')('0'..'9')('0'..'9'))*;
32 OPT_FILE: "-F" WHITESPACE( 'A'..'Z' | 'a'..'z' | '0'..'9' )*;
36 COMMAND_CREATE: ("create")+ { System.out.println("COMMAND_CREATE"); };
37 COMMAND_ADD!: ("add")+ { System.out.println("COMMAND_ADD"); };
38 COMMAND_REMOVE: ("remove")+ { System.out.println("COMMAND_REMOVE"); };
39 COMMAND_REVERSE: ("reverse")+ { System.out.println("COMMAND_REVERSE"); };
40 COMMAND_FIND: ("find")+ { System.out.println("COMMAND_FIND"); };
41 COMMAND_LOAD: ("load")+ { System.out.println("COMMAND_LOAD"); };
42 COMMAND_LIST: ("list")+ { System.out.println("COMMAND_LIST"); };
43 COMMAND_LOGIN: ("login")+ { System.out.println("COMMAND_LOGIN"); };
44 COMMAND_LOGOUT: ("logout")+ { System.out.println("COMMAND_LOGOUT"); };
45 COMMAND_EXIT: ("exit")+ { System.out.println("COMMAND_EXIT"); };
50 END_COMMAND: ';' { System.out.println("END COMMAND ';'"); };
51 WHITESPACE: ( ' ' | '\r' | '\n' | '\t' ) {
52 System.out.println("");
53 System.out.println("WHITE SPACE ' '");