diff options
| author | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2025-11-02 21:56:58 -0500 |
|---|---|---|
| committer | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2025-11-02 21:56:58 -0500 |
| commit | 26da453832ca90ce22415a59a2aab57ab16cba66 (patch) | |
| tree | f773bf84632158537fc72a9b869cd87066d73946 /include/lexer.h | |
| parent | f84e64b593c6e6fda9e2a907d25ed99d8742d619 (diff) | |
| download | hush-26da453832ca90ce22415a59a2aab57ab16cba66.tar.gz | |
Comment header + clang tidy
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); |