Ignore:
Timestamp:
Nov 22, 2014, 4:51:46 PM (11 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
d11f789
Parents:
3c70d38
Message:

formatting changes

Location:
translator/examples
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • translator/examples/forward.c

    r3c70d38 rea3eb06  
    77struct q *x;
    88
    9 void f()
    10 {
    11         *x;
     9void f() {
     10    *x;
    1211}
  • translator/examples/huge.c

    r3c70d38 rea3eb06  
    1 int huge (int n, forall (type T) T (*f) (T))
    2 {
    3     if (n <= 0)
    4         return f(0);
     1int huge( int n, forall( type T ) T (*f)( T ) ) {
     2    if ( n <= 0 )
     3        return f( 0 );
    54    else
    6         return huge (n-1, f(f));
     5        return huge( n - 1, f( f ) );
    76}
  • translator/examples/identity.c

    r3c70d38 rea3eb06  
    1 // './cfa identity.c'
    2 
    31extern "C" {
    42    int printf( const char *fmt, ... );
  • translator/examples/new.c

    r3c70d38 rea3eb06  
    1 // "./cfa-cpp -c new.c"
    2 
    31forall( type T )
    42void f( T *t ) {
    5   t--;
    6   *t;
    7   ++t;
    8   t += 2;
    9   t + 2;
    10   --t;
    11   t -= 2;
    12   t - 4;
    13   t[7];
    14   7[t];
     3    t--;
     4    *t;
     5    ++t;
     6    t += 2;
     7    t + 2;
     8    --t;
     9    t -= 2;
     10    t - 4;
     11    t[7];
     12    7[t];
    1513}
  • translator/examples/quad.c

    r3c70d38 rea3eb06  
    1 // "./cfa quad.c"
    2 // "./cfa -CFA quad.c > quad_out.c"
    3 // "gcc31 -g quad_out.c LibCfa/libcfa.a"
    4 
    51extern "C" {
    62#include <stdio.h>
  • translator/examples/test.c

    r3c70d38 rea3eb06  
    1 // "cfa -c -o test.o test.c"
    2 // "cfa -CFA test.c > test_out.c"
    3 // "gcc31 -c test_out.c -o test.o"
    4 
    51#include "fstream.h"
    62#include "vector_int.h"
    73
    8 int
    9 main()
    10 {
    11   ofstream *sout = ofstream_stdout();
    12   vector_int vec = vector_int_allocate();
    13   int index;
    14   switch(1) {
    15   case 1:
    16     sout << vec[ index ];
    17   }
    18   sout << "\n";
    19   return 0;
     4int main() {
     5    ofstream *sout = ofstream_stdout();
     6    vector_int vec = vector_int_allocate();
     7    int index;
     8    switch(1) {
     9      case 1:
     10        sout << vec[ index ];
     11    }
     12    sout << "\n";
    2013}
  • translator/examples/vector_test.c

    r3c70d38 rea3eb06  
    1 // "cfa -c -o vector_test.o vector_test.c"
    2 // "cfa -CFA vector_test.c > vector_test_out.c"
    3 // "cfa -E vector_test.c > vector_test_out.c"
    4 // "gcc31 -c vector_test_out.c -o vector_test.o"
    5 
    61#include "fstream.h"
    72#include "vector_int.h"
Note: See TracChangeset for help on using the changeset viewer.