Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f08381b5f7
Fetching contributors…

Cannot retrieve contributors at this time

executable file 25 lines (19 sloc) 0.559 kb
#!/usr/bin/env python
import antlr3
from OpenAirLexer import OpenAirLexer
from OpenAirParser import OpenAirParser
import sys
fin = file(sys.argv[1])
s = ""
for i in fin.xreadlines():
s += i
char_stream = antlr3.ANTLRStringStream(s)
# or to parse a file:
# char_stream = antlr3.ANTLRFileStream(path_to_input)
# or to parse an opened file or any other file-like object:
# char_stream = antlr3.ANTLRInputStream(file)
lexer = OpenAirLexer(char_stream)
tokens = antlr3.CommonTokenStream(lexer)
parser = OpenAirParser(tokens)
Jump to Line
Something went wrong with that request. Please try again.