Changeset 788 for proto/Compiler


Ignore:
Timestamp:
Dec 7, 2010, 3:31:19 PM (9 years ago)
Author:
ksherdy
Message:

Rename template.c and compilable.py.

Location:
proto/Compiler/workspace
Files:
2 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/workspace/Makefile

    r651 r788  
    1 SRCFILE=compilable.py
    2 OUTFILE=src/code.c
    3 COMPILER=../Compiler/bitstream_compiler.py
     1PYBIT_SRCFILE=pybit_compilable.py
     2PYBIT_TEMPLATE=pybit_template.c
     3PYBIT_OUTFILE=src/code.c
     4PYBIT_COMPILER=../Compiler/bitstream_compiler.py
    45
    5 all:    $(SRCFILE)
    6         python $(COMPILER) $(SRCFILE) $(OUTFILE)
     6PABLO_SRCFILE=pablo_compilable.py
     7PABLO_COMPILER=../Compiler/compiler2.py
     8PABLO_OUTFILE=src/code.c
     9PABLO_TEMPLATE=pablo_template.c
    710
    8 clean: 
    9         rm -f $(OUTFILE)
    1011
     12pybit:  $(PYBIT_SRCFILE)
     13        python $(PYBIT_COMPILER) $(PYBIT_SRCFILE) $(PYBIT_OUTFILE)
     14
     15pybit_clean:   
     16        rm -f $(PYBIT_OUTFILE)
     17
     18pablo:  $(PABLO_SRCFILE)
     19        python $(PABLO_COMPILER) $(PABLO_SRCFILE) -t $(PABLO_TEMPLATE) -o $(OUTFILE)
     20
     21pablo_help:
     22        python  $(PABLO_COMPILER) -h
     23
     24pablo_clean:   
     25        rm -f $(PABLO_OUTFILE)
     26
  • proto/Compiler/workspace/byteclass.py

    r665 r788  
    22# byteclass.py
    33#
    4 # Bitstream character class definitions for JSON character classes.
     4# Bitstream character class definitions.
    55#
    66
    7 class lexical_streams ():
     7class lexical_streams():
     8        pass
    89
    9 def classify_bytes(bit) :
     10def classify_bytes(bit):
    1011  lex = lexical_streams()
    1112  return (lex)
  • proto/Compiler/workspace/prototype.py

    r716 r788  
    2121import sys
    2222
    23 filename = "prototype.py"
    24 
    2523def XXX(data):
    2624        return data
     
    2927        r"""
    3028        >>> demo_XXX('')
     29        ''
    3130        """ 
     31        XXX(data)
    3232        return data
    3333       
     
    3636        doctest.testmod()
    3737
     38        print len(sys.argv)
     39
    3840        if len(sys.argv) < 2:
    39                 sys.stderr.write("Usage: python " + filename + " <filename>" "\n")
     41                print "Usage: python %prog <FILE>"
    4042                sys.exit(2)
    4143
Note: See TracChangeset for help on using the changeset viewer.