Exemple #1
0
    def test_parse_select(self):
        SASDoc.from_string('''
SELECT;
WHEN(&SEX='2') _AGESEX  = 1;
OTHERWISE;
END;
        ''')
 def test_parse_title(self):
     SASDoc.from_file('corpus/test-parse-title.sas')
Exemple #3
0
 def test_symio_001(self):
     SASDoc.from_file('corpus/test-symio-001.sas')
 def test_parse_proc_format(self):
     SASDoc.from_file('corpus/test-parse-proc-format.sas')
 def test_parse_proc_datasets(self):
     SASDoc.from_file('corpus/test-parse-proc-datasets.sas')
 def test_parse_ods(self):
     print(SASDoc.from_file('corpus/test-parse-ods.sas'))
 def test_parse_libname(self):
     SASDoc.from_file('corpus/test-parse-libname.sas')
 def test_parse_do(self):
     SASDoc.from_file('corpus/test-parse-do.sas')
 def test_nocrash_snf_profiles(self):
     SASDoc.from_file('corpus/snf-profiles.sas')
Exemple #10
0
 def test_nocrash_bene_characteristics(self):
     SASDoc.from_file('corpus/AC001_P03_Q01_20160628_S01.sas')
Exemple #11
0
 def test_parse_sql_sas_nonstandard(self):
     SASDoc.from_file('corpus/test-parse-sql-nonstandard.sas')
Exemple #12
0
 def test_parse_sql_create_view(self):
     SASDoc.from_file('corpus/test-parse-sql-create-view.sas')
Exemple #13
0
 def test_parse_sql_create_table(self):
     SASDoc.from_file('corpus/test-parse-sql-create-table.sas')
Exemple #14
0
 def test_parse_var(self):
     SASDoc.from_file('corpus/test-parse-var.sas')
Exemple #15
0
 def test_parse_toplevel(self):
     SASDoc.from_file('corpus/test-parse-toplevel.sas')
Exemple #16
0
 def test_parse_control(self):
     SASDoc.from_file('corpus/test-parse-control.sas')
Exemple #17
0
 def test_parse_data(self):
     SASDoc.from_file('corpus/test-parse-data.sas')
Exemple #18
0
 def test_nocrash_hospital_profiles(self):
     SASDoc.from_file('corpus/hospital-profiles.sas')
Exemple #19
0
 def test_parse_drop(self):
     SASDoc.from_file('corpus/test-parse-drop.sas')
Exemple #20
0
 def test_nocrash_awvcclfv6(self):
     SASDoc.from_file('corpus/awvcclfv6.sas')
Exemple #21
0
 def test_parse_macros(self):
     SASDoc.from_file('corpus/test-parse-macros.sas')
Exemple #22
0
 def test_empty_doc(self):
     SASDoc.from_string('')
Exemple #23
0
 def test_parse_options(self):
     SASDoc.from_file('corpus/test-parse-options.sas')
Exemple #24
0
 def test_empty_stmt(self):
     SASDoc.from_string(';')
Exemple #25
0
 def test_parse_proc_export(self):
     SASDoc.from_file('corpus/test-parse-proc-export.sas')
Exemple #26
0
 def test_ParseNode_comment_dump(self):
     SASDoc.from_string('*;').dump()
Exemple #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))
Exemple #28
0
 def test_macro_macro_call_variable(self):
     SASDoc.from_string(
         '%IF "&LABELMAC" ne "" %THEN %&LABELMAC;  *HCC labels;').dump()
Exemple #29
0
def parsefile(sasfilepath):
    SASDoc.from_file(sasfilepath)
Exemple #30
0
 def test_parse_array(self):
     SASDoc.from_file('corpus/test-parse-array.sas')