You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.4 KiB
50 lines
1.4 KiB
10 years ago
|
{
|
||
|
open JVerboseParser
|
||
|
}
|
||
|
|
||
|
let space = [' ' '\t']
|
||
|
|
||
|
let lowerletter = ['a'-'z']
|
||
|
let upperletter = ['A'-'Z']
|
||
|
let letter = lowerletter | upperletter
|
||
|
|
||
|
let underscore = '_'
|
||
|
let minus = '-'
|
||
|
let dot = '.'
|
||
|
let hash = '#'
|
||
|
let dollar = '$'
|
||
|
|
||
|
let digit = ['0'-'9']
|
||
|
let number = digit* | digit+ '.' digit* | digit* '.' digit+
|
||
|
let char = letter | digit
|
||
|
|
||
|
let dir_sep = '/'
|
||
|
|
||
|
let dot_java = dot "java"
|
||
|
let dot_class = dot "class"
|
||
|
let path = (char | dir_sep | underscore | minus | dot | hash | dollar)+
|
||
|
let source_basename = path dot_java
|
||
|
let class_basename = path dot_class
|
||
|
let source_filename = (dir_sep path | path)* source_basename
|
||
|
let class_filename = (dir_sep path | path)* class_basename
|
||
|
|
||
|
let search_path = "search path for class files"
|
||
|
|
||
|
rule token = parse
|
||
|
| [' ' '\t'] { token lexbuf } (* skip blanks *)
|
||
|
| ['\n'] { EOL }
|
||
|
| '[' { LEFT_SQUARE_BRACKET }
|
||
|
| ']' { RIGHT_SQUARE_BRACKET }
|
||
|
| ':' { COLON }
|
||
|
| ',' { COMMA }
|
||
|
| "parsing" { PARSING }
|
||
|
| "started" { STARTED }
|
||
|
| "wrote" { WROTE }
|
||
|
| search_path { SEARCH_PATH }
|
||
|
| "RegularFileObject" { REGULARFILEOBJECT }
|
||
|
| "ZipFileIndexFileObject" { ZIPFILEINDEXFILEOBJECT }
|
||
|
| source_filename as p { SOURCE_FILENAME p }
|
||
|
| class_filename as p { CLASS_FILENAME p }
|
||
|
| path as p { PATH p }
|
||
|
| eof { EOF }
|