# Path: chips/compiler/exceptions.py
# class C2CHIPError(Exception):
# 
#     def __init__(self, message, filename=None, lineno=None):
#         self.message = message
#         if filename is not None:
#             self.filename = os.path.abspath(filename)
#         else:
#             self.filename = None
#         self.lineno = lineno
# 
#     def __str__(self):
#         return self.message + " in line %s at file %s" % (
#             self.lineno,
#             self.filename
#         )


import os.path
import subprocess
from chips.compiler.exceptions import C2CHIPError
                # character literal
                elif token.startswith("'"):
                    if char == "'":
                        token += char
                        tokens.append((self.filename, self.lineno, token))
                        token = ""
                    else:
                        token += char

                # operator
                elif token in operators:
                    if token + char in operators:
                        token += char
                    else:
                        tokens.append((self.filename, self.lineno, token))
                        token = char

                else:
                    token = char

                newline = False
            self.lineno += 1

        self.tokens.extend(tokens)

    def error(self, string):
        """
        Generate an error message (including the filename and line number)
        """


# Path: chips/compiler/exceptions.py
# class C2CHIPError(Exception):
# 
#     def __init__(self, message, filename=None, lineno=None):
#         self.message = message
#         if filename is not None:
#             self.filename = os.path.abspath(filename)
#         else:
#             self.filename = None
#         self.lineno = lineno
# 
#     def __str__(self):
#         return self.message + " in line %s at file %s" % (
#             self.lineno,
#             self.filename
#         )


# Path: chips/compiler/tokens.py
import os.path
import subprocess
from chips.compiler.exceptions import C2CHIPError

                # character literal
                elif token.startswith("'"):
                    if char == "'":
                        token += char
                        tokens.append((self.filename, self.lineno, token))
                        token = ""
                    else:
                        token += char

                # operator
                elif token in operators:
                    if token + char in operators:
                        token += char
                    else:
                        tokens.append((self.filename, self.lineno, token))
                        token = char

                else:
                    token = char

                newline = False
            self.lineno += 1

        self.tokens.extend(tokens)

    def error(self, string):
        """
        Generate an error message (including the filename and line number)
        """


        raise C2CHIPError(string + "\n", self.filename, self.lineno)