-
-
06 Jul 2019 22:46:02 UTC
- Distribution: CPU-Z80-Assembler
- Module version: 2.18
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (1)
- Testers (445 / 0 / 6)
- Kwalitee
Bus factor: 1- 97.18% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (155.54KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
++ed by:1 non-PAUSE user- NAME
- SYNOPSIS
- DESCRIPTION
- EXPORTS
- FUNCTIONS
- BUGS and FEEDBACK
- SEE ALSO
- AUTHORS, COPYRIGHT and LICENCE
NAME
CPU::Z80::Assembler::Parser - Parser for the Z80 assembler
SYNOPSIS
use CPU::Z80::Assembler::Parser; z80parser($input, $program);
DESCRIPTION
This module converts an input stream of tokens returned by the CPU::Z80::Assembler
z80lexer
to a binary object code that is returned in the passed CPU::Z80::Assembler::Program object.EXPORTS
By default the z80parser subroutines is exported.
FUNCTIONS
z80parser
This function is just a wrapper around the parse function. It takes as parameter a stream of assembly tokens as returned by the lexer and a CPU::Z80::Assembler::Program object to collect the object code.
The assembly program is parsed and loaded into CPU::Z80::Assembler::Program.
parse
$result = parse($input, $user, $start_rule)
This function receives the input token stream (Iterator::Simple::Lookahead), a user pointer and an optional start rule number.
It parses the input stream, leaving the stream at the first unparsed token, and returns the parse value - the result of the action function for the start rule.
The function dies with an error message indicating the input that cannot be parsed in case of a parse error.
$input is a stream of tokens, each token is a Asm::Preproc::Token with the token type, the token value and the input source line where the token was read.
The input source line is a Asm::Preproc::Line with the text of the whole input source line, the line number and the source file name. This is used at error messages.
$user is a user pointer that is passed back at each action function.
$start_rule is an optional alternative start rule ID.
BUGS and FEEDBACK
See CPU::Z80::Assembler.
SEE ALSO
CPU::Z80::Assembler CPU::Z80::Assembler::Program
AUTHORS, COPYRIGHT and LICENCE
See CPU::Z80::Assembler.
Module Install Instructions
To install CPU::Z80::Assembler, copy and paste the appropriate command in to your terminal.
cpanm CPU::Z80::Assembler
perl -MCPAN -e shell install CPU::Z80::Assembler
For more information on module installation, please visit the detailed CPAN module installation guide.