Exemplo n.º 1
0
    def test_parse_select(self):
        SASDoc.from_string('''
SELECT;
WHEN(&SEX='2') _AGESEX  = 1;
OTHERWISE;
END;
        ''')
Exemplo n.º 2
0
 def test_parse_title(self):
     SASDoc.from_file('corpus/test-parse-title.sas')
Exemplo n.º 3
0
 def test_symio_001(self):
     SASDoc.from_file('corpus/test-symio-001.sas')
Exemplo n.º 4
0
 def test_parse_proc_format(self):
     SASDoc.from_file('corpus/test-parse-proc-format.sas')
Exemplo n.º 5
0
 def test_parse_proc_datasets(self):
     SASDoc.from_file('corpus/test-parse-proc-datasets.sas')
Exemplo n.º 6
0
 def test_parse_ods(self):
     print(SASDoc.from_file('corpus/test-parse-ods.sas'))
Exemplo n.º 7
0
 def test_parse_libname(self):
     SASDoc.from_file('corpus/test-parse-libname.sas')
Exemplo n.º 8
0
 def test_parse_do(self):
     SASDoc.from_file('corpus/test-parse-do.sas')
Exemplo n.º 9
0
 def test_nocrash_snf_profiles(self):
     SASDoc.from_file('corpus/snf-profiles.sas')
Exemplo n.º 10
0
 def test_nocrash_bene_characteristics(self):
     SASDoc.from_file('corpus/AC001_P03_Q01_20160628_S01.sas')
Exemplo n.º 11
0
 def test_parse_sql_sas_nonstandard(self):
     SASDoc.from_file('corpus/test-parse-sql-nonstandard.sas')
Exemplo n.º 12
0
 def test_parse_sql_create_view(self):
     SASDoc.from_file('corpus/test-parse-sql-create-view.sas')
Exemplo n.º 13
0
 def test_parse_sql_create_table(self):
     SASDoc.from_file('corpus/test-parse-sql-create-table.sas')
Exemplo n.º 14
0
 def test_parse_var(self):
     SASDoc.from_file('corpus/test-parse-var.sas')
Exemplo n.º 15
0
 def test_parse_toplevel(self):
     SASDoc.from_file('corpus/test-parse-toplevel.sas')
Exemplo n.º 16
0
 def test_parse_control(self):
     SASDoc.from_file('corpus/test-parse-control.sas')
Exemplo n.º 17
0
 def test_parse_data(self):
     SASDoc.from_file('corpus/test-parse-data.sas')
Exemplo n.º 18
0
 def test_nocrash_hospital_profiles(self):
     SASDoc.from_file('corpus/hospital-profiles.sas')
Exemplo n.º 19
0
 def test_parse_drop(self):
     SASDoc.from_file('corpus/test-parse-drop.sas')
Exemplo n.º 20
0
 def test_nocrash_awvcclfv6(self):
     SASDoc.from_file('corpus/awvcclfv6.sas')
Exemplo n.º 21
0
 def test_parse_macros(self):
     SASDoc.from_file('corpus/test-parse-macros.sas')
Exemplo n.º 22
0
 def test_empty_doc(self):
     SASDoc.from_string('')
Exemplo n.º 23
0
 def test_parse_options(self):
     SASDoc.from_file('corpus/test-parse-options.sas')
Exemplo n.º 24
0
 def test_empty_stmt(self):
     SASDoc.from_string(';')
Exemplo n.º 25
0
 def test_parse_proc_export(self):
     SASDoc.from_file('corpus/test-parse-proc-export.sas')
Exemplo n.º 26
0
 def test_ParseNode_comment_dump(self):
     SASDoc.from_string('*;').dump()
Exemplo n.º 27
0
from sasparse import SASDoc

if __name__ == '__main__':

    import sys

    inputfile = sys.stdin
    if sys.argv[1:]:
        inputfile = open(sys.argv[1])

    sys.setrecursionlimit(3000)

    doc = SASDoc.from_fd(inputfile)
    from pprint import pprint
    pprint(doc.top, width=1)
    # print(doc.format(None))
Exemplo n.º 28
0
 def test_macro_macro_call_variable(self):
     SASDoc.from_string(
         '%IF "&LABELMAC" ne "" %THEN %&LABELMAC;  *HCC labels;').dump()
Exemplo n.º 29
0
def parsefile(sasfilepath):
    SASDoc.from_file(sasfilepath)
Exemplo n.º 30
0
 def test_parse_array(self):
     SASDoc.from_file('corpus/test-parse-array.sas')