You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According issue #6, create a parser that receives as input an array of grammar tokens and outputs an integer representing roman numerals. The tokens will be the output of lexer tokenize method, created at issue #7, but it must not have lexer as dependency.
Also, the parser will be responsible to validate tokens, checking decrescent order. If tokens are not in decrescent order, the parse method must throw an ParserException. Throw this exception if method receive an unknown token, too.
Below, there's a table with tokens and corresponding values.
Token
Value
I
1
IV
4
V
5
IX
9
X
10
XL
40
L
50
XC
90
C
100
CD
400
D
500
CM
900
M
1000
The text was updated successfully, but these errors were encountered:
According issue #6, create a parser that receives as input an
array
of grammar tokens and outputs an integer representing roman numerals. The tokens will be the output of lexertokenize
method, created at issue #7, but it must not have lexer as dependency.Also, the parser will be responsible to validate tokens, checking decrescent order. If tokens are not in decrescent order, the
parse
method must throw anParserException
. Throw this exception if method receive an unknown token, too.Below, there's a table with tokens and corresponding values.
I
IV
V
IX
X
XL
L
XC
C
CD
D
CM
M
The text was updated successfully, but these errors were encountered: