More pidgin progress 
Author Message
 More pidgin progress

What's Pidgin?
--------------

According to Princeton's WordNet dictionary:

  pidgin, n. An artificial language used for trade between speakers of
  different languages.

  melange, n. A motley assortment of things.

Pidgin is overhauled version of CMU's Melange. It's eventually inteded to
parse C header files and generate Dylan C FFI bindings in a rigorous and
automatic fashion.

Thanks to the efforts of the Gwydion Group at CMU, Melange is a powerful
tool. Unfortunately, parts of it need to be redesigned with the benefit of
hindsight. That's what Pidgin is for.

What's the status of Pidgin?
----------------------------

Pidgin now has a complete model of ANSI C types and declarations and knows
how to represent them as strings.

What's next?
------------

Pidgin needs a type repository and a C parser. The type repository will
ensure that all "char *" types are the /same/ "char *" type.

The C parser will come from Melange.

I'll begin work on the type repository and parser integration in my spare
time during the coming week.

What kinds of types and declarations are supported?
---------------------------------------------------

Everything, I hope. Here's a sample set of types, printed as abstract
declarators. Note that Pidgin can represent function types and typedefs in
a more explicit fashion than is required by the ANSI C standard. This
design decision was based on experience with Melange.

  int
  signed long *
  char []
  char [10]
  char (*)[10]
  char *[10]
  char *(*())[10]
  char *(*(*)())[10]
  long double
  long long
  struct foo
  struct $0
  union bar
  union $1
  enum baz
  enum $2
  typedefed_type
  void (void)
  void (...)
  void (int, char, long long)
  void (int, char, long long, ...)

Tagged types can be displayed completely, in single- or multi-line forms:

  struct my_struct { int *foo; int *bar; signed int baz : 10; int : 2; }
  struct my_struct {
      int *foo;
      int *bar;
      signed int baz : 10;
      int : 2;
  }
  union my_union { int *foo; int *bar; }
  enum my_enum { quux = 2, quuux = 3 }
  enum my_enum {
      quux = 2,
      quuux = 3
  }

Type declarations:

  struct my_struct { int *foo; int *bar; signed int baz : 10; int : 2; };
  union my_union { int *foo; int *bar; };
  enum my_enum { quux = 2, quuux = 3 };
  typedef int typedefed_type;

Variable & function declarations:

  extern int v1;
  static typedefed_type v2;
  extern enum my_enum v3;
  extern void f2(int, char, long long);
  extern void f3(int, char, long long, ...);
  extern char *(*f())[10];
  extern char *(*(*fp)())[10];

Pidgin can also treat certain types of #defines as declarations. These
features are already supported by Melange's C parser.

  /* #define d1 3 */
  /* #define d2 "Hi!" */
  /* #define d3 struct my_struct */
  /* #define d4 ... */

If anybody wants Pidgin to support MSVC extensions (beyond those already
supported by Melange), you'll need to set aside some time to document how
they work.

The source code for Pidgin is stored in the Gwydion CVS server under
gd/src/tools/pidgin.

Cheers,
Eric



Wed, 12 Sep 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Pidgin progress

2. Casual pidgin hacking

3. Computer Languages == Pidgins?

4. Progress DB driver for VisualWorks

5. SIGAPL Book Sale Now in Progress

6. Centering Progress Dialogs

7. Download a file, displaying progress bar

8. APL97 Progress Report

9. amazingly difficult progress bar

10. Need help with thread and progress bar

11. How to create a progress floating window

12. Envy client for Linux - any progress

 

 
Powered by phpBB® Forum Software