"""
Alloy Programming Language

A general-purpose programming language designed specifically for AI agents,
with first-class support for agent interactions, tool definitions, and 
hybrid human-AI development workflows.
"""

from .lexer import AlloyLexer, get_global_lexer
from .parser import AlloyParser, get_global_parser
from .interpreter import Interpreter, run_alloy_code
from .environment import Environment, RuntimeError
from .ast_nodes import *

__version__ = "0.1.0"
__author__ = "Alloy Team"

# Legacy compatibility - expose global instances directly
lexer = get_global_lexer()
parser = get_global_parser()

# Create default instances for backward compatibility
def get_lexer():
    """Get a lexer instance for backward compatibility"""
    return get_global_lexer()

def get_parser():
    """Get a parser instance for backward compatibility"""
    return get_global_parser()

# Create convenience function
def create_interpreter():
    """Create a new interpreter instance"""
    return Interpreter()

# Expose the main classes for clean imports
__all__ = [
    'AlloyLexer',
    'AlloyParser', 
    'Interpreter',
    'Environment',
    'RuntimeError',
    'run_alloy_code',
    'create_interpreter',
    'get_lexer',
    'get_parser',
    'lexer',
    'parser',
]