CAP/TP02/ITE/main.py

22 lines
450 B
Python
Raw Permalink Normal View History

2024-09-23 11:04:28 +02:00
from antlr4 import InputStream
from antlr4 import CommonTokenStream
# include to use the generated lexer and parser
from ITELexer import ITELexer
from ITEParser import ITEParser
import sys
def main():
lexer = ITELexer(InputStream(sys.stdin.read()))
stream = CommonTokenStream(lexer)
parser = ITEParser(stream)
parser.prog()
print("Finished")
# warns pb if py file is included in others
if __name__ == '__main__':
main()