---
# System prepended metadata

title: ICON Liskov Directive Parsing Implementation Notes

---


# ICON Liskov Directive Parsing Implementation Notes

### Parser

- Implemented features
	- Read file and collects all DSL directives.
	- Parses preprocessor directives (`START`, `END`, `CREATE`, `DECLARE`).
	- Does syntax validation on the preprocessor directives.
	- Does validation of semantics on the preprocessor directives.
	- Returns a class containing all necessary data for code generation.

Example directives:

Delimiter: `;`

**DECLARE**

```
!$DSL DECLARE(vt=(nproma, p_patch%nlev, p_patch%nblks_e); &  
!$DSL         vn_ie=(nproma, p_patch%nlevp1, p_patch%nblks_e))
```


**CREATE**

```
!$DSL CREATE(vt; vn_ie)
```

**START**

```
!$DSL START(name=mo_nh_diffusion_stencil_06; &  
!$DSL       vn_ie=p_diag&vn_ie(:, :, 1); w=p_prog%w(:,:,1); &  
!$DSL       z_v_grad_w=z_v_grad_w(:,:,:); vn_ie_abs_tol=1e-12_wp; &  
!$DSL       vertical_lower=1; vertical_upper=nlev; &  
!$DSL       horizontal_lower=i_startidx; horizontal_upper=i_endidx)
```

**END**

```
!$DSL END(name=mo_nh_diffusion_stencil_06)
```
