Change hw6 to an unsolved version.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
0c04936ccf
commit
ee01a8f5b2
186 changed files with 9605 additions and 4019 deletions
|
|
@ -15,7 +15,8 @@ rule token = parse
|
|||
| eof { EOF }
|
||||
| whitespace+ { token lexbuf }
|
||||
| newline+ { token lexbuf }
|
||||
| "c\"" { read_string (Buffer.create 17) lexbuf }
|
||||
| "\"" { read_string (Buffer.create 16) lexbuf }
|
||||
| "c\"" { read_string (Buffer.create 16) lexbuf }
|
||||
| '*' { STAR }
|
||||
| ',' { COMMA }
|
||||
| ':' { COLON }
|
||||
|
|
@ -64,6 +65,8 @@ rule token = parse
|
|||
| "external" { EXTERNAL }
|
||||
| "alloca" { ALLOCA }
|
||||
| "bitcast" { BITCAST }
|
||||
| "target" { TARGET }
|
||||
| "triple" { TRIPLE }
|
||||
| '%' ('.' ?) (identifier as i) { UID i }
|
||||
| '@' ('.' ?) (identifier as i) { GID i }
|
||||
| "x" { CROSS } (* for Array types *)
|
||||
|
|
@ -75,6 +78,7 @@ rule token = parse
|
|||
|
||||
and read_string buf = parse
|
||||
| '\\' "00" '"' { STRING (Buffer.contents buf) }
|
||||
| '"' { STRING (Buffer.contents buf) }
|
||||
| '\\' { Buffer.add_char buf '\\'; read_string buf lexbuf }
|
||||
| [^ '"' '\\']+ { Buffer.add_string buf (Lexing.lexeme lexbuf)
|
||||
; read_string buf lexbuf }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue