UFL

UPCDECL web interface version 0.6

by Adam Leko and Dan Bonachea

BUPC
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:

Enter a UPC code declaration or cast, for example:
shared [10] int * shared * p

show 'local'

English-to-UPC:

Enter an English explanation using the grammar below, for example:
declare x as shared cyclic pointer to shared blocksize 10 int

no ptr spaces

Upcdecl Grammar:

Full Documentation

Bug report / Feature request

  [] 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