| UPCDECL web interface version 0.6by Adam Leko and Dan Bonachea |
|
The upcdecl tool (based on the popular cdecl tool) converts back and forth between UPC type syntax and readable English explanations.
(Note the tool currently only supports literal integer array bounds.)
UPC-to-English:
English-to-UPC:
[] means optional; {} means 1 or more; <> means defined elsewhere
commands are separated by ';' and newlines
command:
declare <name> as <english>
cast <name> into <english>
explain <gibberish>
set or set options
help, ?
quit or exit
english:
function [( <decl-list> )] returning <english>
array [<number>] of <english>
[{ const | volatile | restrict }] pointer to <english>
<type>
type:
{[<storage-class>] [{<modifier>}] [<C-type>]}
{ struct | union | enum } <name>
decllist: a comma separated list of <name>, <english> or <name> as <english>
name: a C identifier
gibberish: a UPC declaration, like 'shared int *x', or cast, like '(int *)x'
storage-class: extern, static, auto, register
C-type: int, char, float, double, or void
modifier:
short, long, signed, unsigned, const, volatile, <shared>, or restrict
shared:
shared
shared [(] [blocksize] cyclic | indefinite | automatic | * | number [)]
options: {[no]quiet | [no]pointerspaces | [no]create | [no]upcverbose}
Page owner: upc at lbl.gov