# Path: msp430/asm/rpn.py
# class Word(unicode):
# class RPNError(Exception):
# class RPNBase(list):
# class RPNStackOps(object):
# class RPNSimpleMathOps(object):
# class RPNMoreMathOps(object):
# class RPNBitOps(object):
# class RPNLogicOps(object):
# class RPNCompareOps(object):
# class RPN(RPNBase, RPNStackOps, RPNSimpleMathOps, RPNMoreMathOps,
#           RPNBitOps, RPNLogicOps, RPNCompareOps):
#     def __new__(cls, word, filename, lineno, text):
#     def lower(self):
# def annotated_words(sequence, filename=None, lineno=None, offset=None, text=None):
# def words_in_string(data, name='<string>', include_newline=False):
# def words_in_file(filename, fileobj=None, include_newline=False):
#     def __init__(self, message, filename=None, lineno=None, column=None, offset=None, text=None):
#     def __str__(self):
# def rpn_function(code):
#     def wrapper(stack):
# def word(name):
#     def decorate_word(function):
#     def __init__(self, namespace=None):
#     def interpret_sequence(self, sequence, filename=None):
#     def interpret(self, iterator):
#     def look_up(self, word):
#     def next_word(self):
#     def interpret_word(self, word):
#     def push(self, obj):
#     def pop(self):
#     def pop2(self):
#     def prettyprint(self, stack):
#     def __str__(self):
#     def printer(self, obj):
#     def clear(self, stack=None):
#     def dup(self, stack):
#     def drop(self, stack):
#     def swap(self, stack):
#     def over(self, stack):
#     def pick(self, stack):
#     def add(self, stack):
#     def sub(self, stack):
#     def mul(self, stack):
#     def div(self, stack):
#     def minimum(self, stack):
#     def maximum(self, stack):
#     def word_INT(self, stack):
#     def word_FLOAT(self, stack):
#     def negate(self, stack):
#     def bitor(self, stack):
#     def bitand(self, stack):
#     def bitxor(self, stack):
#     def bit_shift_left(self, stack):
#     def bit_shift_right(self, stack):
#     def bitnot(self, stack):
#     def word_NOT(self, stack):
#     def word_AND(self, stack):
#     def word_OR(self, stack):
#     def word_IFTE(self, stack):
#     def word_LIST(self, stack):
#     def smaller(self, stack):
#     def smaller_equal(self, stack):
#     def larger(self, stack):
#     def larger_equal(self, stack):
#     def equal(self, stack):
#     def not_equal(self, stack):
# def eval(words, stack=[], namespace={}):
# def python_function(code, namespace={}):
#     def wrapper(*args):
# def interpreter_loop(namespace={}, debug=False, rpn_class=RPN, rpn_instance=None):
#             N = min(4, len(self))


import sys
import os
import codecs
import pkgutil
import logging
from msp430.asm import rpn
    from optparse import OptionParser
                    self.logger.info('done include %s' % (name,))
                    self.included_files.append(name)
        self.doctree.pop_state() # restore previous chapter and section

    @rpn.word('SHOW')
    def word_SHOW(self, stack):
        """Show internals of given word. Used to debug."""
        name = self.next_word()
        sys.stderr.write('SHOW %r\n' % name)
        try:
            value = self.look_up(name)
        except KeyError:
            sys.stderr.write('    value -> <undefined>\n')
        else:
            sys.stderr.write('    value -> %r\n' % (value,))
            if isinstance(value, Frame):
                sys.stderr.write('    contents -> \n')
                for item in value:
                    sys.stderr.write('        %r\n' % item)

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

def main():
    logging.basicConfig(level=logging.ERROR)

    parser = OptionParser(usage="""\
%prog [options] [FILE...]|-]

If no input files are specified data is read from stdin."""
            )

# Path: msp430/asm/rpn.py
# class Word(unicode):
# class RPNError(Exception):
# class RPNBase(list):
# class RPNStackOps(object):
# class RPNSimpleMathOps(object):
# class RPNMoreMathOps(object):
# class RPNBitOps(object):
# class RPNLogicOps(object):
# class RPNCompareOps(object):
# class RPN(RPNBase, RPNStackOps, RPNSimpleMathOps, RPNMoreMathOps,
#           RPNBitOps, RPNLogicOps, RPNCompareOps):
#     def __new__(cls, word, filename, lineno, text):
#     def lower(self):
# def annotated_words(sequence, filename=None, lineno=None, offset=None, text=None):
# def words_in_string(data, name='<string>', include_newline=False):
# def words_in_file(filename, fileobj=None, include_newline=False):
#     def __init__(self, message, filename=None, lineno=None, column=None, offset=None, text=None):
#     def __str__(self):
# def rpn_function(code):
#     def wrapper(stack):
# def word(name):
#     def decorate_word(function):
#     def __init__(self, namespace=None):
#     def interpret_sequence(self, sequence, filename=None):
#     def interpret(self, iterator):
#     def look_up(self, word):
#     def next_word(self):
#     def interpret_word(self, word):
#     def push(self, obj):
#     def pop(self):
#     def pop2(self):
#     def prettyprint(self, stack):
#     def __str__(self):
#     def printer(self, obj):
#     def clear(self, stack=None):
#     def dup(self, stack):
#     def drop(self, stack):
#     def swap(self, stack):
#     def over(self, stack):
#     def pick(self, stack):
#     def add(self, stack):
#     def sub(self, stack):
#     def mul(self, stack):
#     def div(self, stack):
#     def minimum(self, stack):
#     def maximum(self, stack):
#     def word_INT(self, stack):
#     def word_FLOAT(self, stack):
#     def negate(self, stack):
#     def bitor(self, stack):
#     def bitand(self, stack):
#     def bitxor(self, stack):
#     def bit_shift_left(self, stack):
#     def bit_shift_right(self, stack):
#     def bitnot(self, stack):
#     def word_NOT(self, stack):
#     def word_AND(self, stack):
#     def word_OR(self, stack):
#     def word_IFTE(self, stack):
#     def word_LIST(self, stack):
#     def smaller(self, stack):
#     def smaller_equal(self, stack):
#     def larger(self, stack):
#     def larger_equal(self, stack):
#     def equal(self, stack):
#     def not_equal(self, stack):
# def eval(words, stack=[], namespace={}):
# def python_function(code, namespace={}):
#     def wrapper(*args):
# def interpreter_loop(namespace={}, debug=False, rpn_class=RPN, rpn_instance=None):
#             N = min(4, len(self))


# Path: msp430/asm/forth.py
import sys
import os
import codecs
import pkgutil
import logging
from msp430.asm import rpn
    from optparse import OptionParser

                    self.logger.info('done include %s' % (name,))
                    self.included_files.append(name)
        self.doctree.pop_state() # restore previous chapter and section

    @rpn.word('SHOW')
    def word_SHOW(self, stack):
        """Show internals of given word. Used to debug."""
        name = self.next_word()
        sys.stderr.write('SHOW %r\n' % name)
        try:
            value = self.look_up(name)
        except KeyError:
            sys.stderr.write('    value -> <undefined>\n')
        else:
            sys.stderr.write('    value -> %r\n' % (value,))
            if isinstance(value, Frame):
                sys.stderr.write('    contents -> \n')
                for item in value:
                    sys.stderr.write('        %r\n' % item)

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

def main():
    logging.basicConfig(level=logging.ERROR)

    parser = OptionParser(usage="""\
%prog [options] [FILE...]|-]

If no input files are specified data is read from stdin."""
            )

    parser.add_option(