File: Test157.ML

package info (click to toggle)
polyml 5.6-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 31,892 kB
  • ctags: 34,453
  • sloc: cpp: 44,983; ansic: 24,520; asm: 14,850; sh: 11,730; makefile: 551; exp: 484; python: 253; awk: 91; sed: 9
file content (15 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(* Something that looks like it should be an integer or word constant
   but isn't should be lexically analysed as an integer constant
   followed by an identifier.  This is similar to the problem
   with real constants identified in Test026. *)

fun test 0 _ = () | test _ _ = raise Fail "wrong";

val () = let val xz = 1 in test 0xz end;
val () = let val wxz = 1 in test 0wxz end;
val () = let val xw9 = 1 in test 0xw9 end;
val () = let val x = 1 in test 0x; () end;

(* Another one identified. *)
val () = let val w1 = 1 in test ~0w1 end;
val () = let val xw1 = 1 in test ~0xw1 end;