mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-27 04:37:59 +00:00
Clean up and improve ident parsing
This commit is contained in:
parent
8d7c88c095
commit
dbd37f97ad
3 changed files with 84 additions and 84 deletions
|
@ -2,9 +2,8 @@ use gen::derive_parser;
|
|||
use logos::Logos;
|
||||
use std::mem;
|
||||
use std::num::{ParseFloatError, ParseIntError};
|
||||
use winnow::combinator::{alt, empty, fail, opt};
|
||||
use winnow::stream::SliceLen;
|
||||
use winnow::token::{any, literal};
|
||||
use winnow::combinator::*;
|
||||
use winnow::token::any;
|
||||
use winnow::{
|
||||
error::{ContextError, ParserError},
|
||||
stream::{Offset, Stream, StreamIsPartial},
|
||||
|
@ -206,6 +205,8 @@ fn ident<'a, 'input>(stream: &mut ParserState<'a, 'input>) -> PResult<&'input st
|
|||
any.verify_map(|t| {
|
||||
if let Token::Ident(text) = t {
|
||||
Some(text)
|
||||
} else if let Some(text) = t.opcode_text() {
|
||||
Some(text)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
@ -563,7 +564,6 @@ derive_parser!(
|
|||
pub enum ScalarType { }
|
||||
|
||||
// https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-mov
|
||||
|
||||
mov.type d, a => {
|
||||
Instruction::Mov{
|
||||
data: MovDetails::new(type_.into()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue