GSC Interpreter
A Turing-complete interpreter developed for a compiler course
Loading...
Searching...
No Matches
scanner.cpp File Reference
#include "gsc/scanner.hpp"
#include "gsc/error.hpp"
Include dependency graph for scanner.cpp:

Go to the source code of this file.

Functions

bool isDigit (const char c)
 
bool isAlpha (const char c)
 
bool isAlphaNumeric (const char c)
 

Function Documentation

◆ isAlpha()

bool isAlpha ( const char  c)

Definition at line 6 of file scanner.cpp.

6 {
7 return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_';
8}
Here is the caller graph for this function:

◆ isAlphaNumeric()

bool isAlphaNumeric ( const char  c)

Definition at line 10 of file scanner.cpp.

10{ return isAlpha(c) || isDigit(c); }
bool isDigit(const char c)
Definition scanner.cpp:4
bool isAlpha(const char c)
Definition scanner.cpp:6
Here is the call graph for this function:

◆ isDigit()

bool isDigit ( const char  c)

Definition at line 4 of file scanner.cpp.

4{ return c >= '0' && c <= '9'; }
Here is the caller graph for this function: