ANTLR parser -- 2

• You are required to use ANTLR to implement the SDD appearing below for a CFG that generates the language a*c*b*.

S −→ ACB A −→ aA1

A −→ ε

B −→ bB1

B −→ ε

C −→ cC1

C −→ ε

[login to view URL] = equals(A.n, B.n) ∗ equals(A.n, C.n) A.n = A1.n + 1

A.n = 0

B.n = B1.n + 1

B.n = 0

C.n = C1.n + 1 C.n = 0

• The start variable S has an attribute check whose value is 1 if the generated string is of the form ancnbn, and is 0 otherwise.

• The only operations allowed on attributes are assignments, additions, multiplications, and equality checks; an equality check is an expression of the form equals(x, y) whose value is 1 if x is equal to y and is 0 otherwise.

• Important Details:

– Your implementation should be done within the template file which is uploaded to

the CMS.

– You are not allowed to change the already provided grammar, parser rule, or attribute names or types.

– You are allowed to write as many helper lexer/parser rules within the same grammar file (if needed).

– Public test cases have been provided on the CMS for you to test your implementation.

– Please ensure that the public test cases run correctly without modification before

coming to the lab to maintain a smooth evaluation process. 1

– A java file is provided in order to easily test your grammar with custom strings in addition to the public test cases.

– Private test cases will be uploaded before your session and will have the same structure as the public test cases.

Taidot: Java

Tietoa asiakkaasta:
( 0 arvostelua ) Cairo, Egypt

Projektin tunnus: #33794292

2 freelanceria on tarjonnut keskimäärin $125 tähän työhön


I'm experienced in compiler/interpreter construction and I'm familiar with ANTLR. I can complete this project with success.

$50 USD 6 päivässä
(0 arvostelua)

Hi, there. I am familiar with Java programming and ready to work with you. If you work with me, you will get success saving your money. Best regards. Kat.

$200 USD 7 päivässä
(0 arvostelua)