diff options
Diffstat (limited to 'include/lexer.h')
| -rw-r--r-- | include/lexer.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/include/lexer.h b/include/lexer.h index bec44a9..cf4cf98 100644 --- a/include/lexer.h +++ b/include/lexer.h @@ -1,15 +1,22 @@ /* - * Header file for the HUSH lexical analysis - * module + * include/lexer.h + * + * HUSH lexical analysis module + * CISC 301 -- Operating Systems, Project 2 + * + * Copyright (C) 2025 Douglas B. Rumbaugh <dbrumbaugh@harrisburgu.edu> + * + * Distributed under the Modified BSD License + * */ #ifndef H_HUSH_LEXER #define H_HUSH_LEXER #include <ctype.h> -#include <stdlib.h> -#include <string.h> #include <stdbool.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include "config.h" @@ -31,7 +38,7 @@ typedef struct token { struct token *next; } token; -/* +/* * Accepts a null-terminate string representing * a full command and returns the pointer to the * head of a list of parsed tokens. The provided @@ -47,7 +54,7 @@ typedef struct token { * input string is *not* null-terminated, or if * it has leading or trailing whitespace. */ - + token *parse_command(char *cmdstr); /* @@ -55,7 +62,7 @@ token *parse_command(char *cmdstr); * of parsed tokens and validates that the * tokens are syntactically valid. If the * sequence is valid, NULL will be returned. - * If the sequence is invalid, a pointer to + * If the sequence is invalid, a pointer to * the first invalid token will be returned. */ token *validate_command(token *cmd); |