mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2025-01-02 14:29:35 +00:00
Major formatting fixes:
* No more tabs * Fix copyright notices to point at right files and name the license right
This commit is contained in:
parent
d5ec7bdacd
commit
1df8ad465d
@ -9,9 +9,9 @@
|
|||||||
|
|
||||||
6510 compatibility and deprecation are handled in Ophis.Main."""
|
6510 compatibility and deprecation are handled in Ophis.Main."""
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
|
||||||
verbose = 1;
|
verbose = 1;
|
||||||
|
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
"""Core pragmas
|
"""Core pragmas
|
||||||
|
|
||||||
Provides the core assembler directives. It does not guarantee
|
Provides the core assembler directives."""
|
||||||
compatibility with older versions of P65-Perl."""
|
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
|
||||||
from __future__ import nested_scopes
|
|
||||||
|
|
||||||
import Ophis.IR as IR
|
import Ophis.IR as IR
|
||||||
import Ophis.Frontend as FE
|
import Ophis.Frontend as FE
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
"""Symbol tables and environments for P65.
|
"""Symbol tables and environments for Ophis.
|
||||||
|
|
||||||
Implements the symbol lookup, through nested environments -
|
Implements the symbol lookup, through nested environments -
|
||||||
any non-temporary variable is stored at the top level."""
|
any non-temporary variable is stored at the top level."""
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
|
||||||
from __future__ import nested_scopes
|
|
||||||
import Ophis.Errors as Err
|
import Ophis.Errors as Err
|
||||||
|
|
||||||
class Environment:
|
class Environment:
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
Keeps track of the number of errors inflicted so far, and
|
Keeps track of the number of errors inflicted so far, and
|
||||||
where in the assembly the errors are occurring."""
|
where in the assembly the errors are occurring."""
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
currentpoint = "<Top Level>"
|
currentpoint = "<Top Level>"
|
||||||
|
@ -2,17 +2,15 @@
|
|||||||
|
|
||||||
Constructs a list of IR nodes from a list of input strings."""
|
Constructs a list of IR nodes from a list of input strings."""
|
||||||
|
|
||||||
from __future__ import nested_scopes
|
|
||||||
import Ophis.Errors as Err
|
import Ophis.Errors as Err
|
||||||
import Ophis.Opcodes as Ops
|
import Ophis.Opcodes as Ops
|
||||||
import Ophis.IR as IR
|
import Ophis.IR as IR
|
||||||
import Ophis.CmdLine as Cmd
|
import Ophis.CmdLine as Cmd
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
|
||||||
|
|
||||||
class Lexeme:
|
class Lexeme:
|
||||||
"Class for lexer tokens. Used by lexer and parser."
|
"Class for lexer tokens. Used by lexer and parser."
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
"""P65 Intermediate Representation
|
"""Ophis Intermediate Representation
|
||||||
|
|
||||||
Classes for representing the Intermediate nodes upon which the
|
Classes for representing the Intermediate nodes upon which the
|
||||||
assembler passes operate."""
|
assembler passes operate."""
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
|
||||||
from __future__ import nested_scopes
|
|
||||||
import Ophis.Errors as Err
|
import Ophis.Errors as Err
|
||||||
|
|
||||||
class Node:
|
class Node:
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
"""Macro support for P65.
|
"""Macro support for Ophis.
|
||||||
|
|
||||||
P65 Macros are cached SequenceNodes with arguments
|
Ophis Macros are cached SequenceNodes with arguments
|
||||||
set via .alias commands and prevented from escaping
|
set via .alias commands and prevented from escaping
|
||||||
with .scope and .scend commands."""
|
with .scope and .scend commands."""
|
||||||
|
|
||||||
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
|
# You may use, modify, and distribute this file under the MIT
|
||||||
|
# license: See README for details.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import Ophis.IR as IR
|
import Ophis.IR as IR
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
"""Main controller routines for the P65 assembler.
|
"""Main controller routines for the Ophis assembler.
|
||||||
|
|
||||||
When invoked as main, interprets its command line and goes from there.
|
When invoked as main, interprets its command line and goes from there.
|
||||||
Otherwise, use run_all to interpret a file set."""
|
Otherwise, use run_all to interpret a file set."""
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
|
||||||
from __future__ import nested_scopes
|
|
||||||
import sys
|
import sys
|
||||||
import Ophis.Frontend
|
import Ophis.Frontend
|
||||||
import Ophis.IR
|
import Ophis.IR
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
Additional assembler directives to permit assembly of
|
Additional assembler directives to permit assembly of
|
||||||
old P65-Perl sources. This is not, in itself, sufficient,
|
old P65-Perl sources. This is not, in itself, sufficient,
|
||||||
as the precedence of < and > vs. + and - has changed
|
as the precedence of < and > vs. + and - has changed
|
||||||
between P65-Perl and P65-Ophis.
|
between P65-Perl and Ophis.
|
||||||
|
|
||||||
Supported pragmas are: .ascii (byte), .address (word),
|
Supported pragmas are: .ascii (byte), .address (word),
|
||||||
.segment (text), .code (text), and .link."""
|
.segment (text), .code (text), and .link."""
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
|
||||||
import Ophis.CorePragmas as core
|
import Ophis.CorePragmas as core
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
Tables for the assembly of 6502-family instructions, mapping
|
Tables for the assembly of 6502-family instructions, mapping
|
||||||
opcodes and addressing modes to binary instructions."""
|
opcodes and addressing modes to binary instructions."""
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
|
||||||
# Names of addressing modes
|
# Names of addressing modes
|
||||||
modes = ["Implied", # 0
|
modes = ["Implied", # 0
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
"""The P65 Assembler passes
|
"""The Ophis Assembler passes
|
||||||
|
|
||||||
P65's design philosophy is to build the IR once, then run a great
|
Ophis's design philosophy is to build the IR once, then run a great
|
||||||
many assembler passes over the result. Thus, each pass does a
|
many assembler passes over the result. Thus, each pass does a
|
||||||
single, specialized job. When strung together, the full
|
single, specialized job. When strung together, the full
|
||||||
translation occurs. This structure also makes the assembler
|
translation occurs. This structure also makes the assembler
|
||||||
very extensible; additional analyses or optimizations may be
|
very extensible; additional analyses or optimizations may be
|
||||||
added as new subclasses of Pass."""
|
added as new subclasses of Pass."""
|
||||||
|
|
||||||
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
|
# You may use, modify, and distribute this file under the MIT
|
||||||
|
# license: See README for details.
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
|
||||||
# You may use, modify, and distribute this file under the BSD
|
|
||||||
# license: See LICENSE.txt for details.
|
|
||||||
|
|
||||||
from __future__ import nested_scopes
|
|
||||||
import Ophis.Errors as Err
|
import Ophis.Errors as Err
|
||||||
import Ophis.IR as IR
|
import Ophis.IR as IR
|
||||||
import Ophis.Opcodes as Ops
|
import Ophis.Opcodes as Ops
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
"P65 - a cross-assembler for the 6502 series of chips"
|
"Ophis - a cross-assembler for the 6502 series of chips"
|
||||||
|
|
||||||
# Copyright 2002 Michael C. Martin.
|
# Copyright 2002-2012 Michael C. Martin and additional contributors.
|
||||||
# You may use, modify, and distribute this file under the BSD
|
# You may use, modify, and distribute this file under the MIT
|
||||||
# license: See LICENSE.txt for details.
|
# license: See README for details.
|
||||||
|
Loading…
Reference in New Issue
Block a user