farm parser out to a crate, remove it as a git submodule.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use prolog_parser::ast::*;
|
||||
|
||||
use prolog::ast::*;
|
||||
use prolog::machine::machine_state::*;
|
||||
use prolog::num::bigint::BigInt;
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
use prolog::and_stack::*;
|
||||
use prolog_parser::ast::*;
|
||||
use prolog_parser::tabled_rc::*;
|
||||
|
||||
use prolog::ast::*;
|
||||
use prolog::and_stack::*;
|
||||
use prolog::copier::*;
|
||||
use prolog::heap_print::*;
|
||||
use prolog::machine::machine_errors::*;
|
||||
use prolog::num::{BigInt, BigUint, Zero, One};
|
||||
use prolog::or_stack::*;
|
||||
use prolog::read::*;
|
||||
use prolog::tabled_rc::*;
|
||||
|
||||
use downcast::Any;
|
||||
|
||||
@@ -264,38 +266,6 @@ pub(super) enum MachineMode {
|
||||
Write
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum DoubleQuotes {
|
||||
Atom, Chars, // Codes
|
||||
}
|
||||
|
||||
impl DoubleQuotes {
|
||||
pub fn is_chars(self) -> bool {
|
||||
if let DoubleQuotes::Chars = self {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for DoubleQuotes {
|
||||
fn default() -> Self {
|
||||
DoubleQuotes::Chars
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct MachineFlags {
|
||||
pub double_quotes: DoubleQuotes
|
||||
}
|
||||
|
||||
impl Default for MachineFlags {
|
||||
fn default() -> Self {
|
||||
MachineFlags { double_quotes: DoubleQuotes::default() }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct MachineState {
|
||||
pub(crate) atom_tbl: TabledData<Atom>,
|
||||
pub(super) s: usize,
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
use prolog::and_stack::*;
|
||||
use prolog_parser::ast::*;
|
||||
use prolog_parser::string_list::StringList;
|
||||
|
||||
use prolog::ast::*;
|
||||
use prolog::and_stack::*;
|
||||
use prolog::copier::*;
|
||||
use prolog::heap_iter::*;
|
||||
use prolog::heap_print::*;
|
||||
@@ -9,7 +12,6 @@ use prolog::num::{Integer, Signed, ToPrimitive, Zero};
|
||||
use prolog::num::bigint::{BigInt, BigUint};
|
||||
use prolog::num::rational::Ratio;
|
||||
use prolog::or_stack::*;
|
||||
use prolog::string_list::StringList;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::cmp::{max, Ordering};
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
use prolog_parser::ast::*;
|
||||
use prolog_parser::tabled_rc::*;
|
||||
|
||||
use prolog::ast::*;
|
||||
use prolog::compile::*;
|
||||
use prolog::heap_print::*;
|
||||
use prolog::tabled_rc::*;
|
||||
|
||||
mod machine_errors;
|
||||
pub(super) mod machine_state;
|
||||
#[macro_use]
|
||||
mod machine_state_impl;
|
||||
|
||||
#[macro_use] mod machine_state_impl;
|
||||
mod system_calls;
|
||||
|
||||
use prolog::machine::machine_state::*;
|
||||
@@ -16,6 +18,8 @@ use std::mem::swap;
|
||||
use std::ops::Index;
|
||||
use std::rc::Rc;
|
||||
|
||||
static BUILTINS: &str = include_str!("../lib/builtins.pl");
|
||||
|
||||
pub struct MachineCodeIndices<'a> {
|
||||
pub(super) code_dir: &'a mut CodeDir,
|
||||
pub(super) op_dir: &'a mut OpDir,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use prolog_parser::ast::*;
|
||||
|
||||
use prolog::ast::*;
|
||||
use prolog::machine::machine_errors::*;
|
||||
use prolog::machine::machine_state::*;
|
||||
|
||||
Reference in New Issue
Block a user