Skip to content

Conversation

@AlexandraNegoita
Copy link
Collaborator

  • initialized ANTLR;
  • input file with Pascal code is 'code-pascal.txt';
  • created lexer, parser;
  • imported packages '@easycompiler/ast' and '@easycompiler/frontend' - doesn't work
  • implemented Frontend from interface IFrontend - parse will contain all token visitors

@AlexandraNegoita
Copy link
Collaborator Author

In Pascal example:
Updates:

  • added entire pascal test program
  • class pascalVisitors, for each node that the compiler reaches in the example program (using Pascal grammar)
  • node types are mostly made Block, until further addition of nodes to AST package
  • added implementation of the frontend interface
    Problems:
  • JSON printing shows four Value nodes with "Hello, World", the parsing is correct

In AST package:
Updates:

  • added parseJSON method to all nodes, for JSON clarity
  • added Value node, that will store all types of values used in the program
  • added name property to the Block node, for JSON clarity
  • modified Type node to set with string property
  • added string definitions to enum NodeID, for JSON clarity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants