File tree 5 files changed +83
-4
lines changed
5 files changed +83
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Lexer up-to-date
2
+
3
+ on :
4
+ push :
5
+ branches : ['master', 'installPackage']
6
+ pull_request :
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ check-lexer :
11
+ runs-on : ${{ matrix.os }}
12
+ timeout-minutes : 30
13
+ strategy :
14
+ fail-fast : false
15
+ matrix :
16
+ julia-version : ['1.6']
17
+ julia-arch : ['x64']
18
+ os : ['ubuntu-latest']
19
+
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+
23
+ - name : " Set up Julia"
24
+ uses : julia-actions/setup-julia@v2
25
+ with :
26
+ version : ${{ matrix.julia-version }}
27
+ arch : ${{ matrix.julia-arch }}
28
+
29
+ - name : Cache Julia
30
+ uses : julia-actions/cache@v2
31
+
32
+ - name : Install dependencies
33
+ run : julia --project=bin/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
34
+
35
+ - name : Build Lexer
36
+ run : julia --project=bin/ -e 'include("bin/generate_lexer.jl")'
37
+
38
+ - name : Check for changes in src/lexer.jl
39
+ id : changed-lexer
40
+ uses : tj-actions/changed-files@v44
41
+ with :
42
+ since_last_remote_commit : true
43
+ files : |
44
+ src/lexer.jl
45
+
46
+ - name : Archive changed lexer.jl
47
+ if : steps.changed-lexer.outputs.any_modified == 'true'
48
+ uses : actions/upload-artifact@v4
49
+ with :
50
+ name : lexer.jl
51
+ path : ${{ steps.changed-markdown-files.outputs.all_changed_files }}
Original file line number Diff line number Diff line change 54
54
run : julia --project=regression-tests/. -e 'include("regression-tests/regressionTests.jl"); runTests(libraries, models)'
55
55
56
56
- name : Archive FMUs
57
- uses : actions/upload-artifact@v3
57
+ uses : actions/upload-artifact@v4
58
58
with :
59
59
name : fmu-export
60
60
path : regression-tests/temp/**/*.fmu
Original file line number Diff line number Diff line change
1
+ [deps ]
2
+ Automa = " 67c07d97-cdcb-5c2c-af73-a7f9c32a568b"
3
+ MacroTools = " 1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
4
+ OMJulia = " 0f4fe800-344e-11e9-2949-fb537ad918e1"
5
+
6
+ [compat ]
7
+ Automa = " 0.7"
8
+ MacroTools = " 0.5.4"
9
+ julia = " 1.6"
Original file line number Diff line number Diff line change
1
+ # Lexer for OpenModelica outputs
2
+
3
+ Builds lexer [ src/lexer.jl] ( ../src/lexer.jl ) using
4
+ [ Automa.jl] ( https://github.com/BioJulia/Automa.jl ) .
5
+
6
+ ## Build
7
+
8
+ Change into ` bin/ ` directory and run:
9
+
10
+ ``` julia
11
+ import Pkg;
12
+ Pkg. activate (" ." )
13
+ include (" generate_lexer.jl" )
14
+ ```
15
+
16
+ ## Additional notes
17
+
18
+ - [ src/memory.jl] ( ../src/memory.jl ) defines Automa.jl types, so Automa.jl
19
+ isn't a dependency for OMJulia.jl.
Original file line number Diff line number Diff line change @@ -37,13 +37,13 @@ for a complete list of all functions.
37
37
Some characters in argument `expr` need to be escaped.
38
38
E.g. `"` becomes `\\ "`.
39
39
For example scripting API call
40
-
40
+
41
41
```modelica
42
42
loadFile("/path/to/M.mo")
43
43
```
44
-
44
+
45
45
will translate to
46
-
46
+
47
47
```julia
48
48
sendExpression(omc, "loadFile(\\ "/path/to/M.mo\\ ")")
49
49
```
You can’t perform that action at this time.
0 commit comments