Added comments
This commit is contained in:
@ -6,13 +6,13 @@
|
||||
|
||||
namespace fsh {
|
||||
|
||||
// Ova klasa vrsi leksicku analizu ulaznog string-a
|
||||
class Lexer {
|
||||
public:
|
||||
enum TokenType {
|
||||
WHITESPACE,
|
||||
WORD,
|
||||
STRING_LITERAL,
|
||||
OPT,
|
||||
FLAG,
|
||||
LREDIRECTION,
|
||||
RREDIRECTION,
|
||||
@ -23,8 +23,11 @@ namespace fsh {
|
||||
|
||||
using Token = std::pair<Lexer::TokenType, std::string>;
|
||||
|
||||
int peek();
|
||||
int consume();
|
||||
// Daje nam sledeci karakter bez povecavanjem brojaca
|
||||
int peek();
|
||||
// Daje nam sledeci karakter sa povecavanjem brojaca
|
||||
int consume();
|
||||
// Trazi za sledeci token
|
||||
Token next_token();
|
||||
|
||||
static std::list<Token> process(std::string line);
|
||||
@ -87,4 +90,4 @@ namespace fsh {
|
||||
return state;
|
||||
}
|
||||
|
||||
} // namespace fsh
|
||||
}
|
||||
Reference in New Issue
Block a user