2 guppy is a pattern-matching language by Joey Adams that's not implemented or formalized yet.
3 See http://www.funsitelots.com/pub/guppy.g for a near self-definition
5 This is a guppy representation of integer and floating point formatting in C.
6 It is based on http://c0x.coding-guidelines.com/6.4.4.1.html and http://c0x.coding-guidelines.com/6.4.4.2.html
15 ([1-9] [0-9]*) //decimal
17 (0 [X x] [0-9 A-F a-f]*) //hexadecimal
22 ([L l]*1..2 [U u]*0..1)
26 decimal_floating_constant()
27 hexadecimal_floating_constant()
30 decimal_floating_constant: [
31 ([0-9]* '.' [0-9]+ exponent_part()*0..1 floating_suffix())
32 ([0-9]+ '.' exponent_part()*0..1 floating_suffix())
33 ([0-9]+ exponent_part() floating_suffix())
37 ([E e] ['+' '-']*0..1 [0-9]+)
39 hexadecimal_floating_constant:
41 [0-9 A-F a-f]* '.' [0-9 A-F a-f]+
44 ] [P p] ['+' '-']*0..1 [0-9]+ floating_suffix())
46 floating_suffix: [F L f l]*0..1
51 (0 [X x] [0-9 A-F a-f '.']*)
52 (0 [B b] [0-1] [0-9 '.']*)
55 ( [E P e p] ['+' '-']*0..1 [0-9]* )*0..1
56 [0-9 A-Z a-z '.' '_' '$']*
62 A numeric constant can begin with any of:
64 and can contain any of:
65 0-9 a-f e f l p u x '.' '+' '-'
66 along with capital equivalents.
68 If scanning finds something starting with a '.' but no decimal digit after it, it is the '.' operator and not a number.